]> git.sur5r.net Git - openldap/blob - configure
978e5805de3069987f29b1759c62209657fa877b
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.332 2000/09/18 18:03:43 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 for ac_func in getaddrinfo 
4186 do
4187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4188 echo "configure:4189: checking for $ac_func" >&5
4189 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 /* System header to define __stub macros and hopefully few prototypes,
4196     which can conflict with char $ac_func(); below.  */
4197 #include <assert.h>
4198 /* Override any gcc2 internal prototype to avoid an error.  */
4199 /* We use char because int might match the return type of a gcc2
4200     builtin and then its argument prototype would still apply.  */
4201 char $ac_func();
4202 char (*f)();
4203
4204 int main() {
4205
4206 /* The GNU C library defines this for functions which it implements
4207     to always fail with ENOSYS.  Some functions are actually named
4208     something starting with __ and the normal name is an alias.  */
4209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4210 choke me
4211 #else
4212 f = $ac_func;
4213 #endif
4214
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218   rm -rf conftest*
4219   eval "ac_cv_func_$ac_func=yes"
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -rf conftest*
4224   eval "ac_cv_func_$ac_func=no"
4225 fi
4226 rm -f conftest*
4227 fi
4228
4229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4230   echo "$ac_t""yes" 1>&6
4231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4232   cat >> confdefs.h <<EOF
4233 #define $ac_tr_func 1
4234 EOF
4235  
4236 else
4237   echo "$ac_t""no" 1>&6
4238 fi
4239 done
4240
4241
4242 if test $ac_cv_func_getaddrinfo = no ; then
4243         if test $ol_enable_ipv6 = yes ; then
4244                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
4245         fi
4246         ol_enable_ipv6=no
4247 fi
4248
4249 if test $ol_enable_local != no ; then
4250         for ac_hdr in sys/un.h 
4251 do
4252 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4253 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4254 echo "configure:4255: checking for $ac_hdr" >&5
4255 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4256   echo $ac_n "(cached) $ac_c" 1>&6
4257 else
4258   cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 #include <$ac_hdr>
4262 EOF
4263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4264 { (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4266 if test -z "$ac_err"; then
4267   rm -rf conftest*
4268   eval "ac_cv_header_$ac_safe=yes"
4269 else
4270   echo "$ac_err" >&5
4271   echo "configure: failed program was:" >&5
4272   cat conftest.$ac_ext >&5
4273   rm -rf conftest*
4274   eval "ac_cv_header_$ac_safe=no"
4275 fi
4276 rm -f conftest*
4277 fi
4278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4279   echo "$ac_t""yes" 1>&6
4280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4281   cat >> confdefs.h <<EOF
4282 #define $ac_tr_hdr 1
4283 EOF
4284  
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288 done
4289
4290
4291         if test $ol_enable_local = auto ; then
4292                 ol_enable_local=$ac_cv_header_sys_un_h
4293         elif test $ac_cv_header_sys_un_h = no ; then
4294                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
4295         fi
4296 fi
4297
4298 ol_link_modules=no
4299 if test $ol_enable_modules != no ; then
4300         for ac_hdr in ltdl.h
4301 do
4302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4304 echo "configure:4305: checking for $ac_hdr" >&5
4305 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <$ac_hdr>
4312 EOF
4313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4314 { (eval echo configure:4315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4316 if test -z "$ac_err"; then
4317   rm -rf conftest*
4318   eval "ac_cv_header_$ac_safe=yes"
4319 else
4320   echo "$ac_err" >&5
4321   echo "configure: failed program was:" >&5
4322   cat conftest.$ac_ext >&5
4323   rm -rf conftest*
4324   eval "ac_cv_header_$ac_safe=no"
4325 fi
4326 rm -f conftest*
4327 fi
4328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4329   echo "$ac_t""yes" 1>&6
4330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4331   cat >> confdefs.h <<EOF
4332 #define $ac_tr_hdr 1
4333 EOF
4334  
4335 else
4336   echo "$ac_t""no" 1>&6
4337 fi
4338 done
4339
4340
4341         if test $ac_cv_header_ltdl_h = no ; then
4342                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4343         fi
4344
4345         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4346 echo "configure:4347: checking for lt_dlinit in -lltdl" >&5
4347 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4348 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4349   echo $ac_n "(cached) $ac_c" 1>&6
4350 else
4351   ac_save_LIBS="$LIBS"
4352 LIBS="-lltdl  $LIBS"
4353 cat > conftest.$ac_ext <<EOF
4354 #line 4355 "configure"
4355 #include "confdefs.h"
4356 /* Override any gcc2 internal prototype to avoid an error.  */
4357 /* We use char because int might match the return type of a gcc2
4358     builtin and then its argument prototype would still apply.  */
4359 char lt_dlinit();
4360
4361 int main() {
4362 lt_dlinit()
4363 ; return 0; }
4364 EOF
4365 if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4366   rm -rf conftest*
4367   eval "ac_cv_lib_$ac_lib_var=yes"
4368 else
4369   echo "configure: failed program was:" >&5
4370   cat conftest.$ac_ext >&5
4371   rm -rf conftest*
4372   eval "ac_cv_lib_$ac_lib_var=no"
4373 fi
4374 rm -f conftest*
4375 LIBS="$ac_save_LIBS"
4376
4377 fi
4378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4379   echo "$ac_t""yes" 1>&6
4380   
4381             MODULES_LIBS=-lltdl
4382             cat >> confdefs.h <<\EOF
4383 #define HAVE_LIBLTDL 1
4384 EOF
4385
4386         
4387 else
4388   echo "$ac_t""no" 1>&6
4389 fi
4390
4391
4392         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4393                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4394         fi
4395         ol_link_modules=yes
4396 else
4397         ol_with_bdb_module=static
4398         ol_with_dnssrv_module=static
4399         ol_with_ldap_module=static
4400         ol_with_ldbm_module=static
4401         ol_with_passwd_module=static
4402         ol_with_perl_module=static
4403         ol_with_shell_module=static
4404         ol_with_tcl_module=static
4405         ol_with_sql_module=static
4406 fi
4407
4408 # test for EBCDIC
4409 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4410 echo "configure:4411: checking for EBCDIC" >&5
4411 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   
4415         cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418
4419 #if !('M' == 0xd4)
4420 #include <__ASCII__/generate_error.h>
4421 #endif
4422
4423 EOF
4424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4425 { (eval echo configure:4426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4427 if test -z "$ac_err"; then
4428   rm -rf conftest*
4429   ol_cv_cpp_ebcdic=yes
4430 else
4431   echo "$ac_err" >&5
4432   echo "configure: failed program was:" >&5
4433   cat conftest.$ac_ext >&5
4434   rm -rf conftest*
4435   ol_cv_cpp_ebcdic=no
4436 fi
4437 rm -f conftest*
4438 fi
4439
4440 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4441 if test $ol_cv_cpp_ebcdic = yes ; then
4442         cat >> confdefs.h <<\EOF
4443 #define HAVE_EBCDIC 1
4444 EOF
4445
4446 fi
4447
4448 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4449 echo "configure:4450: checking for ANSI C header files" >&5
4450 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4451   echo $ac_n "(cached) $ac_c" 1>&6
4452 else
4453   cat > conftest.$ac_ext <<EOF
4454 #line 4455 "configure"
4455 #include "confdefs.h"
4456 #include <stdlib.h>
4457 #include <stdarg.h>
4458 #include <string.h>
4459 #include <float.h>
4460 EOF
4461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4462 { (eval echo configure:4463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4464 if test -z "$ac_err"; then
4465   rm -rf conftest*
4466   ol_cv_header_stdc=yes
4467 else
4468   echo "$ac_err" >&5
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471   rm -rf conftest*
4472   ol_cv_header_stdc=no
4473 fi
4474 rm -f conftest*
4475
4476 if test $ol_cv_header_stdc = yes; then
4477   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4478 cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 #include <string.h>
4482 EOF
4483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4484   egrep "memchr" >/dev/null 2>&1; then
4485   :
4486 else
4487   rm -rf conftest*
4488   ol_cv_header_stdc=no
4489 fi
4490 rm -f conftest*
4491
4492 fi
4493
4494 if test $ol_cv_header_stdc = yes; then
4495   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499 #include <stdlib.h>
4500 EOF
4501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4502   egrep "free" >/dev/null 2>&1; then
4503   :
4504 else
4505   rm -rf conftest*
4506   ol_cv_header_stdc=no
4507 fi
4508 rm -f conftest*
4509
4510 fi
4511
4512 if test $ol_cv_header_stdc = yes; then
4513   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4514 if test "$cross_compiling" = yes; then
4515   :
4516 else
4517   cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 #include <ctype.h>
4521 #ifndef HAVE_EBCDIC
4522 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4523 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4524 #else
4525 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4526                 || ('j' <= (c) && (c) <= 'r') \
4527                 || ('s' <= (c) && (c) <= 'z'))
4528 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4529 #endif
4530 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4531 int main () { int i; for (i = 0; i < 256; i++)
4532 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4533 exit (0); }
4534
4535 EOF
4536 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4537 then
4538   :
4539 else
4540   echo "configure: failed program was:" >&5
4541   cat conftest.$ac_ext >&5
4542   rm -fr conftest*
4543   ol_cv_header_stdc=no
4544 fi
4545 rm -fr conftest*
4546 fi
4547
4548 fi
4549 fi
4550
4551 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4552 if test $ol_cv_header_stdc = yes; then
4553   cat >> confdefs.h <<\EOF
4554 #define STDC_HEADERS 1
4555 EOF
4556
4557 fi
4558 ac_cv_header_stdc=disable
4559
4560
4561 if test $ol_cv_header_stdc != yes; then
4562         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4563 fi
4564
4565 ac_header_dirent=no
4566 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4567 do
4568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4569 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4570 echo "configure:4571: checking for $ac_hdr that defines DIR" >&5
4571 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4572   echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574   cat > conftest.$ac_ext <<EOF
4575 #line 4576 "configure"
4576 #include "confdefs.h"
4577 #include <sys/types.h>
4578 #include <$ac_hdr>
4579 int main() {
4580 DIR *dirp = 0;
4581 ; return 0; }
4582 EOF
4583 if { (eval echo configure:4584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4584   rm -rf conftest*
4585   eval "ac_cv_header_dirent_$ac_safe=yes"
4586 else
4587   echo "configure: failed program was:" >&5
4588   cat conftest.$ac_ext >&5
4589   rm -rf conftest*
4590   eval "ac_cv_header_dirent_$ac_safe=no"
4591 fi
4592 rm -f conftest*
4593 fi
4594 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4595   echo "$ac_t""yes" 1>&6
4596     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4597   cat >> confdefs.h <<EOF
4598 #define $ac_tr_hdr 1
4599 EOF
4600  ac_header_dirent=$ac_hdr; break
4601 else
4602   echo "$ac_t""no" 1>&6
4603 fi
4604 done
4605 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4606 if test $ac_header_dirent = dirent.h; then
4607 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4608 echo "configure:4609: checking for opendir in -ldir" >&5
4609 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4611   echo $ac_n "(cached) $ac_c" 1>&6
4612 else
4613   ac_save_LIBS="$LIBS"
4614 LIBS="-ldir  $LIBS"
4615 cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 /* Override any gcc2 internal prototype to avoid an error.  */
4619 /* We use char because int might match the return type of a gcc2
4620     builtin and then its argument prototype would still apply.  */
4621 char opendir();
4622
4623 int main() {
4624 opendir()
4625 ; return 0; }
4626 EOF
4627 if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4628   rm -rf conftest*
4629   eval "ac_cv_lib_$ac_lib_var=yes"
4630 else
4631   echo "configure: failed program was:" >&5
4632   cat conftest.$ac_ext >&5
4633   rm -rf conftest*
4634   eval "ac_cv_lib_$ac_lib_var=no"
4635 fi
4636 rm -f conftest*
4637 LIBS="$ac_save_LIBS"
4638
4639 fi
4640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4641   echo "$ac_t""yes" 1>&6
4642   LIBS="$LIBS -ldir"
4643 else
4644   echo "$ac_t""no" 1>&6
4645 fi
4646
4647 else
4648 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4649 echo "configure:4650: checking for opendir in -lx" >&5
4650 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4652   echo $ac_n "(cached) $ac_c" 1>&6
4653 else
4654   ac_save_LIBS="$LIBS"
4655 LIBS="-lx  $LIBS"
4656 cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 /* Override any gcc2 internal prototype to avoid an error.  */
4660 /* We use char because int might match the return type of a gcc2
4661     builtin and then its argument prototype would still apply.  */
4662 char opendir();
4663
4664 int main() {
4665 opendir()
4666 ; return 0; }
4667 EOF
4668 if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4669   rm -rf conftest*
4670   eval "ac_cv_lib_$ac_lib_var=yes"
4671 else
4672   echo "configure: failed program was:" >&5
4673   cat conftest.$ac_ext >&5
4674   rm -rf conftest*
4675   eval "ac_cv_lib_$ac_lib_var=no"
4676 fi
4677 rm -f conftest*
4678 LIBS="$ac_save_LIBS"
4679
4680 fi
4681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4682   echo "$ac_t""yes" 1>&6
4683   LIBS="$LIBS -lx"
4684 else
4685   echo "$ac_t""no" 1>&6
4686 fi
4687
4688 fi
4689
4690 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4691 echo "configure:4692: checking for sys/wait.h that is POSIX.1 compatible" >&5
4692 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4693   echo $ac_n "(cached) $ac_c" 1>&6
4694 else
4695   cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 #include <sys/types.h>
4699 #include <sys/wait.h>
4700 #ifndef WEXITSTATUS
4701 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4702 #endif
4703 #ifndef WIFEXITED
4704 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4705 #endif
4706 int main() {
4707 int s;
4708 wait (&s);
4709 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4710 ; return 0; }
4711 EOF
4712 if { (eval echo configure:4713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4713   rm -rf conftest*
4714   ac_cv_header_sys_wait_h=yes
4715 else
4716   echo "configure: failed program was:" >&5
4717   cat conftest.$ac_ext >&5
4718   rm -rf conftest*
4719   ac_cv_header_sys_wait_h=no
4720 fi
4721 rm -f conftest*
4722 fi
4723
4724 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4725 if test $ac_cv_header_sys_wait_h = yes; then
4726   cat >> confdefs.h <<\EOF
4727 #define HAVE_SYS_WAIT_H 1
4728 EOF
4729
4730 fi
4731
4732 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4733 echo "configure:4734: checking POSIX termios" >&5
4734 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4735   echo $ac_n "(cached) $ac_c" 1>&6
4736 else
4737   cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 #include <sys/types.h>
4741 #include <unistd.h>
4742 #include <termios.h>
4743 int main() {
4744 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4745    tcgetattr(0, 0);
4746 ; return 0; }
4747 EOF
4748 if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4749   rm -rf conftest*
4750   am_cv_sys_posix_termios=yes
4751 else
4752   echo "configure: failed program was:" >&5
4753   cat conftest.$ac_ext >&5
4754   rm -rf conftest*
4755   am_cv_sys_posix_termios=no
4756 fi
4757 rm -f conftest*
4758 fi
4759
4760 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4761
4762
4763  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4764 echo "configure:4765: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4765 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4769
4770   gwinsz_in_termios_h=no
4771   if test $am_cv_sys_posix_termios = yes; then
4772     cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775 #include <sys/types.h>
4776 #     include <termios.h>
4777 #     ifdef TIOCGWINSZ
4778         yes
4779 #     endif
4780     
4781 EOF
4782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4783   egrep "yes" >/dev/null 2>&1; then
4784   rm -rf conftest*
4785   gwinsz_in_termios_h=yes
4786 fi
4787 rm -f conftest*
4788
4789   fi
4790
4791   if test $gwinsz_in_termios_h = no; then
4792     cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795 #include <sys/types.h>
4796 #     include <sys/ioctl.h>
4797 #     ifdef TIOCGWINSZ
4798         yes
4799 #     endif
4800     
4801 EOF
4802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4803   egrep "yes" >/dev/null 2>&1; then
4804   rm -rf conftest*
4805   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4806 fi
4807 rm -f conftest*
4808
4809   fi
4810   
4811 fi
4812
4813 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4814   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4815     cat >> confdefs.h <<\EOF
4816 #define GWINSZ_IN_SYS_IOCTL 1
4817 EOF
4818
4819   fi
4820
4821 if test $am_cv_sys_posix_termios = yes ; then
4822         cat >> confdefs.h <<\EOF
4823 #define HAVE_POSIX_TERMIOS 1
4824 EOF
4825
4826 fi
4827
4828 for ac_hdr in \
4829         arpa/inet.h             \
4830         arpa/nameser.h  \
4831         assert.h                \
4832         conio.h                 \
4833         crypt.h                 \
4834         direct.h                \
4835         errno.h                 \
4836         fcntl.h                 \
4837         filio.h                 \
4838         getopt.h                \
4839         grp.h                   \
4840         io.h                    \
4841         libutil.h               \
4842         limits.h                \
4843         locale.h                \
4844         netinet/tcp.h   \
4845         malloc.h                \
4846         memory.h                \
4847         psap.h                  \
4848         pwd.h                   \
4849         process.h               \
4850         resolv.h                \
4851         sgtty.h                 \
4852         shadow.h                \
4853         stddef.h                \
4854         string.h                \
4855         strings.h               \
4856         sysexits.h              \
4857         sys/file.h              \
4858         sys/filio.h             \
4859         sys/errno.h             \
4860         sys/ioctl.h             \
4861         sys/param.h             \
4862         sys/resource.h  \
4863         sys/select.h    \
4864         sys/socket.h    \
4865         sys/syslog.h    \
4866         sys/time.h              \
4867         sys/types.h             \
4868         syslog.h                \
4869         termios.h               \
4870         unistd.h                \
4871         winsock.h               \
4872
4873 do
4874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4876 echo "configure:4877: checking for $ac_hdr" >&5
4877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4878   echo $ac_n "(cached) $ac_c" 1>&6
4879 else
4880   cat > conftest.$ac_ext <<EOF
4881 #line 4882 "configure"
4882 #include "confdefs.h"
4883 #include <$ac_hdr>
4884 EOF
4885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4886 { (eval echo configure:4887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4888 if test -z "$ac_err"; then
4889   rm -rf conftest*
4890   eval "ac_cv_header_$ac_safe=yes"
4891 else
4892   echo "$ac_err" >&5
4893   echo "configure: failed program was:" >&5
4894   cat conftest.$ac_ext >&5
4895   rm -rf conftest*
4896   eval "ac_cv_header_$ac_safe=no"
4897 fi
4898 rm -f conftest*
4899 fi
4900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4901   echo "$ac_t""yes" 1>&6
4902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4903   cat >> confdefs.h <<EOF
4904 #define $ac_tr_hdr 1
4905 EOF
4906  
4907 else
4908   echo "$ac_t""no" 1>&6
4909 fi
4910 done
4911
4912
4913
4914
4915 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4916 echo "configure:4917: checking for sigset in -lV3" >&5
4917 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4919   echo $ac_n "(cached) $ac_c" 1>&6
4920 else
4921   ac_save_LIBS="$LIBS"
4922 LIBS="-lV3  $LIBS"
4923 cat > conftest.$ac_ext <<EOF
4924 #line 4925 "configure"
4925 #include "confdefs.h"
4926 /* Override any gcc2 internal prototype to avoid an error.  */
4927 /* We use char because int might match the return type of a gcc2
4928     builtin and then its argument prototype would still apply.  */
4929 char sigset();
4930
4931 int main() {
4932 sigset()
4933 ; return 0; }
4934 EOF
4935 if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=yes"
4938 else
4939   echo "configure: failed program was:" >&5
4940   cat conftest.$ac_ext >&5
4941   rm -rf conftest*
4942   eval "ac_cv_lib_$ac_lib_var=no"
4943 fi
4944 rm -f conftest*
4945 LIBS="$ac_save_LIBS"
4946
4947 fi
4948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4949   echo "$ac_t""yes" 1>&6
4950     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4951     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4952   cat >> confdefs.h <<EOF
4953 #define $ac_tr_lib 1
4954 EOF
4955
4956   LIBS="-lV3 $LIBS"
4957
4958 else
4959   echo "$ac_t""no" 1>&6
4960 fi
4961
4962
4963 if test $ac_cv_header_winsock_h = yes; then
4964         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4965 echo "configure:4966: checking for winsock" >&5
4966 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4967   echo $ac_n "(cached) $ac_c" 1>&6
4968 else
4969   cat > conftest.$ac_ext <<EOF
4970 #line 4971 "configure"
4971 #include "confdefs.h"
4972 #include <winsock.h>
4973 int main() {
4974
4975                         socket(0,0,0);
4976                         select(0,NULL,NULL,NULL,NULL);
4977                         closesocket(0);
4978                         gethostname(NULL,0);
4979         
4980 ; return 0; }
4981 EOF
4982 if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4983   rm -rf conftest*
4984   ol_cv_winsock=yes
4985 else
4986   echo "configure: failed program was:" >&5
4987   cat conftest.$ac_ext >&5
4988   rm -rf conftest*
4989   ol_cv_winsock=no
4990 fi
4991 rm -f conftest*]
4992 fi
4993
4994 echo "$ac_t""$ol_cv_winsock" 1>&6
4995
4996         if test $ol_cv_winsock = yes ; then
4997                 cat >> confdefs.h <<\EOF
4998 #define HAVE_WINSOCK 1
4999 EOF
5000
5001                 ac_cv_func_socket=yes
5002                 ac_cv_func_select=yes
5003                 ac_cv_func_closesocket=yes
5004                 ac_cv_func_gethostname=yes
5005         fi
5006 fi
5007
5008
5009 echo $ac_n "checking for socket""... $ac_c" 1>&6
5010 echo "configure:5011: checking for socket" >&5
5011 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017 /* System header to define __stub macros and hopefully few prototypes,
5018     which can conflict with char socket(); below.  */
5019 #include <assert.h>
5020 /* Override any gcc2 internal prototype to avoid an error.  */
5021 /* We use char because int might match the return type of a gcc2
5022     builtin and then its argument prototype would still apply.  */
5023 char socket();
5024 char (*f)();
5025
5026 int main() {
5027
5028 /* The GNU C library defines this for functions which it implements
5029     to always fail with ENOSYS.  Some functions are actually named
5030     something starting with __ and the normal name is an alias.  */
5031 #if defined (__stub_socket) || defined (__stub___socket)
5032 choke me
5033 #else
5034 f = socket;
5035 #endif
5036
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5040   rm -rf conftest*
5041   eval "ac_cv_func_socket=yes"
5042 else
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   eval "ac_cv_func_socket=no"
5047 fi
5048 rm -f conftest*
5049 fi
5050
5051 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5052   echo "$ac_t""yes" 1>&6
5053   :
5054 else
5055   echo "$ac_t""no" 1>&6
5056         
5057         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5058 echo "configure:5059: checking for main in -lsocket" >&5
5059 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5061   echo $ac_n "(cached) $ac_c" 1>&6
5062 else
5063   ac_save_LIBS="$LIBS"
5064 LIBS="-lsocket  $LIBS"
5065 cat > conftest.$ac_ext <<EOF
5066 #line 5067 "configure"
5067 #include "confdefs.h"
5068
5069 int main() {
5070 main()
5071 ; return 0; }
5072 EOF
5073 if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5074   rm -rf conftest*
5075   eval "ac_cv_lib_$ac_lib_var=yes"
5076 else
5077   echo "configure: failed program was:" >&5
5078   cat conftest.$ac_ext >&5
5079   rm -rf conftest*
5080   eval "ac_cv_lib_$ac_lib_var=no"
5081 fi
5082 rm -f conftest*
5083 LIBS="$ac_save_LIBS"
5084
5085 fi
5086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5087   echo "$ac_t""yes" 1>&6
5088     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5090   cat >> confdefs.h <<EOF
5091 #define $ac_tr_lib 1
5092 EOF
5093
5094   LIBS="-lsocket $LIBS"
5095
5096 else
5097   echo "$ac_t""no" 1>&6
5098 fi
5099
5100         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5101 echo "configure:5102: checking for main in -lnet" >&5
5102 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5104   echo $ac_n "(cached) $ac_c" 1>&6
5105 else
5106   ac_save_LIBS="$LIBS"
5107 LIBS="-lnet  $LIBS"
5108 cat > conftest.$ac_ext <<EOF
5109 #line 5110 "configure"
5110 #include "confdefs.h"
5111
5112 int main() {
5113 main()
5114 ; return 0; }
5115 EOF
5116 if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5117   rm -rf conftest*
5118   eval "ac_cv_lib_$ac_lib_var=yes"
5119 else
5120   echo "configure: failed program was:" >&5
5121   cat conftest.$ac_ext >&5
5122   rm -rf conftest*
5123   eval "ac_cv_lib_$ac_lib_var=no"
5124 fi
5125 rm -f conftest*
5126 LIBS="$ac_save_LIBS"
5127
5128 fi
5129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5130   echo "$ac_t""yes" 1>&6
5131     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5132     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5133   cat >> confdefs.h <<EOF
5134 #define $ac_tr_lib 1
5135 EOF
5136
5137   LIBS="-lnet $LIBS"
5138
5139 else
5140   echo "$ac_t""no" 1>&6
5141 fi
5142
5143         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5144 echo "configure:5145: checking for main in -lnsl_s" >&5
5145 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5147   echo $ac_n "(cached) $ac_c" 1>&6
5148 else
5149   ac_save_LIBS="$LIBS"
5150 LIBS="-lnsl_s  $LIBS"
5151 cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154
5155 int main() {
5156 main()
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=no"
5167 fi
5168 rm -f conftest*
5169 LIBS="$ac_save_LIBS"
5170
5171 fi
5172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5173   echo "$ac_t""yes" 1>&6
5174     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5176   cat >> confdefs.h <<EOF
5177 #define $ac_tr_lib 1
5178 EOF
5179
5180   LIBS="-lnsl_s $LIBS"
5181
5182 else
5183   echo "$ac_t""no" 1>&6
5184 fi
5185
5186         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5187 echo "configure:5188: checking for main in -lnsl" >&5
5188 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5190   echo $ac_n "(cached) $ac_c" 1>&6
5191 else
5192   ac_save_LIBS="$LIBS"
5193 LIBS="-lnsl  $LIBS"
5194 cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197
5198 int main() {
5199 main()
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=yes"
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208   rm -rf conftest*
5209   eval "ac_cv_lib_$ac_lib_var=no"
5210 fi
5211 rm -f conftest*
5212 LIBS="$ac_save_LIBS"
5213
5214 fi
5215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5216   echo "$ac_t""yes" 1>&6
5217     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5219   cat >> confdefs.h <<EOF
5220 #define $ac_tr_lib 1
5221 EOF
5222
5223   LIBS="-lnsl $LIBS"
5224
5225 else
5226   echo "$ac_t""no" 1>&6
5227 fi
5228
5229         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5230 echo "configure:5231: checking for socket in -linet" >&5
5231 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5233   echo $ac_n "(cached) $ac_c" 1>&6
5234 else
5235   ac_save_LIBS="$LIBS"
5236 LIBS="-linet  $LIBS"
5237 cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 /* Override any gcc2 internal prototype to avoid an error.  */
5241 /* We use char because int might match the return type of a gcc2
5242     builtin and then its argument prototype would still apply.  */
5243 char socket();
5244
5245 int main() {
5246 socket()
5247 ; return 0; }
5248 EOF
5249 if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5250   rm -rf conftest*
5251   eval "ac_cv_lib_$ac_lib_var=yes"
5252 else
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255   rm -rf conftest*
5256   eval "ac_cv_lib_$ac_lib_var=no"
5257 fi
5258 rm -f conftest*
5259 LIBS="$ac_save_LIBS"
5260
5261 fi
5262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5263   echo "$ac_t""yes" 1>&6
5264     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5266   cat >> confdefs.h <<EOF
5267 #define $ac_tr_lib 1
5268 EOF
5269
5270   LIBS="-linet $LIBS"
5271
5272 else
5273   echo "$ac_t""no" 1>&6
5274 fi
5275
5276         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5277 echo "configure:5278: checking for main in -lgen" >&5
5278 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282   ac_save_LIBS="$LIBS"
5283 LIBS="-lgen  $LIBS"
5284 cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5287
5288 int main() {
5289 main()
5290 ; return 0; }
5291 EOF
5292 if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5293   rm -rf conftest*
5294   eval "ac_cv_lib_$ac_lib_var=yes"
5295 else
5296   echo "configure: failed program was:" >&5
5297   cat conftest.$ac_ext >&5
5298   rm -rf conftest*
5299   eval "ac_cv_lib_$ac_lib_var=no"
5300 fi
5301 rm -f conftest*
5302 LIBS="$ac_save_LIBS"
5303
5304 fi
5305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5306   echo "$ac_t""yes" 1>&6
5307     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5308     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5309   cat >> confdefs.h <<EOF
5310 #define $ac_tr_lib 1
5311 EOF
5312
5313   LIBS="-lgen $LIBS"
5314
5315 else
5316   echo "$ac_t""no" 1>&6
5317 fi
5318
5319
5320 fi
5321
5322
5323 echo $ac_n "checking for select""... $ac_c" 1>&6
5324 echo "configure:5325: checking for select" >&5
5325 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328   cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331 /* System header to define __stub macros and hopefully few prototypes,
5332     which can conflict with char select(); below.  */
5333 #include <assert.h>
5334 /* Override any gcc2 internal prototype to avoid an error.  */
5335 /* We use char because int might match the return type of a gcc2
5336     builtin and then its argument prototype would still apply.  */
5337 char select();
5338 char (*f)();
5339
5340 int main() {
5341
5342 /* The GNU C library defines this for functions which it implements
5343     to always fail with ENOSYS.  Some functions are actually named
5344     something starting with __ and the normal name is an alias.  */
5345 #if defined (__stub_select) || defined (__stub___select)
5346 choke me
5347 #else
5348 f = select;
5349 #endif
5350
5351 ; return 0; }
5352 EOF
5353 if { (eval echo configure:5354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5354   rm -rf conftest*
5355   eval "ac_cv_func_select=yes"
5356 else
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359   rm -rf conftest*
5360   eval "ac_cv_func_select=no"
5361 fi
5362 rm -f conftest*
5363 fi
5364
5365 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367   :
5368 else
5369   echo "$ac_t""no" 1>&6
5370 { echo "configure: error: select() required." 1>&2; exit 1; }
5371 fi
5372
5373
5374 if test "${ac_cv_header_winsock_h}" != yes; then
5375                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5376 echo "configure:5377: checking types of arguments for select()" >&5
5377  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5381   echo $ac_n "(cached) $ac_c" 1>&6
5382 else
5383     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5384   echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5387      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5388       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5389        cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 #ifdef HAVE_SYS_TYPES_H
5393 #include <sys/types.h>
5394 #endif
5395 #ifdef HAVE_SYS_TIME_H
5396 #include <sys/time.h>
5397 #endif
5398 #ifdef HAVE_SYS_SELECT_H
5399 #include <sys/select.h>
5400 #endif
5401 #ifdef HAVE_SYS_SOCKET_H
5402 #include <sys/socket.h>
5403 #endif
5404 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);
5405 int main() {
5406
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5410   rm -rf conftest*
5411           ac_not_found=no ; break 3
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   ac_not_found=yes
5417 fi
5418 rm -f conftest*
5419       done
5420      done
5421     done
5422    
5423 fi
5424   
5425 fi
5426  
5427 fi
5428  if test "$ac_not_found" = yes; then
5429   ac_cv_func_select_arg1=int 
5430   ac_cv_func_select_arg234='int *' 
5431   ac_cv_func_select_arg5='struct timeval *'
5432  fi
5433  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5434  cat >> confdefs.h <<EOF
5435 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5436 EOF
5437
5438  cat >> confdefs.h <<EOF
5439 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5440 EOF
5441
5442  cat >> confdefs.h <<EOF
5443 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5444 EOF
5445
5446
5447 fi
5448
5449
5450 for ac_hdr in regex.h 
5451 do
5452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5454 echo "configure:5455: checking for $ac_hdr" >&5
5455 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5456   echo $ac_n "(cached) $ac_c" 1>&6
5457 else
5458   cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461 #include <$ac_hdr>
5462 EOF
5463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5464 { (eval echo configure:5465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5466 if test -z "$ac_err"; then
5467   rm -rf conftest*
5468   eval "ac_cv_header_$ac_safe=yes"
5469 else
5470   echo "$ac_err" >&5
5471   echo "configure: failed program was:" >&5
5472   cat conftest.$ac_ext >&5
5473   rm -rf conftest*
5474   eval "ac_cv_header_$ac_safe=no"
5475 fi
5476 rm -f conftest*
5477 fi
5478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5479   echo "$ac_t""yes" 1>&6
5480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5481   cat >> confdefs.h <<EOF
5482 #define $ac_tr_hdr 1
5483 EOF
5484  
5485 else
5486   echo "$ac_t""no" 1>&6
5487 fi
5488 done
5489
5490 if test "$ac_cv_header_regex_h" != yes ; then
5491         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5492 fi
5493 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5494 echo "configure:5495: checking for regfree" >&5
5495 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 /* System header to define __stub macros and hopefully few prototypes,
5502     which can conflict with char regfree(); below.  */
5503 #include <assert.h>
5504 /* Override any gcc2 internal prototype to avoid an error.  */
5505 /* We use char because int might match the return type of a gcc2
5506     builtin and then its argument prototype would still apply.  */
5507 char regfree();
5508 char (*f)();
5509
5510 int main() {
5511
5512 /* The GNU C library defines this for functions which it implements
5513     to always fail with ENOSYS.  Some functions are actually named
5514     something starting with __ and the normal name is an alias.  */
5515 #if defined (__stub_regfree) || defined (__stub___regfree)
5516 choke me
5517 #else
5518 f = regfree;
5519 #endif
5520
5521 ; return 0; }
5522 EOF
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524   rm -rf conftest*
5525   eval "ac_cv_func_regfree=yes"
5526 else
5527   echo "configure: failed program was:" >&5
5528   cat conftest.$ac_ext >&5
5529   rm -rf conftest*
5530   eval "ac_cv_func_regfree=no"
5531 fi
5532 rm -f conftest*
5533 fi
5534
5535 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5536   echo "$ac_t""yes" 1>&6
5537   :
5538 else
5539   echo "$ac_t""no" 1>&6
5540 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5541 fi
5542
5543
5544
5545 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5546 echo "configure:5547: checking for compatible POSIX regex" >&5
5547 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5548   echo $ac_n "(cached) $ac_c" 1>&6
5549 else
5550   
5551         if test "$cross_compiling" = yes; then
5552   ol_cv_c_posix_regex=cross
5553 else
5554   cat > conftest.$ac_ext <<EOF
5555 #line 5556 "configure"
5556 #include "confdefs.h"
5557
5558 #include <sys/types.h>
5559 #include <regex.h>
5560 static char *pattern, *string;
5561 main()
5562 {
5563         int rc;
5564         regex_t re;
5565
5566         pattern = "^A";
5567
5568         if(regcomp(&re, pattern, 0)) {
5569                 return -1;
5570         }
5571         
5572         string = "ALL MATCH";
5573         
5574         rc = regexec(&re, string, 0, (void*)0, 0);
5575
5576         regfree(&re);
5577
5578         return rc;
5579 }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5582 then
5583   ol_cv_c_posix_regex=yes
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -fr conftest*
5588   ol_cv_c_posix_regex=no
5589 fi
5590 rm -fr conftest*
5591 fi
5592
5593 fi
5594
5595 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5596
5597 if test "$ol_cv_c_posix_regex" = no ; then
5598         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5599 fi
5600
5601 ol_link_dnssrv=no
5602 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5603 echo "configure:5604: checking for res_query" >&5
5604 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5605   echo $ac_n "(cached) $ac_c" 1>&6
5606 else
5607   cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 /* System header to define __stub macros and hopefully few prototypes,
5611     which can conflict with char res_query(); below.  */
5612 #include <assert.h>
5613 /* Override any gcc2 internal prototype to avoid an error.  */
5614 /* We use char because int might match the return type of a gcc2
5615     builtin and then its argument prototype would still apply.  */
5616 char res_query();
5617 char (*f)();
5618
5619 int main() {
5620
5621 /* The GNU C library defines this for functions which it implements
5622     to always fail with ENOSYS.  Some functions are actually named
5623     something starting with __ and the normal name is an alias.  */
5624 #if defined (__stub_res_query) || defined (__stub___res_query)
5625 choke me
5626 #else
5627 f = res_query;
5628 #endif
5629
5630 ; return 0; }
5631 EOF
5632 if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5633   rm -rf conftest*
5634   eval "ac_cv_func_res_query=yes"
5635 else
5636   echo "configure: failed program was:" >&5
5637   cat conftest.$ac_ext >&5
5638   rm -rf conftest*
5639   eval "ac_cv_func_res_query=no"
5640 fi
5641 rm -f conftest*
5642 fi
5643
5644 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5645   echo "$ac_t""yes" 1>&6
5646   :
5647 else
5648   echo "$ac_t""no" 1>&6
5649 fi
5650
5651 if test $ac_cv_func_res_query = no ; then 
5652         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5653 echo "configure:5654: checking for res_query in -lbind" >&5
5654 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5655 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5656   echo $ac_n "(cached) $ac_c" 1>&6
5657 else
5658   ac_save_LIBS="$LIBS"
5659 LIBS="-lbind  $LIBS"
5660 cat > conftest.$ac_ext <<EOF
5661 #line 5662 "configure"
5662 #include "confdefs.h"
5663 /* Override any gcc2 internal prototype to avoid an error.  */
5664 /* We use char because int might match the return type of a gcc2
5665     builtin and then its argument prototype would still apply.  */
5666 char res_query();
5667
5668 int main() {
5669 res_query()
5670 ; return 0; }
5671 EOF
5672 if { (eval echo configure:5673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5673   rm -rf conftest*
5674   eval "ac_cv_lib_$ac_lib_var=yes"
5675 else
5676   echo "configure: failed program was:" >&5
5677   cat conftest.$ac_ext >&5
5678   rm -rf conftest*
5679   eval "ac_cv_lib_$ac_lib_var=no"
5680 fi
5681 rm -f conftest*
5682 LIBS="$ac_save_LIBS"
5683
5684 fi
5685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5686   echo "$ac_t""yes" 1>&6
5687     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5688     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5689   cat >> confdefs.h <<EOF
5690 #define $ac_tr_lib 1
5691 EOF
5692
5693   LIBS="-lbind $LIBS"
5694
5695 else
5696   echo "$ac_t""no" 1>&6
5697 fi
5698
5699         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5700 fi
5701
5702 if test $ac_cv_func_res_query = no ; then 
5703         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5704 echo "configure:5705: checking for __res_query in -lbind" >&5
5705 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5707   echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709   ac_save_LIBS="$LIBS"
5710 LIBS="-lbind  $LIBS"
5711 cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714 /* Override any gcc2 internal prototype to avoid an error.  */
5715 /* We use char because int might match the return type of a gcc2
5716     builtin and then its argument prototype would still apply.  */
5717 char __res_query();
5718
5719 int main() {
5720 __res_query()
5721 ; return 0; }
5722 EOF
5723 if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5724   rm -rf conftest*
5725   eval "ac_cv_lib_$ac_lib_var=yes"
5726 else
5727   echo "configure: failed program was:" >&5
5728   cat conftest.$ac_ext >&5
5729   rm -rf conftest*
5730   eval "ac_cv_lib_$ac_lib_var=no"
5731 fi
5732 rm -f conftest*
5733 LIBS="$ac_save_LIBS"
5734
5735 fi
5736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5737   echo "$ac_t""yes" 1>&6
5738     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5739     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5740   cat >> confdefs.h <<EOF
5741 #define $ac_tr_lib 1
5742 EOF
5743
5744   LIBS="-lbind $LIBS"
5745
5746 else
5747   echo "$ac_t""no" 1>&6
5748 fi
5749
5750         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5751 fi
5752
5753 if test $ac_cv_func_res_query = no ; then 
5754         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5755 echo "configure:5756: checking for res_query in -lresolv" >&5
5756 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5758   echo $ac_n "(cached) $ac_c" 1>&6
5759 else
5760   ac_save_LIBS="$LIBS"
5761 LIBS="-lresolv  $LIBS"
5762 cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765 /* Override any gcc2 internal prototype to avoid an error.  */
5766 /* We use char because int might match the return type of a gcc2
5767     builtin and then its argument prototype would still apply.  */
5768 char res_query();
5769
5770 int main() {
5771 res_query()
5772 ; return 0; }
5773 EOF
5774 if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5775   rm -rf conftest*
5776   eval "ac_cv_lib_$ac_lib_var=yes"
5777 else
5778   echo "configure: failed program was:" >&5
5779   cat conftest.$ac_ext >&5
5780   rm -rf conftest*
5781   eval "ac_cv_lib_$ac_lib_var=no"
5782 fi
5783 rm -f conftest*
5784 LIBS="$ac_save_LIBS"
5785
5786 fi
5787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5788   echo "$ac_t""yes" 1>&6
5789     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5790     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5791   cat >> confdefs.h <<EOF
5792 #define $ac_tr_lib 1
5793 EOF
5794
5795   LIBS="-lresolv $LIBS"
5796
5797 else
5798   echo "$ac_t""no" 1>&6
5799 fi
5800
5801         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5802 fi
5803
5804 if test "$ac_cv_func_res_query" = yes ; then
5805         cat >> confdefs.h <<\EOF
5806 #define HAVE_RES_QUERY 1
5807 EOF
5808
5809
5810         if test $ol_enable_dnssrv != no ; then
5811                 ol_link_dnssrv=yes
5812         fi
5813 fi
5814
5815 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5816         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5817 fi
5818
5819 ol_link_kbind=no
5820 ol_link_kpasswd=no
5821 ol_link_krb5=no
5822 ol_link_krb4=no
5823
5824 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5825         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5826         -o $ol_with_kerberos = k425 ; then
5827
5828         for ac_hdr in krb5.h
5829 do
5830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5832 echo "configure:5833: checking for $ac_hdr" >&5
5833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 #include <$ac_hdr>
5840 EOF
5841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5842 { (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5844 if test -z "$ac_err"; then
5845   rm -rf conftest*
5846   eval "ac_cv_header_$ac_safe=yes"
5847 else
5848   echo "$ac_err" >&5
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_header_$ac_safe=no"
5853 fi
5854 rm -f conftest*
5855 fi
5856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5857   echo "$ac_t""yes" 1>&6
5858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5859   cat >> confdefs.h <<EOF
5860 #define $ac_tr_hdr 1
5861 EOF
5862  
5863 else
5864   echo "$ac_t""no" 1>&6
5865 fi
5866 done
5867
5868
5869         if test $ac_cv_header_krb5_h = yes ; then
5870                                 for ac_hdr in heim_err.h
5871 do
5872 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5873 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5874 echo "configure:5875: checking for $ac_hdr" >&5
5875 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5876   echo $ac_n "(cached) $ac_c" 1>&6
5877 else
5878   cat > conftest.$ac_ext <<EOF
5879 #line 5880 "configure"
5880 #include "confdefs.h"
5881 #include <$ac_hdr>
5882 EOF
5883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5884 { (eval echo configure:5885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5886 if test -z "$ac_err"; then
5887   rm -rf conftest*
5888   eval "ac_cv_header_$ac_safe=yes"
5889 else
5890   echo "$ac_err" >&5
5891   echo "configure: failed program was:" >&5
5892   cat conftest.$ac_ext >&5
5893   rm -rf conftest*
5894   eval "ac_cv_header_$ac_safe=no"
5895 fi
5896 rm -f conftest*
5897 fi
5898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5899   echo "$ac_t""yes" 1>&6
5900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5901   cat >> confdefs.h <<EOF
5902 #define $ac_tr_hdr 1
5903 EOF
5904  
5905 else
5906   echo "$ac_t""no" 1>&6
5907 fi
5908 done
5909
5910                 if test $ac_cv_header_heim_err_h = yes ; then
5911                         krb5_impl=heimdal
5912                 else
5913                         krb5_impl=mit
5914                 fi
5915
5916                 if test $krb5_impl = mit; then
5917                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5918 echo "configure:5919: checking for main in -lkrb5" >&5
5919 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5921   echo $ac_n "(cached) $ac_c" 1>&6
5922 else
5923   ac_save_LIBS="$LIBS"
5924 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5925 cat > conftest.$ac_ext <<EOF
5926 #line 5927 "configure"
5927 #include "confdefs.h"
5928
5929 int main() {
5930 main()
5931 ; return 0; }
5932 EOF
5933 if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5934   rm -rf conftest*
5935   eval "ac_cv_lib_$ac_lib_var=yes"
5936 else
5937   echo "configure: failed program was:" >&5
5938   cat conftest.$ac_ext >&5
5939   rm -rf conftest*
5940   eval "ac_cv_lib_$ac_lib_var=no"
5941 fi
5942 rm -f conftest*
5943 LIBS="$ac_save_LIBS"
5944
5945 fi
5946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5947   echo "$ac_t""yes" 1>&6
5948   have_krb5=yes
5949                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5950 else
5951   echo "$ac_t""no" 1>&6
5952 have_krb5=no
5953 fi
5954
5955
5956                 elif test $krb5_impl = heimdal; then
5957                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5958 echo "configure:5959: checking for main in -lkrb5" >&5
5959 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5961   echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963   ac_save_LIBS="$LIBS"
5964 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5965 cat > conftest.$ac_ext <<EOF
5966 #line 5967 "configure"
5967 #include "confdefs.h"
5968
5969 int main() {
5970 main()
5971 ; return 0; }
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5974   rm -rf conftest*
5975   eval "ac_cv_lib_$ac_lib_var=yes"
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   eval "ac_cv_lib_$ac_lib_var=no"
5981 fi
5982 rm -f conftest*
5983 LIBS="$ac_save_LIBS"
5984
5985 fi
5986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5987   echo "$ac_t""yes" 1>&6
5988   have_krb5=yes
5989                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5990 else
5991   echo "$ac_t""no" 1>&6
5992 have_krb5=no
5993 fi
5994
5995
5996                         cat >> confdefs.h <<\EOF
5997 #define HAVE_HEIMDAL_KERBEROS 1
5998 EOF
5999
6000                 else
6001                         have_krb5=no
6002                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6003                 fi
6004
6005                 if test $have_krb5 = yes ; then
6006                         ol_link_krb5=yes
6007
6008                         cat >> confdefs.h <<\EOF
6009 #define HAVE_KRB5 1
6010 EOF
6011
6012
6013                         if test $ol_enable_kpasswd != no ; then
6014                                 ol_link_kpasswd=yes;
6015                         fi
6016
6017                         if test $ol_with_kerberos = k5only ; then
6018                                 ol_with_kerberos=found
6019                         fi
6020
6021                 elif test $ol_with_kerberos != auto ; then
6022                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6023                 fi
6024
6025         fi
6026 fi
6027
6028 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6029         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6030
6031         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6032 do
6033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6035 echo "configure:6036: checking for $ac_hdr" >&5
6036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6037   echo $ac_n "(cached) $ac_c" 1>&6
6038 else
6039   cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6042 #include <$ac_hdr>
6043 EOF
6044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6045 { (eval echo configure:6046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6047 if test -z "$ac_err"; then
6048   rm -rf conftest*
6049   eval "ac_cv_header_$ac_safe=yes"
6050 else
6051   echo "$ac_err" >&5
6052   echo "configure: failed program was:" >&5
6053   cat conftest.$ac_ext >&5
6054   rm -rf conftest*
6055   eval "ac_cv_header_$ac_safe=no"
6056 fi
6057 rm -f conftest*
6058 fi
6059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6060   echo "$ac_t""yes" 1>&6
6061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6062   cat >> confdefs.h <<EOF
6063 #define $ac_tr_hdr 1
6064 EOF
6065  
6066 else
6067   echo "$ac_t""no" 1>&6
6068 fi
6069 done
6070
6071
6072         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6073                 if test $krb5_impl = mit; then
6074                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6075 echo "configure:6076: checking for main in -lkrb4" >&5
6076 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6078   echo $ac_n "(cached) $ac_c" 1>&6
6079 else
6080   ac_save_LIBS="$LIBS"
6081 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6082 cat > conftest.$ac_ext <<EOF
6083 #line 6084 "configure"
6084 #include "confdefs.h"
6085
6086 int main() {
6087 main()
6088 ; return 0; }
6089 EOF
6090 if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6091   rm -rf conftest*
6092   eval "ac_cv_lib_$ac_lib_var=yes"
6093 else
6094   echo "configure: failed program was:" >&5
6095   cat conftest.$ac_ext >&5
6096   rm -rf conftest*
6097   eval "ac_cv_lib_$ac_lib_var=no"
6098 fi
6099 rm -f conftest*
6100 LIBS="$ac_save_LIBS"
6101
6102 fi
6103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6104   echo "$ac_t""yes" 1>&6
6105   have_k425=yes
6106                                 KRB4_LIBS="-lkrb4 -ldes425"
6107 else
6108   echo "$ac_t""no" 1>&6
6109 have_k425=no
6110 fi
6111
6112
6113                 elif test $krb5_impl = heimdal; then
6114                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6115 echo "configure:6116: checking for main in -lkrb4" >&5
6116 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6117 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6118   echo $ac_n "(cached) $ac_c" 1>&6
6119 else
6120   ac_save_LIBS="$LIBS"
6121 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6122 cat > conftest.$ac_ext <<EOF
6123 #line 6124 "configure"
6124 #include "confdefs.h"
6125
6126 int main() {
6127 main()
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131   rm -rf conftest*
6132   eval "ac_cv_lib_$ac_lib_var=yes"
6133 else
6134   echo "configure: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   rm -rf conftest*
6137   eval "ac_cv_lib_$ac_lib_var=no"
6138 fi
6139 rm -f conftest*
6140 LIBS="$ac_save_LIBS"
6141
6142 fi
6143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6144   echo "$ac_t""yes" 1>&6
6145   have_k425=yes
6146                                 KRB4_LIBS="-lkrb4"
6147 else
6148   echo "$ac_t""no" 1>&6
6149 have_k425=no
6150 fi
6151
6152
6153                 else
6154                         have_425=no
6155                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6156                 fi
6157
6158                 if test $have_k425 = yes ; then
6159                         ol_with_kerberos=found
6160                         ol_link_krb4=yes
6161
6162                         cat >> confdefs.h <<\EOF
6163 #define HAVE_KRB425 1
6164 EOF
6165
6166                         cat >> confdefs.h <<\EOF
6167 #define HAVE_KRB4 1
6168 EOF
6169
6170
6171                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6172 echo "configure:6173: checking for des_debug in Kerberos libraries" >&5
6173 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6174   echo $ac_n "(cached) $ac_c" 1>&6
6175 else
6176   
6177                                                                 save_LIBS="$LIBS"
6178                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6179                                 cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182
6183 #include <kerberosIV/krb.h>
6184 #include <kerberosIV/des.h>
6185 extern int des_debug;
6186
6187 int main() {
6188
6189 des_debug = 1;
6190
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   ol_cv_var_des_debug=yes
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   ol_cv_var_des_debug=no
6201 fi
6202 rm -f conftest*
6203                                                                 LIBS="$save_LIBS"
6204                         
6205 fi
6206
6207 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6208
6209                         if test $ol_cv_var_des_debug = yes ; then
6210                                 cat >> confdefs.h <<\EOF
6211 #define HAVE_DES_DEBUG 1
6212 EOF
6213
6214                         fi
6215
6216                         LIBS="$save_LIBS"
6217                 fi
6218         fi
6219 fi
6220
6221 if test $ol_link_krb5 = yes ; then
6222         ol_with_kerberos=found
6223 fi
6224
6225 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6226         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6227
6228         for ac_hdr in krb.h des.h krb-archaeology.h 
6229 do
6230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6232 echo "configure:6233: checking for $ac_hdr" >&5
6233 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6234   echo $ac_n "(cached) $ac_c" 1>&6
6235 else
6236   cat > conftest.$ac_ext <<EOF
6237 #line 6238 "configure"
6238 #include "confdefs.h"
6239 #include <$ac_hdr>
6240 EOF
6241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6242 { (eval echo configure:6243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6244 if test -z "$ac_err"; then
6245   rm -rf conftest*
6246   eval "ac_cv_header_$ac_safe=yes"
6247 else
6248   echo "$ac_err" >&5
6249   echo "configure: failed program was:" >&5
6250   cat conftest.$ac_ext >&5
6251   rm -rf conftest*
6252   eval "ac_cv_header_$ac_safe=no"
6253 fi
6254 rm -f conftest*
6255 fi
6256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6257   echo "$ac_t""yes" 1>&6
6258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6259   cat >> confdefs.h <<EOF
6260 #define $ac_tr_hdr 1
6261 EOF
6262  
6263 else
6264   echo "$ac_t""no" 1>&6
6265 fi
6266 done
6267
6268
6269         if test $ac_cv_header_krb_h = yes ; then
6270                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6271 echo "configure:6272: checking for main in -lkrb" >&5
6272 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6274   echo $ac_n "(cached) $ac_c" 1>&6
6275 else
6276   ac_save_LIBS="$LIBS"
6277 LIBS="-lkrb -ldes $LIBS"
6278 cat > conftest.$ac_ext <<EOF
6279 #line 6280 "configure"
6280 #include "confdefs.h"
6281
6282 int main() {
6283 main()
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   eval "ac_cv_lib_$ac_lib_var=yes"
6289 else
6290   echo "configure: failed program was:" >&5
6291   cat conftest.$ac_ext >&5
6292   rm -rf conftest*
6293   eval "ac_cv_lib_$ac_lib_var=no"
6294 fi
6295 rm -f conftest*
6296 LIBS="$ac_save_LIBS"
6297
6298 fi
6299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6300   echo "$ac_t""yes" 1>&6
6301   have_k4=yes
6302 else
6303   echo "$ac_t""no" 1>&6
6304 have_k4=no
6305 fi
6306
6307
6308                 if test $have_k4 = yes ; then
6309                         ol_with_kerberos=found
6310                         ol_link_krb4=yes
6311
6312                         cat >> confdefs.h <<\EOF
6313 #define HAVE_KRB4 1
6314 EOF
6315
6316
6317                         KRB4_LIBS="-lkrb -ldes"
6318
6319                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6320                                 cat >> confdefs.h <<\EOF
6321 #define HAVE_KTH_KERBEROS 1
6322 EOF
6323
6324                         fi
6325                 fi
6326         fi
6327 fi
6328
6329 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6330         ol_link_kpasswd=yes
6331 fi
6332
6333 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6334         ol_link_kbind=yes
6335
6336 elif test $ol_enable_kbind = yes ; then
6337         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6338 fi
6339
6340 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6341         cat >> confdefs.h <<\EOF
6342 #define HAVE_KERBEROS 1
6343 EOF
6344
6345
6346 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6347         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6348 fi
6349
6350 ol_link_tls=no
6351 if test $ol_with_tls != no ; then
6352         for ac_hdr in openssl/ssl.h ssl.h
6353 do
6354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6356 echo "configure:6357: checking for $ac_hdr" >&5
6357 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 #include <$ac_hdr>
6364 EOF
6365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6366 { (eval echo configure:6367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6368 if test -z "$ac_err"; then
6369   rm -rf conftest*
6370   eval "ac_cv_header_$ac_safe=yes"
6371 else
6372   echo "$ac_err" >&5
6373   echo "configure: failed program was:" >&5
6374   cat conftest.$ac_ext >&5
6375   rm -rf conftest*
6376   eval "ac_cv_header_$ac_safe=no"
6377 fi
6378 rm -f conftest*
6379 fi
6380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6381   echo "$ac_t""yes" 1>&6
6382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6383   cat >> confdefs.h <<EOF
6384 #define $ac_tr_hdr 1
6385 EOF
6386  
6387 else
6388   echo "$ac_t""no" 1>&6
6389 fi
6390 done
6391
6392         
6393         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6394                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6395 echo "configure:6396: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6396 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6398   echo $ac_n "(cached) $ac_c" 1>&6
6399 else
6400   ac_save_LIBS="$LIBS"
6401 LIBS="-lssl -lcrypto $LIBS"
6402 cat > conftest.$ac_ext <<EOF
6403 #line 6404 "configure"
6404 #include "confdefs.h"
6405 /* Override any gcc2 internal prototype to avoid an error.  */
6406 /* We use char because int might match the return type of a gcc2
6407     builtin and then its argument prototype would still apply.  */
6408 char SSLeay_add_ssl_algorithms();
6409
6410 int main() {
6411 SSLeay_add_ssl_algorithms()
6412 ; return 0; }
6413 EOF
6414 if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6415   rm -rf conftest*
6416   eval "ac_cv_lib_$ac_lib_var=yes"
6417 else
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   eval "ac_cv_lib_$ac_lib_var=no"
6422 fi
6423 rm -f conftest*
6424 LIBS="$ac_save_LIBS"
6425
6426 fi
6427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6428   echo "$ac_t""yes" 1>&6
6429   have_ssleay=yes
6430                         need_rsaref=no
6431 else
6432   echo "$ac_t""no" 1>&6
6433 have_ssleay=no
6434 fi
6435
6436                         
6437                 if test $have_ssleay = no ; then
6438                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6439 echo "configure:6440: checking for SSL_library_init in -lssl" >&5
6440 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6441 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   ac_save_LIBS="$LIBS"
6445 LIBS="-lssl -lcrypto $LIBS"
6446 cat > conftest.$ac_ext <<EOF
6447 #line 6448 "configure"
6448 #include "confdefs.h"
6449 /* Override any gcc2 internal prototype to avoid an error.  */
6450 /* We use char because int might match the return type of a gcc2
6451     builtin and then its argument prototype would still apply.  */
6452 char SSL_library_init();
6453
6454 int main() {
6455 SSL_library_init()
6456 ; return 0; }
6457 EOF
6458 if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6459   rm -rf conftest*
6460   eval "ac_cv_lib_$ac_lib_var=yes"
6461 else
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_lib_$ac_lib_var=no"
6466 fi
6467 rm -f conftest*
6468 LIBS="$ac_save_LIBS"
6469
6470 fi
6471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6472   echo "$ac_t""yes" 1>&6
6473   have_ssleay=yes
6474                                 need_rsaref=no
6475 else
6476   echo "$ac_t""no" 1>&6
6477 have_ssleay=no
6478 fi
6479
6480                 fi
6481
6482                 if test $have_ssleay = no ; then
6483                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6484 echo "configure:6485: checking for ssl3_accept in -lssl" >&5
6485 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   ac_save_LIBS="$LIBS"
6490 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char ssl3_accept();
6498
6499 int main() {
6500 ssl3_accept()
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=yes"
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=no"
6511 fi
6512 rm -f conftest*
6513 LIBS="$ac_save_LIBS"
6514
6515 fi
6516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6517   echo "$ac_t""yes" 1>&6
6518   have_ssleay=yes
6519                                 need_rsaref=yes
6520 else
6521   echo "$ac_t""no" 1>&6
6522 have_ssleay=no
6523 fi
6524
6525                 fi
6526
6527                 if test $have_ssleay = yes ; then
6528                         ol_with_tls=found
6529                         ol_link_tls=yes
6530
6531                         cat >> confdefs.h <<\EOF
6532 #define HAVE_SSLEAY 1
6533 EOF
6534
6535
6536                         if test $need_rsaref = yes; then
6537                                 cat >> confdefs.h <<\EOF
6538 #define HAVE_RSAREF 1
6539 EOF
6540
6541
6542                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6543                         else
6544                                 TLS_LIBS="-lssl -lcrypto"
6545                         fi
6546                 fi
6547         fi
6548
6549 else
6550         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6551 fi
6552
6553 if test $ol_link_tls = yes ; then
6554         cat >> confdefs.h <<\EOF
6555 #define HAVE_TLS 1
6556 EOF
6557
6558
6559 elif test $ol_with_tls = auto ; then
6560         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6561         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6562
6563 elif test $ol_with_tls != no ; then
6564         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6565 fi
6566
6567 for ac_func in \
6568         ctime_r                 \
6569         gethostbyname_r gethostbyaddr_r \
6570
6571 do
6572 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6573 echo "configure:6574: checking for $ac_func" >&5
6574 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6575   echo $ac_n "(cached) $ac_c" 1>&6
6576 else
6577   cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 /* System header to define __stub macros and hopefully few prototypes,
6581     which can conflict with char $ac_func(); below.  */
6582 #include <assert.h>
6583 /* Override any gcc2 internal prototype to avoid an error.  */
6584 /* We use char because int might match the return type of a gcc2
6585     builtin and then its argument prototype would still apply.  */
6586 char $ac_func();
6587 char (*f)();
6588
6589 int main() {
6590
6591 /* The GNU C library defines this for functions which it implements
6592     to always fail with ENOSYS.  Some functions are actually named
6593     something starting with __ and the normal name is an alias.  */
6594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6595 choke me
6596 #else
6597 f = $ac_func;
6598 #endif
6599
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6603   rm -rf conftest*
6604   eval "ac_cv_func_$ac_func=yes"
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608   rm -rf conftest*
6609   eval "ac_cv_func_$ac_func=no"
6610 fi
6611 rm -f conftest*
6612 fi
6613
6614 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6615   echo "$ac_t""yes" 1>&6
6616     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6617   cat >> confdefs.h <<EOF
6618 #define $ac_tr_func 1
6619 EOF
6620  
6621 else
6622   echo "$ac_t""no" 1>&6
6623 fi
6624 done
6625
6626
6627 if test "$ac_cv_func_ctime_r" = no ; then
6628         ol_cv_func_ctime_r_nargs=0
6629 else
6630         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6631 echo "configure:6632: checking number of arguments of ctime_r" >&5
6632 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 #include <time.h>
6639 int main() {
6640 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6641 ; return 0; }
6642 EOF
6643 if { (eval echo configure:6644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6644   rm -rf conftest*
6645   ol_cv_func_ctime_r_nargs3=yes
6646 else
6647   echo "configure: failed program was:" >&5
6648   cat conftest.$ac_ext >&5
6649   rm -rf conftest*
6650   ol_cv_func_ctime_r_nargs3=no
6651 fi
6652 rm -f conftest*
6653
6654         cat > conftest.$ac_ext <<EOF
6655 #line 6656 "configure"
6656 #include "confdefs.h"
6657 #include <time.h>
6658 int main() {
6659 time_t ti; char *buffer; ctime_r(&ti,buffer);
6660 ; return 0; }
6661 EOF
6662 if { (eval echo configure:6663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6663   rm -rf conftest*
6664   ol_cv_func_ctime_r_nargs2=yes
6665 else
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   ol_cv_func_ctime_r_nargs2=no
6670 fi
6671 rm -f conftest*
6672
6673         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6674                 $ol_cv_func_ctime_r_nargs2 = no ; then
6675
6676                 ol_cv_func_ctime_r_nargs=3
6677
6678         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6679                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6680
6681                 ol_cv_func_ctime_r_nargs=2
6682
6683         else
6684                 ol_cv_func_ctime_r_nargs=0
6685         fi
6686   
6687 fi
6688
6689 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6690
6691   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6692         cat >> confdefs.h <<EOF
6693 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6694 EOF
6695
6696   fi
6697
6698 fi
6699
6700 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6701         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6702 echo "configure:6703: checking number of arguments of gethostbyname_r" >&5
6703 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 #include <sys/types.h>
6710 #include <sys/socket.h>
6711 #include <netinet/in.h>
6712 #include <netdb.h>
6713 #define BUFSIZE (sizeof(struct hostent)+10)
6714 int main() {
6715 struct hostent hent; char buffer[BUFSIZE];
6716                 int bufsize=BUFSIZE;int h_errno;
6717                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6718                         buffer, bufsize, &h_errno);
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6722   rm -rf conftest*
6723   ol_cv_func_gethostbyname_r_nargs5=yes
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   ol_cv_func_gethostbyname_r_nargs5=no
6729 fi
6730 rm -f conftest*
6731
6732         cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 #include <sys/types.h>
6736 #include <sys/socket.h>
6737 #include <netinet/in.h>
6738 #include <netdb.h>
6739 #define BUFSIZE (sizeof(struct hostent)+10)
6740 int main() {
6741 struct hostent hent;struct hostent *rhent;
6742                 char buffer[BUFSIZE];
6743                 int bufsize=BUFSIZE;int h_errno;
6744                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6745                         &rhent, &h_errno);
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6749   rm -rf conftest*
6750   ol_cv_func_gethostbyname_r_nargs6=yes
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   ol_cv_func_gethostbyname_r_nargs6=no
6756 fi
6757 rm -f conftest*
6758
6759         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6760                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6761
6762                 ol_cv_func_gethostbyname_r_nargs=5
6763
6764         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6765                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6766
6767                 ol_cv_func_gethostbyname_r_nargs=6
6768
6769         else
6770                 ol_cv_func_gethostbyname_r_nargs=0
6771         fi
6772   
6773 fi
6774
6775 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6776   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6777         cat >> confdefs.h <<EOF
6778 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6779 EOF
6780
6781   fi
6782
6783 else
6784         ol_cv_func_gethostbyname_r_nargs=0
6785 fi
6786  
6787 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6788         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6789 echo "configure:6790: checking number of arguments of gethostbyaddr_r" >&5
6790 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6791   echo $ac_n "(cached) $ac_c" 1>&6
6792 else
6793   cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 #include <sys/types.h>
6797 #include <sys/socket.h>
6798 #include <netinet/in.h>
6799 #include <netdb.h>
6800 #define BUFSIZE (sizeof(struct hostent)+10)
6801 int main() {
6802 struct hostent hent; char buffer[BUFSIZE]; 
6803             struct in_addr add;
6804             size_t alen=sizeof(struct in_addr);
6805             int bufsize=BUFSIZE;int h_errno;
6806                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6807                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6811   rm -rf conftest*
6812   ol_cv_func_gethostbyaddr_r_nargs7=yes
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   ol_cv_func_gethostbyaddr_r_nargs7=no
6818 fi
6819 rm -f conftest*
6820
6821         cat > conftest.$ac_ext <<EOF
6822 #line 6823 "configure"
6823 #include "confdefs.h"
6824 #include <sys/types.h>
6825 #include <sys/socket.h>
6826 #include <netinet/in.h>
6827 #include <netdb.h>
6828 #define BUFSIZE (sizeof(struct hostent)+10)
6829 int main() {
6830 struct hostent hent;
6831                 struct hostent *rhent; char buffer[BUFSIZE]; 
6832                 struct in_addr add;
6833                 size_t alen=sizeof(struct in_addr);
6834                 int bufsize=BUFSIZE;int h_errno;
6835                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6836                         alen, AF_INET, &hent, buffer, bufsize, 
6837                         &rhent, &h_errno);
6838 ; return 0; }
6839 EOF
6840 if { (eval echo configure:6841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6841   rm -rf conftest*
6842   ol_cv_func_gethostbyaddr_r_nargs8=yes
6843 else
6844   echo "configure: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   rm -rf conftest*
6847   ol_cv_func_gethostbyaddr_r_nargs8=no
6848 fi
6849 rm -f conftest*
6850
6851         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6852                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6853
6854                 ol_cv_func_gethostbyaddr_r_nargs=7
6855
6856         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6857                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6858
6859                 ol_cv_func_gethostbyaddr_r_nargs=8
6860
6861         else
6862                 ol_cv_func_gethostbyaddr_r_nargs=0
6863         fi
6864   
6865 fi
6866
6867 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6868   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6869     cat >> confdefs.h <<EOF
6870 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6871 EOF
6872
6873   fi
6874
6875 else
6876         ol_cv_func_gethostbyaddr_r_nargs=0
6877 fi
6878
6879 if test "$ac_cv_func_ctime_r" = yes \
6880         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6881         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6882         -a "$ac_cv_func_gethostbyname_r" = yes \
6883         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6884         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6885         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6886         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6887         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6888         ; then
6889  
6890         cat >> confdefs.h <<\EOF
6891 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6892 EOF
6893
6894 fi
6895
6896 ol_link_threads=no
6897
6898 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6899         -o $ol_with_threads = nt ; then
6900
6901         
6902         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6903 echo "configure:6904: checking for NT Threads" >&5
6904 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6905   echo $ac_n "(cached) $ac_c" 1>&6
6906 else
6907   
6908                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6909 echo "configure:6910: checking for _beginthread" >&5
6910 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6911   echo $ac_n "(cached) $ac_c" 1>&6
6912 else
6913   cat > conftest.$ac_ext <<EOF
6914 #line 6915 "configure"
6915 #include "confdefs.h"
6916 /* System header to define __stub macros and hopefully few prototypes,
6917     which can conflict with char _beginthread(); below.  */
6918 #include <assert.h>
6919 /* Override any gcc2 internal prototype to avoid an error.  */
6920 /* We use char because int might match the return type of a gcc2
6921     builtin and then its argument prototype would still apply.  */
6922 char _beginthread();
6923 char (*f)();
6924
6925 int main() {
6926
6927 /* The GNU C library defines this for functions which it implements
6928     to always fail with ENOSYS.  Some functions are actually named
6929     something starting with __ and the normal name is an alias.  */
6930 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6931 choke me
6932 #else
6933 f = _beginthread;
6934 #endif
6935
6936 ; return 0; }
6937 EOF
6938 if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6939   rm -rf conftest*
6940   eval "ac_cv_func__beginthread=yes"
6941 else
6942   echo "configure: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944   rm -rf conftest*
6945   eval "ac_cv_func__beginthread=no"
6946 fi
6947 rm -f conftest*
6948 fi
6949
6950 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6951   echo "$ac_t""yes" 1>&6
6952   ol_cv_nt_threads=yes
6953 else
6954   echo "$ac_t""no" 1>&6
6955 ol_cv_nt_threads=no
6956 fi
6957
6958         
6959 fi
6960
6961 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6962
6963         if test $ol_cv_nt_threads = yes ; then
6964                 cat >> confdefs.h <<\EOF
6965 #define HAVE_NT_THREADS 1
6966 EOF
6967
6968         fi
6969
6970
6971         if test "$ol_cv_nt_threads" = yes ; then
6972         ol_link_threads=nt
6973         ol_with_threads=found
6974         ol_with_yielding_select=yes
6975
6976                 cat >> confdefs.h <<\EOF
6977 #define HAVE_NT_SERVICE_MANAGER 1
6978 EOF
6979
6980                 cat >> confdefs.h <<\EOF
6981 #define HAVE_NT_EVENT_LOG 1
6982 EOF
6983
6984         fi
6985
6986         if test $ol_with_threads = nt ; then
6987                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6988         fi
6989 fi
6990
6991 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6992         -o $ol_with_threads = posix ; then
6993
6994         for ac_hdr in pthread.h
6995 do
6996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6998 echo "configure:6999: checking for $ac_hdr" >&5
6999 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7000   echo $ac_n "(cached) $ac_c" 1>&6
7001 else
7002   cat > conftest.$ac_ext <<EOF
7003 #line 7004 "configure"
7004 #include "confdefs.h"
7005 #include <$ac_hdr>
7006 EOF
7007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7008 { (eval echo configure:7009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7010 if test -z "$ac_err"; then
7011   rm -rf conftest*
7012   eval "ac_cv_header_$ac_safe=yes"
7013 else
7014   echo "$ac_err" >&5
7015   echo "configure: failed program was:" >&5
7016   cat conftest.$ac_ext >&5
7017   rm -rf conftest*
7018   eval "ac_cv_header_$ac_safe=no"
7019 fi
7020 rm -f conftest*
7021 fi
7022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7023   echo "$ac_t""yes" 1>&6
7024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7025   cat >> confdefs.h <<EOF
7026 #define $ac_tr_hdr 1
7027 EOF
7028  
7029 else
7030   echo "$ac_t""no" 1>&6
7031 fi
7032 done
7033
7034
7035         if test $ac_cv_header_pthread_h = yes ; then
7036                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7037 echo "configure:7038: checking POSIX thread version" >&5
7038 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7039   echo $ac_n "(cached) $ac_c" 1>&6
7040 else
7041   
7042         cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045
7046 #               include <pthread.h>
7047                 /* this check could be improved */
7048 #               ifdef PTHREAD_ONCE_INIT
7049                         pthread_version_final;
7050 #               endif
7051         
7052 EOF
7053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7054   egrep "pthread_version_final" >/dev/null 2>&1; then
7055   rm -rf conftest*
7056   ol_pthread_final=yes
7057 else
7058   rm -rf conftest*
7059   ol_pthread_final=no
7060 fi
7061 rm -f conftest*
7062
7063
7064         cat > conftest.$ac_ext <<EOF
7065 #line 7066 "configure"
7066 #include "confdefs.h"
7067
7068 #               include <pthread.h>
7069                 /* this check could be improved */
7070 #               ifdef pthread_once_init
7071                         pthread_version_draft4;
7072 #               endif
7073         
7074 EOF
7075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7076   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7077   rm -rf conftest*
7078   ol_pthread_draft4=yes
7079 else
7080   rm -rf conftest*
7081   ol_pthread_draft4=no
7082 fi
7083 rm -f conftest*
7084
7085
7086         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7087                 ol_cv_pthread_version=final
7088         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7089                 ol_cv_pthread_version=draft4
7090         else
7091                 ol_cv_pthread_version=unknown
7092         fi
7093
7094 fi
7095
7096 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7097
7098
7099                 if test $ol_cv_pthread_version = final ; then
7100                         cat >> confdefs.h <<\EOF
7101 #define HAVE_PTHREADS_FINAL 1
7102 EOF
7103
7104                 elif test $ol_cv_pthread_version = draft4 ; then
7105                         cat >> confdefs.h <<\EOF
7106 #define HAVE_PTHREADS_D4 1
7107 EOF
7108
7109                 else
7110                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7111                 fi
7112
7113                 # consider threads found
7114                 ol_with_threads=found
7115
7116                 
7117         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7118 echo "configure:7119: checking for LinuxThreads pthread.h" >&5
7119 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7120   echo $ac_n "(cached) $ac_c" 1>&6
7121 else
7122   cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125 #include <pthread.h>
7126 EOF
7127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7128   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7129   rm -rf conftest*
7130   ol_cv_header_linux_threads=yes
7131 else
7132   rm -rf conftest*
7133   ol_cv_header_linux_threads=no
7134 fi
7135 rm -f conftest*
7136
7137                 
7138 fi
7139
7140 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7141         if test $ol_cv_header_linux_threads = yes; then
7142                 cat >> confdefs.h <<\EOF
7143 #define HAVE_LINUX_THREADS 1
7144 EOF
7145
7146         fi
7147
7148                 
7149         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7150 echo "configure:7151: checking for GNU Pth pthread.h" >&5
7151 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7152   echo $ac_n "(cached) $ac_c" 1>&6
7153 else
7154   cat > conftest.$ac_ext <<EOF
7155 #line 7156 "configure"
7156 #include "confdefs.h"
7157 #include <pthread.h>
7158 #ifdef _POSIX_THREAD_IS_GNU_PTH
7159         __gnu_pth__;
7160 #endif
7161
7162 EOF
7163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7164   egrep "__gnu_pth__" >/dev/null 2>&1; then
7165   rm -rf conftest*
7166   ol_cv_header_gnu_pth_pthread_h=yes
7167 else
7168   rm -rf conftest*
7169   ol_cv_header_gnu_pth_pthread_h=no
7170 fi
7171 rm -f conftest*
7172
7173                 
7174 fi
7175
7176 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7177
7178
7179                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7180                         for ac_hdr in sched.h
7181 do
7182 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7183 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7184 echo "configure:7185: checking for $ac_hdr" >&5
7185 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7186   echo $ac_n "(cached) $ac_c" 1>&6
7187 else
7188   cat > conftest.$ac_ext <<EOF
7189 #line 7190 "configure"
7190 #include "confdefs.h"
7191 #include <$ac_hdr>
7192 EOF
7193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7194 { (eval echo configure:7195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7196 if test -z "$ac_err"; then
7197   rm -rf conftest*
7198   eval "ac_cv_header_$ac_safe=yes"
7199 else
7200   echo "$ac_err" >&5
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -rf conftest*
7204   eval "ac_cv_header_$ac_safe=no"
7205 fi
7206 rm -f conftest*
7207 fi
7208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7209   echo "$ac_t""yes" 1>&6
7210     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7211   cat >> confdefs.h <<EOF
7212 #define $ac_tr_hdr 1
7213 EOF
7214  
7215 else
7216   echo "$ac_t""no" 1>&6
7217 fi
7218 done
7219
7220                 fi
7221
7222                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7223                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7224 echo "configure:7225: checking for pthread_create in default libraries" >&5
7225 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7226   echo $ac_n "(cached) $ac_c" 1>&6
7227 else
7228   
7229                 if test "$cross_compiling" = yes; then
7230   cat > conftest.$ac_ext <<EOF
7231 #line 7232 "configure"
7232 #include "confdefs.h"
7233 /* pthread test headers */
7234 #include <pthread.h>
7235 #ifndef NULL
7236 #define NULL (void*)0
7237 #endif
7238
7239 static void *task(p)
7240         void *p;
7241 {
7242         return (void *) (p == NULL);
7243 }
7244
7245 int main() {
7246
7247         /* pthread test function */
7248         pthread_t t;
7249         int status;
7250 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7251         /* This system (e.g. AIX) defaults detached; must override */
7252         pthread_attr_t attr;
7253
7254         status = pthread_attr_init(&attr);
7255         if( status ) exit( status );
7256
7257         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7258         if( status ) exit( status );
7259
7260 #define ATTR    &attr
7261 #else
7262 #if HAVE_PTHREADS_D4
7263 #define ATTR    pthread_attr_default
7264 #else
7265 #define ATTR    NULL
7266 #endif
7267 #endif
7268         /* make sure pthread_create() isn't just a stub */
7269         status = pthread_create(&t, ATTR, task, NULL);
7270         if( status ) exit( status );
7271
7272         /* make sure pthread_detach() isn't just a stub */
7273 #if HAVE_PTHREADS_D4
7274         status = pthread_detach( &t );
7275 #else
7276         status = pthread_detach( t );
7277 #endif
7278
7279 #ifdef HAVE_LINUX_THREADS
7280         pthread_kill_other_threads_np();
7281 #endif
7282
7283         exit( status );
7284
7285 ; return 0; }
7286 EOF
7287 if { (eval echo configure:7288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7288   rm -rf conftest*
7289   ol_cv_pthread_create=yes
7290 else
7291   echo "configure: failed program was:" >&5
7292   cat conftest.$ac_ext >&5
7293   rm -rf conftest*
7294   ol_cv_pthread_create=no
7295 fi
7296 rm -f conftest*
7297 else
7298   cat > conftest.$ac_ext <<EOF
7299 #line 7300 "configure"
7300 #include "confdefs.h"
7301 /* pthread test headers */
7302 #include <pthread.h>
7303 #ifndef NULL
7304 #define NULL (void*)0
7305 #endif
7306
7307 static void *task(p)
7308         void *p;
7309 {
7310         return (void *) (p == NULL);
7311 }
7312
7313
7314 int main(argc, argv)
7315         int argc;
7316         char **argv;
7317 {
7318
7319         /* pthread test function */
7320         pthread_t t;
7321         int status;
7322 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7323         /* This system (e.g. AIX) defaults detached; must override */
7324         pthread_attr_t attr;
7325
7326         status = pthread_attr_init(&attr);
7327         if( status ) exit( status );
7328
7329         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7330         if( status ) exit( status );
7331
7332 #define ATTR    &attr
7333 #else
7334 #if HAVE_PTHREADS_D4
7335 #define ATTR    pthread_attr_default
7336 #else
7337 #define ATTR    NULL
7338 #endif
7339 #endif
7340         /* make sure pthread_create() isn't just a stub */
7341         status = pthread_create(&t, ATTR, task, NULL);
7342         if( status ) exit( status );
7343
7344         /* make sure pthread_detach() isn't just a stub */
7345 #if HAVE_PTHREADS_D4
7346         status = pthread_detach( &t );
7347 #else
7348         status = pthread_detach( t );
7349 #endif
7350
7351 #ifdef HAVE_LINUX_THREADS
7352         pthread_kill_other_threads_np();
7353 #endif
7354
7355         exit( status );
7356
7357 }
7358
7359 EOF
7360 if { (eval echo configure:7361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7361 then
7362   ol_cv_pthread_create=yes
7363 else
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -fr conftest*
7367   ol_cv_pthread_create=no
7368 fi
7369 rm -fr conftest*
7370 fi
7371
7372 fi
7373
7374 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7375
7376                 if test $ol_cv_pthread_create != no ; then
7377                         ol_link_threads=posix
7378                         ol_link_pthreads=""
7379                 fi
7380                 
7381                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7382 if test "$ol_link_threads" = no ; then
7383         # try -kthread
7384         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7385 echo "configure:7386: checking for pthread link with -kthread" >&5
7386 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7387   echo $ac_n "(cached) $ac_c" 1>&6
7388 else
7389   
7390                 # save the flags
7391                 ol_LIBS="$LIBS"
7392                 LIBS="-kthread $LIBS"
7393
7394                 if test "$cross_compiling" = yes; then
7395   cat > conftest.$ac_ext <<EOF
7396 #line 7397 "configure"
7397 #include "confdefs.h"
7398 /* pthread test headers */
7399 #include <pthread.h>
7400 #ifndef NULL
7401 #define NULL (void*)0
7402 #endif
7403
7404 static void *task(p)
7405         void *p;
7406 {
7407         return (void *) (p == NULL);
7408 }
7409
7410 int main() {
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 ; return 0; }
7451 EOF
7452 if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7453   rm -rf conftest*
7454   ol_cv_pthread_kthread=yes
7455 else
7456   echo "configure: failed program was:" >&5
7457   cat conftest.$ac_ext >&5
7458   rm -rf conftest*
7459   ol_cv_pthread_kthread=no
7460 fi
7461 rm -f conftest*
7462 else
7463   cat > conftest.$ac_ext <<EOF
7464 #line 7465 "configure"
7465 #include "confdefs.h"
7466 /* pthread test headers */
7467 #include <pthread.h>
7468 #ifndef NULL
7469 #define NULL (void*)0
7470 #endif
7471
7472 static void *task(p)
7473         void *p;
7474 {
7475         return (void *) (p == NULL);
7476 }
7477
7478
7479 int main(argc, argv)
7480         int argc;
7481         char **argv;
7482 {
7483
7484         /* pthread test function */
7485         pthread_t t;
7486         int status;
7487 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7488         /* This system (e.g. AIX) defaults detached; must override */
7489         pthread_attr_t attr;
7490
7491         status = pthread_attr_init(&attr);
7492         if( status ) exit( status );
7493
7494         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7495         if( status ) exit( status );
7496
7497 #define ATTR    &attr
7498 #else
7499 #if HAVE_PTHREADS_D4
7500 #define ATTR    pthread_attr_default
7501 #else
7502 #define ATTR    NULL
7503 #endif
7504 #endif
7505         /* make sure pthread_create() isn't just a stub */
7506         status = pthread_create(&t, ATTR, task, NULL);
7507         if( status ) exit( status );
7508
7509         /* make sure pthread_detach() isn't just a stub */
7510 #if HAVE_PTHREADS_D4
7511         status = pthread_detach( &t );
7512 #else
7513         status = pthread_detach( t );
7514 #endif
7515
7516 #ifdef HAVE_LINUX_THREADS
7517         pthread_kill_other_threads_np();
7518 #endif
7519
7520         exit( status );
7521
7522 }
7523
7524 EOF
7525 if { (eval echo configure:7526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7526 then
7527   ol_cv_pthread_kthread=yes
7528 else
7529   echo "configure: failed program was:" >&5
7530   cat conftest.$ac_ext >&5
7531   rm -fr conftest*
7532   ol_cv_pthread_kthread=no
7533 fi
7534 rm -fr conftest*
7535 fi
7536
7537
7538                 # restore the LIBS
7539                 LIBS="$ol_LIBS"
7540         
7541 fi
7542
7543 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7544
7545         if test $ol_cv_pthread_kthread = yes ; then
7546                 ol_link_pthreads="-kthread"
7547                 ol_link_threads=posix
7548         fi
7549 fi
7550
7551                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7552 if test "$ol_link_threads" = no ; then
7553         # try -pthread
7554         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7555 echo "configure:7556: checking for pthread link with -pthread" >&5
7556 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7557   echo $ac_n "(cached) $ac_c" 1>&6
7558 else
7559   
7560                 # save the flags
7561                 ol_LIBS="$LIBS"
7562                 LIBS="-pthread $LIBS"
7563
7564                 if test "$cross_compiling" = yes; then
7565   cat > conftest.$ac_ext <<EOF
7566 #line 7567 "configure"
7567 #include "confdefs.h"
7568 /* pthread test headers */
7569 #include <pthread.h>
7570 #ifndef NULL
7571 #define NULL (void*)0
7572 #endif
7573
7574 static void *task(p)
7575         void *p;
7576 {
7577         return (void *) (p == NULL);
7578 }
7579
7580 int main() {
7581
7582         /* pthread test function */
7583         pthread_t t;
7584         int status;
7585 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7586         /* This system (e.g. AIX) defaults detached; must override */
7587         pthread_attr_t attr;
7588
7589         status = pthread_attr_init(&attr);
7590         if( status ) exit( status );
7591
7592         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7593         if( status ) exit( status );
7594
7595 #define ATTR    &attr
7596 #else
7597 #if HAVE_PTHREADS_D4
7598 #define ATTR    pthread_attr_default
7599 #else
7600 #define ATTR    NULL
7601 #endif
7602 #endif
7603         /* make sure pthread_create() isn't just a stub */
7604         status = pthread_create(&t, ATTR, task, NULL);
7605         if( status ) exit( status );
7606
7607         /* make sure pthread_detach() isn't just a stub */
7608 #if HAVE_PTHREADS_D4
7609         status = pthread_detach( &t );
7610 #else
7611         status = pthread_detach( t );
7612 #endif
7613
7614 #ifdef HAVE_LINUX_THREADS
7615         pthread_kill_other_threads_np();
7616 #endif
7617
7618         exit( status );
7619
7620 ; return 0; }
7621 EOF
7622 if { (eval echo configure:7623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7623   rm -rf conftest*
7624   ol_cv_pthread_pthread=yes
7625 else
7626   echo "configure: failed program was:" >&5
7627   cat conftest.$ac_ext >&5
7628   rm -rf conftest*
7629   ol_cv_pthread_pthread=no
7630 fi
7631 rm -f conftest*
7632 else
7633   cat > conftest.$ac_ext <<EOF
7634 #line 7635 "configure"
7635 #include "confdefs.h"
7636 /* pthread test headers */
7637 #include <pthread.h>
7638 #ifndef NULL
7639 #define NULL (void*)0
7640 #endif
7641
7642 static void *task(p)
7643         void *p;
7644 {
7645         return (void *) (p == NULL);
7646 }
7647
7648
7649 int main(argc, argv)
7650         int argc;
7651         char **argv;
7652 {
7653
7654         /* pthread test function */
7655         pthread_t t;
7656         int status;
7657 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7658         /* This system (e.g. AIX) defaults detached; must override */
7659         pthread_attr_t attr;
7660
7661         status = pthread_attr_init(&attr);
7662         if( status ) exit( status );
7663
7664         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7665         if( status ) exit( status );
7666
7667 #define ATTR    &attr
7668 #else
7669 #if HAVE_PTHREADS_D4
7670 #define ATTR    pthread_attr_default
7671 #else
7672 #define ATTR    NULL
7673 #endif
7674 #endif
7675         /* make sure pthread_create() isn't just a stub */
7676         status = pthread_create(&t, ATTR, task, NULL);
7677         if( status ) exit( status );
7678
7679         /* make sure pthread_detach() isn't just a stub */
7680 #if HAVE_PTHREADS_D4
7681         status = pthread_detach( &t );
7682 #else
7683         status = pthread_detach( t );
7684 #endif
7685
7686 #ifdef HAVE_LINUX_THREADS
7687         pthread_kill_other_threads_np();
7688 #endif
7689
7690         exit( status );
7691
7692 }
7693
7694 EOF
7695 if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7696 then
7697   ol_cv_pthread_pthread=yes
7698 else
7699   echo "configure: failed program was:" >&5
7700   cat conftest.$ac_ext >&5
7701   rm -fr conftest*
7702   ol_cv_pthread_pthread=no
7703 fi
7704 rm -fr conftest*
7705 fi
7706
7707
7708                 # restore the LIBS
7709                 LIBS="$ol_LIBS"
7710         
7711 fi
7712
7713 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7714
7715         if test $ol_cv_pthread_pthread = yes ; then
7716                 ol_link_pthreads="-pthread"
7717                 ol_link_threads=posix
7718         fi
7719 fi
7720
7721                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7722 if test "$ol_link_threads" = no ; then
7723         # try -pthreads
7724         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7725 echo "configure:7726: checking for pthread link with -pthreads" >&5
7726 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7727   echo $ac_n "(cached) $ac_c" 1>&6
7728 else
7729   
7730                 # save the flags
7731                 ol_LIBS="$LIBS"
7732                 LIBS="-pthreads $LIBS"
7733
7734                 if test "$cross_compiling" = yes; then
7735   cat > conftest.$ac_ext <<EOF
7736 #line 7737 "configure"
7737 #include "confdefs.h"
7738 /* pthread test headers */
7739 #include <pthread.h>
7740 #ifndef NULL
7741 #define NULL (void*)0
7742 #endif
7743
7744 static void *task(p)
7745         void *p;
7746 {
7747         return (void *) (p == NULL);
7748 }
7749
7750 int main() {
7751
7752         /* pthread test function */
7753         pthread_t t;
7754         int status;
7755 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7756         /* This system (e.g. AIX) defaults detached; must override */
7757         pthread_attr_t attr;
7758
7759         status = pthread_attr_init(&attr);
7760         if( status ) exit( status );
7761
7762         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7763         if( status ) exit( status );
7764
7765 #define ATTR    &attr
7766 #else
7767 #if HAVE_PTHREADS_D4
7768 #define ATTR    pthread_attr_default
7769 #else
7770 #define ATTR    NULL
7771 #endif
7772 #endif
7773         /* make sure pthread_create() isn't just a stub */
7774         status = pthread_create(&t, ATTR, task, NULL);
7775         if( status ) exit( status );
7776
7777         /* make sure pthread_detach() isn't just a stub */
7778 #if HAVE_PTHREADS_D4
7779         status = pthread_detach( &t );
7780 #else
7781         status = pthread_detach( t );
7782 #endif
7783
7784 #ifdef HAVE_LINUX_THREADS
7785         pthread_kill_other_threads_np();
7786 #endif
7787
7788         exit( status );
7789
7790 ; return 0; }
7791 EOF
7792 if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7793   rm -rf conftest*
7794   ol_cv_pthread_pthreads=yes
7795 else
7796   echo "configure: failed program was:" >&5
7797   cat conftest.$ac_ext >&5
7798   rm -rf conftest*
7799   ol_cv_pthread_pthreads=no
7800 fi
7801 rm -f conftest*
7802 else
7803   cat > conftest.$ac_ext <<EOF
7804 #line 7805 "configure"
7805 #include "confdefs.h"
7806 /* pthread test headers */
7807 #include <pthread.h>
7808 #ifndef NULL
7809 #define NULL (void*)0
7810 #endif
7811
7812 static void *task(p)
7813         void *p;
7814 {
7815         return (void *) (p == NULL);
7816 }
7817
7818
7819 int main(argc, argv)
7820         int argc;
7821         char **argv;
7822 {
7823
7824         /* pthread test function */
7825         pthread_t t;
7826         int status;
7827 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7828         /* This system (e.g. AIX) defaults detached; must override */
7829         pthread_attr_t attr;
7830
7831         status = pthread_attr_init(&attr);
7832         if( status ) exit( status );
7833
7834         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7835         if( status ) exit( status );
7836
7837 #define ATTR    &attr
7838 #else
7839 #if HAVE_PTHREADS_D4
7840 #define ATTR    pthread_attr_default
7841 #else
7842 #define ATTR    NULL
7843 #endif
7844 #endif
7845         /* make sure pthread_create() isn't just a stub */
7846         status = pthread_create(&t, ATTR, task, NULL);
7847         if( status ) exit( status );
7848
7849         /* make sure pthread_detach() isn't just a stub */
7850 #if HAVE_PTHREADS_D4
7851         status = pthread_detach( &t );
7852 #else
7853         status = pthread_detach( t );
7854 #endif
7855
7856 #ifdef HAVE_LINUX_THREADS
7857         pthread_kill_other_threads_np();
7858 #endif
7859
7860         exit( status );
7861
7862 }
7863
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7866 then
7867   ol_cv_pthread_pthreads=yes
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -fr conftest*
7872   ol_cv_pthread_pthreads=no
7873 fi
7874 rm -fr conftest*
7875 fi
7876
7877
7878                 # restore the LIBS
7879                 LIBS="$ol_LIBS"
7880         
7881 fi
7882
7883 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7884
7885         if test $ol_cv_pthread_pthreads = yes ; then
7886                 ol_link_pthreads="-pthreads"
7887                 ol_link_threads=posix
7888         fi
7889 fi
7890
7891                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7892 if test "$ol_link_threads" = no ; then
7893         # try -mthreads
7894         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7895 echo "configure:7896: checking for pthread link with -mthreads" >&5
7896 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7897   echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899   
7900                 # save the flags
7901                 ol_LIBS="$LIBS"
7902                 LIBS="-mthreads $LIBS"
7903
7904                 if test "$cross_compiling" = yes; then
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* pthread test headers */
7909 #include <pthread.h>
7910 #ifndef NULL
7911 #define NULL (void*)0
7912 #endif
7913
7914 static void *task(p)
7915         void *p;
7916 {
7917         return (void *) (p == NULL);
7918 }
7919
7920 int main() {
7921
7922         /* pthread test function */
7923         pthread_t t;
7924         int status;
7925 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7926         /* This system (e.g. AIX) defaults detached; must override */
7927         pthread_attr_t attr;
7928
7929         status = pthread_attr_init(&attr);
7930         if( status ) exit( status );
7931
7932         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7933         if( status ) exit( status );
7934
7935 #define ATTR    &attr
7936 #else
7937 #if HAVE_PTHREADS_D4
7938 #define ATTR    pthread_attr_default
7939 #else
7940 #define ATTR    NULL
7941 #endif
7942 #endif
7943         /* make sure pthread_create() isn't just a stub */
7944         status = pthread_create(&t, ATTR, task, NULL);
7945         if( status ) exit( status );
7946
7947         /* make sure pthread_detach() isn't just a stub */
7948 #if HAVE_PTHREADS_D4
7949         status = pthread_detach( &t );
7950 #else
7951         status = pthread_detach( t );
7952 #endif
7953
7954 #ifdef HAVE_LINUX_THREADS
7955         pthread_kill_other_threads_np();
7956 #endif
7957
7958         exit( status );
7959
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   ol_cv_pthread_mthreads=yes
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   ol_cv_pthread_mthreads=no
7970 fi
7971 rm -f conftest*
7972 else
7973   cat > conftest.$ac_ext <<EOF
7974 #line 7975 "configure"
7975 #include "confdefs.h"
7976 /* pthread test headers */
7977 #include <pthread.h>
7978 #ifndef NULL
7979 #define NULL (void*)0
7980 #endif
7981
7982 static void *task(p)
7983         void *p;
7984 {
7985         return (void *) (p == NULL);
7986 }
7987
7988
7989 int main(argc, argv)
7990         int argc;
7991         char **argv;
7992 {
7993
7994         /* pthread test function */
7995         pthread_t t;
7996         int status;
7997 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7998         /* This system (e.g. AIX) defaults detached; must override */
7999         pthread_attr_t attr;
8000
8001         status = pthread_attr_init(&attr);
8002         if( status ) exit( status );
8003
8004         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8005         if( status ) exit( status );
8006
8007 #define ATTR    &attr
8008 #else
8009 #if HAVE_PTHREADS_D4
8010 #define ATTR    pthread_attr_default
8011 #else
8012 #define ATTR    NULL
8013 #endif
8014 #endif
8015         /* make sure pthread_create() isn't just a stub */
8016         status = pthread_create(&t, ATTR, task, NULL);
8017         if( status ) exit( status );
8018
8019         /* make sure pthread_detach() isn't just a stub */
8020 #if HAVE_PTHREADS_D4
8021         status = pthread_detach( &t );
8022 #else
8023         status = pthread_detach( t );
8024 #endif
8025
8026 #ifdef HAVE_LINUX_THREADS
8027         pthread_kill_other_threads_np();
8028 #endif
8029
8030         exit( status );
8031
8032 }
8033
8034 EOF
8035 if { (eval echo configure:8036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8036 then
8037   ol_cv_pthread_mthreads=yes
8038 else
8039   echo "configure: failed program was:" >&5
8040   cat conftest.$ac_ext >&5
8041   rm -fr conftest*
8042   ol_cv_pthread_mthreads=no
8043 fi
8044 rm -fr conftest*
8045 fi
8046
8047
8048                 # restore the LIBS
8049                 LIBS="$ol_LIBS"
8050         
8051 fi
8052
8053 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8054
8055         if test $ol_cv_pthread_mthreads = yes ; then
8056                 ol_link_pthreads="-mthreads"
8057                 ol_link_threads=posix
8058         fi
8059 fi
8060
8061                 # Pthread try link: -thread (ol_cv_pthread_thread)
8062 if test "$ol_link_threads" = no ; then
8063         # try -thread
8064         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8065 echo "configure:8066: checking for pthread link with -thread" >&5
8066 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8067   echo $ac_n "(cached) $ac_c" 1>&6
8068 else
8069   
8070                 # save the flags
8071                 ol_LIBS="$LIBS"
8072                 LIBS="-thread $LIBS"
8073
8074                 if test "$cross_compiling" = yes; then
8075   cat > conftest.$ac_ext <<EOF
8076 #line 8077 "configure"
8077 #include "confdefs.h"
8078 /* pthread test headers */
8079 #include <pthread.h>
8080 #ifndef NULL
8081 #define NULL (void*)0
8082 #endif
8083
8084 static void *task(p)
8085         void *p;
8086 {
8087         return (void *) (p == NULL);
8088 }
8089
8090 int main() {
8091
8092         /* pthread test function */
8093         pthread_t t;
8094         int status;
8095 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8096         /* This system (e.g. AIX) defaults detached; must override */
8097         pthread_attr_t attr;
8098
8099         status = pthread_attr_init(&attr);
8100         if( status ) exit( status );
8101
8102         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8103         if( status ) exit( status );
8104
8105 #define ATTR    &attr
8106 #else
8107 #if HAVE_PTHREADS_D4
8108 #define ATTR    pthread_attr_default
8109 #else
8110 #define ATTR    NULL
8111 #endif
8112 #endif
8113         /* make sure pthread_create() isn't just a stub */
8114         status = pthread_create(&t, ATTR, task, NULL);
8115         if( status ) exit( status );
8116
8117         /* make sure pthread_detach() isn't just a stub */
8118 #if HAVE_PTHREADS_D4
8119         status = pthread_detach( &t );
8120 #else
8121         status = pthread_detach( t );
8122 #endif
8123
8124 #ifdef HAVE_LINUX_THREADS
8125         pthread_kill_other_threads_np();
8126 #endif
8127
8128         exit( status );
8129
8130 ; return 0; }
8131 EOF
8132 if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133   rm -rf conftest*
8134   ol_cv_pthread_thread=yes
8135 else
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   ol_cv_pthread_thread=no
8140 fi
8141 rm -f conftest*
8142 else
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 /* pthread test headers */
8147 #include <pthread.h>
8148 #ifndef NULL
8149 #define NULL (void*)0
8150 #endif
8151
8152 static void *task(p)
8153         void *p;
8154 {
8155         return (void *) (p == NULL);
8156 }
8157
8158
8159 int main(argc, argv)
8160         int argc;
8161         char **argv;
8162 {
8163
8164         /* pthread test function */
8165         pthread_t t;
8166         int status;
8167 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8168         /* This system (e.g. AIX) defaults detached; must override */
8169         pthread_attr_t attr;
8170
8171         status = pthread_attr_init(&attr);
8172         if( status ) exit( status );
8173
8174         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8175         if( status ) exit( status );
8176
8177 #define ATTR    &attr
8178 #else
8179 #if HAVE_PTHREADS_D4
8180 #define ATTR    pthread_attr_default
8181 #else
8182 #define ATTR    NULL
8183 #endif
8184 #endif
8185         /* make sure pthread_create() isn't just a stub */
8186         status = pthread_create(&t, ATTR, task, NULL);
8187         if( status ) exit( status );
8188
8189         /* make sure pthread_detach() isn't just a stub */
8190 #if HAVE_PTHREADS_D4
8191         status = pthread_detach( &t );
8192 #else
8193         status = pthread_detach( t );
8194 #endif
8195
8196 #ifdef HAVE_LINUX_THREADS
8197         pthread_kill_other_threads_np();
8198 #endif
8199
8200         exit( status );
8201
8202 }
8203
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8206 then
8207   ol_cv_pthread_thread=yes
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -fr conftest*
8212   ol_cv_pthread_thread=no
8213 fi
8214 rm -fr conftest*
8215 fi
8216
8217
8218                 # restore the LIBS
8219                 LIBS="$ol_LIBS"
8220         
8221 fi
8222
8223 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8224
8225         if test $ol_cv_pthread_thread = yes ; then
8226                 ol_link_pthreads="-thread"
8227                 ol_link_threads=posix
8228         fi
8229 fi
8230
8231
8232                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8233 if test "$ol_link_threads" = no ; then
8234         # try -lpthread -lmach -lexc -lc_r
8235         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8236 echo "configure:8237: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8237 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8238   echo $ac_n "(cached) $ac_c" 1>&6
8239 else
8240   
8241                 # save the flags
8242                 ol_LIBS="$LIBS"
8243                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8244
8245                 if test "$cross_compiling" = yes; then
8246   cat > conftest.$ac_ext <<EOF
8247 #line 8248 "configure"
8248 #include "confdefs.h"
8249 /* pthread test headers */
8250 #include <pthread.h>
8251 #ifndef NULL
8252 #define NULL (void*)0
8253 #endif
8254
8255 static void *task(p)
8256         void *p;
8257 {
8258         return (void *) (p == NULL);
8259 }
8260
8261 int main() {
8262
8263         /* pthread test function */
8264         pthread_t t;
8265         int status;
8266 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8267         /* This system (e.g. AIX) defaults detached; must override */
8268         pthread_attr_t attr;
8269
8270         status = pthread_attr_init(&attr);
8271         if( status ) exit( status );
8272
8273         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8274         if( status ) exit( status );
8275
8276 #define ATTR    &attr
8277 #else
8278 #if HAVE_PTHREADS_D4
8279 #define ATTR    pthread_attr_default
8280 #else
8281 #define ATTR    NULL
8282 #endif
8283 #endif
8284         /* make sure pthread_create() isn't just a stub */
8285         status = pthread_create(&t, ATTR, task, NULL);
8286         if( status ) exit( status );
8287
8288         /* make sure pthread_detach() isn't just a stub */
8289 #if HAVE_PTHREADS_D4
8290         status = pthread_detach( &t );
8291 #else
8292         status = pthread_detach( t );
8293 #endif
8294
8295 #ifdef HAVE_LINUX_THREADS
8296         pthread_kill_other_threads_np();
8297 #endif
8298
8299         exit( status );
8300
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304   rm -rf conftest*
8305   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8311 fi
8312 rm -f conftest*
8313 else
8314   cat > conftest.$ac_ext <<EOF
8315 #line 8316 "configure"
8316 #include "confdefs.h"
8317 /* pthread test headers */
8318 #include <pthread.h>
8319 #ifndef NULL
8320 #define NULL (void*)0
8321 #endif
8322
8323 static void *task(p)
8324         void *p;
8325 {
8326         return (void *) (p == NULL);
8327 }
8328
8329
8330 int main(argc, argv)
8331         int argc;
8332         char **argv;
8333 {
8334
8335         /* pthread test function */
8336         pthread_t t;
8337         int status;
8338 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8339         /* This system (e.g. AIX) defaults detached; must override */
8340         pthread_attr_t attr;
8341
8342         status = pthread_attr_init(&attr);
8343         if( status ) exit( status );
8344
8345         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8346         if( status ) exit( status );
8347
8348 #define ATTR    &attr
8349 #else
8350 #if HAVE_PTHREADS_D4
8351 #define ATTR    pthread_attr_default
8352 #else
8353 #define ATTR    NULL
8354 #endif
8355 #endif
8356         /* make sure pthread_create() isn't just a stub */
8357         status = pthread_create(&t, ATTR, task, NULL);
8358         if( status ) exit( status );
8359
8360         /* make sure pthread_detach() isn't just a stub */
8361 #if HAVE_PTHREADS_D4
8362         status = pthread_detach( &t );
8363 #else
8364         status = pthread_detach( t );
8365 #endif
8366
8367 #ifdef HAVE_LINUX_THREADS
8368         pthread_kill_other_threads_np();
8369 #endif
8370
8371         exit( status );
8372
8373 }
8374
8375 EOF
8376 if { (eval echo configure:8377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8377 then
8378   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8379 else
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -fr conftest*
8383   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8384 fi
8385 rm -fr conftest*
8386 fi
8387
8388
8389                 # restore the LIBS
8390                 LIBS="$ol_LIBS"
8391         
8392 fi
8393
8394 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8395
8396         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8397                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8398                 ol_link_threads=posix
8399         fi
8400 fi
8401
8402                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8403 if test "$ol_link_threads" = no ; then
8404         # try -lpthread -lmach -lexc
8405         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8406 echo "configure:8407: checking for pthread link with -lpthread -lmach -lexc" >&5
8407 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8408   echo $ac_n "(cached) $ac_c" 1>&6
8409 else
8410   
8411                 # save the flags
8412                 ol_LIBS="$LIBS"
8413                 LIBS="-lpthread -lmach -lexc $LIBS"
8414
8415                 if test "$cross_compiling" = yes; then
8416   cat > conftest.$ac_ext <<EOF
8417 #line 8418 "configure"
8418 #include "confdefs.h"
8419 /* pthread test headers */
8420 #include <pthread.h>
8421 #ifndef NULL
8422 #define NULL (void*)0
8423 #endif
8424
8425 static void *task(p)
8426         void *p;
8427 {
8428         return (void *) (p == NULL);
8429 }
8430
8431 int main() {
8432
8433         /* pthread test function */
8434         pthread_t t;
8435         int status;
8436 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8437         /* This system (e.g. AIX) defaults detached; must override */
8438         pthread_attr_t attr;
8439
8440         status = pthread_attr_init(&attr);
8441         if( status ) exit( status );
8442
8443         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8444         if( status ) exit( status );
8445
8446 #define ATTR    &attr
8447 #else
8448 #if HAVE_PTHREADS_D4
8449 #define ATTR    pthread_attr_default
8450 #else
8451 #define ATTR    NULL
8452 #endif
8453 #endif
8454         /* make sure pthread_create() isn't just a stub */
8455         status = pthread_create(&t, ATTR, task, NULL);
8456         if( status ) exit( status );
8457
8458         /* make sure pthread_detach() isn't just a stub */
8459 #if HAVE_PTHREADS_D4
8460         status = pthread_detach( &t );
8461 #else
8462         status = pthread_detach( t );
8463 #endif
8464
8465 #ifdef HAVE_LINUX_THREADS
8466         pthread_kill_other_threads_np();
8467 #endif
8468
8469         exit( status );
8470
8471 ; return 0; }
8472 EOF
8473 if { (eval echo configure:8474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8474   rm -rf conftest*
8475   ol_cv_pthread_lpthread_lmach_lexc=yes
8476 else
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   ol_cv_pthread_lpthread_lmach_lexc=no
8481 fi
8482 rm -f conftest*
8483 else
8484   cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487 /* pthread test headers */
8488 #include <pthread.h>
8489 #ifndef NULL
8490 #define NULL (void*)0
8491 #endif
8492
8493 static void *task(p)
8494         void *p;
8495 {
8496         return (void *) (p == NULL);
8497 }
8498
8499
8500 int main(argc, argv)
8501         int argc;
8502         char **argv;
8503 {
8504
8505         /* pthread test function */
8506         pthread_t t;
8507         int status;
8508 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8509         /* This system (e.g. AIX) defaults detached; must override */
8510         pthread_attr_t attr;
8511
8512         status = pthread_attr_init(&attr);
8513         if( status ) exit( status );
8514
8515         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8516         if( status ) exit( status );
8517
8518 #define ATTR    &attr
8519 #else
8520 #if HAVE_PTHREADS_D4
8521 #define ATTR    pthread_attr_default
8522 #else
8523 #define ATTR    NULL
8524 #endif
8525 #endif
8526         /* make sure pthread_create() isn't just a stub */
8527         status = pthread_create(&t, ATTR, task, NULL);
8528         if( status ) exit( status );
8529
8530         /* make sure pthread_detach() isn't just a stub */
8531 #if HAVE_PTHREADS_D4
8532         status = pthread_detach( &t );
8533 #else
8534         status = pthread_detach( t );
8535 #endif
8536
8537 #ifdef HAVE_LINUX_THREADS
8538         pthread_kill_other_threads_np();
8539 #endif
8540
8541         exit( status );
8542
8543 }
8544
8545 EOF
8546 if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8547 then
8548   ol_cv_pthread_lpthread_lmach_lexc=yes
8549 else
8550   echo "configure: failed program was:" >&5
8551   cat conftest.$ac_ext >&5
8552   rm -fr conftest*
8553   ol_cv_pthread_lpthread_lmach_lexc=no
8554 fi
8555 rm -fr conftest*
8556 fi
8557
8558
8559                 # restore the LIBS
8560                 LIBS="$ol_LIBS"
8561         
8562 fi
8563
8564 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8565
8566         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8567                 ol_link_pthreads="-lpthread -lmach -lexc"
8568                 ol_link_threads=posix
8569         fi
8570 fi
8571
8572
8573                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8574 if test "$ol_link_threads" = no ; then
8575         # try -lpthread -Wl,-woff,85
8576         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8577 echo "configure:8578: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8578 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8579   echo $ac_n "(cached) $ac_c" 1>&6
8580 else
8581   
8582                 # save the flags
8583                 ol_LIBS="$LIBS"
8584                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8585
8586                 if test "$cross_compiling" = yes; then
8587   cat > conftest.$ac_ext <<EOF
8588 #line 8589 "configure"
8589 #include "confdefs.h"
8590 /* pthread test headers */
8591 #include <pthread.h>
8592 #ifndef NULL
8593 #define NULL (void*)0
8594 #endif
8595
8596 static void *task(p)
8597         void *p;
8598 {
8599         return (void *) (p == NULL);
8600 }
8601
8602 int main() {
8603
8604         /* pthread test function */
8605         pthread_t t;
8606         int status;
8607 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8608         /* This system (e.g. AIX) defaults detached; must override */
8609         pthread_attr_t attr;
8610
8611         status = pthread_attr_init(&attr);
8612         if( status ) exit( status );
8613
8614         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8615         if( status ) exit( status );
8616
8617 #define ATTR    &attr
8618 #else
8619 #if HAVE_PTHREADS_D4
8620 #define ATTR    pthread_attr_default
8621 #else
8622 #define ATTR    NULL
8623 #endif
8624 #endif
8625         /* make sure pthread_create() isn't just a stub */
8626         status = pthread_create(&t, ATTR, task, NULL);
8627         if( status ) exit( status );
8628
8629         /* make sure pthread_detach() isn't just a stub */
8630 #if HAVE_PTHREADS_D4
8631         status = pthread_detach( &t );
8632 #else
8633         status = pthread_detach( t );
8634 #endif
8635
8636 #ifdef HAVE_LINUX_THREADS
8637         pthread_kill_other_threads_np();
8638 #endif
8639
8640         exit( status );
8641
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   ol_cv_pthread_lib_lpthread_woff=yes
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   ol_cv_pthread_lib_lpthread_woff=no
8652 fi
8653 rm -f conftest*
8654 else
8655   cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 /* pthread test headers */
8659 #include <pthread.h>
8660 #ifndef NULL
8661 #define NULL (void*)0
8662 #endif
8663
8664 static void *task(p)
8665         void *p;
8666 {
8667         return (void *) (p == NULL);
8668 }
8669
8670
8671 int main(argc, argv)
8672         int argc;
8673         char **argv;
8674 {
8675
8676         /* pthread test function */
8677         pthread_t t;
8678         int status;
8679 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8680         /* This system (e.g. AIX) defaults detached; must override */
8681         pthread_attr_t attr;
8682
8683         status = pthread_attr_init(&attr);
8684         if( status ) exit( status );
8685
8686         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8687         if( status ) exit( status );
8688
8689 #define ATTR    &attr
8690 #else
8691 #if HAVE_PTHREADS_D4
8692 #define ATTR    pthread_attr_default
8693 #else
8694 #define ATTR    NULL
8695 #endif
8696 #endif
8697         /* make sure pthread_create() isn't just a stub */
8698         status = pthread_create(&t, ATTR, task, NULL);
8699         if( status ) exit( status );
8700
8701         /* make sure pthread_detach() isn't just a stub */
8702 #if HAVE_PTHREADS_D4
8703         status = pthread_detach( &t );
8704 #else
8705         status = pthread_detach( t );
8706 #endif
8707
8708 #ifdef HAVE_LINUX_THREADS
8709         pthread_kill_other_threads_np();
8710 #endif
8711
8712         exit( status );
8713
8714 }
8715
8716 EOF
8717 if { (eval echo configure:8718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8718 then
8719   ol_cv_pthread_lib_lpthread_woff=yes
8720 else
8721   echo "configure: failed program was:" >&5
8722   cat conftest.$ac_ext >&5
8723   rm -fr conftest*
8724   ol_cv_pthread_lib_lpthread_woff=no
8725 fi
8726 rm -fr conftest*
8727 fi
8728
8729
8730                 # restore the LIBS
8731                 LIBS="$ol_LIBS"
8732         
8733 fi
8734
8735 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8736
8737         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8738                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8739                 ol_link_threads=posix
8740         fi
8741 fi
8742
8743
8744                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8745 if test "$ol_link_threads" = no ; then
8746         # try -lpthread
8747         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8748 echo "configure:8749: checking for pthread link with -lpthread" >&5
8749 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8750   echo $ac_n "(cached) $ac_c" 1>&6
8751 else
8752   
8753                 # save the flags
8754                 ol_LIBS="$LIBS"
8755                 LIBS="-lpthread $LIBS"
8756
8757                 if test "$cross_compiling" = yes; then
8758   cat > conftest.$ac_ext <<EOF
8759 #line 8760 "configure"
8760 #include "confdefs.h"
8761 /* pthread test headers */
8762 #include <pthread.h>
8763 #ifndef NULL
8764 #define NULL (void*)0
8765 #endif
8766
8767 static void *task(p)
8768         void *p;
8769 {
8770         return (void *) (p == NULL);
8771 }
8772
8773 int main() {
8774
8775         /* pthread test function */
8776         pthread_t t;
8777         int status;
8778 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8779         /* This system (e.g. AIX) defaults detached; must override */
8780         pthread_attr_t attr;
8781
8782         status = pthread_attr_init(&attr);
8783         if( status ) exit( status );
8784
8785         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8786         if( status ) exit( status );
8787
8788 #define ATTR    &attr
8789 #else
8790 #if HAVE_PTHREADS_D4
8791 #define ATTR    pthread_attr_default
8792 #else
8793 #define ATTR    NULL
8794 #endif
8795 #endif
8796         /* make sure pthread_create() isn't just a stub */
8797         status = pthread_create(&t, ATTR, task, NULL);
8798         if( status ) exit( status );
8799
8800         /* make sure pthread_detach() isn't just a stub */
8801 #if HAVE_PTHREADS_D4
8802         status = pthread_detach( &t );
8803 #else
8804         status = pthread_detach( t );
8805 #endif
8806
8807 #ifdef HAVE_LINUX_THREADS
8808         pthread_kill_other_threads_np();
8809 #endif
8810
8811         exit( status );
8812
8813 ; return 0; }
8814 EOF
8815 if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8816   rm -rf conftest*
8817   ol_cv_pthread_lpthread=yes
8818 else
8819   echo "configure: failed program was:" >&5
8820   cat conftest.$ac_ext >&5
8821   rm -rf conftest*
8822   ol_cv_pthread_lpthread=no
8823 fi
8824 rm -f conftest*
8825 else
8826   cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829 /* pthread test headers */
8830 #include <pthread.h>
8831 #ifndef NULL
8832 #define NULL (void*)0
8833 #endif
8834
8835 static void *task(p)
8836         void *p;
8837 {
8838         return (void *) (p == NULL);
8839 }
8840
8841
8842 int main(argc, argv)
8843         int argc;
8844         char **argv;
8845 {
8846
8847         /* pthread test function */
8848         pthread_t t;
8849         int status;
8850 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8851         /* This system (e.g. AIX) defaults detached; must override */
8852         pthread_attr_t attr;
8853
8854         status = pthread_attr_init(&attr);
8855         if( status ) exit( status );
8856
8857         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8858         if( status ) exit( status );
8859
8860 #define ATTR    &attr
8861 #else
8862 #if HAVE_PTHREADS_D4
8863 #define ATTR    pthread_attr_default
8864 #else
8865 #define ATTR    NULL
8866 #endif
8867 #endif
8868         /* make sure pthread_create() isn't just a stub */
8869         status = pthread_create(&t, ATTR, task, NULL);
8870         if( status ) exit( status );
8871
8872         /* make sure pthread_detach() isn't just a stub */
8873 #if HAVE_PTHREADS_D4
8874         status = pthread_detach( &t );
8875 #else
8876         status = pthread_detach( t );
8877 #endif
8878
8879 #ifdef HAVE_LINUX_THREADS
8880         pthread_kill_other_threads_np();
8881 #endif
8882
8883         exit( status );
8884
8885 }
8886
8887 EOF
8888 if { (eval echo configure:8889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8889 then
8890   ol_cv_pthread_lpthread=yes
8891 else
8892   echo "configure: failed program was:" >&5
8893   cat conftest.$ac_ext >&5
8894   rm -fr conftest*
8895   ol_cv_pthread_lpthread=no
8896 fi
8897 rm -fr conftest*
8898 fi
8899
8900
8901                 # restore the LIBS
8902                 LIBS="$ol_LIBS"
8903         
8904 fi
8905
8906 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8907
8908         if test $ol_cv_pthread_lpthread = yes ; then
8909                 ol_link_pthreads="-lpthread"
8910                 ol_link_threads=posix
8911         fi
8912 fi
8913
8914                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8915 if test "$ol_link_threads" = no ; then
8916         # try -lc_r
8917         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8918 echo "configure:8919: checking for pthread link with -lc_r" >&5
8919 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8920   echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922   
8923                 # save the flags
8924                 ol_LIBS="$LIBS"
8925                 LIBS="-lc_r $LIBS"
8926
8927                 if test "$cross_compiling" = yes; then
8928   cat > conftest.$ac_ext <<EOF
8929 #line 8930 "configure"
8930 #include "confdefs.h"
8931 /* pthread test headers */
8932 #include <pthread.h>
8933 #ifndef NULL
8934 #define NULL (void*)0
8935 #endif
8936
8937 static void *task(p)
8938         void *p;
8939 {
8940         return (void *) (p == NULL);
8941 }
8942
8943 int main() {
8944
8945         /* pthread test function */
8946         pthread_t t;
8947         int status;
8948 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8949         /* This system (e.g. AIX) defaults detached; must override */
8950         pthread_attr_t attr;
8951
8952         status = pthread_attr_init(&attr);
8953         if( status ) exit( status );
8954
8955         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8956         if( status ) exit( status );
8957
8958 #define ATTR    &attr
8959 #else
8960 #if HAVE_PTHREADS_D4
8961 #define ATTR    pthread_attr_default
8962 #else
8963 #define ATTR    NULL
8964 #endif
8965 #endif
8966         /* make sure pthread_create() isn't just a stub */
8967         status = pthread_create(&t, ATTR, task, NULL);
8968         if( status ) exit( status );
8969
8970         /* make sure pthread_detach() isn't just a stub */
8971 #if HAVE_PTHREADS_D4
8972         status = pthread_detach( &t );
8973 #else
8974         status = pthread_detach( t );
8975 #endif
8976
8977 #ifdef HAVE_LINUX_THREADS
8978         pthread_kill_other_threads_np();
8979 #endif
8980
8981         exit( status );
8982
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8986   rm -rf conftest*
8987   ol_cv_pthread_lc_r=yes
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   ol_cv_pthread_lc_r=no
8993 fi
8994 rm -f conftest*
8995 else
8996   cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 /* pthread test headers */
9000 #include <pthread.h>
9001 #ifndef NULL
9002 #define NULL (void*)0
9003 #endif
9004
9005 static void *task(p)
9006         void *p;
9007 {
9008         return (void *) (p == NULL);
9009 }
9010
9011
9012 int main(argc, argv)
9013         int argc;
9014         char **argv;
9015 {
9016
9017         /* pthread test function */
9018         pthread_t t;
9019         int status;
9020 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9021         /* This system (e.g. AIX) defaults detached; must override */
9022         pthread_attr_t attr;
9023
9024         status = pthread_attr_init(&attr);
9025         if( status ) exit( status );
9026
9027         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9028         if( status ) exit( status );
9029
9030 #define ATTR    &attr
9031 #else
9032 #if HAVE_PTHREADS_D4
9033 #define ATTR    pthread_attr_default
9034 #else
9035 #define ATTR    NULL
9036 #endif
9037 #endif
9038         /* make sure pthread_create() isn't just a stub */
9039         status = pthread_create(&t, ATTR, task, NULL);
9040         if( status ) exit( status );
9041
9042         /* make sure pthread_detach() isn't just a stub */
9043 #if HAVE_PTHREADS_D4
9044         status = pthread_detach( &t );
9045 #else
9046         status = pthread_detach( t );
9047 #endif
9048
9049 #ifdef HAVE_LINUX_THREADS
9050         pthread_kill_other_threads_np();
9051 #endif
9052
9053         exit( status );
9054
9055 }
9056
9057 EOF
9058 if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9059 then
9060   ol_cv_pthread_lc_r=yes
9061 else
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -fr conftest*
9065   ol_cv_pthread_lc_r=no
9066 fi
9067 rm -fr conftest*
9068 fi
9069
9070
9071                 # restore the LIBS
9072                 LIBS="$ol_LIBS"
9073         
9074 fi
9075
9076 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9077
9078         if test $ol_cv_pthread_lc_r = yes ; then
9079                 ol_link_pthreads="-lc_r"
9080                 ol_link_threads=posix
9081         fi
9082 fi
9083
9084
9085                 # Pthread try link: -threads (ol_cv_pthread_threads)
9086 if test "$ol_link_threads" = no ; then
9087         # try -threads
9088         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9089 echo "configure:9090: checking for pthread link with -threads" >&5
9090 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9091   echo $ac_n "(cached) $ac_c" 1>&6
9092 else
9093   
9094                 # save the flags
9095                 ol_LIBS="$LIBS"
9096                 LIBS="-threads $LIBS"
9097
9098                 if test "$cross_compiling" = yes; then
9099   cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102 /* pthread test headers */
9103 #include <pthread.h>
9104 #ifndef NULL
9105 #define NULL (void*)0
9106 #endif
9107
9108 static void *task(p)
9109         void *p;
9110 {
9111         return (void *) (p == NULL);
9112 }
9113
9114 int main() {
9115
9116         /* pthread test function */
9117         pthread_t t;
9118         int status;
9119 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9120         /* This system (e.g. AIX) defaults detached; must override */
9121         pthread_attr_t attr;
9122
9123         status = pthread_attr_init(&attr);
9124         if( status ) exit( status );
9125
9126         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9127         if( status ) exit( status );
9128
9129 #define ATTR    &attr
9130 #else
9131 #if HAVE_PTHREADS_D4
9132 #define ATTR    pthread_attr_default
9133 #else
9134 #define ATTR    NULL
9135 #endif
9136 #endif
9137         /* make sure pthread_create() isn't just a stub */
9138         status = pthread_create(&t, ATTR, task, NULL);
9139         if( status ) exit( status );
9140
9141         /* make sure pthread_detach() isn't just a stub */
9142 #if HAVE_PTHREADS_D4
9143         status = pthread_detach( &t );
9144 #else
9145         status = pthread_detach( t );
9146 #endif
9147
9148 #ifdef HAVE_LINUX_THREADS
9149         pthread_kill_other_threads_np();
9150 #endif
9151
9152         exit( status );
9153
9154 ; return 0; }
9155 EOF
9156 if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9157   rm -rf conftest*
9158   ol_cv_pthread_threads=yes
9159 else
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -rf conftest*
9163   ol_cv_pthread_threads=no
9164 fi
9165 rm -f conftest*
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 /* pthread test headers */
9171 #include <pthread.h>
9172 #ifndef NULL
9173 #define NULL (void*)0
9174 #endif
9175
9176 static void *task(p)
9177         void *p;
9178 {
9179         return (void *) (p == NULL);
9180 }
9181
9182
9183 int main(argc, argv)
9184         int argc;
9185         char **argv;
9186 {
9187
9188         /* pthread test function */
9189         pthread_t t;
9190         int status;
9191 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9192         /* This system (e.g. AIX) defaults detached; must override */
9193         pthread_attr_t attr;
9194
9195         status = pthread_attr_init(&attr);
9196         if( status ) exit( status );
9197
9198         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9199         if( status ) exit( status );
9200
9201 #define ATTR    &attr
9202 #else
9203 #if HAVE_PTHREADS_D4
9204 #define ATTR    pthread_attr_default
9205 #else
9206 #define ATTR    NULL
9207 #endif
9208 #endif
9209         /* make sure pthread_create() isn't just a stub */
9210         status = pthread_create(&t, ATTR, task, NULL);
9211         if( status ) exit( status );
9212
9213         /* make sure pthread_detach() isn't just a stub */
9214 #if HAVE_PTHREADS_D4
9215         status = pthread_detach( &t );
9216 #else
9217         status = pthread_detach( t );
9218 #endif
9219
9220 #ifdef HAVE_LINUX_THREADS
9221         pthread_kill_other_threads_np();
9222 #endif
9223
9224         exit( status );
9225
9226 }
9227
9228 EOF
9229 if { (eval echo configure:9230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9230 then
9231   ol_cv_pthread_threads=yes
9232 else
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -fr conftest*
9236   ol_cv_pthread_threads=no
9237 fi
9238 rm -fr conftest*
9239 fi
9240
9241
9242                 # restore the LIBS
9243                 LIBS="$ol_LIBS"
9244         
9245 fi
9246
9247 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9248
9249         if test $ol_cv_pthread_threads = yes ; then
9250                 ol_link_pthreads="-threads"
9251                 ol_link_threads=posix
9252         fi
9253 fi
9254
9255
9256                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9257 if test "$ol_link_threads" = no ; then
9258         # try -lpthreads -lmach -lexc -lc_r
9259         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9260 echo "configure:9261: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9261 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9262   echo $ac_n "(cached) $ac_c" 1>&6
9263 else
9264   
9265                 # save the flags
9266                 ol_LIBS="$LIBS"
9267                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9268
9269                 if test "$cross_compiling" = yes; then
9270   cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 /* pthread test headers */
9274 #include <pthread.h>
9275 #ifndef NULL
9276 #define NULL (void*)0
9277 #endif
9278
9279 static void *task(p)
9280         void *p;
9281 {
9282         return (void *) (p == NULL);
9283 }
9284
9285 int main() {
9286
9287         /* pthread test function */
9288         pthread_t t;
9289         int status;
9290 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9291         /* This system (e.g. AIX) defaults detached; must override */
9292         pthread_attr_t attr;
9293
9294         status = pthread_attr_init(&attr);
9295         if( status ) exit( status );
9296
9297         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9298         if( status ) exit( status );
9299
9300 #define ATTR    &attr
9301 #else
9302 #if HAVE_PTHREADS_D4
9303 #define ATTR    pthread_attr_default
9304 #else
9305 #define ATTR    NULL
9306 #endif
9307 #endif
9308         /* make sure pthread_create() isn't just a stub */
9309         status = pthread_create(&t, ATTR, task, NULL);
9310         if( status ) exit( status );
9311
9312         /* make sure pthread_detach() isn't just a stub */
9313 #if HAVE_PTHREADS_D4
9314         status = pthread_detach( &t );
9315 #else
9316         status = pthread_detach( t );
9317 #endif
9318
9319 #ifdef HAVE_LINUX_THREADS
9320         pthread_kill_other_threads_np();
9321 #endif
9322
9323         exit( status );
9324
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9328   rm -rf conftest*
9329   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9335 fi
9336 rm -f conftest*
9337 else
9338   cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341 /* pthread test headers */
9342 #include <pthread.h>
9343 #ifndef NULL
9344 #define NULL (void*)0
9345 #endif
9346
9347 static void *task(p)
9348         void *p;
9349 {
9350         return (void *) (p == NULL);
9351 }
9352
9353
9354 int main(argc, argv)
9355         int argc;
9356         char **argv;
9357 {
9358
9359         /* pthread test function */
9360         pthread_t t;
9361         int status;
9362 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9363         /* This system (e.g. AIX) defaults detached; must override */
9364         pthread_attr_t attr;
9365
9366         status = pthread_attr_init(&attr);
9367         if( status ) exit( status );
9368
9369         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9370         if( status ) exit( status );
9371
9372 #define ATTR    &attr
9373 #else
9374 #if HAVE_PTHREADS_D4
9375 #define ATTR    pthread_attr_default
9376 #else
9377 #define ATTR    NULL
9378 #endif
9379 #endif
9380         /* make sure pthread_create() isn't just a stub */
9381         status = pthread_create(&t, ATTR, task, NULL);
9382         if( status ) exit( status );
9383
9384         /* make sure pthread_detach() isn't just a stub */
9385 #if HAVE_PTHREADS_D4
9386         status = pthread_detach( &t );
9387 #else
9388         status = pthread_detach( t );
9389 #endif
9390
9391 #ifdef HAVE_LINUX_THREADS
9392         pthread_kill_other_threads_np();
9393 #endif
9394
9395         exit( status );
9396
9397 }
9398
9399 EOF
9400 if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9401 then
9402   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9403 else
9404   echo "configure: failed program was:" >&5
9405   cat conftest.$ac_ext >&5
9406   rm -fr conftest*
9407   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9408 fi
9409 rm -fr conftest*
9410 fi
9411
9412
9413                 # restore the LIBS
9414                 LIBS="$ol_LIBS"
9415         
9416 fi
9417
9418 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9419
9420         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9421                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9422                 ol_link_threads=posix
9423         fi
9424 fi
9425
9426                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9427 if test "$ol_link_threads" = no ; then
9428         # try -lpthreads -lmach -lexc
9429         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9430 echo "configure:9431: checking for pthread link with -lpthreads -lmach -lexc" >&5
9431 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9432   echo $ac_n "(cached) $ac_c" 1>&6
9433 else
9434   
9435                 # save the flags
9436                 ol_LIBS="$LIBS"
9437                 LIBS="-lpthreads -lmach -lexc $LIBS"
9438
9439                 if test "$cross_compiling" = yes; then
9440   cat > conftest.$ac_ext <<EOF
9441 #line 9442 "configure"
9442 #include "confdefs.h"
9443 /* pthread test headers */
9444 #include <pthread.h>
9445 #ifndef NULL
9446 #define NULL (void*)0
9447 #endif
9448
9449 static void *task(p)
9450         void *p;
9451 {
9452         return (void *) (p == NULL);
9453 }
9454
9455 int main() {
9456
9457         /* pthread test function */
9458         pthread_t t;
9459         int status;
9460 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9461         /* This system (e.g. AIX) defaults detached; must override */
9462         pthread_attr_t attr;
9463
9464         status = pthread_attr_init(&attr);
9465         if( status ) exit( status );
9466
9467         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9468         if( status ) exit( status );
9469
9470 #define ATTR    &attr
9471 #else
9472 #if HAVE_PTHREADS_D4
9473 #define ATTR    pthread_attr_default
9474 #else
9475 #define ATTR    NULL
9476 #endif
9477 #endif
9478         /* make sure pthread_create() isn't just a stub */
9479         status = pthread_create(&t, ATTR, task, NULL);
9480         if( status ) exit( status );
9481
9482         /* make sure pthread_detach() isn't just a stub */
9483 #if HAVE_PTHREADS_D4
9484         status = pthread_detach( &t );
9485 #else
9486         status = pthread_detach( t );
9487 #endif
9488
9489 #ifdef HAVE_LINUX_THREADS
9490         pthread_kill_other_threads_np();
9491 #endif
9492
9493         exit( status );
9494
9495 ; return 0; }
9496 EOF
9497 if { (eval echo configure:9498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9498   rm -rf conftest*
9499   ol_cv_pthread_lpthreads_lmach_lexc=yes
9500 else
9501   echo "configure: failed program was:" >&5
9502   cat conftest.$ac_ext >&5
9503   rm -rf conftest*
9504   ol_cv_pthread_lpthreads_lmach_lexc=no
9505 fi
9506 rm -f conftest*
9507 else
9508   cat > conftest.$ac_ext <<EOF
9509 #line 9510 "configure"
9510 #include "confdefs.h"
9511 /* pthread test headers */
9512 #include <pthread.h>
9513 #ifndef NULL
9514 #define NULL (void*)0
9515 #endif
9516
9517 static void *task(p)
9518         void *p;
9519 {
9520         return (void *) (p == NULL);
9521 }
9522
9523
9524 int main(argc, argv)
9525         int argc;
9526         char **argv;
9527 {
9528
9529         /* pthread test function */
9530         pthread_t t;
9531         int status;
9532 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9533         /* This system (e.g. AIX) defaults detached; must override */
9534         pthread_attr_t attr;
9535
9536         status = pthread_attr_init(&attr);
9537         if( status ) exit( status );
9538
9539         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9540         if( status ) exit( status );
9541
9542 #define ATTR    &attr
9543 #else
9544 #if HAVE_PTHREADS_D4
9545 #define ATTR    pthread_attr_default
9546 #else
9547 #define ATTR    NULL
9548 #endif
9549 #endif
9550         /* make sure pthread_create() isn't just a stub */
9551         status = pthread_create(&t, ATTR, task, NULL);
9552         if( status ) exit( status );
9553
9554         /* make sure pthread_detach() isn't just a stub */
9555 #if HAVE_PTHREADS_D4
9556         status = pthread_detach( &t );
9557 #else
9558         status = pthread_detach( t );
9559 #endif
9560
9561 #ifdef HAVE_LINUX_THREADS
9562         pthread_kill_other_threads_np();
9563 #endif
9564
9565         exit( status );
9566
9567 }
9568
9569 EOF
9570 if { (eval echo configure:9571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9571 then
9572   ol_cv_pthread_lpthreads_lmach_lexc=yes
9573 else
9574   echo "configure: failed program was:" >&5
9575   cat conftest.$ac_ext >&5
9576   rm -fr conftest*
9577   ol_cv_pthread_lpthreads_lmach_lexc=no
9578 fi
9579 rm -fr conftest*
9580 fi
9581
9582
9583                 # restore the LIBS
9584                 LIBS="$ol_LIBS"
9585         
9586 fi
9587
9588 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9589
9590         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9591                 ol_link_pthreads="-lpthreads -lmach -lexc"
9592                 ol_link_threads=posix
9593         fi
9594 fi
9595
9596                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9597 if test "$ol_link_threads" = no ; then
9598         # try -lpthreads -lexc
9599         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9600 echo "configure:9601: checking for pthread link with -lpthreads -lexc" >&5
9601 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604   
9605                 # save the flags
9606                 ol_LIBS="$LIBS"
9607                 LIBS="-lpthreads -lexc $LIBS"
9608
9609                 if test "$cross_compiling" = yes; then
9610   cat > conftest.$ac_ext <<EOF
9611 #line 9612 "configure"
9612 #include "confdefs.h"
9613 /* pthread test headers */
9614 #include <pthread.h>
9615 #ifndef NULL
9616 #define NULL (void*)0
9617 #endif
9618
9619 static void *task(p)
9620         void *p;
9621 {
9622         return (void *) (p == NULL);
9623 }
9624
9625 int main() {
9626
9627         /* pthread test function */
9628         pthread_t t;
9629         int status;
9630 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9631         /* This system (e.g. AIX) defaults detached; must override */
9632         pthread_attr_t attr;
9633
9634         status = pthread_attr_init(&attr);
9635         if( status ) exit( status );
9636
9637         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9638         if( status ) exit( status );
9639
9640 #define ATTR    &attr
9641 #else
9642 #if HAVE_PTHREADS_D4
9643 #define ATTR    pthread_attr_default
9644 #else
9645 #define ATTR    NULL
9646 #endif
9647 #endif
9648         /* make sure pthread_create() isn't just a stub */
9649         status = pthread_create(&t, ATTR, task, NULL);
9650         if( status ) exit( status );
9651
9652         /* make sure pthread_detach() isn't just a stub */
9653 #if HAVE_PTHREADS_D4
9654         status = pthread_detach( &t );
9655 #else
9656         status = pthread_detach( t );
9657 #endif
9658
9659 #ifdef HAVE_LINUX_THREADS
9660         pthread_kill_other_threads_np();
9661 #endif
9662
9663         exit( status );
9664
9665 ; return 0; }
9666 EOF
9667 if { (eval echo configure:9668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9668   rm -rf conftest*
9669   ol_cv_pthread_lpthreads_lexc=yes
9670 else
9671   echo "configure: failed program was:" >&5
9672   cat conftest.$ac_ext >&5
9673   rm -rf conftest*
9674   ol_cv_pthread_lpthreads_lexc=no
9675 fi
9676 rm -f conftest*
9677 else
9678   cat > conftest.$ac_ext <<EOF
9679 #line 9680 "configure"
9680 #include "confdefs.h"
9681 /* pthread test headers */
9682 #include <pthread.h>
9683 #ifndef NULL
9684 #define NULL (void*)0
9685 #endif
9686
9687 static void *task(p)
9688         void *p;
9689 {
9690         return (void *) (p == NULL);
9691 }
9692
9693
9694 int main(argc, argv)
9695         int argc;
9696         char **argv;
9697 {
9698
9699         /* pthread test function */
9700         pthread_t t;
9701         int status;
9702 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9703         /* This system (e.g. AIX) defaults detached; must override */
9704         pthread_attr_t attr;
9705
9706         status = pthread_attr_init(&attr);
9707         if( status ) exit( status );
9708
9709         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9710         if( status ) exit( status );
9711
9712 #define ATTR    &attr
9713 #else
9714 #if HAVE_PTHREADS_D4
9715 #define ATTR    pthread_attr_default
9716 #else
9717 #define ATTR    NULL
9718 #endif
9719 #endif
9720         /* make sure pthread_create() isn't just a stub */
9721         status = pthread_create(&t, ATTR, task, NULL);
9722         if( status ) exit( status );
9723
9724         /* make sure pthread_detach() isn't just a stub */
9725 #if HAVE_PTHREADS_D4
9726         status = pthread_detach( &t );
9727 #else
9728         status = pthread_detach( t );
9729 #endif
9730
9731 #ifdef HAVE_LINUX_THREADS
9732         pthread_kill_other_threads_np();
9733 #endif
9734
9735         exit( status );
9736
9737 }
9738
9739 EOF
9740 if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9741 then
9742   ol_cv_pthread_lpthreads_lexc=yes
9743 else
9744   echo "configure: failed program was:" >&5
9745   cat conftest.$ac_ext >&5
9746   rm -fr conftest*
9747   ol_cv_pthread_lpthreads_lexc=no
9748 fi
9749 rm -fr conftest*
9750 fi
9751
9752
9753                 # restore the LIBS
9754                 LIBS="$ol_LIBS"
9755         
9756 fi
9757
9758 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9759
9760         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9761                 ol_link_pthreads="-lpthreads -lexc"
9762                 ol_link_threads=posix
9763         fi
9764 fi
9765
9766
9767                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9768 if test "$ol_link_threads" = no ; then
9769         # try -lpthreads
9770         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9771 echo "configure:9772: checking for pthread link with -lpthreads" >&5
9772 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9773   echo $ac_n "(cached) $ac_c" 1>&6
9774 else
9775   
9776                 # save the flags
9777                 ol_LIBS="$LIBS"
9778                 LIBS="-lpthreads $LIBS"
9779
9780                 if test "$cross_compiling" = yes; then
9781   cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784 /* pthread test headers */
9785 #include <pthread.h>
9786 #ifndef NULL
9787 #define NULL (void*)0
9788 #endif
9789
9790 static void *task(p)
9791         void *p;
9792 {
9793         return (void *) (p == NULL);
9794 }
9795
9796 int main() {
9797
9798         /* pthread test function */
9799         pthread_t t;
9800         int status;
9801 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9802         /* This system (e.g. AIX) defaults detached; must override */
9803         pthread_attr_t attr;
9804
9805         status = pthread_attr_init(&attr);
9806         if( status ) exit( status );
9807
9808         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9809         if( status ) exit( status );
9810
9811 #define ATTR    &attr
9812 #else
9813 #if HAVE_PTHREADS_D4
9814 #define ATTR    pthread_attr_default
9815 #else
9816 #define ATTR    NULL
9817 #endif
9818 #endif
9819         /* make sure pthread_create() isn't just a stub */
9820         status = pthread_create(&t, ATTR, task, NULL);
9821         if( status ) exit( status );
9822
9823         /* make sure pthread_detach() isn't just a stub */
9824 #if HAVE_PTHREADS_D4
9825         status = pthread_detach( &t );
9826 #else
9827         status = pthread_detach( t );
9828 #endif
9829
9830 #ifdef HAVE_LINUX_THREADS
9831         pthread_kill_other_threads_np();
9832 #endif
9833
9834         exit( status );
9835
9836 ; return 0; }
9837 EOF
9838 if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9839   rm -rf conftest*
9840   ol_cv_pthread_lib_lpthreads=yes
9841 else
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   ol_cv_pthread_lib_lpthreads=no
9846 fi
9847 rm -f conftest*
9848 else
9849   cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 /* pthread test headers */
9853 #include <pthread.h>
9854 #ifndef NULL
9855 #define NULL (void*)0
9856 #endif
9857
9858 static void *task(p)
9859         void *p;
9860 {
9861         return (void *) (p == NULL);
9862 }
9863
9864
9865 int main(argc, argv)
9866         int argc;
9867         char **argv;
9868 {
9869
9870         /* pthread test function */
9871         pthread_t t;
9872         int status;
9873 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9874         /* This system (e.g. AIX) defaults detached; must override */
9875         pthread_attr_t attr;
9876
9877         status = pthread_attr_init(&attr);
9878         if( status ) exit( status );
9879
9880         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9881         if( status ) exit( status );
9882
9883 #define ATTR    &attr
9884 #else
9885 #if HAVE_PTHREADS_D4
9886 #define ATTR    pthread_attr_default
9887 #else
9888 #define ATTR    NULL
9889 #endif
9890 #endif
9891         /* make sure pthread_create() isn't just a stub */
9892         status = pthread_create(&t, ATTR, task, NULL);
9893         if( status ) exit( status );
9894
9895         /* make sure pthread_detach() isn't just a stub */
9896 #if HAVE_PTHREADS_D4
9897         status = pthread_detach( &t );
9898 #else
9899         status = pthread_detach( t );
9900 #endif
9901
9902 #ifdef HAVE_LINUX_THREADS
9903         pthread_kill_other_threads_np();
9904 #endif
9905
9906         exit( status );
9907
9908 }
9909
9910 EOF
9911 if { (eval echo configure:9912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9912 then
9913   ol_cv_pthread_lib_lpthreads=yes
9914 else
9915   echo "configure: failed program was:" >&5
9916   cat conftest.$ac_ext >&5
9917   rm -fr conftest*
9918   ol_cv_pthread_lib_lpthreads=no
9919 fi
9920 rm -fr conftest*
9921 fi
9922
9923
9924                 # restore the LIBS
9925                 LIBS="$ol_LIBS"
9926         
9927 fi
9928
9929 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9930
9931         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9932                 ol_link_pthreads="-lpthreads"
9933                 ol_link_threads=posix
9934         fi
9935 fi
9936
9937
9938                 if test $ol_link_threads != no ; then
9939                         cat >> confdefs.h <<\EOF
9940 #define HAVE_PTHREADS 1
9941 EOF
9942
9943
9944                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9945
9946                                                 save_CPPFLAGS="$CPPFLAGS"
9947                         save_LIBS="$LIBS"
9948                         LIBS="$LTHREAD_LIBS $LIBS"
9949
9950                                                                                                 for ac_func in sched_yield pthread_yield
9951 do
9952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9953 echo "configure:9954: checking for $ac_func" >&5
9954 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 /* System header to define __stub macros and hopefully few prototypes,
9961     which can conflict with char $ac_func(); below.  */
9962 #include <assert.h>
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 /* We use char because int might match the return type of a gcc2
9965     builtin and then its argument prototype would still apply.  */
9966 char $ac_func();
9967 char (*f)();
9968
9969 int main() {
9970
9971 /* The GNU C library defines this for functions which it implements
9972     to always fail with ENOSYS.  Some functions are actually named
9973     something starting with __ and the normal name is an alias.  */
9974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9975 choke me
9976 #else
9977 f = $ac_func;
9978 #endif
9979
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   eval "ac_cv_func_$ac_func=yes"
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -rf conftest*
9989   eval "ac_cv_func_$ac_func=no"
9990 fi
9991 rm -f conftest*
9992 fi
9993
9994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9995   echo "$ac_t""yes" 1>&6
9996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9997   cat >> confdefs.h <<EOF
9998 #define $ac_tr_func 1
9999 EOF
10000  
10001 else
10002   echo "$ac_t""no" 1>&6
10003 fi
10004 done
10005
10006
10007                         if test $ac_cv_func_sched_yield = no -a \
10008                                 $ac_cv_func_pthread_yield = no ; then
10009                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10010 echo "configure:10011: checking for sched_yield in -lrt" >&5
10011 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   ac_save_LIBS="$LIBS"
10016 LIBS="-lrt  $LIBS"
10017 cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020 /* Override any gcc2 internal prototype to avoid an error.  */
10021 /* We use char because int might match the return type of a gcc2
10022     builtin and then its argument prototype would still apply.  */
10023 char sched_yield();
10024
10025 int main() {
10026 sched_yield()
10027 ; return 0; }
10028 EOF
10029 if { (eval echo configure:10030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10030   rm -rf conftest*
10031   eval "ac_cv_lib_$ac_lib_var=yes"
10032 else
10033   echo "configure: failed program was:" >&5
10034   cat conftest.$ac_ext >&5
10035   rm -rf conftest*
10036   eval "ac_cv_lib_$ac_lib_var=no"
10037 fi
10038 rm -f conftest*
10039 LIBS="$ac_save_LIBS"
10040
10041 fi
10042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10045                                         cat >> confdefs.h <<\EOF
10046 #define HAVE_SCHED_YIELD 1
10047 EOF
10048
10049                                         ac_cv_func_sched_yield=yes
10050 else
10051   echo "$ac_t""no" 1>&6
10052 ac_cv_func_sched_yield=no
10053 fi
10054
10055                         fi
10056                         if test $ac_cv_func_sched_yield = no -a \
10057                                 $ac_cv_func_pthread_yield = no ; then
10058                                                                                                 for ac_func in thr_yield
10059 do
10060 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10061 echo "configure:10062: checking for $ac_func" >&5
10062 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10063   echo $ac_n "(cached) $ac_c" 1>&6
10064 else
10065   cat > conftest.$ac_ext <<EOF
10066 #line 10067 "configure"
10067 #include "confdefs.h"
10068 /* System header to define __stub macros and hopefully few prototypes,
10069     which can conflict with char $ac_func(); below.  */
10070 #include <assert.h>
10071 /* Override any gcc2 internal prototype to avoid an error.  */
10072 /* We use char because int might match the return type of a gcc2
10073     builtin and then its argument prototype would still apply.  */
10074 char $ac_func();
10075 char (*f)();
10076
10077 int main() {
10078
10079 /* The GNU C library defines this for functions which it implements
10080     to always fail with ENOSYS.  Some functions are actually named
10081     something starting with __ and the normal name is an alias.  */
10082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10083 choke me
10084 #else
10085 f = $ac_func;
10086 #endif
10087
10088 ; return 0; }
10089 EOF
10090 if { (eval echo configure:10091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10091   rm -rf conftest*
10092   eval "ac_cv_func_$ac_func=yes"
10093 else
10094   echo "configure: failed program was:" >&5
10095   cat conftest.$ac_ext >&5
10096   rm -rf conftest*
10097   eval "ac_cv_func_$ac_func=no"
10098 fi
10099 rm -f conftest*
10100 fi
10101
10102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10103   echo "$ac_t""yes" 1>&6
10104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10105   cat >> confdefs.h <<EOF
10106 #define $ac_tr_func 1
10107 EOF
10108  
10109 else
10110   echo "$ac_t""no" 1>&6
10111 fi
10112 done
10113
10114                         fi
10115                         if test $ac_cv_func_sched_yield = no -a \
10116                                 $ac_cv_func_pthread_yield = no -a \
10117                                 "$ac_cv_func_thr_yield" = no ; then
10118                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10119                         fi
10120
10121                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10122 do
10123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10124 echo "configure:10125: checking for $ac_func" >&5
10125 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10126   echo $ac_n "(cached) $ac_c" 1>&6
10127 else
10128   cat > conftest.$ac_ext <<EOF
10129 #line 10130 "configure"
10130 #include "confdefs.h"
10131 /* System header to define __stub macros and hopefully few prototypes,
10132     which can conflict with char $ac_func(); below.  */
10133 #include <assert.h>
10134 /* Override any gcc2 internal prototype to avoid an error.  */
10135 /* We use char because int might match the return type of a gcc2
10136     builtin and then its argument prototype would still apply.  */
10137 char $ac_func();
10138 char (*f)();
10139
10140 int main() {
10141
10142 /* The GNU C library defines this for functions which it implements
10143     to always fail with ENOSYS.  Some functions are actually named
10144     something starting with __ and the normal name is an alias.  */
10145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10146 choke me
10147 #else
10148 f = $ac_func;
10149 #endif
10150
10151 ; return 0; }
10152 EOF
10153 if { (eval echo configure:10154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10154   rm -rf conftest*
10155   eval "ac_cv_func_$ac_func=yes"
10156 else
10157   echo "configure: failed program was:" >&5
10158   cat conftest.$ac_ext >&5
10159   rm -rf conftest*
10160   eval "ac_cv_func_$ac_func=no"
10161 fi
10162 rm -f conftest*
10163 fi
10164
10165 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10166   echo "$ac_t""yes" 1>&6
10167     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10168   cat >> confdefs.h <<EOF
10169 #define $ac_tr_func 1
10170 EOF
10171  
10172 else
10173   echo "$ac_t""no" 1>&6
10174 fi
10175 done
10176
10177
10178                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10179 echo "configure:10180: checking for pthread_detach with <pthread.h>" >&5
10180 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10181   echo $ac_n "(cached) $ac_c" 1>&6
10182 else
10183   
10184                                                                 cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187
10188 #include <pthread.h>
10189 #ifndef NULL
10190 #define NULL (void*)0
10191 #endif
10192
10193 int main() {
10194 pthread_detach(NULL);
10195 ; return 0; }
10196 EOF
10197 if { (eval echo configure:10198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10198   rm -rf conftest*
10199   ol_cv_func_pthread_detach=yes
10200 else
10201   echo "configure: failed program was:" >&5
10202   cat conftest.$ac_ext >&5
10203   rm -rf conftest*
10204   ol_cv_func_pthread_detach=no
10205 fi
10206 rm -f conftest*
10207                         
10208 fi
10209
10210 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10211
10212                         if test $ol_cv_func_pthread_detach = no ; then
10213                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10214                         fi
10215
10216                         cat >> confdefs.h <<\EOF
10217 #define HAVE_PTHREAD_DETACH 1
10218 EOF
10219
10220
10221                                                 for ac_func in \
10222                                 pthread_setconcurrency \
10223                                 pthread_getconcurrency \
10224                                 thr_setconcurrency \
10225                                 thr_getconcurrency \
10226                         
10227 do
10228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10229 echo "configure:10230: checking for $ac_func" >&5
10230 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10231   echo $ac_n "(cached) $ac_c" 1>&6
10232 else
10233   cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10236 /* System header to define __stub macros and hopefully few prototypes,
10237     which can conflict with char $ac_func(); below.  */
10238 #include <assert.h>
10239 /* Override any gcc2 internal prototype to avoid an error.  */
10240 /* We use char because int might match the return type of a gcc2
10241     builtin and then its argument prototype would still apply.  */
10242 char $ac_func();
10243 char (*f)();
10244
10245 int main() {
10246
10247 /* The GNU C library defines this for functions which it implements
10248     to always fail with ENOSYS.  Some functions are actually named
10249     something starting with __ and the normal name is an alias.  */
10250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10251 choke me
10252 #else
10253 f = $ac_func;
10254 #endif
10255
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10259   rm -rf conftest*
10260   eval "ac_cv_func_$ac_func=yes"
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   eval "ac_cv_func_$ac_func=no"
10266 fi
10267 rm -f conftest*
10268 fi
10269
10270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10271   echo "$ac_t""yes" 1>&6
10272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10273   cat >> confdefs.h <<EOF
10274 #define $ac_tr_func 1
10275 EOF
10276  
10277 else
10278   echo "$ac_t""no" 1>&6
10279 fi
10280 done
10281
10282
10283                         
10284         for ac_func in pthread_kill_other_threads_np
10285 do
10286 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10287 echo "configure:10288: checking for $ac_func" >&5
10288 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10289   echo $ac_n "(cached) $ac_c" 1>&6
10290 else
10291   cat > conftest.$ac_ext <<EOF
10292 #line 10293 "configure"
10293 #include "confdefs.h"
10294 /* System header to define __stub macros and hopefully few prototypes,
10295     which can conflict with char $ac_func(); below.  */
10296 #include <assert.h>
10297 /* Override any gcc2 internal prototype to avoid an error.  */
10298 /* We use char because int might match the return type of a gcc2
10299     builtin and then its argument prototype would still apply.  */
10300 char $ac_func();
10301 char (*f)();
10302
10303 int main() {
10304
10305 /* The GNU C library defines this for functions which it implements
10306     to always fail with ENOSYS.  Some functions are actually named
10307     something starting with __ and the normal name is an alias.  */
10308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10309 choke me
10310 #else
10311 f = $ac_func;
10312 #endif
10313
10314 ; return 0; }
10315 EOF
10316 if { (eval echo configure:10317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10317   rm -rf conftest*
10318   eval "ac_cv_func_$ac_func=yes"
10319 else
10320   echo "configure: failed program was:" >&5
10321   cat conftest.$ac_ext >&5
10322   rm -rf conftest*
10323   eval "ac_cv_func_$ac_func=no"
10324 fi
10325 rm -f conftest*
10326 fi
10327
10328 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10329   echo "$ac_t""yes" 1>&6
10330     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10331   cat >> confdefs.h <<EOF
10332 #define $ac_tr_func 1
10333 EOF
10334  
10335 else
10336   echo "$ac_t""no" 1>&6
10337 fi
10338 done
10339
10340         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10341 echo "configure:10342: checking for LinuxThreads implementation" >&5
10342 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10343   echo $ac_n "(cached) $ac_c" 1>&6
10344 else
10345   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10346 fi
10347
10348 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10349
10350                         
10351         
10352         
10353         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10354 echo "configure:10355: checking for LinuxThreads consistency" >&5
10355 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10356   echo $ac_n "(cached) $ac_c" 1>&6
10357 else
10358   
10359                 if test $ol_cv_header_linux_threads = yes -a \
10360                         $ol_cv_sys_linux_threads = yes; then
10361                         ol_cv_linux_threads=yes
10362                 elif test $ol_cv_header_linux_threads = no -a \
10363                         $ol_cv_sys_linux_threads = no; then
10364                         ol_cv_linux_threads=no
10365                 else
10366                         ol_cv_linux_threads=error
10367                 fi
10368         
10369 fi
10370
10371 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10372
10373
10374                         if test $ol_cv_linux_threads = error; then
10375                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10376                         fi
10377
10378                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10379 echo "configure:10380: checking if pthread_create() works" >&5
10380 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   
10384                         if test "$cross_compiling" = yes; then
10385                                 ol_cv_pthread_create_works=yes
10386 else
10387   cat > conftest.$ac_ext <<EOF
10388 #line 10389 "configure"
10389 #include "confdefs.h"
10390 /* pthread test headers */
10391 #include <pthread.h>
10392 #ifndef NULL
10393 #define NULL (void*)0
10394 #endif
10395
10396 static void *task(p)
10397         void *p;
10398 {
10399         return (void *) (p == NULL);
10400 }
10401
10402
10403 int main(argc, argv)
10404         int argc;
10405         char **argv;
10406 {
10407
10408         /* pthread test function */
10409         pthread_t t;
10410         int status;
10411 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10412         /* This system (e.g. AIX) defaults detached; must override */
10413         pthread_attr_t attr;
10414
10415         status = pthread_attr_init(&attr);
10416         if( status ) exit( status );
10417
10418         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10419         if( status ) exit( status );
10420
10421 #define ATTR    &attr
10422 #else
10423 #if HAVE_PTHREADS_D4
10424 #define ATTR    pthread_attr_default
10425 #else
10426 #define ATTR    NULL
10427 #endif
10428 #endif
10429         /* make sure pthread_create() isn't just a stub */
10430         status = pthread_create(&t, ATTR, task, NULL);
10431         if( status ) exit( status );
10432
10433         /* make sure pthread_detach() isn't just a stub */
10434 #if HAVE_PTHREADS_D4
10435         status = pthread_detach( &t );
10436 #else
10437         status = pthread_detach( t );
10438 #endif
10439
10440 #ifdef HAVE_LINUX_THREADS
10441         pthread_kill_other_threads_np();
10442 #endif
10443
10444         exit( status );
10445
10446 }
10447
10448 EOF
10449 if { (eval echo configure:10450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10450 then
10451   ol_cv_pthread_create_works=yes
10452 else
10453   echo "configure: failed program was:" >&5
10454   cat conftest.$ac_ext >&5
10455   rm -fr conftest*
10456   ol_cv_pthread_create_works=no
10457 fi
10458 rm -fr conftest*
10459 fi
10460
10461 fi
10462
10463 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10464
10465                         if test $ol_cv_pthread_create_works = no ; then
10466                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10467                         fi
10468
10469                                                 if test $ol_with_yielding_select = auto ; then
10470                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10471 echo "configure:10472: checking if select yields when using pthreads" >&5
10472 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   
10476                                 if test "$cross_compiling" = yes; then
10477   ol_cv_pthread_select_yields=cross
10478 else
10479   cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482
10483 #include <sys/types.h>
10484 #include <sys/time.h>
10485 #include <unistd.h>
10486 #include <pthread.h>
10487 #ifndef NULL
10488 #define NULL (void*) 0
10489 #endif
10490
10491 static int fildes[2];
10492
10493 static void *task(p)
10494         void *p;
10495 {
10496         int i;
10497         struct timeval tv;
10498
10499         fd_set rfds;
10500
10501         tv.tv_sec=10;
10502         tv.tv_usec=0;
10503
10504         FD_ZERO(&rfds);
10505         FD_SET(fildes[0], &rfds);
10506
10507         /* we're not interested in any fds */
10508         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10509
10510         if(i < 0) {
10511                 perror("select");
10512                 exit(10);
10513         }
10514
10515         exit(0); /* if we exit here, the select blocked the whole process */
10516 }
10517
10518 int main(argc, argv)
10519         int argc;
10520         char **argv;
10521 {
10522         pthread_t t;
10523
10524         /* create a pipe to select */
10525         if(pipe(&fildes[0])) {
10526                 perror("select");
10527                 exit(1);
10528         }
10529
10530 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10531         (void) pthread_setconcurrency(2);
10532 #else
10533 #ifdef HAVE_THR_SETCONCURRENCY
10534         /* Set Solaris LWP concurrency to 2 */
10535         thr_setconcurrency(2);
10536 #endif
10537 #endif
10538
10539 #if HAVE_PTHREADS_D4
10540         pthread_create(&t, pthread_attr_default, task, NULL);
10541 #else
10542         pthread_create(&t, NULL, task, NULL);
10543 #endif
10544
10545 #if HAVE_SCHED_YIELD
10546         sched_yield();  /* make sure task runs first */
10547 #else
10548 #ifdef HAVE_PTHREAD_YIELD
10549         pthread_yield();        /* make sure task runs first */
10550 #endif
10551 #endif
10552
10553         exit(2);
10554 }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10557 then
10558   ol_cv_pthread_select_yields=no
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -fr conftest*
10563   ol_cv_pthread_select_yields=yes
10564 fi
10565 rm -fr conftest*
10566 fi
10567
10568 fi
10569
10570 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10571
10572                                 if test $ol_cv_pthread_select_yields = cross ; then
10573                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10574                                 fi
10575
10576                                 if test $ol_cv_pthread_select_yields = yes ; then
10577                                         ol_with_yielding_select=yes
10578                                 fi
10579                         fi
10580
10581                                                 CPPFLAGS="$save_CPPFLAGS"
10582                         LIBS="$save_LIBS"
10583                 else
10584                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10585                 fi
10586         fi
10587
10588         if test $ol_with_threads = posix ; then
10589                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10590         fi
10591 fi
10592
10593 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10594         -o $ol_with_threads = mach ; then
10595
10596                 for ac_hdr in mach/cthreads.h
10597 do
10598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10600 echo "configure:10601: checking for $ac_hdr" >&5
10601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10602   echo $ac_n "(cached) $ac_c" 1>&6
10603 else
10604   cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607 #include <$ac_hdr>
10608 EOF
10609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10610 { (eval echo configure:10611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10612 if test -z "$ac_err"; then
10613   rm -rf conftest*
10614   eval "ac_cv_header_$ac_safe=yes"
10615 else
10616   echo "$ac_err" >&5
10617   echo "configure: failed program was:" >&5
10618   cat conftest.$ac_ext >&5
10619   rm -rf conftest*
10620   eval "ac_cv_header_$ac_safe=no"
10621 fi
10622 rm -f conftest*
10623 fi
10624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10625   echo "$ac_t""yes" 1>&6
10626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10627   cat >> confdefs.h <<EOF
10628 #define $ac_tr_hdr 1
10629 EOF
10630  
10631 else
10632   echo "$ac_t""no" 1>&6
10633 fi
10634 done
10635
10636         if test $ac_cv_header_mach_cthreads_h = yes ; then
10637                 ol_with_threads=found
10638
10639                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10640 echo "configure:10641: checking for cthread_fork" >&5
10641 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10642   echo $ac_n "(cached) $ac_c" 1>&6
10643 else
10644   cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647 /* System header to define __stub macros and hopefully few prototypes,
10648     which can conflict with char cthread_fork(); below.  */
10649 #include <assert.h>
10650 /* Override any gcc2 internal prototype to avoid an error.  */
10651 /* We use char because int might match the return type of a gcc2
10652     builtin and then its argument prototype would still apply.  */
10653 char cthread_fork();
10654 char (*f)();
10655
10656 int main() {
10657
10658 /* The GNU C library defines this for functions which it implements
10659     to always fail with ENOSYS.  Some functions are actually named
10660     something starting with __ and the normal name is an alias.  */
10661 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10662 choke me
10663 #else
10664 f = cthread_fork;
10665 #endif
10666
10667 ; return 0; }
10668 EOF
10669 if { (eval echo configure:10670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10670   rm -rf conftest*
10671   eval "ac_cv_func_cthread_fork=yes"
10672 else
10673   echo "configure: failed program was:" >&5
10674   cat conftest.$ac_ext >&5
10675   rm -rf conftest*
10676   eval "ac_cv_func_cthread_fork=no"
10677 fi
10678 rm -f conftest*
10679 fi
10680
10681 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10682   echo "$ac_t""yes" 1>&6
10683   ol_link_threads=yes
10684 else
10685   echo "$ac_t""no" 1>&6
10686 fi
10687
10688
10689                 if test $ol_link_threads = no ; then
10690                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10691 echo "configure:10692: checking for cthread_fork with -all_load" >&5
10692 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10693   echo $ac_n "(cached) $ac_c" 1>&6
10694 else
10695   
10696                                                                 save_LIBS="$LIBS"
10697                                 LIBS="-all_load $LIBS"
10698                                 cat > conftest.$ac_ext <<EOF
10699 #line 10700 "configure"
10700 #include "confdefs.h"
10701 #include <mach/cthreads.h>
10702 int main() {
10703
10704                                         cthread_fork((void *)0, (void *)0);
10705                                         
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10709   rm -rf conftest*
10710   ol_cv_cthread_all_load=yes
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   ol_cv_cthread_all_load=no
10716 fi
10717 rm -f conftest*
10718                                                                 LIBS="$save_LIBS"
10719                         
10720 fi
10721
10722 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10723
10724                         if test $ol_cv_cthread_all_load = yes ; then
10725                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10726                                 ol_link_threads=mach
10727                         fi
10728                 fi
10729
10730                 if test $ol_link_threads != no ; then
10731                         : check for cthread specific functionality here
10732                         cat >> confdefs.h <<\EOF
10733 #define HAVE_MACH_CTHREADS 1
10734 EOF
10735
10736                 else
10737                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10738                 fi
10739         fi
10740
10741         if test $ol_with_threads = mach ; then
10742                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10743         fi
10744 fi
10745
10746 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10747         -o $ol_with_threads = pth ; then
10748
10749         for ac_hdr in pth.h
10750 do
10751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10753 echo "configure:10754: checking for $ac_hdr" >&5
10754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760 #include <$ac_hdr>
10761 EOF
10762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10763 { (eval echo configure:10764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10765 if test -z "$ac_err"; then
10766   rm -rf conftest*
10767   eval "ac_cv_header_$ac_safe=yes"
10768 else
10769   echo "$ac_err" >&5
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -rf conftest*
10773   eval "ac_cv_header_$ac_safe=no"
10774 fi
10775 rm -f conftest*
10776 fi
10777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10778   echo "$ac_t""yes" 1>&6
10779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10780   cat >> confdefs.h <<EOF
10781 #define $ac_tr_hdr 1
10782 EOF
10783  
10784 else
10785   echo "$ac_t""no" 1>&6
10786 fi
10787 done
10788
10789
10790         if test $ac_cv_header_pth_h = yes ; then
10791                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10792 echo "configure:10793: checking for pth_version in -lpth" >&5
10793 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10795   echo $ac_n "(cached) $ac_c" 1>&6
10796 else
10797   ac_save_LIBS="$LIBS"
10798 LIBS="-lpth  $LIBS"
10799 cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802 /* Override any gcc2 internal prototype to avoid an error.  */
10803 /* We use char because int might match the return type of a gcc2
10804     builtin and then its argument prototype would still apply.  */
10805 char pth_version();
10806
10807 int main() {
10808 pth_version()
10809 ; return 0; }
10810 EOF
10811 if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10812   rm -rf conftest*
10813   eval "ac_cv_lib_$ac_lib_var=yes"
10814 else
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=no"
10819 fi
10820 rm -f conftest*
10821 LIBS="$ac_save_LIBS"
10822
10823 fi
10824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10825   echo "$ac_t""yes" 1>&6
10826   have_pth=yes
10827 else
10828   echo "$ac_t""no" 1>&6
10829 have_pth=no
10830 fi
10831
10832
10833                 if test $have_pth = yes ; then
10834                         cat >> confdefs.h <<\EOF
10835 #define HAVE_GNU_PTH 1
10836 EOF
10837
10838                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10839                         ol_link_threads=pth
10840
10841                         if test $ol_with_yielding_select = auto ; then
10842                                 ol_with_yielding_select=yes
10843                         fi
10844                 fi
10845         fi
10846 fi
10847
10848 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10849         -o $ol_with_threads = lwp ; then
10850
10851                 for ac_hdr in thread.h synch.h
10852 do
10853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10855 echo "configure:10856: checking for $ac_hdr" >&5
10856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   cat > conftest.$ac_ext <<EOF
10860 #line 10861 "configure"
10861 #include "confdefs.h"
10862 #include <$ac_hdr>
10863 EOF
10864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10865 { (eval echo configure:10866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10867 if test -z "$ac_err"; then
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=yes"
10870 else
10871   echo "$ac_err" >&5
10872   echo "configure: failed program was:" >&5
10873   cat conftest.$ac_ext >&5
10874   rm -rf conftest*
10875   eval "ac_cv_header_$ac_safe=no"
10876 fi
10877 rm -f conftest*
10878 fi
10879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10880   echo "$ac_t""yes" 1>&6
10881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10882   cat >> confdefs.h <<EOF
10883 #define $ac_tr_hdr 1
10884 EOF
10885  
10886 else
10887   echo "$ac_t""no" 1>&6
10888 fi
10889 done
10890
10891         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10892                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10893 echo "configure:10894: checking for thr_create in -lthread" >&5
10894 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10896   echo $ac_n "(cached) $ac_c" 1>&6
10897 else
10898   ac_save_LIBS="$LIBS"
10899 LIBS="-lthread  $LIBS"
10900 cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903 /* Override any gcc2 internal prototype to avoid an error.  */
10904 /* We use char because int might match the return type of a gcc2
10905     builtin and then its argument prototype would still apply.  */
10906 char thr_create();
10907
10908 int main() {
10909 thr_create()
10910 ; return 0; }
10911 EOF
10912 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10913   rm -rf conftest*
10914   eval "ac_cv_lib_$ac_lib_var=yes"
10915 else
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -rf conftest*
10919   eval "ac_cv_lib_$ac_lib_var=no"
10920 fi
10921 rm -f conftest*
10922 LIBS="$ac_save_LIBS"
10923
10924 fi
10925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10926   echo "$ac_t""yes" 1>&6
10927   have_thr=yes
10928 else
10929   echo "$ac_t""no" 1>&6
10930 have_thr=no
10931 fi
10932
10933
10934                 if test $have_thr = yes ; then
10935                         cat >> confdefs.h <<\EOF
10936 #define HAVE_THR 1
10937 EOF
10938
10939                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10940                         ol_link_threads=thr
10941
10942                         if test $ol_with_yielding_select = auto ; then
10943                                 ol_with_yielding_select=yes
10944                         fi
10945
10946                                                 for ac_func in \
10947                                 thr_setconcurrency \
10948                                 thr_getconcurrency \
10949                         
10950 do
10951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10952 echo "configure:10953: checking for $ac_func" >&5
10953 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10954   echo $ac_n "(cached) $ac_c" 1>&6
10955 else
10956   cat > conftest.$ac_ext <<EOF
10957 #line 10958 "configure"
10958 #include "confdefs.h"
10959 /* System header to define __stub macros and hopefully few prototypes,
10960     which can conflict with char $ac_func(); below.  */
10961 #include <assert.h>
10962 /* Override any gcc2 internal prototype to avoid an error.  */
10963 /* We use char because int might match the return type of a gcc2
10964     builtin and then its argument prototype would still apply.  */
10965 char $ac_func();
10966 char (*f)();
10967
10968 int main() {
10969
10970 /* The GNU C library defines this for functions which it implements
10971     to always fail with ENOSYS.  Some functions are actually named
10972     something starting with __ and the normal name is an alias.  */
10973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10974 choke me
10975 #else
10976 f = $ac_func;
10977 #endif
10978
10979 ; return 0; }
10980 EOF
10981 if { (eval echo configure:10982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10982   rm -rf conftest*
10983   eval "ac_cv_func_$ac_func=yes"
10984 else
10985   echo "configure: failed program was:" >&5
10986   cat conftest.$ac_ext >&5
10987   rm -rf conftest*
10988   eval "ac_cv_func_$ac_func=no"
10989 fi
10990 rm -f conftest*
10991 fi
10992
10993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10994   echo "$ac_t""yes" 1>&6
10995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10996   cat >> confdefs.h <<EOF
10997 #define $ac_tr_func 1
10998 EOF
10999  
11000 else
11001   echo "$ac_t""no" 1>&6
11002 fi
11003 done
11004
11005                 fi
11006         fi
11007
11008                 for ac_hdr in lwp/lwp.h
11009 do
11010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11012 echo "configure:11013: checking for $ac_hdr" >&5
11013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <$ac_hdr>
11020 EOF
11021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11022 { (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11024 if test -z "$ac_err"; then
11025   rm -rf conftest*
11026   eval "ac_cv_header_$ac_safe=yes"
11027 else
11028   echo "$ac_err" >&5
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=no"
11033 fi
11034 rm -f conftest*
11035 fi
11036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11037   echo "$ac_t""yes" 1>&6
11038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11039   cat >> confdefs.h <<EOF
11040 #define $ac_tr_hdr 1
11041 EOF
11042  
11043 else
11044   echo "$ac_t""no" 1>&6
11045 fi
11046 done
11047
11048         if test $ac_cv_header_lwp_lwp_h = yes ; then
11049                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11050 echo "configure:11051: checking for lwp_create in -llwp" >&5
11051 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11053   echo $ac_n "(cached) $ac_c" 1>&6
11054 else
11055   ac_save_LIBS="$LIBS"
11056 LIBS="-llwp  $LIBS"
11057 cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 /* Override any gcc2 internal prototype to avoid an error.  */
11061 /* We use char because int might match the return type of a gcc2
11062     builtin and then its argument prototype would still apply.  */
11063 char lwp_create();
11064
11065 int main() {
11066 lwp_create()
11067 ; return 0; }
11068 EOF
11069 if { (eval echo configure:11070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11070   rm -rf conftest*
11071   eval "ac_cv_lib_$ac_lib_var=yes"
11072 else
11073   echo "configure: failed program was:" >&5
11074   cat conftest.$ac_ext >&5
11075   rm -rf conftest*
11076   eval "ac_cv_lib_$ac_lib_var=no"
11077 fi
11078 rm -f conftest*
11079 LIBS="$ac_save_LIBS"
11080
11081 fi
11082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11083   echo "$ac_t""yes" 1>&6
11084   have_lwp=yes
11085 else
11086   echo "$ac_t""no" 1>&6
11087 have_lwp=no
11088 fi
11089
11090
11091                 if test $have_lwp = yes ; then
11092                         cat >> confdefs.h <<\EOF
11093 #define HAVE_LWP 1
11094 EOF
11095
11096                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11097                         ol_link_threads=lwp
11098
11099                         if test $ol_with_yielding_select = auto ; then
11100                                 ol_with_yielding_select=no
11101                         fi
11102                 fi
11103         fi
11104 fi
11105
11106 if test $ol_with_yielding_select = yes ; then
11107         cat >> confdefs.h <<\EOF
11108 #define HAVE_YIELDING_SELECT 1
11109 EOF
11110
11111 fi
11112
11113 if test $ol_with_threads = manual ; then
11114                 ol_link_threads=yes
11115
11116         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11117
11118         for ac_hdr in pthread.h sched.h
11119 do
11120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11122 echo "configure:11123: checking for $ac_hdr" >&5
11123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11124   echo $ac_n "(cached) $ac_c" 1>&6
11125 else
11126   cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include <$ac_hdr>
11130 EOF
11131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11132 { (eval echo configure:11133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11134 if test -z "$ac_err"; then
11135   rm -rf conftest*
11136   eval "ac_cv_header_$ac_safe=yes"
11137 else
11138   echo "$ac_err" >&5
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   eval "ac_cv_header_$ac_safe=no"
11143 fi
11144 rm -f conftest*
11145 fi
11146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11149   cat >> confdefs.h <<EOF
11150 #define $ac_tr_hdr 1
11151 EOF
11152  
11153 else
11154   echo "$ac_t""no" 1>&6
11155 fi
11156 done
11157
11158         for ac_func in sched_yield pthread_yield
11159 do
11160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11161 echo "configure:11162: checking for $ac_func" >&5
11162 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11163   echo $ac_n "(cached) $ac_c" 1>&6
11164 else
11165   cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 /* System header to define __stub macros and hopefully few prototypes,
11169     which can conflict with char $ac_func(); below.  */
11170 #include <assert.h>
11171 /* Override any gcc2 internal prototype to avoid an error.  */
11172 /* We use char because int might match the return type of a gcc2
11173     builtin and then its argument prototype would still apply.  */
11174 char $ac_func();
11175 char (*f)();
11176
11177 int main() {
11178
11179 /* The GNU C library defines this for functions which it implements
11180     to always fail with ENOSYS.  Some functions are actually named
11181     something starting with __ and the normal name is an alias.  */
11182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11183 choke me
11184 #else
11185 f = $ac_func;
11186 #endif
11187
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11191   rm -rf conftest*
11192   eval "ac_cv_func_$ac_func=yes"
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   eval "ac_cv_func_$ac_func=no"
11198 fi
11199 rm -f conftest*
11200 fi
11201
11202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11203   echo "$ac_t""yes" 1>&6
11204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11205   cat >> confdefs.h <<EOF
11206 #define $ac_tr_func 1
11207 EOF
11208  
11209 else
11210   echo "$ac_t""no" 1>&6
11211 fi
11212 done
11213
11214         
11215         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11216 echo "configure:11217: checking for LinuxThreads pthread.h" >&5
11217 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   cat > conftest.$ac_ext <<EOF
11221 #line 11222 "configure"
11222 #include "confdefs.h"
11223 #include <pthread.h>
11224 EOF
11225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11226   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11227   rm -rf conftest*
11228   ol_cv_header_linux_threads=yes
11229 else
11230   rm -rf conftest*
11231   ol_cv_header_linux_threads=no
11232 fi
11233 rm -f conftest*
11234
11235                 
11236 fi
11237
11238 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11239         if test $ol_cv_header_linux_threads = yes; then
11240                 cat >> confdefs.h <<\EOF
11241 #define HAVE_LINUX_THREADS 1
11242 EOF
11243
11244         fi
11245
11246
11247         for ac_hdr in mach/cthreads.h
11248 do
11249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11251 echo "configure:11252: checking for $ac_hdr" >&5
11252 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 #include <$ac_hdr>
11259 EOF
11260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11261 { (eval echo configure:11262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11263 if test -z "$ac_err"; then
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=yes"
11266 else
11267   echo "$ac_err" >&5
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_header_$ac_safe=no"
11272 fi
11273 rm -f conftest*
11274 fi
11275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11276   echo "$ac_t""yes" 1>&6
11277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11278   cat >> confdefs.h <<EOF
11279 #define $ac_tr_hdr 1
11280 EOF
11281  
11282 else
11283   echo "$ac_t""no" 1>&6
11284 fi
11285 done
11286
11287         for ac_hdr in lwp/lwp.h
11288 do
11289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11291 echo "configure:11292: checking for $ac_hdr" >&5
11292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298 #include <$ac_hdr>
11299 EOF
11300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11301 { (eval echo configure:11302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11303 if test -z "$ac_err"; then
11304   rm -rf conftest*
11305   eval "ac_cv_header_$ac_safe=yes"
11306 else
11307   echo "$ac_err" >&5
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   eval "ac_cv_header_$ac_safe=no"
11312 fi
11313 rm -f conftest*
11314 fi
11315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11318   cat >> confdefs.h <<EOF
11319 #define $ac_tr_hdr 1
11320 EOF
11321  
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325 done
11326
11327         for ac_hdr in thread.h synch.h
11328 do
11329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11331 echo "configure:11332: checking for $ac_hdr" >&5
11332 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11333   echo $ac_n "(cached) $ac_c" 1>&6
11334 else
11335   cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338 #include <$ac_hdr>
11339 EOF
11340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11341 { (eval echo configure:11342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11343 if test -z "$ac_err"; then
11344   rm -rf conftest*
11345   eval "ac_cv_header_$ac_safe=yes"
11346 else
11347   echo "$ac_err" >&5
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=no"
11352 fi
11353 rm -f conftest*
11354 fi
11355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11356   echo "$ac_t""yes" 1>&6
11357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11358   cat >> confdefs.h <<EOF
11359 #define $ac_tr_hdr 1
11360 EOF
11361  
11362 else
11363   echo "$ac_t""no" 1>&6
11364 fi
11365 done
11366
11367 fi
11368
11369 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11370                         cat >> confdefs.h <<\EOF
11371 #define REENTRANT 1
11372 EOF
11373
11374         cat >> confdefs.h <<\EOF
11375 #define _REENTRANT 1
11376 EOF
11377
11378         cat >> confdefs.h <<\EOF
11379 #define THREAD_SAFE 1
11380 EOF
11381
11382         cat >> confdefs.h <<\EOF
11383 #define _THREAD_SAFE 1
11384 EOF
11385
11386         cat >> confdefs.h <<\EOF
11387 #define THREADSAFE 1
11388 EOF
11389
11390         cat >> confdefs.h <<\EOF
11391 #define _THREADSAFE 1
11392 EOF
11393
11394         cat >> confdefs.h <<\EOF
11395 #define _SGI_MP_SOURCE 1
11396 EOF
11397
11398
11399                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11400 echo "configure:11401: checking for thread specific errno" >&5
11401 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11402   echo $ac_n "(cached) $ac_c" 1>&6
11403 else
11404   
11405                 cat > conftest.$ac_ext <<EOF
11406 #line 11407 "configure"
11407 #include "confdefs.h"
11408 #include <errno.h>
11409 int main() {
11410 errno = 0;
11411 ; return 0; }
11412 EOF
11413 if { (eval echo configure:11414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11414   rm -rf conftest*
11415   ol_cv_errno_thread_specific=yes
11416 else
11417   echo "configure: failed program was:" >&5
11418   cat conftest.$ac_ext >&5
11419   rm -rf conftest*
11420   ol_cv_errno_thread_specific=no
11421 fi
11422 rm -f conftest*
11423         
11424 fi
11425
11426 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11427
11428                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11429 echo "configure:11430: checking for thread specific h_errno" >&5
11430 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   
11434                 cat > conftest.$ac_ext <<EOF
11435 #line 11436 "configure"
11436 #include "confdefs.h"
11437 #include <netdb.h>
11438 int main() {
11439 h_errno = 0;
11440 ; return 0; }
11441 EOF
11442 if { (eval echo configure:11443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11443   rm -rf conftest*
11444   ol_cv_h_errno_thread_specific=yes
11445 else
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   ol_cv_h_errno_thread_specific=no
11450 fi
11451 rm -f conftest*
11452         
11453 fi
11454
11455 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11456
11457         if test $ol_cv_errno_thread_specific != yes \
11458                 -o $ol_cv_h_errno_thread_specific != yes ; then
11459                 LIBS="$LTHREAD_LIBS $LIBS"
11460                 LTHREAD_LIBS=""
11461         fi
11462
11463 fi  
11464
11465 if test $ol_link_threads = no ; then
11466         if test $ol_with_threads = yes ; then
11467                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11468         fi
11469
11470         if test $ol_with_threads = auto ; then
11471                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11472                 ol_with_threads=no
11473         fi
11474
11475         cat >> confdefs.h <<\EOF
11476 #define NO_THREADS 1
11477 EOF
11478
11479         LTHREAD_LIBS=""
11480 fi
11481
11482 if test $ol_link_threads != no ; then
11483         cat >> confdefs.h <<\EOF
11484 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11485 EOF
11486
11487 fi
11488
11489 ol_link_ldbm=no 
11490
11491 if test $ol_with_ldbm_api = auto \
11492         -o $ol_with_ldbm_api = berkeley \
11493         -o $ol_with_ldbm_api = bcompat ; then
11494
11495         if test $ol_with_ldbm_api = bcompat; then \
11496                 ol_cv_berkeley_db=no
11497 for ac_hdr in db_185.h db.h
11498 do
11499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11501 echo "configure:11502: checking for $ac_hdr" >&5
11502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <$ac_hdr>
11509 EOF
11510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11511 { (eval echo configure:11512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11513 if test -z "$ac_err"; then
11514   rm -rf conftest*
11515   eval "ac_cv_header_$ac_safe=yes"
11516 else
11517   echo "$ac_err" >&5
11518   echo "configure: failed program was:" >&5
11519   cat conftest.$ac_ext >&5
11520   rm -rf conftest*
11521   eval "ac_cv_header_$ac_safe=no"
11522 fi
11523 rm -f conftest*
11524 fi
11525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11526   echo "$ac_t""yes" 1>&6
11527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11528   cat >> confdefs.h <<EOF
11529 #define $ac_tr_hdr 1
11530 EOF
11531  
11532 else
11533   echo "$ac_t""no" 1>&6
11534 fi
11535 done
11536
11537 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11538         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11539 echo "configure:11540: checking if Berkeley DB header compatibility" >&5
11540 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   
11544                 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547
11548 #if HAVE_DB_185_H
11549 #       include <db_185.h>
11550 #else
11551 #       include <db.h>
11552 #endif
11553
11554  /* this check could be improved */
11555 #ifndef DB_VERSION_MAJOR
11556 #       define DB_VERSION_MAJOR 1
11557 #endif
11558
11559 #if DB_VERSION_MAJOR == 1 
11560         __db_version_1
11561 #endif
11562
11563 EOF
11564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11565   egrep "__db_version_1" >/dev/null 2>&1; then
11566   rm -rf conftest*
11567   ol_cv_header_db1=yes
11568 else
11569   rm -rf conftest*
11570   ol_cv_header_db1=no
11571 fi
11572 rm -f conftest*
11573
11574 fi
11575
11576 echo "$ac_t""$ol_cv_header_db1" 1>&6
11577
11578         if test ol_cv_header_db1=yes ; then
11579                 ol_cv_lib_db=no
11580 if test $ol_cv_lib_db = no ; then
11581         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11582 echo "configure:11583: checking for Berkeley DB link (default)" >&5
11583 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   
11587         ol_DB_LIB=
11588         ol_LIBS=$LIBS
11589         LIBS="$ol_DB_LIB $LIBS"
11590
11591         cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594
11595 #ifdef HAVE_DB_185_H
11596 # include <db_185.h>
11597 #else
11598 # include <db.h>
11599 #endif
11600
11601 #ifndef DB_VERSION_MAJOR
11602 # define DB_VERSION_MAJOR 1
11603 #endif
11604
11605 #ifndef NULL
11606 #define NULL ((void*)0)
11607 #endif
11608
11609 int main() {
11610
11611 #if DB_VERSION_MAJOR > 2
11612         db_env_create( NULL, 0 );
11613 #elif DB_VERSION_MAJOR > 1
11614         db_appexit( NULL );
11615 #else
11616         (void) dbopen( NULL, 0, 0, 0, NULL);
11617 #endif
11618
11619 ; return 0; }
11620 EOF
11621 if { (eval echo configure:11622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11622   rm -rf conftest*
11623   ol_cv_db_none=yes
11624 else
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   ol_cv_db_none=no
11629 fi
11630 rm -f conftest*
11631
11632         LIBS="$ol_LIBS"
11633
11634 fi
11635
11636 echo "$ac_t""$ol_cv_db_none" 1>&6
11637
11638         if test $ol_cv_db_none = yes ; then
11639                 ol_cv_lib_db=yes
11640         fi
11641 fi
11642
11643 if test $ol_cv_lib_db = no ; then
11644         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11645 echo "configure:11646: checking for Berkeley DB link (-ldb)" >&5
11646 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11647   echo $ac_n "(cached) $ac_c" 1>&6
11648 else
11649   
11650         ol_DB_LIB=-ldb
11651         ol_LIBS=$LIBS
11652         LIBS="$ol_DB_LIB $LIBS"
11653
11654         cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657
11658 #ifdef HAVE_DB_185_H
11659 # include <db_185.h>
11660 #else
11661 # include <db.h>
11662 #endif
11663
11664 #ifndef DB_VERSION_MAJOR
11665 # define DB_VERSION_MAJOR 1
11666 #endif
11667
11668 #ifndef NULL
11669 #define NULL ((void*)0)
11670 #endif
11671
11672 int main() {
11673
11674 #if DB_VERSION_MAJOR > 2
11675         db_env_create( NULL, 0 );
11676 #elif DB_VERSION_MAJOR > 1
11677         db_appexit( NULL );
11678 #else
11679         (void) dbopen( NULL, 0, 0, 0, NULL);
11680 #endif
11681
11682 ; return 0; }
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11685   rm -rf conftest*
11686   ol_cv_db_db=yes
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -rf conftest*
11691   ol_cv_db_db=no
11692 fi
11693 rm -f conftest*
11694
11695         LIBS="$ol_LIBS"
11696
11697 fi
11698
11699 echo "$ac_t""$ol_cv_db_db" 1>&6
11700
11701         if test $ol_cv_db_db = yes ; then
11702                 ol_cv_lib_db=-ldb
11703         fi
11704 fi
11705
11706 if test $ol_cv_lib_db = no ; then
11707         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11708 echo "configure:11709: checking for Berkeley DB link (-ldb3)" >&5
11709 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11710   echo $ac_n "(cached) $ac_c" 1>&6
11711 else
11712   
11713         ol_DB_LIB=-ldb3
11714         ol_LIBS=$LIBS
11715         LIBS="$ol_DB_LIB $LIBS"
11716
11717         cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720
11721 #ifdef HAVE_DB_185_H
11722 # include <db_185.h>
11723 #else
11724 # include <db.h>
11725 #endif
11726
11727 #ifndef DB_VERSION_MAJOR
11728 # define DB_VERSION_MAJOR 1
11729 #endif
11730
11731 #ifndef NULL
11732 #define NULL ((void*)0)
11733 #endif
11734
11735 int main() {
11736
11737 #if DB_VERSION_MAJOR > 2
11738         db_env_create( NULL, 0 );
11739 #elif DB_VERSION_MAJOR > 1
11740         db_appexit( NULL );
11741 #else
11742         (void) dbopen( NULL, 0, 0, 0, NULL);
11743 #endif
11744
11745 ; return 0; }
11746 EOF
11747 if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11748   rm -rf conftest*
11749   ol_cv_db_db3=yes
11750 else
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   ol_cv_db_db3=no
11755 fi
11756 rm -f conftest*
11757
11758         LIBS="$ol_LIBS"
11759
11760 fi
11761
11762 echo "$ac_t""$ol_cv_db_db3" 1>&6
11763
11764         if test $ol_cv_db_db3 = yes ; then
11765                 ol_cv_lib_db=-ldb3
11766         fi
11767 fi
11768
11769 if test $ol_cv_lib_db = no ; then
11770         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11771 echo "configure:11772: checking for Berkeley DB link (-ldb2)" >&5
11772 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   
11776         ol_DB_LIB=-ldb2
11777         ol_LIBS=$LIBS
11778         LIBS="$ol_DB_LIB $LIBS"
11779
11780         cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783
11784 #ifdef HAVE_DB_185_H
11785 # include <db_185.h>
11786 #else
11787 # include <db.h>
11788 #endif
11789
11790 #ifndef DB_VERSION_MAJOR
11791 # define DB_VERSION_MAJOR 1
11792 #endif
11793
11794 #ifndef NULL
11795 #define NULL ((void*)0)
11796 #endif
11797
11798 int main() {
11799
11800 #if DB_VERSION_MAJOR > 2
11801         db_env_create( NULL, 0 );
11802 #elif DB_VERSION_MAJOR > 1
11803         db_appexit( NULL );
11804 #else
11805         (void) dbopen( NULL, 0, 0, 0, NULL);
11806 #endif
11807
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11811   rm -rf conftest*
11812   ol_cv_db_db2=yes
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   ol_cv_db_db2=no
11818 fi
11819 rm -f conftest*
11820
11821         LIBS="$ol_LIBS"
11822
11823 fi
11824
11825 echo "$ac_t""$ol_cv_db_db2" 1>&6
11826
11827         if test $ol_cv_db_db2 = yes ; then
11828                 ol_cv_lib_db=-ldb2
11829         fi
11830 fi
11831
11832 if test $ol_cv_lib_db = no ; then
11833         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11834 echo "configure:11835: checking for Berkeley DB link (-ldb1)" >&5
11835 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11836   echo $ac_n "(cached) $ac_c" 1>&6
11837 else
11838   
11839         ol_DB_LIB=-ldb1
11840         ol_LIBS=$LIBS
11841         LIBS="$ol_DB_LIB $LIBS"
11842
11843         cat > conftest.$ac_ext <<EOF
11844 #line 11845 "configure"
11845 #include "confdefs.h"
11846
11847 #ifdef HAVE_DB_185_H
11848 # include <db_185.h>
11849 #else
11850 # include <db.h>
11851 #endif
11852
11853 #ifndef DB_VERSION_MAJOR
11854 # define DB_VERSION_MAJOR 1
11855 #endif
11856
11857 #ifndef NULL
11858 #define NULL ((void*)0)
11859 #endif
11860
11861 int main() {
11862
11863 #if DB_VERSION_MAJOR > 2
11864         db_env_create( NULL, 0 );
11865 #elif DB_VERSION_MAJOR > 1
11866         db_appexit( NULL );
11867 #else
11868         (void) dbopen( NULL, 0, 0, 0, NULL);
11869 #endif
11870
11871 ; return 0; }
11872 EOF
11873 if { (eval echo configure:11874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11874   rm -rf conftest*
11875   ol_cv_db_db1=yes
11876 else
11877   echo "configure: failed program was:" >&5
11878   cat conftest.$ac_ext >&5
11879   rm -rf conftest*
11880   ol_cv_db_db1=no
11881 fi
11882 rm -f conftest*
11883
11884         LIBS="$ol_LIBS"
11885
11886 fi
11887
11888 echo "$ac_t""$ol_cv_db_db1" 1>&6
11889
11890         if test $ol_cv_db_db1 = yes ; then
11891                 ol_cv_lib_db=-ldb1
11892         fi
11893 fi
11894
11895
11896                 if test "$ol_cv_lib_db" != no ; then
11897                         ol_cv_berkeley_db=yes
11898                 fi
11899         fi
11900 fi
11901
11902         else
11903                 ol_cv_berkeley_db=no
11904 for ac_hdr in db.h
11905 do
11906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11908 echo "configure:11909: checking for $ac_hdr" >&5
11909 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11910   echo $ac_n "(cached) $ac_c" 1>&6
11911 else
11912   cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 #include <$ac_hdr>
11916 EOF
11917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11918 { (eval echo configure:11919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11920 if test -z "$ac_err"; then
11921   rm -rf conftest*
11922   eval "ac_cv_header_$ac_safe=yes"
11923 else
11924   echo "$ac_err" >&5
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -rf conftest*
11928   eval "ac_cv_header_$ac_safe=no"
11929 fi
11930 rm -f conftest*
11931 fi
11932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11933   echo "$ac_t""yes" 1>&6
11934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11935   cat >> confdefs.h <<EOF
11936 #define $ac_tr_hdr 1
11937 EOF
11938  
11939 else
11940   echo "$ac_t""no" 1>&6
11941 fi
11942 done
11943
11944 if test $ac_cv_header_db_h = yes; then
11945         ol_cv_lib_db=no
11946 if test $ol_cv_lib_db = no ; then
11947         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11948 echo "configure:11949: checking for Berkeley DB link (default)" >&5
11949 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   
11953         ol_DB_LIB=
11954         ol_LIBS=$LIBS
11955         LIBS="$ol_DB_LIB $LIBS"
11956
11957         cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960
11961 #ifdef HAVE_DB_185_H
11962 # include <db_185.h>
11963 #else
11964 # include <db.h>
11965 #endif
11966
11967 #ifndef DB_VERSION_MAJOR
11968 # define DB_VERSION_MAJOR 1
11969 #endif
11970
11971 #ifndef NULL
11972 #define NULL ((void*)0)
11973 #endif
11974
11975 int main() {
11976
11977 #if DB_VERSION_MAJOR > 2
11978         db_env_create( NULL, 0 );
11979 #elif DB_VERSION_MAJOR > 1
11980         db_appexit( NULL );
11981 #else
11982         (void) dbopen( NULL, 0, 0, 0, NULL);
11983 #endif
11984
11985 ; return 0; }
11986 EOF
11987 if { (eval echo configure:11988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11988   rm -rf conftest*
11989   ol_cv_db_none=yes
11990 else
11991   echo "configure: failed program was:" >&5
11992   cat conftest.$ac_ext >&5
11993   rm -rf conftest*
11994   ol_cv_db_none=no
11995 fi
11996 rm -f conftest*
11997
11998         LIBS="$ol_LIBS"
11999
12000 fi
12001
12002 echo "$ac_t""$ol_cv_db_none" 1>&6
12003
12004         if test $ol_cv_db_none = yes ; then
12005                 ol_cv_lib_db=yes
12006         fi
12007 fi
12008
12009 if test $ol_cv_lib_db = no ; then
12010         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12011 echo "configure:12012: checking for Berkeley DB link (-ldb)" >&5
12012 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   
12016         ol_DB_LIB=-ldb
12017         ol_LIBS=$LIBS
12018         LIBS="$ol_DB_LIB $LIBS"
12019
12020         cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023
12024 #ifdef HAVE_DB_185_H
12025 # include <db_185.h>
12026 #else
12027 # include <db.h>
12028 #endif
12029
12030 #ifndef DB_VERSION_MAJOR
12031 # define DB_VERSION_MAJOR 1
12032 #endif
12033
12034 #ifndef NULL
12035 #define NULL ((void*)0)
12036 #endif
12037
12038 int main() {
12039
12040 #if DB_VERSION_MAJOR > 2
12041         db_env_create( NULL, 0 );
12042 #elif DB_VERSION_MAJOR > 1
12043         db_appexit( NULL );
12044 #else
12045         (void) dbopen( NULL, 0, 0, 0, NULL);
12046 #endif
12047
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   ol_cv_db_db=yes
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   ol_cv_db_db=no
12058 fi
12059 rm -f conftest*
12060
12061         LIBS="$ol_LIBS"
12062
12063 fi
12064
12065 echo "$ac_t""$ol_cv_db_db" 1>&6
12066
12067         if test $ol_cv_db_db = yes ; then
12068                 ol_cv_lib_db=-ldb
12069         fi
12070 fi
12071
12072 if test $ol_cv_lib_db = no ; then
12073         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12074 echo "configure:12075: checking for Berkeley DB link (-ldb3)" >&5
12075 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12076   echo $ac_n "(cached) $ac_c" 1>&6
12077 else
12078   
12079         ol_DB_LIB=-ldb3
12080         ol_LIBS=$LIBS
12081         LIBS="$ol_DB_LIB $LIBS"
12082
12083         cat > conftest.$ac_ext <<EOF
12084 #line 12085 "configure"
12085 #include "confdefs.h"
12086
12087 #ifdef HAVE_DB_185_H
12088 # include <db_185.h>
12089 #else
12090 # include <db.h>
12091 #endif
12092
12093 #ifndef DB_VERSION_MAJOR
12094 # define DB_VERSION_MAJOR 1
12095 #endif
12096
12097 #ifndef NULL
12098 #define NULL ((void*)0)
12099 #endif
12100
12101 int main() {
12102
12103 #if DB_VERSION_MAJOR > 2
12104         db_env_create( NULL, 0 );
12105 #elif DB_VERSION_MAJOR > 1
12106         db_appexit( NULL );
12107 #else
12108         (void) dbopen( NULL, 0, 0, 0, NULL);
12109 #endif
12110
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   ol_cv_db_db3=yes
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   ol_cv_db_db3=no
12121 fi
12122 rm -f conftest*
12123
12124         LIBS="$ol_LIBS"
12125
12126 fi
12127
12128 echo "$ac_t""$ol_cv_db_db3" 1>&6
12129
12130         if test $ol_cv_db_db3 = yes ; then
12131                 ol_cv_lib_db=-ldb3
12132         fi
12133 fi
12134
12135 if test $ol_cv_lib_db = no ; then
12136         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12137 echo "configure:12138: checking for Berkeley DB link (-ldb2)" >&5
12138 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141   
12142         ol_DB_LIB=-ldb2
12143         ol_LIBS=$LIBS
12144         LIBS="$ol_DB_LIB $LIBS"
12145
12146         cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149
12150 #ifdef HAVE_DB_185_H
12151 # include <db_185.h>
12152 #else
12153 # include <db.h>
12154 #endif
12155
12156 #ifndef DB_VERSION_MAJOR
12157 # define DB_VERSION_MAJOR 1
12158 #endif
12159
12160 #ifndef NULL
12161 #define NULL ((void*)0)
12162 #endif
12163
12164 int main() {
12165
12166 #if DB_VERSION_MAJOR > 2
12167         db_env_create( NULL, 0 );
12168 #elif DB_VERSION_MAJOR > 1
12169         db_appexit( NULL );
12170 #else
12171         (void) dbopen( NULL, 0, 0, 0, NULL);
12172 #endif
12173
12174 ; return 0; }
12175 EOF
12176 if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12177   rm -rf conftest*
12178   ol_cv_db_db2=yes
12179 else
12180   echo "configure: failed program was:" >&5
12181   cat conftest.$ac_ext >&5
12182   rm -rf conftest*
12183   ol_cv_db_db2=no
12184 fi
12185 rm -f conftest*
12186
12187         LIBS="$ol_LIBS"
12188
12189 fi
12190
12191 echo "$ac_t""$ol_cv_db_db2" 1>&6
12192
12193         if test $ol_cv_db_db2 = yes ; then
12194                 ol_cv_lib_db=-ldb2
12195         fi
12196 fi
12197
12198 if test $ol_cv_lib_db = no ; then
12199         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12200 echo "configure:12201: checking for Berkeley DB link (-ldb1)" >&5
12201 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12202   echo $ac_n "(cached) $ac_c" 1>&6
12203 else
12204   
12205         ol_DB_LIB=-ldb1
12206         ol_LIBS=$LIBS
12207         LIBS="$ol_DB_LIB $LIBS"
12208
12209         cat > conftest.$ac_ext <<EOF
12210 #line 12211 "configure"
12211 #include "confdefs.h"
12212
12213 #ifdef HAVE_DB_185_H
12214 # include <db_185.h>
12215 #else
12216 # include <db.h>
12217 #endif
12218
12219 #ifndef DB_VERSION_MAJOR
12220 # define DB_VERSION_MAJOR 1
12221 #endif
12222
12223 #ifndef NULL
12224 #define NULL ((void*)0)
12225 #endif
12226
12227 int main() {
12228
12229 #if DB_VERSION_MAJOR > 2
12230         db_env_create( NULL, 0 );
12231 #elif DB_VERSION_MAJOR > 1
12232         db_appexit( NULL );
12233 #else
12234         (void) dbopen( NULL, 0, 0, 0, NULL);
12235 #endif
12236
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   ol_cv_db_db1=yes
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   ol_cv_db_db1=no
12247 fi
12248 rm -f conftest*
12249
12250         LIBS="$ol_LIBS"
12251
12252 fi
12253
12254 echo "$ac_t""$ol_cv_db_db1" 1>&6
12255
12256         if test $ol_cv_db_db1 = yes ; then
12257                 ol_cv_lib_db=-ldb1
12258         fi
12259 fi
12260
12261
12262         if test "$ol_cv_lib_db" != no ; then
12263                 ol_cv_berkeley_db=yes
12264                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12265 echo "configure:12266: checking for Berkeley DB thread support" >&5
12266 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12267   echo $ac_n "(cached) $ac_c" 1>&6
12268 else
12269   
12270         ol_LIBS="$LIBS"
12271         if test $ol_cv_lib_db != yes ; then
12272                 LIBS="$ol_cv_lib_db"
12273         fi
12274
12275         if test "$cross_compiling" = yes; then
12276   ol_cv_berkeley_db_thread=cross
12277 else
12278   cat > conftest.$ac_ext <<EOF
12279 #line 12280 "configure"
12280 #include "confdefs.h"
12281
12282 #ifdef HAVE_DB_185_H
12283         choke me;
12284 #else
12285 #include <db.h>
12286 #endif
12287 #ifndef NULL
12288 #define NULL ((void *)0)
12289 #endif
12290 main()
12291 {
12292         int rc;
12293         u_int32_t flags = DB_CREATE | DB_THREAD;
12294
12295 #if DB_VERSION_MAJOR > 2
12296         DB_ENV *env = NULL;
12297
12298         rc = db_env_create( &env, 0 );
12299
12300         if( rc == 0 ) {
12301 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12302                 rc = env->open( env, NULL, flags, 0 );
12303 #else
12304                 rc = env->open( env, NULL, NULL, flags, 0 );
12305 #endif
12306         }
12307
12308 #else
12309         DB_ENV env;
12310         memset( &env, '\0', sizeof(env) );
12311
12312         rc = db_appinit( NULL, NULL, &env, flags );
12313
12314         if( rc == 0 ) {
12315                 db_appexit( &env );
12316         }
12317 #endif
12318 #if DB_VERSION_MAJOR > 2
12319 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12320         env->remove( env, NULL, DB_FORCE);
12321 #else
12322         env->remove( env, NULL, NULL, DB_FORCE);
12323 #endif
12324 #endif
12325
12326         return rc;
12327 }
12328 EOF
12329 if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12330 then
12331   ol_cv_berkeley_db_thread=yes
12332 else
12333   echo "configure: failed program was:" >&5
12334   cat conftest.$ac_ext >&5
12335   rm -fr conftest*
12336   ol_cv_berkeley_db_thread=no
12337 fi
12338 rm -fr conftest*
12339 fi
12340
12341
12342         LIBS="$ol_LIBS"
12343
12344         if test $ol_cv_berkeley_db_thread != no ; then
12345                 cat >> confdefs.h <<\EOF
12346 #define HAVE_BERKELEY_DB_THREAD 1
12347 EOF
12348
12349         fi
12350
12351 fi
12352
12353 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12354         fi
12355 fi
12356
12357         fi
12358
12359         if test $ol_cv_berkeley_db != no ; then
12360                 cat >> confdefs.h <<\EOF
12361 #define HAVE_BERKELEY_DB 1
12362 EOF
12363
12364
12365                 ol_link_ldbm=berkeley
12366                 ol_with_ldbm_api=db
12367
12368                 if test $ol_with_ldbm_type = hash ; then
12369                         cat >> confdefs.h <<\EOF
12370 #define LDBM_USE_DBHASH 1
12371 EOF
12372
12373                 else
12374                         cat >> confdefs.h <<\EOF
12375 #define LDBM_USE_DBBTREE 1
12376 EOF
12377
12378                 fi
12379
12380                                                 if test $ol_cv_lib_db != yes ; then
12381                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12382                 fi
12383         fi
12384 fi
12385
12386 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12387         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12388         ol_with_ldbm_api=none
12389 fi
12390
12391 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12392         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12393 echo "configure:12394: checking for MDBM library" >&5
12394 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12395   echo $ac_n "(cached) $ac_c" 1>&6
12396 else
12397         ol_LIBS="$LIBS"
12398         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12399 echo "configure:12400: checking for mdbm_set_chain" >&5
12400 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12401   echo $ac_n "(cached) $ac_c" 1>&6
12402 else
12403   cat > conftest.$ac_ext <<EOF
12404 #line 12405 "configure"
12405 #include "confdefs.h"
12406 /* System header to define __stub macros and hopefully few prototypes,
12407     which can conflict with char mdbm_set_chain(); below.  */
12408 #include <assert.h>
12409 /* Override any gcc2 internal prototype to avoid an error.  */
12410 /* We use char because int might match the return type of a gcc2
12411     builtin and then its argument prototype would still apply.  */
12412 char mdbm_set_chain();
12413 char (*f)();
12414
12415 int main() {
12416
12417 /* The GNU C library defines this for functions which it implements
12418     to always fail with ENOSYS.  Some functions are actually named
12419     something starting with __ and the normal name is an alias.  */
12420 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12421 choke me
12422 #else
12423 f = mdbm_set_chain;
12424 #endif
12425
12426 ; return 0; }
12427 EOF
12428 if { (eval echo configure:12429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12429   rm -rf conftest*
12430   eval "ac_cv_func_mdbm_set_chain=yes"
12431 else
12432   echo "configure: failed program was:" >&5
12433   cat conftest.$ac_ext >&5
12434   rm -rf conftest*
12435   eval "ac_cv_func_mdbm_set_chain=no"
12436 fi
12437 rm -f conftest*
12438 fi
12439
12440 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12441   echo "$ac_t""yes" 1>&6
12442   ol_cv_lib_mdbm=yes
12443 else
12444   echo "$ac_t""no" 1>&6
12445
12446                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12447 echo "configure:12448: checking for mdbm_set_chain in -lmdbm" >&5
12448 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12450   echo $ac_n "(cached) $ac_c" 1>&6
12451 else
12452   ac_save_LIBS="$LIBS"
12453 LIBS="-lmdbm  $LIBS"
12454 cat > conftest.$ac_ext <<EOF
12455 #line 12456 "configure"
12456 #include "confdefs.h"
12457 /* Override any gcc2 internal prototype to avoid an error.  */
12458 /* We use char because int might match the return type of a gcc2
12459     builtin and then its argument prototype would still apply.  */
12460 char mdbm_set_chain();
12461
12462 int main() {
12463 mdbm_set_chain()
12464 ; return 0; }
12465 EOF
12466 if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12467   rm -rf conftest*
12468   eval "ac_cv_lib_$ac_lib_var=yes"
12469 else
12470   echo "configure: failed program was:" >&5
12471   cat conftest.$ac_ext >&5
12472   rm -rf conftest*
12473   eval "ac_cv_lib_$ac_lib_var=no"
12474 fi
12475 rm -f conftest*
12476 LIBS="$ac_save_LIBS"
12477
12478 fi
12479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12480   echo "$ac_t""yes" 1>&6
12481   ol_cv_lib_mdbm=-lmdbm
12482 else
12483   echo "$ac_t""no" 1>&6
12484 ol_cv_lib_mdbm=no
12485 fi
12486
12487         
12488 fi
12489
12490         LIBS="$ol_LIBS"
12491
12492 fi
12493
12494 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12495
12496
12497  for ac_hdr in mdbm.h
12498 do
12499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12501 echo "configure:12502: checking for $ac_hdr" >&5
12502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12503   echo $ac_n "(cached) $ac_c" 1>&6
12504 else
12505   cat > conftest.$ac_ext <<EOF
12506 #line 12507 "configure"
12507 #include "confdefs.h"
12508 #include <$ac_hdr>
12509 EOF
12510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12511 { (eval echo configure:12512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12513 if test -z "$ac_err"; then
12514   rm -rf conftest*
12515   eval "ac_cv_header_$ac_safe=yes"
12516 else
12517   echo "$ac_err" >&5
12518   echo "configure: failed program was:" >&5
12519   cat conftest.$ac_ext >&5
12520   rm -rf conftest*
12521   eval "ac_cv_header_$ac_safe=no"
12522 fi
12523 rm -f conftest*
12524 fi
12525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12526   echo "$ac_t""yes" 1>&6
12527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12528   cat >> confdefs.h <<EOF
12529 #define $ac_tr_hdr 1
12530 EOF
12531  
12532 else
12533   echo "$ac_t""no" 1>&6
12534 fi
12535 done
12536
12537  echo $ac_n "checking for db""... $ac_c" 1>&6
12538 echo "configure:12539: checking for db" >&5
12539 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12540   echo $ac_n "(cached) $ac_c" 1>&6
12541 else
12542   
12543         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12544                 ol_cv_mdbm=no
12545         else
12546                 ol_cv_mdbm=yes
12547         fi
12548
12549 fi
12550
12551 echo "$ac_t""$ol_cv_mdbm" 1>&6
12552  if test $ol_cv_mdbm = yes ; then
12553         cat >> confdefs.h <<\EOF
12554 #define HAVE_MDBM 1
12555 EOF
12556
12557  fi
12558
12559
12560         if test $ol_cv_mdbm = yes ; then
12561                 ol_link_ldbm=mdbm
12562                 ol_with_ldbm_api=mdbm
12563                 if test $ol_cv_lib_mdbm != yes ; then
12564                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12565                 fi
12566         fi
12567 fi
12568
12569 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12570         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12571 echo "configure:12572: checking for GDBM library" >&5
12572 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12573   echo $ac_n "(cached) $ac_c" 1>&6
12574 else
12575         ol_LIBS="$LIBS"
12576         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12577 echo "configure:12578: checking for gdbm_open" >&5
12578 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12579   echo $ac_n "(cached) $ac_c" 1>&6
12580 else
12581   cat > conftest.$ac_ext <<EOF
12582 #line 12583 "configure"
12583 #include "confdefs.h"
12584 /* System header to define __stub macros and hopefully few prototypes,
12585     which can conflict with char gdbm_open(); below.  */
12586 #include <assert.h>
12587 /* Override any gcc2 internal prototype to avoid an error.  */
12588 /* We use char because int might match the return type of a gcc2
12589     builtin and then its argument prototype would still apply.  */
12590 char gdbm_open();
12591 char (*f)();
12592
12593 int main() {
12594
12595 /* The GNU C library defines this for functions which it implements
12596     to always fail with ENOSYS.  Some functions are actually named
12597     something starting with __ and the normal name is an alias.  */
12598 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12599 choke me
12600 #else
12601 f = gdbm_open;
12602 #endif
12603
12604 ; return 0; }
12605 EOF
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12607   rm -rf conftest*
12608   eval "ac_cv_func_gdbm_open=yes"
12609 else
12610   echo "configure: failed program was:" >&5
12611   cat conftest.$ac_ext >&5
12612   rm -rf conftest*
12613   eval "ac_cv_func_gdbm_open=no"
12614 fi
12615 rm -f conftest*
12616 fi
12617
12618 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12619   echo "$ac_t""yes" 1>&6
12620   ol_cv_lib_gdbm=yes
12621 else
12622   echo "$ac_t""no" 1>&6
12623
12624                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12625 echo "configure:12626: checking for gdbm_open in -lgdbm" >&5
12626 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12628   echo $ac_n "(cached) $ac_c" 1>&6
12629 else
12630   ac_save_LIBS="$LIBS"
12631 LIBS="-lgdbm  $LIBS"
12632 cat > conftest.$ac_ext <<EOF
12633 #line 12634 "configure"
12634 #include "confdefs.h"
12635 /* Override any gcc2 internal prototype to avoid an error.  */
12636 /* We use char because int might match the return type of a gcc2
12637     builtin and then its argument prototype would still apply.  */
12638 char gdbm_open();
12639
12640 int main() {
12641 gdbm_open()
12642 ; return 0; }
12643 EOF
12644 if { (eval echo configure:12645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12645   rm -rf conftest*
12646   eval "ac_cv_lib_$ac_lib_var=yes"
12647 else
12648   echo "configure: failed program was:" >&5
12649   cat conftest.$ac_ext >&5
12650   rm -rf conftest*
12651   eval "ac_cv_lib_$ac_lib_var=no"
12652 fi
12653 rm -f conftest*
12654 LIBS="$ac_save_LIBS"
12655
12656 fi
12657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12658   echo "$ac_t""yes" 1>&6
12659   ol_cv_lib_gdbm=-lgdbm
12660 else
12661   echo "$ac_t""no" 1>&6
12662 ol_cv_lib_gdbm=no
12663 fi
12664
12665         
12666 fi
12667
12668         LIBS="$ol_LIBS"
12669
12670 fi
12671
12672 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12673
12674
12675  for ac_hdr in gdbm.h
12676 do
12677 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12678 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12679 echo "configure:12680: checking for $ac_hdr" >&5
12680 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12681   echo $ac_n "(cached) $ac_c" 1>&6
12682 else
12683   cat > conftest.$ac_ext <<EOF
12684 #line 12685 "configure"
12685 #include "confdefs.h"
12686 #include <$ac_hdr>
12687 EOF
12688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12689 { (eval echo configure:12690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12691 if test -z "$ac_err"; then
12692   rm -rf conftest*
12693   eval "ac_cv_header_$ac_safe=yes"
12694 else
12695   echo "$ac_err" >&5
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -rf conftest*
12699   eval "ac_cv_header_$ac_safe=no"
12700 fi
12701 rm -f conftest*
12702 fi
12703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12704   echo "$ac_t""yes" 1>&6
12705     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12706   cat >> confdefs.h <<EOF
12707 #define $ac_tr_hdr 1
12708 EOF
12709  
12710 else
12711   echo "$ac_t""no" 1>&6
12712 fi
12713 done
12714
12715  echo $ac_n "checking for db""... $ac_c" 1>&6
12716 echo "configure:12717: checking for db" >&5
12717 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12718   echo $ac_n "(cached) $ac_c" 1>&6
12719 else
12720   
12721         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12722                 ol_cv_gdbm=no
12723         else
12724                 ol_cv_gdbm=yes
12725         fi
12726
12727 fi
12728
12729 echo "$ac_t""$ol_cv_gdbm" 1>&6
12730  if test $ol_cv_gdbm = yes ; then
12731         cat >> confdefs.h <<\EOF
12732 #define HAVE_GDBM 1
12733 EOF
12734
12735  fi
12736
12737
12738         if test $ol_cv_gdbm = yes ; then
12739                 ol_link_ldbm=gdbm
12740                 ol_with_ldbm_api=gdbm
12741
12742                 if test $ol_cv_lib_gdbm != yes ; then
12743                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12744                 fi
12745         fi
12746 fi
12747
12748 if test $ol_with_ldbm_api = ndbm ; then
12749         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12750 echo "configure:12751: checking for NDBM library" >&5
12751 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12752   echo $ac_n "(cached) $ac_c" 1>&6
12753 else
12754         ol_LIBS="$LIBS"
12755         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12756 echo "configure:12757: checking for dbm_open" >&5
12757 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12758   echo $ac_n "(cached) $ac_c" 1>&6
12759 else
12760   cat > conftest.$ac_ext <<EOF
12761 #line 12762 "configure"
12762 #include "confdefs.h"
12763 /* System header to define __stub macros and hopefully few prototypes,
12764     which can conflict with char dbm_open(); below.  */
12765 #include <assert.h>
12766 /* Override any gcc2 internal prototype to avoid an error.  */
12767 /* We use char because int might match the return type of a gcc2
12768     builtin and then its argument prototype would still apply.  */
12769 char dbm_open();
12770 char (*f)();
12771
12772 int main() {
12773
12774 /* The GNU C library defines this for functions which it implements
12775     to always fail with ENOSYS.  Some functions are actually named
12776     something starting with __ and the normal name is an alias.  */
12777 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12778 choke me
12779 #else
12780 f = dbm_open;
12781 #endif
12782
12783 ; return 0; }
12784 EOF
12785 if { (eval echo configure:12786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12786   rm -rf conftest*
12787   eval "ac_cv_func_dbm_open=yes"
12788 else
12789   echo "configure: failed program was:" >&5
12790   cat conftest.$ac_ext >&5
12791   rm -rf conftest*
12792   eval "ac_cv_func_dbm_open=no"
12793 fi
12794 rm -f conftest*
12795 fi
12796
12797 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12798   echo "$ac_t""yes" 1>&6
12799   ol_cv_lib_ndbm=yes
12800 else
12801   echo "$ac_t""no" 1>&6
12802
12803                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12804 echo "configure:12805: checking for dbm_open in -lndbm" >&5
12805 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12807   echo $ac_n "(cached) $ac_c" 1>&6
12808 else
12809   ac_save_LIBS="$LIBS"
12810 LIBS="-lndbm  $LIBS"
12811 cat > conftest.$ac_ext <<EOF
12812 #line 12813 "configure"
12813 #include "confdefs.h"
12814 /* Override any gcc2 internal prototype to avoid an error.  */
12815 /* We use char because int might match the return type of a gcc2
12816     builtin and then its argument prototype would still apply.  */
12817 char dbm_open();
12818
12819 int main() {
12820 dbm_open()
12821 ; return 0; }
12822 EOF
12823 if { (eval echo configure:12824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12824   rm -rf conftest*
12825   eval "ac_cv_lib_$ac_lib_var=yes"
12826 else
12827   echo "configure: failed program was:" >&5
12828   cat conftest.$ac_ext >&5
12829   rm -rf conftest*
12830   eval "ac_cv_lib_$ac_lib_var=no"
12831 fi
12832 rm -f conftest*
12833 LIBS="$ac_save_LIBS"
12834
12835 fi
12836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12837   echo "$ac_t""yes" 1>&6
12838   ol_cv_lib_ndbm=-lndbm
12839 else
12840   echo "$ac_t""no" 1>&6
12841
12842                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12843 echo "configure:12844: checking for dbm_open in -ldbm" >&5
12844 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12845 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12846   echo $ac_n "(cached) $ac_c" 1>&6
12847 else
12848   ac_save_LIBS="$LIBS"
12849 LIBS="-ldbm  $LIBS"
12850 cat > conftest.$ac_ext <<EOF
12851 #line 12852 "configure"
12852 #include "confdefs.h"
12853 /* Override any gcc2 internal prototype to avoid an error.  */
12854 /* We use char because int might match the return type of a gcc2
12855     builtin and then its argument prototype would still apply.  */
12856 char dbm_open();
12857
12858 int main() {
12859 dbm_open()
12860 ; return 0; }
12861 EOF
12862 if { (eval echo configure:12863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12863   rm -rf conftest*
12864   eval "ac_cv_lib_$ac_lib_var=yes"
12865 else
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -rf conftest*
12869   eval "ac_cv_lib_$ac_lib_var=no"
12870 fi
12871 rm -f conftest*
12872 LIBS="$ac_save_LIBS"
12873
12874 fi
12875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12876   echo "$ac_t""yes" 1>&6
12877   ol_cv_lib_ndbm=-ldbm
12878 else
12879   echo "$ac_t""no" 1>&6
12880 ol_cv_lib_ndbm=no
12881 fi
12882                 
12883 fi
12884
12885         
12886 fi
12887
12888         LIBS="$ol_LIBS"
12889
12890 fi
12891
12892 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12893
12894
12895  for ac_hdr in ndbm.h
12896 do
12897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12899 echo "configure:12900: checking for $ac_hdr" >&5
12900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12901   echo $ac_n "(cached) $ac_c" 1>&6
12902 else
12903   cat > conftest.$ac_ext <<EOF
12904 #line 12905 "configure"
12905 #include "confdefs.h"
12906 #include <$ac_hdr>
12907 EOF
12908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12909 { (eval echo configure:12910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12911 if test -z "$ac_err"; then
12912   rm -rf conftest*
12913   eval "ac_cv_header_$ac_safe=yes"
12914 else
12915   echo "$ac_err" >&5
12916   echo "configure: failed program was:" >&5
12917   cat conftest.$ac_ext >&5
12918   rm -rf conftest*
12919   eval "ac_cv_header_$ac_safe=no"
12920 fi
12921 rm -f conftest*
12922 fi
12923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12924   echo "$ac_t""yes" 1>&6
12925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12926   cat >> confdefs.h <<EOF
12927 #define $ac_tr_hdr 1
12928 EOF
12929  
12930 else
12931   echo "$ac_t""no" 1>&6
12932 fi
12933 done
12934
12935  echo $ac_n "checking for db""... $ac_c" 1>&6
12936 echo "configure:12937: checking for db" >&5
12937 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12938   echo $ac_n "(cached) $ac_c" 1>&6
12939 else
12940   
12941         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12942                 ol_cv_ndbm=no
12943         else
12944                 ol_cv_ndbm=yes
12945         fi
12946
12947 fi
12948
12949 echo "$ac_t""$ol_cv_ndbm" 1>&6
12950  if test $ol_cv_ndbm = yes ; then
12951         cat >> confdefs.h <<\EOF
12952 #define HAVE_NDBM 1
12953 EOF
12954
12955  fi
12956
12957
12958         if test $ol_cv_ndbm = yes ; then
12959                 ol_link_ldbm=ndbm
12960                 ol_with_ldbm_api=ndbm
12961
12962                 if test $ol_cv_lib_ndbm != yes ; then
12963                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12964                 fi
12965         fi
12966 fi
12967
12968 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12969         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12970         if test $ol_enable_ldbm = yes ; then
12971                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12972         fi
12973
12974         echo "configure: warning: disabling LDBM" 1>&2
12975         ol_enable_ldbm=no
12976 fi
12977
12978 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12979         LINK_BINS_DYNAMIC="yes"
12980 else
12981         LINK_BINS_DYNAMIC="no"
12982 fi
12983
12984 if test $ol_enable_wrappers != no ; then
12985         for ac_hdr in tcpd.h
12986 do
12987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12989 echo "configure:12990: checking for $ac_hdr" >&5
12990 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12991   echo $ac_n "(cached) $ac_c" 1>&6
12992 else
12993   cat > conftest.$ac_ext <<EOF
12994 #line 12995 "configure"
12995 #include "confdefs.h"
12996 #include <$ac_hdr>
12997 EOF
12998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12999 { (eval echo configure:13000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13001 if test -z "$ac_err"; then
13002   rm -rf conftest*
13003   eval "ac_cv_header_$ac_safe=yes"
13004 else
13005   echo "$ac_err" >&5
13006   echo "configure: failed program was:" >&5
13007   cat conftest.$ac_ext >&5
13008   rm -rf conftest*
13009   eval "ac_cv_header_$ac_safe=no"
13010 fi
13011 rm -f conftest*
13012 fi
13013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13014   echo "$ac_t""yes" 1>&6
13015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13016   cat >> confdefs.h <<EOF
13017 #define $ac_tr_hdr 1
13018 EOF
13019  
13020 else
13021   echo "$ac_t""no" 1>&6
13022 fi
13023 done
13024
13025
13026         if test $ac_cv_header_tcpd_h != yes ; then
13027                 have_wrappers=no
13028         else
13029                 cat > conftest.$ac_ext <<EOF
13030 #line 13031 "configure"
13031 #include "confdefs.h"
13032
13033 int allow_severity = 0;
13034 int deny_severity  = 0;
13035                 
13036 int main() {
13037 hosts_access()
13038 ; return 0; }
13039 EOF
13040 if { (eval echo configure:13041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13041   rm -rf conftest*
13042   have_wrappers=yes
13043 else
13044   echo "configure: failed program was:" >&5
13045   cat conftest.$ac_ext >&5
13046   rm -rf conftest*
13047   have_wrappers=no
13048 fi
13049 rm -f conftest*
13050         fi
13051
13052         if test $have_wrappers = yes ; then
13053                 cat >> confdefs.h <<\EOF
13054 #define HAVE_TCPD 1
13055 EOF
13056
13057                 WRAP_LIBS="-lwrap"
13058
13059                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13060 echo "configure:13061: checking for main in -lnsl" >&5
13061 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13063   echo $ac_n "(cached) $ac_c" 1>&6
13064 else
13065   ac_save_LIBS="$LIBS"
13066 LIBS="-lnsl  $LIBS"
13067 cat > conftest.$ac_ext <<EOF
13068 #line 13069 "configure"
13069 #include "confdefs.h"
13070
13071 int main() {
13072 main()
13073 ; return 0; }
13074 EOF
13075 if { (eval echo configure:13076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13076   rm -rf conftest*
13077   eval "ac_cv_lib_$ac_lib_var=yes"
13078 else
13079   echo "configure: failed program was:" >&5
13080   cat conftest.$ac_ext >&5
13081   rm -rf conftest*
13082   eval "ac_cv_lib_$ac_lib_var=no"
13083 fi
13084 rm -f conftest*
13085 LIBS="$ac_save_LIBS"
13086
13087 fi
13088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13089   echo "$ac_t""yes" 1>&6
13090     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13092   cat >> confdefs.h <<EOF
13093 #define $ac_tr_lib 1
13094 EOF
13095
13096   LIBS="-lnsl $LIBS"
13097
13098 else
13099   echo "$ac_t""no" 1>&6
13100 fi
13101
13102         else
13103                 echo "configure: warning: could not find -lwrap" 1>&2
13104                 if test $ol_enable_wrappers = yes ; then
13105                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13106                 fi
13107
13108                 echo "configure: warning: disabling wrappers support" 1>&2
13109                 ol_enable_wrappers=no
13110                 WRAP_LIBS=""
13111         fi
13112 fi
13113
13114 if test $ol_enable_syslog != no ; then
13115         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13116 echo "configure:13117: checking for openlog" >&5
13117 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13118   echo $ac_n "(cached) $ac_c" 1>&6
13119 else
13120   cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 /* System header to define __stub macros and hopefully few prototypes,
13124     which can conflict with char openlog(); below.  */
13125 #include <assert.h>
13126 /* Override any gcc2 internal prototype to avoid an error.  */
13127 /* We use char because int might match the return type of a gcc2
13128     builtin and then its argument prototype would still apply.  */
13129 char openlog();
13130 char (*f)();
13131
13132 int main() {
13133
13134 /* The GNU C library defines this for functions which it implements
13135     to always fail with ENOSYS.  Some functions are actually named
13136     something starting with __ and the normal name is an alias.  */
13137 #if defined (__stub_openlog) || defined (__stub___openlog)
13138 choke me
13139 #else
13140 f = openlog;
13141 #endif
13142
13143 ; return 0; }
13144 EOF
13145 if { (eval echo configure:13146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13146   rm -rf conftest*
13147   eval "ac_cv_func_openlog=yes"
13148 else
13149   echo "configure: failed program was:" >&5
13150   cat conftest.$ac_ext >&5
13151   rm -rf conftest*
13152   eval "ac_cv_func_openlog=no"
13153 fi
13154 rm -f conftest*
13155 fi
13156
13157 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13158   echo "$ac_t""yes" 1>&6
13159   :
13160 else
13161   echo "$ac_t""no" 1>&6
13162 fi
13163
13164         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13165                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13166         fi
13167         ol_enable_syslog=$ac_cv_func_openlog
13168 fi
13169
13170
13171 ol_link_sql=no
13172 if test $ol_enable_sql != no ; then
13173         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13174 echo "configure:13175: checking for SQLDriverConnect in -liodbc" >&5
13175 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13177   echo $ac_n "(cached) $ac_c" 1>&6
13178 else
13179   ac_save_LIBS="$LIBS"
13180 LIBS="-liodbc  $LIBS"
13181 cat > conftest.$ac_ext <<EOF
13182 #line 13183 "configure"
13183 #include "confdefs.h"
13184 /* Override any gcc2 internal prototype to avoid an error.  */
13185 /* We use char because int might match the return type of a gcc2
13186     builtin and then its argument prototype would still apply.  */
13187 char SQLDriverConnect();
13188
13189 int main() {
13190 SQLDriverConnect()
13191 ; return 0; }
13192 EOF
13193 if { (eval echo configure:13194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13194   rm -rf conftest*
13195   eval "ac_cv_lib_$ac_lib_var=yes"
13196 else
13197   echo "configure: failed program was:" >&5
13198   cat conftest.$ac_ext >&5
13199   rm -rf conftest*
13200   eval "ac_cv_lib_$ac_lib_var=no"
13201 fi
13202 rm -f conftest*
13203 LIBS="$ac_save_LIBS"
13204
13205 fi
13206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13207   echo "$ac_t""yes" 1>&6
13208   have_iodbc=yes
13209 else
13210   echo "$ac_t""no" 1>&6
13211 have_iodbc=no
13212 fi
13213
13214         if test $have_iodbc = yes ; then
13215                 ol_link_sql="-liodbc"
13216         else
13217                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13218 echo "configure:13219: checking for SQLDriverConnect in -lodbc" >&5
13219 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13220 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13221   echo $ac_n "(cached) $ac_c" 1>&6
13222 else
13223   ac_save_LIBS="$LIBS"
13224 LIBS="-lodbc  $LIBS"
13225 cat > conftest.$ac_ext <<EOF
13226 #line 13227 "configure"
13227 #include "confdefs.h"
13228 /* Override any gcc2 internal prototype to avoid an error.  */
13229 /* We use char because int might match the return type of a gcc2
13230     builtin and then its argument prototype would still apply.  */
13231 char SQLDriverConnect();
13232
13233 int main() {
13234 SQLDriverConnect()
13235 ; return 0; }
13236 EOF
13237 if { (eval echo configure:13238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13238   rm -rf conftest*
13239   eval "ac_cv_lib_$ac_lib_var=yes"
13240 else
13241   echo "configure: failed program was:" >&5
13242   cat conftest.$ac_ext >&5
13243   rm -rf conftest*
13244   eval "ac_cv_lib_$ac_lib_var=no"
13245 fi
13246 rm -f conftest*
13247 LIBS="$ac_save_LIBS"
13248
13249 fi
13250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13251   echo "$ac_t""yes" 1>&6
13252   have_odbc=yes
13253 else
13254   echo "$ac_t""no" 1>&6
13255 have_odbc=no
13256 fi
13257
13258                 if test $have_odbc = yes ; then
13259                         ol_link_sql="-lodbc"
13260                 fi
13261         fi
13262
13263         if test $ol_link_sql != no ; then
13264                 SLAPD_SQL_LIBS="$ol_link_sql"
13265
13266         elif test $ol_enable_sql != auto ; then
13267                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13268         fi
13269 fi
13270
13271 if test $ol_enable_tcl != no ; then
13272         for ac_hdr in tcl.h
13273 do
13274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13276 echo "configure:13277: checking for $ac_hdr" >&5
13277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13278   echo $ac_n "(cached) $ac_c" 1>&6
13279 else
13280   cat > conftest.$ac_ext <<EOF
13281 #line 13282 "configure"
13282 #include "confdefs.h"
13283 #include <$ac_hdr>
13284 EOF
13285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13286 { (eval echo configure:13287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13288 if test -z "$ac_err"; then
13289   rm -rf conftest*
13290   eval "ac_cv_header_$ac_safe=yes"
13291 else
13292   echo "$ac_err" >&5
13293   echo "configure: failed program was:" >&5
13294   cat conftest.$ac_ext >&5
13295   rm -rf conftest*
13296   eval "ac_cv_header_$ac_safe=no"
13297 fi
13298 rm -f conftest*
13299 fi
13300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13301   echo "$ac_t""yes" 1>&6
13302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13303   cat >> confdefs.h <<EOF
13304 #define $ac_tr_hdr 1
13305 EOF
13306  
13307 else
13308   echo "$ac_t""no" 1>&6
13309 fi
13310 done
13311
13312
13313         if test $ac_cv_header_tcl_h != yes ; then
13314                 have_tcl=no
13315         else
13316                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13317                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13318 echo "configure:13319: checking for main in -l$lib" >&5
13319 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13321   echo $ac_n "(cached) $ac_c" 1>&6
13322 else
13323   ac_save_LIBS="$LIBS"
13324 LIBS="-l$lib  $LIBS"
13325 cat > conftest.$ac_ext <<EOF
13326 #line 13327 "configure"
13327 #include "confdefs.h"
13328
13329 int main() {
13330 main()
13331 ; return 0; }
13332 EOF
13333 if { (eval echo configure:13334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13334   rm -rf conftest*
13335   eval "ac_cv_lib_$ac_lib_var=yes"
13336 else
13337   echo "configure: failed program was:" >&5
13338   cat conftest.$ac_ext >&5
13339   rm -rf conftest*
13340   eval "ac_cv_lib_$ac_lib_var=no"
13341 fi
13342 rm -f conftest*
13343 LIBS="$ac_save_LIBS"
13344
13345 fi
13346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13347   echo "$ac_t""yes" 1>&6
13348   have_tcl=yes
13349                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13350                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13351                            else
13352                                MOD_TCL_LIB="-l${lib}"
13353                            fi;break
13354 else
13355   echo "$ac_t""no" 1>&6
13356 have_tcl=no
13357 fi
13358
13359                 done
13360         fi
13361
13362         if test $have_tcl != yes ; then
13363                 echo "configure: warning: could not find -ltcl" 1>&2
13364                 if test $ol_enable_tcl = yes ; then
13365                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13366                 fi
13367
13368                 ol_enable_tcl=no
13369         fi
13370 fi
13371
13372 ol_link_termcap=no
13373 for ac_hdr in termcap.h ncurses.h
13374 do
13375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13377 echo "configure:13378: checking for $ac_hdr" >&5
13378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13379   echo $ac_n "(cached) $ac_c" 1>&6
13380 else
13381   cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 #include <$ac_hdr>
13385 EOF
13386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13387 { (eval echo configure:13388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13389 if test -z "$ac_err"; then
13390   rm -rf conftest*
13391   eval "ac_cv_header_$ac_safe=yes"
13392 else
13393   echo "$ac_err" >&5
13394   echo "configure: failed program was:" >&5
13395   cat conftest.$ac_ext >&5
13396   rm -rf conftest*
13397   eval "ac_cv_header_$ac_safe=no"
13398 fi
13399 rm -f conftest*
13400 fi
13401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13402   echo "$ac_t""yes" 1>&6
13403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13404   cat >> confdefs.h <<EOF
13405 #define $ac_tr_hdr 1
13406 EOF
13407  
13408 else
13409   echo "$ac_t""no" 1>&6
13410 fi
13411 done
13412
13413
13414 if test $ol_link_termcap = no ; then
13415         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13416 echo "configure:13417: checking for tputs in -ltermcap" >&5
13417 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13419   echo $ac_n "(cached) $ac_c" 1>&6
13420 else
13421   ac_save_LIBS="$LIBS"
13422 LIBS="-ltermcap  $LIBS"
13423 cat > conftest.$ac_ext <<EOF
13424 #line 13425 "configure"
13425 #include "confdefs.h"
13426 /* Override any gcc2 internal prototype to avoid an error.  */
13427 /* We use char because int might match the return type of a gcc2
13428     builtin and then its argument prototype would still apply.  */
13429 char tputs();
13430
13431 int main() {
13432 tputs()
13433 ; return 0; }
13434 EOF
13435 if { (eval echo configure:13436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13436   rm -rf conftest*
13437   eval "ac_cv_lib_$ac_lib_var=yes"
13438 else
13439   echo "configure: failed program was:" >&5
13440   cat conftest.$ac_ext >&5
13441   rm -rf conftest*
13442   eval "ac_cv_lib_$ac_lib_var=no"
13443 fi
13444 rm -f conftest*
13445 LIBS="$ac_save_LIBS"
13446
13447 fi
13448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13449   echo "$ac_t""yes" 1>&6
13450   have_termcap=yes
13451 else
13452   echo "$ac_t""no" 1>&6
13453 have_termcap=no
13454 fi
13455
13456         if test $have_termcap = yes ; then
13457                 cat >> confdefs.h <<\EOF
13458 #define HAVE_TERMCAP 1
13459 EOF
13460
13461                 ol_link_termcap=yes
13462                 TERMCAP_LIBS=-ltermcap
13463         fi
13464 fi
13465
13466 if test $ol_link_termcap = no ; then
13467         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13468 echo "configure:13469: checking for initscr in -lncurses" >&5
13469 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13470 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13471   echo $ac_n "(cached) $ac_c" 1>&6
13472 else
13473   ac_save_LIBS="$LIBS"
13474 LIBS="-lncurses  $LIBS"
13475 cat > conftest.$ac_ext <<EOF
13476 #line 13477 "configure"
13477 #include "confdefs.h"
13478 /* Override any gcc2 internal prototype to avoid an error.  */
13479 /* We use char because int might match the return type of a gcc2
13480     builtin and then its argument prototype would still apply.  */
13481 char initscr();
13482
13483 int main() {
13484 initscr()
13485 ; return 0; }
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13488   rm -rf conftest*
13489   eval "ac_cv_lib_$ac_lib_var=yes"
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   eval "ac_cv_lib_$ac_lib_var=no"
13495 fi
13496 rm -f conftest*
13497 LIBS="$ac_save_LIBS"
13498
13499 fi
13500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13501   echo "$ac_t""yes" 1>&6
13502   have_ncurses=yes
13503 else
13504   echo "$ac_t""no" 1>&6
13505 have_ncurses=no
13506 fi
13507
13508         if test $have_ncurses = yes ; then
13509                 cat >> confdefs.h <<\EOF
13510 #define HAVE_NCURSES 1
13511 EOF
13512
13513                 ol_link_termcap=yes
13514                 TERMCAP_LIBS=-lncurses
13515         fi
13516 fi
13517
13518 if test $ol_link_termcap = no ; then
13519         cat >> confdefs.h <<\EOF
13520 #define NO_TERMCAP 1
13521 EOF
13522
13523         TERMCAP_LIBS=
13524 fi
13525
13526 ol_link_sasl=no
13527 ol_link_spasswd=no
13528 if test $ol_with_cyrus_sasl != no ; then
13529         for ac_hdr in sasl.h
13530 do
13531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13533 echo "configure:13534: checking for $ac_hdr" >&5
13534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13535   echo $ac_n "(cached) $ac_c" 1>&6
13536 else
13537   cat > conftest.$ac_ext <<EOF
13538 #line 13539 "configure"
13539 #include "confdefs.h"
13540 #include <$ac_hdr>
13541 EOF
13542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13543 { (eval echo configure:13544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13545 if test -z "$ac_err"; then
13546   rm -rf conftest*
13547   eval "ac_cv_header_$ac_safe=yes"
13548 else
13549   echo "$ac_err" >&5
13550   echo "configure: failed program was:" >&5
13551   cat conftest.$ac_ext >&5
13552   rm -rf conftest*
13553   eval "ac_cv_header_$ac_safe=no"
13554 fi
13555 rm -f conftest*
13556 fi
13557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13558   echo "$ac_t""yes" 1>&6
13559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13560   cat >> confdefs.h <<EOF
13561 #define $ac_tr_hdr 1
13562 EOF
13563  
13564 else
13565   echo "$ac_t""no" 1>&6
13566 fi
13567 done
13568
13569
13570         if test $ac_cv_header_sasl_h = yes ; then
13571                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13572 echo "configure:13573: checking for sasl_client_init in -lsasl" >&5
13573 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13575   echo $ac_n "(cached) $ac_c" 1>&6
13576 else
13577   ac_save_LIBS="$LIBS"
13578 LIBS="-lsasl  $LIBS"
13579 cat > conftest.$ac_ext <<EOF
13580 #line 13581 "configure"
13581 #include "confdefs.h"
13582 /* Override any gcc2 internal prototype to avoid an error.  */
13583 /* We use char because int might match the return type of a gcc2
13584     builtin and then its argument prototype would still apply.  */
13585 char sasl_client_init();
13586
13587 int main() {
13588 sasl_client_init()
13589 ; return 0; }
13590 EOF
13591 if { (eval echo configure:13592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13592   rm -rf conftest*
13593   eval "ac_cv_lib_$ac_lib_var=yes"
13594 else
13595   echo "configure: failed program was:" >&5
13596   cat conftest.$ac_ext >&5
13597   rm -rf conftest*
13598   eval "ac_cv_lib_$ac_lib_var=no"
13599 fi
13600 rm -f conftest*
13601 LIBS="$ac_save_LIBS"
13602
13603 fi
13604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13605   echo "$ac_t""yes" 1>&6
13606   have_cyrus_sasl=yes
13607 else
13608   echo "$ac_t""no" 1>&6
13609 have_cyrus_sasl=no
13610 fi
13611
13612
13613                 if test $have_cyrus_sasl != no ; then
13614                         SASL_LIBS="-lsasl"
13615                         cat >> confdefs.h <<\EOF
13616 #define HAVE_CYRUS_SASL 1
13617 EOF
13618
13619                         ol_link_sasl=yes
13620                 fi
13621         fi
13622
13623         if test $ol_link_sasl = no ; then
13624                 if test $ol_with_cyrus_sasl != auto ; then
13625                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13626                 else
13627                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13628                         echo "configure: warning: SASL authentication not supported!" 1>&2
13629                         if test $ol_link_tls = no ; then
13630                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13631                         fi
13632                 fi
13633
13634         elif test $ol_enable_spasswd != no ; then
13635                 ol_link_spasswd=yes
13636         fi
13637
13638 else
13639         echo "configure: warning: SASL authentication not supported!" 1>&2
13640         if test $ol_link_tls = no ; then
13641                 echo "configure: warning: Strong authentication not supported!" 1>&2
13642         fi
13643 fi
13644
13645 if test $cross_compiling != yes ; then
13646         dev=no
13647         if test -r /dev/urandom ; then
13648                 dev="/dev/urandom";
13649         elif test -r /idev/urandom ; then
13650                 dev="/idev/urandom";
13651         elif test -r /dev/srandom ; then
13652                 dev="/dev/srandom";
13653         elif test -r /dev/random ; then
13654                 dev="/dev/random";
13655         elif test -r /idev/random ; then
13656                 dev="/idev/random";
13657         fi
13658
13659         if test $dev != no ; then
13660                 cat >> confdefs.h <<EOF
13661 #define URANDOM_DEVICE "$dev"
13662 EOF
13663
13664         fi
13665 fi
13666
13667 ol_link_fetch=no
13668 if test $ol_with_fetch != no ; then
13669         ol_LIBS=$LIBS
13670 LIBS="-lfetch -lcom_err $LIBS"
13671 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13672 echo "configure:13673: checking fetch(3) library" >&5
13673 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13674   echo $ac_n "(cached) $ac_c" 1>&6
13675 else
13676   
13677         cat > conftest.$ac_ext <<EOF
13678 #line 13679 "configure"
13679 #include "confdefs.h"
13680
13681 #include <sys/param.h>
13682 #include <stdio.h>
13683 #include <fetch.h>
13684 int main() {
13685 struct url *u = fetchParseURL("file:///"); 
13686 ; return 0; }
13687 EOF
13688 if { (eval echo configure:13689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13689   rm -rf conftest*
13690   ol_cv_lib_fetch=yes
13691 else
13692   echo "configure: failed program was:" >&5
13693   cat conftest.$ac_ext >&5
13694   rm -rf conftest*
13695   ol_cv_lib_fetch=no
13696 fi
13697 rm -f conftest*
13698 fi
13699
13700 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13701 LIBS=$ol_LIBS
13702 if test $ol_cv_lib_fetch != no ; then
13703         ol_link_fetch="-lfetch -lcom_err"
13704         cat >> confdefs.h <<\EOF
13705 #define HAVE_FETCH 1
13706 EOF
13707
13708 fi
13709
13710
13711         if test $ol_cv_lib_fetch != no ; then
13712                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13713                 ol_link_fetch=freebsd
13714
13715         elif test $ol_with_fetch != auto ; then
13716                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13717         fi 
13718 fi
13719
13720 ol_link_readline=no
13721 if test $ol_with_readline != no ; then
13722         for ac_hdr in readline/readline.h readline/history.h
13723 do
13724 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13725 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13726 echo "configure:13727: checking for $ac_hdr" >&5
13727 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13728   echo $ac_n "(cached) $ac_c" 1>&6
13729 else
13730   cat > conftest.$ac_ext <<EOF
13731 #line 13732 "configure"
13732 #include "confdefs.h"
13733 #include <$ac_hdr>
13734 EOF
13735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13736 { (eval echo configure:13737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13738 if test -z "$ac_err"; then
13739   rm -rf conftest*
13740   eval "ac_cv_header_$ac_safe=yes"
13741 else
13742   echo "$ac_err" >&5
13743   echo "configure: failed program was:" >&5
13744   cat conftest.$ac_ext >&5
13745   rm -rf conftest*
13746   eval "ac_cv_header_$ac_safe=no"
13747 fi
13748 rm -f conftest*
13749 fi
13750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13751   echo "$ac_t""yes" 1>&6
13752     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13753   cat >> confdefs.h <<EOF
13754 #define $ac_tr_hdr 1
13755 EOF
13756  
13757 else
13758   echo "$ac_t""no" 1>&6
13759 fi
13760 done
13761
13762
13763         if test $ac_cv_header_readline_readline_h = yes ; then
13764                 save_LIBS="$LIBS"
13765                 LIBS="$TERMCAP_LIBS $LIBS"
13766                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13767 echo "configure:13768: checking for readline in -lreadline" >&5
13768 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13770   echo $ac_n "(cached) $ac_c" 1>&6
13771 else
13772   ac_save_LIBS="$LIBS"
13773 LIBS="-lreadline  $LIBS"
13774 cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 /* Override any gcc2 internal prototype to avoid an error.  */
13778 /* We use char because int might match the return type of a gcc2
13779     builtin and then its argument prototype would still apply.  */
13780 char readline();
13781
13782 int main() {
13783 readline()
13784 ; return 0; }
13785 EOF
13786 if { (eval echo configure:13787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13787   rm -rf conftest*
13788   eval "ac_cv_lib_$ac_lib_var=yes"
13789 else
13790   echo "configure: failed program was:" >&5
13791   cat conftest.$ac_ext >&5
13792   rm -rf conftest*
13793   eval "ac_cv_lib_$ac_lib_var=no"
13794 fi
13795 rm -f conftest*
13796 LIBS="$ac_save_LIBS"
13797
13798 fi
13799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13800   echo "$ac_t""yes" 1>&6
13801   have_readline=yes
13802 else
13803   echo "$ac_t""no" 1>&6
13804 have_readline=no
13805 fi
13806
13807                 LIBS="$save_LIBS"
13808                         
13809                 if test $have_readline = yes ; then
13810                         ol_with_readline=found
13811                         ol_link_readline=yes
13812
13813                         READLINE_LIBS="-lreadline"
13814                 fi
13815         fi
13816 fi
13817
13818 if test $ol_link_readline = yes ; then
13819         cat >> confdefs.h <<\EOF
13820 #define HAVE_READLINE 1
13821 EOF
13822
13823 fi
13824
13825
13826 if test $ol_enable_crypt != no ; then
13827         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13828 echo "configure:13829: checking for crypt" >&5
13829 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13830   echo $ac_n "(cached) $ac_c" 1>&6
13831 else
13832   cat > conftest.$ac_ext <<EOF
13833 #line 13834 "configure"
13834 #include "confdefs.h"
13835 /* System header to define __stub macros and hopefully few prototypes,
13836     which can conflict with char crypt(); below.  */
13837 #include <assert.h>
13838 /* Override any gcc2 internal prototype to avoid an error.  */
13839 /* We use char because int might match the return type of a gcc2
13840     builtin and then its argument prototype would still apply.  */
13841 char crypt();
13842 char (*f)();
13843
13844 int main() {
13845
13846 /* The GNU C library defines this for functions which it implements
13847     to always fail with ENOSYS.  Some functions are actually named
13848     something starting with __ and the normal name is an alias.  */
13849 #if defined (__stub_crypt) || defined (__stub___crypt)
13850 choke me
13851 #else
13852 f = crypt;
13853 #endif
13854
13855 ; return 0; }
13856 EOF
13857 if { (eval echo configure:13858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13858   rm -rf conftest*
13859   eval "ac_cv_func_crypt=yes"
13860 else
13861   echo "configure: failed program was:" >&5
13862   cat conftest.$ac_ext >&5
13863   rm -rf conftest*
13864   eval "ac_cv_func_crypt=no"
13865 fi
13866 rm -f conftest*
13867 fi
13868
13869 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13870   echo "$ac_t""yes" 1>&6
13871   have_crypt=yes
13872 else
13873   echo "$ac_t""no" 1>&6
13874
13875                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13876 echo "configure:13877: checking for crypt in -lcrypt" >&5
13877 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13879   echo $ac_n "(cached) $ac_c" 1>&6
13880 else
13881   ac_save_LIBS="$LIBS"
13882 LIBS="-lcrypt  $LIBS"
13883 cat > conftest.$ac_ext <<EOF
13884 #line 13885 "configure"
13885 #include "confdefs.h"
13886 /* Override any gcc2 internal prototype to avoid an error.  */
13887 /* We use char because int might match the return type of a gcc2
13888     builtin and then its argument prototype would still apply.  */
13889 char crypt();
13890
13891 int main() {
13892 crypt()
13893 ; return 0; }
13894 EOF
13895 if { (eval echo configure:13896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13896   rm -rf conftest*
13897   eval "ac_cv_lib_$ac_lib_var=yes"
13898 else
13899   echo "configure: failed program was:" >&5
13900   cat conftest.$ac_ext >&5
13901   rm -rf conftest*
13902   eval "ac_cv_lib_$ac_lib_var=no"
13903 fi
13904 rm -f conftest*
13905 LIBS="$ac_save_LIBS"
13906
13907 fi
13908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13909   echo "$ac_t""yes" 1>&6
13910   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13911                         have_crypt=yes
13912 else
13913   echo "$ac_t""no" 1>&6
13914 have_crypt=no
13915 fi
13916
13917 fi
13918
13919
13920         if test $have_crypt = yes ; then
13921                 cat >> confdefs.h <<\EOF
13922 #define HAVE_CRYPT 1
13923 EOF
13924
13925         else
13926                 echo "configure: warning: could not find crypt" 1>&2
13927                 if test $ol_enable_crypt = yes ; then
13928                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13929                 fi
13930
13931                 echo "configure: warning: disabling crypt support" 1>&2
13932                 ol_enable_crypt=no
13933         fi
13934 fi
13935
13936 if test $ol_enable_proctitle != no ; then
13937         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13938 echo "configure:13939: checking for setproctitle" >&5
13939 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13940   echo $ac_n "(cached) $ac_c" 1>&6
13941 else
13942   cat > conftest.$ac_ext <<EOF
13943 #line 13944 "configure"
13944 #include "confdefs.h"
13945 /* System header to define __stub macros and hopefully few prototypes,
13946     which can conflict with char setproctitle(); below.  */
13947 #include <assert.h>
13948 /* Override any gcc2 internal prototype to avoid an error.  */
13949 /* We use char because int might match the return type of a gcc2
13950     builtin and then its argument prototype would still apply.  */
13951 char setproctitle();
13952 char (*f)();
13953
13954 int main() {
13955
13956 /* The GNU C library defines this for functions which it implements
13957     to always fail with ENOSYS.  Some functions are actually named
13958     something starting with __ and the normal name is an alias.  */
13959 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13960 choke me
13961 #else
13962 f = setproctitle;
13963 #endif
13964
13965 ; return 0; }
13966 EOF
13967 if { (eval echo configure:13968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13968   rm -rf conftest*
13969   eval "ac_cv_func_setproctitle=yes"
13970 else
13971   echo "configure: failed program was:" >&5
13972   cat conftest.$ac_ext >&5
13973   rm -rf conftest*
13974   eval "ac_cv_func_setproctitle=no"
13975 fi
13976 rm -f conftest*
13977 fi
13978
13979 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13980   echo "$ac_t""yes" 1>&6
13981   have_setproctitle=yes
13982 else
13983   echo "$ac_t""no" 1>&6
13984
13985                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13986 echo "configure:13987: checking for setproctitle in -lutil" >&5
13987 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13989   echo $ac_n "(cached) $ac_c" 1>&6
13990 else
13991   ac_save_LIBS="$LIBS"
13992 LIBS="-lutil  $LIBS"
13993 cat > conftest.$ac_ext <<EOF
13994 #line 13995 "configure"
13995 #include "confdefs.h"
13996 /* Override any gcc2 internal prototype to avoid an error.  */
13997 /* We use char because int might match the return type of a gcc2
13998     builtin and then its argument prototype would still apply.  */
13999 char setproctitle();
14000
14001 int main() {
14002 setproctitle()
14003 ; return 0; }
14004 EOF
14005 if { (eval echo configure:14006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14006   rm -rf conftest*
14007   eval "ac_cv_lib_$ac_lib_var=yes"
14008 else
14009   echo "configure: failed program was:" >&5
14010   cat conftest.$ac_ext >&5
14011   rm -rf conftest*
14012   eval "ac_cv_lib_$ac_lib_var=no"
14013 fi
14014 rm -f conftest*
14015 LIBS="$ac_save_LIBS"
14016
14017 fi
14018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14019   echo "$ac_t""yes" 1>&6
14020   have_setproctitle=yes
14021                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14022 else
14023   echo "$ac_t""no" 1>&6
14024 have_setproctitle=no
14025                         LIBOBJS="$LIBOBJS setproctitle.o"
14026                         LIBSRCS="$LIBSRCS setproctitle.c"
14027 fi
14028
14029 fi
14030
14031
14032         if test $have_setproctitle = yes ; then
14033                 cat >> confdefs.h <<\EOF
14034 #define HAVE_SETPROCTITLE 1
14035 EOF
14036
14037         fi
14038 fi
14039
14040 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14041 echo "configure:14042: checking for ANSI C header files" >&5
14042 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14043   echo $ac_n "(cached) $ac_c" 1>&6
14044 else
14045   cat > conftest.$ac_ext <<EOF
14046 #line 14047 "configure"
14047 #include "confdefs.h"
14048 #include <stdlib.h>
14049 #include <stdarg.h>
14050 #include <string.h>
14051 #include <float.h>
14052 EOF
14053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14054 { (eval echo configure:14055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14056 if test -z "$ac_err"; then
14057   rm -rf conftest*
14058   ac_cv_header_stdc=yes
14059 else
14060   echo "$ac_err" >&5
14061   echo "configure: failed program was:" >&5
14062   cat conftest.$ac_ext >&5
14063   rm -rf conftest*
14064   ac_cv_header_stdc=no
14065 fi
14066 rm -f conftest*
14067
14068 if test $ac_cv_header_stdc = yes; then
14069   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14070 cat > conftest.$ac_ext <<EOF
14071 #line 14072 "configure"
14072 #include "confdefs.h"
14073 #include <string.h>
14074 EOF
14075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14076   egrep "memchr" >/dev/null 2>&1; then
14077   :
14078 else
14079   rm -rf conftest*
14080   ac_cv_header_stdc=no
14081 fi
14082 rm -f conftest*
14083
14084 fi
14085
14086 if test $ac_cv_header_stdc = yes; then
14087   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14088 cat > conftest.$ac_ext <<EOF
14089 #line 14090 "configure"
14090 #include "confdefs.h"
14091 #include <stdlib.h>
14092 EOF
14093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14094   egrep "free" >/dev/null 2>&1; then
14095   :
14096 else
14097   rm -rf conftest*
14098   ac_cv_header_stdc=no
14099 fi
14100 rm -f conftest*
14101
14102 fi
14103
14104 if test $ac_cv_header_stdc = yes; then
14105   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14106 if test "$cross_compiling" = yes; then
14107   :
14108 else
14109   cat > conftest.$ac_ext <<EOF
14110 #line 14111 "configure"
14111 #include "confdefs.h"
14112 #include <ctype.h>
14113 #if ((' ' & 0x0FF) == 0x020)
14114 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14115 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14116 #else
14117 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14118  || ('j' <= (c) && (c) <= 'r') \
14119  || ('s' <= (c) && (c) <= 'z'))
14120 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14121 #endif
14122 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14123 int main () { int i; for (i = 0; i < 256; i++)
14124 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14125 exit (0); }
14126
14127 EOF
14128 if { (eval echo configure:14129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14129 then
14130   :
14131 else
14132   echo "configure: failed program was:" >&5
14133   cat conftest.$ac_ext >&5
14134   rm -fr conftest*
14135   ac_cv_header_stdc=no
14136 fi
14137 rm -fr conftest*
14138 fi
14139
14140 fi
14141 fi
14142
14143 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14144 if test $ac_cv_header_stdc = yes; then
14145   cat >> confdefs.h <<\EOF
14146 #define STDC_HEADERS 1
14147 EOF
14148
14149 fi
14150
14151 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14152 echo "configure:14153: checking for mode_t" >&5
14153 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14154   echo $ac_n "(cached) $ac_c" 1>&6
14155 else
14156   cat > conftest.$ac_ext <<EOF
14157 #line 14158 "configure"
14158 #include "confdefs.h"
14159 #include <sys/types.h>
14160 #if STDC_HEADERS
14161 #include <stdlib.h>
14162 #include <stddef.h>
14163 #endif
14164
14165 EOF
14166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14167   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14168   rm -rf conftest*
14169   eval "ac_cv_type_mode_t=yes"
14170 else
14171   rm -rf conftest*
14172   eval "ac_cv_type_mode_t=no"
14173 fi
14174 rm -f conftest*
14175
14176 fi
14177 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14178   echo "$ac_t""yes" 1>&6
14179 else
14180   echo "$ac_t""no" 1>&6
14181   cat >> confdefs.h <<EOF
14182 #define mode_t int
14183 EOF
14184
14185 fi
14186
14187 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14188 echo "configure:14189: checking for off_t" >&5
14189 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14190   echo $ac_n "(cached) $ac_c" 1>&6
14191 else
14192   cat > conftest.$ac_ext <<EOF
14193 #line 14194 "configure"
14194 #include "confdefs.h"
14195 #include <sys/types.h>
14196 #if STDC_HEADERS
14197 #include <stdlib.h>
14198 #include <stddef.h>
14199 #endif
14200
14201 EOF
14202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14203   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14204   rm -rf conftest*
14205   eval "ac_cv_type_off_t=yes"
14206 else
14207   rm -rf conftest*
14208   eval "ac_cv_type_off_t=no"
14209 fi
14210 rm -f conftest*
14211
14212 fi
14213 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14214   echo "$ac_t""yes" 1>&6
14215 else
14216   echo "$ac_t""no" 1>&6
14217   cat >> confdefs.h <<EOF
14218 #define off_t long
14219 EOF
14220
14221 fi
14222
14223 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14224 echo "configure:14225: checking for pid_t" >&5
14225 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14226   echo $ac_n "(cached) $ac_c" 1>&6
14227 else
14228   cat > conftest.$ac_ext <<EOF
14229 #line 14230 "configure"
14230 #include "confdefs.h"
14231 #include <sys/types.h>
14232 #if STDC_HEADERS
14233 #include <stdlib.h>
14234 #include <stddef.h>
14235 #endif
14236
14237 EOF
14238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14239   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14240   rm -rf conftest*
14241   eval "ac_cv_type_pid_t=yes"
14242 else
14243   rm -rf conftest*
14244   eval "ac_cv_type_pid_t=no"
14245 fi
14246 rm -f conftest*
14247
14248 fi
14249 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14250   echo "$ac_t""yes" 1>&6
14251 else
14252   echo "$ac_t""no" 1>&6
14253   cat >> confdefs.h <<EOF
14254 #define pid_t int
14255 EOF
14256
14257 fi
14258
14259 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14260 echo "configure:14261: checking for ptrdiff_t" >&5
14261 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14262   echo $ac_n "(cached) $ac_c" 1>&6
14263 else
14264   cat > conftest.$ac_ext <<EOF
14265 #line 14266 "configure"
14266 #include "confdefs.h"
14267 #include <stddef.h>
14268 int main() {
14269 ptrdiff_t p
14270 ; return 0; }
14271 EOF
14272 if { (eval echo configure:14273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14273   rm -rf conftest*
14274   am_cv_type_ptrdiff_t=yes
14275 else
14276   echo "configure: failed program was:" >&5
14277   cat conftest.$ac_ext >&5
14278   rm -rf conftest*
14279   am_cv_type_ptrdiff_t=no
14280 fi
14281 rm -f conftest*
14282 fi
14283
14284 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14285    if test $am_cv_type_ptrdiff_t = yes; then
14286      cat >> confdefs.h <<\EOF
14287 #define HAVE_PTRDIFF_T 1
14288 EOF
14289
14290    fi
14291
14292 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14293 echo "configure:14294: checking return type of signal handlers" >&5
14294 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14295   echo $ac_n "(cached) $ac_c" 1>&6
14296 else
14297   cat > conftest.$ac_ext <<EOF
14298 #line 14299 "configure"
14299 #include "confdefs.h"
14300 #include <sys/types.h>
14301 #include <signal.h>
14302 #ifdef signal
14303 #undef signal
14304 #endif
14305 #ifdef __cplusplus
14306 extern "C" void (*signal (int, void (*)(int)))(int);
14307 #else
14308 void (*signal ()) ();
14309 #endif
14310
14311 int main() {
14312 int i;
14313 ; return 0; }
14314 EOF
14315 if { (eval echo configure:14316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14316   rm -rf conftest*
14317   ac_cv_type_signal=void
14318 else
14319   echo "configure: failed program was:" >&5
14320   cat conftest.$ac_ext >&5
14321   rm -rf conftest*
14322   ac_cv_type_signal=int
14323 fi
14324 rm -f conftest*
14325 fi
14326
14327 echo "$ac_t""$ac_cv_type_signal" 1>&6
14328 cat >> confdefs.h <<EOF
14329 #define RETSIGTYPE $ac_cv_type_signal
14330 EOF
14331
14332
14333 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14334 echo "configure:14335: checking for size_t" >&5
14335 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14336   echo $ac_n "(cached) $ac_c" 1>&6
14337 else
14338   cat > conftest.$ac_ext <<EOF
14339 #line 14340 "configure"
14340 #include "confdefs.h"
14341 #include <sys/types.h>
14342 #if STDC_HEADERS
14343 #include <stdlib.h>
14344 #include <stddef.h>
14345 #endif
14346
14347 EOF
14348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14349   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14350   rm -rf conftest*
14351   eval "ac_cv_type_size_t=yes"
14352 else
14353   rm -rf conftest*
14354   eval "ac_cv_type_size_t=no"
14355 fi
14356 rm -f conftest*
14357
14358 fi
14359 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14360   echo "$ac_t""yes" 1>&6
14361 else
14362   echo "$ac_t""no" 1>&6
14363   cat >> confdefs.h <<EOF
14364 #define size_t unsigned
14365 EOF
14366
14367 fi
14368
14369
14370 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14371 echo "configure:14372: checking for ssize_t" >&5
14372 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14373   echo $ac_n "(cached) $ac_c" 1>&6
14374 else
14375   cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 #include <sys/types.h>
14379 #if STDC_HEADERS
14380 #include <stdlib.h>
14381 #include <stddef.h>
14382 #endif
14383
14384 EOF
14385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14386   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14387   rm -rf conftest*
14388   eval "ac_cv_type_ssize_t=yes"
14389 else
14390   rm -rf conftest*
14391   eval "ac_cv_type_ssize_t=no"
14392 fi
14393 rm -f conftest*
14394
14395 fi
14396 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14397   echo "$ac_t""yes" 1>&6
14398 else
14399   echo "$ac_t""no" 1>&6
14400   cat >> confdefs.h <<EOF
14401 #define ssize_t signed int
14402 EOF
14403
14404 fi
14405
14406 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14407 echo "configure:14408: checking for caddr_t" >&5
14408 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14409   echo $ac_n "(cached) $ac_c" 1>&6
14410 else
14411   cat > conftest.$ac_ext <<EOF
14412 #line 14413 "configure"
14413 #include "confdefs.h"
14414 #include <sys/types.h>
14415 #if STDC_HEADERS
14416 #include <stdlib.h>
14417 #include <stddef.h>
14418 #endif
14419
14420 EOF
14421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14422   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14423   rm -rf conftest*
14424   eval "ac_cv_type_caddr_t=yes"
14425 else
14426   rm -rf conftest*
14427   eval "ac_cv_type_caddr_t=no"
14428 fi
14429 rm -f conftest*
14430
14431 fi
14432 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14433   echo "$ac_t""yes" 1>&6
14434 else
14435   echo "$ac_t""no" 1>&6
14436   cat >> confdefs.h <<EOF
14437 #define caddr_t char *
14438 EOF
14439
14440 fi
14441
14442
14443 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14444 echo "configure:14445: checking for socklen_t" >&5
14445 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14446   echo $ac_n "(cached) $ac_c" 1>&6
14447 else
14448   cat > conftest.$ac_ext <<EOF
14449 #line 14450 "configure"
14450 #include "confdefs.h"
14451
14452 #ifdef HAVE_SYS_TYPES_H
14453 #include <sys/types.h>
14454 #endif
14455 #ifdef HAVE_SYS_SOCKET_H
14456 #include <sys/socket.h>
14457 #endif
14458
14459 int main() {
14460 socklen_t len;
14461 ; return 0; }
14462 EOF
14463 if { (eval echo configure:14464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14464   rm -rf conftest*
14465   ol_cv_type_socklen_t=yes
14466 else
14467   echo "configure: failed program was:" >&5
14468   cat conftest.$ac_ext >&5
14469   rm -rf conftest*
14470   ol_cv_type_socklen_t=no
14471 fi
14472 rm -f conftest*
14473 fi
14474
14475 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14476   if test $ol_cv_type_socklen_t = no; then
14477     cat >> confdefs.h <<\EOF
14478 #define socklen_t int
14479 EOF
14480
14481   fi
14482  
14483 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14484 echo "configure:14485: checking for member st_blksize in aggregate type struct stat" >&5
14485 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14486   echo $ac_n "(cached) $ac_c" 1>&6
14487 else
14488   cat > conftest.$ac_ext <<EOF
14489 #line 14490 "configure"
14490 #include "confdefs.h"
14491 #include <sys/types.h>
14492 #include <sys/stat.h>
14493 int main() {
14494 struct stat foo; foo.st_blksize;
14495 ; return 0; }
14496 EOF
14497 if { (eval echo configure:14498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14498   rm -rf conftest*
14499   ac_cv_c_struct_member_st_blksize=yes
14500 else
14501   echo "configure: failed program was:" >&5
14502   cat conftest.$ac_ext >&5
14503   rm -rf conftest*
14504   ac_cv_c_struct_member_st_blksize=no
14505 fi
14506 rm -f conftest*
14507 fi
14508
14509 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14510 st_blksize="$ac_cv_c_struct_member_st_blksize"
14511 if test $ac_cv_c_struct_member_st_blksize = yes; then
14512   cat >> confdefs.h <<\EOF
14513 #define HAVE_ST_BLKSIZE 1
14514 EOF
14515
14516 fi
14517
14518 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14519 echo "configure:14520: checking whether time.h and sys/time.h may both be included" >&5
14520 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14521   echo $ac_n "(cached) $ac_c" 1>&6
14522 else
14523   cat > conftest.$ac_ext <<EOF
14524 #line 14525 "configure"
14525 #include "confdefs.h"
14526 #include <sys/types.h>
14527 #include <sys/time.h>
14528 #include <time.h>
14529 int main() {
14530 struct tm *tp;
14531 ; return 0; }
14532 EOF
14533 if { (eval echo configure:14534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14534   rm -rf conftest*
14535   ac_cv_header_time=yes
14536 else
14537   echo "configure: failed program was:" >&5
14538   cat conftest.$ac_ext >&5
14539   rm -rf conftest*
14540   ac_cv_header_time=no
14541 fi
14542 rm -f conftest*
14543 fi
14544
14545 echo "$ac_t""$ac_cv_header_time" 1>&6
14546 if test $ac_cv_header_time = yes; then
14547   cat >> confdefs.h <<\EOF
14548 #define TIME_WITH_SYS_TIME 1
14549 EOF
14550
14551 fi
14552
14553 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14554 echo "configure:14555: checking whether struct tm is in sys/time.h or time.h" >&5
14555 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14556   echo $ac_n "(cached) $ac_c" 1>&6
14557 else
14558   cat > conftest.$ac_ext <<EOF
14559 #line 14560 "configure"
14560 #include "confdefs.h"
14561 #include <sys/types.h>
14562 #include <time.h>
14563 int main() {
14564 struct tm *tp; tp->tm_sec;
14565 ; return 0; }
14566 EOF
14567 if { (eval echo configure:14568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14568   rm -rf conftest*
14569   ac_cv_struct_tm=time.h
14570 else
14571   echo "configure: failed program was:" >&5
14572   cat conftest.$ac_ext >&5
14573   rm -rf conftest*
14574   ac_cv_struct_tm=sys/time.h
14575 fi
14576 rm -f conftest*
14577 fi
14578
14579 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14580 if test $ac_cv_struct_tm = sys/time.h; then
14581   cat >> confdefs.h <<\EOF
14582 #define TM_IN_SYS_TIME 1
14583 EOF
14584
14585 fi
14586
14587 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14588 echo "configure:14589: checking for uid_t in sys/types.h" >&5
14589 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14590   echo $ac_n "(cached) $ac_c" 1>&6
14591 else
14592   cat > conftest.$ac_ext <<EOF
14593 #line 14594 "configure"
14594 #include "confdefs.h"
14595 #include <sys/types.h>
14596 EOF
14597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14598   egrep "uid_t" >/dev/null 2>&1; then
14599   rm -rf conftest*
14600   ac_cv_type_uid_t=yes
14601 else
14602   rm -rf conftest*
14603   ac_cv_type_uid_t=no
14604 fi
14605 rm -f conftest*
14606
14607 fi
14608
14609 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14610 if test $ac_cv_type_uid_t = no; then
14611   cat >> confdefs.h <<\EOF
14612 #define uid_t int
14613 EOF
14614
14615   cat >> confdefs.h <<\EOF
14616 #define gid_t int
14617 EOF
14618
14619 fi
14620
14621 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14622 echo "configure:14623: checking for sig_atomic_t" >&5
14623 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14624   echo $ac_n "(cached) $ac_c" 1>&6
14625 else
14626   cat > conftest.$ac_ext <<EOF
14627 #line 14628 "configure"
14628 #include "confdefs.h"
14629 #include <signal.h>
14630 int main() {
14631 sig_atomic_t atomic;
14632 ; return 0; }
14633 EOF
14634 if { (eval echo configure:14635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14635   rm -rf conftest*
14636   ol_cv_type_sig_atomic_t=yes
14637 else
14638   echo "configure: failed program was:" >&5
14639   cat conftest.$ac_ext >&5
14640   rm -rf conftest*
14641   ol_cv_type_sig_atomic_t=no
14642 fi
14643 rm -f conftest*
14644 fi
14645
14646 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14647   if test $ol_cv_type_sig_atomic_t = no; then
14648     cat >> confdefs.h <<\EOF
14649 #define sig_atomic_t int
14650 EOF
14651
14652   fi
14653  
14654
14655
14656 # test for pw_gecos in struct passwd
14657 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14658 echo "configure:14659: checking struct passwd for pw_gecos" >&5
14659 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14660   echo $ac_n "(cached) $ac_c" 1>&6
14661 else
14662   
14663         cat > conftest.$ac_ext <<EOF
14664 #line 14665 "configure"
14665 #include "confdefs.h"
14666 #include <pwd.h>
14667 int main() {
14668
14669         struct passwd pwd;
14670         pwd.pw_gecos = pwd.pw_name;
14671
14672 ; return 0; }
14673 EOF
14674 if { (eval echo configure:14675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14675   rm -rf conftest*
14676   ol_cv_struct_passwd_pw_gecos=yes
14677 else
14678   echo "configure: failed program was:" >&5
14679   cat conftest.$ac_ext >&5
14680   rm -rf conftest*
14681   ol_cv_struct_passwd_pw_gecos=no
14682 fi
14683 rm -f conftest*
14684 fi
14685
14686 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14687 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14688         cat >> confdefs.h <<\EOF
14689 #define HAVE_PW_GECOS 1
14690 EOF
14691
14692 fi
14693
14694 # test for pw_passwd in struct passwd
14695 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14696 echo "configure:14697: checking struct passwd for pw_passwd" >&5
14697 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14698   echo $ac_n "(cached) $ac_c" 1>&6
14699 else
14700   
14701         cat > conftest.$ac_ext <<EOF
14702 #line 14703 "configure"
14703 #include "confdefs.h"
14704 #include <pwd.h>
14705 int main() {
14706
14707         struct passwd pwd;
14708         pwd.pw_passwd = pwd.pw_name;
14709
14710 ; return 0; }
14711 EOF
14712 if { (eval echo configure:14713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14713   rm -rf conftest*
14714   ol_cv_struct_passwd_pw_passwd=yes
14715 else
14716   echo "configure: failed program was:" >&5
14717   cat conftest.$ac_ext >&5
14718   rm -rf conftest*
14719   ol_cv_struct_passwd_pw_passwd=no
14720 fi
14721 rm -f conftest*
14722 fi
14723
14724 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14725 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14726         cat >> confdefs.h <<\EOF
14727 #define HAVE_PW_PASSWD 1
14728 EOF
14729
14730 fi
14731
14732
14733 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14734 echo "configure:14735: checking if toupper() requires islower()" >&5
14735 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14736   echo $ac_n "(cached) $ac_c" 1>&6
14737 else
14738   
14739         if test "$cross_compiling" = yes; then
14740   ol_cv_c_upper_lower=safe
14741 else
14742   cat > conftest.$ac_ext <<EOF
14743 #line 14744 "configure"
14744 #include "confdefs.h"
14745
14746 #include <ctype.h>
14747 main()
14748 {
14749         if ('C' == toupper('C'))
14750                 exit(0);
14751         else
14752                 exit(1);
14753 }
14754 EOF
14755 if { (eval echo configure:14756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14756 then
14757   ol_cv_c_upper_lower=no
14758 else
14759   echo "configure: failed program was:" >&5
14760   cat conftest.$ac_ext >&5
14761   rm -fr conftest*
14762   ol_cv_c_upper_lower=yes
14763 fi
14764 rm -fr conftest*
14765 fi
14766
14767 fi
14768
14769 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14770 if test $ol_cv_c_upper_lower != no ; then
14771         cat >> confdefs.h <<\EOF
14772 #define C_UPPER_LOWER 1
14773 EOF
14774
14775 fi
14776
14777 echo $ac_n "checking for working const""... $ac_c" 1>&6
14778 echo "configure:14779: checking for working const" >&5
14779 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14780   echo $ac_n "(cached) $ac_c" 1>&6
14781 else
14782   cat > conftest.$ac_ext <<EOF
14783 #line 14784 "configure"
14784 #include "confdefs.h"
14785
14786 int main() {
14787
14788 /* Ultrix mips cc rejects this.  */
14789 typedef int charset[2]; const charset x;
14790 /* SunOS 4.1.1 cc rejects this.  */
14791 char const *const *ccp;
14792 char **p;
14793 /* NEC SVR4.0.2 mips cc rejects this.  */
14794 struct point {int x, y;};
14795 static struct point const zero = {0,0};
14796 /* AIX XL C 1.02.0.0 rejects this.
14797    It does not let you subtract one const X* pointer from another in an arm
14798    of an if-expression whose if-part is not a constant expression */
14799 const char *g = "string";
14800 ccp = &g + (g ? g-g : 0);
14801 /* HPUX 7.0 cc rejects these. */
14802 ++ccp;
14803 p = (char**) ccp;
14804 ccp = (char const *const *) p;
14805 { /* SCO 3.2v4 cc rejects this.  */
14806   char *t;
14807   char const *s = 0 ? (char *) 0 : (char const *) 0;
14808
14809   *t++ = 0;
14810 }
14811 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14812   int x[] = {25, 17};
14813   const int *foo = &x[0];
14814   ++foo;
14815 }
14816 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14817   typedef const int *iptr;
14818   iptr p = 0;
14819   ++p;
14820 }
14821 { /* AIX XL C 1.02.0.0 rejects this saying
14822      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14823   struct s { int j; const int *ap[3]; };
14824   struct s *b; b->j = 5;
14825 }
14826 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14827   const int foo = 10;
14828 }
14829
14830 ; return 0; }
14831 EOF
14832 if { (eval echo configure:14833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14833   rm -rf conftest*
14834   ac_cv_c_const=yes
14835 else
14836   echo "configure: failed program was:" >&5
14837   cat conftest.$ac_ext >&5
14838   rm -rf conftest*
14839   ac_cv_c_const=no
14840 fi
14841 rm -f conftest*
14842 fi
14843
14844 echo "$ac_t""$ac_cv_c_const" 1>&6
14845 if test $ac_cv_c_const = no; then
14846   cat >> confdefs.h <<\EOF
14847 #define const 
14848 EOF
14849
14850 fi
14851
14852 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14853 echo "configure:14854: checking if compiler understands volatile" >&5
14854 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14855   echo $ac_n "(cached) $ac_c" 1>&6
14856 else
14857   cat > conftest.$ac_ext <<EOF
14858 #line 14859 "configure"
14859 #include "confdefs.h"
14860 int x, y, z;
14861 int main() {
14862 volatile int a; int * volatile b = x ? &y : &z;
14863       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14864       *b = 0;
14865 ; return 0; }
14866 EOF
14867 if { (eval echo configure:14868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14868   rm -rf conftest*
14869   ol_cv_c_volatile=yes
14870 else
14871   echo "configure: failed program was:" >&5
14872   cat conftest.$ac_ext >&5
14873   rm -rf conftest*
14874   ol_cv_c_volatile=no
14875 fi
14876 rm -f conftest*
14877 fi
14878
14879 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14880   if test $ol_cv_c_volatile = yes; then
14881     : 
14882   else
14883     cat >> confdefs.h <<\EOF
14884 #define volatile 
14885 EOF
14886
14887   fi
14888  
14889
14890 if test $cross_compiling = yes ; then
14891         cat >> confdefs.h <<\EOF
14892 #define CROSS_COMPILING 1
14893 EOF
14894
14895 else
14896         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14897 echo "configure:14898: checking whether byte ordering is bigendian" >&5
14898 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14899   echo $ac_n "(cached) $ac_c" 1>&6
14900 else
14901   ac_cv_c_bigendian=unknown
14902 # See if sys/param.h defines the BYTE_ORDER macro.
14903 cat > conftest.$ac_ext <<EOF
14904 #line 14905 "configure"
14905 #include "confdefs.h"
14906 #include <sys/types.h>
14907 #include <sys/param.h>
14908 int main() {
14909
14910 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14911  bogus endian macros
14912 #endif
14913 ; return 0; }
14914 EOF
14915 if { (eval echo configure:14916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14916   rm -rf conftest*
14917   # It does; now see whether it defined to BIG_ENDIAN or not.
14918 cat > conftest.$ac_ext <<EOF
14919 #line 14920 "configure"
14920 #include "confdefs.h"
14921 #include <sys/types.h>
14922 #include <sys/param.h>
14923 int main() {
14924
14925 #if BYTE_ORDER != BIG_ENDIAN
14926  not big endian
14927 #endif
14928 ; return 0; }
14929 EOF
14930 if { (eval echo configure:14931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14931   rm -rf conftest*
14932   ac_cv_c_bigendian=yes
14933 else
14934   echo "configure: failed program was:" >&5
14935   cat conftest.$ac_ext >&5
14936   rm -rf conftest*
14937   ac_cv_c_bigendian=no
14938 fi
14939 rm -f conftest*
14940 else
14941   echo "configure: failed program was:" >&5
14942   cat conftest.$ac_ext >&5
14943 fi
14944 rm -f conftest*
14945 if test $ac_cv_c_bigendian = unknown; then
14946 if test "$cross_compiling" = yes; then
14947     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14948 else
14949   cat > conftest.$ac_ext <<EOF
14950 #line 14951 "configure"
14951 #include "confdefs.h"
14952 main () {
14953   /* Are we little or big endian?  From Harbison&Steele.  */
14954   union
14955   {
14956     long l;
14957     char c[sizeof (long)];
14958   } u;
14959   u.l = 1;
14960   exit (u.c[sizeof (long) - 1] == 1);
14961 }
14962 EOF
14963 if { (eval echo configure:14964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14964 then
14965   ac_cv_c_bigendian=no
14966 else
14967   echo "configure: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969   rm -fr conftest*
14970   ac_cv_c_bigendian=yes
14971 fi
14972 rm -fr conftest*
14973 fi
14974
14975 fi
14976 fi
14977
14978 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14979 if test $ac_cv_c_bigendian = yes; then
14980   cat >> confdefs.h <<\EOF
14981 #define WORDS_BIGENDIAN 1
14982 EOF
14983
14984 fi
14985
14986 fi
14987
14988 echo $ac_n "checking size of short""... $ac_c" 1>&6
14989 echo "configure:14990: checking size of short" >&5 
14990 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14991   echo $ac_n "(cached) $ac_c" 1>&6
14992 else
14993   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14994   cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997 #include "confdefs.h" 
14998 #include <sys/types.h> 
14999  
15000
15001 int main() {
15002 switch (0) case 0: case (sizeof (short) == $ac_size):;
15003 ; return 0; }
15004 EOF
15005 if { (eval echo configure:15006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15006   rm -rf conftest*
15007   ac_cv_sizeof_short=$ac_size
15008 else
15009   echo "configure: failed program was:" >&5
15010   cat conftest.$ac_ext >&5
15011 fi
15012 rm -f conftest* 
15013   if test x$ac_cv_sizeof_short != x ; then break; fi 
15014 done 
15015
15016 fi
15017  
15018 if test x$ac_cv_sizeof_short = x ; then 
15019   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15020 fi 
15021 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15022 cat >> confdefs.h <<EOF
15023 #define SIZEOF_SHORT $ac_cv_sizeof_short
15024 EOF
15025  
15026  
15027 echo $ac_n "checking size of int""... $ac_c" 1>&6
15028 echo "configure:15029: checking size of int" >&5 
15029 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15030   echo $ac_n "(cached) $ac_c" 1>&6
15031 else
15032   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15033   cat > conftest.$ac_ext <<EOF
15034 #line 15035 "configure"
15035 #include "confdefs.h"
15036 #include "confdefs.h" 
15037 #include <sys/types.h> 
15038  
15039
15040 int main() {
15041 switch (0) case 0: case (sizeof (int) == $ac_size):;
15042 ; return 0; }
15043 EOF
15044 if { (eval echo configure:15045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15045   rm -rf conftest*
15046   ac_cv_sizeof_int=$ac_size
15047 else
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050 fi
15051 rm -f conftest* 
15052   if test x$ac_cv_sizeof_int != x ; then break; fi 
15053 done 
15054
15055 fi
15056  
15057 if test x$ac_cv_sizeof_int = x ; then 
15058   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15059 fi 
15060 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15061 cat >> confdefs.h <<EOF
15062 #define SIZEOF_INT $ac_cv_sizeof_int
15063 EOF
15064  
15065  
15066 echo $ac_n "checking size of long""... $ac_c" 1>&6
15067 echo "configure:15068: checking size of long" >&5 
15068 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15069   echo $ac_n "(cached) $ac_c" 1>&6
15070 else
15071   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15072   cat > conftest.$ac_ext <<EOF
15073 #line 15074 "configure"
15074 #include "confdefs.h"
15075 #include "confdefs.h" 
15076 #include <sys/types.h> 
15077  
15078
15079 int main() {
15080 switch (0) case 0: case (sizeof (long) == $ac_size):;
15081 ; return 0; }
15082 EOF
15083 if { (eval echo configure:15084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15084   rm -rf conftest*
15085   ac_cv_sizeof_long=$ac_size
15086 else
15087   echo "configure: failed program was:" >&5
15088   cat conftest.$ac_ext >&5
15089 fi
15090 rm -f conftest* 
15091   if test x$ac_cv_sizeof_long != x ; then break; fi 
15092 done 
15093
15094 fi
15095  
15096 if test x$ac_cv_sizeof_long = x ; then 
15097   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15098 fi 
15099 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15100 cat >> confdefs.h <<EOF
15101 #define SIZEOF_LONG $ac_cv_sizeof_long
15102 EOF
15103  
15104
15105
15106 if test "$ac_cv_sizeof_int" -lt 4 ; then
15107         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15108
15109         cat >> confdefs.h <<\EOF
15110 #define LBER_INT_T long
15111 EOF
15112
15113 else
15114         cat >> confdefs.h <<\EOF
15115 #define LBER_INT_T int
15116 EOF
15117
15118 fi
15119
15120 cat >> confdefs.h <<\EOF
15121 #define LBER_LEN_T long
15122 EOF
15123
15124 cat >> confdefs.h <<\EOF
15125 #define LBER_SOCKET_T int
15126 EOF
15127
15128 cat >> confdefs.h <<\EOF
15129 #define LBER_TAG_T long
15130 EOF
15131
15132
15133 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15134 echo "configure:15135: checking for 8-bit clean memcmp" >&5
15135 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15136   echo $ac_n "(cached) $ac_c" 1>&6
15137 else
15138   if test "$cross_compiling" = yes; then
15139   ac_cv_func_memcmp_clean=no
15140 else
15141   cat > conftest.$ac_ext <<EOF
15142 #line 15143 "configure"
15143 #include "confdefs.h"
15144
15145 main()
15146 {
15147   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15148   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15149 }
15150
15151 EOF
15152 if { (eval echo configure:15153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15153 then
15154   ac_cv_func_memcmp_clean=yes
15155 else
15156   echo "configure: failed program was:" >&5
15157   cat conftest.$ac_ext >&5
15158   rm -fr conftest*
15159   ac_cv_func_memcmp_clean=no
15160 fi
15161 rm -fr conftest*
15162 fi
15163
15164 fi
15165
15166 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15167 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15168
15169 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15170 echo "configure:15171: checking for strftime" >&5
15171 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15172   echo $ac_n "(cached) $ac_c" 1>&6
15173 else
15174   cat > conftest.$ac_ext <<EOF
15175 #line 15176 "configure"
15176 #include "confdefs.h"
15177 /* System header to define __stub macros and hopefully few prototypes,
15178     which can conflict with char strftime(); below.  */
15179 #include <assert.h>
15180 /* Override any gcc2 internal prototype to avoid an error.  */
15181 /* We use char because int might match the return type of a gcc2
15182     builtin and then its argument prototype would still apply.  */
15183 char strftime();
15184 char (*f)();
15185
15186 int main() {
15187
15188 /* The GNU C library defines this for functions which it implements
15189     to always fail with ENOSYS.  Some functions are actually named
15190     something starting with __ and the normal name is an alias.  */
15191 #if defined (__stub_strftime) || defined (__stub___strftime)
15192 choke me
15193 #else
15194 f = strftime;
15195 #endif
15196
15197 ; return 0; }
15198 EOF
15199 if { (eval echo configure:15200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15200   rm -rf conftest*
15201   eval "ac_cv_func_strftime=yes"
15202 else
15203   echo "configure: failed program was:" >&5
15204   cat conftest.$ac_ext >&5
15205   rm -rf conftest*
15206   eval "ac_cv_func_strftime=no"
15207 fi
15208 rm -f conftest*
15209 fi
15210
15211 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15212   echo "$ac_t""yes" 1>&6
15213   cat >> confdefs.h <<\EOF
15214 #define HAVE_STRFTIME 1
15215 EOF
15216
15217 else
15218   echo "$ac_t""no" 1>&6
15219 # strftime is in -lintl on SCO UNIX.
15220 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15221 echo "configure:15222: checking for strftime in -lintl" >&5
15222 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15224   echo $ac_n "(cached) $ac_c" 1>&6
15225 else
15226   ac_save_LIBS="$LIBS"
15227 LIBS="-lintl  $LIBS"
15228 cat > conftest.$ac_ext <<EOF
15229 #line 15230 "configure"
15230 #include "confdefs.h"
15231 /* Override any gcc2 internal prototype to avoid an error.  */
15232 /* We use char because int might match the return type of a gcc2
15233     builtin and then its argument prototype would still apply.  */
15234 char strftime();
15235
15236 int main() {
15237 strftime()
15238 ; return 0; }
15239 EOF
15240 if { (eval echo configure:15241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15241   rm -rf conftest*
15242   eval "ac_cv_lib_$ac_lib_var=yes"
15243 else
15244   echo "configure: failed program was:" >&5
15245   cat conftest.$ac_ext >&5
15246   rm -rf conftest*
15247   eval "ac_cv_lib_$ac_lib_var=no"
15248 fi
15249 rm -f conftest*
15250 LIBS="$ac_save_LIBS"
15251
15252 fi
15253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15254   echo "$ac_t""yes" 1>&6
15255   cat >> confdefs.h <<\EOF
15256 #define HAVE_STRFTIME 1
15257 EOF
15258
15259 LIBS="-lintl $LIBS"
15260 else
15261   echo "$ac_t""no" 1>&6
15262 fi
15263
15264 fi
15265
15266
15267 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15268 echo "configure:15269: checking for inet_aton()" >&5
15269 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15270   echo $ac_n "(cached) $ac_c" 1>&6
15271 else
15272   cat > conftest.$ac_ext <<EOF
15273 #line 15274 "configure"
15274 #include "confdefs.h"
15275
15276 #ifdef HAVE_SYS_TYPES_H
15277 #       include <sys/types.h>
15278 #endif
15279 #ifdef HAVE_SYS_SOCKET_H
15280 #       include <sys/socket.h>
15281 #       ifdef HAVE_SYS_SELECT_H
15282 #               include <sys/select.h>
15283 #       endif
15284 #       include <netinet/in.h>
15285 #       ifdef HAVE_ARPA_INET_H
15286 #               include <arpa/inet.h>
15287 #       endif
15288 #endif
15289
15290 int main() {
15291 struct in_addr in;
15292 int rc = inet_aton( "255.255.255.255", &in );
15293 ; return 0; }
15294 EOF
15295 if { (eval echo configure:15296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15296   rm -rf conftest*
15297   ol_cv_func_inet_aton=yes
15298 else
15299   echo "configure: failed program was:" >&5
15300   cat conftest.$ac_ext >&5
15301   rm -rf conftest*
15302   ol_cv_func_inet_aton=no
15303 fi
15304 rm -f conftest*
15305 fi
15306
15307 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15308   if test $ol_cv_func_inet_aton != no; then
15309     cat >> confdefs.h <<\EOF
15310 #define HAVE_INET_ATON 1
15311 EOF
15312
15313   fi
15314  
15315
15316 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15317 echo "configure:15318: checking for _spawnlp" >&5
15318 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15319   echo $ac_n "(cached) $ac_c" 1>&6
15320 else
15321   cat > conftest.$ac_ext <<EOF
15322 #line 15323 "configure"
15323 #include "confdefs.h"
15324 /* System header to define __stub macros and hopefully few prototypes,
15325     which can conflict with char _spawnlp(); below.  */
15326 #include <assert.h>
15327 /* Override any gcc2 internal prototype to avoid an error.  */
15328 /* We use char because int might match the return type of a gcc2
15329     builtin and then its argument prototype would still apply.  */
15330 char _spawnlp();
15331 char (*f)();
15332
15333 int main() {
15334
15335 /* The GNU C library defines this for functions which it implements
15336     to always fail with ENOSYS.  Some functions are actually named
15337     something starting with __ and the normal name is an alias.  */
15338 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15339 choke me
15340 #else
15341 f = _spawnlp;
15342 #endif
15343
15344 ; return 0; }
15345 EOF
15346 if { (eval echo configure:15347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15347   rm -rf conftest*
15348   eval "ac_cv_func__spawnlp=yes"
15349 else
15350   echo "configure: failed program was:" >&5
15351   cat conftest.$ac_ext >&5
15352   rm -rf conftest*
15353   eval "ac_cv_func__spawnlp=no"
15354 fi
15355 rm -f conftest*
15356 fi
15357
15358 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15359   echo "$ac_t""yes" 1>&6
15360   cat >> confdefs.h <<\EOF
15361 #define HAVE_SPAWNLP 1
15362 EOF
15363
15364 else
15365   echo "$ac_t""no" 1>&6
15366 fi
15367
15368
15369 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15370 echo "configure:15371: checking for _snprintf" >&5
15371 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15372   echo $ac_n "(cached) $ac_c" 1>&6
15373 else
15374   cat > conftest.$ac_ext <<EOF
15375 #line 15376 "configure"
15376 #include "confdefs.h"
15377 /* System header to define __stub macros and hopefully few prototypes,
15378     which can conflict with char _snprintf(); below.  */
15379 #include <assert.h>
15380 /* Override any gcc2 internal prototype to avoid an error.  */
15381 /* We use char because int might match the return type of a gcc2
15382     builtin and then its argument prototype would still apply.  */
15383 char _snprintf();
15384 char (*f)();
15385
15386 int main() {
15387
15388 /* The GNU C library defines this for functions which it implements
15389     to always fail with ENOSYS.  Some functions are actually named
15390     something starting with __ and the normal name is an alias.  */
15391 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15392 choke me
15393 #else
15394 f = _snprintf;
15395 #endif
15396
15397 ; return 0; }
15398 EOF
15399 if { (eval echo configure:15400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15400   rm -rf conftest*
15401   eval "ac_cv_func__snprintf=yes"
15402 else
15403   echo "configure: failed program was:" >&5
15404   cat conftest.$ac_ext >&5
15405   rm -rf conftest*
15406   eval "ac_cv_func__snprintf=no"
15407 fi
15408 rm -f conftest*
15409 fi
15410
15411 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15412   echo "$ac_t""yes" 1>&6
15413   ac_cv_func_snprintf=yes
15414         cat >> confdefs.h <<\EOF
15415 #define snprintf _snprintf
15416 EOF
15417
15418
15419 else
15420   echo "$ac_t""no" 1>&6
15421 fi
15422
15423
15424 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15425 echo "configure:15426: checking for _vsnprintf" >&5
15426 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15427   echo $ac_n "(cached) $ac_c" 1>&6
15428 else
15429   cat > conftest.$ac_ext <<EOF
15430 #line 15431 "configure"
15431 #include "confdefs.h"
15432 /* System header to define __stub macros and hopefully few prototypes,
15433     which can conflict with char _vsnprintf(); below.  */
15434 #include <assert.h>
15435 /* Override any gcc2 internal prototype to avoid an error.  */
15436 /* We use char because int might match the return type of a gcc2
15437     builtin and then its argument prototype would still apply.  */
15438 char _vsnprintf();
15439 char (*f)();
15440
15441 int main() {
15442
15443 /* The GNU C library defines this for functions which it implements
15444     to always fail with ENOSYS.  Some functions are actually named
15445     something starting with __ and the normal name is an alias.  */
15446 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15447 choke me
15448 #else
15449 f = _vsnprintf;
15450 #endif
15451
15452 ; return 0; }
15453 EOF
15454 if { (eval echo configure:15455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15455   rm -rf conftest*
15456   eval "ac_cv_func__vsnprintf=yes"
15457 else
15458   echo "configure: failed program was:" >&5
15459   cat conftest.$ac_ext >&5
15460   rm -rf conftest*
15461   eval "ac_cv_func__vsnprintf=no"
15462 fi
15463 rm -f conftest*
15464 fi
15465
15466 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15467   echo "$ac_t""yes" 1>&6
15468   ac_cv_func_vsnprintf=yes
15469         cat >> confdefs.h <<\EOF
15470 #define vsnprintf _vsnprintf
15471 EOF
15472
15473
15474 else
15475   echo "$ac_t""no" 1>&6
15476 fi
15477
15478
15479 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15480 echo "configure:15481: checking for vprintf" >&5
15481 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15482   echo $ac_n "(cached) $ac_c" 1>&6
15483 else
15484   cat > conftest.$ac_ext <<EOF
15485 #line 15486 "configure"
15486 #include "confdefs.h"
15487 /* System header to define __stub macros and hopefully few prototypes,
15488     which can conflict with char vprintf(); below.  */
15489 #include <assert.h>
15490 /* Override any gcc2 internal prototype to avoid an error.  */
15491 /* We use char because int might match the return type of a gcc2
15492     builtin and then its argument prototype would still apply.  */
15493 char vprintf();
15494 char (*f)();
15495
15496 int main() {
15497
15498 /* The GNU C library defines this for functions which it implements
15499     to always fail with ENOSYS.  Some functions are actually named
15500     something starting with __ and the normal name is an alias.  */
15501 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15502 choke me
15503 #else
15504 f = vprintf;
15505 #endif
15506
15507 ; return 0; }
15508 EOF
15509 if { (eval echo configure:15510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15510   rm -rf conftest*
15511   eval "ac_cv_func_vprintf=yes"
15512 else
15513   echo "configure: failed program was:" >&5
15514   cat conftest.$ac_ext >&5
15515   rm -rf conftest*
15516   eval "ac_cv_func_vprintf=no"
15517 fi
15518 rm -f conftest*
15519 fi
15520
15521 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15522   echo "$ac_t""yes" 1>&6
15523   cat >> confdefs.h <<\EOF
15524 #define HAVE_VPRINTF 1
15525 EOF
15526
15527 else
15528   echo "$ac_t""no" 1>&6
15529 fi
15530
15531 if test "$ac_cv_func_vprintf" != yes; then
15532 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15533 echo "configure:15534: checking for _doprnt" >&5
15534 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15535   echo $ac_n "(cached) $ac_c" 1>&6
15536 else
15537   cat > conftest.$ac_ext <<EOF
15538 #line 15539 "configure"
15539 #include "confdefs.h"
15540 /* System header to define __stub macros and hopefully few prototypes,
15541     which can conflict with char _doprnt(); below.  */
15542 #include <assert.h>
15543 /* Override any gcc2 internal prototype to avoid an error.  */
15544 /* We use char because int might match the return type of a gcc2
15545     builtin and then its argument prototype would still apply.  */
15546 char _doprnt();
15547 char (*f)();
15548
15549 int main() {
15550
15551 /* The GNU C library defines this for functions which it implements
15552     to always fail with ENOSYS.  Some functions are actually named
15553     something starting with __ and the normal name is an alias.  */
15554 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15555 choke me
15556 #else
15557 f = _doprnt;
15558 #endif
15559
15560 ; return 0; }
15561 EOF
15562 if { (eval echo configure:15563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15563   rm -rf conftest*
15564   eval "ac_cv_func__doprnt=yes"
15565 else
15566   echo "configure: failed program was:" >&5
15567   cat conftest.$ac_ext >&5
15568   rm -rf conftest*
15569   eval "ac_cv_func__doprnt=no"
15570 fi
15571 rm -f conftest*
15572 fi
15573
15574 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15575   echo "$ac_t""yes" 1>&6
15576   cat >> confdefs.h <<\EOF
15577 #define HAVE_DOPRNT 1
15578 EOF
15579
15580 else
15581   echo "$ac_t""no" 1>&6
15582 fi
15583
15584 fi
15585
15586
15587 if test $ac_cv_func_vprintf = yes ; then
15588                 for ac_func in vsnprintf vsprintf
15589 do
15590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15591 echo "configure:15592: checking for $ac_func" >&5
15592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15593   echo $ac_n "(cached) $ac_c" 1>&6
15594 else
15595   cat > conftest.$ac_ext <<EOF
15596 #line 15597 "configure"
15597 #include "confdefs.h"
15598 /* System header to define __stub macros and hopefully few prototypes,
15599     which can conflict with char $ac_func(); below.  */
15600 #include <assert.h>
15601 /* Override any gcc2 internal prototype to avoid an error.  */
15602 /* We use char because int might match the return type of a gcc2
15603     builtin and then its argument prototype would still apply.  */
15604 char $ac_func();
15605 char (*f)();
15606
15607 int main() {
15608
15609 /* The GNU C library defines this for functions which it implements
15610     to always fail with ENOSYS.  Some functions are actually named
15611     something starting with __ and the normal name is an alias.  */
15612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15613 choke me
15614 #else
15615 f = $ac_func;
15616 #endif
15617
15618 ; return 0; }
15619 EOF
15620 if { (eval echo configure:15621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15621   rm -rf conftest*
15622   eval "ac_cv_func_$ac_func=yes"
15623 else
15624   echo "configure: failed program was:" >&5
15625   cat conftest.$ac_ext >&5
15626   rm -rf conftest*
15627   eval "ac_cv_func_$ac_func=no"
15628 fi
15629 rm -f conftest*
15630 fi
15631
15632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15633   echo "$ac_t""yes" 1>&6
15634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15635   cat >> confdefs.h <<EOF
15636 #define $ac_tr_func 1
15637 EOF
15638  
15639 else
15640   echo "$ac_t""no" 1>&6
15641 fi
15642 done
15643
15644 fi
15645
15646 for ac_func in \
15647         bcopy                   \
15648         closesocket             \
15649         chroot                  \
15650         endgrent                \
15651         endpwent                \
15652         flock                   \
15653         getdtablesize   \
15654         getgrgid                \
15655         gethostname             \
15656         getpass                 \
15657         getpassphrase   \
15658         getpwuid                \
15659         getpwnam                \
15660         getspnam                \
15661         gettimeofday    \
15662         initgroups              \
15663         lockf                   \
15664         memcpy                  \
15665         memmove                 \
15666         mkstemp                 \
15667         pipe                    \
15668         read                    \
15669         recv                    \
15670         recvfrom                \
15671         setpwfile               \
15672         setgid                  \
15673         setegid                 \
15674         setsid                  \
15675         setuid                  \
15676         seteuid                 \
15677         sigaction               \
15678         signal                  \
15679         sigset                  \
15680         snprintf                \
15681         strdup                  \
15682         strerror                \
15683         strpbrk                 \
15684         strrchr                 \
15685         strsep                  \
15686         strstr                  \
15687         strtol                  \
15688         strtoul                 \
15689         strspn                  \
15690         sysconf                 \
15691         waitpid                 \
15692         wait4                   \
15693         write                   \
15694         send                    \
15695         sendto                  \
15696
15697 do
15698 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15699 echo "configure:15700: checking for $ac_func" >&5
15700 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15701   echo $ac_n "(cached) $ac_c" 1>&6
15702 else
15703   cat > conftest.$ac_ext <<EOF
15704 #line 15705 "configure"
15705 #include "confdefs.h"
15706 /* System header to define __stub macros and hopefully few prototypes,
15707     which can conflict with char $ac_func(); below.  */
15708 #include <assert.h>
15709 /* Override any gcc2 internal prototype to avoid an error.  */
15710 /* We use char because int might match the return type of a gcc2
15711     builtin and then its argument prototype would still apply.  */
15712 char $ac_func();
15713 char (*f)();
15714
15715 int main() {
15716
15717 /* The GNU C library defines this for functions which it implements
15718     to always fail with ENOSYS.  Some functions are actually named
15719     something starting with __ and the normal name is an alias.  */
15720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15721 choke me
15722 #else
15723 f = $ac_func;
15724 #endif
15725
15726 ; return 0; }
15727 EOF
15728 if { (eval echo configure:15729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15729   rm -rf conftest*
15730   eval "ac_cv_func_$ac_func=yes"
15731 else
15732   echo "configure: failed program was:" >&5
15733   cat conftest.$ac_ext >&5
15734   rm -rf conftest*
15735   eval "ac_cv_func_$ac_func=no"
15736 fi
15737 rm -f conftest*
15738 fi
15739
15740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15741   echo "$ac_t""yes" 1>&6
15742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15743   cat >> confdefs.h <<EOF
15744 #define $ac_tr_func 1
15745 EOF
15746  
15747 else
15748   echo "$ac_t""no" 1>&6
15749 fi
15750 done
15751
15752
15753 for ac_func in getopt tempnam
15754 do
15755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15756 echo "configure:15757: checking for $ac_func" >&5
15757 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15758   echo $ac_n "(cached) $ac_c" 1>&6
15759 else
15760   cat > conftest.$ac_ext <<EOF
15761 #line 15762 "configure"
15762 #include "confdefs.h"
15763 /* System header to define __stub macros and hopefully few prototypes,
15764     which can conflict with char $ac_func(); below.  */
15765 #include <assert.h>
15766 /* Override any gcc2 internal prototype to avoid an error.  */
15767 /* We use char because int might match the return type of a gcc2
15768     builtin and then its argument prototype would still apply.  */
15769 char $ac_func();
15770 char (*f)();
15771
15772 int main() {
15773
15774 /* The GNU C library defines this for functions which it implements
15775     to always fail with ENOSYS.  Some functions are actually named
15776     something starting with __ and the normal name is an alias.  */
15777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15778 choke me
15779 #else
15780 f = $ac_func;
15781 #endif
15782
15783 ; return 0; }
15784 EOF
15785 if { (eval echo configure:15786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15786   rm -rf conftest*
15787   eval "ac_cv_func_$ac_func=yes"
15788 else
15789   echo "configure: failed program was:" >&5
15790   cat conftest.$ac_ext >&5
15791   rm -rf conftest*
15792   eval "ac_cv_func_$ac_func=no"
15793 fi
15794 rm -f conftest*
15795 fi
15796
15797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15798   echo "$ac_t""yes" 1>&6
15799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15800   cat >> confdefs.h <<EOF
15801 #define $ac_tr_func 1
15802 EOF
15803  
15804 else
15805   echo "$ac_t""no" 1>&6
15806 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15807 fi
15808 done
15809
15810
15811
15812 if test "$ac_cv_func_getopt" != yes; then
15813     LIBSRCS="$LIBSRCS getopt.c"
15814 fi
15815
15816 if test "$ac_cv_func_tempnam" != yes; then
15817     LIBSRCS="$LIBSRCS tempnam.c"
15818 fi
15819
15820 # Check Configuration
15821 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15822 echo "configure:15823: checking declaration of sys_errlist" >&5
15823 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15824   echo $ac_n "(cached) $ac_c" 1>&6
15825 else
15826   
15827         cat > conftest.$ac_ext <<EOF
15828 #line 15829 "configure"
15829 #include "confdefs.h"
15830
15831 #include <stdio.h>
15832 #include <sys/types.h>
15833 #include <errno.h>
15834 #ifdef WINNT
15835 #include <stdlib.h>
15836 #endif 
15837 int main() {
15838 char *c = (char *) *sys_errlist
15839 ; return 0; }
15840 EOF
15841 if { (eval echo configure:15842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15842   rm -rf conftest*
15843   ol_cv_dcl_sys_errlist=yes
15844         ol_cv_have_sys_errlist=yes
15845 else
15846   echo "configure: failed program was:" >&5
15847   cat conftest.$ac_ext >&5
15848   rm -rf conftest*
15849   ol_cv_dcl_sys_errlist=no
15850 fi
15851 rm -f conftest*
15852 fi
15853
15854 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15855 #
15856 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15857 if test $ol_cv_dcl_sys_errlist = no ; then
15858         cat >> confdefs.h <<\EOF
15859 #define DECL_SYS_ERRLIST 1
15860 EOF
15861
15862
15863         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15864 echo "configure:15865: checking existence of sys_errlist" >&5
15865 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15866   echo $ac_n "(cached) $ac_c" 1>&6
15867 else
15868   
15869                 cat > conftest.$ac_ext <<EOF
15870 #line 15871 "configure"
15871 #include "confdefs.h"
15872 #include <errno.h>
15873 int main() {
15874 char *c = (char *) *sys_errlist
15875 ; return 0; }
15876 EOF
15877 if { (eval echo configure:15878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15878   rm -rf conftest*
15879   ol_cv_have_sys_errlist=yes
15880 else
15881   echo "configure: failed program was:" >&5
15882   cat conftest.$ac_ext >&5
15883   rm -rf conftest*
15884   ol_cv_have_sys_errlist=no
15885 fi
15886 rm -f conftest*
15887 fi
15888
15889 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15890 fi
15891 if test $ol_cv_have_sys_errlist = yes ; then
15892         cat >> confdefs.h <<\EOF
15893 #define HAVE_SYS_ERRLIST 1
15894 EOF
15895
15896 fi
15897
15898
15899
15900 if test "$ol_enable_debug" != no ; then
15901         cat >> confdefs.h <<\EOF
15902 #define LDAP_DEBUG 1
15903 EOF
15904
15905 fi
15906 if test "$ol_enable_syslog" = yes ; then
15907         cat >> confdefs.h <<\EOF
15908 #define LDAP_SYSLOG 1
15909 EOF
15910
15911 fi
15912 if test "$ol_enable_cache" = no ; then
15913         cat >> confdefs.h <<\EOF
15914 #define LDAP_NOCACHE 1
15915 EOF
15916
15917 fi
15918 if test "$ol_link_kbind" != no ; then
15919         cat >> confdefs.h <<\EOF
15920 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15921 EOF
15922
15923 fi
15924 if test "$ol_enable_proctitle" != no ; then
15925         cat >> confdefs.h <<\EOF
15926 #define LDAP_PROCTITLE 1
15927 EOF
15928
15929 fi
15930 if test "$ol_enable_referrals" != no ; then
15931         cat >> confdefs.h <<\EOF
15932 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15933 EOF
15934
15935 fi
15936 if test "$ol_enable_local" != no; then
15937         cat >> confdefs.h <<\EOF
15938 #define LDAP_PF_LOCAL 1
15939 EOF
15940
15941 fi
15942 if test "$ol_enable_ipv6" != no; then
15943         cat >> confdefs.h <<\EOF
15944 #define LDAP_PF_INET6 1
15945 EOF
15946
15947 fi
15948 if test "$ol_enable_cleartext" != no ; then
15949         cat >> confdefs.h <<\EOF
15950 #define SLAPD_CLEARTEXT 1
15951 EOF
15952
15953 fi
15954 if test "$ol_enable_crypt" != no ; then
15955         cat >> confdefs.h <<\EOF
15956 #define SLAPD_CRYPT 1
15957 EOF
15958
15959 fi
15960 if test "$ol_link_kpasswd" != no ; then
15961         cat >> confdefs.h <<\EOF
15962 #define SLAPD_KPASSWD 1
15963 EOF
15964
15965 fi
15966 if test "$ol_link_spasswd" != no ; then
15967         cat >> confdefs.h <<\EOF
15968 #define SLAPD_SPASSWD 1
15969 EOF
15970
15971 fi
15972 if test "$ol_enable_multimaster" != no ; then
15973         cat >> confdefs.h <<\EOF
15974 #define SLAPD_MULTIMASTER 1
15975 EOF
15976
15977 fi
15978 if test "$ol_enable_phonetic" != no ; then
15979         cat >> confdefs.h <<\EOF
15980 #define SLAPD_PHONETIC 1
15981 EOF
15982
15983 fi
15984 if test "$ol_enable_rlookups" != no ; then
15985         cat >> confdefs.h <<\EOF
15986 #define SLAPD_RLOOKUPS 1
15987 EOF
15988
15989 fi
15990 if test "$ol_enable_aci" != no ; then
15991         cat >> confdefs.h <<\EOF
15992 #define SLAPD_ACI_ENABLED 1
15993 EOF
15994
15995 fi
15996
15997 if test "$ol_link_modules" != no ; then
15998         cat >> confdefs.h <<\EOF
15999 #define SLAPD_MODULES 1
16000 EOF
16001
16002         BUILD_SLAPD=yes
16003         SLAPD_MODULES_LDFLAGS="-dlopen self"
16004 fi
16005
16006 if test "$ol_enable_bdb" != no ; then
16007         cat >> confdefs.h <<\EOF
16008 #define SLAPD_BDB 1
16009 EOF
16010
16011         BUILD_SLAPD=yes
16012         BUILD_BDB=yes
16013         if test "$ol_with_bdb_module" != static ; then
16014                 cat >> confdefs.h <<\EOF
16015 #define SLAPD_BDB_DYNAMIC 1
16016 EOF
16017
16018                 BUILD_BDB=mod
16019                 BUILD_BDB_DYNAMIC=shared
16020                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16021         fi
16022 fi
16023
16024 if test "$ol_link_dnssrv" != no ; then
16025         cat >> confdefs.h <<\EOF
16026 #define SLAPD_DNSSRV 1
16027 EOF
16028
16029         BUILD_SLAPD=yes
16030         BUILD_DNSSRV=yes
16031         if test "$ol_with_dnssrv_module" != static ; then
16032                 cat >> confdefs.h <<\EOF
16033 #define SLAPD_DNSSRV_DYNAMIC 1
16034 EOF
16035
16036                 BUILD_DNSSRV=mod
16037                 BUILD_DNSSRV_DYNAMIC=shared
16038                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16039         fi
16040 fi
16041
16042 if test "$ol_enable_ldap" != no ; then
16043         cat >> confdefs.h <<\EOF
16044 #define SLAPD_LDAP 1
16045 EOF
16046
16047         BUILD_SLAPD=yes
16048         BUILD_LDAP=yes
16049         if test "$ol_with_ldap_module" != static ; then
16050                 cat >> confdefs.h <<\EOF
16051 #define SLAPD_LDAP_DYNAMIC 1
16052 EOF
16053
16054                 BUILD_LDAP=mod
16055                 BUILD_LDAP_DYNAMIC=shared
16056                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16057         fi
16058 fi
16059
16060 if test "$ol_link_ldbm" != no ; then
16061         cat >> confdefs.h <<\EOF
16062 #define SLAPD_LDBM 1
16063 EOF
16064
16065         BUILD_SLAPD=yes
16066         BUILD_LDBM=yes
16067         if test "$ol_with_ldbm_module" != static ; then
16068                 cat >> confdefs.h <<\EOF
16069 #define SLAPD_LDBM_DYNAMIC 1
16070 EOF
16071
16072                 BUILD_LDBM=mod
16073                 BUILD_LDBM_DYNAMIC=shared
16074                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16075         fi
16076 fi
16077
16078 if test "$ol_enable_passwd" != no ; then
16079         cat >> confdefs.h <<\EOF
16080 #define SLAPD_PASSWD 1
16081 EOF
16082
16083         BUILD_SLAPD=yes
16084         BUILD_PASSWD=yes
16085         if test "$ol_with_passwd_module" != static ; then
16086                 cat >> confdefs.h <<\EOF
16087 #define SLAPD_PASSWD_DYNAMIC 1
16088 EOF
16089
16090                 BUILD_PASSWD=mod
16091                 BUILD_PASSWD_DYNAMIC=shared
16092                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16093         fi
16094 fi
16095
16096 if test "$ol_link_perl" != no ; then
16097         cat >> confdefs.h <<\EOF
16098 #define SLAPD_PERL 1
16099 EOF
16100
16101         BUILD_SLAPD=yes
16102         BUILD_PERL=yes
16103         if test "$ol_with_perl_module" != static ; then
16104                 cat >> confdefs.h <<\EOF
16105 #define SLAPD_PERL_DYNAMIC 1
16106 EOF
16107
16108                 BUILD_PERL=mod
16109                 BUILD_PERL_DYNAMIC=shared
16110                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16111         fi
16112 fi
16113
16114 if test "$ol_enable_shell" != no ; then
16115         cat >> confdefs.h <<\EOF
16116 #define SLAPD_SHELL 1
16117 EOF
16118
16119         BUILD_SLAPD=yes
16120         BUILD_SHELL=yes
16121         if test "$ol_with_shell_module" != static ; then
16122                 cat >> confdefs.h <<\EOF
16123 #define SLAPD_SHELL_DYNAMIC 1
16124 EOF
16125
16126                 BUILD_SHELL=mod
16127                 BUILD_SHELL_DYNAMIC=shared
16128                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16129         fi
16130 fi
16131
16132 if test "$ol_enable_tcl" != no ; then
16133         cat >> confdefs.h <<\EOF
16134 #define SLAPD_TCL 1
16135 EOF
16136
16137         BUILD_SLAPD=yes
16138         BUILD_TCL=yes
16139         if test "$ol_with_tcl_module" != static; then
16140                 cat >> confdefs.h <<\EOF
16141 #define SLAPD_TCL_DYNAMIC 1
16142 EOF
16143
16144                 BUILD_TCL=mod
16145                 BUILD_TCL_DYNAMIC=shared
16146                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16147         fi
16148 fi
16149
16150 if test "$ol_link_sql" != no ; then
16151         cat >> confdefs.h <<\EOF
16152 #define SLAPD_SQL 1
16153 EOF
16154
16155         BUILD_SLAPD=yes
16156         BUILD_SQL=yes
16157         if test "$ol_with_sql_module" != static; then
16158                 cat >> confdefs.h <<\EOF
16159 #define SLAPD_SQL_DYNAMIC 1
16160 EOF
16161
16162                 BUILD_SQL=mod
16163                 BUILD_SQL_DYNAMIC=shared
16164                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16165         fi
16166 fi
16167
16168 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16169         $BUILD_SLAPD = yes ; then
16170         BUILD_SLURPD=yes
16171 fi
16172
16173
16174 if test "$LINK_BINS_DYNAMIC" = yes; then
16175     LIB_LINKAGE=DYN
16176     LT_LIB_LINKAGE=shared
16177 else
16178     LIB_LINKAGE=STAT
16179     LT_LIB_LINKAGE=static
16180 fi
16181
16182 if test "$ac_cv_mingw32" = yes ; then
16183     PLAT=NT
16184     DYN_EXT=dll
16185 else
16186     PLAT=UNIX
16187     DYN_EXT=so
16188 fi
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198   
16199   
16200   
16201   
16202   
16203   
16204   
16205   
16206   
16207   
16208   
16209   
16210   
16211   
16212   
16213   
16214   
16215   
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251 trap '' 1 2 15
16252
16253 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16254
16255 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16256 # Let make expand exec_prefix.
16257 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16258
16259 # Any assignment to VPATH causes Sun make to only execute
16260 # the first set of double-colon rules, so remove it if not needed.
16261 # If there is a colon in the path, we need to keep it.
16262 if test "x$srcdir" = x.; then
16263   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16264 fi
16265
16266 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16267
16268 DEFS=-DHAVE_CONFIG_H
16269
16270 # Without the "./", some shells look in PATH for config.status.
16271 : ${CONFIG_STATUS=./config.status}
16272
16273 echo creating $CONFIG_STATUS
16274 rm -f $CONFIG_STATUS
16275 cat > $CONFIG_STATUS <<EOF
16276 #! /bin/sh
16277 # Generated automatically by configure.
16278 # Run this file to recreate the current configuration.
16279 # This directory was configured as follows,
16280 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16281 #
16282 # $0 $ac_configure_args
16283 #
16284 # Compiler output produced by configure, useful for debugging
16285 # configure, is in ./config.log if it exists.
16286
16287 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16288 for ac_option
16289 do
16290   case "\$ac_option" in
16291   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16292     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16293     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16294   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16295     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16296     exit 0 ;;
16297   -help | --help | --hel | --he | --h)
16298     echo "\$ac_cs_usage"; exit 0 ;;
16299   *) echo "\$ac_cs_usage"; exit 1 ;;
16300   esac
16301 done
16302
16303 ac_given_srcdir=$srcdir
16304 ac_given_INSTALL="$INSTALL"
16305
16306 trap 'rm -fr `echo "\
16307 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16308 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16309 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16310 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16311 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16312 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16313 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16314 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16315 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16316 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16317 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16318 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16319 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16320 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16321 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16322 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16323 include/Makefile:build/top.mk:include/Makefile.in \
16324 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16325 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16326 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16327 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16328 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16329 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16330 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16331 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16332 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16333 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16334 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16335 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16336 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16337 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16338 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16339 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16340 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16341 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16342 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16343 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16344 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16345 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16346 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16347 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16348 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16349 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16350 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16351 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16352  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16353 EOF
16354 cat >> $CONFIG_STATUS <<EOF
16355
16356 # Protect against being on the right side of a sed subst in config.status.
16357 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16358  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16359 $ac_vpsub
16360 $extrasub
16361 s%@SHELL@%$SHELL%g
16362 s%@CFLAGS@%$CFLAGS%g
16363 s%@CPPFLAGS@%$CPPFLAGS%g
16364 s%@CXXFLAGS@%$CXXFLAGS%g
16365 s%@FFLAGS@%$FFLAGS%g
16366 s%@DEFS@%$DEFS%g
16367 s%@LDFLAGS@%$LDFLAGS%g
16368 s%@LIBS@%$LIBS%g
16369 s%@exec_prefix@%$exec_prefix%g
16370 s%@prefix@%$prefix%g
16371 s%@program_transform_name@%$program_transform_name%g
16372 s%@bindir@%$bindir%g
16373 s%@sbindir@%$sbindir%g
16374 s%@libexecdir@%$libexecdir%g
16375 s%@datadir@%$datadir%g
16376 s%@sysconfdir@%$sysconfdir%g
16377 s%@sharedstatedir@%$sharedstatedir%g
16378 s%@localstatedir@%$localstatedir%g
16379 s%@libdir@%$libdir%g
16380 s%@includedir@%$includedir%g
16381 s%@oldincludedir@%$oldincludedir%g
16382 s%@infodir@%$infodir%g
16383 s%@mandir@%$mandir%g
16384 s%@host@%$host%g
16385 s%@host_alias@%$host_alias%g
16386 s%@host_cpu@%$host_cpu%g
16387 s%@host_vendor@%$host_vendor%g
16388 s%@host_os@%$host_os%g
16389 s%@target@%$target%g
16390 s%@target_alias@%$target_alias%g
16391 s%@target_cpu@%$target_cpu%g
16392 s%@target_vendor@%$target_vendor%g
16393 s%@target_os@%$target_os%g
16394 s%@build@%$build%g
16395 s%@build_alias@%$build_alias%g
16396 s%@build_cpu@%$build_cpu%g
16397 s%@build_vendor@%$build_vendor%g
16398 s%@build_os@%$build_os%g
16399 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16400 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16401 s%@INSTALL_DATA@%$INSTALL_DATA%g
16402 s%@PACKAGE@%$PACKAGE%g
16403 s%@VERSION@%$VERSION%g
16404 s%@ACLOCAL@%$ACLOCAL%g
16405 s%@AUTOCONF@%$AUTOCONF%g
16406 s%@AUTOMAKE@%$AUTOMAKE%g
16407 s%@AUTOHEADER@%$AUTOHEADER%g
16408 s%@MAKEINFO@%$MAKEINFO%g
16409 s%@install_sh@%$install_sh%g
16410 s%@AMTAR@%$AMTAR%g
16411 s%@AWK@%$AWK%g
16412 s%@AMTARFLAGS@%$AMTARFLAGS%g
16413 s%@SET_MAKE@%$SET_MAKE%g
16414 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16415 s%@top_builddir@%$top_builddir%g
16416 s%@ldap_subdir@%$ldap_subdir%g
16417 s%@CC@%$CC%g
16418 s%@RANLIB@%$RANLIB%g
16419 s%@LN_S@%$LN_S%g
16420 s%@DLLTOOL@%$DLLTOOL%g
16421 s%@AS@%$AS%g
16422 s%@OBJDUMP@%$OBJDUMP%g
16423 s%@LIBTOOL@%$LIBTOOL%g
16424 s%@LN_H@%$LN_H%g
16425 s%@SENDMAIL@%$SENDMAIL%g
16426 s%@EDITOR@%$EDITOR%g
16427 s%@FINGER@%$FINGER%g
16428 s%@PERLBIN@%$PERLBIN%g
16429 s%@CPP@%$CPP%g
16430 s%@EXEEXT@%$EXEEXT%g
16431 s%@OBJEXT@%$OBJEXT%g
16432 s%@OL_MKDEP@%$OL_MKDEP%g
16433 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16434 s%@LIBOBJS@%$LIBOBJS%g
16435 s%@LIBSRCS@%$LIBSRCS%g
16436 s%@PLAT@%$PLAT%g
16437 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16438 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16439 s%@DYN_EXT@%$DYN_EXT%g
16440 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16441 s%@BUILD_BDB@%$BUILD_BDB%g
16442 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16443 s%@BUILD_LDAP@%$BUILD_LDAP%g
16444 s%@BUILD_LDBM@%$BUILD_LDBM%g
16445 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16446 s%@BUILD_PERL@%$BUILD_PERL%g
16447 s%@BUILD_SHELL@%$BUILD_SHELL%g
16448 s%@BUILD_SQL@%$BUILD_SQL%g
16449 s%@BUILD_TCL@%$BUILD_TCL%g
16450 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16451 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16452 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16453 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16454 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16455 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16456 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16457 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16458 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16459 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16460 s%@LDAP_LIBS@%$LDAP_LIBS%g
16461 s%@LDIF_LIBS@%$LDIF_LIBS%g
16462 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16463 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16464 s%@LDBM_LIBS@%$LDBM_LIBS%g
16465 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16466 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16467 s%@WRAP_LIBS@%$WRAP_LIBS%g
16468 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16469 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16470 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16471 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16472 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16473 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16474 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16475 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16476 s%@KRB4_LIBS@%$KRB4_LIBS%g
16477 s%@KRB5_LIBS@%$KRB5_LIBS%g
16478 s%@READLINE_LIBS@%$READLINE_LIBS%g
16479 s%@SASL_LIBS@%$SASL_LIBS%g
16480 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16481 s%@TLS_LIBS@%$TLS_LIBS%g
16482 s%@MODULES_LIBS@%$MODULES_LIBS%g
16483 s%@AUTH_LIBS@%$AUTH_LIBS%g
16484 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16485 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16486 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16487
16488 CEOF
16489 EOF
16490
16491 cat >> $CONFIG_STATUS <<\EOF
16492
16493 # Split the substitutions into bite-sized pieces for seds with
16494 # small command number limits, like on Digital OSF/1 and HP-UX.
16495 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16496 ac_file=1 # Number of current file.
16497 ac_beg=1 # First line for current file.
16498 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16499 ac_more_lines=:
16500 ac_sed_cmds=""
16501 while $ac_more_lines; do
16502   if test $ac_beg -gt 1; then
16503     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16504   else
16505     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16506   fi
16507   if test ! -s conftest.s$ac_file; then
16508     ac_more_lines=false
16509     rm -f conftest.s$ac_file
16510   else
16511     if test -z "$ac_sed_cmds"; then
16512       ac_sed_cmds="sed -f conftest.s$ac_file"
16513     else
16514       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16515     fi
16516     ac_file=`expr $ac_file + 1`
16517     ac_beg=$ac_end
16518     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16519   fi
16520 done
16521 if test -z "$ac_sed_cmds"; then
16522   ac_sed_cmds=cat
16523 fi
16524 EOF
16525
16526 cat >> $CONFIG_STATUS <<EOF
16527
16528 CONFIG_FILES=\${CONFIG_FILES-"\
16529 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16530 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16531 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16532 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16533 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16534 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16535 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16536 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16537 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16538 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16539 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16540 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16541 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16542 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16543 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16544 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16545 include/Makefile:build/top.mk:include/Makefile.in \
16546 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16547 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16548 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16549 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16550 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16551 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16552 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16553 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16554 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16555 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16556 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16557 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16558 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16559 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16560 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16561 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16562 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16563 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16564 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16565 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16566 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16567 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16568 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16569 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16570 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16571 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16572 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16573 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16574 "}
16575 EOF
16576 cat >> $CONFIG_STATUS <<\EOF
16577 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16578   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16579   case "$ac_file" in
16580   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16581        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16582   *) ac_file_in="${ac_file}.in" ;;
16583   esac
16584
16585   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16586
16587   # Remove last slash and all that follows it.  Not all systems have dirname.
16588   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16589   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16590     # The file is in a subdirectory.
16591     test ! -d "$ac_dir" && mkdir "$ac_dir"
16592     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16593     # A "../" for each directory in $ac_dir_suffix.
16594     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16595   else
16596     ac_dir_suffix= ac_dots=
16597   fi
16598
16599   case "$ac_given_srcdir" in
16600   .)  srcdir=.
16601       if test -z "$ac_dots"; then top_srcdir=.
16602       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16603   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16604   *) # Relative path.
16605     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16606     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16607   esac
16608
16609   case "$ac_given_INSTALL" in
16610   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16611   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16612   esac
16613
16614   echo creating "$ac_file"
16615   rm -f "$ac_file"
16616   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16617   case "$ac_file" in
16618   *[Mm]akefile*) ac_comsub="1i\\
16619 # $configure_input" ;;
16620   *) ac_comsub= ;;
16621   esac
16622
16623   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16624   sed -e "$ac_comsub
16625 s%@configure_input@%$configure_input%g
16626 s%@srcdir@%$srcdir%g
16627 s%@top_srcdir@%$top_srcdir%g
16628 s%@INSTALL@%$INSTALL%g
16629 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16630 fi; done
16631 rm -f conftest.s*
16632
16633 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16634 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16635 #
16636 # ac_d sets the value in "#define NAME VALUE" lines.
16637 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16638 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16639 ac_dC='\3'
16640 ac_dD='%g'
16641 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16642 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16643 ac_uB='\([      ]\)%\1#\2define\3'
16644 ac_uC=' '
16645 ac_uD='\4%g'
16646 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16647 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16648 ac_eB='$%\1#\2define\3'
16649 ac_eC=' '
16650 ac_eD='%g'
16651
16652 if test "${CONFIG_HEADERS+set}" != set; then
16653 EOF
16654 cat >> $CONFIG_STATUS <<EOF
16655   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16656 EOF
16657 cat >> $CONFIG_STATUS <<\EOF
16658 fi
16659 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16660   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16661   case "$ac_file" in
16662   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16663        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16664   *) ac_file_in="${ac_file}.in" ;;
16665   esac
16666
16667   echo creating $ac_file
16668
16669   rm -f conftest.frag conftest.in conftest.out
16670   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16671   cat $ac_file_inputs > conftest.in
16672
16673 EOF
16674
16675 # Transform confdefs.h into a sed script conftest.vals that substitutes
16676 # the proper values into config.h.in to produce config.h.  And first:
16677 # Protect against being on the right side of a sed subst in config.status.
16678 # Protect against being in an unquoted here document in config.status.
16679 rm -f conftest.vals
16680 cat > conftest.hdr <<\EOF
16681 s/[\\&%]/\\&/g
16682 s%[\\$`]%\\&%g
16683 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16684 s%ac_d%ac_u%gp
16685 s%ac_u%ac_e%gp
16686 EOF
16687 sed -n -f conftest.hdr confdefs.h > conftest.vals
16688 rm -f conftest.hdr
16689
16690 # This sed command replaces #undef with comments.  This is necessary, for
16691 # example, in the case of _POSIX_SOURCE, which is predefined and required
16692 # on some systems where configure will not decide to define it.
16693 cat >> conftest.vals <<\EOF
16694 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16695 EOF
16696
16697 # Break up conftest.vals because some shells have a limit on
16698 # the size of here documents, and old seds have small limits too.
16699
16700 rm -f conftest.tail
16701 while :
16702 do
16703   ac_lines=`grep -c . conftest.vals`
16704   # grep -c gives empty output for an empty file on some AIX systems.
16705   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16706   # Write a limited-size here document to conftest.frag.
16707   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16708   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16709   echo 'CEOF
16710   sed -f conftest.frag conftest.in > conftest.out
16711   rm -f conftest.in
16712   mv conftest.out conftest.in
16713 ' >> $CONFIG_STATUS
16714   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16715   rm -f conftest.vals
16716   mv conftest.tail conftest.vals
16717 done
16718 rm -f conftest.vals
16719
16720 cat >> $CONFIG_STATUS <<\EOF
16721   rm -f conftest.frag conftest.h
16722   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16723   cat conftest.in >> conftest.h
16724   rm -f conftest.in
16725   if cmp -s $ac_file conftest.h 2>/dev/null; then
16726     echo "$ac_file is unchanged"
16727     rm -f conftest.h
16728   else
16729     # Remove last slash and all that follows it.  Not all systems have dirname.
16730       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16731       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16732       # The file is in a subdirectory.
16733       test ! -d "$ac_dir" && mkdir "$ac_dir"
16734     fi
16735     rm -f $ac_file
16736     mv conftest.h $ac_file
16737   fi
16738 fi; done
16739
16740 EOF
16741 cat >> $CONFIG_STATUS <<EOF
16742
16743 EOF
16744 cat >> $CONFIG_STATUS <<\EOF
16745
16746 date > stamp-h
16747 echo Please \"make depend\" to build dependencies
16748
16749 exit 0
16750 EOF
16751 chmod +x $CONFIG_STATUS
16752 rm -fr confdefs* $ac_clean_files
16753 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16754