]> git.sur5r.net Git - openldap/blob - configure
In ldap_pvt_tls_init() treat subsequent invocations as no-ops, not error.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.284 2000/01/08 17:42:15 kdz Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-kbind        enable V2 Kerberos IV bind (auto)"
43 ac_help="$ac_help
44   --enable-cldap        enable connectionless ldap (no)"
45 ac_help="$ac_help
46   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --enable-dmalloc      enable debug malloc support (no)"
51 ac_help="$ac_help
52   --with-cyrus-sasl     with Cyrus SASL support (auto)"
53 ac_help="$ac_help
54   --with-fetch          with fetch URL support (auto)"
55 ac_help="$ac_help
56   --with-kerberos       with support (auto)"
57 ac_help="$ac_help
58   --with-readline       with readline support (auto)"
59 ac_help="$ac_help
60   --with-threads        use threads (auto)"
61 ac_help="$ac_help
62   --with-tls            with TLS/SSL support (auto)"
63 ac_help="$ac_help
64   --with-yielding-select        with implicitly yielding select (auto)"
65 ac_help="$ac_help
66 LDAPD (X.500-to-LDAP Gateway) Options:"
67 ac_help="$ac_help
68   --enable-ldapd        enable building ldapd (no)"
69 ac_help="$ac_help
70 SLAPD (Standalone LDAP Daemon) Options:"
71 ac_help="$ac_help
72   --enable-slapd        enable building slapd (yes)"
73 ac_help="$ac_help
74     --enable-cleartext  enable cleartext passwords (yes)"
75 ac_help="$ac_help
76     --enable-crypt      enable crypt(3) passwords (auto)"
77 ac_help="$ac_help
78     --enable-kpasswd    enable kerberos password verification (no)"
79 ac_help="$ac_help
80     --enable-modules    enable dynamic module support (no)"
81 ac_help="$ac_help
82     --enable-multimaster        enable multimaster replication (no)"
83 ac_help="$ac_help
84     --enable-phonetic   enable phonetic/soundex (no)"
85 ac_help="$ac_help
86     --enable-quipu      build quipu migration tools (no)"
87 ac_help="$ac_help
88     --enable-rlookups   enable reverse lookups (auto)"
89 ac_help="$ac_help
90     --enable-aci        enable per-object ACIs (no)"
91 ac_help="$ac_help
92     --enable-discreteaci        enable discrete rights in ACIs (no)"
93 ac_help="$ac_help
94     --enable-wrappers   enable tcp wrapper support (no)"
95 ac_help="$ac_help
96     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
97 ac_help="$ac_help
98     --enable-bdb2       enable bdb2 backend (no)"
99 ac_help="$ac_help
100       --with-bdb2-module        module type (static)"
101 ac_help="$ac_help
102     --enable-ldap       enable ldap backend (no)"
103 ac_help="$ac_help
104       --with-ldap-module        module type (static)"
105 ac_help="$ac_help
106     --enable-ldbm       enable ldbm backend (yes)"
107 ac_help="$ac_help
108       --with-ldbm-api   use LDBM API (auto)"
109 ac_help="$ac_help
110       --with-ldbm-module        module type (static)"
111 ac_help="$ac_help
112       --with-ldbm-type  use LDBM type (auto)"
113 ac_help="$ac_help
114     --enable-passwd     enable passwd backend (no)"
115 ac_help="$ac_help
116       --with-passwd-module      module type (static)"
117 ac_help="$ac_help
118     --enable-perl       enable perl backend (no)"
119 ac_help="$ac_help
120       --with-perl-module        module type (static)"
121 ac_help="$ac_help
122     --enable-shell      enable shell backend (no)"
123 ac_help="$ac_help
124       --with-shell-module       module type (static)"
125 ac_help="$ac_help
126     --enable-tcl        enable tcl backend (no)"
127 ac_help="$ac_help
128       --with-tcl-module module type (static)"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd       enable building slurpd (auto)"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version
586
587 # Find the source files, if location was not specified.
588 if test -z "$srcdir"; then
589   ac_srcdir_defaulted=yes
590   # Try the directory containing this script, then its parent.
591   ac_prog=$0
592   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
593   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
594   srcdir=$ac_confdir
595   if test ! -r $srcdir/$ac_unique_file; then
596     srcdir=..
597   fi
598 else
599   ac_srcdir_defaulted=no
600 fi
601 if test ! -r $srcdir/$ac_unique_file; then
602   if test "$ac_srcdir_defaulted" = yes; then
603     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
604   else
605     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
606   fi
607 fi
608 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
609
610 # Prefer explicitly selected file to automatically selected ones.
611 if test -z "$CONFIG_SITE"; then
612   if test "x$prefix" != xNONE; then
613     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
614   else
615     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
616   fi
617 fi
618 for ac_site_file in $CONFIG_SITE; do
619   if test -r "$ac_site_file"; then
620     echo "loading site script $ac_site_file"
621     . "$ac_site_file"
622   fi
623 done
624
625
626 ac_ext=c
627 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
628 ac_cpp='$CPP $CPPFLAGS'
629 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
630 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
631 cross_compiling=$ac_cv_prog_cc_cross
632
633 ac_exeext=
634 ac_objext=o
635 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
636   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
637   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
638     ac_n= ac_c='
639 ' ac_t='        '
640   else
641     ac_n=-n ac_c= ac_t=
642   fi
643 else
644   ac_n= ac_c='\c' ac_t=
645 fi
646
647 ac_aux_dir=
648 for ac_dir in build $srcdir/build; do
649   if test -f $ac_dir/install-sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install-sh -c"
652     break
653   elif test -f $ac_dir/install.sh; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/install.sh -c"
656     break
657   elif test -f $ac_dir/shtool; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/shtool install -c"
660     break
661   fi
662 done
663 if test -z "$ac_aux_dir"; then
664   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
665 fi
666 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
667 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
668 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
669
670 OL_VERSION=`cat $ac_aux_dir/version`
671 if test -z "$OL_VERSION"; then
672         { echo "configure: error: could not determine version" 1>&2; exit 1; }
673 fi
674
675 echo "Configuring OpenLDAP $OL_VERSION ..."
676
677
678 echo $ac_n "checking host system type""... $ac_c" 1>&6
679 echo "configure:680: checking host system type" >&5
680 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
681
682 # Make sure we can run config.sub.
683   if $ac_config_sub sun4 >/dev/null 2>&1; then :
684     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
685   fi
686
687   ac_cv_host_alias=$host
688   case "$ac_cv_host_alias" in
689   NONE)
690     case $nonopt in
691     NONE)
692       if ac_cv_host_alias=`$ac_config_guess`; then :
693       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
694       fi ;;
695     *) ac_cv_host_alias=$nonopt ;;
696     esac ;;
697   esac
698
699   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
700   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
701   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
702   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
703 else
704   echo $ac_n "(cached) $ac_c" 1>&6
705 fi
706
707 echo "$ac_t""$ac_cv_host" 1>&6
708
709 host=$ac_cv_host
710 host_alias=$ac_cv_host_alias
711 host_cpu=$ac_cv_host_cpu
712 host_vendor=$ac_cv_host_vendor
713 host_os=$ac_cv_host_os
714
715
716
717
718
719 echo $ac_n "checking target system type""... $ac_c" 1>&6
720 echo "configure:721: checking target system type" >&5
721 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
722
723 # Make sure we can run config.sub.
724   if $ac_config_sub sun4 >/dev/null 2>&1; then :
725     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
726   fi
727
728   ac_cv_target_alias=$target
729   case "$ac_cv_target_alias" in
730   NONE)
731     case $nonopt in
732     NONE)
733       ac_cv_target_alias=$host_alias ;;
734
735     *) ac_cv_target_alias=$nonopt ;;
736     esac ;;
737   esac
738
739   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
740   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
741   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
742   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
743 else
744   echo $ac_n "(cached) $ac_c" 1>&6
745 fi
746
747 echo "$ac_t""$ac_cv_target" 1>&6
748
749 target=$ac_cv_target
750 target_alias=$ac_cv_target_alias
751 target_cpu=$ac_cv_target_cpu
752 target_vendor=$ac_cv_target_vendor
753 target_os=$ac_cv_target_os
754
755
756
757
758
759 echo $ac_n "checking build system type""... $ac_c" 1>&6
760 echo "configure:761: checking build system type" >&5
761 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
762
763 # Make sure we can run config.sub.
764   if $ac_config_sub sun4 >/dev/null 2>&1; then :
765     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
766   fi
767
768   ac_cv_build_alias=$build
769   case "$ac_cv_build_alias" in
770   NONE)
771     case $nonopt in
772     NONE)
773       ac_cv_build_alias=$host_alias ;;
774
775     *) ac_cv_build_alias=$nonopt ;;
776     esac ;;
777   esac
778
779   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
780   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
781   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
782   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
783 else
784   echo $ac_n "(cached) $ac_c" 1>&6
785 fi
786
787 echo "$ac_t""$ac_cv_build" 1>&6
788
789 build=$ac_cv_build
790 build_alias=$ac_cv_build_alias
791 build_cpu=$ac_cv_build_cpu
792 build_vendor=$ac_cv_build_vendor
793 build_os=$ac_cv_build_os
794
795
796
797
798
799 # Do some error checking and defaulting for the host and target type.
800 # The inputs are:
801 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
802 #
803 # The rules are:
804 # 1. You are not allowed to specify --host, --target, and nonopt at the
805 #    same time.
806 # 2. Host defaults to nonopt.
807 # 3. If nonopt is not specified, then host defaults to the current host,
808 #    as determined by config.guess.
809 # 4. Target and build default to nonopt.
810 # 5. If nonopt is not specified, then target and build default to host.
811
812 # The aliases save the names the user supplied, while $host etc.
813 # will get canonicalized.
814 case $host---$target---$nonopt in
815 NONE---*---* | *---NONE---* | *---*---NONE) ;;
816 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
817 esac
818
819 test "$host_alias" != "$target_alias" &&
820   test "$program_prefix$program_suffix$program_transform_name" = \
821     NONENONEs,x,x, &&
822   program_prefix=${target_alias}-
823
824
825 # Find a good install program.  We prefer a C program (faster),
826 # so one script is as good as another.  But avoid the broken or
827 # incompatible versions:
828 # SysV /etc/install, /usr/sbin/install
829 # SunOS /usr/etc/install
830 # IRIX /sbin/install
831 # AIX /bin/install
832 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
833 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
834 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
835 # ./install, which can be erroneously created by make from ./install.sh.
836 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
837 echo "configure:838: checking for a BSD compatible install" >&5
838 if test -z "$INSTALL"; then
839 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
843   for ac_dir in $PATH; do
844     # Account for people who put trailing slashes in PATH elements.
845     case "$ac_dir/" in
846     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
847     *)
848       # OSF1 and SCO ODT 3.0 have their own names for install.
849       # Don't use installbsd from OSF since it installs stuff as root
850       # by default.
851       for ac_prog in ginstall scoinst install; do
852         if test -f $ac_dir/$ac_prog; then
853           if test $ac_prog = install &&
854             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
855             # AIX install.  It has an incompatible calling convention.
856             :
857           elif test $ac_prog = install &&
858             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
859             # program-specific install script used by HP pwplus--don't use.
860             :
861           else
862             ac_cv_path_install="$ac_dir/$ac_prog -c"
863             break 2
864           fi
865         fi
866       done
867       ;;
868     esac
869   done
870   IFS="$ac_save_IFS"
871
872 fi
873   if test "${ac_cv_path_install+set}" = set; then
874     INSTALL="$ac_cv_path_install"
875   else
876     # As a last resort, use the slow shell script.  We don't cache a
877     # path for INSTALL within a source directory, because that will
878     # break other packages using the cache if that directory is
879     # removed, or if the path is relative.
880     INSTALL="$ac_install_sh"
881   fi
882 fi
883 echo "$ac_t""$INSTALL" 1>&6
884
885 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
886 # It thinks the first close brace ends the variable substitution.
887 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
888
889 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
890
891 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
892
893 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
894 echo "configure:895: checking whether build environment is sane" >&5
895 # Just in case
896 sleep 1
897 echo timestamp > conftestfile
898 # Do `set' in a subshell so we don't clobber the current shell's
899 # arguments.  Must try -L first in case configure is actually a
900 # symlink; some systems play weird games with the mod time of symlinks
901 # (eg FreeBSD returns the mod time of the symlink's containing
902 # directory).
903 if (
904    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
905    if test "$*" = "X"; then
906       # -L didn't work.
907       set X `ls -t $srcdir/configure conftestfile`
908    fi
909    if test "$*" != "X $srcdir/configure conftestfile" \
910       && test "$*" != "X conftestfile $srcdir/configure"; then
911
912       # If neither matched, then we have a broken ls.  This can happen
913       # if, for instance, CONFIG_SHELL is bash and it inherits a
914       # broken ls alias from the environment.  This has actually
915       # happened.  Such a system could not be considered "sane".
916       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
917 alias in your environment" 1>&2; exit 1; }
918    fi
919
920    test "$2" = conftestfile
921    )
922 then
923    # Ok.
924    :
925 else
926    { echo "configure: error: newly created file is older than distributed files!
927 Check your system clock" 1>&2; exit 1; }
928 fi
929 rm -f conftest*
930 echo "$ac_t""yes" 1>&6
931 if test "$program_transform_name" = s,x,x,; then
932   program_transform_name=
933 else
934   # Double any \ or $.  echo might interpret backslashes.
935   cat <<\EOF_SED > conftestsed
936 s,\\,\\\\,g; s,\$,$$,g
937 EOF_SED
938   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
939   rm -f conftestsed
940 fi
941 test "$program_prefix" != NONE &&
942   program_transform_name="s,^,${program_prefix},;$program_transform_name"
943 # Use a double $ so make ignores it.
944 test "$program_suffix" != NONE &&
945   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
946
947 # sed with no file args requires a program.
948 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
949
950 for ac_prog in mawk gawk nawk awk
951 do
952 # Extract the first word of "$ac_prog", so it can be a program name with args.
953 set dummy $ac_prog; ac_word=$2
954 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
955 echo "configure:956: checking for $ac_word" >&5
956 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
957   echo $ac_n "(cached) $ac_c" 1>&6
958 else
959   if test -n "$AWK"; then
960   ac_cv_prog_AWK="$AWK" # Let the user override the test.
961 else
962   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
963   ac_dummy="$PATH"
964   for ac_dir in $ac_dummy; do
965     test -z "$ac_dir" && ac_dir=.
966     if test -f $ac_dir/$ac_word; then
967       ac_cv_prog_AWK="$ac_prog"
968       break
969     fi
970   done
971   IFS="$ac_save_ifs"
972 fi
973 fi
974 AWK="$ac_cv_prog_AWK"
975 if test -n "$AWK"; then
976   echo "$ac_t""$AWK" 1>&6
977 else
978   echo "$ac_t""no" 1>&6
979 fi
980
981 test -n "$AWK" && break
982 done
983
984 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
985 echo "configure:986: checking whether ${MAKE-make} sets \${MAKE}" >&5
986 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
987 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
988   echo $ac_n "(cached) $ac_c" 1>&6
989 else
990   cat > conftestmake <<\EOF
991 all:
992         @echo 'ac_maketemp="${MAKE}"'
993 EOF
994 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
995 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
996 if test -n "$ac_maketemp"; then
997   eval ac_cv_prog_make_${ac_make}_set=yes
998 else
999   eval ac_cv_prog_make_${ac_make}_set=no
1000 fi
1001 rm -f conftestmake
1002 fi
1003 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1004   echo "$ac_t""yes" 1>&6
1005   SET_MAKE=
1006 else
1007   echo "$ac_t""no" 1>&6
1008   SET_MAKE="MAKE=${MAKE-make}"
1009 fi
1010
1011
1012
1013 PACKAGE=OpenLDAP
1014
1015 VERSION=$OL_VERSION
1016
1017 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1018   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1019 fi
1020
1021
1022
1023 missing_dir=`cd $ac_aux_dir && pwd`
1024 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1025 echo "configure:1026: checking for working aclocal" >&5
1026 # Run test in a subshell; some versions of sh will print an error if
1027 # an executable is not found, even if stderr is redirected.
1028 # Redirect stdin to placate older versions of autoconf.  Sigh.
1029 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1030    ACLOCAL=aclocal
1031    echo "$ac_t""found" 1>&6
1032 else
1033    ACLOCAL="$missing_dir/missing aclocal"
1034    echo "$ac_t""missing" 1>&6
1035 fi
1036
1037 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1038 echo "configure:1039: checking for working autoconf" >&5
1039 # Run test in a subshell; some versions of sh will print an error if
1040 # an executable is not found, even if stderr is redirected.
1041 # Redirect stdin to placate older versions of autoconf.  Sigh.
1042 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1043    AUTOCONF=autoconf
1044    echo "$ac_t""found" 1>&6
1045 else
1046    AUTOCONF="$missing_dir/missing autoconf"
1047    echo "$ac_t""missing" 1>&6
1048 fi
1049
1050 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1051 echo "configure:1052: checking for working automake" >&5
1052 # Run test in a subshell; some versions of sh will print an error if
1053 # an executable is not found, even if stderr is redirected.
1054 # Redirect stdin to placate older versions of autoconf.  Sigh.
1055 if (automake --version) < /dev/null > /dev/null 2>&1; then
1056    AUTOMAKE=automake
1057    echo "$ac_t""found" 1>&6
1058 else
1059    AUTOMAKE="$missing_dir/missing automake"
1060    echo "$ac_t""missing" 1>&6
1061 fi
1062
1063 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1064 echo "configure:1065: checking for working autoheader" >&5
1065 # Run test in a subshell; some versions of sh will print an error if
1066 # an executable is not found, even if stderr is redirected.
1067 # Redirect stdin to placate older versions of autoconf.  Sigh.
1068 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1069    AUTOHEADER=autoheader
1070    echo "$ac_t""found" 1>&6
1071 else
1072    AUTOHEADER="$missing_dir/missing autoheader"
1073    echo "$ac_t""missing" 1>&6
1074 fi
1075
1076 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1077 echo "configure:1078: checking for working makeinfo" >&5
1078 # Run test in a subshell; some versions of sh will print an error if
1079 # an executable is not found, even if stderr is redirected.
1080 # Redirect stdin to placate older versions of autoconf.  Sigh.
1081 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1082    MAKEINFO=makeinfo
1083    echo "$ac_t""found" 1>&6
1084 else
1085    MAKEINFO="$missing_dir/missing makeinfo"
1086    echo "$ac_t""missing" 1>&6
1087 fi
1088
1089 install_sh="$missing_dir/install-sh"
1090 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1091
1092 for ac_prog in gnutar gtar tar
1093 do
1094 # Extract the first word of "$ac_prog", so it can be a program name with args.
1095 set dummy $ac_prog; ac_word=$2
1096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1097 echo "configure:1098: checking for $ac_word" >&5
1098 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   if test -n "$AMTAR"; then
1102   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1103 else
1104   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1105   ac_dummy="$PATH"
1106   for ac_dir in $ac_dummy; do
1107     test -z "$ac_dir" && ac_dir=.
1108     if test -f $ac_dir/$ac_word; then
1109       ac_cv_prog_AMTAR="$ac_prog"
1110       break
1111     fi
1112   done
1113   IFS="$ac_save_ifs"
1114 fi
1115 fi
1116 AMTAR="$ac_cv_prog_AMTAR"
1117 if test -n "$AMTAR"; then
1118   echo "$ac_t""$AMTAR" 1>&6
1119 else
1120   echo "$ac_t""no" 1>&6
1121 fi
1122
1123 test -n "$AMTAR" && break
1124 done
1125
1126
1127 AMTARFLAGS=
1128 if test -n "$AMTAR"; then
1129   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1130         AMTARFLAGS=o
1131   fi
1132 fi
1133
1134
1135
1136 cat >> confdefs.h <<EOF
1137 #define OPENLDAP_PACKAGE "$PACKAGE"
1138 EOF
1139
1140 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_VERSION "$VERSION"
1142 EOF
1143
1144
1145
1146
1147 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1148 echo "configure:1149: checking configure arguments" >&5
1149
1150
1151 top_builddir=`pwd`
1152
1153 ldap_subdir="/openldap"
1154
1155 # Check whether --with-subdir or --without-subdir was given.
1156 if test "${with_subdir+set}" = set; then
1157   withval="$with_subdir"
1158   case "$withval" in
1159         no) ldap_subdir=""
1160                 ;;
1161         yes)
1162                 ;;
1163         /*|\\*)
1164                 ldap_subdir="$withval"
1165                 ;;
1166         *)
1167                 ldap_subdir="/$withval"
1168                 ;;
1169 esac
1170
1171 fi
1172
1173
1174 # OpenLDAP --enable-debug
1175         # Check whether --enable-debug or --disable-debug was given.
1176 if test "${enable_debug+set}" = set; then
1177   enableval="$enable_debug"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1187         fi
1188         ol_enable_debug="$ol_arg"
1189
1190 else
1191         ol_enable_debug="yes"
1192 fi
1193 # end --enable-debug
1194 # OpenLDAP --enable-syslog
1195         # Check whether --enable-syslog or --disable-syslog was given.
1196 if test "${enable_syslog+set}" = set; then
1197   enableval="$enable_syslog"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1207         fi
1208         ol_enable_syslog="$ol_arg"
1209
1210 else
1211         ol_enable_syslog="auto"
1212 fi
1213 # end --enable-syslog
1214 # OpenLDAP --enable-proctitle
1215         # Check whether --enable-proctitle or --disable-proctitle was given.
1216 if test "${enable_proctitle+set}" = set; then
1217   enableval="$enable_proctitle"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1227         fi
1228         ol_enable_proctitle="$ol_arg"
1229
1230 else
1231         ol_enable_proctitle="yes"
1232 fi
1233 # end --enable-proctitle
1234 # OpenLDAP --enable-cache
1235         # Check whether --enable-cache or --disable-cache was given.
1236 if test "${enable_cache+set}" = set; then
1237   enableval="$enable_cache"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1247         fi
1248         ol_enable_cache="$ol_arg"
1249
1250 else
1251         ol_enable_cache="yes"
1252 fi
1253 # end --enable-cache
1254 # OpenLDAP --enable-dns
1255         # Check whether --enable-dns or --disable-dns was given.
1256 if test "${enable_dns+set}" = set; then
1257   enableval="$enable_dns"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1267         fi
1268         ol_enable_dns="$ol_arg"
1269
1270 else
1271         ol_enable_dns="no"
1272 fi
1273 # end --enable-dns
1274 # OpenLDAP --enable-referrals
1275         # Check whether --enable-referrals or --disable-referrals was given.
1276 if test "${enable_referrals+set}" = set; then
1277   enableval="$enable_referrals"
1278   
1279         ol_arg=invalid
1280         for ol_val in auto yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1287         fi
1288         ol_enable_referrals="$ol_arg"
1289
1290 else
1291         ol_enable_referrals="yes"
1292 fi
1293 # end --enable-referrals
1294 # OpenLDAP --enable-kbind
1295         # Check whether --enable-kbind or --disable-kbind was given.
1296 if test "${enable_kbind+set}" = set; then
1297   enableval="$enable_kbind"
1298   
1299         ol_arg=invalid
1300         for ol_val in auto yes no ; do
1301                 if test "$enableval" = "$ol_val" ; then
1302                         ol_arg="$ol_val"
1303                 fi
1304         done
1305         if test "$ol_arg" = "invalid" ; then
1306                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1307         fi
1308         ol_enable_kbind="$ol_arg"
1309
1310 else
1311         ol_enable_kbind="auto"
1312 fi
1313 # end --enable-kbind
1314 # OpenLDAP --enable-cldap
1315         # Check whether --enable-cldap or --disable-cldap was given.
1316 if test "${enable_cldap+set}" = set; then
1317   enableval="$enable_cldap"
1318   
1319         ol_arg=invalid
1320         for ol_val in auto yes no ; do
1321                 if test "$enableval" = "$ol_val" ; then
1322                         ol_arg="$ol_val"
1323                 fi
1324         done
1325         if test "$ol_arg" = "invalid" ; then
1326                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1327         fi
1328         ol_enable_cldap="$ol_arg"
1329
1330 else
1331         ol_enable_cldap="no"
1332 fi
1333 # end --enable-cldap
1334 # OpenLDAP --enable-ldapi
1335         # Check whether --enable-ldapi or --disable-ldapi was given.
1336 if test "${enable_ldapi+set}" = set; then
1337   enableval="$enable_ldapi"
1338   
1339         ol_arg=invalid
1340         for ol_val in auto yes no ; do
1341                 if test "$enableval" = "$ol_val" ; then
1342                         ol_arg="$ol_val"
1343                 fi
1344         done
1345         if test "$ol_arg" = "invalid" ; then
1346                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1347         fi
1348         ol_enable_ldapi="$ol_arg"
1349
1350 else
1351         ol_enable_ldapi="no"
1352 fi
1353 # end --enable-ldapi
1354 # OpenLDAP --enable-x_compile
1355         # Check whether --enable-x_compile or --disable-x_compile was given.
1356 if test "${enable_x_compile+set}" = set; then
1357   enableval="$enable_x_compile"
1358   
1359         ol_arg=invalid
1360         for ol_val in yes no ; do
1361                 if test "$enableval" = "$ol_val" ; then
1362                         ol_arg="$ol_val"
1363                 fi
1364         done
1365         if test "$ol_arg" = "invalid" ; then
1366                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1367         fi
1368         ol_enable_x_compile="$ol_arg"
1369
1370 else
1371         ol_enable_x_compile="no"
1372 fi
1373 # end --enable-x_compile
1374
1375 # OpenLDAP --enable-dmalloc
1376         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1377 if test "${enable_dmalloc+set}" = set; then
1378   enableval="$enable_dmalloc"
1379   
1380         ol_arg=invalid
1381         for ol_val in auto yes no ; do
1382                 if test "$enableval" = "$ol_val" ; then
1383                         ol_arg="$ol_val"
1384                 fi
1385         done
1386         if test "$ol_arg" = "invalid" ; then
1387                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1388         fi
1389         ol_enable_dmalloc="$ol_arg"
1390
1391 else
1392         ol_enable_dmalloc="no"
1393 fi
1394 # end --enable-dmalloc
1395
1396 # OpenLDAP --with-cyrus_sasl
1397         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1398 if test "${with_cyrus_sasl+set}" = set; then
1399   withval="$with_cyrus_sasl"
1400   
1401         ol_arg=invalid
1402         for ol_val in auto yes no  ; do
1403                 if test "$withval" = "$ol_val" ; then
1404                         ol_arg="$ol_val"
1405                 fi
1406         done
1407         if test "$ol_arg" = "invalid" ; then
1408                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1409         fi
1410         ol_with_cyrus_sasl="$ol_arg"
1411
1412 else
1413         ol_with_cyrus_sasl="auto"
1414 fi
1415 # end --with-cyrus_sasl
1416
1417 # OpenLDAP --with-fetch
1418         # Check whether --with-fetch or --without-fetch was given.
1419 if test "${with_fetch+set}" = set; then
1420   withval="$with_fetch"
1421   
1422         ol_arg=invalid
1423         for ol_val in auto yes no  ; do
1424                 if test "$withval" = "$ol_val" ; then
1425                         ol_arg="$ol_val"
1426                 fi
1427         done
1428         if test "$ol_arg" = "invalid" ; then
1429                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1430         fi
1431         ol_with_fetch="$ol_arg"
1432
1433 else
1434         ol_with_fetch="auto"
1435 fi
1436 # end --with-fetch
1437
1438 # OpenLDAP --with-kerberos
1439         # Check whether --with-kerberos or --without-kerberos was given.
1440 if test "${with_kerberos+set}" = set; then
1441   withval="$with_kerberos"
1442   
1443         ol_arg=invalid
1444         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1445                 if test "$withval" = "$ol_val" ; then
1446                         ol_arg="$ol_val"
1447                 fi
1448         done
1449         if test "$ol_arg" = "invalid" ; then
1450                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1451         fi
1452         ol_with_kerberos="$ol_arg"
1453
1454 else
1455         ol_with_kerberos="auto"
1456 fi
1457 # end --with-kerberos
1458
1459 # OpenLDAP --with-readline
1460         # Check whether --with-readline or --without-readline was given.
1461 if test "${with_readline+set}" = set; then
1462   withval="$with_readline"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no  ; do
1466                 if test "$withval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1472         fi
1473         ol_with_readline="$ol_arg"
1474
1475 else
1476         ol_with_readline="auto"
1477 fi
1478 # end --with-readline
1479
1480 # OpenLDAP --with-threads
1481         # Check whether --with-threads or --without-threads was given.
1482 if test "${with_threads+set}" = set; then
1483   withval="$with_threads"
1484   
1485         ol_arg=invalid
1486         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1487                 if test "$withval" = "$ol_val" ; then
1488                         ol_arg="$ol_val"
1489                 fi
1490         done
1491         if test "$ol_arg" = "invalid" ; then
1492                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1493         fi
1494         ol_with_threads="$ol_arg"
1495
1496 else
1497         ol_with_threads="auto"
1498 fi
1499 # end --with-threads
1500
1501 # OpenLDAP --with-tls
1502         # Check whether --with-tls or --without-tls was given.
1503 if test "${with_tls+set}" = set; then
1504   withval="$with_tls"
1505   
1506         ol_arg=invalid
1507         for ol_val in auto ssleay openssl yes no  ; do
1508                 if test "$withval" = "$ol_val" ; then
1509                         ol_arg="$ol_val"
1510                 fi
1511         done
1512         if test "$ol_arg" = "invalid" ; then
1513                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1514         fi
1515         ol_with_tls="$ol_arg"
1516
1517 else
1518         ol_with_tls="auto"
1519 fi
1520 # end --with-tls
1521
1522 # OpenLDAP --with-yielding_select
1523         # Check whether --with-yielding_select or --without-yielding_select was given.
1524 if test "${with_yielding_select+set}" = set; then
1525   withval="$with_yielding_select"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no manual  ; do
1529                 if test "$withval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1535         fi
1536         ol_with_yielding_select="$ol_arg"
1537
1538 else
1539         ol_with_yielding_select="auto"
1540 fi
1541 # end --with-yielding_select
1542
1543
1544 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1545 if test "${with_xxldapdoptions+set}" = set; then
1546   withval="$with_xxldapdoptions"
1547   :
1548 fi
1549
1550 # OpenLDAP --enable-ldapd
1551         # Check whether --enable-ldapd or --disable-ldapd was given.
1552 if test "${enable_ldapd+set}" = set; then
1553   enableval="$enable_ldapd"
1554   
1555         ol_arg=invalid
1556         for ol_val in auto yes no ; do
1557                 if test "$enableval" = "$ol_val" ; then
1558                         ol_arg="$ol_val"
1559                 fi
1560         done
1561         if test "$ol_arg" = "invalid" ; then
1562                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1563         fi
1564         ol_enable_ldapd="$ol_arg"
1565
1566 else
1567         ol_enable_ldapd="no"
1568 fi
1569 # end --enable-ldapd
1570
1571 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1572 if test "${with_xxslapdoptions+set}" = set; then
1573   withval="$with_xxslapdoptions"
1574   :
1575 fi
1576
1577 # OpenLDAP --enable-slapd
1578         # Check whether --enable-slapd or --disable-slapd was given.
1579 if test "${enable_slapd+set}" = set; then
1580   enableval="$enable_slapd"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1590         fi
1591         ol_enable_slapd="$ol_arg"
1592
1593 else
1594         ol_enable_slapd="yes"
1595 fi
1596 # end --enable-slapd
1597 # OpenLDAP --enable-cleartext
1598         # Check whether --enable-cleartext or --disable-cleartext was given.
1599 if test "${enable_cleartext+set}" = set; then
1600   enableval="$enable_cleartext"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no ; do
1604                 if test "$enableval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1610         fi
1611         ol_enable_cleartext="$ol_arg"
1612
1613 else
1614         ol_enable_cleartext="yes"
1615 fi
1616 # end --enable-cleartext
1617 # OpenLDAP --enable-crypt
1618         # Check whether --enable-crypt or --disable-crypt was given.
1619 if test "${enable_crypt+set}" = set; then
1620   enableval="$enable_crypt"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no ; do
1624                 if test "$enableval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1630         fi
1631         ol_enable_crypt="$ol_arg"
1632
1633 else
1634         ol_enable_crypt="auto"
1635 fi
1636 # end --enable-crypt
1637 # OpenLDAP --enable-kpasswd
1638         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1639 if test "${enable_kpasswd+set}" = set; then
1640   enableval="$enable_kpasswd"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no ; do
1644                 if test "$enableval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1650         fi
1651         ol_enable_kpasswd="$ol_arg"
1652
1653 else
1654         ol_enable_kpasswd="no"
1655 fi
1656 # end --enable-kpasswd
1657 # OpenLDAP --enable-modules
1658         # Check whether --enable-modules or --disable-modules was given.
1659 if test "${enable_modules+set}" = set; then
1660   enableval="$enable_modules"
1661   
1662         ol_arg=invalid
1663         for ol_val in auto yes no ; do
1664                 if test "$enableval" = "$ol_val" ; then
1665                         ol_arg="$ol_val"
1666                 fi
1667         done
1668         if test "$ol_arg" = "invalid" ; then
1669                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1670         fi
1671         ol_enable_modules="$ol_arg"
1672
1673 else
1674         ol_enable_modules="no"
1675 fi
1676 # end --enable-modules
1677 # OpenLDAP --enable-multimaster
1678         # Check whether --enable-multimaster or --disable-multimaster was given.
1679 if test "${enable_multimaster+set}" = set; then
1680   enableval="$enable_multimaster"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto yes no ; do
1684                 if test "$enableval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1690         fi
1691         ol_enable_multimaster="$ol_arg"
1692
1693 else
1694         ol_enable_multimaster="no"
1695 fi
1696 # end --enable-multimaster
1697 # OpenLDAP --enable-phonetic
1698         # Check whether --enable-phonetic or --disable-phonetic was given.
1699 if test "${enable_phonetic+set}" = set; then
1700   enableval="$enable_phonetic"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto yes no ; do
1704                 if test "$enableval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1710         fi
1711         ol_enable_phonetic="$ol_arg"
1712
1713 else
1714         ol_enable_phonetic="no"
1715 fi
1716 # end --enable-phonetic
1717 # OpenLDAP --enable-quipu
1718         # Check whether --enable-quipu or --disable-quipu was given.
1719 if test "${enable_quipu+set}" = set; then
1720   enableval="$enable_quipu"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1730         fi
1731         ol_enable_quipu="$ol_arg"
1732
1733 else
1734         ol_enable_quipu="no"
1735 fi
1736 # end --enable-quipu
1737 # OpenLDAP --enable-rlookups
1738         # Check whether --enable-rlookups or --disable-rlookups was given.
1739 if test "${enable_rlookups+set}" = set; then
1740   enableval="$enable_rlookups"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1750         fi
1751         ol_enable_rlookups="$ol_arg"
1752
1753 else
1754         ol_enable_rlookups="auto"
1755 fi
1756 # end --enable-rlookups
1757 # OpenLDAP --enable-aci
1758         # Check whether --enable-aci or --disable-aci was given.
1759 if test "${enable_aci+set}" = set; then
1760   enableval="$enable_aci"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1770         fi
1771         ol_enable_aci="$ol_arg"
1772
1773 else
1774         ol_enable_aci="no"
1775 fi
1776 # end --enable-aci
1777 # OpenLDAP --enable-discreteaci
1778         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1779 if test "${enable_discreteaci+set}" = set; then
1780   enableval="$enable_discreteaci"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1790         fi
1791         ol_enable_discreteaci="$ol_arg"
1792
1793 else
1794         ol_enable_discreteaci="no"
1795 fi
1796 # end --enable-discreteaci
1797 # OpenLDAP --enable-wrappers
1798         # Check whether --enable-wrappers or --disable-wrappers was given.
1799 if test "${enable_wrappers+set}" = set; then
1800   enableval="$enable_wrappers"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1810         fi
1811         ol_enable_wrappers="$ol_arg"
1812
1813 else
1814         ol_enable_wrappers="no"
1815 fi
1816 # end --enable-wrappers
1817 # OpenLDAP --enable-dynamic
1818         # Check whether --enable-dynamic or --disable-dynamic was given.
1819 if test "${enable_dynamic+set}" = set; then
1820   enableval="$enable_dynamic"
1821   
1822         ol_arg=invalid
1823         for ol_val in auto yes no ; do
1824                 if test "$enableval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1830         fi
1831         ol_enable_dynamic="$ol_arg"
1832
1833 else
1834         ol_enable_dynamic="no"
1835 fi
1836 # end --enable-dynamic
1837
1838 # OpenLDAP --enable-bdb2
1839         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1840 if test "${enable_bdb2+set}" = set; then
1841   enableval="$enable_bdb2"
1842   
1843         ol_arg=invalid
1844         for ol_val in auto yes no ; do
1845                 if test "$enableval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1851         fi
1852         ol_enable_bdb2="$ol_arg"
1853
1854 else
1855         ol_enable_bdb2="no"
1856 fi
1857 # end --enable-bdb2
1858 # OpenLDAP --with-bdb2_module
1859         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1860 if test "${with_bdb2_module+set}" = set; then
1861   withval="$with_bdb2_module"
1862   
1863         ol_arg=invalid
1864         for ol_val in static dynamic ; do
1865                 if test "$withval" = "$ol_val" ; then
1866                         ol_arg="$ol_val"
1867                 fi
1868         done
1869         if test "$ol_arg" = "invalid" ; then
1870                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1871         fi
1872         ol_with_bdb2_module="$ol_arg"
1873
1874 else
1875         ol_with_bdb2_module="static"
1876 fi
1877 # end --with-bdb2_module
1878
1879 # OpenLDAP --enable-ldap
1880         # Check whether --enable-ldap or --disable-ldap was given.
1881 if test "${enable_ldap+set}" = set; then
1882   enableval="$enable_ldap"
1883   
1884         ol_arg=invalid
1885         for ol_val in auto yes no ; do
1886                 if test "$enableval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1892         fi
1893         ol_enable_ldap="$ol_arg"
1894
1895 else
1896         ol_enable_ldap="no"
1897 fi
1898 # end --enable-ldap
1899 # OpenLDAP --with-ldap_module
1900         # Check whether --with-ldap_module or --without-ldap_module was given.
1901 if test "${with_ldap_module+set}" = set; then
1902   withval="$with_ldap_module"
1903   
1904         ol_arg=invalid
1905         for ol_val in static dynamic ; do
1906                 if test "$withval" = "$ol_val" ; then
1907                         ol_arg="$ol_val"
1908                 fi
1909         done
1910         if test "$ol_arg" = "invalid" ; then
1911                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1912         fi
1913         ol_with_ldap_module="$ol_arg"
1914
1915 else
1916         ol_with_ldap_module="static"
1917 fi
1918 # end --with-ldap_module
1919
1920 # OpenLDAP --enable-ldbm
1921         # Check whether --enable-ldbm or --disable-ldbm was given.
1922 if test "${enable_ldbm+set}" = set; then
1923   enableval="$enable_ldbm"
1924   
1925         ol_arg=invalid
1926         for ol_val in auto yes no ; do
1927                 if test "$enableval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1933         fi
1934         ol_enable_ldbm="$ol_arg"
1935
1936 else
1937         ol_enable_ldbm="yes"
1938 fi
1939 # end --enable-ldbm
1940 # OpenLDAP --with-ldbm_api
1941         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1942 if test "${with_ldbm_api+set}" = set; then
1943   withval="$with_ldbm_api"
1944   
1945         ol_arg=invalid
1946         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1947                 if test "$withval" = "$ol_val" ; then
1948                         ol_arg="$ol_val"
1949                 fi
1950         done
1951         if test "$ol_arg" = "invalid" ; then
1952                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1953         fi
1954         ol_with_ldbm_api="$ol_arg"
1955
1956 else
1957         ol_with_ldbm_api="auto"
1958 fi
1959 # end --with-ldbm_api
1960
1961 # OpenLDAP --with-ldbm_module
1962         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1963 if test "${with_ldbm_module+set}" = set; then
1964   withval="$with_ldbm_module"
1965   
1966         ol_arg=invalid
1967         for ol_val in static dynamic ; do
1968                 if test "$withval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1974         fi
1975         ol_with_ldbm_module="$ol_arg"
1976
1977 else
1978         ol_with_ldbm_module="static"
1979 fi
1980 # end --with-ldbm_module
1981
1982 # OpenLDAP --with-ldbm_type
1983         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1984 if test "${with_ldbm_type+set}" = set; then
1985   withval="$with_ldbm_type"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto btree hash ; do
1989                 if test "$withval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1995         fi
1996         ol_with_ldbm_type="$ol_arg"
1997
1998 else
1999         ol_with_ldbm_type="auto"
2000 fi
2001 # end --with-ldbm_type
2002
2003
2004 # OpenLDAP --enable-passwd
2005         # Check whether --enable-passwd or --disable-passwd was given.
2006 if test "${enable_passwd+set}" = set; then
2007   enableval="$enable_passwd"
2008   
2009         ol_arg=invalid
2010         for ol_val in auto yes no ; do
2011                 if test "$enableval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2017         fi
2018         ol_enable_passwd="$ol_arg"
2019
2020 else
2021         ol_enable_passwd="no"
2022 fi
2023 # end --enable-passwd
2024 # OpenLDAP --with-passwd_module
2025         # Check whether --with-passwd_module or --without-passwd_module was given.
2026 if test "${with_passwd_module+set}" = set; then
2027   withval="$with_passwd_module"
2028   
2029         ol_arg=invalid
2030         for ol_val in static dynamic ; do
2031                 if test "$withval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2037         fi
2038         ol_with_passwd_module="$ol_arg"
2039
2040 else
2041         ol_with_passwd_module="static"
2042 fi
2043 # end --with-passwd_module
2044
2045 # OpenLDAP --enable-perl
2046         # Check whether --enable-perl or --disable-perl was given.
2047 if test "${enable_perl+set}" = set; then
2048   enableval="$enable_perl"
2049   
2050         ol_arg=invalid
2051         for ol_val in auto yes no ; do
2052                 if test "$enableval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2058         fi
2059         ol_enable_perl="$ol_arg"
2060
2061 else
2062         ol_enable_perl="no"
2063 fi
2064 # end --enable-perl
2065 # OpenLDAP --with-perl_module
2066         # Check whether --with-perl_module or --without-perl_module was given.
2067 if test "${with_perl_module+set}" = set; then
2068   withval="$with_perl_module"
2069   
2070         ol_arg=invalid
2071         for ol_val in static dynamic ; do
2072                 if test "$withval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2078         fi
2079         ol_with_perl_module="$ol_arg"
2080
2081 else
2082         ol_with_perl_module="static"
2083 fi
2084 # end --with-perl_module
2085
2086 # OpenLDAP --enable-shell
2087         # Check whether --enable-shell or --disable-shell was given.
2088 if test "${enable_shell+set}" = set; then
2089   enableval="$enable_shell"
2090   
2091         ol_arg=invalid
2092         for ol_val in auto yes no ; do
2093                 if test "$enableval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2099         fi
2100         ol_enable_shell="$ol_arg"
2101
2102 else
2103         ol_enable_shell="no"
2104 fi
2105 # end --enable-shell
2106 # OpenLDAP --with-shell_module
2107         # Check whether --with-shell_module or --without-shell_module was given.
2108 if test "${with_shell_module+set}" = set; then
2109   withval="$with_shell_module"
2110   
2111         ol_arg=invalid
2112         for ol_val in static dynamic ; do
2113                 if test "$withval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2119         fi
2120         ol_with_shell_module="$ol_arg"
2121
2122 else
2123         ol_with_shell_module="static"
2124 fi
2125 # end --with-shell_module
2126
2127 # OpenLDAP --enable-tcl
2128         # Check whether --enable-tcl or --disable-tcl was given.
2129 if test "${enable_tcl+set}" = set; then
2130   enableval="$enable_tcl"
2131   
2132         ol_arg=invalid
2133         for ol_val in auto yes no ; do
2134                 if test "$enableval" = "$ol_val" ; then
2135                         ol_arg="$ol_val"
2136                 fi
2137         done
2138         if test "$ol_arg" = "invalid" ; then
2139                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2140         fi
2141         ol_enable_tcl="$ol_arg"
2142
2143 else
2144         ol_enable_tcl="no"
2145 fi
2146 # end --enable-tcl
2147 # OpenLDAP --with-tcl_module
2148         # Check whether --with-tcl_module or --without-tcl_module was given.
2149 if test "${with_tcl_module+set}" = set; then
2150   withval="$with_tcl_module"
2151   
2152         ol_arg=invalid
2153         for ol_val in static dynamic ; do
2154                 if test "$withval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2160         fi
2161         ol_with_tcl_module="$ol_arg"
2162
2163 else
2164         ol_with_tcl_module="static"
2165 fi
2166 # end --with-tcl_module
2167
2168
2169 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2170 if test "${with_xxslurpdoptions+set}" = set; then
2171   withval="$with_xxslurpdoptions"
2172   :
2173 fi
2174
2175 # OpenLDAP --enable-slurpd
2176         # Check whether --enable-slurpd or --disable-slurpd was given.
2177 if test "${enable_slurpd+set}" = set; then
2178   enableval="$enable_slurpd"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto yes no ; do
2182                 if test "$enableval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2188         fi
2189         ol_enable_slurpd="$ol_arg"
2190
2191 else
2192         ol_enable_slurpd="auto"
2193 fi
2194 # end --enable-slurpd
2195
2196 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2197 if test "${with_xxliboptions+set}" = set; then
2198   withval="$with_xxliboptions"
2199   :
2200 fi
2201
2202 # Check whether --enable-static or --disable-static was given.
2203 if test "${enable_static+set}" = set; then
2204   enableval="$enable_static"
2205   p=${PACKAGE-default}
2206 case "$enableval" in
2207 yes) enable_static=yes ;;
2208 no) enable_static=no ;;
2209 *)
2210   enable_static=no
2211   # Look at the argument we got.  We use all the common list separators.
2212   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2213   for pkg in $enableval; do
2214     if test "X$pkg" = "X$p"; then
2215       enable_static=yes
2216     fi
2217   done
2218   IFS="$ac_save_ifs"
2219   ;;
2220 esac
2221 else
2222   enable_static=yes
2223 fi
2224
2225 # Check whether --enable-shared or --disable-shared was given.
2226 if test "${enable_shared+set}" = set; then
2227   enableval="$enable_shared"
2228   p=${PACKAGE-default}
2229 case "$enableval" in
2230 yes) enable_shared=yes ;;
2231 no) enable_shared=no ;;
2232 *)
2233   enable_shared=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_shared=yes
2239     fi
2240   done
2241   IFS="$ac_save_ifs"
2242   ;;
2243 esac
2244 else
2245   enable_shared=yes
2246 fi
2247
2248
2249
2250 # validate options
2251 if test $ol_enable_dns = yes ; then
2252         if test $ol_enable_referrals = no ; then
2253                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2254         fi
2255         if test $ol_enable_referrals = auto ; then
2256                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2257                 ol_enable_referrals=yes
2258         fi
2259 fi
2260
2261 if test $ol_enable_slapd = no ; then
2262                 if test $ol_enable_bdb2 = yes ; then
2263                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2264         fi
2265         if test $ol_enable_ldap = yes ; then
2266                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2267         fi
2268         if test $ol_enable_ldbm = yes ; then
2269                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2270         fi
2271         if test $ol_enable_passwd = yes ; then
2272                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2273         fi
2274         if test $ol_enable_perl = yes ; then
2275                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2276         fi
2277         if test $ol_enable_shell = yes ; then
2278                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2279         fi
2280         if test $ol_enable_tcl = yes ; then
2281                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2282         fi
2283         if test $ol_enable_modules = yes ; then
2284                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2285         fi
2286         if test $ol_enable_multimaster = yes ; then
2287                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2288         fi
2289         if test $ol_enable_wrappers = yes ; then
2290                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2291         fi
2292         if test $ol_enable_phonetic = yes ; then
2293                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2294         fi
2295         if test $ol_enable_quipu = yes ; then
2296                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2297         fi
2298         if test $ol_enable_rlookups = yes ; then
2299                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2300         fi
2301         if test $ol_enable_aci = yes ; then
2302                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2303         fi
2304         if test $ol_enable_discreteaci = yes ; then
2305                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2306         fi
2307         if test $ol_with_ldbm_api != auto ; then
2308                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2309         fi
2310         if test $ol_with_ldbm_type != auto ; then
2311                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2312         fi
2313         if test $ol_with_bdb2_module != static ; then
2314                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2315         fi
2316         if test $ol_with_ldap_module != static ; then
2317                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2318         fi
2319         if test $ol_with_ldbm_module != static ; then
2320                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2321         fi
2322         if test $ol_with_passwd_module != static ; then
2323                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2324         fi
2325         if test $ol_with_perl_module != static ; then
2326                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2327         fi
2328         if test $ol_with_shell_module != static ; then
2329                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2330         fi
2331         if test $ol_with_tcl_module != static ; then
2332                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2333         fi
2334         if test $ol_enable_slurpd = yes ; then
2335                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2336         fi
2337
2338         # force settings to no
2339         ol_enable_bdb2=no
2340         ol_enable_ldap=no
2341         ol_enable_ldbm=no
2342         ol_enable_passwd=no
2343         ol_enable_perl=no
2344         ol_enable_shell=no
2345         ol_enable_tcl=no
2346
2347         ol_enable_modules=no
2348         ol_enable_multimaster=no
2349         ol_enable_phonetic=no
2350         ol_enable_quipu=no
2351         ol_enable_rlookups=no
2352         ol_enable_aci=no
2353         ol_enable_discreteaci=no
2354         ol_enable_wrappers=no
2355         ol_enable_dynamic=no
2356
2357         ol_with_ldbm_api=no
2358         ol_with_ldbm_type=no
2359
2360         ol_with_bdb2_module=static
2361         ol_with_ldap_module=static
2362         ol_with_ldbm_module=static
2363         ol_with_passwd_module=static
2364         ol_with_perl_module=static
2365         ol_with_shell_module=static
2366         ol_with_tcl_module=static
2367
2368         ol_enable_slurpd=no
2369
2370 elif test $ol_enable_ldbm = no ; then
2371         
2372         if test $ol_with_ldbm_api != auto ; then
2373                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2374         fi
2375
2376         if test $ol_with_ldbm_type != auto ; then
2377                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2378         fi
2379
2380         if test $ol_with_ldbm_module != static ; then
2381                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2382         fi
2383
2384         if test $ol_enable_bdb2 = yes ; then
2385                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2386         fi
2387
2388         if test $ol_enable_modules != yes -a \
2389                 $ol_enable_ldap = no -a \
2390                 $ol_enable_passwd = no -a \
2391                 $ol_enable_perl = no -a \
2392                 $ol_enable_shell = no -a \
2393                 $ol_enable_tcl = no ; then
2394                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2395         fi
2396
2397         ol_with_ldbm_api=no
2398         ol_with_ldbm_type=no
2399         ol_with_ldbm_module=static
2400
2401 elif test $ol_enable_bdb2 = yes ; then
2402         
2403         if test $ol_with_ldbm_api != auto -a \
2404                 $ol_with_ldbm_api != db2 ; then
2405                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2406         fi
2407
2408         ol_with_ldbm_api=db2
2409
2410 else
2411         
2412         if test $ol_enable_bdb2 != no ; then
2413                 if test $ol_with_ldbm_api != auto -a \
2414                         $ol_with_ldbm_api != db2 ; then
2415                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2416                         ol_enable_bdb2=no
2417                 fi
2418         fi
2419
2420         if test $ol_with_ldbm_api = gdbm -a \
2421                 $ol_with_ldbm_type = btree ; then
2422                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2423         fi
2424         if test $ol_with_ldbm_api = mdbm -a \
2425                 $ol_with_ldbm_type = btree ; then
2426                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2427         fi
2428         if test $ol_with_ldbm_api = ndbm -a \
2429                 $ol_with_ldbm_type = btree ; then
2430                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2431         fi
2432 fi
2433
2434 if test $ol_enable_slurpd = yes ; then
2435                 if test $ol_with_threads = no ; then
2436                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2437         fi
2438 fi
2439
2440 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2441         if test $ol_with_kerberos = no ; then
2442                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2443         fi
2444 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2445         if test $ol_with_kerberos != auto ; then
2446                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2447         else
2448                 ol_with_kerberos=no
2449         fi
2450 fi
2451
2452 echo "$ac_t""done" 1>&6
2453
2454 LDAP_LIBS=
2455 LDIF_LIBS=
2456 LDBM_LIBS=
2457 LTHREAD_LIBS=
2458 LUTIL_LIBS=
2459
2460 LDAPD_LIBS=
2461 SLAPD_LIBS=
2462 SLURPD_LIBS=
2463
2464 BUILD_LDAPD=no
2465 BUILD_SLAPD=no
2466 BUILD_SLURPD=no
2467
2468 BUILD_BDB2=no
2469 BUILD_LDAP=no
2470 BUILD_LDBM=no
2471 BUILD_PASSWD=no
2472 BUILD_PERL=no
2473 BUILD_QUIPU=no
2474 BUILD_SHELL=no
2475 BUILD_TCL=no
2476 BUILD_THREAD=no
2477
2478 BUILD_BDB2_DYNAMIC=static
2479 BUILD_LDAP_DYNAMIC=static
2480 BUILD_LDBM_DYNAMIC=static
2481 BUILD_PASSWD_DYNAMIC=static
2482 BUILD_PERL_DYNAMIC=static
2483 BUILD_SHELL_DYNAMIC=static
2484 BUILD_TCL_DYNAMIC=static
2485
2486 SLAPD_MODULES_LDFLAGS=
2487 SLAPD_MODULES_CPPFLAGS=
2488 SLAPD_MODULES_LIST=
2489
2490 SLAPD_PERL_LDFLAGS=
2491 MOD_PERL_LDFLAGS=
2492 PERL_CPPFLAGS=
2493
2494 MOD_TCL_LIB=
2495 KRB4_LIBS=
2496 KRB5_LIBS=
2497 READLINE_LIBS=
2498 SASL_LIBS=
2499 TERMCAP_LIBS=
2500 TLS_LIBS=
2501 MODULES_LIBS=
2502
2503
2504
2505 cat >> confdefs.h <<\EOF
2506 #define HAVE_MKVERSION 1
2507 EOF
2508
2509
2510
2511
2512 ol_aix_threads=no
2513 case "$target" in
2514 *-*-aix*)       if test -z "$CC" ; then
2515                 case "$ol_with_threads" in
2516                 auto | yes |  posix) ol_aix_threads=yes ;;
2517                 esac
2518         fi
2519 ;;
2520 esac
2521
2522 if test $ol_aix_threads = yes ; then
2523         if test -z "${CC}" ; then
2524                 for ac_prog in cc_r xlc_r cc
2525 do
2526 # Extract the first word of "$ac_prog", so it can be a program name with args.
2527 set dummy $ac_prog; ac_word=$2
2528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2529 echo "configure:2530: checking for $ac_word" >&5
2530 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2531   echo $ac_n "(cached) $ac_c" 1>&6
2532 else
2533   if test -n "$CC"; then
2534   ac_cv_prog_CC="$CC" # Let the user override the test.
2535 else
2536   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2537   ac_dummy="$PATH"
2538   for ac_dir in $ac_dummy; do
2539     test -z "$ac_dir" && ac_dir=.
2540     if test -f $ac_dir/$ac_word; then
2541       ac_cv_prog_CC="$ac_prog"
2542       break
2543     fi
2544   done
2545   IFS="$ac_save_ifs"
2546 fi
2547 fi
2548 CC="$ac_cv_prog_CC"
2549 if test -n "$CC"; then
2550   echo "$ac_t""$CC" 1>&6
2551 else
2552   echo "$ac_t""no" 1>&6
2553 fi
2554
2555 test -n "$CC" && break
2556 done
2557
2558
2559                 if test "$CC" = cc ; then
2560                                                 if test $ol_with_threads != auto ; then
2561                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2562                         else
2563                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2564                         fi
2565                         ol_with_threads=no
2566                 fi
2567         fi
2568
2569         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2570                 ol_with_threads=posix
2571                 ol_cv_pthread_create=yes
2572         fi
2573 fi
2574
2575 if test -z "${CC}"; then
2576         for ac_prog in cc
2577 do
2578 # Extract the first word of "$ac_prog", so it can be a program name with args.
2579 set dummy $ac_prog; ac_word=$2
2580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_word" >&5
2582 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   if test -n "$CC"; then
2586   ac_cv_prog_CC="$CC" # Let the user override the test.
2587 else
2588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2589   ac_dummy="$PATH"
2590   for ac_dir in $ac_dummy; do
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       ac_cv_prog_CC="$ac_prog"
2594       break
2595     fi
2596   done
2597   IFS="$ac_save_ifs"
2598 fi
2599 fi
2600 CC="$ac_cv_prog_CC"
2601 if test -n "$CC"; then
2602   echo "$ac_t""$CC" 1>&6
2603 else
2604   echo "$ac_t""no" 1>&6
2605 fi
2606
2607 test -n "$CC" && break
2608 done
2609
2610 fi
2611
2612
2613
2614
2615 # Check whether --enable-fast-install or --disable-fast-install was given.
2616 if test "${enable_fast_install+set}" = set; then
2617   enableval="$enable_fast_install"
2618   p=${PACKAGE-default}
2619 case "$enableval" in
2620 yes) enable_fast_install=yes ;;
2621 no) enable_fast_install=no ;;
2622 *)
2623   enable_fast_install=no
2624   # Look at the argument we got.  We use all the common list separators.
2625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2626   for pkg in $enableval; do
2627     if test "X$pkg" = "X$p"; then
2628       enable_fast_install=yes
2629     fi
2630   done
2631   IFS="$ac_save_ifs"
2632   ;;
2633 esac
2634 else
2635   enable_fast_install=yes
2636 fi
2637
2638 # Extract the first word of "ranlib", so it can be a program name with args.
2639 set dummy ranlib; ac_word=$2
2640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2641 echo "configure:2642: checking for $ac_word" >&5
2642 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   if test -n "$RANLIB"; then
2646   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2647 else
2648   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2649   ac_dummy="$PATH"
2650   for ac_dir in $ac_dummy; do
2651     test -z "$ac_dir" && ac_dir=.
2652     if test -f $ac_dir/$ac_word; then
2653       ac_cv_prog_RANLIB="ranlib"
2654       break
2655     fi
2656   done
2657   IFS="$ac_save_ifs"
2658   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2659 fi
2660 fi
2661 RANLIB="$ac_cv_prog_RANLIB"
2662 if test -n "$RANLIB"; then
2663   echo "$ac_t""$RANLIB" 1>&6
2664 else
2665   echo "$ac_t""no" 1>&6
2666 fi
2667
2668 # Extract the first word of "gcc", so it can be a program name with args.
2669 set dummy gcc; ac_word=$2
2670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2671 echo "configure:2672: checking for $ac_word" >&5
2672 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2673   echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675   if test -n "$CC"; then
2676   ac_cv_prog_CC="$CC" # Let the user override the test.
2677 else
2678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2679   ac_dummy="$PATH"
2680   for ac_dir in $ac_dummy; do
2681     test -z "$ac_dir" && ac_dir=.
2682     if test -f $ac_dir/$ac_word; then
2683       ac_cv_prog_CC="gcc"
2684       break
2685     fi
2686   done
2687   IFS="$ac_save_ifs"
2688 fi
2689 fi
2690 CC="$ac_cv_prog_CC"
2691 if test -n "$CC"; then
2692   echo "$ac_t""$CC" 1>&6
2693 else
2694   echo "$ac_t""no" 1>&6
2695 fi
2696
2697 if test -z "$CC"; then
2698   # Extract the first word of "cc", so it can be a program name with args.
2699 set dummy cc; ac_word=$2
2700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2701 echo "configure:2702: checking for $ac_word" >&5
2702 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2703   echo $ac_n "(cached) $ac_c" 1>&6
2704 else
2705   if test -n "$CC"; then
2706   ac_cv_prog_CC="$CC" # Let the user override the test.
2707 else
2708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2709   ac_prog_rejected=no
2710   ac_dummy="$PATH"
2711   for ac_dir in $ac_dummy; do
2712     test -z "$ac_dir" && ac_dir=.
2713     if test -f $ac_dir/$ac_word; then
2714       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2715         ac_prog_rejected=yes
2716         continue
2717       fi
2718       ac_cv_prog_CC="cc"
2719       break
2720     fi
2721   done
2722   IFS="$ac_save_ifs"
2723 if test $ac_prog_rejected = yes; then
2724   # We found a bogon in the path, so make sure we never use it.
2725   set dummy $ac_cv_prog_CC
2726   shift
2727   if test $# -gt 0; then
2728     # We chose a different compiler from the bogus one.
2729     # However, it has the same basename, so the bogon will be chosen
2730     # first if we set CC to just the basename; use the full file name.
2731     shift
2732     set dummy "$ac_dir/$ac_word" "$@"
2733     shift
2734     ac_cv_prog_CC="$@"
2735   fi
2736 fi
2737 fi
2738 fi
2739 CC="$ac_cv_prog_CC"
2740 if test -n "$CC"; then
2741   echo "$ac_t""$CC" 1>&6
2742 else
2743   echo "$ac_t""no" 1>&6
2744 fi
2745
2746   if test -z "$CC"; then
2747     case "`uname -s`" in
2748     *win32* | *WIN32* | *CYGWIN*)
2749       # Extract the first word of "cl", so it can be a program name with args.
2750 set dummy cl; ac_word=$2
2751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2752 echo "configure:2753: checking for $ac_word" >&5
2753 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   if test -n "$CC"; then
2757   ac_cv_prog_CC="$CC" # Let the user override the test.
2758 else
2759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2760   ac_dummy="$PATH"
2761   for ac_dir in $ac_dummy; do
2762     test -z "$ac_dir" && ac_dir=.
2763     if test -f $ac_dir/$ac_word; then
2764       ac_cv_prog_CC="cl"
2765       break
2766     fi
2767   done
2768   IFS="$ac_save_ifs"
2769 fi
2770 fi
2771 CC="$ac_cv_prog_CC"
2772 if test -n "$CC"; then
2773   echo "$ac_t""$CC" 1>&6
2774 else
2775   echo "$ac_t""no" 1>&6
2776 fi
2777  ;;
2778     esac
2779   fi
2780   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2781 fi
2782
2783 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2784 echo "configure:2785: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2785
2786 ac_ext=c
2787 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2788 ac_cpp='$CPP $CPPFLAGS'
2789 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2790 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2791 cross_compiling=$ac_cv_prog_cc_cross
2792
2793 cat > conftest.$ac_ext << EOF
2794
2795 #line 2796 "configure"
2796 #include "confdefs.h"
2797
2798 main(){return(0);}
2799 EOF
2800 if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2801   ac_cv_prog_cc_works=yes
2802   # If we can't run a trivial program, we are probably using a cross compiler.
2803   if (./conftest; exit) 2>/dev/null; then
2804     ac_cv_prog_cc_cross=no
2805   else
2806     ac_cv_prog_cc_cross=yes
2807   fi
2808 else
2809   echo "configure: failed program was:" >&5
2810   cat conftest.$ac_ext >&5
2811   ac_cv_prog_cc_works=no
2812 fi
2813 rm -fr conftest*
2814 ac_ext=c
2815 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2816 ac_cpp='$CPP $CPPFLAGS'
2817 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2818 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2819 cross_compiling=$ac_cv_prog_cc_cross
2820
2821 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2822 if test $ac_cv_prog_cc_works = no; then
2823   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2824 fi
2825 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2826 echo "configure:2827: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2827 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2828 cross_compiling=$ac_cv_prog_cc_cross
2829
2830 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2831 echo "configure:2832: checking whether we are using GNU C" >&5
2832 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2833   echo $ac_n "(cached) $ac_c" 1>&6
2834 else
2835   cat > conftest.c <<EOF
2836 #ifdef __GNUC__
2837   yes;
2838 #endif
2839 EOF
2840 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2841   ac_cv_prog_gcc=yes
2842 else
2843   ac_cv_prog_gcc=no
2844 fi
2845 fi
2846
2847 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2848
2849 if test $ac_cv_prog_gcc = yes; then
2850   GCC=yes
2851 else
2852   GCC=
2853 fi
2854
2855 ac_test_CFLAGS="${CFLAGS+set}"
2856 ac_save_CFLAGS="$CFLAGS"
2857 CFLAGS=
2858 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2859 echo "configure:2860: checking whether ${CC-cc} accepts -g" >&5
2860 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   echo 'void f(){}' > conftest.c
2864 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2865   ac_cv_prog_cc_g=yes
2866 else
2867   ac_cv_prog_cc_g=no
2868 fi
2869 rm -f conftest*
2870
2871 fi
2872
2873 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2874 if test "$ac_test_CFLAGS" = set; then
2875   CFLAGS="$ac_save_CFLAGS"
2876 elif test $ac_cv_prog_cc_g = yes; then
2877   if test "$GCC" = yes; then
2878     CFLAGS="-g -O2"
2879   else
2880     CFLAGS="-g"
2881   fi
2882 else
2883   if test "$GCC" = yes; then
2884     CFLAGS="-O2"
2885   else
2886     CFLAGS=
2887   fi
2888 fi
2889
2890 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2891 if test "${with_gnu_ld+set}" = set; then
2892   withval="$with_gnu_ld"
2893   test "$withval" = no || with_gnu_ld=yes
2894 else
2895   with_gnu_ld=no
2896 fi
2897
2898 ac_prog=ld
2899 if test "$ac_cv_prog_gcc" = yes; then
2900   # Check if gcc -print-prog-name=ld gives a path.
2901   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2902 echo "configure:2903: checking for ld used by GCC" >&5
2903   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2904   case "$ac_prog" in
2905     # Accept absolute paths.
2906     [\\/]* | [A-Za-z]:[\\/]*)
2907       re_direlt='/[^/][^/]*/\.\./'
2908       # Canonicalize the path of ld
2909       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2910       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2911         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2912       done
2913       test -z "$LD" && LD="$ac_prog"
2914       ;;
2915   "")
2916     # If it fails, then pretend we aren't using GCC.
2917     ac_prog=ld
2918     ;;
2919   *)
2920     # If it is relative, then search for the first ld in PATH.
2921     with_gnu_ld=unknown
2922     ;;
2923   esac
2924 elif test "$with_gnu_ld" = yes; then
2925   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2926 echo "configure:2927: checking for GNU ld" >&5
2927 else
2928   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2929 echo "configure:2930: checking for non-GNU ld" >&5
2930 fi
2931 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2932   echo $ac_n "(cached) $ac_c" 1>&6
2933 else
2934   if test -z "$LD"; then
2935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2936   for ac_dir in $PATH; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2939       ac_cv_path_LD="$ac_dir/$ac_prog"
2940       # Check to see if the program is GNU ld.  I'd rather use --version,
2941       # but apparently some GNU ld's only accept -v.
2942       # Break only if it was the GNU/non-GNU ld that we prefer.
2943       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2944         test "$with_gnu_ld" != no && break
2945       else
2946         test "$with_gnu_ld" != yes && break
2947       fi
2948     fi
2949   done
2950   IFS="$ac_save_ifs"
2951 else
2952   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2953 fi
2954 fi
2955
2956 LD="$ac_cv_path_LD"
2957 if test -n "$LD"; then
2958   echo "$ac_t""$LD" 1>&6
2959 else
2960   echo "$ac_t""no" 1>&6
2961 fi
2962 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2963
2964 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2965 echo "configure:2966: checking if the linker ($LD) is GNU ld" >&5
2966 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2970 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2971   ac_cv_prog_gnu_ld=yes
2972 else
2973   ac_cv_prog_gnu_ld=no
2974 fi
2975 fi
2976
2977 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2978
2979
2980 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2981 echo "configure:2982: checking for BSD-compatible nm" >&5
2982 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   if test -n "$NM"; then
2986   # Let the user override the test.
2987   ac_cv_path_NM="$NM"
2988 else
2989   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2990   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2991     test -z "$ac_dir" && ac_dir=.
2992     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2993       # Check to see if the nm accepts a BSD-compat flag.
2994       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2995       #   nm: unknown option "B" ignored
2996       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2997         ac_cv_path_NM="$ac_dir/nm -B"
2998         break
2999       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3000         ac_cv_path_NM="$ac_dir/nm -p"
3001         break
3002       else
3003         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3004         continue # so that we can try to find one that supports BSD flags
3005       fi
3006     fi
3007   done
3008   IFS="$ac_save_ifs"
3009   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3010 fi
3011 fi
3012
3013 NM="$ac_cv_path_NM"
3014 echo "$ac_t""$NM" 1>&6
3015
3016
3017 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3018 echo "configure:3019: checking whether ln -s works" >&5
3019 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   rm -f conftestdata
3023 if ln -s X conftestdata 2>/dev/null
3024 then
3025   rm -f conftestdata
3026   ac_cv_prog_LN_S="ln -s"
3027 else
3028   ac_cv_prog_LN_S=ln
3029 fi
3030 fi
3031 LN_S="$ac_cv_prog_LN_S"
3032 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3033   echo "$ac_t""yes" 1>&6
3034 else
3035   echo "$ac_t""no" 1>&6
3036 fi
3037
3038 if test $host != $build; then
3039   ac_tool_prefix=${host_alias}-
3040 else
3041   ac_tool_prefix=
3042 fi
3043
3044
3045 # Check for any special flags to pass to ltconfig.
3046 libtool_flags="--cache-file=$cache_file"
3047 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3048 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3049 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3050 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3051 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3052 libtool_flags="$libtool_flags --enable-dlopen"
3053 libtool_flags="$libtool_flags --enable-win32-dll"
3054 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3055 if test "${enable_libtool_lock+set}" = set; then
3056   enableval="$enable_libtool_lock"
3057   :
3058 fi
3059
3060 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3061 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3062
3063 # Some flags need to be propagated to the compiler or linker for good
3064 # libtool support.
3065 case "$host" in
3066 *-*-irix6*)
3067   # Find out which ABI we are using.
3068   echo '#line 3069 "configure"' > conftest.$ac_ext
3069   if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3070     case "`/usr/bin/file conftest.o`" in
3071     *32-bit*)
3072       LD="${LD-ld} -32"
3073       ;;
3074     *N32*)
3075       LD="${LD-ld} -n32"
3076       ;;
3077     *64-bit*)
3078       LD="${LD-ld} -64"
3079       ;;
3080     esac
3081   fi
3082   rm -rf conftest*
3083   ;;
3084
3085 *-*-sco3.2v5*)
3086   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3087   SAVE_CFLAGS="$CFLAGS"
3088   CFLAGS="$CFLAGS -belf"
3089   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3090 echo "configure:3091: checking whether the C compiler needs -belf" >&5
3091 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   cat > conftest.$ac_ext <<EOF
3095 #line 3096 "configure"
3096 #include "confdefs.h"
3097
3098 int main() {
3099
3100 ; return 0; }
3101 EOF
3102 if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3103   rm -rf conftest*
3104   lt_cv_cc_needs_belf=yes
3105 else
3106   echo "configure: failed program was:" >&5
3107   cat conftest.$ac_ext >&5
3108   rm -rf conftest*
3109   lt_cv_cc_needs_belf=no
3110 fi
3111 rm -f conftest*
3112 fi
3113
3114 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3115   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3116     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3117     CFLAGS="$SAVE_CFLAGS"
3118   fi
3119   ;;
3120
3121 *-*-cygwin* | *-*-mingw*)
3122   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3123 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3125 echo "configure:3126: checking for $ac_word" >&5
3126 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   if test -n "$DLLTOOL"; then
3130   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3131 else
3132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3133   ac_dummy="$PATH"
3134   for ac_dir in $ac_dummy; do
3135     test -z "$ac_dir" && ac_dir=.
3136     if test -f $ac_dir/$ac_word; then
3137       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3138       break
3139     fi
3140   done
3141   IFS="$ac_save_ifs"
3142 fi
3143 fi
3144 DLLTOOL="$ac_cv_prog_DLLTOOL"
3145 if test -n "$DLLTOOL"; then
3146   echo "$ac_t""$DLLTOOL" 1>&6
3147 else
3148   echo "$ac_t""no" 1>&6
3149 fi
3150
3151
3152 if test -z "$ac_cv_prog_DLLTOOL"; then
3153 if test -n "$ac_tool_prefix"; then
3154   # Extract the first word of "dlltool", so it can be a program name with args.
3155 set dummy dlltool; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   if test -n "$DLLTOOL"; then
3162   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3163 else
3164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3165   ac_dummy="$PATH"
3166   for ac_dir in $ac_dummy; do
3167     test -z "$ac_dir" && ac_dir=.
3168     if test -f $ac_dir/$ac_word; then
3169       ac_cv_prog_DLLTOOL="dlltool"
3170       break
3171     fi
3172   done
3173   IFS="$ac_save_ifs"
3174   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3175 fi
3176 fi
3177 DLLTOOL="$ac_cv_prog_DLLTOOL"
3178 if test -n "$DLLTOOL"; then
3179   echo "$ac_t""$DLLTOOL" 1>&6
3180 else
3181   echo "$ac_t""no" 1>&6
3182 fi
3183
3184 else
3185   DLLTOOL="false"
3186 fi
3187 fi
3188
3189   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3190 set dummy ${ac_tool_prefix}as; ac_word=$2
3191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3192 echo "configure:3193: checking for $ac_word" >&5
3193 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3194   echo $ac_n "(cached) $ac_c" 1>&6
3195 else
3196   if test -n "$AS"; then
3197   ac_cv_prog_AS="$AS" # Let the user override the test.
3198 else
3199   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3200   ac_dummy="$PATH"
3201   for ac_dir in $ac_dummy; do
3202     test -z "$ac_dir" && ac_dir=.
3203     if test -f $ac_dir/$ac_word; then
3204       ac_cv_prog_AS="${ac_tool_prefix}as"
3205       break
3206     fi
3207   done
3208   IFS="$ac_save_ifs"
3209 fi
3210 fi
3211 AS="$ac_cv_prog_AS"
3212 if test -n "$AS"; then
3213   echo "$ac_t""$AS" 1>&6
3214 else
3215   echo "$ac_t""no" 1>&6
3216 fi
3217
3218
3219 if test -z "$ac_cv_prog_AS"; then
3220 if test -n "$ac_tool_prefix"; then
3221   # Extract the first word of "as", so it can be a program name with args.
3222 set dummy as; ac_word=$2
3223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224 echo "configure:3225: checking for $ac_word" >&5
3225 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$AS"; then
3229   ac_cv_prog_AS="$AS" # Let the user override the test.
3230 else
3231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3232   ac_dummy="$PATH"
3233   for ac_dir in $ac_dummy; do
3234     test -z "$ac_dir" && ac_dir=.
3235     if test -f $ac_dir/$ac_word; then
3236       ac_cv_prog_AS="as"
3237       break
3238     fi
3239   done
3240   IFS="$ac_save_ifs"
3241   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3242 fi
3243 fi
3244 AS="$ac_cv_prog_AS"
3245 if test -n "$AS"; then
3246   echo "$ac_t""$AS" 1>&6
3247 else
3248   echo "$ac_t""no" 1>&6
3249 fi
3250
3251 else
3252   AS="false"
3253 fi
3254 fi
3255
3256   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3257 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3258 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3259 echo "configure:3260: checking for $ac_word" >&5
3260 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   if test -n "$OBJDUMP"; then
3264   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3265 else
3266   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3267   ac_dummy="$PATH"
3268   for ac_dir in $ac_dummy; do
3269     test -z "$ac_dir" && ac_dir=.
3270     if test -f $ac_dir/$ac_word; then
3271       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3272       break
3273     fi
3274   done
3275   IFS="$ac_save_ifs"
3276 fi
3277 fi
3278 OBJDUMP="$ac_cv_prog_OBJDUMP"
3279 if test -n "$OBJDUMP"; then
3280   echo "$ac_t""$OBJDUMP" 1>&6
3281 else
3282   echo "$ac_t""no" 1>&6
3283 fi
3284
3285
3286 if test -z "$ac_cv_prog_OBJDUMP"; then
3287 if test -n "$ac_tool_prefix"; then
3288   # Extract the first word of "objdump", so it can be a program name with args.
3289 set dummy objdump; ac_word=$2
3290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3291 echo "configure:3292: checking for $ac_word" >&5
3292 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3293   echo $ac_n "(cached) $ac_c" 1>&6
3294 else
3295   if test -n "$OBJDUMP"; then
3296   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3297 else
3298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3299   ac_dummy="$PATH"
3300   for ac_dir in $ac_dummy; do
3301     test -z "$ac_dir" && ac_dir=.
3302     if test -f $ac_dir/$ac_word; then
3303       ac_cv_prog_OBJDUMP="objdump"
3304       break
3305     fi
3306   done
3307   IFS="$ac_save_ifs"
3308   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3309 fi
3310 fi
3311 OBJDUMP="$ac_cv_prog_OBJDUMP"
3312 if test -n "$OBJDUMP"; then
3313   echo "$ac_t""$OBJDUMP" 1>&6
3314 else
3315   echo "$ac_t""no" 1>&6
3316 fi
3317
3318 else
3319   OBJDUMP="false"
3320 fi
3321 fi
3322
3323   ;;
3324
3325 esac
3326
3327
3328 # Save cache, so that ltconfig can load it
3329
3330
3331 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3332 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3333 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3334 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3335 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3336 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3337 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3338 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3339
3340 # Reload cache, that may have been modified by ltconfig
3341
3342
3343 # This can be used to rebuild libtool when needed
3344 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3345
3346 # Always use our own libtool.
3347 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3348
3349 # Redirect the config.log output again, so that the ltconfig log is not
3350 # clobbered by the next message.
3351 exec 5>>./config.log
3352
3353
3354 for ac_prog in mawk gawk nawk awk
3355 do
3356 # Extract the first word of "$ac_prog", so it can be a program name with args.
3357 set dummy $ac_prog; ac_word=$2
3358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3359 echo "configure:3360: checking for $ac_word" >&5
3360 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   if test -n "$AWK"; then
3364   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3365 else
3366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3367   ac_dummy="$PATH"
3368   for ac_dir in $ac_dummy; do
3369     test -z "$ac_dir" && ac_dir=.
3370     if test -f $ac_dir/$ac_word; then
3371       ac_cv_prog_AWK="$ac_prog"
3372       break
3373     fi
3374   done
3375   IFS="$ac_save_ifs"
3376 fi
3377 fi
3378 AWK="$ac_cv_prog_AWK"
3379 if test -n "$AWK"; then
3380   echo "$ac_t""$AWK" 1>&6
3381 else
3382   echo "$ac_t""no" 1>&6
3383 fi
3384
3385 test -n "$AWK" && break
3386 done
3387
3388 # test for ln hardlink support
3389 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3390 echo "configure:3391: checking whether ln works" >&5
3391 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   rm -f conftest.src conftest.dst
3395 echo "conftest" > conftest.src
3396 if ln conftest.src conftest.dst 2>/dev/null
3397 then
3398   ol_cv_prog_LN_H="ln"
3399 else
3400   ol_cv_prog_LN_H="cp"
3401 fi
3402 rm -f conftest.src conftest.dst
3403
3404 fi
3405 LN_H="$ol_cv_prog_LN_H"
3406 if test "$ol_cv_prog_LN_H" = "ln"; then
3407         echo "$ac_t""yes" 1>&6
3408 else
3409         echo "$ac_t""no" 1>&6
3410 fi
3411
3412 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3413 echo "configure:3414: checking whether ln -s works" >&5
3414 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   rm -f conftestdata
3418 if ln -s X conftestdata 2>/dev/null
3419 then
3420   rm -f conftestdata
3421   ac_cv_prog_LN_S="ln -s"
3422 else
3423   ac_cv_prog_LN_S=ln
3424 fi
3425 fi
3426 LN_S="$ac_cv_prog_LN_S"
3427 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3428   echo "$ac_t""yes" 1>&6
3429 else
3430   echo "$ac_t""no" 1>&6
3431 fi
3432
3433
3434 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3435         LN_S="$LN_H"
3436 fi
3437
3438 # Extract the first word of "sendmail", so it can be a program name with args.
3439 set dummy sendmail; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   case "$SENDMAIL" in
3446   /*)
3447   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3448   ;;
3449   ?:/*)
3450   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3451   ;;
3452   *)
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3455   for ac_dir in $ac_dummy; do 
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3464   ;;
3465 esac
3466 fi
3467 SENDMAIL="$ac_cv_path_SENDMAIL"
3468 if test -n "$SENDMAIL"; then
3469   echo "$ac_t""$SENDMAIL" 1>&6
3470 else
3471   echo "$ac_t""no" 1>&6
3472 fi
3473
3474 # Extract the first word of "vi", so it can be a program name with args.
3475 set dummy vi; ac_word=$2
3476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3477 echo "configure:3478: checking for $ac_word" >&5
3478 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   case "$EDITOR" in
3482   /*)
3483   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3484   ;;
3485   ?:/*)
3486   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3487   ;;
3488   *)
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH:/usr/ucb"
3491   for ac_dir in $ac_dummy; do 
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3500   ;;
3501 esac
3502 fi
3503 EDITOR="$ac_cv_path_EDITOR"
3504 if test -n "$EDITOR"; then
3505   echo "$ac_t""$EDITOR" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509
3510 # Extract the first word of "finger", so it can be a program name with args.
3511 set dummy finger; ac_word=$2
3512 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3513 echo "configure:3514: checking for $ac_word" >&5
3514 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   case "$FINGER" in
3518   /*)
3519   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3520   ;;
3521   ?:/*)
3522   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3523   ;;
3524   *)
3525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3526   ac_dummy="$PATH:/usr/ucb"
3527   for ac_dir in $ac_dummy; do 
3528     test -z "$ac_dir" && ac_dir=.
3529     if test -f $ac_dir/$ac_word; then
3530       ac_cv_path_FINGER="$ac_dir/$ac_word"
3531       break
3532     fi
3533   done
3534   IFS="$ac_save_ifs"
3535   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3536   ;;
3537 esac
3538 fi
3539 FINGER="$ac_cv_path_FINGER"
3540 if test -n "$FINGER"; then
3541   echo "$ac_t""$FINGER" 1>&6
3542 else
3543   echo "$ac_t""no" 1>&6
3544 fi
3545
3546
3547 ol_link_perl=no
3548 if test $ol_enable_perl != no ; then
3549         # Extract the first word of "perl", so it can be a program name with args.
3550 set dummy perl; ac_word=$2
3551 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3552 echo "configure:3553: checking for $ac_word" >&5
3553 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   case "$PERLBIN" in
3557   /*)
3558   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3559   ;;
3560   ?:/*)
3561   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3562   ;;
3563   *)
3564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3565   ac_dummy="$PATH"
3566   for ac_dir in $ac_dummy; do 
3567     test -z "$ac_dir" && ac_dir=.
3568     if test -f $ac_dir/$ac_word; then
3569       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3570       break
3571     fi
3572   done
3573   IFS="$ac_save_ifs"
3574   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3575   ;;
3576 esac
3577 fi
3578 PERLBIN="$ac_cv_path_PERLBIN"
3579 if test -n "$PERLBIN"; then
3580   echo "$ac_t""$PERLBIN" 1>&6
3581 else
3582   echo "$ac_t""no" 1>&6
3583 fi
3584
3585
3586         if test "no$PERLBIN" = "no" ; then
3587                 if test $ol_enable_perl = yes ; then
3588                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3589                 fi
3590
3591         else
3592                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3593                 if test x"$ol_with_perl_module" = "xstatic" ; then
3594                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3595                 else
3596                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3597                 fi
3598                                 ol_link_perl=yes
3599         fi
3600 fi
3601
3602 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3603 echo "configure:3604: checking how to run the C preprocessor" >&5
3604 # On Suns, sometimes $CPP names a directory.
3605 if test -n "$CPP" && test -d "$CPP"; then
3606   CPP=
3607 fi
3608 if test -z "$CPP"; then
3609 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612     # This must be in double quotes, not single quotes, because CPP may get
3613   # substituted into the Makefile and "${CC-cc}" will confuse make.
3614   CPP="${CC-cc} -E"
3615   # On the NeXT, cc -E runs the code through the compiler's parser,
3616   # not just through cpp.
3617   cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <assert.h>
3621 Syntax Error
3622 EOF
3623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3624 { (eval echo configure:3625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3626 if test -z "$ac_err"; then
3627   :
3628 else
3629   echo "$ac_err" >&5
3630   echo "configure: failed program was:" >&5
3631   cat conftest.$ac_ext >&5
3632   rm -rf conftest*
3633   CPP="${CC-cc} -E -traditional-cpp"
3634   cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 #include <assert.h>
3638 Syntax Error
3639 EOF
3640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3641 { (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3643 if test -z "$ac_err"; then
3644   :
3645 else
3646   echo "$ac_err" >&5
3647   echo "configure: failed program was:" >&5
3648   cat conftest.$ac_ext >&5
3649   rm -rf conftest*
3650   CPP="${CC-cc} -nologo -E"
3651   cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <assert.h>
3655 Syntax Error
3656 EOF
3657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3658 { (eval echo configure:3659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3660 if test -z "$ac_err"; then
3661   :
3662 else
3663   echo "$ac_err" >&5
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   CPP=/lib/cpp
3668 fi
3669 rm -f conftest*
3670 fi
3671 rm -f conftest*
3672 fi
3673 rm -f conftest*
3674   ac_cv_prog_CPP="$CPP"
3675 fi
3676   CPP="$ac_cv_prog_CPP"
3677 else
3678   ac_cv_prog_CPP="$CPP"
3679 fi
3680 echo "$ac_t""$CPP" 1>&6
3681
3682
3683 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3684         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3685
3686 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3687         echo "configure: warning: programs compiled here do run here..." 1>&2
3688         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3689
3690 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3691         echo "configure: warning: programs compiled here do not run here..." 1>&2
3692         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3693 fi
3694
3695 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3696 echo "configure:3697: checking for AIX" >&5
3697 cat > conftest.$ac_ext <<EOF
3698 #line 3699 "configure"
3699 #include "confdefs.h"
3700 #ifdef _AIX
3701   yes
3702 #endif
3703
3704 EOF
3705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3706   egrep "yes" >/dev/null 2>&1; then
3707   rm -rf conftest*
3708   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3709 #define _ALL_SOURCE 1
3710 EOF
3711
3712 else
3713   rm -rf conftest*
3714   echo "$ac_t""no" 1>&6
3715 fi
3716 rm -f conftest*
3717
3718
3719 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3720 echo "configure:3721: checking for POSIXized ISC" >&5
3721 if test -d /etc/conf/kconfig.d &&
3722   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3723 then
3724   echo "$ac_t""yes" 1>&6
3725   ISC=yes # If later tests want to check for ISC.
3726   cat >> confdefs.h <<\EOF
3727 #define _POSIX_SOURCE 1
3728 EOF
3729
3730   if test "$GCC" = yes; then
3731     CC="$CC -posix"
3732   else
3733     CC="$CC -Xp"
3734   fi
3735 else
3736   echo "$ac_t""no" 1>&6
3737   ISC=
3738 fi
3739
3740 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3741 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3742 echo "configure:3743: checking for minix/config.h" >&5
3743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3744   echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746   cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 #include <minix/config.h>
3750 EOF
3751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3752 { (eval echo configure:3753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3754 if test -z "$ac_err"; then
3755   rm -rf conftest*
3756   eval "ac_cv_header_$ac_safe=yes"
3757 else
3758   echo "$ac_err" >&5
3759   echo "configure: failed program was:" >&5
3760   cat conftest.$ac_ext >&5
3761   rm -rf conftest*
3762   eval "ac_cv_header_$ac_safe=no"
3763 fi
3764 rm -f conftest*
3765 fi
3766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3767   echo "$ac_t""yes" 1>&6
3768   MINIX=yes
3769 else
3770   echo "$ac_t""no" 1>&6
3771 MINIX=
3772 fi
3773
3774 if test "$MINIX" = yes; then
3775   cat >> confdefs.h <<\EOF
3776 #define _POSIX_SOURCE 1
3777 EOF
3778
3779   cat >> confdefs.h <<\EOF
3780 #define _POSIX_1_SOURCE 2
3781 EOF
3782
3783   cat >> confdefs.h <<\EOF
3784 #define _MINIX 1
3785 EOF
3786
3787 fi
3788
3789
3790 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3791 echo "configure:3792: checking for Cygwin environment" >&5
3792 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798
3799 int main() {
3800
3801 #ifndef __CYGWIN__
3802 #define __CYGWIN__ __CYGWIN32__
3803 #endif
3804 return __CYGWIN__;
3805 ; return 0; }
3806 EOF
3807 if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3808   rm -rf conftest*
3809   ac_cv_cygwin=yes
3810 else
3811   echo "configure: failed program was:" >&5
3812   cat conftest.$ac_ext >&5
3813   rm -rf conftest*
3814   ac_cv_cygwin=no
3815 fi
3816 rm -f conftest*
3817 fi
3818
3819 echo "$ac_t""$ac_cv_cygwin" 1>&6
3820 CYGWIN=
3821 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3822 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3823 echo "configure:3824: checking for mingw32 environment" >&5
3824 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3825   echo $ac_n "(cached) $ac_c" 1>&6
3826 else
3827   cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830
3831 int main() {
3832 return __MINGW32__;
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3836   rm -rf conftest*
3837   ac_cv_mingw32=yes
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841   rm -rf conftest*
3842   ac_cv_mingw32=no
3843 fi
3844 rm -f conftest*
3845 fi
3846
3847 echo "$ac_t""$ac_cv_mingw32" 1>&6
3848 MINGW32=
3849 test "$ac_cv_mingw32" = yes && MINGW32=yes
3850 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3851 echo "configure:3852: checking for EMX OS/2 environment" >&5
3852 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858
3859 int main() {
3860 return __EMX__;
3861 ; return 0; }
3862 EOF
3863 if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3864   rm -rf conftest*
3865   ac_cv_emxos2=yes
3866 else
3867   echo "configure: failed program was:" >&5
3868   cat conftest.$ac_ext >&5
3869   rm -rf conftest*
3870   ac_cv_emxos2=no
3871 fi
3872 rm -f conftest*
3873 fi
3874
3875 echo "$ac_t""$ac_cv_emxos2" 1>&6
3876 EMXOS2=
3877 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3878
3879
3880
3881 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3882 echo "configure:3883: checking for executable suffix" >&5
3883 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3884   echo $ac_n "(cached) $ac_c" 1>&6
3885 else
3886   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3887   ac_cv_exeext=.exe
3888 else
3889   rm -f conftest*
3890   echo 'int main () { return 0; }' > conftest.$ac_ext
3891   ac_cv_exeext=
3892   if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3893     for file in conftest.*; do
3894       case $file in
3895       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3896       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3897       esac
3898     done
3899   else
3900     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3901   fi
3902   rm -f conftest*
3903   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3904 fi
3905 fi
3906
3907 EXEEXT=""
3908 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3909 echo "$ac_t""${ac_cv_exeext}" 1>&6
3910 ac_exeext=$EXEEXT
3911
3912 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3913 echo "configure:3914: checking for object suffix" >&5
3914 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3915   echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917   rm -f conftest*
3918 echo 'int i = 1;' > conftest.$ac_ext
3919 if { (eval echo configure:3920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3920   for ac_file in conftest.*; do
3921     case $ac_file in
3922     *.c) ;;
3923     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3924     esac
3925   done
3926 else
3927   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3928 fi
3929 rm -f conftest*
3930 fi
3931
3932 echo "$ac_t""$ac_cv_objext" 1>&6
3933 OBJEXT=$ac_cv_objext
3934 ac_objext=$ac_cv_objext
3935
3936
3937 cat >> confdefs.h <<EOF
3938 #define EXEEXT "${EXEEXT}"
3939 EOF
3940
3941
3942 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3943 echo "configure:3944: checking for be_app in -lbe" >&5
3944 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   ac_save_LIBS="$LIBS"
3949 LIBS="-lbe -lroot -lnet $LIBS"
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 /* Override any gcc2 internal prototype to avoid an error.  */
3954 /* We use char because int might match the return type of a gcc2
3955     builtin and then its argument prototype would still apply.  */
3956 char be_app();
3957
3958 int main() {
3959 be_app()
3960 ; return 0; }
3961 EOF
3962 if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3963   rm -rf conftest*
3964   eval "ac_cv_lib_$ac_lib_var=yes"
3965 else
3966   echo "configure: failed program was:" >&5
3967   cat conftest.$ac_ext >&5
3968   rm -rf conftest*
3969   eval "ac_cv_lib_$ac_lib_var=no"
3970 fi
3971 rm -f conftest*
3972 LIBS="$ac_save_LIBS"
3973
3974 fi
3975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976   echo "$ac_t""yes" 1>&6
3977   LIBS="$LIBS -lbe -lroot -lnet"
3978 else
3979   echo "$ac_t""no" 1>&6
3980 :
3981 fi
3982
3983
3984
3985
3986
3987 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3988 echo "configure:3989: checking for ${CC-cc} option to accept ANSI C" >&5
3989 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3990   echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992   am_cv_prog_cc_stdc=no
3993 ac_save_CC="$CC"
3994 # Don't try gcc -ansi; that turns off useful extensions and
3995 # breaks some systems' header files.
3996 # AIX                   -qlanglvl=ansi
3997 # Ultrix and OSF/1      -std1
3998 # HP-UX 10.20 and later -Ae
3999 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4000 # SVR4                  -Xc -D__EXTENSIONS__
4001 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4002 do
4003   CC="$ac_save_CC $ac_arg"
4004   cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 #include <stdarg.h>
4008 #include <stdio.h>
4009 #include <sys/types.h>
4010 #include <sys/stat.h>
4011 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4012 struct buf { int x; };
4013 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4014 static char *e (p, i)
4015      char **p;
4016      int i;
4017 {
4018   return p[i];
4019 }
4020 static char *f (char * (*g) (char **, int), char **p, ...)
4021 {
4022   char *s;
4023   va_list v;
4024   va_start (v,p);
4025   s = g (p, va_arg (v,int));
4026   va_end (v);
4027   return s;
4028 }
4029 int test (int i, double x);
4030 struct s1 {int (*f) (int a);};
4031 struct s2 {int (*f) (double a);};
4032 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4033 int argc;
4034 char **argv;
4035
4036 int main() {
4037
4038 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4039
4040 ; return 0; }
4041 EOF
4042 if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043   rm -rf conftest*
4044   am_cv_prog_cc_stdc="$ac_arg"; break
4045 else
4046   echo "configure: failed program was:" >&5
4047   cat conftest.$ac_ext >&5
4048 fi
4049 rm -f conftest*
4050 done
4051 CC="$ac_save_CC"
4052
4053 fi
4054
4055 if test -z "$am_cv_prog_cc_stdc"; then
4056   echo "$ac_t""none needed" 1>&6
4057 else
4058   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4059 fi
4060 case "x$am_cv_prog_cc_stdc" in
4061   x|xno) ;;
4062   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4063 esac
4064
4065 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4066         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4067 fi
4068
4069 # test for make depend flag
4070 OL_MKDEP=
4071 OL_MKDEP_FLAGS=
4072 if test -z "${MKDEP}"; then
4073         OL_MKDEP="${CC-cc}"
4074         if test -z "${MKDEP_FLAGS}"; then
4075                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4076 echo "configure:4077: checking for ${OL_MKDEP} depend flag" >&5
4077 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4078   echo $ac_n "(cached) $ac_c" 1>&6
4079 else
4080   
4081                         ol_cv_mkdep=no
4082                         for flag in "-M" "-xM"; do
4083                                 cat > conftest.c <<EOF
4084  noCode;
4085 EOF
4086                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4087                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4088                                 then
4089                                         if test ! -f conftest."${ac_object}" ; then
4090                                                 ol_cv_mkdep=$flag
4091                                                 OL_MKDEP_FLAGS="$flag"
4092                                                 break
4093                                         fi
4094                                 fi
4095                         done
4096                         rm -f conftest*
4097                 
4098 fi
4099
4100 echo "$ac_t""$ol_cv_mkdep" 1>&6
4101         else
4102                 cc_cv_mkdep=yes
4103                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4104         fi
4105 else
4106         cc_cv_mkdep=yes
4107         OL_MKDEP="${MKDEP}"
4108         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4109 fi
4110
4111
4112
4113 if test "${ol_cv_mkdep}" = no ; then
4114         # this will soon become an error
4115         echo "configure: warning: do not know how to generate dependencies" 1>&2
4116 fi
4117
4118 ol_link_modules=no
4119 if test $ol_enable_modules != no ; then
4120         for ac_hdr in ltdl.h
4121 do
4122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4124 echo "configure:4125: checking for $ac_hdr" >&5
4125 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4126   echo $ac_n "(cached) $ac_c" 1>&6
4127 else
4128   cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 #include <$ac_hdr>
4132 EOF
4133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4134 { (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4136 if test -z "$ac_err"; then
4137   rm -rf conftest*
4138   eval "ac_cv_header_$ac_safe=yes"
4139 else
4140   echo "$ac_err" >&5
4141   echo "configure: failed program was:" >&5
4142   cat conftest.$ac_ext >&5
4143   rm -rf conftest*
4144   eval "ac_cv_header_$ac_safe=no"
4145 fi
4146 rm -f conftest*
4147 fi
4148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4149   echo "$ac_t""yes" 1>&6
4150     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4151   cat >> confdefs.h <<EOF
4152 #define $ac_tr_hdr 1
4153 EOF
4154  
4155 else
4156   echo "$ac_t""no" 1>&6
4157 fi
4158 done
4159
4160
4161         if test $ac_cv_header_ltdl_h = no ; then
4162                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4163         fi
4164
4165         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4166 echo "configure:4167: checking for lt_dlinit in -lltdl" >&5
4167 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   ac_save_LIBS="$LIBS"
4172 LIBS="-lltdl  $LIBS"
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 /* Override any gcc2 internal prototype to avoid an error.  */
4177 /* We use char because int might match the return type of a gcc2
4178     builtin and then its argument prototype would still apply.  */
4179 char lt_dlinit();
4180
4181 int main() {
4182 lt_dlinit()
4183 ; return 0; }
4184 EOF
4185 if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4186   rm -rf conftest*
4187   eval "ac_cv_lib_$ac_lib_var=yes"
4188 else
4189   echo "configure: failed program was:" >&5
4190   cat conftest.$ac_ext >&5
4191   rm -rf conftest*
4192   eval "ac_cv_lib_$ac_lib_var=no"
4193 fi
4194 rm -f conftest*
4195 LIBS="$ac_save_LIBS"
4196
4197 fi
4198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4199   echo "$ac_t""yes" 1>&6
4200   
4201             MODULES_LIBS=-lltdl
4202             cat >> confdefs.h <<\EOF
4203 #define HAVE_LIBLTDL 1
4204 EOF
4205
4206         
4207 else
4208   echo "$ac_t""no" 1>&6
4209 fi
4210
4211
4212         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4213                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4214         fi
4215         ol_link_modules=yes
4216 else
4217         ol_with_bdb2_module=static
4218         ol_with_ldap_module=static
4219         ol_with_ldbm_module=static
4220         ol_with_passwd_module=static
4221         ol_with_perl_module=static
4222         ol_with_shell_module=static
4223         ol_with_tcl_module=static
4224 fi
4225
4226 # test for EBCDIC
4227 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4228 echo "configure:4229: checking for EBCDIC" >&5
4229 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4230   echo $ac_n "(cached) $ac_c" 1>&6
4231 else
4232   
4233         cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236
4237 #if !('M' == 0xd4)
4238 #include <__ASCII__/generate_error.h>
4239 #endif
4240
4241 EOF
4242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4243 { (eval echo configure:4244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4245 if test -z "$ac_err"; then
4246   rm -rf conftest*
4247   ol_cv_cpp_ebcdic=yes
4248 else
4249   echo "$ac_err" >&5
4250   echo "configure: failed program was:" >&5
4251   cat conftest.$ac_ext >&5
4252   rm -rf conftest*
4253   ol_cv_cpp_ebcdic=no
4254 fi
4255 rm -f conftest*
4256 fi
4257
4258 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4259 if test $ol_cv_cpp_ebcdic = yes ; then
4260         cat >> confdefs.h <<\EOF
4261 #define HAVE_EBCDIC 1
4262 EOF
4263
4264 fi
4265
4266 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4267 echo "configure:4268: checking for ANSI C header files" >&5
4268 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4269   echo $ac_n "(cached) $ac_c" 1>&6
4270 else
4271   cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 #include <stdlib.h>
4275 #include <stdarg.h>
4276 #include <string.h>
4277 #include <float.h>
4278 EOF
4279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4280 { (eval echo configure:4281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4282 if test -z "$ac_err"; then
4283   rm -rf conftest*
4284   ol_cv_header_stdc=yes
4285 else
4286   echo "$ac_err" >&5
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   ol_cv_header_stdc=no
4291 fi
4292 rm -f conftest*
4293
4294 if test $ol_cv_header_stdc = yes; then
4295   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4296 cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299 #include <string.h>
4300 EOF
4301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4302   egrep "memchr" >/dev/null 2>&1; then
4303   :
4304 else
4305   rm -rf conftest*
4306   ol_cv_header_stdc=no
4307 fi
4308 rm -f conftest*
4309
4310 fi
4311
4312 if test $ol_cv_header_stdc = yes; then
4313   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <stdlib.h>
4318 EOF
4319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4320   egrep "free" >/dev/null 2>&1; then
4321   :
4322 else
4323   rm -rf conftest*
4324   ol_cv_header_stdc=no
4325 fi
4326 rm -f conftest*
4327
4328 fi
4329
4330 if test $ol_cv_header_stdc = yes; then
4331   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4332 if test "$cross_compiling" = yes; then
4333   :
4334 else
4335   cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4338 #include <ctype.h>
4339 #ifndef HAVE_EBCDIC
4340 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4341 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4342 #else
4343 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4344                 || ('j' <= (c) && (c) <= 'r') \
4345                 || ('s' <= (c) && (c) <= 'z'))
4346 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4347 #endif
4348 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4349 int main () { int i; for (i = 0; i < 256; i++)
4350 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4351 exit (0); }
4352
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4355 then
4356   :
4357 else
4358   echo "configure: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   rm -fr conftest*
4361   ol_cv_header_stdc=no
4362 fi
4363 rm -fr conftest*
4364 fi
4365
4366 fi
4367 fi
4368
4369 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4370 if test $ol_cv_header_stdc = yes; then
4371   cat >> confdefs.h <<\EOF
4372 #define STDC_HEADERS 1
4373 EOF
4374
4375 fi
4376 ac_cv_header_stdc=disable
4377
4378
4379 if test $ol_cv_header_stdc != yes; then
4380         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4381 fi
4382
4383 ac_header_dirent=no
4384 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4385 do
4386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4387 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4388 echo "configure:4389: checking for $ac_hdr that defines DIR" >&5
4389 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4390   echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392   cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395 #include <sys/types.h>
4396 #include <$ac_hdr>
4397 int main() {
4398 DIR *dirp = 0;
4399 ; return 0; }
4400 EOF
4401 if { (eval echo configure:4402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4402   rm -rf conftest*
4403   eval "ac_cv_header_dirent_$ac_safe=yes"
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407   rm -rf conftest*
4408   eval "ac_cv_header_dirent_$ac_safe=no"
4409 fi
4410 rm -f conftest*
4411 fi
4412 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4413   echo "$ac_t""yes" 1>&6
4414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4415   cat >> confdefs.h <<EOF
4416 #define $ac_tr_hdr 1
4417 EOF
4418  ac_header_dirent=$ac_hdr; break
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422 done
4423 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4424 if test $ac_header_dirent = dirent.h; then
4425 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4426 echo "configure:4427: checking for opendir in -ldir" >&5
4427 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4429   echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431   ac_save_LIBS="$LIBS"
4432 LIBS="-ldir  $LIBS"
4433 cat > conftest.$ac_ext <<EOF
4434 #line 4435 "configure"
4435 #include "confdefs.h"
4436 /* Override any gcc2 internal prototype to avoid an error.  */
4437 /* We use char because int might match the return type of a gcc2
4438     builtin and then its argument prototype would still apply.  */
4439 char opendir();
4440
4441 int main() {
4442 opendir()
4443 ; return 0; }
4444 EOF
4445 if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4446   rm -rf conftest*
4447   eval "ac_cv_lib_$ac_lib_var=yes"
4448 else
4449   echo "configure: failed program was:" >&5
4450   cat conftest.$ac_ext >&5
4451   rm -rf conftest*
4452   eval "ac_cv_lib_$ac_lib_var=no"
4453 fi
4454 rm -f conftest*
4455 LIBS="$ac_save_LIBS"
4456
4457 fi
4458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4459   echo "$ac_t""yes" 1>&6
4460   LIBS="$LIBS -ldir"
4461 else
4462   echo "$ac_t""no" 1>&6
4463 fi
4464
4465 else
4466 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4467 echo "configure:4468: checking for opendir in -lx" >&5
4468 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4469 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   ac_save_LIBS="$LIBS"
4473 LIBS="-lx  $LIBS"
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 /* Override any gcc2 internal prototype to avoid an error.  */
4478 /* We use char because int might match the return type of a gcc2
4479     builtin and then its argument prototype would still apply.  */
4480 char opendir();
4481
4482 int main() {
4483 opendir()
4484 ; return 0; }
4485 EOF
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487   rm -rf conftest*
4488   eval "ac_cv_lib_$ac_lib_var=yes"
4489 else
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -rf conftest*
4493   eval "ac_cv_lib_$ac_lib_var=no"
4494 fi
4495 rm -f conftest*
4496 LIBS="$ac_save_LIBS"
4497
4498 fi
4499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4500   echo "$ac_t""yes" 1>&6
4501   LIBS="$LIBS -lx"
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506 fi
4507
4508 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4509 echo "configure:4510: checking for sys/wait.h that is POSIX.1 compatible" >&5
4510 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <sys/types.h>
4517 #include <sys/wait.h>
4518 #ifndef WEXITSTATUS
4519 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4520 #endif
4521 #ifndef WIFEXITED
4522 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4523 #endif
4524 int main() {
4525 int s;
4526 wait (&s);
4527 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4528 ; return 0; }
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4531   rm -rf conftest*
4532   ac_cv_header_sys_wait_h=yes
4533 else
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -rf conftest*
4537   ac_cv_header_sys_wait_h=no
4538 fi
4539 rm -f conftest*
4540 fi
4541
4542 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4543 if test $ac_cv_header_sys_wait_h = yes; then
4544   cat >> confdefs.h <<\EOF
4545 #define HAVE_SYS_WAIT_H 1
4546 EOF
4547
4548 fi
4549
4550 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4551 echo "configure:4552: checking POSIX termios" >&5
4552 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4553   echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555   cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <sys/types.h>
4559 #include <unistd.h>
4560 #include <termios.h>
4561 int main() {
4562 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4563    tcgetattr(0, 0);
4564 ; return 0; }
4565 EOF
4566 if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4567   rm -rf conftest*
4568   am_cv_sys_posix_termios=yes
4569 else
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   am_cv_sys_posix_termios=no
4574 fi
4575 rm -f conftest*
4576 fi
4577
4578 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4579
4580
4581  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4582 echo "configure:4583: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4583 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4587
4588   gwinsz_in_termios_h=no
4589   if test $am_cv_sys_posix_termios = yes; then
4590     cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <sys/types.h>
4594 #     include <termios.h>
4595 #     ifdef TIOCGWINSZ
4596         yes
4597 #     endif
4598     
4599 EOF
4600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4601   egrep "yes" >/dev/null 2>&1; then
4602   rm -rf conftest*
4603   gwinsz_in_termios_h=yes
4604 fi
4605 rm -f conftest*
4606
4607   fi
4608
4609   if test $gwinsz_in_termios_h = no; then
4610     cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613 #include <sys/types.h>
4614 #     include <sys/ioctl.h>
4615 #     ifdef TIOCGWINSZ
4616         yes
4617 #     endif
4618     
4619 EOF
4620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4621   egrep "yes" >/dev/null 2>&1; then
4622   rm -rf conftest*
4623   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4624 fi
4625 rm -f conftest*
4626
4627   fi
4628   
4629 fi
4630
4631 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4632   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4633     cat >> confdefs.h <<\EOF
4634 #define GWINSZ_IN_SYS_IOCTL 1
4635 EOF
4636
4637   fi
4638
4639 if test $am_cv_sys_posix_termios = yes ; then
4640         cat >> confdefs.h <<\EOF
4641 #define HAVE_POSIX_TERMIOS 1
4642 EOF
4643
4644 fi
4645
4646 for ac_hdr in \
4647         arpa/inet.h             \
4648         arpa/nameser.h  \
4649         assert.h                \
4650         conio.h                 \
4651         crypt.h                 \
4652         direct.h                \
4653         errno.h                 \
4654         fcntl.h                 \
4655         filio.h                 \
4656         getopt.h                \
4657         grp.h                   \
4658         io.h                    \
4659         libutil.h               \
4660         limits.h                \
4661         locale.h                \
4662         netinet/tcp.h   \
4663         malloc.h                \
4664         memory.h                \
4665         psap.h                  \
4666         pwd.h                   \
4667         process.h               \
4668         resolv.h                \
4669         sgtty.h                 \
4670         shadow.h                \
4671         stddef.h                \
4672         string.h                \
4673         strings.h               \
4674         sysexits.h              \
4675         sys/file.h              \
4676         sys/filio.h             \
4677         sys/errno.h             \
4678         sys/ioctl.h             \
4679         sys/param.h             \
4680         sys/resource.h  \
4681         sys/select.h    \
4682         sys/socket.h    \
4683         sys/syslog.h    \
4684         sys/time.h              \
4685         sys/types.h             \
4686         syslog.h                \
4687         termios.h               \
4688         unistd.h                \
4689         winsock.h               \
4690
4691 do
4692 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4693 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4694 echo "configure:4695: checking for $ac_hdr" >&5
4695 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 #include <$ac_hdr>
4702 EOF
4703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4704 { (eval echo configure:4705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4706 if test -z "$ac_err"; then
4707   rm -rf conftest*
4708   eval "ac_cv_header_$ac_safe=yes"
4709 else
4710   echo "$ac_err" >&5
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   eval "ac_cv_header_$ac_safe=no"
4715 fi
4716 rm -f conftest*
4717 fi
4718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4719   echo "$ac_t""yes" 1>&6
4720     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4721   cat >> confdefs.h <<EOF
4722 #define $ac_tr_hdr 1
4723 EOF
4724  
4725 else
4726   echo "$ac_t""no" 1>&6
4727 fi
4728 done
4729
4730
4731
4732
4733 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4734 echo "configure:4735: checking for sigset in -lV3" >&5
4735 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4737   echo $ac_n "(cached) $ac_c" 1>&6
4738 else
4739   ac_save_LIBS="$LIBS"
4740 LIBS="-lV3  $LIBS"
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 /* Override any gcc2 internal prototype to avoid an error.  */
4745 /* We use char because int might match the return type of a gcc2
4746     builtin and then its argument prototype would still apply.  */
4747 char sigset();
4748
4749 int main() {
4750 sigset()
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   eval "ac_cv_lib_$ac_lib_var=yes"
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_lib_$ac_lib_var=no"
4761 fi
4762 rm -f conftest*
4763 LIBS="$ac_save_LIBS"
4764
4765 fi
4766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4767   echo "$ac_t""yes" 1>&6
4768     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4769     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4770   cat >> confdefs.h <<EOF
4771 #define $ac_tr_lib 1
4772 EOF
4773
4774   LIBS="-lV3 $LIBS"
4775
4776 else
4777   echo "$ac_t""no" 1>&6
4778 fi
4779
4780
4781 if test $ac_cv_header_winsock_h = yes; then
4782         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4783 echo "configure:4784: checking for winsock" >&5
4784 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #include <winsock.h>
4791 int main() {
4792
4793                         socket(0,0,0);
4794                         select(0,NULL,NULL,NULL,NULL);
4795                         closesocket(0);
4796                         gethostname(NULL,0);
4797         
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   ol_cv_winsock=yes
4803 else
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   ol_cv_winsock=no
4808 fi
4809 rm -f conftest*]
4810 fi
4811
4812 echo "$ac_t""$ol_cv_winsock" 1>&6
4813
4814         if test $ol_cv_winsock = yes ; then
4815                 cat >> confdefs.h <<\EOF
4816 #define HAVE_WINSOCK 1
4817 EOF
4818
4819                 ac_cv_func_socket=yes
4820                 ac_cv_func_select=yes
4821                 ac_cv_func_closesocket=yes
4822                 ac_cv_func_gethostname=yes
4823         fi
4824 fi
4825
4826
4827 echo $ac_n "checking for socket""... $ac_c" 1>&6
4828 echo "configure:4829: checking for socket" >&5
4829 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 /* System header to define __stub macros and hopefully few prototypes,
4836     which can conflict with char socket(); below.  */
4837 #include <assert.h>
4838 /* Override any gcc2 internal prototype to avoid an error.  */
4839 /* We use char because int might match the return type of a gcc2
4840     builtin and then its argument prototype would still apply.  */
4841 char socket();
4842 char (*f)();
4843
4844 int main() {
4845
4846 /* The GNU C library defines this for functions which it implements
4847     to always fail with ENOSYS.  Some functions are actually named
4848     something starting with __ and the normal name is an alias.  */
4849 #if defined (__stub_socket) || defined (__stub___socket)
4850 choke me
4851 #else
4852 f = socket;
4853 #endif
4854
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   eval "ac_cv_func_socket=yes"
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_func_socket=no"
4865 fi
4866 rm -f conftest*
4867 fi
4868
4869 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4870   echo "$ac_t""yes" 1>&6
4871   :
4872 else
4873   echo "$ac_t""no" 1>&6
4874         
4875         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4876 echo "configure:4877: checking for main in -lsocket" >&5
4877 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   ac_save_LIBS="$LIBS"
4882 LIBS="-lsocket  $LIBS"
4883 cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886
4887 int main() {
4888 main()
4889 ; return 0; }
4890 EOF
4891 if { (eval echo configure:4892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4892   rm -rf conftest*
4893   eval "ac_cv_lib_$ac_lib_var=yes"
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897   rm -rf conftest*
4898   eval "ac_cv_lib_$ac_lib_var=no"
4899 fi
4900 rm -f conftest*
4901 LIBS="$ac_save_LIBS"
4902
4903 fi
4904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4905   echo "$ac_t""yes" 1>&6
4906     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4907     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4908   cat >> confdefs.h <<EOF
4909 #define $ac_tr_lib 1
4910 EOF
4911
4912   LIBS="-lsocket $LIBS"
4913
4914 else
4915   echo "$ac_t""no" 1>&6
4916 fi
4917
4918         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4919 echo "configure:4920: checking for main in -lnet" >&5
4920 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4922   echo $ac_n "(cached) $ac_c" 1>&6
4923 else
4924   ac_save_LIBS="$LIBS"
4925 LIBS="-lnet  $LIBS"
4926 cat > conftest.$ac_ext <<EOF
4927 #line 4928 "configure"
4928 #include "confdefs.h"
4929
4930 int main() {
4931 main()
4932 ; return 0; }
4933 EOF
4934 if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4935   rm -rf conftest*
4936   eval "ac_cv_lib_$ac_lib_var=yes"
4937 else
4938   echo "configure: failed program was:" >&5
4939   cat conftest.$ac_ext >&5
4940   rm -rf conftest*
4941   eval "ac_cv_lib_$ac_lib_var=no"
4942 fi
4943 rm -f conftest*
4944 LIBS="$ac_save_LIBS"
4945
4946 fi
4947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4948   echo "$ac_t""yes" 1>&6
4949     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4951   cat >> confdefs.h <<EOF
4952 #define $ac_tr_lib 1
4953 EOF
4954
4955   LIBS="-lnet $LIBS"
4956
4957 else
4958   echo "$ac_t""no" 1>&6
4959 fi
4960
4961         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4962 echo "configure:4963: checking for main in -lnsl_s" >&5
4963 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4965   echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967   ac_save_LIBS="$LIBS"
4968 LIBS="-lnsl_s  $LIBS"
4969 cat > conftest.$ac_ext <<EOF
4970 #line 4971 "configure"
4971 #include "confdefs.h"
4972
4973 int main() {
4974 main()
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4978   rm -rf conftest*
4979   eval "ac_cv_lib_$ac_lib_var=yes"
4980 else
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_lib_$ac_lib_var=no"
4985 fi
4986 rm -f conftest*
4987 LIBS="$ac_save_LIBS"
4988
4989 fi
4990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4991   echo "$ac_t""yes" 1>&6
4992     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4993     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4994   cat >> confdefs.h <<EOF
4995 #define $ac_tr_lib 1
4996 EOF
4997
4998   LIBS="-lnsl_s $LIBS"
4999
5000 else
5001   echo "$ac_t""no" 1>&6
5002 fi
5003
5004         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5005 echo "configure:5006: checking for main in -lnsl" >&5
5006 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5008   echo $ac_n "(cached) $ac_c" 1>&6
5009 else
5010   ac_save_LIBS="$LIBS"
5011 LIBS="-lnsl  $LIBS"
5012 cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015
5016 int main() {
5017 main()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5031
5032 fi
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034   echo "$ac_t""yes" 1>&6
5035     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5037   cat >> confdefs.h <<EOF
5038 #define $ac_tr_lib 1
5039 EOF
5040
5041   LIBS="-lnsl $LIBS"
5042
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5048 echo "configure:5049: checking for socket in -linet" >&5
5049 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-linet  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058 /* Override any gcc2 internal prototype to avoid an error.  */
5059 /* We use char because int might match the return type of a gcc2
5060     builtin and then its argument prototype would still apply.  */
5061 char socket();
5062
5063 int main() {
5064 socket()
5065 ; return 0; }
5066 EOF
5067 if { (eval echo configure:5068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5068   rm -rf conftest*
5069   eval "ac_cv_lib_$ac_lib_var=yes"
5070 else
5071   echo "configure: failed program was:" >&5
5072   cat conftest.$ac_ext >&5
5073   rm -rf conftest*
5074   eval "ac_cv_lib_$ac_lib_var=no"
5075 fi
5076 rm -f conftest*
5077 LIBS="$ac_save_LIBS"
5078
5079 fi
5080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5081   echo "$ac_t""yes" 1>&6
5082     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5083     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5084   cat >> confdefs.h <<EOF
5085 #define $ac_tr_lib 1
5086 EOF
5087
5088   LIBS="-linet $LIBS"
5089
5090 else
5091   echo "$ac_t""no" 1>&6
5092 fi
5093
5094         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5095 echo "configure:5096: checking for main in -lgen" >&5
5096 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   ac_save_LIBS="$LIBS"
5101 LIBS="-lgen  $LIBS"
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.h"
5105
5106 int main() {
5107 main()
5108 ; return 0; }
5109 EOF
5110 if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5111   rm -rf conftest*
5112   eval "ac_cv_lib_$ac_lib_var=yes"
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116   rm -rf conftest*
5117   eval "ac_cv_lib_$ac_lib_var=no"
5118 fi
5119 rm -f conftest*
5120 LIBS="$ac_save_LIBS"
5121
5122 fi
5123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5124   echo "$ac_t""yes" 1>&6
5125     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5126     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5127   cat >> confdefs.h <<EOF
5128 #define $ac_tr_lib 1
5129 EOF
5130
5131   LIBS="-lgen $LIBS"
5132
5133 else
5134   echo "$ac_t""no" 1>&6
5135 fi
5136
5137
5138 fi
5139
5140
5141 echo $ac_n "checking for select""... $ac_c" 1>&6
5142 echo "configure:5143: checking for select" >&5
5143 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 /* System header to define __stub macros and hopefully few prototypes,
5150     which can conflict with char select(); below.  */
5151 #include <assert.h>
5152 /* Override any gcc2 internal prototype to avoid an error.  */
5153 /* We use char because int might match the return type of a gcc2
5154     builtin and then its argument prototype would still apply.  */
5155 char select();
5156 char (*f)();
5157
5158 int main() {
5159
5160 /* The GNU C library defines this for functions which it implements
5161     to always fail with ENOSYS.  Some functions are actually named
5162     something starting with __ and the normal name is an alias.  */
5163 #if defined (__stub_select) || defined (__stub___select)
5164 choke me
5165 #else
5166 f = select;
5167 #endif
5168
5169 ; return 0; }
5170 EOF
5171 if { (eval echo configure:5172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5172   rm -rf conftest*
5173   eval "ac_cv_func_select=yes"
5174 else
5175   echo "configure: failed program was:" >&5
5176   cat conftest.$ac_ext >&5
5177   rm -rf conftest*
5178   eval "ac_cv_func_select=no"
5179 fi
5180 rm -f conftest*
5181 fi
5182
5183 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5184   echo "$ac_t""yes" 1>&6
5185   :
5186 else
5187   echo "$ac_t""no" 1>&6
5188 { echo "configure: error: select() required." 1>&2; exit 1; }
5189 fi
5190
5191
5192 if test "${ac_cv_header_winsock_h}" != yes; then
5193                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5194 echo "configure:5195: checking types of arguments for select()" >&5
5195  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5196   echo $ac_n "(cached) $ac_c" 1>&6
5197 else
5198    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5199   echo $ac_n "(cached) $ac_c" 1>&6
5200 else
5201     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5205      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5206       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5207        cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210 #ifdef HAVE_SYS_TYPES_H
5211 #include <sys/types.h>
5212 #endif
5213 #ifdef HAVE_SYS_TIME_H
5214 #include <sys/time.h>
5215 #endif
5216 #ifdef HAVE_SYS_SELECT_H
5217 #include <sys/select.h>
5218 #endif
5219 #ifdef HAVE_SYS_SOCKET_H
5220 #include <sys/socket.h>
5221 #endif
5222 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);
5223 int main() {
5224
5225 ; return 0; }
5226 EOF
5227 if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5228   rm -rf conftest*
5229           ac_not_found=no ; break 3
5230 else
5231   echo "configure: failed program was:" >&5
5232   cat conftest.$ac_ext >&5
5233   rm -rf conftest*
5234   ac_not_found=yes
5235 fi
5236 rm -f conftest*
5237       done
5238      done
5239     done
5240    
5241 fi
5242   
5243 fi
5244  
5245 fi
5246  if test "$ac_not_found" = yes; then
5247   ac_cv_func_select_arg1=int 
5248   ac_cv_func_select_arg234='int *' 
5249   ac_cv_func_select_arg5='struct timeval *'
5250  fi
5251  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5252  cat >> confdefs.h <<EOF
5253 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5254 EOF
5255
5256  cat >> confdefs.h <<EOF
5257 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5258 EOF
5259
5260  cat >> confdefs.h <<EOF
5261 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5262 EOF
5263
5264
5265 fi
5266
5267
5268 for ac_hdr in regex.h 
5269 do
5270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5272 echo "configure:5273: checking for $ac_hdr" >&5
5273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5274   echo $ac_n "(cached) $ac_c" 1>&6
5275 else
5276   cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 #include <$ac_hdr>
5280 EOF
5281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5282 { (eval echo configure:5283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5284 if test -z "$ac_err"; then
5285   rm -rf conftest*
5286   eval "ac_cv_header_$ac_safe=yes"
5287 else
5288   echo "$ac_err" >&5
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_header_$ac_safe=no"
5293 fi
5294 rm -f conftest*
5295 fi
5296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5297   echo "$ac_t""yes" 1>&6
5298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5299   cat >> confdefs.h <<EOF
5300 #define $ac_tr_hdr 1
5301 EOF
5302  
5303 else
5304   echo "$ac_t""no" 1>&6
5305 fi
5306 done
5307
5308 if test "$ac_cv_header_regex_h" != yes ; then
5309         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5310 fi
5311 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5312 echo "configure:5313: checking for regfree" >&5
5313 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5314   echo $ac_n "(cached) $ac_c" 1>&6
5315 else
5316   cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5319 /* System header to define __stub macros and hopefully few prototypes,
5320     which can conflict with char regfree(); below.  */
5321 #include <assert.h>
5322 /* Override any gcc2 internal prototype to avoid an error.  */
5323 /* We use char because int might match the return type of a gcc2
5324     builtin and then its argument prototype would still apply.  */
5325 char regfree();
5326 char (*f)();
5327
5328 int main() {
5329
5330 /* The GNU C library defines this for functions which it implements
5331     to always fail with ENOSYS.  Some functions are actually named
5332     something starting with __ and the normal name is an alias.  */
5333 #if defined (__stub_regfree) || defined (__stub___regfree)
5334 choke me
5335 #else
5336 f = regfree;
5337 #endif
5338
5339 ; return 0; }
5340 EOF
5341 if { (eval echo configure:5342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5342   rm -rf conftest*
5343   eval "ac_cv_func_regfree=yes"
5344 else
5345   echo "configure: failed program was:" >&5
5346   cat conftest.$ac_ext >&5
5347   rm -rf conftest*
5348   eval "ac_cv_func_regfree=no"
5349 fi
5350 rm -f conftest*
5351 fi
5352
5353 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5354   echo "$ac_t""yes" 1>&6
5355   :
5356 else
5357   echo "$ac_t""no" 1>&6
5358 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5359 fi
5360
5361
5362
5363 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5364 echo "configure:5365: checking for compatible POSIX regex" >&5
5365 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5366   echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368   
5369         if test "$cross_compiling" = yes; then
5370   ol_cv_c_posix_regex=cross
5371 else
5372   cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375
5376 #include <sys/types.h>
5377 #include <regex.h>
5378 static char *pattern, *string;
5379 main()
5380 {
5381         int rc;
5382         regex_t re;
5383
5384         pattern = "^A";
5385
5386         if(regcomp(&re, pattern, 0)) {
5387                 return -1;
5388         }
5389         
5390         string = "ALL MATCH";
5391         
5392         rc = regexec(&re, string, 0, (void*)0, 0);
5393
5394         regfree(&re);
5395
5396         return rc;
5397 }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5400 then
5401   ol_cv_c_posix_regex=yes
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -fr conftest*
5406   ol_cv_c_posix_regex=no
5407 fi
5408 rm -fr conftest*
5409 fi
5410
5411 fi
5412
5413 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5414
5415 if test "$ol_cv_c_posix_regex" = no ; then
5416         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5417 fi
5418
5419 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5420 echo "configure:5421: checking for res_search" >&5
5421 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5422   echo $ac_n "(cached) $ac_c" 1>&6
5423 else
5424   cat > conftest.$ac_ext <<EOF
5425 #line 5426 "configure"
5426 #include "confdefs.h"
5427 /* System header to define __stub macros and hopefully few prototypes,
5428     which can conflict with char res_search(); below.  */
5429 #include <assert.h>
5430 /* Override any gcc2 internal prototype to avoid an error.  */
5431 /* We use char because int might match the return type of a gcc2
5432     builtin and then its argument prototype would still apply.  */
5433 char res_search();
5434 char (*f)();
5435
5436 int main() {
5437
5438 /* The GNU C library defines this for functions which it implements
5439     to always fail with ENOSYS.  Some functions are actually named
5440     something starting with __ and the normal name is an alias.  */
5441 #if defined (__stub_res_search) || defined (__stub___res_search)
5442 choke me
5443 #else
5444 f = res_search;
5445 #endif
5446
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5450   rm -rf conftest*
5451   eval "ac_cv_func_res_search=yes"
5452 else
5453   echo "configure: failed program was:" >&5
5454   cat conftest.$ac_ext >&5
5455   rm -rf conftest*
5456   eval "ac_cv_func_res_search=no"
5457 fi
5458 rm -f conftest*
5459 fi
5460
5461 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5462   echo "$ac_t""yes" 1>&6
5463   :
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467
5468 if test $ac_cv_func_res_search = no ; then 
5469         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5470 echo "configure:5471: checking for res_search in -lbind" >&5
5471 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5473   echo $ac_n "(cached) $ac_c" 1>&6
5474 else
5475   ac_save_LIBS="$LIBS"
5476 LIBS="-lbind  $LIBS"
5477 cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480 /* Override any gcc2 internal prototype to avoid an error.  */
5481 /* We use char because int might match the return type of a gcc2
5482     builtin and then its argument prototype would still apply.  */
5483 char res_search();
5484
5485 int main() {
5486 res_search()
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_lib_$ac_lib_var=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=no"
5497 fi
5498 rm -f conftest*
5499 LIBS="$ac_save_LIBS"
5500
5501 fi
5502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5505     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5506   cat >> confdefs.h <<EOF
5507 #define $ac_tr_lib 1
5508 EOF
5509
5510   LIBS="-lbind $LIBS"
5511
5512 else
5513   echo "$ac_t""no" 1>&6
5514 fi
5515
5516         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5517 fi
5518
5519 if test $ac_cv_func_res_search = no ; then 
5520         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5521 echo "configure:5522: checking for __res_search in -lbind" >&5
5522 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5524   echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526   ac_save_LIBS="$LIBS"
5527 LIBS="-lbind  $LIBS"
5528 cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531 /* Override any gcc2 internal prototype to avoid an error.  */
5532 /* We use char because int might match the return type of a gcc2
5533     builtin and then its argument prototype would still apply.  */
5534 char __res_search();
5535
5536 int main() {
5537 __res_search()
5538 ; return 0; }
5539 EOF
5540 if { (eval echo configure:5541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5541   rm -rf conftest*
5542   eval "ac_cv_lib_$ac_lib_var=yes"
5543 else
5544   echo "configure: failed program was:" >&5
5545   cat conftest.$ac_ext >&5
5546   rm -rf conftest*
5547   eval "ac_cv_lib_$ac_lib_var=no"
5548 fi
5549 rm -f conftest*
5550 LIBS="$ac_save_LIBS"
5551
5552 fi
5553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5554   echo "$ac_t""yes" 1>&6
5555     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5556     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5557   cat >> confdefs.h <<EOF
5558 #define $ac_tr_lib 1
5559 EOF
5560
5561   LIBS="-lbind $LIBS"
5562
5563 else
5564   echo "$ac_t""no" 1>&6
5565 fi
5566
5567         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5568 fi
5569
5570 if test $ac_cv_func_res_search = no ; then 
5571         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5572 echo "configure:5573: checking for res_search in -lresolv" >&5
5573 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5575   echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577   ac_save_LIBS="$LIBS"
5578 LIBS="-lresolv  $LIBS"
5579 cat > conftest.$ac_ext <<EOF
5580 #line 5581 "configure"
5581 #include "confdefs.h"
5582 /* Override any gcc2 internal prototype to avoid an error.  */
5583 /* We use char because int might match the return type of a gcc2
5584     builtin and then its argument prototype would still apply.  */
5585 char res_search();
5586
5587 int main() {
5588 res_search()
5589 ; return 0; }
5590 EOF
5591 if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5592   rm -rf conftest*
5593   eval "ac_cv_lib_$ac_lib_var=yes"
5594 else
5595   echo "configure: failed program was:" >&5
5596   cat conftest.$ac_ext >&5
5597   rm -rf conftest*
5598   eval "ac_cv_lib_$ac_lib_var=no"
5599 fi
5600 rm -f conftest*
5601 LIBS="$ac_save_LIBS"
5602
5603 fi
5604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5605   echo "$ac_t""yes" 1>&6
5606     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5607     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5608   cat >> confdefs.h <<EOF
5609 #define $ac_tr_lib 1
5610 EOF
5611
5612   LIBS="-lresolv $LIBS"
5613
5614 else
5615   echo "$ac_t""no" 1>&6
5616 fi
5617
5618         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5619 fi
5620
5621 if test "$ac_cv_func_res_search" = yes ; then
5622         cat >> confdefs.h <<\EOF
5623 #define HAVE_RES_SEARCH 1
5624 EOF
5625
5626 elif test $ol_enable_dns = yes ; then
5627         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5628 elif test $ol_enable_dns != no ; then
5629         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5630 fi
5631
5632
5633 ol_link_isode=no
5634 if test $ol_enable_ldapd != no ; then
5635         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5636
5637                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5638 echo "configure:5639: checking for main in -lxtpp" >&5
5639 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5641   echo $ac_n "(cached) $ac_c" 1>&6
5642 else
5643   ac_save_LIBS="$LIBS"
5644 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5645 cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648
5649 int main() {
5650 main()
5651 ; return 0; }
5652 EOF
5653 if { (eval echo configure:5654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5654   rm -rf conftest*
5655   eval "ac_cv_lib_$ac_lib_var=yes"
5656 else
5657   echo "configure: failed program was:" >&5
5658   cat conftest.$ac_ext >&5
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=no"
5661 fi
5662 rm -f conftest*
5663 LIBS="$ac_save_LIBS"
5664
5665 fi
5666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5667   echo "$ac_t""yes" 1>&6
5668   
5669                 ol_link_isode=yes
5670                 cat >> confdefs.h <<\EOF
5671 #define HAVE_XTPP 1
5672 EOF
5673
5674                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5675                 
5676 else
5677   echo "$ac_t""no" 1>&6
5678 :
5679 fi
5680
5681         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5682 echo "configure:5683: checking for main in -ldsap" >&5
5683 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5685   echo $ac_n "(cached) $ac_c" 1>&6
5686 else
5687   ac_save_LIBS="$LIBS"
5688 LIBS="-ldsap -lisode $LIBS"
5689 cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692
5693 int main() {
5694 main()
5695 ; return 0; }
5696 EOF
5697 if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698   rm -rf conftest*
5699   eval "ac_cv_lib_$ac_lib_var=yes"
5700 else
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=no"
5705 fi
5706 rm -f conftest*
5707 LIBS="$ac_save_LIBS"
5708
5709 fi
5710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5711   echo "$ac_t""yes" 1>&6
5712   
5713                 ol_link_isode=yes
5714                 cat >> confdefs.h <<\EOF
5715 #define HAVE_DSAP 1
5716 EOF
5717
5718                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5719                 
5720 else
5721   echo "$ac_t""no" 1>&6
5722 :
5723 fi
5724
5725         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5726 echo "configure:5727: checking for main in -lisode" >&5
5727 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   ac_save_LIBS="$LIBS"
5732 LIBS="-lisode  $LIBS"
5733 cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736
5737 int main() {
5738 main()
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   eval "ac_cv_lib_$ac_lib_var=yes"
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   eval "ac_cv_lib_$ac_lib_var=no"
5749 fi
5750 rm -f conftest*
5751 LIBS="$ac_save_LIBS"
5752
5753 fi
5754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5755   echo "$ac_t""yes" 1>&6
5756   
5757                 ol_link_isode=yes
5758                 cat >> confdefs.h <<\EOF
5759 #define HAVE_ISODE 1
5760 EOF
5761
5762                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5763                 
5764 else
5765   echo "$ac_t""no" 1>&6
5766 :
5767 fi
5768
5769 fi
5770
5771 if test $ol_link_isode != no; then
5772         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5773 echo "configure:5774: checking for main in -lpp" >&5
5774 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5776   echo $ac_n "(cached) $ac_c" 1>&6
5777 else
5778   ac_save_LIBS="$LIBS"
5779 LIBS="-lpp  $LIBS"
5780 cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783
5784 int main() {
5785 main()
5786 ; return 0; }
5787 EOF
5788 if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5789   rm -rf conftest*
5790   eval "ac_cv_lib_$ac_lib_var=yes"
5791 else
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -rf conftest*
5795   eval "ac_cv_lib_$ac_lib_var=no"
5796 fi
5797 rm -f conftest*
5798 LIBS="$ac_save_LIBS"
5799
5800 fi
5801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5802   echo "$ac_t""yes" 1>&6
5803   
5804                 cat >> confdefs.h <<\EOF
5805 #define HAVE_PP 1
5806 EOF
5807
5808                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5809                 
5810 else
5811   echo "$ac_t""no" 1>&6
5812 :
5813 fi
5814
5815
5816         # Extract the first word of "pepsy", so it can be a program name with args.
5817 set dummy pepsy; ac_word=$2
5818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_word" >&5
5820 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   case "$PEPSY" in
5824   /*)
5825   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5826   ;;
5827   ?:/*)
5828   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5829   ;;
5830   *)
5831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5832   ac_dummy="$PATH"
5833   for ac_dir in $ac_dummy; do 
5834     test -z "$ac_dir" && ac_dir=.
5835     if test -f $ac_dir/$ac_word; then
5836       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5837       break
5838     fi
5839   done
5840   IFS="$ac_save_ifs"
5841   ;;
5842 esac
5843 fi
5844 PEPSY="$ac_cv_path_PEPSY"
5845 if test -n "$PEPSY"; then
5846   echo "$ac_t""$PEPSY" 1>&6
5847 else
5848   echo "$ac_t""no" 1>&6
5849 fi
5850
5851 fi
5852
5853 if test $ol_enable_quipu != no ; then
5854         for ac_hdr in quipu/commonarg.h
5855 do
5856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5858 echo "configure:5859: checking for $ac_hdr" >&5
5859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5860   echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862   cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 #include <$ac_hdr>
5866 EOF
5867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5868 { (eval echo configure:5869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5870 if test -z "$ac_err"; then
5871   rm -rf conftest*
5872   eval "ac_cv_header_$ac_safe=yes"
5873 else
5874   echo "$ac_err" >&5
5875   echo "configure: failed program was:" >&5
5876   cat conftest.$ac_ext >&5
5877   rm -rf conftest*
5878   eval "ac_cv_header_$ac_safe=no"
5879 fi
5880 rm -f conftest*
5881 fi
5882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5883   echo "$ac_t""yes" 1>&6
5884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5885   cat >> confdefs.h <<EOF
5886 #define $ac_tr_hdr 1
5887 EOF
5888  
5889 else
5890   echo "$ac_t""no" 1>&6
5891 fi
5892 done
5893
5894
5895         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5896                 BUILD_QUIPU=yes
5897         elif test $ol_enable_quipu = auto ; then
5898                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5899         else
5900                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5901         fi
5902 fi
5903
5904 ol_link_kbind=no
5905 ol_link_kpasswd=no
5906 ol_link_krb5=no
5907 ol_link_krb4=no
5908
5909 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5910         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5911
5912         for ac_hdr in krb5.h
5913 do
5914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5916 echo "configure:5917: checking for $ac_hdr" >&5
5917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5918   echo $ac_n "(cached) $ac_c" 1>&6
5919 else
5920   cat > conftest.$ac_ext <<EOF
5921 #line 5922 "configure"
5922 #include "confdefs.h"
5923 #include <$ac_hdr>
5924 EOF
5925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5926 { (eval echo configure:5927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5928 if test -z "$ac_err"; then
5929   rm -rf conftest*
5930   eval "ac_cv_header_$ac_safe=yes"
5931 else
5932   echo "$ac_err" >&5
5933   echo "configure: failed program was:" >&5
5934   cat conftest.$ac_ext >&5
5935   rm -rf conftest*
5936   eval "ac_cv_header_$ac_safe=no"
5937 fi
5938 rm -f conftest*
5939 fi
5940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5941   echo "$ac_t""yes" 1>&6
5942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5943   cat >> confdefs.h <<EOF
5944 #define $ac_tr_hdr 1
5945 EOF
5946  
5947 else
5948   echo "$ac_t""no" 1>&6
5949 fi
5950 done
5951
5952
5953         if test $ac_cv_header_krb5_h = yes ; then
5954                                 for ac_hdr in heim_err.h
5955 do
5956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5958 echo "configure:5959: checking for $ac_hdr" >&5
5959 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5960   echo $ac_n "(cached) $ac_c" 1>&6
5961 else
5962   cat > conftest.$ac_ext <<EOF
5963 #line 5964 "configure"
5964 #include "confdefs.h"
5965 #include <$ac_hdr>
5966 EOF
5967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5968 { (eval echo configure:5969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5970 if test -z "$ac_err"; then
5971   rm -rf conftest*
5972   eval "ac_cv_header_$ac_safe=yes"
5973 else
5974   echo "$ac_err" >&5
5975   echo "configure: failed program was:" >&5
5976   cat conftest.$ac_ext >&5
5977   rm -rf conftest*
5978   eval "ac_cv_header_$ac_safe=no"
5979 fi
5980 rm -f conftest*
5981 fi
5982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5983   echo "$ac_t""yes" 1>&6
5984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5985   cat >> confdefs.h <<EOF
5986 #define $ac_tr_hdr 1
5987 EOF
5988  
5989 else
5990   echo "$ac_t""no" 1>&6
5991 fi
5992 done
5993
5994                 if test $ac_cv_header_heim_err_h = yes ; then
5995                         krb5_impl=heimdal
5996                 else
5997                         krb5_impl=mit
5998                 fi
5999
6000                 if test $krb5_impl = mit; then
6001                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6002 echo "configure:6003: checking for main in -lkrb5" >&5
6003 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6004 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6005   echo $ac_n "(cached) $ac_c" 1>&6
6006 else
6007   ac_save_LIBS="$LIBS"
6008 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6009 cat > conftest.$ac_ext <<EOF
6010 #line 6011 "configure"
6011 #include "confdefs.h"
6012
6013 int main() {
6014 main()
6015 ; return 0; }
6016 EOF
6017 if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6018   rm -rf conftest*
6019   eval "ac_cv_lib_$ac_lib_var=yes"
6020 else
6021   echo "configure: failed program was:" >&5
6022   cat conftest.$ac_ext >&5
6023   rm -rf conftest*
6024   eval "ac_cv_lib_$ac_lib_var=no"
6025 fi
6026 rm -f conftest*
6027 LIBS="$ac_save_LIBS"
6028
6029 fi
6030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6031   echo "$ac_t""yes" 1>&6
6032   have_krb5=yes
6033                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6034 else
6035   echo "$ac_t""no" 1>&6
6036 have_krb5=no
6037 fi
6038
6039
6040                 elif test $krb5_impl = heimdal; then
6041                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6042 echo "configure:6043: checking for main in -lkrb5" >&5
6043 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6045   echo $ac_n "(cached) $ac_c" 1>&6
6046 else
6047   ac_save_LIBS="$LIBS"
6048 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6049 cat > conftest.$ac_ext <<EOF
6050 #line 6051 "configure"
6051 #include "confdefs.h"
6052
6053 int main() {
6054 main()
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_lib_$ac_lib_var=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_lib_$ac_lib_var=no"
6065 fi
6066 rm -f conftest*
6067 LIBS="$ac_save_LIBS"
6068
6069 fi
6070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6071   echo "$ac_t""yes" 1>&6
6072   have_krb5=yes
6073                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6074 else
6075   echo "$ac_t""no" 1>&6
6076 have_krb5=no
6077 fi
6078
6079
6080                         cat >> confdefs.h <<\EOF
6081 #define HAVE_HEIMDAL_KERBEROS 1
6082 EOF
6083
6084                 else
6085                         have_krb5=no
6086                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6087                 fi
6088
6089                 if test $have_krb5 = yes ; then
6090                         ol_link_krb5=yes
6091
6092                         cat >> confdefs.h <<\EOF
6093 #define HAVE_KRB5 1
6094 EOF
6095
6096
6097                         if test $ol_enable_kpasswd != no ; then
6098                                 ol_link_kpasswd=yes;
6099                         fi
6100
6101                         if test $ol_with_kerberos = k5only ; then
6102                                 ol_with_kerberos=found
6103                         fi
6104
6105                 elif test $ol_with_kerberos != auto ; then
6106                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6107                 fi
6108
6109         fi
6110 fi
6111
6112 if test $ol_link_krb5 = yes -a \
6113         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6114
6115         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6116 do
6117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6119 echo "configure:6120: checking for $ac_hdr" >&5
6120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6121   echo $ac_n "(cached) $ac_c" 1>&6
6122 else
6123   cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126 #include <$ac_hdr>
6127 EOF
6128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6129 { (eval echo configure:6130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6131 if test -z "$ac_err"; then
6132   rm -rf conftest*
6133   eval "ac_cv_header_$ac_safe=yes"
6134 else
6135   echo "$ac_err" >&5
6136   echo "configure: failed program was:" >&5
6137   cat conftest.$ac_ext >&5
6138   rm -rf conftest*
6139   eval "ac_cv_header_$ac_safe=no"
6140 fi
6141 rm -f conftest*
6142 fi
6143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6144   echo "$ac_t""yes" 1>&6
6145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6146   cat >> confdefs.h <<EOF
6147 #define $ac_tr_hdr 1
6148 EOF
6149  
6150 else
6151   echo "$ac_t""no" 1>&6
6152 fi
6153 done
6154
6155
6156         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6157                 if test $krb5_impl = mit; then
6158                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6159 echo "configure:6160: checking for main in -lkrb4" >&5
6160 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6162   echo $ac_n "(cached) $ac_c" 1>&6
6163 else
6164   ac_save_LIBS="$LIBS"
6165 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6166 cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169
6170 int main() {
6171 main()
6172 ; return 0; }
6173 EOF
6174 if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6175   rm -rf conftest*
6176   eval "ac_cv_lib_$ac_lib_var=yes"
6177 else
6178   echo "configure: failed program was:" >&5
6179   cat conftest.$ac_ext >&5
6180   rm -rf conftest*
6181   eval "ac_cv_lib_$ac_lib_var=no"
6182 fi
6183 rm -f conftest*
6184 LIBS="$ac_save_LIBS"
6185
6186 fi
6187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6188   echo "$ac_t""yes" 1>&6
6189   have_k425=yes
6190                                 KRB4_LIBS="-lkrb4 -ldes425"
6191 else
6192   echo "$ac_t""no" 1>&6
6193 have_k425=no
6194 fi
6195
6196
6197                 elif test $krb5_impl = heimdal; then
6198                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6199 echo "configure:6200: checking for main in -lkrb4" >&5
6200 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6202   echo $ac_n "(cached) $ac_c" 1>&6
6203 else
6204   ac_save_LIBS="$LIBS"
6205 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6206 cat > conftest.$ac_ext <<EOF
6207 #line 6208 "configure"
6208 #include "confdefs.h"
6209
6210 int main() {
6211 main()
6212 ; return 0; }
6213 EOF
6214 if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6215   rm -rf conftest*
6216   eval "ac_cv_lib_$ac_lib_var=yes"
6217 else
6218   echo "configure: failed program was:" >&5
6219   cat conftest.$ac_ext >&5
6220   rm -rf conftest*
6221   eval "ac_cv_lib_$ac_lib_var=no"
6222 fi
6223 rm -f conftest*
6224 LIBS="$ac_save_LIBS"
6225
6226 fi
6227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6228   echo "$ac_t""yes" 1>&6
6229   have_k425=yes
6230                                 KRB4_LIBS="-lkrb4"
6231 else
6232   echo "$ac_t""no" 1>&6
6233 have_k425=no
6234 fi
6235
6236
6237                 else
6238                         have_425=no
6239                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6240                 fi
6241
6242                 if test $have_k425 = yes ; then
6243                         ol_with_kerberos=found
6244                         ol_link_krb4=yes
6245
6246                         cat >> confdefs.h <<\EOF
6247 #define HAVE_KRB425 1
6248 EOF
6249
6250                         cat >> confdefs.h <<\EOF
6251 #define HAVE_KRB4 1
6252 EOF
6253
6254
6255                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6256 echo "configure:6257: checking for des_debug in Kerberos libraries" >&5
6257 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6258   echo $ac_n "(cached) $ac_c" 1>&6
6259 else
6260   
6261                                                                 save_LIBS="$LIBS"
6262                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6263                                 cat > conftest.$ac_ext <<EOF
6264 #line 6265 "configure"
6265 #include "confdefs.h"
6266
6267 #include <kerberosIV/krb.h>
6268 #include <kerberosIV/des.h>
6269 extern int des_debug;
6270
6271 int main() {
6272
6273 des_debug = 1;
6274
6275 ; return 0; }
6276 EOF
6277 if { (eval echo configure:6278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6278   rm -rf conftest*
6279   ol_cv_var_des_debug=yes
6280 else
6281   echo "configure: failed program was:" >&5
6282   cat conftest.$ac_ext >&5
6283   rm -rf conftest*
6284   ol_cv_var_des_debug=no
6285 fi
6286 rm -f conftest*
6287                                                                 LIBS="$save_LIBS"
6288                         
6289 fi
6290
6291 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6292
6293                         if test $ol_cv_var_des_debug = yes ; then
6294                                 cat >> confdefs.h <<\EOF
6295 #define HAVE_DES_DEBUG 1
6296 EOF
6297
6298                         fi
6299
6300                         LIBS="$save_LIBS"
6301                 fi
6302         fi
6303 fi
6304
6305 if test $ol_link_krb5 = yes ; then
6306         ol_with_kerberos=found
6307 fi
6308
6309 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6310         -o $ol_with_kerberos = kth ; then
6311
6312         for ac_hdr in krb.h des.h krb-archaeology.h 
6313 do
6314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6316 echo "configure:6317: checking for $ac_hdr" >&5
6317 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6318   echo $ac_n "(cached) $ac_c" 1>&6
6319 else
6320   cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323 #include <$ac_hdr>
6324 EOF
6325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6326 { (eval echo configure:6327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6328 if test -z "$ac_err"; then
6329   rm -rf conftest*
6330   eval "ac_cv_header_$ac_safe=yes"
6331 else
6332   echo "$ac_err" >&5
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_header_$ac_safe=no"
6337 fi
6338 rm -f conftest*
6339 fi
6340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6341   echo "$ac_t""yes" 1>&6
6342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6343   cat >> confdefs.h <<EOF
6344 #define $ac_tr_hdr 1
6345 EOF
6346  
6347 else
6348   echo "$ac_t""no" 1>&6
6349 fi
6350 done
6351
6352
6353         if test $ac_cv_header_krb_h = yes ; then
6354                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6355 echo "configure:6356: checking for main in -lkrb" >&5
6356 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6358   echo $ac_n "(cached) $ac_c" 1>&6
6359 else
6360   ac_save_LIBS="$LIBS"
6361 LIBS="-lkrb -ldes $LIBS"
6362 cat > conftest.$ac_ext <<EOF
6363 #line 6364 "configure"
6364 #include "confdefs.h"
6365
6366 int main() {
6367 main()
6368 ; return 0; }
6369 EOF
6370 if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6371   rm -rf conftest*
6372   eval "ac_cv_lib_$ac_lib_var=yes"
6373 else
6374   echo "configure: failed program was:" >&5
6375   cat conftest.$ac_ext >&5
6376   rm -rf conftest*
6377   eval "ac_cv_lib_$ac_lib_var=no"
6378 fi
6379 rm -f conftest*
6380 LIBS="$ac_save_LIBS"
6381
6382 fi
6383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6384   echo "$ac_t""yes" 1>&6
6385   have_k4=yes
6386 else
6387   echo "$ac_t""no" 1>&6
6388 have_k4=no
6389 fi
6390
6391
6392                 if test $have_k4 = yes ; then
6393                         ol_with_kerberos=found
6394                         ol_link_krb4=yes
6395
6396                         cat >> confdefs.h <<\EOF
6397 #define HAVE_KRB4 1
6398 EOF
6399
6400
6401                         KRB4_LIBS="-lkrb -ldes"
6402
6403                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6404                                 cat >> confdefs.h <<\EOF
6405 #define HAVE_KTH_KERBEROS 1
6406 EOF
6407
6408                         fi
6409                 fi
6410         fi
6411 fi
6412
6413 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6414         ol_link_kpasswd=yes;
6415 fi
6416
6417 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6418         cat >> confdefs.h <<\EOF
6419 #define HAVE_KERBEROS 1
6420 EOF
6421
6422
6423 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6424         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6425 fi
6426
6427 ol_link_tls=no
6428 if test $ol_with_tls != no ; then
6429         
6430         for ac_hdr in openssl/ssl.h ssl.h
6431 do
6432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6434 echo "configure:6435: checking for $ac_hdr" >&5
6435 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6436   echo $ac_n "(cached) $ac_c" 1>&6
6437 else
6438   cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 #include <$ac_hdr>
6442 EOF
6443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6444 { (eval echo configure:6445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6446 if test -z "$ac_err"; then
6447   rm -rf conftest*
6448   eval "ac_cv_header_$ac_safe=yes"
6449 else
6450   echo "$ac_err" >&5
6451   echo "configure: failed program was:" >&5
6452   cat conftest.$ac_ext >&5
6453   rm -rf conftest*
6454   eval "ac_cv_header_$ac_safe=no"
6455 fi
6456 rm -f conftest*
6457 fi
6458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6459   echo "$ac_t""yes" 1>&6
6460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6461   cat >> confdefs.h <<EOF
6462 #define $ac_tr_hdr 1
6463 EOF
6464  
6465 else
6466   echo "$ac_t""no" 1>&6
6467 fi
6468 done
6469
6470         
6471         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6472                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6473 echo "configure:6474: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6474 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6475 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6476   echo $ac_n "(cached) $ac_c" 1>&6
6477 else
6478   ac_save_LIBS="$LIBS"
6479 LIBS="-lssl -lcrypto $LIBS"
6480 cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483 /* Override any gcc2 internal prototype to avoid an error.  */
6484 /* We use char because int might match the return type of a gcc2
6485     builtin and then its argument prototype would still apply.  */
6486 char SSLeay_add_ssl_algorithms();
6487
6488 int main() {
6489 SSLeay_add_ssl_algorithms()
6490 ; return 0; }
6491 EOF
6492 if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6493   rm -rf conftest*
6494   eval "ac_cv_lib_$ac_lib_var=yes"
6495 else
6496   echo "configure: failed program was:" >&5
6497   cat conftest.$ac_ext >&5
6498   rm -rf conftest*
6499   eval "ac_cv_lib_$ac_lib_var=no"
6500 fi
6501 rm -f conftest*
6502 LIBS="$ac_save_LIBS"
6503
6504 fi
6505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6506   echo "$ac_t""yes" 1>&6
6507   have_ssleay=yes
6508                         need_rsaref=no
6509 else
6510   echo "$ac_t""no" 1>&6
6511 have_ssleay=no
6512 fi
6513
6514                         
6515                 if test $have_ssleay = no ; then
6516                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6517 echo "configure:6518: checking for SSL_library_init in -lssl" >&5
6518 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6519 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6520   echo $ac_n "(cached) $ac_c" 1>&6
6521 else
6522   ac_save_LIBS="$LIBS"
6523 LIBS="-lssl -lcrypto $LIBS"
6524 cat > conftest.$ac_ext <<EOF
6525 #line 6526 "configure"
6526 #include "confdefs.h"
6527 /* Override any gcc2 internal prototype to avoid an error.  */
6528 /* We use char because int might match the return type of a gcc2
6529     builtin and then its argument prototype would still apply.  */
6530 char SSL_library_init();
6531
6532 int main() {
6533 SSL_library_init()
6534 ; return 0; }
6535 EOF
6536 if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6537   rm -rf conftest*
6538   eval "ac_cv_lib_$ac_lib_var=yes"
6539 else
6540   echo "configure: failed program was:" >&5
6541   cat conftest.$ac_ext >&5
6542   rm -rf conftest*
6543   eval "ac_cv_lib_$ac_lib_var=no"
6544 fi
6545 rm -f conftest*
6546 LIBS="$ac_save_LIBS"
6547
6548 fi
6549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6550   echo "$ac_t""yes" 1>&6
6551   have_ssleay=yes
6552                                 need_rsaref=no
6553 else
6554   echo "$ac_t""no" 1>&6
6555 have_ssleay=no
6556 fi
6557
6558                 fi
6559
6560                 if test $have_ssleay = no ; then
6561                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6562 echo "configure:6563: checking for ssl3_accept in -lssl" >&5
6563 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6565   echo $ac_n "(cached) $ac_c" 1>&6
6566 else
6567   ac_save_LIBS="$LIBS"
6568 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6569 cat > conftest.$ac_ext <<EOF
6570 #line 6571 "configure"
6571 #include "confdefs.h"
6572 /* Override any gcc2 internal prototype to avoid an error.  */
6573 /* We use char because int might match the return type of a gcc2
6574     builtin and then its argument prototype would still apply.  */
6575 char ssl3_accept();
6576
6577 int main() {
6578 ssl3_accept()
6579 ; return 0; }
6580 EOF
6581 if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6582   rm -rf conftest*
6583   eval "ac_cv_lib_$ac_lib_var=yes"
6584 else
6585   echo "configure: failed program was:" >&5
6586   cat conftest.$ac_ext >&5
6587   rm -rf conftest*
6588   eval "ac_cv_lib_$ac_lib_var=no"
6589 fi
6590 rm -f conftest*
6591 LIBS="$ac_save_LIBS"
6592
6593 fi
6594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6595   echo "$ac_t""yes" 1>&6
6596   have_ssleay=yes
6597                                 need_rsaref=yes
6598 else
6599   echo "$ac_t""no" 1>&6
6600 have_ssleay=no
6601 fi
6602
6603                 fi
6604
6605                 if test $have_ssleay = yes ; then
6606                         ol_with_tls=found
6607                         ol_link_tls=yes
6608
6609                         cat >> confdefs.h <<\EOF
6610 #define HAVE_SSLEAY 1
6611 EOF
6612
6613
6614                         if test $need_rsaref = yes; then
6615                                 cat >> confdefs.h <<\EOF
6616 #define HAVE_RSAREF 1
6617 EOF
6618
6619
6620                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6621                         else
6622                                 TLS_LIBS="-lssl -lcrypto"
6623                         fi
6624                 fi
6625         fi
6626 fi
6627
6628 if test $ol_link_tls = yes ; then
6629         cat >> confdefs.h <<\EOF
6630 #define HAVE_TLS 1
6631 EOF
6632
6633 fi      
6634
6635 for ac_func in \
6636         ctime_r                 \
6637         gethostbyname_r gethostbyaddr_r \
6638
6639 do
6640 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6641 echo "configure:6642: checking for $ac_func" >&5
6642 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* System header to define __stub macros and hopefully few prototypes,
6649     which can conflict with char $ac_func(); below.  */
6650 #include <assert.h>
6651 /* Override any gcc2 internal prototype to avoid an error.  */
6652 /* We use char because int might match the return type of a gcc2
6653     builtin and then its argument prototype would still apply.  */
6654 char $ac_func();
6655 char (*f)();
6656
6657 int main() {
6658
6659 /* The GNU C library defines this for functions which it implements
6660     to always fail with ENOSYS.  Some functions are actually named
6661     something starting with __ and the normal name is an alias.  */
6662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6663 choke me
6664 #else
6665 f = $ac_func;
6666 #endif
6667
6668 ; return 0; }
6669 EOF
6670 if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6671   rm -rf conftest*
6672   eval "ac_cv_func_$ac_func=yes"
6673 else
6674   echo "configure: failed program was:" >&5
6675   cat conftest.$ac_ext >&5
6676   rm -rf conftest*
6677   eval "ac_cv_func_$ac_func=no"
6678 fi
6679 rm -f conftest*
6680 fi
6681
6682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6683   echo "$ac_t""yes" 1>&6
6684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6685   cat >> confdefs.h <<EOF
6686 #define $ac_tr_func 1
6687 EOF
6688  
6689 else
6690   echo "$ac_t""no" 1>&6
6691 fi
6692 done
6693
6694
6695 if test "$ac_cv_func_ctime_r" = no ; then
6696         ol_cv_func_ctime_r_nargs=0
6697 else
6698         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6699 echo "configure:6700: checking number of arguments of ctime_r" >&5
6700 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6701   echo $ac_n "(cached) $ac_c" 1>&6
6702 else
6703   cat > conftest.$ac_ext <<EOF
6704 #line 6705 "configure"
6705 #include "confdefs.h"
6706 #include <time.h>
6707 int main() {
6708 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6712   rm -rf conftest*
6713   ol_cv_func_ctime_r_nargs3=yes
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   ol_cv_func_ctime_r_nargs3=no
6719 fi
6720 rm -f conftest*
6721
6722         cat > conftest.$ac_ext <<EOF
6723 #line 6724 "configure"
6724 #include "confdefs.h"
6725 #include <time.h>
6726 int main() {
6727 time_t ti; char *buffer; ctime_r(&ti,buffer);
6728 ; return 0; }
6729 EOF
6730 if { (eval echo configure:6731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6731   rm -rf conftest*
6732   ol_cv_func_ctime_r_nargs2=yes
6733 else
6734   echo "configure: failed program was:" >&5
6735   cat conftest.$ac_ext >&5
6736   rm -rf conftest*
6737   ol_cv_func_ctime_r_nargs2=no
6738 fi
6739 rm -f conftest*
6740
6741         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6742                 $ol_cv_func_ctime_r_nargs2 = no ; then
6743
6744                 ol_cv_func_ctime_r_nargs=3
6745
6746         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6747                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6748
6749                 ol_cv_func_ctime_r_nargs=2
6750
6751         else
6752                 ol_cv_func_ctime_r_nargs=0
6753         fi
6754   
6755 fi
6756
6757 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6758
6759   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6760         cat >> confdefs.h <<EOF
6761 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6762 EOF
6763
6764   fi
6765
6766 fi
6767
6768 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6769         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6770 echo "configure:6771: checking number of arguments of gethostbyname_r" >&5
6771 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6772   echo $ac_n "(cached) $ac_c" 1>&6
6773 else
6774   cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 #include <sys/types.h>
6778 #include <sys/socket.h>
6779 #include <netinet/in.h>
6780 #include <netdb.h>
6781 #define BUFSIZE (sizeof(struct hostent)+10)
6782 int main() {
6783 struct hostent hent; char buffer[BUFSIZE];
6784                 int bufsize=BUFSIZE;int h_errno;
6785                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6786                         buffer, bufsize, &h_errno);
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6790   rm -rf conftest*
6791   ol_cv_func_gethostbyname_r_nargs5=yes
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   rm -rf conftest*
6796   ol_cv_func_gethostbyname_r_nargs5=no
6797 fi
6798 rm -f conftest*
6799
6800         cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 #include <sys/types.h>
6804 #include <sys/socket.h>
6805 #include <netinet/in.h>
6806 #include <netdb.h>
6807 #define BUFSIZE (sizeof(struct hostent)+10)
6808 int main() {
6809 struct hostent hent;struct hostent *rhent;
6810                 char buffer[BUFSIZE];
6811                 int bufsize=BUFSIZE;int h_errno;
6812                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6813                         &rhent, &h_errno);
6814 ; return 0; }
6815 EOF
6816 if { (eval echo configure:6817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6817   rm -rf conftest*
6818   ol_cv_func_gethostbyname_r_nargs6=yes
6819 else
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -rf conftest*
6823   ol_cv_func_gethostbyname_r_nargs6=no
6824 fi
6825 rm -f conftest*
6826
6827         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6828                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6829
6830                 ol_cv_func_gethostbyname_r_nargs=5
6831
6832         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6833                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6834
6835                 ol_cv_func_gethostbyname_r_nargs=6
6836
6837         else
6838                 ol_cv_func_gethostbyname_r_nargs=0
6839         fi
6840   
6841 fi
6842
6843 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6844   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6845         cat >> confdefs.h <<EOF
6846 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6847 EOF
6848
6849   fi
6850
6851 else
6852         ol_cv_func_gethostbyname_r_nargs=0
6853 fi
6854  
6855 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6856         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6857 echo "configure:6858: checking number of arguments of gethostbyaddr_r" >&5
6858 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   cat > conftest.$ac_ext <<EOF
6862 #line 6863 "configure"
6863 #include "confdefs.h"
6864 #include <sys/types.h>
6865 #include <sys/socket.h>
6866 #include <netinet/in.h>
6867 #include <netdb.h>
6868 #define BUFSIZE (sizeof(struct hostent)+10)
6869 int main() {
6870 struct hostent hent; char buffer[BUFSIZE]; 
6871             struct in_addr add;
6872             size_t alen=sizeof(struct in_addr);
6873             int bufsize=BUFSIZE;int h_errno;
6874                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6875                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6879   rm -rf conftest*
6880   ol_cv_func_gethostbyaddr_r_nargs7=yes
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   ol_cv_func_gethostbyaddr_r_nargs7=no
6886 fi
6887 rm -f conftest*
6888
6889         cat > conftest.$ac_ext <<EOF
6890 #line 6891 "configure"
6891 #include "confdefs.h"
6892 #include <sys/types.h>
6893 #include <sys/socket.h>
6894 #include <netinet/in.h>
6895 #include <netdb.h>
6896 #define BUFSIZE (sizeof(struct hostent)+10)
6897 int main() {
6898 struct hostent hent;
6899                 struct hostent *rhent; char buffer[BUFSIZE]; 
6900                 struct in_addr add;
6901                 size_t alen=sizeof(struct in_addr);
6902                 int bufsize=BUFSIZE;int h_errno;
6903                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6904                         alen, AF_INET, &hent, buffer, bufsize, 
6905                         &rhent, &h_errno);
6906 ; return 0; }
6907 EOF
6908 if { (eval echo configure:6909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6909   rm -rf conftest*
6910   ol_cv_func_gethostbyaddr_r_nargs8=yes
6911 else
6912   echo "configure: failed program was:" >&5
6913   cat conftest.$ac_ext >&5
6914   rm -rf conftest*
6915   ol_cv_func_gethostbyaddr_r_nargs8=no
6916 fi
6917 rm -f conftest*
6918
6919         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6920                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6921
6922                 ol_cv_func_gethostbyaddr_r_nargs=7
6923
6924         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6925                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6926
6927                 ol_cv_func_gethostbyaddr_r_nargs=8
6928
6929         else
6930                 ol_cv_func_gethostbyaddr_r_nargs=0
6931         fi
6932   
6933 fi
6934
6935 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6936   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6937     cat >> confdefs.h <<EOF
6938 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6939 EOF
6940
6941   fi
6942
6943 else
6944         ol_cv_func_gethostbyaddr_r_nargs=0
6945 fi
6946
6947 if test "$ac_cv_func_ctime_r" = yes \
6948         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6949         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6950         -a "$ac_cv_func_gethostbyname_r" = yes \
6951         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6952         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6953         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6954         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6955         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6956         ; then
6957  
6958         cat >> confdefs.h <<\EOF
6959 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6960 EOF
6961
6962 fi
6963
6964 ol_link_threads=no
6965
6966 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6967         -o $ol_with_threads = nt ; then
6968
6969         
6970         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6971 echo "configure:6972: checking for NT Threads" >&5
6972 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6973   echo $ac_n "(cached) $ac_c" 1>&6
6974 else
6975   
6976                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6977 echo "configure:6978: checking for _beginthread" >&5
6978 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6979   echo $ac_n "(cached) $ac_c" 1>&6
6980 else
6981   cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 /* System header to define __stub macros and hopefully few prototypes,
6985     which can conflict with char _beginthread(); below.  */
6986 #include <assert.h>
6987 /* Override any gcc2 internal prototype to avoid an error.  */
6988 /* We use char because int might match the return type of a gcc2
6989     builtin and then its argument prototype would still apply.  */
6990 char _beginthread();
6991 char (*f)();
6992
6993 int main() {
6994
6995 /* The GNU C library defines this for functions which it implements
6996     to always fail with ENOSYS.  Some functions are actually named
6997     something starting with __ and the normal name is an alias.  */
6998 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6999 choke me
7000 #else
7001 f = _beginthread;
7002 #endif
7003
7004 ; return 0; }
7005 EOF
7006 if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7007   rm -rf conftest*
7008   eval "ac_cv_func__beginthread=yes"
7009 else
7010   echo "configure: failed program was:" >&5
7011   cat conftest.$ac_ext >&5
7012   rm -rf conftest*
7013   eval "ac_cv_func__beginthread=no"
7014 fi
7015 rm -f conftest*
7016 fi
7017
7018 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7019   echo "$ac_t""yes" 1>&6
7020   ol_cv_nt_threads=yes
7021 else
7022   echo "$ac_t""no" 1>&6
7023 ol_cv_nt_threads=no
7024 fi
7025
7026         
7027 fi
7028
7029 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7030
7031         if test $ol_cv_nt_threads = yes ; then
7032                 cat >> confdefs.h <<\EOF
7033 #define HAVE_NT_THREADS 1
7034 EOF
7035
7036         fi
7037
7038
7039         if test "$ol_cv_nt_threads" = yes ; then
7040         ol_link_threads=nt
7041         ol_with_threads=found
7042         ol_with_yielding_select=yes
7043
7044                 cat >> confdefs.h <<\EOF
7045 #define HAVE_NT_SERVICE_MANAGER 1
7046 EOF
7047
7048                 cat >> confdefs.h <<\EOF
7049 #define HAVE_NT_EVENT_LOG 1
7050 EOF
7051
7052         fi
7053
7054         if test $ol_with_threads = nt ; then
7055                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7056         fi
7057 fi
7058
7059 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7060         -o $ol_with_threads = posix ; then
7061
7062         for ac_hdr in pthread.h
7063 do
7064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7066 echo "configure:7067: checking for $ac_hdr" >&5
7067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   cat > conftest.$ac_ext <<EOF
7071 #line 7072 "configure"
7072 #include "confdefs.h"
7073 #include <$ac_hdr>
7074 EOF
7075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7076 { (eval echo configure:7077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7078 if test -z "$ac_err"; then
7079   rm -rf conftest*
7080   eval "ac_cv_header_$ac_safe=yes"
7081 else
7082   echo "$ac_err" >&5
7083   echo "configure: failed program was:" >&5
7084   cat conftest.$ac_ext >&5
7085   rm -rf conftest*
7086   eval "ac_cv_header_$ac_safe=no"
7087 fi
7088 rm -f conftest*
7089 fi
7090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7091   echo "$ac_t""yes" 1>&6
7092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7093   cat >> confdefs.h <<EOF
7094 #define $ac_tr_hdr 1
7095 EOF
7096  
7097 else
7098   echo "$ac_t""no" 1>&6
7099 fi
7100 done
7101
7102
7103         if test $ac_cv_header_pthread_h = yes ; then
7104                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7105 echo "configure:7106: checking POSIX thread version" >&5
7106 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7107   echo $ac_n "(cached) $ac_c" 1>&6
7108 else
7109   
7110         cat > conftest.$ac_ext <<EOF
7111 #line 7112 "configure"
7112 #include "confdefs.h"
7113
7114 #               include <pthread.h>
7115                 /* this check could be improved */
7116 #               ifdef PTHREAD_ONCE_INIT
7117                         pthread_version_final;
7118 #               endif
7119         
7120 EOF
7121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7122   egrep "pthread_version_final" >/dev/null 2>&1; then
7123   rm -rf conftest*
7124   ol_pthread_final=yes
7125 else
7126   rm -rf conftest*
7127   ol_pthread_final=no
7128 fi
7129 rm -f conftest*
7130
7131
7132         cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135
7136 #               include <pthread.h>
7137                 /* this check could be improved */
7138 #               ifdef pthread_once_init
7139                         pthread_version_draft4;
7140 #               endif
7141         
7142 EOF
7143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7144   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7145   rm -rf conftest*
7146   ol_pthread_draft4=yes
7147 else
7148   rm -rf conftest*
7149   ol_pthread_draft4=no
7150 fi
7151 rm -f conftest*
7152
7153
7154         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7155                 ol_cv_pthread_version=final
7156         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7157                 ol_cv_pthread_version=draft4
7158         else
7159                 ol_cv_pthread_version=unknown
7160         fi
7161
7162 fi
7163
7164 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7165
7166
7167                 if test $ol_cv_pthread_version = final ; then
7168                         cat >> confdefs.h <<\EOF
7169 #define HAVE_PTHREADS_FINAL 1
7170 EOF
7171
7172                 elif test $ol_cv_pthread_version = draft4 ; then
7173                         cat >> confdefs.h <<\EOF
7174 #define HAVE_PTHREADS_D4 1
7175 EOF
7176
7177                 else
7178                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7179                 fi
7180
7181                 # consider threads found
7182                 ol_with_threads=found
7183
7184                 
7185         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7186 echo "configure:7187: checking for LinuxThreads pthread.h" >&5
7187 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7188   echo $ac_n "(cached) $ac_c" 1>&6
7189 else
7190   cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193 #include <pthread.h>
7194 EOF
7195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7196   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7197   rm -rf conftest*
7198   ol_cv_header_linux_threads=yes
7199 else
7200   rm -rf conftest*
7201   ol_cv_header_linux_threads=no
7202 fi
7203 rm -f conftest*
7204
7205                 
7206 fi
7207
7208 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7209         if test $ol_cv_header_linux_threads = yes; then
7210                 cat >> confdefs.h <<\EOF
7211 #define HAVE_LINUX_THREADS 1
7212 EOF
7213
7214         fi
7215
7216                 
7217         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7218 echo "configure:7219: checking for GNU Pth pthread.h" >&5
7219 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7220   echo $ac_n "(cached) $ac_c" 1>&6
7221 else
7222   cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 #include <pthread.h>
7226 #ifdef _POSIX_THREAD_IS_GNU_PTH
7227         __gnu_pth__;
7228 #endif
7229
7230 EOF
7231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7232   egrep "__gnu_pth__" >/dev/null 2>&1; then
7233   rm -rf conftest*
7234   ol_cv_header_gnu_pth_pthread_h=yes
7235 else
7236   rm -rf conftest*
7237   ol_cv_header_gnu_pth_pthread_h=no
7238 fi
7239 rm -f conftest*
7240
7241                 
7242 fi
7243
7244 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7245
7246
7247                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7248                         for ac_hdr in sched.h
7249 do
7250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7252 echo "configure:7253: checking for $ac_hdr" >&5
7253 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7254   echo $ac_n "(cached) $ac_c" 1>&6
7255 else
7256   cat > conftest.$ac_ext <<EOF
7257 #line 7258 "configure"
7258 #include "confdefs.h"
7259 #include <$ac_hdr>
7260 EOF
7261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7262 { (eval echo configure:7263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7264 if test -z "$ac_err"; then
7265   rm -rf conftest*
7266   eval "ac_cv_header_$ac_safe=yes"
7267 else
7268   echo "$ac_err" >&5
7269   echo "configure: failed program was:" >&5
7270   cat conftest.$ac_ext >&5
7271   rm -rf conftest*
7272   eval "ac_cv_header_$ac_safe=no"
7273 fi
7274 rm -f conftest*
7275 fi
7276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7277   echo "$ac_t""yes" 1>&6
7278     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7279   cat >> confdefs.h <<EOF
7280 #define $ac_tr_hdr 1
7281 EOF
7282  
7283 else
7284   echo "$ac_t""no" 1>&6
7285 fi
7286 done
7287
7288                 fi
7289
7290                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7291                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7292 echo "configure:7293: checking for pthread_create in default libraries" >&5
7293 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7294   echo $ac_n "(cached) $ac_c" 1>&6
7295 else
7296   
7297                 if test "$cross_compiling" = yes; then
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 int main() {
7314
7315         /* pthread test function */
7316         pthread_t t;
7317         int status;
7318
7319         /* make sure pthread_create() isn't just a stub */
7320 #if HAVE_PTHREADS_D4
7321         status = pthread_create(&t, pthread_attr_default, task, NULL);
7322 #else
7323         status = pthread_create(&t, NULL, task, NULL);
7324 #endif
7325
7326         if( status ) exit( status );
7327
7328         /* make sure pthread_detach() isn't just a stub */
7329 #if HAVE_PTHREADS_D4
7330         status = pthread_detach( &t );
7331 #else
7332         status = pthread_detach( t );
7333 #endif
7334
7335 #ifdef HAVE_LINUX_THREADS
7336         pthread_kill_other_threads_np();
7337 #endif
7338
7339         exit( status );
7340
7341 ; return 0; }
7342 EOF
7343 if { (eval echo configure:7344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7344   rm -rf conftest*
7345   ol_cv_pthread_create=yes
7346 else
7347   echo "configure: failed program was:" >&5
7348   cat conftest.$ac_ext >&5
7349   rm -rf conftest*
7350   ol_cv_pthread_create=no
7351 fi
7352 rm -f conftest*
7353 else
7354   cat > conftest.$ac_ext <<EOF
7355 #line 7356 "configure"
7356 #include "confdefs.h"
7357 /* pthread test headers */
7358 #include <pthread.h>
7359 #ifndef NULL
7360 #define NULL (void*)0
7361 #endif
7362
7363 static void *task(p)
7364         void *p;
7365 {
7366         return (void *) (p == NULL);
7367 }
7368
7369
7370 int main(argc, argv)
7371         int argc;
7372         char **argv;
7373 {
7374
7375         /* pthread test function */
7376         pthread_t t;
7377         int status;
7378
7379         /* make sure pthread_create() isn't just a stub */
7380 #if HAVE_PTHREADS_D4
7381         status = pthread_create(&t, pthread_attr_default, task, NULL);
7382 #else
7383         status = pthread_create(&t, NULL, task, NULL);
7384 #endif
7385
7386         if( status ) exit( status );
7387
7388         /* make sure pthread_detach() isn't just a stub */
7389 #if HAVE_PTHREADS_D4
7390         status = pthread_detach( &t );
7391 #else
7392         status = pthread_detach( t );
7393 #endif
7394
7395 #ifdef HAVE_LINUX_THREADS
7396         pthread_kill_other_threads_np();
7397 #endif
7398
7399         exit( status );
7400
7401 }
7402
7403 EOF
7404 if { (eval echo configure:7405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7405 then
7406   ol_cv_pthread_create=yes
7407 else
7408   echo "configure: failed program was:" >&5
7409   cat conftest.$ac_ext >&5
7410   rm -fr conftest*
7411   ol_cv_pthread_create=no
7412 fi
7413 rm -fr conftest*
7414 fi
7415
7416 fi
7417
7418 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7419
7420                 if test $ol_cv_pthread_create != no ; then
7421                         ol_link_threads=posix
7422                         ol_link_pthreads=""
7423                 fi
7424                 
7425                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7426 if test "$ol_link_threads" = no ; then
7427         # try -kthread
7428         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7429 echo "configure:7430: checking for pthread link with -kthread" >&5
7430 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7431   echo $ac_n "(cached) $ac_c" 1>&6
7432 else
7433   
7434                 # save the flags
7435                 ol_LIBS="$LIBS"
7436                 LIBS="-kthread $LIBS"
7437
7438                 if test "$cross_compiling" = yes; then
7439   cat > conftest.$ac_ext <<EOF
7440 #line 7441 "configure"
7441 #include "confdefs.h"
7442 /* pthread test headers */
7443 #include <pthread.h>
7444 #ifndef NULL
7445 #define NULL (void*)0
7446 #endif
7447
7448 static void *task(p)
7449         void *p;
7450 {
7451         return (void *) (p == NULL);
7452 }
7453
7454 int main() {
7455
7456         /* pthread test function */
7457         pthread_t t;
7458         int status;
7459
7460         /* make sure pthread_create() isn't just a stub */
7461 #if HAVE_PTHREADS_D4
7462         status = pthread_create(&t, pthread_attr_default, task, NULL);
7463 #else
7464         status = pthread_create(&t, NULL, task, NULL);
7465 #endif
7466
7467         if( status ) exit( status );
7468
7469         /* make sure pthread_detach() isn't just a stub */
7470 #if HAVE_PTHREADS_D4
7471         status = pthread_detach( &t );
7472 #else
7473         status = pthread_detach( t );
7474 #endif
7475
7476 #ifdef HAVE_LINUX_THREADS
7477         pthread_kill_other_threads_np();
7478 #endif
7479
7480         exit( status );
7481
7482 ; return 0; }
7483 EOF
7484 if { (eval echo configure:7485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7485   rm -rf conftest*
7486   ol_cv_pthread_kthread=yes
7487 else
7488   echo "configure: failed program was:" >&5
7489   cat conftest.$ac_ext >&5
7490   rm -rf conftest*
7491   ol_cv_pthread_kthread=no
7492 fi
7493 rm -f conftest*
7494 else
7495   cat > conftest.$ac_ext <<EOF
7496 #line 7497 "configure"
7497 #include "confdefs.h"
7498 /* pthread test headers */
7499 #include <pthread.h>
7500 #ifndef NULL
7501 #define NULL (void*)0
7502 #endif
7503
7504 static void *task(p)
7505         void *p;
7506 {
7507         return (void *) (p == NULL);
7508 }
7509
7510
7511 int main(argc, argv)
7512         int argc;
7513         char **argv;
7514 {
7515
7516         /* pthread test function */
7517         pthread_t t;
7518         int status;
7519
7520         /* make sure pthread_create() isn't just a stub */
7521 #if HAVE_PTHREADS_D4
7522         status = pthread_create(&t, pthread_attr_default, task, NULL);
7523 #else
7524         status = pthread_create(&t, NULL, task, NULL);
7525 #endif
7526
7527         if( status ) exit( status );
7528
7529         /* make sure pthread_detach() isn't just a stub */
7530 #if HAVE_PTHREADS_D4
7531         status = pthread_detach( &t );
7532 #else
7533         status = pthread_detach( t );
7534 #endif
7535
7536 #ifdef HAVE_LINUX_THREADS
7537         pthread_kill_other_threads_np();
7538 #endif
7539
7540         exit( status );
7541
7542 }
7543
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7546 then
7547   ol_cv_pthread_kthread=yes
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -fr conftest*
7552   ol_cv_pthread_kthread=no
7553 fi
7554 rm -fr conftest*
7555 fi
7556
7557
7558                 # restore the LIBS
7559                 LIBS="$ol_LIBS"
7560         
7561 fi
7562
7563 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7564
7565         if test $ol_cv_pthread_kthread = yes ; then
7566                 ol_link_pthreads="-kthread"
7567                 ol_link_threads=posix
7568         fi
7569 fi
7570
7571                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7572 if test "$ol_link_threads" = no ; then
7573         # try -pthread
7574         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7575 echo "configure:7576: checking for pthread link with -pthread" >&5
7576 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7577   echo $ac_n "(cached) $ac_c" 1>&6
7578 else
7579   
7580                 # save the flags
7581                 ol_LIBS="$LIBS"
7582                 LIBS="-pthread $LIBS"
7583
7584                 if test "$cross_compiling" = yes; then
7585   cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 /* pthread test headers */
7589 #include <pthread.h>
7590 #ifndef NULL
7591 #define NULL (void*)0
7592 #endif
7593
7594 static void *task(p)
7595         void *p;
7596 {
7597         return (void *) (p == NULL);
7598 }
7599
7600 int main() {
7601
7602         /* pthread test function */
7603         pthread_t t;
7604         int status;
7605
7606         /* make sure pthread_create() isn't just a stub */
7607 #if HAVE_PTHREADS_D4
7608         status = pthread_create(&t, pthread_attr_default, task, NULL);
7609 #else
7610         status = pthread_create(&t, NULL, task, NULL);
7611 #endif
7612
7613         if( status ) exit( status );
7614
7615         /* make sure pthread_detach() isn't just a stub */
7616 #if HAVE_PTHREADS_D4
7617         status = pthread_detach( &t );
7618 #else
7619         status = pthread_detach( t );
7620 #endif
7621
7622 #ifdef HAVE_LINUX_THREADS
7623         pthread_kill_other_threads_np();
7624 #endif
7625
7626         exit( status );
7627
7628 ; return 0; }
7629 EOF
7630 if { (eval echo configure:7631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7631   rm -rf conftest*
7632   ol_cv_pthread_pthread=yes
7633 else
7634   echo "configure: failed program was:" >&5
7635   cat conftest.$ac_ext >&5
7636   rm -rf conftest*
7637   ol_cv_pthread_pthread=no
7638 fi
7639 rm -f conftest*
7640 else
7641   cat > conftest.$ac_ext <<EOF
7642 #line 7643 "configure"
7643 #include "confdefs.h"
7644 /* pthread test headers */
7645 #include <pthread.h>
7646 #ifndef NULL
7647 #define NULL (void*)0
7648 #endif
7649
7650 static void *task(p)
7651         void *p;
7652 {
7653         return (void *) (p == NULL);
7654 }
7655
7656
7657 int main(argc, argv)
7658         int argc;
7659         char **argv;
7660 {
7661
7662         /* pthread test function */
7663         pthread_t t;
7664         int status;
7665
7666         /* make sure pthread_create() isn't just a stub */
7667 #if HAVE_PTHREADS_D4
7668         status = pthread_create(&t, pthread_attr_default, task, NULL);
7669 #else
7670         status = pthread_create(&t, NULL, task, NULL);
7671 #endif
7672
7673         if( status ) exit( status );
7674
7675         /* make sure pthread_detach() isn't just a stub */
7676 #if HAVE_PTHREADS_D4
7677         status = pthread_detach( &t );
7678 #else
7679         status = pthread_detach( t );
7680 #endif
7681
7682 #ifdef HAVE_LINUX_THREADS
7683         pthread_kill_other_threads_np();
7684 #endif
7685
7686         exit( status );
7687
7688 }
7689
7690 EOF
7691 if { (eval echo configure:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7692 then
7693   ol_cv_pthread_pthread=yes
7694 else
7695   echo "configure: failed program was:" >&5
7696   cat conftest.$ac_ext >&5
7697   rm -fr conftest*
7698   ol_cv_pthread_pthread=no
7699 fi
7700 rm -fr conftest*
7701 fi
7702
7703
7704                 # restore the LIBS
7705                 LIBS="$ol_LIBS"
7706         
7707 fi
7708
7709 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7710
7711         if test $ol_cv_pthread_pthread = yes ; then
7712                 ol_link_pthreads="-pthread"
7713                 ol_link_threads=posix
7714         fi
7715 fi
7716
7717                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7718 if test "$ol_link_threads" = no ; then
7719         # try -pthreads
7720         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7721 echo "configure:7722: checking for pthread link with -pthreads" >&5
7722 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7723   echo $ac_n "(cached) $ac_c" 1>&6
7724 else
7725   
7726                 # save the flags
7727                 ol_LIBS="$LIBS"
7728                 LIBS="-pthreads $LIBS"
7729
7730                 if test "$cross_compiling" = yes; then
7731   cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 /* pthread test headers */
7735 #include <pthread.h>
7736 #ifndef NULL
7737 #define NULL (void*)0
7738 #endif
7739
7740 static void *task(p)
7741         void *p;
7742 {
7743         return (void *) (p == NULL);
7744 }
7745
7746 int main() {
7747
7748         /* pthread test function */
7749         pthread_t t;
7750         int status;
7751
7752         /* make sure pthread_create() isn't just a stub */
7753 #if HAVE_PTHREADS_D4
7754         status = pthread_create(&t, pthread_attr_default, task, NULL);
7755 #else
7756         status = pthread_create(&t, NULL, task, NULL);
7757 #endif
7758
7759         if( status ) exit( status );
7760
7761         /* make sure pthread_detach() isn't just a stub */
7762 #if HAVE_PTHREADS_D4
7763         status = pthread_detach( &t );
7764 #else
7765         status = pthread_detach( t );
7766 #endif
7767
7768 #ifdef HAVE_LINUX_THREADS
7769         pthread_kill_other_threads_np();
7770 #endif
7771
7772         exit( status );
7773
7774 ; return 0; }
7775 EOF
7776 if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7777   rm -rf conftest*
7778   ol_cv_pthread_pthreads=yes
7779 else
7780   echo "configure: failed program was:" >&5
7781   cat conftest.$ac_ext >&5
7782   rm -rf conftest*
7783   ol_cv_pthread_pthreads=no
7784 fi
7785 rm -f conftest*
7786 else
7787   cat > conftest.$ac_ext <<EOF
7788 #line 7789 "configure"
7789 #include "confdefs.h"
7790 /* pthread test headers */
7791 #include <pthread.h>
7792 #ifndef NULL
7793 #define NULL (void*)0
7794 #endif
7795
7796 static void *task(p)
7797         void *p;
7798 {
7799         return (void *) (p == NULL);
7800 }
7801
7802
7803 int main(argc, argv)
7804         int argc;
7805         char **argv;
7806 {
7807
7808         /* pthread test function */
7809         pthread_t t;
7810         int status;
7811
7812         /* make sure pthread_create() isn't just a stub */
7813 #if HAVE_PTHREADS_D4
7814         status = pthread_create(&t, pthread_attr_default, task, NULL);
7815 #else
7816         status = pthread_create(&t, NULL, task, NULL);
7817 #endif
7818
7819         if( status ) exit( status );
7820
7821         /* make sure pthread_detach() isn't just a stub */
7822 #if HAVE_PTHREADS_D4
7823         status = pthread_detach( &t );
7824 #else
7825         status = pthread_detach( t );
7826 #endif
7827
7828 #ifdef HAVE_LINUX_THREADS
7829         pthread_kill_other_threads_np();
7830 #endif
7831
7832         exit( status );
7833
7834 }
7835
7836 EOF
7837 if { (eval echo configure:7838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7838 then
7839   ol_cv_pthread_pthreads=yes
7840 else
7841   echo "configure: failed program was:" >&5
7842   cat conftest.$ac_ext >&5
7843   rm -fr conftest*
7844   ol_cv_pthread_pthreads=no
7845 fi
7846 rm -fr conftest*
7847 fi
7848
7849
7850                 # restore the LIBS
7851                 LIBS="$ol_LIBS"
7852         
7853 fi
7854
7855 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7856
7857         if test $ol_cv_pthread_pthreads = yes ; then
7858                 ol_link_pthreads="-pthreads"
7859                 ol_link_threads=posix
7860         fi
7861 fi
7862
7863                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7864 if test "$ol_link_threads" = no ; then
7865         # try -mthreads
7866         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7867 echo "configure:7868: checking for pthread link with -mthreads" >&5
7868 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7869   echo $ac_n "(cached) $ac_c" 1>&6
7870 else
7871   
7872                 # save the flags
7873                 ol_LIBS="$LIBS"
7874                 LIBS="-mthreads $LIBS"
7875
7876                 if test "$cross_compiling" = yes; then
7877   cat > conftest.$ac_ext <<EOF
7878 #line 7879 "configure"
7879 #include "confdefs.h"
7880 /* pthread test headers */
7881 #include <pthread.h>
7882 #ifndef NULL
7883 #define NULL (void*)0
7884 #endif
7885
7886 static void *task(p)
7887         void *p;
7888 {
7889         return (void *) (p == NULL);
7890 }
7891
7892 int main() {
7893
7894         /* pthread test function */
7895         pthread_t t;
7896         int status;
7897
7898         /* make sure pthread_create() isn't just a stub */
7899 #if HAVE_PTHREADS_D4
7900         status = pthread_create(&t, pthread_attr_default, task, NULL);
7901 #else
7902         status = pthread_create(&t, NULL, task, NULL);
7903 #endif
7904
7905         if( status ) exit( status );
7906
7907         /* make sure pthread_detach() isn't just a stub */
7908 #if HAVE_PTHREADS_D4
7909         status = pthread_detach( &t );
7910 #else
7911         status = pthread_detach( t );
7912 #endif
7913
7914 #ifdef HAVE_LINUX_THREADS
7915         pthread_kill_other_threads_np();
7916 #endif
7917
7918         exit( status );
7919
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7923   rm -rf conftest*
7924   ol_cv_pthread_mthreads=yes
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   ol_cv_pthread_mthreads=no
7930 fi
7931 rm -f conftest*
7932 else
7933   cat > conftest.$ac_ext <<EOF
7934 #line 7935 "configure"
7935 #include "confdefs.h"
7936 /* pthread test headers */
7937 #include <pthread.h>
7938 #ifndef NULL
7939 #define NULL (void*)0
7940 #endif
7941
7942 static void *task(p)
7943         void *p;
7944 {
7945         return (void *) (p == NULL);
7946 }
7947
7948
7949 int main(argc, argv)
7950         int argc;
7951         char **argv;
7952 {
7953
7954         /* pthread test function */
7955         pthread_t t;
7956         int status;
7957
7958         /* make sure pthread_create() isn't just a stub */
7959 #if HAVE_PTHREADS_D4
7960         status = pthread_create(&t, pthread_attr_default, task, NULL);
7961 #else
7962         status = pthread_create(&t, NULL, task, NULL);
7963 #endif
7964
7965         if( status ) exit( status );
7966
7967         /* make sure pthread_detach() isn't just a stub */
7968 #if HAVE_PTHREADS_D4
7969         status = pthread_detach( &t );
7970 #else
7971         status = pthread_detach( t );
7972 #endif
7973
7974 #ifdef HAVE_LINUX_THREADS
7975         pthread_kill_other_threads_np();
7976 #endif
7977
7978         exit( status );
7979
7980 }
7981
7982 EOF
7983 if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7984 then
7985   ol_cv_pthread_mthreads=yes
7986 else
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -fr conftest*
7990   ol_cv_pthread_mthreads=no
7991 fi
7992 rm -fr conftest*
7993 fi
7994
7995
7996                 # restore the LIBS
7997                 LIBS="$ol_LIBS"
7998         
7999 fi
8000
8001 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8002
8003         if test $ol_cv_pthread_mthreads = yes ; then
8004                 ol_link_pthreads="-mthreads"
8005                 ol_link_threads=posix
8006         fi
8007 fi
8008
8009                 # Pthread try link: -thread (ol_cv_pthread_thread)
8010 if test "$ol_link_threads" = no ; then
8011         # try -thread
8012         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8013 echo "configure:8014: checking for pthread link with -thread" >&5
8014 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8015   echo $ac_n "(cached) $ac_c" 1>&6
8016 else
8017   
8018                 # save the flags
8019                 ol_LIBS="$LIBS"
8020                 LIBS="-thread $LIBS"
8021
8022                 if test "$cross_compiling" = yes; then
8023   cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 /* pthread test headers */
8027 #include <pthread.h>
8028 #ifndef NULL
8029 #define NULL (void*)0
8030 #endif
8031
8032 static void *task(p)
8033         void *p;
8034 {
8035         return (void *) (p == NULL);
8036 }
8037
8038 int main() {
8039
8040         /* pthread test function */
8041         pthread_t t;
8042         int status;
8043
8044         /* make sure pthread_create() isn't just a stub */
8045 #if HAVE_PTHREADS_D4
8046         status = pthread_create(&t, pthread_attr_default, task, NULL);
8047 #else
8048         status = pthread_create(&t, NULL, task, NULL);
8049 #endif
8050
8051         if( status ) exit( status );
8052
8053         /* make sure pthread_detach() isn't just a stub */
8054 #if HAVE_PTHREADS_D4
8055         status = pthread_detach( &t );
8056 #else
8057         status = pthread_detach( t );
8058 #endif
8059
8060 #ifdef HAVE_LINUX_THREADS
8061         pthread_kill_other_threads_np();
8062 #endif
8063
8064         exit( status );
8065
8066 ; return 0; }
8067 EOF
8068 if { (eval echo configure:8069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8069   rm -rf conftest*
8070   ol_cv_pthread_thread=yes
8071 else
8072   echo "configure: failed program was:" >&5
8073   cat conftest.$ac_ext >&5
8074   rm -rf conftest*
8075   ol_cv_pthread_thread=no
8076 fi
8077 rm -f conftest*
8078 else
8079   cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 /* pthread test headers */
8083 #include <pthread.h>
8084 #ifndef NULL
8085 #define NULL (void*)0
8086 #endif
8087
8088 static void *task(p)
8089         void *p;
8090 {
8091         return (void *) (p == NULL);
8092 }
8093
8094
8095 int main(argc, argv)
8096         int argc;
8097         char **argv;
8098 {
8099
8100         /* pthread test function */
8101         pthread_t t;
8102         int status;
8103
8104         /* make sure pthread_create() isn't just a stub */
8105 #if HAVE_PTHREADS_D4
8106         status = pthread_create(&t, pthread_attr_default, task, NULL);
8107 #else
8108         status = pthread_create(&t, NULL, task, NULL);
8109 #endif
8110
8111         if( status ) exit( status );
8112
8113         /* make sure pthread_detach() isn't just a stub */
8114 #if HAVE_PTHREADS_D4
8115         status = pthread_detach( &t );
8116 #else
8117         status = pthread_detach( t );
8118 #endif
8119
8120 #ifdef HAVE_LINUX_THREADS
8121         pthread_kill_other_threads_np();
8122 #endif
8123
8124         exit( status );
8125
8126 }
8127
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8130 then
8131   ol_cv_pthread_thread=yes
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -fr conftest*
8136   ol_cv_pthread_thread=no
8137 fi
8138 rm -fr conftest*
8139 fi
8140
8141
8142                 # restore the LIBS
8143                 LIBS="$ol_LIBS"
8144         
8145 fi
8146
8147 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8148
8149         if test $ol_cv_pthread_thread = yes ; then
8150                 ol_link_pthreads="-thread"
8151                 ol_link_threads=posix
8152         fi
8153 fi
8154
8155
8156                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8157 if test "$ol_link_threads" = no ; then
8158         # try -lpthread -lmach -lexc -lc_r
8159         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8160 echo "configure:8161: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8161 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8162   echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164   
8165                 # save the flags
8166                 ol_LIBS="$LIBS"
8167                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8168
8169                 if test "$cross_compiling" = yes; then
8170   cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* pthread test headers */
8174 #include <pthread.h>
8175 #ifndef NULL
8176 #define NULL (void*)0
8177 #endif
8178
8179 static void *task(p)
8180         void *p;
8181 {
8182         return (void *) (p == NULL);
8183 }
8184
8185 int main() {
8186
8187         /* pthread test function */
8188         pthread_t t;
8189         int status;
8190
8191         /* make sure pthread_create() isn't just a stub */
8192 #if HAVE_PTHREADS_D4
8193         status = pthread_create(&t, pthread_attr_default, task, NULL);
8194 #else
8195         status = pthread_create(&t, NULL, task, NULL);
8196 #endif
8197
8198         if( status ) exit( status );
8199
8200         /* make sure pthread_detach() isn't just a stub */
8201 #if HAVE_PTHREADS_D4
8202         status = pthread_detach( &t );
8203 #else
8204         status = pthread_detach( t );
8205 #endif
8206
8207 #ifdef HAVE_LINUX_THREADS
8208         pthread_kill_other_threads_np();
8209 #endif
8210
8211         exit( status );
8212
8213 ; return 0; }
8214 EOF
8215 if { (eval echo configure:8216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8216   rm -rf conftest*
8217   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8218 else
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8223 fi
8224 rm -f conftest*
8225 else
8226   cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* pthread test headers */
8230 #include <pthread.h>
8231 #ifndef NULL
8232 #define NULL (void*)0
8233 #endif
8234
8235 static void *task(p)
8236         void *p;
8237 {
8238         return (void *) (p == NULL);
8239 }
8240
8241
8242 int main(argc, argv)
8243         int argc;
8244         char **argv;
8245 {
8246
8247         /* pthread test function */
8248         pthread_t t;
8249         int status;
8250
8251         /* make sure pthread_create() isn't just a stub */
8252 #if HAVE_PTHREADS_D4
8253         status = pthread_create(&t, pthread_attr_default, task, NULL);
8254 #else
8255         status = pthread_create(&t, NULL, task, NULL);
8256 #endif
8257
8258         if( status ) exit( status );
8259
8260         /* make sure pthread_detach() isn't just a stub */
8261 #if HAVE_PTHREADS_D4
8262         status = pthread_detach( &t );
8263 #else
8264         status = pthread_detach( t );
8265 #endif
8266
8267 #ifdef HAVE_LINUX_THREADS
8268         pthread_kill_other_threads_np();
8269 #endif
8270
8271         exit( status );
8272
8273 }
8274
8275 EOF
8276 if { (eval echo configure:8277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8277 then
8278   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8279 else
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282   rm -fr conftest*
8283   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8284 fi
8285 rm -fr conftest*
8286 fi
8287
8288
8289                 # restore the LIBS
8290                 LIBS="$ol_LIBS"
8291         
8292 fi
8293
8294 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8295
8296         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8297                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8298                 ol_link_threads=posix
8299         fi
8300 fi
8301
8302                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8303 if test "$ol_link_threads" = no ; then
8304         # try -lpthread -lmach -lexc
8305         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8306 echo "configure:8307: checking for pthread link with -lpthread -lmach -lexc" >&5
8307 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8308   echo $ac_n "(cached) $ac_c" 1>&6
8309 else
8310   
8311                 # save the flags
8312                 ol_LIBS="$LIBS"
8313                 LIBS="-lpthread -lmach -lexc $LIBS"
8314
8315                 if test "$cross_compiling" = yes; then
8316   cat > conftest.$ac_ext <<EOF
8317 #line 8318 "configure"
8318 #include "confdefs.h"
8319 /* pthread test headers */
8320 #include <pthread.h>
8321 #ifndef NULL
8322 #define NULL (void*)0
8323 #endif
8324
8325 static void *task(p)
8326         void *p;
8327 {
8328         return (void *) (p == NULL);
8329 }
8330
8331 int main() {
8332
8333         /* pthread test function */
8334         pthread_t t;
8335         int status;
8336
8337         /* make sure pthread_create() isn't just a stub */
8338 #if HAVE_PTHREADS_D4
8339         status = pthread_create(&t, pthread_attr_default, task, NULL);
8340 #else
8341         status = pthread_create(&t, NULL, task, NULL);
8342 #endif
8343
8344         if( status ) exit( status );
8345
8346         /* make sure pthread_detach() isn't just a stub */
8347 #if HAVE_PTHREADS_D4
8348         status = pthread_detach( &t );
8349 #else
8350         status = pthread_detach( t );
8351 #endif
8352
8353 #ifdef HAVE_LINUX_THREADS
8354         pthread_kill_other_threads_np();
8355 #endif
8356
8357         exit( status );
8358
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8362   rm -rf conftest*
8363   ol_cv_pthread_lpthread_lmach_lexc=yes
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   ol_cv_pthread_lpthread_lmach_lexc=no
8369 fi
8370 rm -f conftest*
8371 else
8372   cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 /* pthread test headers */
8376 #include <pthread.h>
8377 #ifndef NULL
8378 #define NULL (void*)0
8379 #endif
8380
8381 static void *task(p)
8382         void *p;
8383 {
8384         return (void *) (p == NULL);
8385 }
8386
8387
8388 int main(argc, argv)
8389         int argc;
8390         char **argv;
8391 {
8392
8393         /* pthread test function */
8394         pthread_t t;
8395         int status;
8396
8397         /* make sure pthread_create() isn't just a stub */
8398 #if HAVE_PTHREADS_D4
8399         status = pthread_create(&t, pthread_attr_default, task, NULL);
8400 #else
8401         status = pthread_create(&t, NULL, task, NULL);
8402 #endif
8403
8404         if( status ) exit( status );
8405
8406         /* make sure pthread_detach() isn't just a stub */
8407 #if HAVE_PTHREADS_D4
8408         status = pthread_detach( &t );
8409 #else
8410         status = pthread_detach( t );
8411 #endif
8412
8413 #ifdef HAVE_LINUX_THREADS
8414         pthread_kill_other_threads_np();
8415 #endif
8416
8417         exit( status );
8418
8419 }
8420
8421 EOF
8422 if { (eval echo configure:8423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8423 then
8424   ol_cv_pthread_lpthread_lmach_lexc=yes
8425 else
8426   echo "configure: failed program was:" >&5
8427   cat conftest.$ac_ext >&5
8428   rm -fr conftest*
8429   ol_cv_pthread_lpthread_lmach_lexc=no
8430 fi
8431 rm -fr conftest*
8432 fi
8433
8434
8435                 # restore the LIBS
8436                 LIBS="$ol_LIBS"
8437         
8438 fi
8439
8440 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8441
8442         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8443                 ol_link_pthreads="-lpthread -lmach -lexc"
8444                 ol_link_threads=posix
8445         fi
8446 fi
8447
8448
8449                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8450 if test "$ol_link_threads" = no ; then
8451         # try -lpthread -Wl,-woff,85
8452         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8453 echo "configure:8454: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8454 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8455   echo $ac_n "(cached) $ac_c" 1>&6
8456 else
8457   
8458                 # save the flags
8459                 ol_LIBS="$LIBS"
8460                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8461
8462                 if test "$cross_compiling" = yes; then
8463   cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466 /* pthread test headers */
8467 #include <pthread.h>
8468 #ifndef NULL
8469 #define NULL (void*)0
8470 #endif
8471
8472 static void *task(p)
8473         void *p;
8474 {
8475         return (void *) (p == NULL);
8476 }
8477
8478 int main() {
8479
8480         /* pthread test function */
8481         pthread_t t;
8482         int status;
8483
8484         /* make sure pthread_create() isn't just a stub */
8485 #if HAVE_PTHREADS_D4
8486         status = pthread_create(&t, pthread_attr_default, task, NULL);
8487 #else
8488         status = pthread_create(&t, NULL, task, NULL);
8489 #endif
8490
8491         if( status ) exit( status );
8492
8493         /* make sure pthread_detach() isn't just a stub */
8494 #if HAVE_PTHREADS_D4
8495         status = pthread_detach( &t );
8496 #else
8497         status = pthread_detach( t );
8498 #endif
8499
8500 #ifdef HAVE_LINUX_THREADS
8501         pthread_kill_other_threads_np();
8502 #endif
8503
8504         exit( status );
8505
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   ol_cv_pthread_lib_lpthread_woff=yes
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   ol_cv_pthread_lib_lpthread_woff=no
8516 fi
8517 rm -f conftest*
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* pthread test headers */
8523 #include <pthread.h>
8524 #ifndef NULL
8525 #define NULL (void*)0
8526 #endif
8527
8528 static void *task(p)
8529         void *p;
8530 {
8531         return (void *) (p == NULL);
8532 }
8533
8534
8535 int main(argc, argv)
8536         int argc;
8537         char **argv;
8538 {
8539
8540         /* pthread test function */
8541         pthread_t t;
8542         int status;
8543
8544         /* make sure pthread_create() isn't just a stub */
8545 #if HAVE_PTHREADS_D4
8546         status = pthread_create(&t, pthread_attr_default, task, NULL);
8547 #else
8548         status = pthread_create(&t, NULL, task, NULL);
8549 #endif
8550
8551         if( status ) exit( status );
8552
8553         /* make sure pthread_detach() isn't just a stub */
8554 #if HAVE_PTHREADS_D4
8555         status = pthread_detach( &t );
8556 #else
8557         status = pthread_detach( t );
8558 #endif
8559
8560 #ifdef HAVE_LINUX_THREADS
8561         pthread_kill_other_threads_np();
8562 #endif
8563
8564         exit( status );
8565
8566 }
8567
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8570 then
8571   ol_cv_pthread_lib_lpthread_woff=yes
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -fr conftest*
8576   ol_cv_pthread_lib_lpthread_woff=no
8577 fi
8578 rm -fr conftest*
8579 fi
8580
8581
8582                 # restore the LIBS
8583                 LIBS="$ol_LIBS"
8584         
8585 fi
8586
8587 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8588
8589         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8590                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8591                 ol_link_threads=posix
8592         fi
8593 fi
8594
8595
8596                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8597 if test "$ol_link_threads" = no ; then
8598         # try -lpthread
8599         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8600 echo "configure:8601: checking for pthread link with -lpthread" >&5
8601 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8602   echo $ac_n "(cached) $ac_c" 1>&6
8603 else
8604   
8605                 # save the flags
8606                 ol_LIBS="$LIBS"
8607                 LIBS="-lpthread $LIBS"
8608
8609                 if test "$cross_compiling" = yes; then
8610   cat > conftest.$ac_ext <<EOF
8611 #line 8612 "configure"
8612 #include "confdefs.h"
8613 /* pthread test headers */
8614 #include <pthread.h>
8615 #ifndef NULL
8616 #define NULL (void*)0
8617 #endif
8618
8619 static void *task(p)
8620         void *p;
8621 {
8622         return (void *) (p == NULL);
8623 }
8624
8625 int main() {
8626
8627         /* pthread test function */
8628         pthread_t t;
8629         int status;
8630
8631         /* make sure pthread_create() isn't just a stub */
8632 #if HAVE_PTHREADS_D4
8633         status = pthread_create(&t, pthread_attr_default, task, NULL);
8634 #else
8635         status = pthread_create(&t, NULL, task, NULL);
8636 #endif
8637
8638         if( status ) exit( status );
8639
8640         /* make sure pthread_detach() isn't just a stub */
8641 #if HAVE_PTHREADS_D4
8642         status = pthread_detach( &t );
8643 #else
8644         status = pthread_detach( t );
8645 #endif
8646
8647 #ifdef HAVE_LINUX_THREADS
8648         pthread_kill_other_threads_np();
8649 #endif
8650
8651         exit( status );
8652
8653 ; return 0; }
8654 EOF
8655 if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8656   rm -rf conftest*
8657   ol_cv_pthread_lpthread=yes
8658 else
8659   echo "configure: failed program was:" >&5
8660   cat conftest.$ac_ext >&5
8661   rm -rf conftest*
8662   ol_cv_pthread_lpthread=no
8663 fi
8664 rm -f conftest*
8665 else
8666   cat > conftest.$ac_ext <<EOF
8667 #line 8668 "configure"
8668 #include "confdefs.h"
8669 /* pthread test headers */
8670 #include <pthread.h>
8671 #ifndef NULL
8672 #define NULL (void*)0
8673 #endif
8674
8675 static void *task(p)
8676         void *p;
8677 {
8678         return (void *) (p == NULL);
8679 }
8680
8681
8682 int main(argc, argv)
8683         int argc;
8684         char **argv;
8685 {
8686
8687         /* pthread test function */
8688         pthread_t t;
8689         int status;
8690
8691         /* make sure pthread_create() isn't just a stub */
8692 #if HAVE_PTHREADS_D4
8693         status = pthread_create(&t, pthread_attr_default, task, NULL);
8694 #else
8695         status = pthread_create(&t, NULL, task, NULL);
8696 #endif
8697
8698         if( status ) exit( status );
8699
8700         /* make sure pthread_detach() isn't just a stub */
8701 #if HAVE_PTHREADS_D4
8702         status = pthread_detach( &t );
8703 #else
8704         status = pthread_detach( t );
8705 #endif
8706
8707 #ifdef HAVE_LINUX_THREADS
8708         pthread_kill_other_threads_np();
8709 #endif
8710
8711         exit( status );
8712
8713 }
8714
8715 EOF
8716 if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8717 then
8718   ol_cv_pthread_lpthread=yes
8719 else
8720   echo "configure: failed program was:" >&5
8721   cat conftest.$ac_ext >&5
8722   rm -fr conftest*
8723   ol_cv_pthread_lpthread=no
8724 fi
8725 rm -fr conftest*
8726 fi
8727
8728
8729                 # restore the LIBS
8730                 LIBS="$ol_LIBS"
8731         
8732 fi
8733
8734 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8735
8736         if test $ol_cv_pthread_lpthread = yes ; then
8737                 ol_link_pthreads="-lpthread"
8738                 ol_link_threads=posix
8739         fi
8740 fi
8741
8742                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8743 if test "$ol_link_threads" = no ; then
8744         # try -lc_r
8745         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8746 echo "configure:8747: checking for pthread link with -lc_r" >&5
8747 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8748   echo $ac_n "(cached) $ac_c" 1>&6
8749 else
8750   
8751                 # save the flags
8752                 ol_LIBS="$LIBS"
8753                 LIBS="-lc_r $LIBS"
8754
8755                 if test "$cross_compiling" = yes; then
8756   cat > conftest.$ac_ext <<EOF
8757 #line 8758 "configure"
8758 #include "confdefs.h"
8759 /* pthread test headers */
8760 #include <pthread.h>
8761 #ifndef NULL
8762 #define NULL (void*)0
8763 #endif
8764
8765 static void *task(p)
8766         void *p;
8767 {
8768         return (void *) (p == NULL);
8769 }
8770
8771 int main() {
8772
8773         /* pthread test function */
8774         pthread_t t;
8775         int status;
8776
8777         /* make sure pthread_create() isn't just a stub */
8778 #if HAVE_PTHREADS_D4
8779         status = pthread_create(&t, pthread_attr_default, task, NULL);
8780 #else
8781         status = pthread_create(&t, NULL, task, NULL);
8782 #endif
8783
8784         if( status ) exit( status );
8785
8786         /* make sure pthread_detach() isn't just a stub */
8787 #if HAVE_PTHREADS_D4
8788         status = pthread_detach( &t );
8789 #else
8790         status = pthread_detach( t );
8791 #endif
8792
8793 #ifdef HAVE_LINUX_THREADS
8794         pthread_kill_other_threads_np();
8795 #endif
8796
8797         exit( status );
8798
8799 ; return 0; }
8800 EOF
8801 if { (eval echo configure:8802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8802   rm -rf conftest*
8803   ol_cv_pthread_lc_r=yes
8804 else
8805   echo "configure: failed program was:" >&5
8806   cat conftest.$ac_ext >&5
8807   rm -rf conftest*
8808   ol_cv_pthread_lc_r=no
8809 fi
8810 rm -f conftest*
8811 else
8812   cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 /* pthread test headers */
8816 #include <pthread.h>
8817 #ifndef NULL
8818 #define NULL (void*)0
8819 #endif
8820
8821 static void *task(p)
8822         void *p;
8823 {
8824         return (void *) (p == NULL);
8825 }
8826
8827
8828 int main(argc, argv)
8829         int argc;
8830         char **argv;
8831 {
8832
8833         /* pthread test function */
8834         pthread_t t;
8835         int status;
8836
8837         /* make sure pthread_create() isn't just a stub */
8838 #if HAVE_PTHREADS_D4
8839         status = pthread_create(&t, pthread_attr_default, task, NULL);
8840 #else
8841         status = pthread_create(&t, NULL, task, NULL);
8842 #endif
8843
8844         if( status ) exit( status );
8845
8846         /* make sure pthread_detach() isn't just a stub */
8847 #if HAVE_PTHREADS_D4
8848         status = pthread_detach( &t );
8849 #else
8850         status = pthread_detach( t );
8851 #endif
8852
8853 #ifdef HAVE_LINUX_THREADS
8854         pthread_kill_other_threads_np();
8855 #endif
8856
8857         exit( status );
8858
8859 }
8860
8861 EOF
8862 if { (eval echo configure:8863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8863 then
8864   ol_cv_pthread_lc_r=yes
8865 else
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -fr conftest*
8869   ol_cv_pthread_lc_r=no
8870 fi
8871 rm -fr conftest*
8872 fi
8873
8874
8875                 # restore the LIBS
8876                 LIBS="$ol_LIBS"
8877         
8878 fi
8879
8880 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8881
8882         if test $ol_cv_pthread_lc_r = yes ; then
8883                 ol_link_pthreads="-lc_r"
8884                 ol_link_threads=posix
8885         fi
8886 fi
8887
8888
8889                 # Pthread try link: -threads (ol_cv_pthread_threads)
8890 if test "$ol_link_threads" = no ; then
8891         # try -threads
8892         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8893 echo "configure:8894: checking for pthread link with -threads" >&5
8894 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8895   echo $ac_n "(cached) $ac_c" 1>&6
8896 else
8897   
8898                 # save the flags
8899                 ol_LIBS="$LIBS"
8900                 LIBS="-threads $LIBS"
8901
8902                 if test "$cross_compiling" = yes; then
8903   cat > conftest.$ac_ext <<EOF
8904 #line 8905 "configure"
8905 #include "confdefs.h"
8906 /* pthread test headers */
8907 #include <pthread.h>
8908 #ifndef NULL
8909 #define NULL (void*)0
8910 #endif
8911
8912 static void *task(p)
8913         void *p;
8914 {
8915         return (void *) (p == NULL);
8916 }
8917
8918 int main() {
8919
8920         /* pthread test function */
8921         pthread_t t;
8922         int status;
8923
8924         /* make sure pthread_create() isn't just a stub */
8925 #if HAVE_PTHREADS_D4
8926         status = pthread_create(&t, pthread_attr_default, task, NULL);
8927 #else
8928         status = pthread_create(&t, NULL, task, NULL);
8929 #endif
8930
8931         if( status ) exit( status );
8932
8933         /* make sure pthread_detach() isn't just a stub */
8934 #if HAVE_PTHREADS_D4
8935         status = pthread_detach( &t );
8936 #else
8937         status = pthread_detach( t );
8938 #endif
8939
8940 #ifdef HAVE_LINUX_THREADS
8941         pthread_kill_other_threads_np();
8942 #endif
8943
8944         exit( status );
8945
8946 ; return 0; }
8947 EOF
8948 if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8949   rm -rf conftest*
8950   ol_cv_pthread_threads=yes
8951 else
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -rf conftest*
8955   ol_cv_pthread_threads=no
8956 fi
8957 rm -f conftest*
8958 else
8959   cat > conftest.$ac_ext <<EOF
8960 #line 8961 "configure"
8961 #include "confdefs.h"
8962 /* pthread test headers */
8963 #include <pthread.h>
8964 #ifndef NULL
8965 #define NULL (void*)0
8966 #endif
8967
8968 static void *task(p)
8969         void *p;
8970 {
8971         return (void *) (p == NULL);
8972 }
8973
8974
8975 int main(argc, argv)
8976         int argc;
8977         char **argv;
8978 {
8979
8980         /* pthread test function */
8981         pthread_t t;
8982         int status;
8983
8984         /* make sure pthread_create() isn't just a stub */
8985 #if HAVE_PTHREADS_D4
8986         status = pthread_create(&t, pthread_attr_default, task, NULL);
8987 #else
8988         status = pthread_create(&t, NULL, task, NULL);
8989 #endif
8990
8991         if( status ) exit( status );
8992
8993         /* make sure pthread_detach() isn't just a stub */
8994 #if HAVE_PTHREADS_D4
8995         status = pthread_detach( &t );
8996 #else
8997         status = pthread_detach( t );
8998 #endif
8999
9000 #ifdef HAVE_LINUX_THREADS
9001         pthread_kill_other_threads_np();
9002 #endif
9003
9004         exit( status );
9005
9006 }
9007
9008 EOF
9009 if { (eval echo configure:9010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9010 then
9011   ol_cv_pthread_threads=yes
9012 else
9013   echo "configure: failed program was:" >&5
9014   cat conftest.$ac_ext >&5
9015   rm -fr conftest*
9016   ol_cv_pthread_threads=no
9017 fi
9018 rm -fr conftest*
9019 fi
9020
9021
9022                 # restore the LIBS
9023                 LIBS="$ol_LIBS"
9024         
9025 fi
9026
9027 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9028
9029         if test $ol_cv_pthread_threads = yes ; then
9030                 ol_link_pthreads="-threads"
9031                 ol_link_threads=posix
9032         fi
9033 fi
9034
9035
9036                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9037 if test "$ol_link_threads" = no ; then
9038         # try -lpthreads -lmach -lexc -lc_r
9039         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9040 echo "configure:9041: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9041 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   
9045                 # save the flags
9046                 ol_LIBS="$LIBS"
9047                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9048
9049                 if test "$cross_compiling" = yes; then
9050   cat > conftest.$ac_ext <<EOF
9051 #line 9052 "configure"
9052 #include "confdefs.h"
9053 /* pthread test headers */
9054 #include <pthread.h>
9055 #ifndef NULL
9056 #define NULL (void*)0
9057 #endif
9058
9059 static void *task(p)
9060         void *p;
9061 {
9062         return (void *) (p == NULL);
9063 }
9064
9065 int main() {
9066
9067         /* pthread test function */
9068         pthread_t t;
9069         int status;
9070
9071         /* make sure pthread_create() isn't just a stub */
9072 #if HAVE_PTHREADS_D4
9073         status = pthread_create(&t, pthread_attr_default, task, NULL);
9074 #else
9075         status = pthread_create(&t, NULL, task, NULL);
9076 #endif
9077
9078         if( status ) exit( status );
9079
9080         /* make sure pthread_detach() isn't just a stub */
9081 #if HAVE_PTHREADS_D4
9082         status = pthread_detach( &t );
9083 #else
9084         status = pthread_detach( t );
9085 #endif
9086
9087 #ifdef HAVE_LINUX_THREADS
9088         pthread_kill_other_threads_np();
9089 #endif
9090
9091         exit( status );
9092
9093 ; return 0; }
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9096   rm -rf conftest*
9097   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -rf conftest*
9102   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9103 fi
9104 rm -f conftest*
9105 else
9106   cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 /* pthread test headers */
9110 #include <pthread.h>
9111 #ifndef NULL
9112 #define NULL (void*)0
9113 #endif
9114
9115 static void *task(p)
9116         void *p;
9117 {
9118         return (void *) (p == NULL);
9119 }
9120
9121
9122 int main(argc, argv)
9123         int argc;
9124         char **argv;
9125 {
9126
9127         /* pthread test function */
9128         pthread_t t;
9129         int status;
9130
9131         /* make sure pthread_create() isn't just a stub */
9132 #if HAVE_PTHREADS_D4
9133         status = pthread_create(&t, pthread_attr_default, task, NULL);
9134 #else
9135         status = pthread_create(&t, NULL, task, NULL);
9136 #endif
9137
9138         if( status ) exit( status );
9139
9140         /* make sure pthread_detach() isn't just a stub */
9141 #if HAVE_PTHREADS_D4
9142         status = pthread_detach( &t );
9143 #else
9144         status = pthread_detach( t );
9145 #endif
9146
9147 #ifdef HAVE_LINUX_THREADS
9148         pthread_kill_other_threads_np();
9149 #endif
9150
9151         exit( status );
9152
9153 }
9154
9155 EOF
9156 if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9157 then
9158   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9159 else
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -fr conftest*
9163   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9164 fi
9165 rm -fr conftest*
9166 fi
9167
9168
9169                 # restore the LIBS
9170                 LIBS="$ol_LIBS"
9171         
9172 fi
9173
9174 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9175
9176         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9177                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9178                 ol_link_threads=posix
9179         fi
9180 fi
9181
9182                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9183 if test "$ol_link_threads" = no ; then
9184         # try -lpthreads -lmach -lexc
9185         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9186 echo "configure:9187: checking for pthread link with -lpthreads -lmach -lexc" >&5
9187 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   
9191                 # save the flags
9192                 ol_LIBS="$LIBS"
9193                 LIBS="-lpthreads -lmach -lexc $LIBS"
9194
9195                 if test "$cross_compiling" = yes; then
9196   cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199 /* pthread test headers */
9200 #include <pthread.h>
9201 #ifndef NULL
9202 #define NULL (void*)0
9203 #endif
9204
9205 static void *task(p)
9206         void *p;
9207 {
9208         return (void *) (p == NULL);
9209 }
9210
9211 int main() {
9212
9213         /* pthread test function */
9214         pthread_t t;
9215         int status;
9216
9217         /* make sure pthread_create() isn't just a stub */
9218 #if HAVE_PTHREADS_D4
9219         status = pthread_create(&t, pthread_attr_default, task, NULL);
9220 #else
9221         status = pthread_create(&t, NULL, task, NULL);
9222 #endif
9223
9224         if( status ) exit( status );
9225
9226         /* make sure pthread_detach() isn't just a stub */
9227 #if HAVE_PTHREADS_D4
9228         status = pthread_detach( &t );
9229 #else
9230         status = pthread_detach( t );
9231 #endif
9232
9233 #ifdef HAVE_LINUX_THREADS
9234         pthread_kill_other_threads_np();
9235 #endif
9236
9237         exit( status );
9238
9239 ; return 0; }
9240 EOF
9241 if { (eval echo configure:9242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9242   rm -rf conftest*
9243   ol_cv_pthread_lpthreads_lmach_lexc=yes
9244 else
9245   echo "configure: failed program was:" >&5
9246   cat conftest.$ac_ext >&5
9247   rm -rf conftest*
9248   ol_cv_pthread_lpthreads_lmach_lexc=no
9249 fi
9250 rm -f conftest*
9251 else
9252   cat > conftest.$ac_ext <<EOF
9253 #line 9254 "configure"
9254 #include "confdefs.h"
9255 /* pthread test headers */
9256 #include <pthread.h>
9257 #ifndef NULL
9258 #define NULL (void*)0
9259 #endif
9260
9261 static void *task(p)
9262         void *p;
9263 {
9264         return (void *) (p == NULL);
9265 }
9266
9267
9268 int main(argc, argv)
9269         int argc;
9270         char **argv;
9271 {
9272
9273         /* pthread test function */
9274         pthread_t t;
9275         int status;
9276
9277         /* make sure pthread_create() isn't just a stub */
9278 #if HAVE_PTHREADS_D4
9279         status = pthread_create(&t, pthread_attr_default, task, NULL);
9280 #else
9281         status = pthread_create(&t, NULL, task, NULL);
9282 #endif
9283
9284         if( status ) exit( status );
9285
9286         /* make sure pthread_detach() isn't just a stub */
9287 #if HAVE_PTHREADS_D4
9288         status = pthread_detach( &t );
9289 #else
9290         status = pthread_detach( t );
9291 #endif
9292
9293 #ifdef HAVE_LINUX_THREADS
9294         pthread_kill_other_threads_np();
9295 #endif
9296
9297         exit( status );
9298
9299 }
9300
9301 EOF
9302 if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9303 then
9304   ol_cv_pthread_lpthreads_lmach_lexc=yes
9305 else
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -fr conftest*
9309   ol_cv_pthread_lpthreads_lmach_lexc=no
9310 fi
9311 rm -fr conftest*
9312 fi
9313
9314
9315                 # restore the LIBS
9316                 LIBS="$ol_LIBS"
9317         
9318 fi
9319
9320 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9321
9322         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9323                 ol_link_pthreads="-lpthreads -lmach -lexc"
9324                 ol_link_threads=posix
9325         fi
9326 fi
9327
9328                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9329 if test "$ol_link_threads" = no ; then
9330         # try -lpthreads -lexc
9331         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9332 echo "configure:9333: checking for pthread link with -lpthreads -lexc" >&5
9333 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   
9337                 # save the flags
9338                 ol_LIBS="$LIBS"
9339                 LIBS="-lpthreads -lexc $LIBS"
9340
9341                 if test "$cross_compiling" = yes; then
9342   cat > conftest.$ac_ext <<EOF
9343 #line 9344 "configure"
9344 #include "confdefs.h"
9345 /* pthread test headers */
9346 #include <pthread.h>
9347 #ifndef NULL
9348 #define NULL (void*)0
9349 #endif
9350
9351 static void *task(p)
9352         void *p;
9353 {
9354         return (void *) (p == NULL);
9355 }
9356
9357 int main() {
9358
9359         /* pthread test function */
9360         pthread_t t;
9361         int status;
9362
9363         /* make sure pthread_create() isn't just a stub */
9364 #if HAVE_PTHREADS_D4
9365         status = pthread_create(&t, pthread_attr_default, task, NULL);
9366 #else
9367         status = pthread_create(&t, NULL, task, NULL);
9368 #endif
9369
9370         if( status ) exit( status );
9371
9372         /* make sure pthread_detach() isn't just a stub */
9373 #if HAVE_PTHREADS_D4
9374         status = pthread_detach( &t );
9375 #else
9376         status = pthread_detach( t );
9377 #endif
9378
9379 #ifdef HAVE_LINUX_THREADS
9380         pthread_kill_other_threads_np();
9381 #endif
9382
9383         exit( status );
9384
9385 ; return 0; }
9386 EOF
9387 if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9388   rm -rf conftest*
9389   ol_cv_pthread_lpthreads_lexc=yes
9390 else
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -rf conftest*
9394   ol_cv_pthread_lpthreads_lexc=no
9395 fi
9396 rm -f conftest*
9397 else
9398   cat > conftest.$ac_ext <<EOF
9399 #line 9400 "configure"
9400 #include "confdefs.h"
9401 /* pthread test headers */
9402 #include <pthread.h>
9403 #ifndef NULL
9404 #define NULL (void*)0
9405 #endif
9406
9407 static void *task(p)
9408         void *p;
9409 {
9410         return (void *) (p == NULL);
9411 }
9412
9413
9414 int main(argc, argv)
9415         int argc;
9416         char **argv;
9417 {
9418
9419         /* pthread test function */
9420         pthread_t t;
9421         int status;
9422
9423         /* make sure pthread_create() isn't just a stub */
9424 #if HAVE_PTHREADS_D4
9425         status = pthread_create(&t, pthread_attr_default, task, NULL);
9426 #else
9427         status = pthread_create(&t, NULL, task, NULL);
9428 #endif
9429
9430         if( status ) exit( status );
9431
9432         /* make sure pthread_detach() isn't just a stub */
9433 #if HAVE_PTHREADS_D4
9434         status = pthread_detach( &t );
9435 #else
9436         status = pthread_detach( t );
9437 #endif
9438
9439 #ifdef HAVE_LINUX_THREADS
9440         pthread_kill_other_threads_np();
9441 #endif
9442
9443         exit( status );
9444
9445 }
9446
9447 EOF
9448 if { (eval echo configure:9449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9449 then
9450   ol_cv_pthread_lpthreads_lexc=yes
9451 else
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -fr conftest*
9455   ol_cv_pthread_lpthreads_lexc=no
9456 fi
9457 rm -fr conftest*
9458 fi
9459
9460
9461                 # restore the LIBS
9462                 LIBS="$ol_LIBS"
9463         
9464 fi
9465
9466 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9467
9468         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9469                 ol_link_pthreads="-lpthreads -lexc"
9470                 ol_link_threads=posix
9471         fi
9472 fi
9473
9474
9475                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9476 if test "$ol_link_threads" = no ; then
9477         # try -lpthreads
9478         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9479 echo "configure:9480: checking for pthread link with -lpthreads" >&5
9480 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484                 # save the flags
9485                 ol_LIBS="$LIBS"
9486                 LIBS="-lpthreads $LIBS"
9487
9488                 if test "$cross_compiling" = yes; then
9489   cat > conftest.$ac_ext <<EOF
9490 #line 9491 "configure"
9491 #include "confdefs.h"
9492 /* pthread test headers */
9493 #include <pthread.h>
9494 #ifndef NULL
9495 #define NULL (void*)0
9496 #endif
9497
9498 static void *task(p)
9499         void *p;
9500 {
9501         return (void *) (p == NULL);
9502 }
9503
9504 int main() {
9505
9506         /* pthread test function */
9507         pthread_t t;
9508         int status;
9509
9510         /* make sure pthread_create() isn't just a stub */
9511 #if HAVE_PTHREADS_D4
9512         status = pthread_create(&t, pthread_attr_default, task, NULL);
9513 #else
9514         status = pthread_create(&t, NULL, task, NULL);
9515 #endif
9516
9517         if( status ) exit( status );
9518
9519         /* make sure pthread_detach() isn't just a stub */
9520 #if HAVE_PTHREADS_D4
9521         status = pthread_detach( &t );
9522 #else
9523         status = pthread_detach( t );
9524 #endif
9525
9526 #ifdef HAVE_LINUX_THREADS
9527         pthread_kill_other_threads_np();
9528 #endif
9529
9530         exit( status );
9531
9532 ; return 0; }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9535   rm -rf conftest*
9536   ol_cv_pthread_lib_lpthreads=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   ol_cv_pthread_lib_lpthreads=no
9542 fi
9543 rm -f conftest*
9544 else
9545   cat > conftest.$ac_ext <<EOF
9546 #line 9547 "configure"
9547 #include "confdefs.h"
9548 /* pthread test headers */
9549 #include <pthread.h>
9550 #ifndef NULL
9551 #define NULL (void*)0
9552 #endif
9553
9554 static void *task(p)
9555         void *p;
9556 {
9557         return (void *) (p == NULL);
9558 }
9559
9560
9561 int main(argc, argv)
9562         int argc;
9563         char **argv;
9564 {
9565
9566         /* pthread test function */
9567         pthread_t t;
9568         int status;
9569
9570         /* make sure pthread_create() isn't just a stub */
9571 #if HAVE_PTHREADS_D4
9572         status = pthread_create(&t, pthread_attr_default, task, NULL);
9573 #else
9574         status = pthread_create(&t, NULL, task, NULL);
9575 #endif
9576
9577         if( status ) exit( status );
9578
9579         /* make sure pthread_detach() isn't just a stub */
9580 #if HAVE_PTHREADS_D4
9581         status = pthread_detach( &t );
9582 #else
9583         status = pthread_detach( t );
9584 #endif
9585
9586 #ifdef HAVE_LINUX_THREADS
9587         pthread_kill_other_threads_np();
9588 #endif
9589
9590         exit( status );
9591
9592 }
9593
9594 EOF
9595 if { (eval echo configure:9596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9596 then
9597   ol_cv_pthread_lib_lpthreads=yes
9598 else
9599   echo "configure: failed program was:" >&5
9600   cat conftest.$ac_ext >&5
9601   rm -fr conftest*
9602   ol_cv_pthread_lib_lpthreads=no
9603 fi
9604 rm -fr conftest*
9605 fi
9606
9607
9608                 # restore the LIBS
9609                 LIBS="$ol_LIBS"
9610         
9611 fi
9612
9613 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9614
9615         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9616                 ol_link_pthreads="-lpthreads"
9617                 ol_link_threads=posix
9618         fi
9619 fi
9620
9621
9622                 if test $ol_link_threads != no ; then
9623                         cat >> confdefs.h <<\EOF
9624 #define HAVE_PTHREADS 1
9625 EOF
9626
9627
9628                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9629
9630                                                 save_CPPFLAGS="$CPPFLAGS"
9631                         save_LIBS="$LIBS"
9632                         LIBS="$LTHREAD_LIBS $LIBS"
9633
9634                                                                                                 for ac_func in sched_yield pthread_yield
9635 do
9636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9637 echo "configure:9638: checking for $ac_func" >&5
9638 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9639   echo $ac_n "(cached) $ac_c" 1>&6
9640 else
9641   cat > conftest.$ac_ext <<EOF
9642 #line 9643 "configure"
9643 #include "confdefs.h"
9644 /* System header to define __stub macros and hopefully few prototypes,
9645     which can conflict with char $ac_func(); below.  */
9646 #include <assert.h>
9647 /* Override any gcc2 internal prototype to avoid an error.  */
9648 /* We use char because int might match the return type of a gcc2
9649     builtin and then its argument prototype would still apply.  */
9650 char $ac_func();
9651 char (*f)();
9652
9653 int main() {
9654
9655 /* The GNU C library defines this for functions which it implements
9656     to always fail with ENOSYS.  Some functions are actually named
9657     something starting with __ and the normal name is an alias.  */
9658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9659 choke me
9660 #else
9661 f = $ac_func;
9662 #endif
9663
9664 ; return 0; }
9665 EOF
9666 if { (eval echo configure:9667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9667   rm -rf conftest*
9668   eval "ac_cv_func_$ac_func=yes"
9669 else
9670   echo "configure: failed program was:" >&5
9671   cat conftest.$ac_ext >&5
9672   rm -rf conftest*
9673   eval "ac_cv_func_$ac_func=no"
9674 fi
9675 rm -f conftest*
9676 fi
9677
9678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9679   echo "$ac_t""yes" 1>&6
9680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9681   cat >> confdefs.h <<EOF
9682 #define $ac_tr_func 1
9683 EOF
9684  
9685 else
9686   echo "$ac_t""no" 1>&6
9687 fi
9688 done
9689
9690
9691                         if test $ac_cv_func_sched_yield = no -a \
9692                                 $ac_cv_func_pthread_yield = no ; then
9693                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9694 echo "configure:9695: checking for sched_yield in -lrt" >&5
9695 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9697   echo $ac_n "(cached) $ac_c" 1>&6
9698 else
9699   ac_save_LIBS="$LIBS"
9700 LIBS="-lrt  $LIBS"
9701 cat > conftest.$ac_ext <<EOF
9702 #line 9703 "configure"
9703 #include "confdefs.h"
9704 /* Override any gcc2 internal prototype to avoid an error.  */
9705 /* We use char because int might match the return type of a gcc2
9706     builtin and then its argument prototype would still apply.  */
9707 char sched_yield();
9708
9709 int main() {
9710 sched_yield()
9711 ; return 0; }
9712 EOF
9713 if { (eval echo configure:9714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9714   rm -rf conftest*
9715   eval "ac_cv_lib_$ac_lib_var=yes"
9716 else
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719   rm -rf conftest*
9720   eval "ac_cv_lib_$ac_lib_var=no"
9721 fi
9722 rm -f conftest*
9723 LIBS="$ac_save_LIBS"
9724
9725 fi
9726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9727   echo "$ac_t""yes" 1>&6
9728   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9729                                         cat >> confdefs.h <<\EOF
9730 #define HAVE_SCHED_YIELD 1
9731 EOF
9732
9733                                         ac_cv_func_sched_yield=yes
9734 else
9735   echo "$ac_t""no" 1>&6
9736 ac_cv_func_sched_yield=no
9737 fi
9738
9739                         fi
9740                         if test $ac_cv_func_sched_yield = no -a \
9741                                 $ac_cv_func_pthread_yield = no ; then
9742                                                                                                 for ac_func in thr_yield
9743 do
9744 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9745 echo "configure:9746: checking for $ac_func" >&5
9746 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9747   echo $ac_n "(cached) $ac_c" 1>&6
9748 else
9749   cat > conftest.$ac_ext <<EOF
9750 #line 9751 "configure"
9751 #include "confdefs.h"
9752 /* System header to define __stub macros and hopefully few prototypes,
9753     which can conflict with char $ac_func(); below.  */
9754 #include <assert.h>
9755 /* Override any gcc2 internal prototype to avoid an error.  */
9756 /* We use char because int might match the return type of a gcc2
9757     builtin and then its argument prototype would still apply.  */
9758 char $ac_func();
9759 char (*f)();
9760
9761 int main() {
9762
9763 /* The GNU C library defines this for functions which it implements
9764     to always fail with ENOSYS.  Some functions are actually named
9765     something starting with __ and the normal name is an alias.  */
9766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9767 choke me
9768 #else
9769 f = $ac_func;
9770 #endif
9771
9772 ; return 0; }
9773 EOF
9774 if { (eval echo configure:9775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9775   rm -rf conftest*
9776   eval "ac_cv_func_$ac_func=yes"
9777 else
9778   echo "configure: failed program was:" >&5
9779   cat conftest.$ac_ext >&5
9780   rm -rf conftest*
9781   eval "ac_cv_func_$ac_func=no"
9782 fi
9783 rm -f conftest*
9784 fi
9785
9786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9787   echo "$ac_t""yes" 1>&6
9788     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9789   cat >> confdefs.h <<EOF
9790 #define $ac_tr_func 1
9791 EOF
9792  
9793 else
9794   echo "$ac_t""no" 1>&6
9795 fi
9796 done
9797
9798                         fi
9799                         if test $ac_cv_func_sched_yield = no -a \
9800                                 $ac_cv_func_pthread_yield = no -a \
9801                                 "$ac_cv_func_thr_yield" = no ; then
9802                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9803                         fi
9804
9805                                                 for ac_func in pthread_kill
9806 do
9807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9808 echo "configure:9809: checking for $ac_func" >&5
9809 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9810   echo $ac_n "(cached) $ac_c" 1>&6
9811 else
9812   cat > conftest.$ac_ext <<EOF
9813 #line 9814 "configure"
9814 #include "confdefs.h"
9815 /* System header to define __stub macros and hopefully few prototypes,
9816     which can conflict with char $ac_func(); below.  */
9817 #include <assert.h>
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 /* We use char because int might match the return type of a gcc2
9820     builtin and then its argument prototype would still apply.  */
9821 char $ac_func();
9822 char (*f)();
9823
9824 int main() {
9825
9826 /* The GNU C library defines this for functions which it implements
9827     to always fail with ENOSYS.  Some functions are actually named
9828     something starting with __ and the normal name is an alias.  */
9829 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9830 choke me
9831 #else
9832 f = $ac_func;
9833 #endif
9834
9835 ; return 0; }
9836 EOF
9837 if { (eval echo configure:9838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9838   rm -rf conftest*
9839   eval "ac_cv_func_$ac_func=yes"
9840 else
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_func_$ac_func=no"
9845 fi
9846 rm -f conftest*
9847 fi
9848
9849 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9850   echo "$ac_t""yes" 1>&6
9851     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9852   cat >> confdefs.h <<EOF
9853 #define $ac_tr_func 1
9854 EOF
9855  
9856 else
9857   echo "$ac_t""no" 1>&6
9858 fi
9859 done
9860
9861
9862                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9863 echo "configure:9864: checking for pthread_detach with <pthread.h>" >&5
9864 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9865   echo $ac_n "(cached) $ac_c" 1>&6
9866 else
9867   
9868                                                                 cat > conftest.$ac_ext <<EOF
9869 #line 9870 "configure"
9870 #include "confdefs.h"
9871
9872 #include <pthread.h>
9873 #ifndef NULL
9874 #define NULL (void*)0
9875 #endif
9876
9877 int main() {
9878 pthread_detach(NULL);
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   ol_cv_func_pthread_detach=yes
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   ol_cv_func_pthread_detach=no
9889 fi
9890 rm -f conftest*
9891                         
9892 fi
9893
9894 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9895
9896                         if test $ol_cv_func_pthread_detach = no ; then
9897                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9898                         fi
9899
9900                         cat >> confdefs.h <<\EOF
9901 #define HAVE_PTHREAD_DETACH 1
9902 EOF
9903
9904
9905                                                 for ac_func in \
9906                                 pthread_setconcurrency \
9907                                 pthread_getconcurrency \
9908                                 thr_setconcurrency \
9909                                 thr_getconcurrency \
9910                         
9911 do
9912 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9913 echo "configure:9914: checking for $ac_func" >&5
9914 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9915   echo $ac_n "(cached) $ac_c" 1>&6
9916 else
9917   cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 /* System header to define __stub macros and hopefully few prototypes,
9921     which can conflict with char $ac_func(); below.  */
9922 #include <assert.h>
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 /* We use char because int might match the return type of a gcc2
9925     builtin and then its argument prototype would still apply.  */
9926 char $ac_func();
9927 char (*f)();
9928
9929 int main() {
9930
9931 /* The GNU C library defines this for functions which it implements
9932     to always fail with ENOSYS.  Some functions are actually named
9933     something starting with __ and the normal name is an alias.  */
9934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9935 choke me
9936 #else
9937 f = $ac_func;
9938 #endif
9939
9940 ; return 0; }
9941 EOF
9942 if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9943   rm -rf conftest*
9944   eval "ac_cv_func_$ac_func=yes"
9945 else
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   eval "ac_cv_func_$ac_func=no"
9950 fi
9951 rm -f conftest*
9952 fi
9953
9954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9955   echo "$ac_t""yes" 1>&6
9956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9957   cat >> confdefs.h <<EOF
9958 #define $ac_tr_func 1
9959 EOF
9960  
9961 else
9962   echo "$ac_t""no" 1>&6
9963 fi
9964 done
9965
9966
9967                         
9968         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9969 echo "configure:9970: checking for pthread_kill_other_threads_np" >&5
9970 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   cat > conftest.$ac_ext <<EOF
9974 #line 9975 "configure"
9975 #include "confdefs.h"
9976 /* System header to define __stub macros and hopefully few prototypes,
9977     which can conflict with char pthread_kill_other_threads_np(); below.  */
9978 #include <assert.h>
9979 /* Override any gcc2 internal prototype to avoid an error.  */
9980 /* We use char because int might match the return type of a gcc2
9981     builtin and then its argument prototype would still apply.  */
9982 char pthread_kill_other_threads_np();
9983 char (*f)();
9984
9985 int main() {
9986
9987 /* The GNU C library defines this for functions which it implements
9988     to always fail with ENOSYS.  Some functions are actually named
9989     something starting with __ and the normal name is an alias.  */
9990 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9991 choke me
9992 #else
9993 f = pthread_kill_other_threads_np;
9994 #endif
9995
9996 ; return 0; }
9997 EOF
9998 if { (eval echo configure:9999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9999   rm -rf conftest*
10000   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10001 else
10002   echo "configure: failed program was:" >&5
10003   cat conftest.$ac_ext >&5
10004   rm -rf conftest*
10005   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10006 fi
10007 rm -f conftest*
10008 fi
10009
10010 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10011   echo "$ac_t""yes" 1>&6
10012   :
10013 else
10014   echo "$ac_t""no" 1>&6
10015 fi
10016
10017         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10018 echo "configure:10019: checking for LinuxThreads implementation" >&5
10019 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10023 fi
10024
10025 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10026
10027                         
10028         
10029         
10030         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10031 echo "configure:10032: checking for LinuxThreads consistency" >&5
10032 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10033   echo $ac_n "(cached) $ac_c" 1>&6
10034 else
10035   
10036                 if test $ol_cv_header_linux_threads = yes -a \
10037                         $ol_cv_sys_linux_threads = yes; then
10038                         ol_cv_linux_threads=yes
10039                 elif test $ol_cv_header_linux_threads = no -a \
10040                         $ol_cv_sys_linux_threads = no; then
10041                         ol_cv_linux_threads=no
10042                 else
10043                         ol_cv_linux_threads=error
10044                 fi
10045         
10046 fi
10047
10048 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10049
10050
10051                         if test $ol_cv_linux_threads = error; then
10052                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10053                         fi
10054
10055                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10056 echo "configure:10057: checking if pthread_create() works" >&5
10057 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10058   echo $ac_n "(cached) $ac_c" 1>&6
10059 else
10060   
10061                         if test "$cross_compiling" = yes; then
10062                                 ol_cv_pthread_create_works=yes
10063 else
10064   cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 /* pthread test headers */
10068 #include <pthread.h>
10069 #ifndef NULL
10070 #define NULL (void*)0
10071 #endif
10072
10073 static void *task(p)
10074         void *p;
10075 {
10076         return (void *) (p == NULL);
10077 }
10078
10079
10080 int main(argc, argv)
10081         int argc;
10082         char **argv;
10083 {
10084
10085         /* pthread test function */
10086         pthread_t t;
10087         int status;
10088
10089         /* make sure pthread_create() isn't just a stub */
10090 #if HAVE_PTHREADS_D4
10091         status = pthread_create(&t, pthread_attr_default, task, NULL);
10092 #else
10093         status = pthread_create(&t, NULL, task, NULL);
10094 #endif
10095
10096         if( status ) exit( status );
10097
10098         /* make sure pthread_detach() isn't just a stub */
10099 #if HAVE_PTHREADS_D4
10100         status = pthread_detach( &t );
10101 #else
10102         status = pthread_detach( t );
10103 #endif
10104
10105 #ifdef HAVE_LINUX_THREADS
10106         pthread_kill_other_threads_np();
10107 #endif
10108
10109         exit( status );
10110
10111 }
10112
10113 EOF
10114 if { (eval echo configure:10115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10115 then
10116   ol_cv_pthread_create_works=yes
10117 else
10118   echo "configure: failed program was:" >&5
10119   cat conftest.$ac_ext >&5
10120   rm -fr conftest*
10121   ol_cv_pthread_create_works=no
10122 fi
10123 rm -fr conftest*
10124 fi
10125
10126 fi
10127
10128 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10129
10130                         if test $ol_cv_pthread_create_works = no ; then
10131                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10132                         fi
10133
10134                                                 if test $ol_with_yielding_select = auto ; then
10135                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10136 echo "configure:10137: checking if select yields when using pthreads" >&5
10137 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10138   echo $ac_n "(cached) $ac_c" 1>&6
10139 else
10140   
10141                                 if test "$cross_compiling" = yes; then
10142   ol_cv_pthread_select_yields=cross
10143 else
10144   cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147
10148 #include <sys/types.h>
10149 #include <sys/time.h>
10150 #include <unistd.h>
10151 #include <pthread.h>
10152 #ifndef NULL
10153 #define NULL (void*) 0
10154 #endif
10155
10156 static int fildes[2];
10157
10158 static void *task(p)
10159         void *p;
10160 {
10161         int i;
10162         struct timeval tv;
10163
10164         fd_set rfds;
10165
10166         tv.tv_sec=10;
10167         tv.tv_usec=0;
10168
10169         FD_ZERO(&rfds);
10170         FD_SET(fildes[0], &rfds);
10171
10172         /* we're not interested in any fds */
10173         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10174
10175         if(i < 0) {
10176                 perror("select");
10177                 exit(10);
10178         }
10179
10180         exit(0); /* if we exit here, the select blocked the whole process */
10181 }
10182
10183 int main(argc, argv)
10184         int argc;
10185         char **argv;
10186 {
10187         pthread_t t;
10188
10189         /* create a pipe to select */
10190         if(pipe(&fildes[0])) {
10191                 perror("select");
10192                 exit(1);
10193         }
10194
10195 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10196         (void) pthread_setconcurrency(2);
10197 #else
10198 #ifdef HAVE_THR_SETCONCURRENCY
10199         /* Set Solaris LWP concurrency to 2 */
10200         thr_setconcurrency(2);
10201 #endif
10202 #endif
10203
10204 #if HAVE_PTHREADS_D4
10205         pthread_create(&t, pthread_attr_default, task, NULL);
10206 #else
10207         pthread_create(&t, NULL, task, NULL);
10208 #endif
10209
10210 #if HAVE_SCHED_YIELD
10211         sched_yield();  /* make sure task runs first */
10212 #else
10213 #ifdef HAVE_PTHREAD_YIELD
10214         pthread_yield();        /* make sure task runs first */
10215 #endif
10216 #endif
10217
10218         exit(2);
10219 }
10220 EOF
10221 if { (eval echo configure:10222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10222 then
10223   ol_cv_pthread_select_yields=no
10224 else
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -fr conftest*
10228   ol_cv_pthread_select_yields=yes
10229 fi
10230 rm -fr conftest*
10231 fi
10232
10233 fi
10234
10235 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10236
10237                                 if test $ol_cv_pthread_select_yields = cross ; then
10238                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10239                                 fi
10240
10241                                 if test $ol_cv_pthread_select_yields = yes ; then
10242                                         ol_with_yielding_select=yes
10243                                 fi
10244                         fi
10245
10246                                                 CPPFLAGS="$save_CPPFLAGS"
10247                         LIBS="$save_LIBS"
10248                 else
10249                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10250                 fi
10251         fi
10252
10253         if test $ol_with_threads = posix ; then
10254                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10255         fi
10256 fi
10257
10258 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10259         -o $ol_with_threads = mach ; then
10260
10261                 for ac_hdr in mach/cthreads.h
10262 do
10263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10265 echo "configure:10266: checking for $ac_hdr" >&5
10266 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272 #include <$ac_hdr>
10273 EOF
10274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10275 { (eval echo configure:10276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10277 if test -z "$ac_err"; then
10278   rm -rf conftest*
10279   eval "ac_cv_header_$ac_safe=yes"
10280 else
10281   echo "$ac_err" >&5
10282   echo "configure: failed program was:" >&5
10283   cat conftest.$ac_ext >&5
10284   rm -rf conftest*
10285   eval "ac_cv_header_$ac_safe=no"
10286 fi
10287 rm -f conftest*
10288 fi
10289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10290   echo "$ac_t""yes" 1>&6
10291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10292   cat >> confdefs.h <<EOF
10293 #define $ac_tr_hdr 1
10294 EOF
10295  
10296 else
10297   echo "$ac_t""no" 1>&6
10298 fi
10299 done
10300
10301         if test $ac_cv_header_mach_cthreads_h = yes ; then
10302                 ol_with_threads=found
10303
10304                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10305 echo "configure:10306: checking for cthread_fork" >&5
10306 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10307   echo $ac_n "(cached) $ac_c" 1>&6
10308 else
10309   cat > conftest.$ac_ext <<EOF
10310 #line 10311 "configure"
10311 #include "confdefs.h"
10312 /* System header to define __stub macros and hopefully few prototypes,
10313     which can conflict with char cthread_fork(); below.  */
10314 #include <assert.h>
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 /* We use char because int might match the return type of a gcc2
10317     builtin and then its argument prototype would still apply.  */
10318 char cthread_fork();
10319 char (*f)();
10320
10321 int main() {
10322
10323 /* The GNU C library defines this for functions which it implements
10324     to always fail with ENOSYS.  Some functions are actually named
10325     something starting with __ and the normal name is an alias.  */
10326 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10327 choke me
10328 #else
10329 f = cthread_fork;
10330 #endif
10331
10332 ; return 0; }
10333 EOF
10334 if { (eval echo configure:10335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10335   rm -rf conftest*
10336   eval "ac_cv_func_cthread_fork=yes"
10337 else
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_func_cthread_fork=no"
10342 fi
10343 rm -f conftest*
10344 fi
10345
10346 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10347   echo "$ac_t""yes" 1>&6
10348   ol_link_threads=yes
10349 else
10350   echo "$ac_t""no" 1>&6
10351 fi
10352
10353
10354                 if test $ol_link_threads = no ; then
10355                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10356 echo "configure:10357: checking for cthread_fork with -all_load" >&5
10357 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10358   echo $ac_n "(cached) $ac_c" 1>&6
10359 else
10360   
10361                                                                 save_LIBS="$LIBS"
10362                                 LIBS="-all_load $LIBS"
10363                                 cat > conftest.$ac_ext <<EOF
10364 #line 10365 "configure"
10365 #include "confdefs.h"
10366 #include <mach/cthreads.h>
10367 int main() {
10368
10369                                         cthread_fork((void *)0, (void *)0);
10370                                         
10371 ; return 0; }
10372 EOF
10373 if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10374   rm -rf conftest*
10375   ol_cv_cthread_all_load=yes
10376 else
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -rf conftest*
10380   ol_cv_cthread_all_load=no
10381 fi
10382 rm -f conftest*
10383                                                                 LIBS="$save_LIBS"
10384                         
10385 fi
10386
10387 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10388
10389                         if test $ol_cv_cthread_all_load = yes ; then
10390                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10391                                 ol_link_threads=mach
10392                         fi
10393                 fi
10394
10395                 if test $ol_link_threads != no ; then
10396                         : check for cthread specific functionality here
10397                         cat >> confdefs.h <<\EOF
10398 #define HAVE_MACH_CTHREADS 1
10399 EOF
10400
10401                 else
10402                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10403                 fi
10404         fi
10405
10406         if test $ol_with_threads = mach ; then
10407                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10408         fi
10409 fi
10410
10411 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10412         -o $ol_with_threads = pth ; then
10413
10414         for ac_hdr in pth.h
10415 do
10416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10418 echo "configure:10419: checking for $ac_hdr" >&5
10419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 #include <$ac_hdr>
10426 EOF
10427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10428 { (eval echo configure:10429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10430 if test -z "$ac_err"; then
10431   rm -rf conftest*
10432   eval "ac_cv_header_$ac_safe=yes"
10433 else
10434   echo "$ac_err" >&5
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_header_$ac_safe=no"
10439 fi
10440 rm -f conftest*
10441 fi
10442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10443   echo "$ac_t""yes" 1>&6
10444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10445   cat >> confdefs.h <<EOF
10446 #define $ac_tr_hdr 1
10447 EOF
10448  
10449 else
10450   echo "$ac_t""no" 1>&6
10451 fi
10452 done
10453
10454
10455         if test $ac_cv_header_pth_h = yes ; then
10456                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10457 echo "configure:10458: checking for pth_version in -lpth" >&5
10458 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   ac_save_LIBS="$LIBS"
10463 LIBS="-lpth  $LIBS"
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 /* We use char because int might match the return type of a gcc2
10469     builtin and then its argument prototype would still apply.  */
10470 char pth_version();
10471
10472 int main() {
10473 pth_version()
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_lib_$ac_lib_var=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=no"
10484 fi
10485 rm -f conftest*
10486 LIBS="$ac_save_LIBS"
10487
10488 fi
10489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10490   echo "$ac_t""yes" 1>&6
10491   have_pth=yes
10492 else
10493   echo "$ac_t""no" 1>&6
10494 have_pth=no
10495 fi
10496
10497
10498                 if test $have_pth = yes ; then
10499                         cat >> confdefs.h <<\EOF
10500 #define HAVE_GNU_PTH 1
10501 EOF
10502
10503                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10504                         ol_link_threads=pth
10505
10506                         if test $ol_with_yielding_select = auto ; then
10507                                 ol_with_yielding_select=yes
10508                         fi
10509                 fi
10510         fi
10511 fi
10512
10513 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10514         -o $ol_with_threads = lwp ; then
10515
10516                 for ac_hdr in thread.h synch.h
10517 do
10518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10520 echo "configure:10521: checking for $ac_hdr" >&5
10521 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   cat > conftest.$ac_ext <<EOF
10525 #line 10526 "configure"
10526 #include "confdefs.h"
10527 #include <$ac_hdr>
10528 EOF
10529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10530 { (eval echo configure:10531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10532 if test -z "$ac_err"; then
10533   rm -rf conftest*
10534   eval "ac_cv_header_$ac_safe=yes"
10535 else
10536   echo "$ac_err" >&5
10537   echo "configure: failed program was:" >&5
10538   cat conftest.$ac_ext >&5
10539   rm -rf conftest*
10540   eval "ac_cv_header_$ac_safe=no"
10541 fi
10542 rm -f conftest*
10543 fi
10544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10545   echo "$ac_t""yes" 1>&6
10546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10547   cat >> confdefs.h <<EOF
10548 #define $ac_tr_hdr 1
10549 EOF
10550  
10551 else
10552   echo "$ac_t""no" 1>&6
10553 fi
10554 done
10555
10556         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10557                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10558 echo "configure:10559: checking for thr_create in -lthread" >&5
10559 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10560 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10561   echo $ac_n "(cached) $ac_c" 1>&6
10562 else
10563   ac_save_LIBS="$LIBS"
10564 LIBS="-lthread  $LIBS"
10565 cat > conftest.$ac_ext <<EOF
10566 #line 10567 "configure"
10567 #include "confdefs.h"
10568 /* Override any gcc2 internal prototype to avoid an error.  */
10569 /* We use char because int might match the return type of a gcc2
10570     builtin and then its argument prototype would still apply.  */
10571 char thr_create();
10572
10573 int main() {
10574 thr_create()
10575 ; return 0; }
10576 EOF
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10578   rm -rf conftest*
10579   eval "ac_cv_lib_$ac_lib_var=yes"
10580 else
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_lib_$ac_lib_var=no"
10585 fi
10586 rm -f conftest*
10587 LIBS="$ac_save_LIBS"
10588
10589 fi
10590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10591   echo "$ac_t""yes" 1>&6
10592   have_thr=yes
10593 else
10594   echo "$ac_t""no" 1>&6
10595 have_thr=no
10596 fi
10597
10598
10599                 if test $have_thr = yes ; then
10600                         cat >> confdefs.h <<\EOF
10601 #define HAVE_THR 1
10602 EOF
10603
10604                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10605                         ol_link_threads=thr
10606
10607                         if test $ol_with_yielding_select = auto ; then
10608                                 ol_with_yielding_select=yes
10609                         fi
10610
10611                                                 for ac_func in \
10612                                 thr_setconcurrency \
10613                                 thr_getconcurrency \
10614                         
10615 do
10616 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10617 echo "configure:10618: checking for $ac_func" >&5
10618 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10619   echo $ac_n "(cached) $ac_c" 1>&6
10620 else
10621   cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624 /* System header to define __stub macros and hopefully few prototypes,
10625     which can conflict with char $ac_func(); below.  */
10626 #include <assert.h>
10627 /* Override any gcc2 internal prototype to avoid an error.  */
10628 /* We use char because int might match the return type of a gcc2
10629     builtin and then its argument prototype would still apply.  */
10630 char $ac_func();
10631 char (*f)();
10632
10633 int main() {
10634
10635 /* The GNU C library defines this for functions which it implements
10636     to always fail with ENOSYS.  Some functions are actually named
10637     something starting with __ and the normal name is an alias.  */
10638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10639 choke me
10640 #else
10641 f = $ac_func;
10642 #endif
10643
10644 ; return 0; }
10645 EOF
10646 if { (eval echo configure:10647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10647   rm -rf conftest*
10648   eval "ac_cv_func_$ac_func=yes"
10649 else
10650   echo "configure: failed program was:" >&5
10651   cat conftest.$ac_ext >&5
10652   rm -rf conftest*
10653   eval "ac_cv_func_$ac_func=no"
10654 fi
10655 rm -f conftest*
10656 fi
10657
10658 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10659   echo "$ac_t""yes" 1>&6
10660     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10661   cat >> confdefs.h <<EOF
10662 #define $ac_tr_func 1
10663 EOF
10664  
10665 else
10666   echo "$ac_t""no" 1>&6
10667 fi
10668 done
10669
10670                 fi
10671         fi
10672
10673                 for ac_hdr in lwp/lwp.h
10674 do
10675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10677 echo "configure:10678: checking for $ac_hdr" >&5
10678 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684 #include <$ac_hdr>
10685 EOF
10686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10687 { (eval echo configure:10688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10689 if test -z "$ac_err"; then
10690   rm -rf conftest*
10691   eval "ac_cv_header_$ac_safe=yes"
10692 else
10693   echo "$ac_err" >&5
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   eval "ac_cv_header_$ac_safe=no"
10698 fi
10699 rm -f conftest*
10700 fi
10701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10702   echo "$ac_t""yes" 1>&6
10703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10704   cat >> confdefs.h <<EOF
10705 #define $ac_tr_hdr 1
10706 EOF
10707  
10708 else
10709   echo "$ac_t""no" 1>&6
10710 fi
10711 done
10712
10713         if test $ac_cv_header_lwp_lwp_h = yes ; then
10714                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10715 echo "configure:10716: checking for lwp_create in -llwp" >&5
10716 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   ac_save_LIBS="$LIBS"
10721 LIBS="-llwp  $LIBS"
10722 cat > conftest.$ac_ext <<EOF
10723 #line 10724 "configure"
10724 #include "confdefs.h"
10725 /* Override any gcc2 internal prototype to avoid an error.  */
10726 /* We use char because int might match the return type of a gcc2
10727     builtin and then its argument prototype would still apply.  */
10728 char lwp_create();
10729
10730 int main() {
10731 lwp_create()
10732 ; return 0; }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10735   rm -rf conftest*
10736   eval "ac_cv_lib_$ac_lib_var=yes"
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   eval "ac_cv_lib_$ac_lib_var=no"
10742 fi
10743 rm -f conftest*
10744 LIBS="$ac_save_LIBS"
10745
10746 fi
10747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10748   echo "$ac_t""yes" 1>&6
10749   have_lwp=yes
10750 else
10751   echo "$ac_t""no" 1>&6
10752 have_lwp=no
10753 fi
10754
10755
10756                 if test $have_lwp = yes ; then
10757                         cat >> confdefs.h <<\EOF
10758 #define HAVE_LWP 1
10759 EOF
10760
10761                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10762                         ol_link_threads=lwp
10763
10764                         if test $ol_with_yielding_select = auto ; then
10765                                 ol_with_yielding_select=no
10766                         fi
10767                 fi
10768         fi
10769 fi
10770
10771 if test $ol_with_yielding_select = yes ; then
10772         cat >> confdefs.h <<\EOF
10773 #define HAVE_YIELDING_SELECT 1
10774 EOF
10775
10776 fi
10777
10778 if test $ol_with_threads = manual ; then
10779                 ol_link_threads=yes
10780
10781         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10782
10783         for ac_hdr in pthread.h sched.h
10784 do
10785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10787 echo "configure:10788: checking for $ac_hdr" >&5
10788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10789   echo $ac_n "(cached) $ac_c" 1>&6
10790 else
10791   cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794 #include <$ac_hdr>
10795 EOF
10796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10797 { (eval echo configure:10798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10799 if test -z "$ac_err"; then
10800   rm -rf conftest*
10801   eval "ac_cv_header_$ac_safe=yes"
10802 else
10803   echo "$ac_err" >&5
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   eval "ac_cv_header_$ac_safe=no"
10808 fi
10809 rm -f conftest*
10810 fi
10811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10814   cat >> confdefs.h <<EOF
10815 #define $ac_tr_hdr 1
10816 EOF
10817  
10818 else
10819   echo "$ac_t""no" 1>&6
10820 fi
10821 done
10822
10823         for ac_func in sched_yield pthread_yield
10824 do
10825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10826 echo "configure:10827: checking for $ac_func" >&5
10827 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10828   echo $ac_n "(cached) $ac_c" 1>&6
10829 else
10830   cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833 /* System header to define __stub macros and hopefully few prototypes,
10834     which can conflict with char $ac_func(); below.  */
10835 #include <assert.h>
10836 /* Override any gcc2 internal prototype to avoid an error.  */
10837 /* We use char because int might match the return type of a gcc2
10838     builtin and then its argument prototype would still apply.  */
10839 char $ac_func();
10840 char (*f)();
10841
10842 int main() {
10843
10844 /* The GNU C library defines this for functions which it implements
10845     to always fail with ENOSYS.  Some functions are actually named
10846     something starting with __ and the normal name is an alias.  */
10847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10848 choke me
10849 #else
10850 f = $ac_func;
10851 #endif
10852
10853 ; return 0; }
10854 EOF
10855 if { (eval echo configure:10856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10856   rm -rf conftest*
10857   eval "ac_cv_func_$ac_func=yes"
10858 else
10859   echo "configure: failed program was:" >&5
10860   cat conftest.$ac_ext >&5
10861   rm -rf conftest*
10862   eval "ac_cv_func_$ac_func=no"
10863 fi
10864 rm -f conftest*
10865 fi
10866
10867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10868   echo "$ac_t""yes" 1>&6
10869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10870   cat >> confdefs.h <<EOF
10871 #define $ac_tr_func 1
10872 EOF
10873  
10874 else
10875   echo "$ac_t""no" 1>&6
10876 fi
10877 done
10878
10879         
10880         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10881 echo "configure:10882: checking for LinuxThreads pthread.h" >&5
10882 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10883   echo $ac_n "(cached) $ac_c" 1>&6
10884 else
10885   cat > conftest.$ac_ext <<EOF
10886 #line 10887 "configure"
10887 #include "confdefs.h"
10888 #include <pthread.h>
10889 EOF
10890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10891   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10892   rm -rf conftest*
10893   ol_cv_header_linux_threads=yes
10894 else
10895   rm -rf conftest*
10896   ol_cv_header_linux_threads=no
10897 fi
10898 rm -f conftest*
10899
10900                 
10901 fi
10902
10903 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10904         if test $ol_cv_header_linux_threads = yes; then
10905                 cat >> confdefs.h <<\EOF
10906 #define HAVE_LINUX_THREADS 1
10907 EOF
10908
10909         fi
10910
10911
10912         for ac_hdr in mach/cthreads.h
10913 do
10914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10916 echo "configure:10917: checking for $ac_hdr" >&5
10917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923 #include <$ac_hdr>
10924 EOF
10925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10926 { (eval echo configure:10927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10928 if test -z "$ac_err"; then
10929   rm -rf conftest*
10930   eval "ac_cv_header_$ac_safe=yes"
10931 else
10932   echo "$ac_err" >&5
10933   echo "configure: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   rm -rf conftest*
10936   eval "ac_cv_header_$ac_safe=no"
10937 fi
10938 rm -f conftest*
10939 fi
10940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10941   echo "$ac_t""yes" 1>&6
10942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10943   cat >> confdefs.h <<EOF
10944 #define $ac_tr_hdr 1
10945 EOF
10946  
10947 else
10948   echo "$ac_t""no" 1>&6
10949 fi
10950 done
10951
10952         for ac_hdr in lwp/lwp.h
10953 do
10954 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10955 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10956 echo "configure:10957: checking for $ac_hdr" >&5
10957 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   cat > conftest.$ac_ext <<EOF
10961 #line 10962 "configure"
10962 #include "confdefs.h"
10963 #include <$ac_hdr>
10964 EOF
10965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10966 { (eval echo configure:10967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10968 if test -z "$ac_err"; then
10969   rm -rf conftest*
10970   eval "ac_cv_header_$ac_safe=yes"
10971 else
10972   echo "$ac_err" >&5
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   eval "ac_cv_header_$ac_safe=no"
10977 fi
10978 rm -f conftest*
10979 fi
10980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10981   echo "$ac_t""yes" 1>&6
10982     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10983   cat >> confdefs.h <<EOF
10984 #define $ac_tr_hdr 1
10985 EOF
10986  
10987 else
10988   echo "$ac_t""no" 1>&6
10989 fi
10990 done
10991
10992         for ac_hdr in thread.h synch.h
10993 do
10994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10996 echo "configure:10997: checking for $ac_hdr" >&5
10997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10998   echo $ac_n "(cached) $ac_c" 1>&6
10999 else
11000   cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003 #include <$ac_hdr>
11004 EOF
11005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11006 { (eval echo configure:11007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11008 if test -z "$ac_err"; then
11009   rm -rf conftest*
11010   eval "ac_cv_header_$ac_safe=yes"
11011 else
11012   echo "$ac_err" >&5
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -rf conftest*
11016   eval "ac_cv_header_$ac_safe=no"
11017 fi
11018 rm -f conftest*
11019 fi
11020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11021   echo "$ac_t""yes" 1>&6
11022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11023   cat >> confdefs.h <<EOF
11024 #define $ac_tr_hdr 1
11025 EOF
11026  
11027 else
11028   echo "$ac_t""no" 1>&6
11029 fi
11030 done
11031
11032 fi
11033
11034 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11035                         cat >> confdefs.h <<\EOF
11036 #define REENTRANT 1
11037 EOF
11038
11039         cat >> confdefs.h <<\EOF
11040 #define _REENTRANT 1
11041 EOF
11042
11043         cat >> confdefs.h <<\EOF
11044 #define THREAD_SAFE 1
11045 EOF
11046
11047         cat >> confdefs.h <<\EOF
11048 #define _THREAD_SAFE 1
11049 EOF
11050
11051         cat >> confdefs.h <<\EOF
11052 #define THREADSAFE 1
11053 EOF
11054
11055         cat >> confdefs.h <<\EOF
11056 #define _THREADSAFE 1
11057 EOF
11058
11059         cat >> confdefs.h <<\EOF
11060 #define _SGI_MP_SOURCE 1
11061 EOF
11062
11063
11064                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11065 echo "configure:11066: checking for thread specific errno" >&5
11066 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11067   echo $ac_n "(cached) $ac_c" 1>&6
11068 else
11069   
11070                 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 #include <errno.h>
11074 int main() {
11075 errno = 0;
11076 ; return 0; }
11077 EOF
11078 if { (eval echo configure:11079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11079   rm -rf conftest*
11080   ol_cv_errno_thread_specific=yes
11081 else
11082   echo "configure: failed program was:" >&5
11083   cat conftest.$ac_ext >&5
11084   rm -rf conftest*
11085   ol_cv_errno_thread_specific=no
11086 fi
11087 rm -f conftest*
11088         
11089 fi
11090
11091 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11092
11093                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11094 echo "configure:11095: checking for thread specific h_errno" >&5
11095 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11096   echo $ac_n "(cached) $ac_c" 1>&6
11097 else
11098   
11099                 cat > conftest.$ac_ext <<EOF
11100 #line 11101 "configure"
11101 #include "confdefs.h"
11102 #include <netdb.h>
11103 int main() {
11104 h_errno = 0;
11105 ; return 0; }
11106 EOF
11107 if { (eval echo configure:11108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11108   rm -rf conftest*
11109   ol_cv_h_errno_thread_specific=yes
11110 else
11111   echo "configure: failed program was:" >&5
11112   cat conftest.$ac_ext >&5
11113   rm -rf conftest*
11114   ol_cv_h_errno_thread_specific=no
11115 fi
11116 rm -f conftest*
11117         
11118 fi
11119
11120 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11121
11122         if test $ol_cv_errno_thread_specific != yes \
11123                 -o $ol_cv_h_errno_thread_specific != yes ; then
11124                 LIBS="$LTHREAD_LIBS $LIBS"
11125                 LTHREAD_LIBS=""
11126         fi
11127
11128 fi  
11129
11130 if test $ol_link_threads = no ; then
11131         if test $ol_with_threads = yes ; then
11132                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11133         fi
11134
11135         if test $ol_with_threads = auto ; then
11136                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11137                 ol_with_threads=no
11138         fi
11139
11140         cat >> confdefs.h <<\EOF
11141 #define NO_THREADS 1
11142 EOF
11143
11144         LTHREAD_LIBS=""
11145 fi
11146
11147 if test $ol_link_threads != no ; then
11148         cat >> confdefs.h <<\EOF
11149 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11150 EOF
11151
11152 fi
11153
11154
11155 ol_link_ldbm=no 
11156 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11157         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11158 echo "configure:11159: checking for DB2 library" >&5
11159 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11160   echo $ac_n "(cached) $ac_c" 1>&6
11161 else
11162         ol_LIBS="$LIBS"
11163         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11164 echo "configure:11165: checking for db_appexit in -ldb" >&5
11165 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11166 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11167   echo $ac_n "(cached) $ac_c" 1>&6
11168 else
11169   ac_save_LIBS="$LIBS"
11170 LIBS="-ldb  $LIBS"
11171 cat > conftest.$ac_ext <<EOF
11172 #line 11173 "configure"
11173 #include "confdefs.h"
11174 /* Override any gcc2 internal prototype to avoid an error.  */
11175 /* We use char because int might match the return type of a gcc2
11176     builtin and then its argument prototype would still apply.  */
11177 char db_appexit();
11178
11179 int main() {
11180 db_appexit()
11181 ; return 0; }
11182 EOF
11183 if { (eval echo configure:11184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11184   rm -rf conftest*
11185   eval "ac_cv_lib_$ac_lib_var=yes"
11186 else
11187   echo "configure: failed program was:" >&5
11188   cat conftest.$ac_ext >&5
11189   rm -rf conftest*
11190   eval "ac_cv_lib_$ac_lib_var=no"
11191 fi
11192 rm -f conftest*
11193 LIBS="$ac_save_LIBS"
11194
11195 fi
11196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11197   echo "$ac_t""yes" 1>&6
11198   ol_cv_lib_db2=-ldb
11199 else
11200   echo "$ac_t""no" 1>&6
11201 ol_cv_lib_db2=no
11202 fi
11203
11204         LIBS="$ol_LIBS"
11205
11206 fi
11207
11208 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11209
11210 for ac_hdr in db.h
11211 do
11212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11214 echo "configure:11215: checking for $ac_hdr" >&5
11215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11216   echo $ac_n "(cached) $ac_c" 1>&6
11217 else
11218   cat > conftest.$ac_ext <<EOF
11219 #line 11220 "configure"
11220 #include "confdefs.h"
11221 #include <$ac_hdr>
11222 EOF
11223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11224 { (eval echo configure:11225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11226 if test -z "$ac_err"; then
11227   rm -rf conftest*
11228   eval "ac_cv_header_$ac_safe=yes"
11229 else
11230   echo "$ac_err" >&5
11231   echo "configure: failed program was:" >&5
11232   cat conftest.$ac_ext >&5
11233   rm -rf conftest*
11234   eval "ac_cv_header_$ac_safe=no"
11235 fi
11236 rm -f conftest*
11237 fi
11238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11241   cat >> confdefs.h <<EOF
11242 #define $ac_tr_hdr 1
11243 EOF
11244  
11245 else
11246   echo "$ac_t""no" 1>&6
11247 fi
11248 done
11249
11250 if test $ac_cv_header_db_h = yes ; then
11251         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11252 echo "configure:11253: checking if db.h is DB2" >&5
11253 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11254   echo $ac_n "(cached) $ac_c" 1>&6
11255 else
11256   
11257                 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260
11261 #                       include <db.h>
11262                         /* this check could be improved */
11263 #                       ifdef DB_VERSION_MAJOR
11264 #                               if DB_VERSION_MAJOR == 2
11265                                         __db_version_2;
11266 #                               endif
11267 #                       endif
11268                 
11269 EOF
11270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11271   egrep "__db_version_2" >/dev/null 2>&1; then
11272   rm -rf conftest*
11273   ol_cv_header_db2=yes
11274 else
11275   rm -rf conftest*
11276   ol_cv_header_db2=no
11277 fi
11278 rm -f conftest*
11279
11280 fi
11281
11282 echo "$ac_t""$ol_cv_header_db2" 1>&6
11283 else
11284         ol_cv_header_db2=no
11285 fi
11286
11287
11288  
11289  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11290 echo "configure:11291: checking for Berkeley DB2" >&5
11291 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11292   echo $ac_n "(cached) $ac_c" 1>&6
11293 else
11294   
11295         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11296                 ol_cv_berkeley_db2=no
11297         else
11298                 ol_cv_berkeley_db2=yes
11299         fi
11300
11301 fi
11302
11303 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11304  if test $ol_cv_berkeley_db2 = yes ; then
11305         cat >> confdefs.h <<\EOF
11306 #define HAVE_BERKELEY_DB2 1
11307 EOF
11308
11309  fi
11310
11311
11312         if test $ol_cv_berkeley_db2 = yes ; then
11313                 ol_link_ldbm=db2
11314                 ol_with_ldbm_api=db2
11315
11316                 if test $ol_with_ldbm_type = hash ; then
11317                         cat >> confdefs.h <<\EOF
11318 #define LDBM_USE_DBHASH 1
11319 EOF
11320
11321                 else
11322                         cat >> confdefs.h <<\EOF
11323 #define LDBM_USE_DBBTREE 1
11324 EOF
11325
11326                 fi
11327
11328                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11329 echo "configure:11330: checking for DB_THREAD support" >&5
11330 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11331   echo $ac_n "(cached) $ac_c" 1>&6
11332 else
11333   
11334         ol_LIBS="$LIBS"
11335         if test $ol_cv_lib_db2 != yes ; then
11336                 LIBS="$ol_cv_lib_db2"
11337         fi
11338
11339         if test "$cross_compiling" = yes; then
11340   ol_cv_berkeley_db2_db_thread=cross
11341 else
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345
11346 #include <db.h>
11347 #ifndef NULL
11348 #define NULL ((void *)0)
11349 #endif
11350 main()
11351 {
11352         int rc;
11353         DB_ENV env;
11354         u_int32_t flags = DB_CREATE | DB_THREAD;
11355
11356         memset( &env, '\0', sizeof(env) );
11357
11358         rc = db_appinit( NULL, NULL, &env, flags );
11359
11360         if( rc == 0 ) {
11361                 db_appexit( &env );
11362         }
11363
11364         return rc;
11365 }
11366 EOF
11367 if { (eval echo configure:11368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11368 then
11369   ol_cv_berkeley_db2_db_thread=yes
11370 else
11371   echo "configure: failed program was:" >&5
11372   cat conftest.$ac_ext >&5
11373   rm -fr conftest*
11374   ol_cv_berkeley_db2_db_thread=no
11375 fi
11376 rm -fr conftest*
11377 fi
11378
11379
11380         LIBS="$ol_LIBS"
11381
11382         if test $ol_cv_berkeley_db2_db_thread != no ; then
11383                 cat >> confdefs.h <<\EOF
11384 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11385 EOF
11386
11387         fi
11388
11389 fi
11390
11391 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11392
11393                                                 if test $ol_cv_lib_db2 != yes ; then
11394                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11395                 fi
11396         fi
11397 fi
11398
11399 ol_link_bdb2=no
11400 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11401         if test $ol_cv_berkeley_db2_db_thread != no ; then
11402                 ol_link_bdb2=yes
11403         else
11404                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11405         fi
11406 fi
11407
11408 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11409         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11410 echo "configure:11411: checking for Berkeley DB library" >&5
11411 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11412   echo $ac_n "(cached) $ac_c" 1>&6
11413 else
11414   
11415         for ac_hdr in db1/db.h
11416 do
11417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11419 echo "configure:11420: checking for $ac_hdr" >&5
11420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11421   echo $ac_n "(cached) $ac_c" 1>&6
11422 else
11423   cat > conftest.$ac_ext <<EOF
11424 #line 11425 "configure"
11425 #include "confdefs.h"
11426 #include <$ac_hdr>
11427 EOF
11428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11429 { (eval echo configure:11430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11431 if test -z "$ac_err"; then
11432   rm -rf conftest*
11433   eval "ac_cv_header_$ac_safe=yes"
11434 else
11435   echo "$ac_err" >&5
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -rf conftest*
11439   eval "ac_cv_header_$ac_safe=no"
11440 fi
11441 rm -f conftest*
11442 fi
11443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11444   echo "$ac_t""yes" 1>&6
11445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11446   cat >> confdefs.h <<EOF
11447 #define $ac_tr_hdr 1
11448 EOF
11449  
11450 else
11451   echo "$ac_t""no" 1>&6
11452 fi
11453 done
11454
11455         ol_LIBS="$LIBS"
11456         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11457 echo "configure:11458: checking for dbopen" >&5
11458 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11459   echo $ac_n "(cached) $ac_c" 1>&6
11460 else
11461   cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 /* System header to define __stub macros and hopefully few prototypes,
11465     which can conflict with char dbopen(); below.  */
11466 #include <assert.h>
11467 /* Override any gcc2 internal prototype to avoid an error.  */
11468 /* We use char because int might match the return type of a gcc2
11469     builtin and then its argument prototype would still apply.  */
11470 char dbopen();
11471 char (*f)();
11472
11473 int main() {
11474
11475 /* The GNU C library defines this for functions which it implements
11476     to always fail with ENOSYS.  Some functions are actually named
11477     something starting with __ and the normal name is an alias.  */
11478 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11479 choke me
11480 #else
11481 f = dbopen;
11482 #endif
11483
11484 ; return 0; }
11485 EOF
11486 if { (eval echo configure:11487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11487   rm -rf conftest*
11488   eval "ac_cv_func_dbopen=yes"
11489 else
11490   echo "configure: failed program was:" >&5
11491   cat conftest.$ac_ext >&5
11492   rm -rf conftest*
11493   eval "ac_cv_func_dbopen=no"
11494 fi
11495 rm -f conftest*
11496 fi
11497
11498 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11499   echo "$ac_t""yes" 1>&6
11500   ol_cv_lib_db=yes
11501 else
11502   echo "$ac_t""no" 1>&6
11503
11504                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11505 echo "configure:11506: checking for dbopen in -ldb1" >&5
11506 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11508   echo $ac_n "(cached) $ac_c" 1>&6
11509 else
11510   ac_save_LIBS="$LIBS"
11511 LIBS="-ldb1  $LIBS"
11512 cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515 /* Override any gcc2 internal prototype to avoid an error.  */
11516 /* We use char because int might match the return type of a gcc2
11517     builtin and then its argument prototype would still apply.  */
11518 char dbopen();
11519
11520 int main() {
11521 dbopen()
11522 ; return 0; }
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11525   rm -rf conftest*
11526   eval "ac_cv_lib_$ac_lib_var=yes"
11527 else
11528   echo "configure: failed program was:" >&5
11529   cat conftest.$ac_ext >&5
11530   rm -rf conftest*
11531   eval "ac_cv_lib_$ac_lib_var=no"
11532 fi
11533 rm -f conftest*
11534 LIBS="$ac_save_LIBS"
11535
11536 fi
11537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11538   echo "$ac_t""yes" 1>&6
11539   ol_cv_lib_db=-ldb1
11540 else
11541   echo "$ac_t""no" 1>&6
11542
11543                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11544 echo "configure:11545: checking for dbopen in -ldb" >&5
11545 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11547   echo $ac_n "(cached) $ac_c" 1>&6
11548 else
11549   ac_save_LIBS="$LIBS"
11550 LIBS="-ldb  $LIBS"
11551 cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554 /* Override any gcc2 internal prototype to avoid an error.  */
11555 /* We use char because int might match the return type of a gcc2
11556     builtin and then its argument prototype would still apply.  */
11557 char dbopen();
11558
11559 int main() {
11560 dbopen()
11561 ; return 0; }
11562 EOF
11563 if { (eval echo configure:11564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11564   rm -rf conftest*
11565   eval "ac_cv_lib_$ac_lib_var=yes"
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   eval "ac_cv_lib_$ac_lib_var=no"
11571 fi
11572 rm -f conftest*
11573 LIBS="$ac_save_LIBS"
11574
11575 fi
11576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11577   echo "$ac_t""yes" 1>&6
11578   ol_cv_lib_db=-ldb
11579 else
11580   echo "$ac_t""no" 1>&6
11581 ol_cv_lib_db=no
11582 fi
11583
11584                 
11585 fi
11586
11587         
11588 fi
11589
11590         LIBS="$ol_LIBS"
11591
11592 fi
11593
11594 echo "$ac_t""$ol_cv_lib_db" 1>&6
11595
11596
11597 for ac_hdr in db_185.h
11598 do
11599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11601 echo "configure:11602: checking for $ac_hdr" >&5
11602 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 #include <$ac_hdr>
11609 EOF
11610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11611 { (eval echo configure:11612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11613 if test -z "$ac_err"; then
11614   rm -rf conftest*
11615   eval "ac_cv_header_$ac_safe=yes"
11616 else
11617   echo "$ac_err" >&5
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620   rm -rf conftest*
11621   eval "ac_cv_header_$ac_safe=no"
11622 fi
11623 rm -f conftest*
11624 fi
11625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11626   echo "$ac_t""yes" 1>&6
11627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11628   cat >> confdefs.h <<EOF
11629 #define $ac_tr_hdr 1
11630 EOF
11631  
11632 else
11633   echo "$ac_t""no" 1>&6
11634 fi
11635 done
11636
11637 if test "$ol_cv_header_db2" = yes ; then
11638         
11639         ol_cv_header_db=$ac_cv_header_db_185_h
11640 else
11641         ol_cv_header_db=$ac_cv_header_db_h
11642 fi
11643
11644
11645  
11646  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11647 echo "configure:11648: checking for Berkeley DB" >&5
11648 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   
11652         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11653                 ol_cv_berkeley_db=no
11654         else
11655                 ol_cv_berkeley_db=yes
11656         fi
11657
11658 fi
11659
11660 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11661  if test $ol_cv_berkeley_db = yes ; then
11662         cat >> confdefs.h <<\EOF
11663 #define HAVE_BERKELEY_DB 1
11664 EOF
11665
11666  fi
11667
11668
11669         if test $ol_cv_berkeley_db = yes ; then
11670                 ol_link_ldbm=db
11671                 ol_with_ldbm_api=db
11672
11673                 if test $ol_with_ldbm_type = hash ; then
11674                         cat >> confdefs.h <<\EOF
11675 #define LDBM_USE_DBHASH 1
11676 EOF
11677
11678                 else
11679                         cat >> confdefs.h <<\EOF
11680 #define LDBM_USE_DBBTREE 1
11681 EOF
11682
11683                 fi
11684
11685                                                 if test $ol_cv_lib_db != yes ; then
11686                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11687                 fi
11688         fi
11689 fi
11690
11691 if test $ol_with_ldbm_api = manual ; then
11692                 ol_link_ldbm=yes
11693
11694         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11695
11696         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11697 do
11698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11700 echo "configure:11701: checking for $ac_hdr" >&5
11701 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11702   echo $ac_n "(cached) $ac_c" 1>&6
11703 else
11704   cat > conftest.$ac_ext <<EOF
11705 #line 11706 "configure"
11706 #include "confdefs.h"
11707 #include <$ac_hdr>
11708 EOF
11709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11710 { (eval echo configure:11711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11712 if test -z "$ac_err"; then
11713   rm -rf conftest*
11714   eval "ac_cv_header_$ac_safe=yes"
11715 else
11716   echo "$ac_err" >&5
11717   echo "configure: failed program was:" >&5
11718   cat conftest.$ac_ext >&5
11719   rm -rf conftest*
11720   eval "ac_cv_header_$ac_safe=no"
11721 fi
11722 rm -f conftest*
11723 fi
11724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11725   echo "$ac_t""yes" 1>&6
11726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11727   cat >> confdefs.h <<EOF
11728 #define $ac_tr_hdr 1
11729 EOF
11730  
11731 else
11732   echo "$ac_t""no" 1>&6
11733 fi
11734 done
11735
11736 fi
11737
11738 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11739         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11740         ol_with_ldbm_api=none
11741 fi
11742
11743 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11744         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11745 echo "configure:11746: checking for MDBM library" >&5
11746 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749         ol_LIBS="$LIBS"
11750         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11751 echo "configure:11752: checking for mdbm_set_chain" >&5
11752 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11753   echo $ac_n "(cached) $ac_c" 1>&6
11754 else
11755   cat > conftest.$ac_ext <<EOF
11756 #line 11757 "configure"
11757 #include "confdefs.h"
11758 /* System header to define __stub macros and hopefully few prototypes,
11759     which can conflict with char mdbm_set_chain(); below.  */
11760 #include <assert.h>
11761 /* Override any gcc2 internal prototype to avoid an error.  */
11762 /* We use char because int might match the return type of a gcc2
11763     builtin and then its argument prototype would still apply.  */
11764 char mdbm_set_chain();
11765 char (*f)();
11766
11767 int main() {
11768
11769 /* The GNU C library defines this for functions which it implements
11770     to always fail with ENOSYS.  Some functions are actually named
11771     something starting with __ and the normal name is an alias.  */
11772 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11773 choke me
11774 #else
11775 f = mdbm_set_chain;
11776 #endif
11777
11778 ; return 0; }
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11781   rm -rf conftest*
11782   eval "ac_cv_func_mdbm_set_chain=yes"
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   eval "ac_cv_func_mdbm_set_chain=no"
11788 fi
11789 rm -f conftest*
11790 fi
11791
11792 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11793   echo "$ac_t""yes" 1>&6
11794   ol_cv_lib_mdbm=yes
11795 else
11796   echo "$ac_t""no" 1>&6
11797
11798                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11799 echo "configure:11800: checking for mdbm_set_chain in -lmdbm" >&5
11800 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11802   echo $ac_n "(cached) $ac_c" 1>&6
11803 else
11804   ac_save_LIBS="$LIBS"
11805 LIBS="-lmdbm  $LIBS"
11806 cat > conftest.$ac_ext <<EOF
11807 #line 11808 "configure"
11808 #include "confdefs.h"
11809 /* Override any gcc2 internal prototype to avoid an error.  */
11810 /* We use char because int might match the return type of a gcc2
11811     builtin and then its argument prototype would still apply.  */
11812 char mdbm_set_chain();
11813
11814 int main() {
11815 mdbm_set_chain()
11816 ; return 0; }
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11819   rm -rf conftest*
11820   eval "ac_cv_lib_$ac_lib_var=yes"
11821 else
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   eval "ac_cv_lib_$ac_lib_var=no"
11826 fi
11827 rm -f conftest*
11828 LIBS="$ac_save_LIBS"
11829
11830 fi
11831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11832   echo "$ac_t""yes" 1>&6
11833   ol_cv_lib_mdbm=-lmdbm
11834 else
11835   echo "$ac_t""no" 1>&6
11836 ol_cv_lib_mdbm=no
11837 fi
11838
11839         
11840 fi
11841
11842         LIBS="$ol_LIBS"
11843
11844 fi
11845
11846 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11847
11848
11849  for ac_hdr in mdbm.h
11850 do
11851 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11852 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11853 echo "configure:11854: checking for $ac_hdr" >&5
11854 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11855   echo $ac_n "(cached) $ac_c" 1>&6
11856 else
11857   cat > conftest.$ac_ext <<EOF
11858 #line 11859 "configure"
11859 #include "confdefs.h"
11860 #include <$ac_hdr>
11861 EOF
11862 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11863 { (eval echo configure:11864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11864 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11865 if test -z "$ac_err"; then
11866   rm -rf conftest*
11867   eval "ac_cv_header_$ac_safe=yes"
11868 else
11869   echo "$ac_err" >&5
11870   echo "configure: failed program was:" >&5
11871   cat conftest.$ac_ext >&5
11872   rm -rf conftest*
11873   eval "ac_cv_header_$ac_safe=no"
11874 fi
11875 rm -f conftest*
11876 fi
11877 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11878   echo "$ac_t""yes" 1>&6
11879     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11880   cat >> confdefs.h <<EOF
11881 #define $ac_tr_hdr 1
11882 EOF
11883  
11884 else
11885   echo "$ac_t""no" 1>&6
11886 fi
11887 done
11888
11889  echo $ac_n "checking for db""... $ac_c" 1>&6
11890 echo "configure:11891: checking for db" >&5
11891 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11892   echo $ac_n "(cached) $ac_c" 1>&6
11893 else
11894   
11895         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11896                 ol_cv_mdbm=no
11897         else
11898                 ol_cv_mdbm=yes
11899         fi
11900
11901 fi
11902
11903 echo "$ac_t""$ol_cv_mdbm" 1>&6
11904  if test $ol_cv_mdbm = yes ; then
11905         cat >> confdefs.h <<\EOF
11906 #define HAVE_MDBM 1
11907 EOF
11908
11909  fi
11910
11911
11912         if test $ol_cv_mdbm = yes ; then
11913                 ol_link_ldbm=mdbm
11914                 ol_with_ldbm_api=mdbm
11915                 if test $ol_cv_lib_mdbm != yes ; then
11916                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11917                 fi
11918         fi
11919 fi
11920
11921 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11922         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11923 echo "configure:11924: checking for GDBM library" >&5
11924 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11925   echo $ac_n "(cached) $ac_c" 1>&6
11926 else
11927         ol_LIBS="$LIBS"
11928         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11929 echo "configure:11930: checking for gdbm_open" >&5
11930 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11931   echo $ac_n "(cached) $ac_c" 1>&6
11932 else
11933   cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936 /* System header to define __stub macros and hopefully few prototypes,
11937     which can conflict with char gdbm_open(); below.  */
11938 #include <assert.h>
11939 /* Override any gcc2 internal prototype to avoid an error.  */
11940 /* We use char because int might match the return type of a gcc2
11941     builtin and then its argument prototype would still apply.  */
11942 char gdbm_open();
11943 char (*f)();
11944
11945 int main() {
11946
11947 /* The GNU C library defines this for functions which it implements
11948     to always fail with ENOSYS.  Some functions are actually named
11949     something starting with __ and the normal name is an alias.  */
11950 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11951 choke me
11952 #else
11953 f = gdbm_open;
11954 #endif
11955
11956 ; return 0; }
11957 EOF
11958 if { (eval echo configure:11959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11959   rm -rf conftest*
11960   eval "ac_cv_func_gdbm_open=yes"
11961 else
11962   echo "configure: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   rm -rf conftest*
11965   eval "ac_cv_func_gdbm_open=no"
11966 fi
11967 rm -f conftest*
11968 fi
11969
11970 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11971   echo "$ac_t""yes" 1>&6
11972   ol_cv_lib_gdbm=yes
11973 else
11974   echo "$ac_t""no" 1>&6
11975
11976                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11977 echo "configure:11978: checking for gdbm_open in -lgdbm" >&5
11978 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11980   echo $ac_n "(cached) $ac_c" 1>&6
11981 else
11982   ac_save_LIBS="$LIBS"
11983 LIBS="-lgdbm  $LIBS"
11984 cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987 /* Override any gcc2 internal prototype to avoid an error.  */
11988 /* We use char because int might match the return type of a gcc2
11989     builtin and then its argument prototype would still apply.  */
11990 char gdbm_open();
11991
11992 int main() {
11993 gdbm_open()
11994 ; return 0; }
11995 EOF
11996 if { (eval echo configure:11997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11997   rm -rf conftest*
11998   eval "ac_cv_lib_$ac_lib_var=yes"
11999 else
12000   echo "configure: failed program was:" >&5
12001   cat conftest.$ac_ext >&5
12002   rm -rf conftest*
12003   eval "ac_cv_lib_$ac_lib_var=no"
12004 fi
12005 rm -f conftest*
12006 LIBS="$ac_save_LIBS"
12007
12008 fi
12009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12010   echo "$ac_t""yes" 1>&6
12011   ol_cv_lib_gdbm=-lgdbm
12012 else
12013   echo "$ac_t""no" 1>&6
12014 ol_cv_lib_gdbm=no
12015 fi
12016
12017         
12018 fi
12019
12020         LIBS="$ol_LIBS"
12021
12022 fi
12023
12024 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12025
12026
12027  for ac_hdr in gdbm.h
12028 do
12029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12031 echo "configure:12032: checking for $ac_hdr" >&5
12032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12033   echo $ac_n "(cached) $ac_c" 1>&6
12034 else
12035   cat > conftest.$ac_ext <<EOF
12036 #line 12037 "configure"
12037 #include "confdefs.h"
12038 #include <$ac_hdr>
12039 EOF
12040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12041 { (eval echo configure:12042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12043 if test -z "$ac_err"; then
12044   rm -rf conftest*
12045   eval "ac_cv_header_$ac_safe=yes"
12046 else
12047   echo "$ac_err" >&5
12048   echo "configure: failed program was:" >&5
12049   cat conftest.$ac_ext >&5
12050   rm -rf conftest*
12051   eval "ac_cv_header_$ac_safe=no"
12052 fi
12053 rm -f conftest*
12054 fi
12055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12056   echo "$ac_t""yes" 1>&6
12057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12058   cat >> confdefs.h <<EOF
12059 #define $ac_tr_hdr 1
12060 EOF
12061  
12062 else
12063   echo "$ac_t""no" 1>&6
12064 fi
12065 done
12066
12067  echo $ac_n "checking for db""... $ac_c" 1>&6
12068 echo "configure:12069: checking for db" >&5
12069 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12070   echo $ac_n "(cached) $ac_c" 1>&6
12071 else
12072   
12073         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12074                 ol_cv_gdbm=no
12075         else
12076                 ol_cv_gdbm=yes
12077         fi
12078
12079 fi
12080
12081 echo "$ac_t""$ol_cv_gdbm" 1>&6
12082  if test $ol_cv_gdbm = yes ; then
12083         cat >> confdefs.h <<\EOF
12084 #define HAVE_GDBM 1
12085 EOF
12086
12087  fi
12088
12089
12090         if test $ol_cv_gdbm = yes ; then
12091                 ol_link_ldbm=gdbm
12092                 ol_with_ldbm_api=gdbm
12093
12094                 if test $ol_cv_lib_gdbm != yes ; then
12095                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12096                 fi
12097         fi
12098 fi
12099
12100 if test $ol_with_ldbm_api = auto ; then
12101         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
12102 elif test $ol_with_ldbm_api = ndbm ; then
12103         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12104 echo "configure:12105: checking for NDBM library" >&5
12105 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12106   echo $ac_n "(cached) $ac_c" 1>&6
12107 else
12108         ol_LIBS="$LIBS"
12109         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12110 echo "configure:12111: checking for dbm_open" >&5
12111 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12112   echo $ac_n "(cached) $ac_c" 1>&6
12113 else
12114   cat > conftest.$ac_ext <<EOF
12115 #line 12116 "configure"
12116 #include "confdefs.h"
12117 /* System header to define __stub macros and hopefully few prototypes,
12118     which can conflict with char dbm_open(); below.  */
12119 #include <assert.h>
12120 /* Override any gcc2 internal prototype to avoid an error.  */
12121 /* We use char because int might match the return type of a gcc2
12122     builtin and then its argument prototype would still apply.  */
12123 char dbm_open();
12124 char (*f)();
12125
12126 int main() {
12127
12128 /* The GNU C library defines this for functions which it implements
12129     to always fail with ENOSYS.  Some functions are actually named
12130     something starting with __ and the normal name is an alias.  */
12131 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12132 choke me
12133 #else
12134 f = dbm_open;
12135 #endif
12136
12137 ; return 0; }
12138 EOF
12139 if { (eval echo configure:12140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12140   rm -rf conftest*
12141   eval "ac_cv_func_dbm_open=yes"
12142 else
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -rf conftest*
12146   eval "ac_cv_func_dbm_open=no"
12147 fi
12148 rm -f conftest*
12149 fi
12150
12151 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12152   echo "$ac_t""yes" 1>&6
12153   ol_cv_lib_ndbm=yes
12154 else
12155   echo "$ac_t""no" 1>&6
12156
12157                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12158 echo "configure:12159: checking for dbm_open in -lndbm" >&5
12159 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12161   echo $ac_n "(cached) $ac_c" 1>&6
12162 else
12163   ac_save_LIBS="$LIBS"
12164 LIBS="-lndbm  $LIBS"
12165 cat > conftest.$ac_ext <<EOF
12166 #line 12167 "configure"
12167 #include "confdefs.h"
12168 /* Override any gcc2 internal prototype to avoid an error.  */
12169 /* We use char because int might match the return type of a gcc2
12170     builtin and then its argument prototype would still apply.  */
12171 char dbm_open();
12172
12173 int main() {
12174 dbm_open()
12175 ; return 0; }
12176 EOF
12177 if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12178   rm -rf conftest*
12179   eval "ac_cv_lib_$ac_lib_var=yes"
12180 else
12181   echo "configure: failed program was:" >&5
12182   cat conftest.$ac_ext >&5
12183   rm -rf conftest*
12184   eval "ac_cv_lib_$ac_lib_var=no"
12185 fi
12186 rm -f conftest*
12187 LIBS="$ac_save_LIBS"
12188
12189 fi
12190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12191   echo "$ac_t""yes" 1>&6
12192   ol_cv_lib_ndbm=-lndbm
12193 else
12194   echo "$ac_t""no" 1>&6
12195
12196                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12197 echo "configure:12198: checking for dbm_open in -ldbm" >&5
12198 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12199 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12200   echo $ac_n "(cached) $ac_c" 1>&6
12201 else
12202   ac_save_LIBS="$LIBS"
12203 LIBS="-ldbm  $LIBS"
12204 cat > conftest.$ac_ext <<EOF
12205 #line 12206 "configure"
12206 #include "confdefs.h"
12207 /* Override any gcc2 internal prototype to avoid an error.  */
12208 /* We use char because int might match the return type of a gcc2
12209     builtin and then its argument prototype would still apply.  */
12210 char dbm_open();
12211
12212 int main() {
12213 dbm_open()
12214 ; return 0; }
12215 EOF
12216 if { (eval echo configure:12217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12217   rm -rf conftest*
12218   eval "ac_cv_lib_$ac_lib_var=yes"
12219 else
12220   echo "configure: failed program was:" >&5
12221   cat conftest.$ac_ext >&5
12222   rm -rf conftest*
12223   eval "ac_cv_lib_$ac_lib_var=no"
12224 fi
12225 rm -f conftest*
12226 LIBS="$ac_save_LIBS"
12227
12228 fi
12229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12230   echo "$ac_t""yes" 1>&6
12231   ol_cv_lib_ndbm=-ldbm
12232 else
12233   echo "$ac_t""no" 1>&6
12234 ol_cv_lib_ndbm=no
12235 fi
12236                 
12237 fi
12238
12239         
12240 fi
12241
12242         LIBS="$ol_LIBS"
12243
12244 fi
12245
12246 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12247
12248
12249  for ac_hdr in ndbm.h
12250 do
12251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12253 echo "configure:12254: checking for $ac_hdr" >&5
12254 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12255   echo $ac_n "(cached) $ac_c" 1>&6
12256 else
12257   cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 #include <$ac_hdr>
12261 EOF
12262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12263 { (eval echo configure:12264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12265 if test -z "$ac_err"; then
12266   rm -rf conftest*
12267   eval "ac_cv_header_$ac_safe=yes"
12268 else
12269   echo "$ac_err" >&5
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -rf conftest*
12273   eval "ac_cv_header_$ac_safe=no"
12274 fi
12275 rm -f conftest*
12276 fi
12277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12278   echo "$ac_t""yes" 1>&6
12279     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12280   cat >> confdefs.h <<EOF
12281 #define $ac_tr_hdr 1
12282 EOF
12283  
12284 else
12285   echo "$ac_t""no" 1>&6
12286 fi
12287 done
12288
12289  echo $ac_n "checking for db""... $ac_c" 1>&6
12290 echo "configure:12291: checking for db" >&5
12291 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12292   echo $ac_n "(cached) $ac_c" 1>&6
12293 else
12294   
12295         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12296                 ol_cv_ndbm=no
12297         else
12298                 ol_cv_ndbm=yes
12299         fi
12300
12301 fi
12302
12303 echo "$ac_t""$ol_cv_ndbm" 1>&6
12304  if test $ol_cv_ndbm = yes ; then
12305         cat >> confdefs.h <<\EOF
12306 #define HAVE_NDBM 1
12307 EOF
12308
12309  fi
12310
12311
12312         if test $ol_cv_ndbm = yes ; then
12313                 ol_link_ldbm=ndbm
12314                 ol_with_ldbm_api=ndbm
12315
12316                 if test $ol_cv_lib_ndbm != yes ; then
12317                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12318                 fi
12319         fi
12320 fi
12321
12322 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12323         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12324         if test $ol_enable_ldbm = yes ; then
12325                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12326         fi
12327
12328         echo "configure: warning: disabling LDBM" 1>&2
12329         ol_enable_ldbm=no
12330 fi
12331
12332 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12333         LINK_BINS_DYNAMIC="yes"
12334 else
12335         LINK_BINS_DYNAMIC="no"
12336 fi
12337
12338 if test $ol_enable_wrappers != no ; then
12339         for ac_hdr in tcpd.h
12340 do
12341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12343 echo "configure:12344: checking for $ac_hdr" >&5
12344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12345   echo $ac_n "(cached) $ac_c" 1>&6
12346 else
12347   cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12350 #include <$ac_hdr>
12351 EOF
12352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12353 { (eval echo configure:12354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12355 if test -z "$ac_err"; then
12356   rm -rf conftest*
12357   eval "ac_cv_header_$ac_safe=yes"
12358 else
12359   echo "$ac_err" >&5
12360   echo "configure: failed program was:" >&5
12361   cat conftest.$ac_ext >&5
12362   rm -rf conftest*
12363   eval "ac_cv_header_$ac_safe=no"
12364 fi
12365 rm -f conftest*
12366 fi
12367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12368   echo "$ac_t""yes" 1>&6
12369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12370   cat >> confdefs.h <<EOF
12371 #define $ac_tr_hdr 1
12372 EOF
12373  
12374 else
12375   echo "$ac_t""no" 1>&6
12376 fi
12377 done
12378
12379
12380         if test $ac_cv_header_tcpd_h != yes ; then
12381                 have_wrappers=no
12382         else
12383                 cat > conftest.$ac_ext <<EOF
12384 #line 12385 "configure"
12385 #include "confdefs.h"
12386
12387 int allow_severity = 0;
12388 int deny_severity  = 0;
12389                 
12390 int main() {
12391 hosts_access()
12392 ; return 0; }
12393 EOF
12394 if { (eval echo configure:12395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12395   rm -rf conftest*
12396   have_wrappers=yes
12397 else
12398   echo "configure: failed program was:" >&5
12399   cat conftest.$ac_ext >&5
12400   rm -rf conftest*
12401   have_wrappers=no
12402 fi
12403 rm -f conftest*
12404         fi
12405
12406         if test $have_wrappers = yes ; then
12407                 cat >> confdefs.h <<\EOF
12408 #define HAVE_TCPD 1
12409 EOF
12410
12411                 WRAP_LIBS="-lwrap"
12412
12413                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12414 echo "configure:12415: checking for main in -lnsl" >&5
12415 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419   ac_save_LIBS="$LIBS"
12420 LIBS="-lnsl  $LIBS"
12421 cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424
12425 int main() {
12426 main()
12427 ; return 0; }
12428 EOF
12429 if { (eval echo configure:12430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12430   rm -rf conftest*
12431   eval "ac_cv_lib_$ac_lib_var=yes"
12432 else
12433   echo "configure: failed program was:" >&5
12434   cat conftest.$ac_ext >&5
12435   rm -rf conftest*
12436   eval "ac_cv_lib_$ac_lib_var=no"
12437 fi
12438 rm -f conftest*
12439 LIBS="$ac_save_LIBS"
12440
12441 fi
12442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12443   echo "$ac_t""yes" 1>&6
12444     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12445     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12446   cat >> confdefs.h <<EOF
12447 #define $ac_tr_lib 1
12448 EOF
12449
12450   LIBS="-lnsl $LIBS"
12451
12452 else
12453   echo "$ac_t""no" 1>&6
12454 fi
12455
12456         else
12457                 echo "configure: warning: could not find -lwrap" 1>&2
12458                 if test $ol_enable_wrappers = yes ; then
12459                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12460                 fi
12461
12462                 echo "configure: warning: disabling wrappers support" 1>&2
12463                 ol_enable_wrappers=no
12464                 WRAP_LIBS=""
12465         fi
12466 fi
12467
12468 if test $ol_enable_syslog != no ; then
12469         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12470 echo "configure:12471: checking for openlog" >&5
12471 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12472   echo $ac_n "(cached) $ac_c" 1>&6
12473 else
12474   cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 /* System header to define __stub macros and hopefully few prototypes,
12478     which can conflict with char openlog(); below.  */
12479 #include <assert.h>
12480 /* Override any gcc2 internal prototype to avoid an error.  */
12481 /* We use char because int might match the return type of a gcc2
12482     builtin and then its argument prototype would still apply.  */
12483 char openlog();
12484 char (*f)();
12485
12486 int main() {
12487
12488 /* The GNU C library defines this for functions which it implements
12489     to always fail with ENOSYS.  Some functions are actually named
12490     something starting with __ and the normal name is an alias.  */
12491 #if defined (__stub_openlog) || defined (__stub___openlog)
12492 choke me
12493 #else
12494 f = openlog;
12495 #endif
12496
12497 ; return 0; }
12498 EOF
12499 if { (eval echo configure:12500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12500   rm -rf conftest*
12501   eval "ac_cv_func_openlog=yes"
12502 else
12503   echo "configure: failed program was:" >&5
12504   cat conftest.$ac_ext >&5
12505   rm -rf conftest*
12506   eval "ac_cv_func_openlog=no"
12507 fi
12508 rm -f conftest*
12509 fi
12510
12511 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12512   echo "$ac_t""yes" 1>&6
12513   :
12514 else
12515   echo "$ac_t""no" 1>&6
12516 fi
12517
12518         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12519                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12520         fi
12521         ol_enable_syslog=$ac_cv_func_openlog
12522 fi
12523
12524 if test $ol_enable_dmalloc != no ; then
12525         for ac_hdr in dmalloc.h
12526 do
12527 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12528 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12529 echo "configure:12530: checking for $ac_hdr" >&5
12530 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12531   echo $ac_n "(cached) $ac_c" 1>&6
12532 else
12533   cat > conftest.$ac_ext <<EOF
12534 #line 12535 "configure"
12535 #include "confdefs.h"
12536 #include <$ac_hdr>
12537 EOF
12538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12539 { (eval echo configure:12540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12541 if test -z "$ac_err"; then
12542   rm -rf conftest*
12543   eval "ac_cv_header_$ac_safe=yes"
12544 else
12545   echo "$ac_err" >&5
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   eval "ac_cv_header_$ac_safe=no"
12550 fi
12551 rm -f conftest*
12552 fi
12553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12554   echo "$ac_t""yes" 1>&6
12555     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12556   cat >> confdefs.h <<EOF
12557 #define $ac_tr_hdr 1
12558 EOF
12559  
12560 else
12561   echo "$ac_t""no" 1>&6
12562 fi
12563 done
12564
12565         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12566 echo "configure:12567: checking for dmalloc_shutdown in -ldmalloc" >&5
12567 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12569   echo $ac_n "(cached) $ac_c" 1>&6
12570 else
12571   ac_save_LIBS="$LIBS"
12572 LIBS="-ldmalloc  $LIBS"
12573 cat > conftest.$ac_ext <<EOF
12574 #line 12575 "configure"
12575 #include "confdefs.h"
12576 /* Override any gcc2 internal prototype to avoid an error.  */
12577 /* We use char because int might match the return type of a gcc2
12578     builtin and then its argument prototype would still apply.  */
12579 char dmalloc_shutdown();
12580
12581 int main() {
12582 dmalloc_shutdown()
12583 ; return 0; }
12584 EOF
12585 if { (eval echo configure:12586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12586   rm -rf conftest*
12587   eval "ac_cv_lib_$ac_lib_var=yes"
12588 else
12589   echo "configure: failed program was:" >&5
12590   cat conftest.$ac_ext >&5
12591   rm -rf conftest*
12592   eval "ac_cv_lib_$ac_lib_var=no"
12593 fi
12594 rm -f conftest*
12595 LIBS="$ac_save_LIBS"
12596
12597 fi
12598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12599   echo "$ac_t""yes" 1>&6
12600     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12601     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12602   cat >> confdefs.h <<EOF
12603 #define $ac_tr_lib 1
12604 EOF
12605
12606   LIBS="-ldmalloc $LIBS"
12607
12608 else
12609   echo "$ac_t""no" 1>&6
12610 fi
12611
12612 fi
12613
12614 if test $ol_enable_tcl != no ; then
12615         for ac_hdr in tcl.h
12616 do
12617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12619 echo "configure:12620: checking for $ac_hdr" >&5
12620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12621   echo $ac_n "(cached) $ac_c" 1>&6
12622 else
12623   cat > conftest.$ac_ext <<EOF
12624 #line 12625 "configure"
12625 #include "confdefs.h"
12626 #include <$ac_hdr>
12627 EOF
12628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12629 { (eval echo configure:12630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12631 if test -z "$ac_err"; then
12632   rm -rf conftest*
12633   eval "ac_cv_header_$ac_safe=yes"
12634 else
12635   echo "$ac_err" >&5
12636   echo "configure: failed program was:" >&5
12637   cat conftest.$ac_ext >&5
12638   rm -rf conftest*
12639   eval "ac_cv_header_$ac_safe=no"
12640 fi
12641 rm -f conftest*
12642 fi
12643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12644   echo "$ac_t""yes" 1>&6
12645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12646   cat >> confdefs.h <<EOF
12647 #define $ac_tr_hdr 1
12648 EOF
12649  
12650 else
12651   echo "$ac_t""no" 1>&6
12652 fi
12653 done
12654
12655
12656         if test $ac_cv_header_tcl_h != yes ; then
12657                 have_tcl=no
12658         else
12659                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12660                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12661 echo "configure:12662: checking for main in -l$lib" >&5
12662 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12664   echo $ac_n "(cached) $ac_c" 1>&6
12665 else
12666   ac_save_LIBS="$LIBS"
12667 LIBS="-l$lib  $LIBS"
12668 cat > conftest.$ac_ext <<EOF
12669 #line 12670 "configure"
12670 #include "confdefs.h"
12671
12672 int main() {
12673 main()
12674 ; return 0; }
12675 EOF
12676 if { (eval echo configure:12677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12677   rm -rf conftest*
12678   eval "ac_cv_lib_$ac_lib_var=yes"
12679 else
12680   echo "configure: failed program was:" >&5
12681   cat conftest.$ac_ext >&5
12682   rm -rf conftest*
12683   eval "ac_cv_lib_$ac_lib_var=no"
12684 fi
12685 rm -f conftest*
12686 LIBS="$ac_save_LIBS"
12687
12688 fi
12689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12690   echo "$ac_t""yes" 1>&6
12691   have_tcl=yes
12692                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12693                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12694                            else
12695                                MOD_TCL_LIB="-l${lib}"
12696                            fi;break
12697 else
12698   echo "$ac_t""no" 1>&6
12699 have_tcl=no
12700 fi
12701
12702                 done
12703         fi
12704
12705         if test $have_tcl != yes ; then
12706                 echo "configure: warning: could not find -ltcl" 1>&2
12707                 if test $ol_enable_tcl = yes ; then
12708                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12709                 fi
12710
12711                 ol_enable_tcl=no
12712         fi
12713 fi
12714
12715 ol_link_termcap=no
12716 for ac_hdr in termcap.h ncurses.h
12717 do
12718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12720 echo "configure:12721: checking for $ac_hdr" >&5
12721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12722   echo $ac_n "(cached) $ac_c" 1>&6
12723 else
12724   cat > conftest.$ac_ext <<EOF
12725 #line 12726 "configure"
12726 #include "confdefs.h"
12727 #include <$ac_hdr>
12728 EOF
12729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12730 { (eval echo configure:12731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12732 if test -z "$ac_err"; then
12733   rm -rf conftest*
12734   eval "ac_cv_header_$ac_safe=yes"
12735 else
12736   echo "$ac_err" >&5
12737   echo "configure: failed program was:" >&5
12738   cat conftest.$ac_ext >&5
12739   rm -rf conftest*
12740   eval "ac_cv_header_$ac_safe=no"
12741 fi
12742 rm -f conftest*
12743 fi
12744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12745   echo "$ac_t""yes" 1>&6
12746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12747   cat >> confdefs.h <<EOF
12748 #define $ac_tr_hdr 1
12749 EOF
12750  
12751 else
12752   echo "$ac_t""no" 1>&6
12753 fi
12754 done
12755
12756
12757 if test $ol_link_termcap = no ; then
12758         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12759 echo "configure:12760: checking for tputs in -ltermcap" >&5
12760 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12761 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12762   echo $ac_n "(cached) $ac_c" 1>&6
12763 else
12764   ac_save_LIBS="$LIBS"
12765 LIBS="-ltermcap  $LIBS"
12766 cat > conftest.$ac_ext <<EOF
12767 #line 12768 "configure"
12768 #include "confdefs.h"
12769 /* Override any gcc2 internal prototype to avoid an error.  */
12770 /* We use char because int might match the return type of a gcc2
12771     builtin and then its argument prototype would still apply.  */
12772 char tputs();
12773
12774 int main() {
12775 tputs()
12776 ; return 0; }
12777 EOF
12778 if { (eval echo configure:12779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12779   rm -rf conftest*
12780   eval "ac_cv_lib_$ac_lib_var=yes"
12781 else
12782   echo "configure: failed program was:" >&5
12783   cat conftest.$ac_ext >&5
12784   rm -rf conftest*
12785   eval "ac_cv_lib_$ac_lib_var=no"
12786 fi
12787 rm -f conftest*
12788 LIBS="$ac_save_LIBS"
12789
12790 fi
12791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12792   echo "$ac_t""yes" 1>&6
12793   have_termcap=yes
12794 else
12795   echo "$ac_t""no" 1>&6
12796 have_termcap=no
12797 fi
12798
12799         if test $have_termcap = yes ; then
12800                 cat >> confdefs.h <<\EOF
12801 #define HAVE_TERMCAP 1
12802 EOF
12803
12804                 ol_link_termcap=yes
12805                 TERMCAP_LIBS=-ltermcap
12806         fi
12807 fi
12808
12809 if test $ol_link_termcap = no ; then
12810         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12811 echo "configure:12812: checking for initscr in -lncurses" >&5
12812 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12813 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12814   echo $ac_n "(cached) $ac_c" 1>&6
12815 else
12816   ac_save_LIBS="$LIBS"
12817 LIBS="-lncurses  $LIBS"
12818 cat > conftest.$ac_ext <<EOF
12819 #line 12820 "configure"
12820 #include "confdefs.h"
12821 /* Override any gcc2 internal prototype to avoid an error.  */
12822 /* We use char because int might match the return type of a gcc2
12823     builtin and then its argument prototype would still apply.  */
12824 char initscr();
12825
12826 int main() {
12827 initscr()
12828 ; return 0; }
12829 EOF
12830 if { (eval echo configure:12831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12831   rm -rf conftest*
12832   eval "ac_cv_lib_$ac_lib_var=yes"
12833 else
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -rf conftest*
12837   eval "ac_cv_lib_$ac_lib_var=no"
12838 fi
12839 rm -f conftest*
12840 LIBS="$ac_save_LIBS"
12841
12842 fi
12843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12844   echo "$ac_t""yes" 1>&6
12845   have_ncurses=yes
12846 else
12847   echo "$ac_t""no" 1>&6
12848 have_ncurses=no
12849 fi
12850
12851         if test $have_ncurses = yes ; then
12852                 cat >> confdefs.h <<\EOF
12853 #define HAVE_NCURSES 1
12854 EOF
12855
12856                 ol_link_termcap=yes
12857                 TERMCAP_LIBS=-lncurses
12858         fi
12859 fi
12860
12861 if test $ol_link_termcap = no ; then
12862         cat >> confdefs.h <<\EOF
12863 #define NO_TERMCAP 1
12864 EOF
12865
12866         TERMCAP_LIBS=
12867 fi
12868
12869 ol_link_sasl=no
12870 if test $ol_with_cyrus_sasl != no ; then
12871         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12872 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12873 echo "configure:12874: checking for sasl.h" >&5
12874 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12875   echo $ac_n "(cached) $ac_c" 1>&6
12876 else
12877   cat > conftest.$ac_ext <<EOF
12878 #line 12879 "configure"
12879 #include "confdefs.h"
12880 #include <sasl.h>
12881 EOF
12882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12883 { (eval echo configure:12884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12885 if test -z "$ac_err"; then
12886   rm -rf conftest*
12887   eval "ac_cv_header_$ac_safe=yes"
12888 else
12889   echo "$ac_err" >&5
12890   echo "configure: failed program was:" >&5
12891   cat conftest.$ac_ext >&5
12892   rm -rf conftest*
12893   eval "ac_cv_header_$ac_safe=no"
12894 fi
12895 rm -f conftest*
12896 fi
12897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12898   echo "$ac_t""yes" 1>&6
12899   :
12900 else
12901   echo "$ac_t""no" 1>&6
12902 fi
12903
12904
12905         if test $ac_cv_header_sasl_h = yes ; then
12906                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12907 echo "configure:12908: checking for sasl_client_init in -lsasl" >&5
12908 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12910   echo $ac_n "(cached) $ac_c" 1>&6
12911 else
12912   ac_save_LIBS="$LIBS"
12913 LIBS="-lsasl  $LIBS"
12914 cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 /* Override any gcc2 internal prototype to avoid an error.  */
12918 /* We use char because int might match the return type of a gcc2
12919     builtin and then its argument prototype would still apply.  */
12920 char sasl_client_init();
12921
12922 int main() {
12923 sasl_client_init()
12924 ; return 0; }
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12927   rm -rf conftest*
12928   eval "ac_cv_lib_$ac_lib_var=yes"
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   eval "ac_cv_lib_$ac_lib_var=no"
12934 fi
12935 rm -f conftest*
12936 LIBS="$ac_save_LIBS"
12937
12938 fi
12939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12940   echo "$ac_t""yes" 1>&6
12941   have_cyrus_sasl=yes
12942 else
12943   echo "$ac_t""no" 1>&6
12944 have_cyrus_sasl=no
12945 fi
12946
12947
12948                 if test $have_cyrus_sasl != no ; then
12949                         SASL_LIBS="-lsasl"
12950                         cat >> confdefs.h <<\EOF
12951 #define HAVE_CYRUS_SASL 1
12952 EOF
12953
12954                         ol_link_sasl=yes
12955                 fi
12956         fi
12957
12958         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12959                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12960         fi
12961 fi
12962
12963 if test $cross_compiling != yes ; then
12964         dev=no
12965         if test -r /dev/urandom ; then
12966                 dev="/dev/urandom";
12967         elif test -r /idev/urandom ; then
12968                 dev="/idev/urandom";
12969         elif test -r /dev/srandom ; then
12970                 dev="/dev/srandom";
12971         elif test -r /dev/random ; then
12972                 dev="/dev/random";
12973         elif test -r /idev/random ; then
12974                 dev="/idev/random";
12975         fi
12976
12977         if test $dev != no ; then
12978                 cat >> confdefs.h <<EOF
12979 #define URANDOM_DEVICE "$dev"
12980 EOF
12981
12982         fi
12983 fi
12984
12985 ol_link_fetch=no
12986 if test $ol_with_fetch != no ; then
12987         ol=$LIBS
12988 LIBS="-lfetch -lcom_err $LIBS"
12989 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12990 echo "configure:12991: checking fetch(3) library" >&5
12991 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12992   echo $ac_n "(cached) $ac_c" 1>&6
12993 else
12994   
12995         cat > conftest.$ac_ext <<EOF
12996 #line 12997 "configure"
12997 #include "confdefs.h"
12998
12999 #include <sys/param.h>
13000 #include <stdio.h>
13001 #include <fetch.h>
13002 int main() {
13003 struct url *u = fetchParseURL("file:///"); 
13004 ; return 0; }
13005 EOF
13006 if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13007   rm -rf conftest*
13008   ol_cv_lib_fetch=yes
13009 else
13010   echo "configure: failed program was:" >&5
13011   cat conftest.$ac_ext >&5
13012   rm -rf conftest*
13013   ol_cv_lib_fetch=no
13014 fi
13015 rm -f conftest*
13016 fi
13017
13018 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13019 LIBS=$ol_LIBS
13020 if test $ol_cv_lib_fetch != no ; then
13021         ol_link_fetch="-lfetch -lcom_err"
13022         cat >> confdefs.h <<\EOF
13023 #define HAVE_FETCH 1
13024 EOF
13025
13026 fi
13027
13028
13029         if test $ol_cv_lib_fetch != no ; then
13030                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13031                 ol_link_fetch=freebsd
13032
13033         elif test $ol_with_fetch != auto ; then
13034                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13035         fi 
13036 fi
13037
13038 ol_link_readline=no
13039 if test $ol_with_readline != no ; then
13040         for ac_hdr in readline/readline.h readline/history.h
13041 do
13042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13044 echo "configure:13045: checking for $ac_hdr" >&5
13045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13046   echo $ac_n "(cached) $ac_c" 1>&6
13047 else
13048   cat > conftest.$ac_ext <<EOF
13049 #line 13050 "configure"
13050 #include "confdefs.h"
13051 #include <$ac_hdr>
13052 EOF
13053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13054 { (eval echo configure:13055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13056 if test -z "$ac_err"; then
13057   rm -rf conftest*
13058   eval "ac_cv_header_$ac_safe=yes"
13059 else
13060   echo "$ac_err" >&5
13061   echo "configure: failed program was:" >&5
13062   cat conftest.$ac_ext >&5
13063   rm -rf conftest*
13064   eval "ac_cv_header_$ac_safe=no"
13065 fi
13066 rm -f conftest*
13067 fi
13068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13069   echo "$ac_t""yes" 1>&6
13070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13071   cat >> confdefs.h <<EOF
13072 #define $ac_tr_hdr 1
13073 EOF
13074  
13075 else
13076   echo "$ac_t""no" 1>&6
13077 fi
13078 done
13079
13080
13081         if test $ac_cv_header_readline_readline_h = yes ; then
13082                 save_LIBS="$LIBS"
13083                 LIBS="$TERMCAP_LIBS $LIBS"
13084                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13085 echo "configure:13086: checking for readline in -lreadline" >&5
13086 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13088   echo $ac_n "(cached) $ac_c" 1>&6
13089 else
13090   ac_save_LIBS="$LIBS"
13091 LIBS="-lreadline  $LIBS"
13092 cat > conftest.$ac_ext <<EOF
13093 #line 13094 "configure"
13094 #include "confdefs.h"
13095 /* Override any gcc2 internal prototype to avoid an error.  */
13096 /* We use char because int might match the return type of a gcc2
13097     builtin and then its argument prototype would still apply.  */
13098 char readline();
13099
13100 int main() {
13101 readline()
13102 ; return 0; }
13103 EOF
13104 if { (eval echo configure:13105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13105   rm -rf conftest*
13106   eval "ac_cv_lib_$ac_lib_var=yes"
13107 else
13108   echo "configure: failed program was:" >&5
13109   cat conftest.$ac_ext >&5
13110   rm -rf conftest*
13111   eval "ac_cv_lib_$ac_lib_var=no"
13112 fi
13113 rm -f conftest*
13114 LIBS="$ac_save_LIBS"
13115
13116 fi
13117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13118   echo "$ac_t""yes" 1>&6
13119   have_readline=yes
13120 else
13121   echo "$ac_t""no" 1>&6
13122 have_readline=no
13123 fi
13124
13125                 LIBS="$save_LIBS"
13126                         
13127                 if test $have_readline = yes ; then
13128                         ol_with_readline=found
13129                         ol_link_readline=yes
13130
13131                         READLINE_LIBS="-lreadline"
13132                 fi
13133         fi
13134 fi
13135
13136 if test $ol_link_readline = yes ; then
13137         cat >> confdefs.h <<\EOF
13138 #define HAVE_READLINE 1
13139 EOF
13140
13141 fi
13142
13143
13144 if test $ol_enable_crypt != no ; then
13145         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13146 echo "configure:13147: checking for crypt" >&5
13147 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13148   echo $ac_n "(cached) $ac_c" 1>&6
13149 else
13150   cat > conftest.$ac_ext <<EOF
13151 #line 13152 "configure"
13152 #include "confdefs.h"
13153 /* System header to define __stub macros and hopefully few prototypes,
13154     which can conflict with char crypt(); below.  */
13155 #include <assert.h>
13156 /* Override any gcc2 internal prototype to avoid an error.  */
13157 /* We use char because int might match the return type of a gcc2
13158     builtin and then its argument prototype would still apply.  */
13159 char crypt();
13160 char (*f)();
13161
13162 int main() {
13163
13164 /* The GNU C library defines this for functions which it implements
13165     to always fail with ENOSYS.  Some functions are actually named
13166     something starting with __ and the normal name is an alias.  */
13167 #if defined (__stub_crypt) || defined (__stub___crypt)
13168 choke me
13169 #else
13170 f = crypt;
13171 #endif
13172
13173 ; return 0; }
13174 EOF
13175 if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13176   rm -rf conftest*
13177   eval "ac_cv_func_crypt=yes"
13178 else
13179   echo "configure: failed program was:" >&5
13180   cat conftest.$ac_ext >&5
13181   rm -rf conftest*
13182   eval "ac_cv_func_crypt=no"
13183 fi
13184 rm -f conftest*
13185 fi
13186
13187 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13188   echo "$ac_t""yes" 1>&6
13189   have_crypt=yes
13190 else
13191   echo "$ac_t""no" 1>&6
13192
13193                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13194 echo "configure:13195: checking for crypt in -lcrypt" >&5
13195 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13197   echo $ac_n "(cached) $ac_c" 1>&6
13198 else
13199   ac_save_LIBS="$LIBS"
13200 LIBS="-lcrypt  $LIBS"
13201 cat > conftest.$ac_ext <<EOF
13202 #line 13203 "configure"
13203 #include "confdefs.h"
13204 /* Override any gcc2 internal prototype to avoid an error.  */
13205 /* We use char because int might match the return type of a gcc2
13206     builtin and then its argument prototype would still apply.  */
13207 char crypt();
13208
13209 int main() {
13210 crypt()
13211 ; return 0; }
13212 EOF
13213 if { (eval echo configure:13214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13214   rm -rf conftest*
13215   eval "ac_cv_lib_$ac_lib_var=yes"
13216 else
13217   echo "configure: failed program was:" >&5
13218   cat conftest.$ac_ext >&5
13219   rm -rf conftest*
13220   eval "ac_cv_lib_$ac_lib_var=no"
13221 fi
13222 rm -f conftest*
13223 LIBS="$ac_save_LIBS"
13224
13225 fi
13226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13227   echo "$ac_t""yes" 1>&6
13228   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13229                         have_crypt=yes
13230 else
13231   echo "$ac_t""no" 1>&6
13232 have_crypt=no
13233 fi
13234
13235 fi
13236
13237
13238         if test $have_crypt = yes ; then
13239                 cat >> confdefs.h <<\EOF
13240 #define HAVE_CRYPT 1
13241 EOF
13242
13243         else
13244                 echo "configure: warning: could not find crypt" 1>&2
13245                 if test $ol_enable_crypt = yes ; then
13246                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13247                 fi
13248
13249                 echo "configure: warning: disabling crypt support" 1>&2
13250                 ol_enable_crypt=no
13251         fi
13252 fi
13253
13254 if test $ol_enable_proctitle != no ; then
13255         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13256 echo "configure:13257: checking for setproctitle" >&5
13257 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13258   echo $ac_n "(cached) $ac_c" 1>&6
13259 else
13260   cat > conftest.$ac_ext <<EOF
13261 #line 13262 "configure"
13262 #include "confdefs.h"
13263 /* System header to define __stub macros and hopefully few prototypes,
13264     which can conflict with char setproctitle(); below.  */
13265 #include <assert.h>
13266 /* Override any gcc2 internal prototype to avoid an error.  */
13267 /* We use char because int might match the return type of a gcc2
13268     builtin and then its argument prototype would still apply.  */
13269 char setproctitle();
13270 char (*f)();
13271
13272 int main() {
13273
13274 /* The GNU C library defines this for functions which it implements
13275     to always fail with ENOSYS.  Some functions are actually named
13276     something starting with __ and the normal name is an alias.  */
13277 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13278 choke me
13279 #else
13280 f = setproctitle;
13281 #endif
13282
13283 ; return 0; }
13284 EOF
13285 if { (eval echo configure:13286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13286   rm -rf conftest*
13287   eval "ac_cv_func_setproctitle=yes"
13288 else
13289   echo "configure: failed program was:" >&5
13290   cat conftest.$ac_ext >&5
13291   rm -rf conftest*
13292   eval "ac_cv_func_setproctitle=no"
13293 fi
13294 rm -f conftest*
13295 fi
13296
13297 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13298   echo "$ac_t""yes" 1>&6
13299   have_setproctitle=yes
13300 else
13301   echo "$ac_t""no" 1>&6
13302
13303                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13304 echo "configure:13305: checking for setproctitle in -lutil" >&5
13305 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13306 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13307   echo $ac_n "(cached) $ac_c" 1>&6
13308 else
13309   ac_save_LIBS="$LIBS"
13310 LIBS="-lutil  $LIBS"
13311 cat > conftest.$ac_ext <<EOF
13312 #line 13313 "configure"
13313 #include "confdefs.h"
13314 /* Override any gcc2 internal prototype to avoid an error.  */
13315 /* We use char because int might match the return type of a gcc2
13316     builtin and then its argument prototype would still apply.  */
13317 char setproctitle();
13318
13319 int main() {
13320 setproctitle()
13321 ; return 0; }
13322 EOF
13323 if { (eval echo configure:13324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13324   rm -rf conftest*
13325   eval "ac_cv_lib_$ac_lib_var=yes"
13326 else
13327   echo "configure: failed program was:" >&5
13328   cat conftest.$ac_ext >&5
13329   rm -rf conftest*
13330   eval "ac_cv_lib_$ac_lib_var=no"
13331 fi
13332 rm -f conftest*
13333 LIBS="$ac_save_LIBS"
13334
13335 fi
13336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13337   echo "$ac_t""yes" 1>&6
13338   have_setproctitle=yes
13339                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13340 else
13341   echo "$ac_t""no" 1>&6
13342 have_setproctitle=no
13343                         LIBOBJS="$LIBOBJS setproctitle.o"
13344                         LIBSRCS="$LIBSRCS setproctitle.c"
13345 fi
13346
13347 fi
13348
13349
13350         if test $have_setproctitle = yes ; then
13351                 cat >> confdefs.h <<\EOF
13352 #define HAVE_SETPROCTITLE 1
13353 EOF
13354
13355         fi
13356 fi
13357
13358 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13359 echo "configure:13360: checking for ANSI C header files" >&5
13360 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13361   echo $ac_n "(cached) $ac_c" 1>&6
13362 else
13363   cat > conftest.$ac_ext <<EOF
13364 #line 13365 "configure"
13365 #include "confdefs.h"
13366 #include <stdlib.h>
13367 #include <stdarg.h>
13368 #include <string.h>
13369 #include <float.h>
13370 EOF
13371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13372 { (eval echo configure:13373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13374 if test -z "$ac_err"; then
13375   rm -rf conftest*
13376   ac_cv_header_stdc=yes
13377 else
13378   echo "$ac_err" >&5
13379   echo "configure: failed program was:" >&5
13380   cat conftest.$ac_ext >&5
13381   rm -rf conftest*
13382   ac_cv_header_stdc=no
13383 fi
13384 rm -f conftest*
13385
13386 if test $ac_cv_header_stdc = yes; then
13387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13388 cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391 #include <string.h>
13392 EOF
13393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13394   egrep "memchr" >/dev/null 2>&1; then
13395   :
13396 else
13397   rm -rf conftest*
13398   ac_cv_header_stdc=no
13399 fi
13400 rm -f conftest*
13401
13402 fi
13403
13404 if test $ac_cv_header_stdc = yes; then
13405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13406 cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409 #include <stdlib.h>
13410 EOF
13411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13412   egrep "free" >/dev/null 2>&1; then
13413   :
13414 else
13415   rm -rf conftest*
13416   ac_cv_header_stdc=no
13417 fi
13418 rm -f conftest*
13419
13420 fi
13421
13422 if test $ac_cv_header_stdc = yes; then
13423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13424 if test "$cross_compiling" = yes; then
13425   :
13426 else
13427   cat > conftest.$ac_ext <<EOF
13428 #line 13429 "configure"
13429 #include "confdefs.h"
13430 #include <ctype.h>
13431 #if ((' ' & 0x0FF) == 0x020)
13432 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13433 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13434 #else
13435 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13436  || ('j' <= (c) && (c) <= 'r') \
13437  || ('s' <= (c) && (c) <= 'z'))
13438 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13439 #endif
13440 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13441 int main () { int i; for (i = 0; i < 256; i++)
13442 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13443 exit (0); }
13444
13445 EOF
13446 if { (eval echo configure:13447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13447 then
13448   :
13449 else
13450   echo "configure: failed program was:" >&5
13451   cat conftest.$ac_ext >&5
13452   rm -fr conftest*
13453   ac_cv_header_stdc=no
13454 fi
13455 rm -fr conftest*
13456 fi
13457
13458 fi
13459 fi
13460
13461 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13462 if test $ac_cv_header_stdc = yes; then
13463   cat >> confdefs.h <<\EOF
13464 #define STDC_HEADERS 1
13465 EOF
13466
13467 fi
13468
13469 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13470 echo "configure:13471: checking for mode_t" >&5
13471 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13472   echo $ac_n "(cached) $ac_c" 1>&6
13473 else
13474   cat > conftest.$ac_ext <<EOF
13475 #line 13476 "configure"
13476 #include "confdefs.h"
13477 #include <sys/types.h>
13478 #if STDC_HEADERS
13479 #include <stdlib.h>
13480 #include <stddef.h>
13481 #endif
13482
13483 EOF
13484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13485   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13486   rm -rf conftest*
13487   eval "ac_cv_type_mode_t=yes"
13488 else
13489   rm -rf conftest*
13490   eval "ac_cv_type_mode_t=no"
13491 fi
13492 rm -f conftest*
13493
13494 fi
13495 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13496   echo "$ac_t""yes" 1>&6
13497 else
13498   echo "$ac_t""no" 1>&6
13499   cat >> confdefs.h <<EOF
13500 #define mode_t int
13501 EOF
13502
13503 fi
13504
13505 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13506 echo "configure:13507: checking for off_t" >&5
13507 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13508   echo $ac_n "(cached) $ac_c" 1>&6
13509 else
13510   cat > conftest.$ac_ext <<EOF
13511 #line 13512 "configure"
13512 #include "confdefs.h"
13513 #include <sys/types.h>
13514 #if STDC_HEADERS
13515 #include <stdlib.h>
13516 #include <stddef.h>
13517 #endif
13518
13519 EOF
13520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13521   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13522   rm -rf conftest*
13523   eval "ac_cv_type_off_t=yes"
13524 else
13525   rm -rf conftest*
13526   eval "ac_cv_type_off_t=no"
13527 fi
13528 rm -f conftest*
13529
13530 fi
13531 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13532   echo "$ac_t""yes" 1>&6
13533 else
13534   echo "$ac_t""no" 1>&6
13535   cat >> confdefs.h <<EOF
13536 #define off_t long
13537 EOF
13538
13539 fi
13540
13541 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13542 echo "configure:13543: checking for pid_t" >&5
13543 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13544   echo $ac_n "(cached) $ac_c" 1>&6
13545 else
13546   cat > conftest.$ac_ext <<EOF
13547 #line 13548 "configure"
13548 #include "confdefs.h"
13549 #include <sys/types.h>
13550 #if STDC_HEADERS
13551 #include <stdlib.h>
13552 #include <stddef.h>
13553 #endif
13554
13555 EOF
13556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13557   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13558   rm -rf conftest*
13559   eval "ac_cv_type_pid_t=yes"
13560 else
13561   rm -rf conftest*
13562   eval "ac_cv_type_pid_t=no"
13563 fi
13564 rm -f conftest*
13565
13566 fi
13567 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13568   echo "$ac_t""yes" 1>&6
13569 else
13570   echo "$ac_t""no" 1>&6
13571   cat >> confdefs.h <<EOF
13572 #define pid_t int
13573 EOF
13574
13575 fi
13576
13577 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13578 echo "configure:13579: checking for ptrdiff_t" >&5
13579 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13580   echo $ac_n "(cached) $ac_c" 1>&6
13581 else
13582   cat > conftest.$ac_ext <<EOF
13583 #line 13584 "configure"
13584 #include "confdefs.h"
13585 #include <stddef.h>
13586 int main() {
13587 ptrdiff_t p
13588 ; return 0; }
13589 EOF
13590 if { (eval echo configure:13591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13591   rm -rf conftest*
13592   am_cv_type_ptrdiff_t=yes
13593 else
13594   echo "configure: failed program was:" >&5
13595   cat conftest.$ac_ext >&5
13596   rm -rf conftest*
13597   am_cv_type_ptrdiff_t=no
13598 fi
13599 rm -f conftest*
13600 fi
13601
13602 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13603    if test $am_cv_type_ptrdiff_t = yes; then
13604      cat >> confdefs.h <<\EOF
13605 #define HAVE_PTRDIFF_T 1
13606 EOF
13607
13608    fi
13609
13610 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13611 echo "configure:13612: checking return type of signal handlers" >&5
13612 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13613   echo $ac_n "(cached) $ac_c" 1>&6
13614 else
13615   cat > conftest.$ac_ext <<EOF
13616 #line 13617 "configure"
13617 #include "confdefs.h"
13618 #include <sys/types.h>
13619 #include <signal.h>
13620 #ifdef signal
13621 #undef signal
13622 #endif
13623 #ifdef __cplusplus
13624 extern "C" void (*signal (int, void (*)(int)))(int);
13625 #else
13626 void (*signal ()) ();
13627 #endif
13628
13629 int main() {
13630 int i;
13631 ; return 0; }
13632 EOF
13633 if { (eval echo configure:13634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13634   rm -rf conftest*
13635   ac_cv_type_signal=void
13636 else
13637   echo "configure: failed program was:" >&5
13638   cat conftest.$ac_ext >&5
13639   rm -rf conftest*
13640   ac_cv_type_signal=int
13641 fi
13642 rm -f conftest*
13643 fi
13644
13645 echo "$ac_t""$ac_cv_type_signal" 1>&6
13646 cat >> confdefs.h <<EOF
13647 #define RETSIGTYPE $ac_cv_type_signal
13648 EOF
13649
13650
13651 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13652 echo "configure:13653: checking for size_t" >&5
13653 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13654   echo $ac_n "(cached) $ac_c" 1>&6
13655 else
13656   cat > conftest.$ac_ext <<EOF
13657 #line 13658 "configure"
13658 #include "confdefs.h"
13659 #include <sys/types.h>
13660 #if STDC_HEADERS
13661 #include <stdlib.h>
13662 #include <stddef.h>
13663 #endif
13664
13665 EOF
13666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13667   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13668   rm -rf conftest*
13669   eval "ac_cv_type_size_t=yes"
13670 else
13671   rm -rf conftest*
13672   eval "ac_cv_type_size_t=no"
13673 fi
13674 rm -f conftest*
13675
13676 fi
13677 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13678   echo "$ac_t""yes" 1>&6
13679 else
13680   echo "$ac_t""no" 1>&6
13681   cat >> confdefs.h <<EOF
13682 #define size_t unsigned
13683 EOF
13684
13685 fi
13686
13687
13688 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13689 echo "configure:13690: checking for ssize_t" >&5
13690 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13691   echo $ac_n "(cached) $ac_c" 1>&6
13692 else
13693   cat > conftest.$ac_ext <<EOF
13694 #line 13695 "configure"
13695 #include "confdefs.h"
13696 #include <sys/types.h>
13697 #if STDC_HEADERS
13698 #include <stdlib.h>
13699 #include <stddef.h>
13700 #endif
13701
13702 EOF
13703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13704   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13705   rm -rf conftest*
13706   eval "ac_cv_type_ssize_t=yes"
13707 else
13708   rm -rf conftest*
13709   eval "ac_cv_type_ssize_t=no"
13710 fi
13711 rm -f conftest*
13712
13713 fi
13714 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13715   echo "$ac_t""yes" 1>&6
13716 else
13717   echo "$ac_t""no" 1>&6
13718   cat >> confdefs.h <<EOF
13719 #define ssize_t signed int
13720 EOF
13721
13722 fi
13723
13724 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13725 echo "configure:13726: checking for caddr_t" >&5
13726 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13727   echo $ac_n "(cached) $ac_c" 1>&6
13728 else
13729   cat > conftest.$ac_ext <<EOF
13730 #line 13731 "configure"
13731 #include "confdefs.h"
13732 #include <sys/types.h>
13733 #if STDC_HEADERS
13734 #include <stdlib.h>
13735 #include <stddef.h>
13736 #endif
13737
13738 EOF
13739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13740   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13741   rm -rf conftest*
13742   eval "ac_cv_type_caddr_t=yes"
13743 else
13744   rm -rf conftest*
13745   eval "ac_cv_type_caddr_t=no"
13746 fi
13747 rm -f conftest*
13748
13749 fi
13750 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13751   echo "$ac_t""yes" 1>&6
13752 else
13753   echo "$ac_t""no" 1>&6
13754   cat >> confdefs.h <<EOF
13755 #define caddr_t char *
13756 EOF
13757
13758 fi
13759
13760
13761 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13762 echo "configure:13763: checking for socklen_t" >&5
13763 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13764   echo $ac_n "(cached) $ac_c" 1>&6
13765 else
13766   cat > conftest.$ac_ext <<EOF
13767 #line 13768 "configure"
13768 #include "confdefs.h"
13769
13770 #ifdef HAVE_SYS_TYPES_H
13771 #include <sys/types.h>
13772 #endif
13773 #ifdef HAVE_SYS_SOCKET_H
13774 #include <sys/socket.h>
13775 #endif
13776
13777 int main() {
13778 socklen_t len;
13779 ; return 0; }
13780 EOF
13781 if { (eval echo configure:13782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13782   rm -rf conftest*
13783   ol_cv_type_socklen_t=yes
13784 else
13785   echo "configure: failed program was:" >&5
13786   cat conftest.$ac_ext >&5
13787   rm -rf conftest*
13788   ol_cv_type_socklen_t=no
13789 fi
13790 rm -f conftest*
13791 fi
13792
13793 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13794   if test $ol_cv_type_socklen_t = no; then
13795     cat >> confdefs.h <<\EOF
13796 #define socklen_t int
13797 EOF
13798
13799   fi
13800  
13801 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13802 echo "configure:13803: checking for member st_blksize in aggregate type struct stat" >&5
13803 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13804   echo $ac_n "(cached) $ac_c" 1>&6
13805 else
13806   cat > conftest.$ac_ext <<EOF
13807 #line 13808 "configure"
13808 #include "confdefs.h"
13809 #include <sys/types.h>
13810 #include <sys/stat.h>
13811 int main() {
13812 struct stat foo; foo.st_blksize;
13813 ; return 0; }
13814 EOF
13815 if { (eval echo configure:13816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13816   rm -rf conftest*
13817   ac_cv_c_struct_member_st_blksize=yes
13818 else
13819   echo "configure: failed program was:" >&5
13820   cat conftest.$ac_ext >&5
13821   rm -rf conftest*
13822   ac_cv_c_struct_member_st_blksize=no
13823 fi
13824 rm -f conftest*
13825 fi
13826
13827 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13828 st_blksize="$ac_cv_c_struct_member_st_blksize"
13829 if test $ac_cv_c_struct_member_st_blksize = yes; then
13830   cat >> confdefs.h <<\EOF
13831 #define HAVE_ST_BLKSIZE 1
13832 EOF
13833
13834 fi
13835
13836 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13837 echo "configure:13838: checking whether time.h and sys/time.h may both be included" >&5
13838 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13839   echo $ac_n "(cached) $ac_c" 1>&6
13840 else
13841   cat > conftest.$ac_ext <<EOF
13842 #line 13843 "configure"
13843 #include "confdefs.h"
13844 #include <sys/types.h>
13845 #include <sys/time.h>
13846 #include <time.h>
13847 int main() {
13848 struct tm *tp;
13849 ; return 0; }
13850 EOF
13851 if { (eval echo configure:13852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13852   rm -rf conftest*
13853   ac_cv_header_time=yes
13854 else
13855   echo "configure: failed program was:" >&5
13856   cat conftest.$ac_ext >&5
13857   rm -rf conftest*
13858   ac_cv_header_time=no
13859 fi
13860 rm -f conftest*
13861 fi
13862
13863 echo "$ac_t""$ac_cv_header_time" 1>&6
13864 if test $ac_cv_header_time = yes; then
13865   cat >> confdefs.h <<\EOF
13866 #define TIME_WITH_SYS_TIME 1
13867 EOF
13868
13869 fi
13870
13871 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13872 echo "configure:13873: checking whether struct tm is in sys/time.h or time.h" >&5
13873 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13874   echo $ac_n "(cached) $ac_c" 1>&6
13875 else
13876   cat > conftest.$ac_ext <<EOF
13877 #line 13878 "configure"
13878 #include "confdefs.h"
13879 #include <sys/types.h>
13880 #include <time.h>
13881 int main() {
13882 struct tm *tp; tp->tm_sec;
13883 ; return 0; }
13884 EOF
13885 if { (eval echo configure:13886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13886   rm -rf conftest*
13887   ac_cv_struct_tm=time.h
13888 else
13889   echo "configure: failed program was:" >&5
13890   cat conftest.$ac_ext >&5
13891   rm -rf conftest*
13892   ac_cv_struct_tm=sys/time.h
13893 fi
13894 rm -f conftest*
13895 fi
13896
13897 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13898 if test $ac_cv_struct_tm = sys/time.h; then
13899   cat >> confdefs.h <<\EOF
13900 #define TM_IN_SYS_TIME 1
13901 EOF
13902
13903 fi
13904
13905 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13906 echo "configure:13907: checking for uid_t in sys/types.h" >&5
13907 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13908   echo $ac_n "(cached) $ac_c" 1>&6
13909 else
13910   cat > conftest.$ac_ext <<EOF
13911 #line 13912 "configure"
13912 #include "confdefs.h"
13913 #include <sys/types.h>
13914 EOF
13915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13916   egrep "uid_t" >/dev/null 2>&1; then
13917   rm -rf conftest*
13918   ac_cv_type_uid_t=yes
13919 else
13920   rm -rf conftest*
13921   ac_cv_type_uid_t=no
13922 fi
13923 rm -f conftest*
13924
13925 fi
13926
13927 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13928 if test $ac_cv_type_uid_t = no; then
13929   cat >> confdefs.h <<\EOF
13930 #define uid_t int
13931 EOF
13932
13933   cat >> confdefs.h <<\EOF
13934 #define gid_t int
13935 EOF
13936
13937 fi
13938
13939 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13940 echo "configure:13941: checking for sig_atomic_t" >&5
13941 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13942   echo $ac_n "(cached) $ac_c" 1>&6
13943 else
13944   cat > conftest.$ac_ext <<EOF
13945 #line 13946 "configure"
13946 #include "confdefs.h"
13947 #include <signal.h>
13948 int main() {
13949 sig_atomic_t atomic;
13950 ; return 0; }
13951 EOF
13952 if { (eval echo configure:13953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13953   rm -rf conftest*
13954   ol_cv_type_sig_atomic_t=yes
13955 else
13956   echo "configure: failed program was:" >&5
13957   cat conftest.$ac_ext >&5
13958   rm -rf conftest*
13959   ol_cv_type_sig_atomic_t=no
13960 fi
13961 rm -f conftest*
13962 fi
13963
13964 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13965   if test $ol_cv_type_sig_atomic_t = no; then
13966     cat >> confdefs.h <<\EOF
13967 #define sig_atomic_t int
13968 EOF
13969
13970   fi
13971  
13972
13973
13974 # test for pw_gecos in struct passwd
13975 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13976 echo "configure:13977: checking struct passwd for pw_gecos" >&5
13977 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13978   echo $ac_n "(cached) $ac_c" 1>&6
13979 else
13980   
13981         cat > conftest.$ac_ext <<EOF
13982 #line 13983 "configure"
13983 #include "confdefs.h"
13984 #include <pwd.h>
13985 int main() {
13986
13987         struct passwd pwd;
13988         pwd.pw_gecos = pwd.pw_name;
13989
13990 ; return 0; }
13991 EOF
13992 if { (eval echo configure:13993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13993   rm -rf conftest*
13994   ol_cv_struct_passwd_pw_gecos=yes
13995 else
13996   echo "configure: failed program was:" >&5
13997   cat conftest.$ac_ext >&5
13998   rm -rf conftest*
13999   ol_cv_struct_passwd_pw_gecos=no
14000 fi
14001 rm -f conftest*
14002 fi
14003
14004 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14005 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14006         cat >> confdefs.h <<\EOF
14007 #define HAVE_PW_GECOS 1
14008 EOF
14009
14010 fi
14011
14012 # test for pw_passwd in struct passwd
14013 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14014 echo "configure:14015: checking struct passwd for pw_passwd" >&5
14015 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14016   echo $ac_n "(cached) $ac_c" 1>&6
14017 else
14018   
14019         cat > conftest.$ac_ext <<EOF
14020 #line 14021 "configure"
14021 #include "confdefs.h"
14022 #include <pwd.h>
14023 int main() {
14024
14025         struct passwd pwd;
14026         pwd.pw_passwd = pwd.pw_name;
14027
14028 ; return 0; }
14029 EOF
14030 if { (eval echo configure:14031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14031   rm -rf conftest*
14032   ol_cv_struct_passwd_pw_passwd=yes
14033 else
14034   echo "configure: failed program was:" >&5
14035   cat conftest.$ac_ext >&5
14036   rm -rf conftest*
14037   ol_cv_struct_passwd_pw_passwd=no
14038 fi
14039 rm -f conftest*
14040 fi
14041
14042 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14043 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14044         cat >> confdefs.h <<\EOF
14045 #define HAVE_PW_PASSWD 1
14046 EOF
14047
14048 fi
14049
14050
14051 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14052 echo "configure:14053: checking if toupper() requires islower()" >&5
14053 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14054   echo $ac_n "(cached) $ac_c" 1>&6
14055 else
14056   
14057         if test "$cross_compiling" = yes; then
14058   ol_cv_c_upper_lower=safe
14059 else
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063
14064 #include <ctype.h>
14065 main()
14066 {
14067         if ('C' == toupper('C'))
14068                 exit(0);
14069         else
14070                 exit(1);
14071 }
14072 EOF
14073 if { (eval echo configure:14074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14074 then
14075   ol_cv_c_upper_lower=no
14076 else
14077   echo "configure: failed program was:" >&5
14078   cat conftest.$ac_ext >&5
14079   rm -fr conftest*
14080   ol_cv_c_upper_lower=yes
14081 fi
14082 rm -fr conftest*
14083 fi
14084
14085 fi
14086
14087 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14088 if test $ol_cv_c_upper_lower != no ; then
14089         cat >> confdefs.h <<\EOF
14090 #define C_UPPER_LOWER 1
14091 EOF
14092
14093 fi
14094
14095 echo $ac_n "checking for working const""... $ac_c" 1>&6
14096 echo "configure:14097: checking for working const" >&5
14097 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14098   echo $ac_n "(cached) $ac_c" 1>&6
14099 else
14100   cat > conftest.$ac_ext <<EOF
14101 #line 14102 "configure"
14102 #include "confdefs.h"
14103
14104 int main() {
14105
14106 /* Ultrix mips cc rejects this.  */
14107 typedef int charset[2]; const charset x;
14108 /* SunOS 4.1.1 cc rejects this.  */
14109 char const *const *ccp;
14110 char **p;
14111 /* NEC SVR4.0.2 mips cc rejects this.  */
14112 struct point {int x, y;};
14113 static struct point const zero = {0,0};
14114 /* AIX XL C 1.02.0.0 rejects this.
14115    It does not let you subtract one const X* pointer from another in an arm
14116    of an if-expression whose if-part is not a constant expression */
14117 const char *g = "string";
14118 ccp = &g + (g ? g-g : 0);
14119 /* HPUX 7.0 cc rejects these. */
14120 ++ccp;
14121 p = (char**) ccp;
14122 ccp = (char const *const *) p;
14123 { /* SCO 3.2v4 cc rejects this.  */
14124   char *t;
14125   char const *s = 0 ? (char *) 0 : (char const *) 0;
14126
14127   *t++ = 0;
14128 }
14129 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14130   int x[] = {25, 17};
14131   const int *foo = &x[0];
14132   ++foo;
14133 }
14134 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14135   typedef const int *iptr;
14136   iptr p = 0;
14137   ++p;
14138 }
14139 { /* AIX XL C 1.02.0.0 rejects this saying
14140      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14141   struct s { int j; const int *ap[3]; };
14142   struct s *b; b->j = 5;
14143 }
14144 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14145   const int foo = 10;
14146 }
14147
14148 ; return 0; }
14149 EOF
14150 if { (eval echo configure:14151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14151   rm -rf conftest*
14152   ac_cv_c_const=yes
14153 else
14154   echo "configure: failed program was:" >&5
14155   cat conftest.$ac_ext >&5
14156   rm -rf conftest*
14157   ac_cv_c_const=no
14158 fi
14159 rm -f conftest*
14160 fi
14161
14162 echo "$ac_t""$ac_cv_c_const" 1>&6
14163 if test $ac_cv_c_const = no; then
14164   cat >> confdefs.h <<\EOF
14165 #define const 
14166 EOF
14167
14168 fi
14169
14170 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14171 echo "configure:14172: checking if compiler understands volatile" >&5
14172 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14173   echo $ac_n "(cached) $ac_c" 1>&6
14174 else
14175   cat > conftest.$ac_ext <<EOF
14176 #line 14177 "configure"
14177 #include "confdefs.h"
14178 int x, y, z;
14179 int main() {
14180 volatile int a; int * volatile b = x ? &y : &z;
14181       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14182       *b = 0;
14183 ; return 0; }
14184 EOF
14185 if { (eval echo configure:14186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14186   rm -rf conftest*
14187   ol_cv_c_volatile=yes
14188 else
14189   echo "configure: failed program was:" >&5
14190   cat conftest.$ac_ext >&5
14191   rm -rf conftest*
14192   ol_cv_c_volatile=no
14193 fi
14194 rm -f conftest*
14195 fi
14196
14197 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14198   if test $ol_cv_c_volatile = yes; then
14199     : 
14200   else
14201     cat >> confdefs.h <<\EOF
14202 #define volatile 
14203 EOF
14204
14205   fi
14206  
14207
14208 if test $cross_compiling = yes ; then
14209         cat >> confdefs.h <<\EOF
14210 #define CROSS_COMPILING 1
14211 EOF
14212
14213 else
14214         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14215 echo "configure:14216: checking whether byte ordering is bigendian" >&5
14216 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14217   echo $ac_n "(cached) $ac_c" 1>&6
14218 else
14219   ac_cv_c_bigendian=unknown
14220 # See if sys/param.h defines the BYTE_ORDER macro.
14221 cat > conftest.$ac_ext <<EOF
14222 #line 14223 "configure"
14223 #include "confdefs.h"
14224 #include <sys/types.h>
14225 #include <sys/param.h>
14226 int main() {
14227
14228 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14229  bogus endian macros
14230 #endif
14231 ; return 0; }
14232 EOF
14233 if { (eval echo configure:14234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14234   rm -rf conftest*
14235   # It does; now see whether it defined to BIG_ENDIAN or not.
14236 cat > conftest.$ac_ext <<EOF
14237 #line 14238 "configure"
14238 #include "confdefs.h"
14239 #include <sys/types.h>
14240 #include <sys/param.h>
14241 int main() {
14242
14243 #if BYTE_ORDER != BIG_ENDIAN
14244  not big endian
14245 #endif
14246 ; return 0; }
14247 EOF
14248 if { (eval echo configure:14249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14249   rm -rf conftest*
14250   ac_cv_c_bigendian=yes
14251 else
14252   echo "configure: failed program was:" >&5
14253   cat conftest.$ac_ext >&5
14254   rm -rf conftest*
14255   ac_cv_c_bigendian=no
14256 fi
14257 rm -f conftest*
14258 else
14259   echo "configure: failed program was:" >&5
14260   cat conftest.$ac_ext >&5
14261 fi
14262 rm -f conftest*
14263 if test $ac_cv_c_bigendian = unknown; then
14264 if test "$cross_compiling" = yes; then
14265     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14266 else
14267   cat > conftest.$ac_ext <<EOF
14268 #line 14269 "configure"
14269 #include "confdefs.h"
14270 main () {
14271   /* Are we little or big endian?  From Harbison&Steele.  */
14272   union
14273   {
14274     long l;
14275     char c[sizeof (long)];
14276   } u;
14277   u.l = 1;
14278   exit (u.c[sizeof (long) - 1] == 1);
14279 }
14280 EOF
14281 if { (eval echo configure:14282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14282 then
14283   ac_cv_c_bigendian=no
14284 else
14285   echo "configure: failed program was:" >&5
14286   cat conftest.$ac_ext >&5
14287   rm -fr conftest*
14288   ac_cv_c_bigendian=yes
14289 fi
14290 rm -fr conftest*
14291 fi
14292
14293 fi
14294 fi
14295
14296 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14297 if test $ac_cv_c_bigendian = yes; then
14298   cat >> confdefs.h <<\EOF
14299 #define WORDS_BIGENDIAN 1
14300 EOF
14301
14302 fi
14303
14304 fi
14305
14306 echo $ac_n "checking size of short""... $ac_c" 1>&6
14307 echo "configure:14308: checking size of short" >&5 
14308 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14309   echo $ac_n "(cached) $ac_c" 1>&6
14310 else
14311   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14312   cat > conftest.$ac_ext <<EOF
14313 #line 14314 "configure"
14314 #include "confdefs.h"
14315 #include "confdefs.h" 
14316 #include <sys/types.h> 
14317  
14318
14319 int main() {
14320 switch (0) case 0: case (sizeof (short) == $ac_size):;
14321 ; return 0; }
14322 EOF
14323 if { (eval echo configure:14324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14324   rm -rf conftest*
14325   ac_cv_sizeof_short=$ac_size
14326 else
14327   echo "configure: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329 fi
14330 rm -f conftest* 
14331   if test x$ac_cv_sizeof_short != x ; then break; fi 
14332 done 
14333
14334 fi
14335  
14336 if test x$ac_cv_sizeof_short = x ; then 
14337   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14338 fi 
14339 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14340 cat >> confdefs.h <<EOF
14341 #define SIZEOF_SHORT $ac_cv_sizeof_short
14342 EOF
14343  
14344  
14345 echo $ac_n "checking size of int""... $ac_c" 1>&6
14346 echo "configure:14347: checking size of int" >&5 
14347 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14348   echo $ac_n "(cached) $ac_c" 1>&6
14349 else
14350   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14351   cat > conftest.$ac_ext <<EOF
14352 #line 14353 "configure"
14353 #include "confdefs.h"
14354 #include "confdefs.h" 
14355 #include <sys/types.h> 
14356  
14357
14358 int main() {
14359 switch (0) case 0: case (sizeof (int) == $ac_size):;
14360 ; return 0; }
14361 EOF
14362 if { (eval echo configure:14363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14363   rm -rf conftest*
14364   ac_cv_sizeof_int=$ac_size
14365 else
14366   echo "configure: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368 fi
14369 rm -f conftest* 
14370   if test x$ac_cv_sizeof_int != x ; then break; fi 
14371 done 
14372
14373 fi
14374  
14375 if test x$ac_cv_sizeof_int = x ; then 
14376   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14377 fi 
14378 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14379 cat >> confdefs.h <<EOF
14380 #define SIZEOF_INT $ac_cv_sizeof_int
14381 EOF
14382  
14383  
14384 echo $ac_n "checking size of long""... $ac_c" 1>&6
14385 echo "configure:14386: checking size of long" >&5 
14386 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14387   echo $ac_n "(cached) $ac_c" 1>&6
14388 else
14389   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14390   cat > conftest.$ac_ext <<EOF
14391 #line 14392 "configure"
14392 #include "confdefs.h"
14393 #include "confdefs.h" 
14394 #include <sys/types.h> 
14395  
14396
14397 int main() {
14398 switch (0) case 0: case (sizeof (long) == $ac_size):;
14399 ; return 0; }
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14402   rm -rf conftest*
14403   ac_cv_sizeof_long=$ac_size
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407 fi
14408 rm -f conftest* 
14409   if test x$ac_cv_sizeof_long != x ; then break; fi 
14410 done 
14411
14412 fi
14413  
14414 if test x$ac_cv_sizeof_long = x ; then 
14415   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14416 fi 
14417 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14418 cat >> confdefs.h <<EOF
14419 #define SIZEOF_LONG $ac_cv_sizeof_long
14420 EOF
14421  
14422
14423
14424 if test "$ac_cv_sizeof_int" -lt 4 ; then
14425         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14426
14427         cat >> confdefs.h <<\EOF
14428 #define LBER_INT_T long
14429 EOF
14430
14431 else
14432         cat >> confdefs.h <<\EOF
14433 #define LBER_INT_T int
14434 EOF
14435
14436 fi
14437
14438 cat >> confdefs.h <<\EOF
14439 #define LBER_LEN_T long
14440 EOF
14441
14442 cat >> confdefs.h <<\EOF
14443 #define LBER_SOCKET_T int
14444 EOF
14445
14446 cat >> confdefs.h <<\EOF
14447 #define LBER_TAG_T long
14448 EOF
14449
14450
14451 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14452 echo "configure:14453: checking for 8-bit clean memcmp" >&5
14453 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14454   echo $ac_n "(cached) $ac_c" 1>&6
14455 else
14456   if test "$cross_compiling" = yes; then
14457   ac_cv_func_memcmp_clean=no
14458 else
14459   cat > conftest.$ac_ext <<EOF
14460 #line 14461 "configure"
14461 #include "confdefs.h"
14462
14463 main()
14464 {
14465   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14466   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14467 }
14468
14469 EOF
14470 if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14471 then
14472   ac_cv_func_memcmp_clean=yes
14473 else
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -fr conftest*
14477   ac_cv_func_memcmp_clean=no
14478 fi
14479 rm -fr conftest*
14480 fi
14481
14482 fi
14483
14484 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14485 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14486
14487 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14488 echo "configure:14489: checking for strftime" >&5
14489 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14490   echo $ac_n "(cached) $ac_c" 1>&6
14491 else
14492   cat > conftest.$ac_ext <<EOF
14493 #line 14494 "configure"
14494 #include "confdefs.h"
14495 /* System header to define __stub macros and hopefully few prototypes,
14496     which can conflict with char strftime(); below.  */
14497 #include <assert.h>
14498 /* Override any gcc2 internal prototype to avoid an error.  */
14499 /* We use char because int might match the return type of a gcc2
14500     builtin and then its argument prototype would still apply.  */
14501 char strftime();
14502 char (*f)();
14503
14504 int main() {
14505
14506 /* The GNU C library defines this for functions which it implements
14507     to always fail with ENOSYS.  Some functions are actually named
14508     something starting with __ and the normal name is an alias.  */
14509 #if defined (__stub_strftime) || defined (__stub___strftime)
14510 choke me
14511 #else
14512 f = strftime;
14513 #endif
14514
14515 ; return 0; }
14516 EOF
14517 if { (eval echo configure:14518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14518   rm -rf conftest*
14519   eval "ac_cv_func_strftime=yes"
14520 else
14521   echo "configure: failed program was:" >&5
14522   cat conftest.$ac_ext >&5
14523   rm -rf conftest*
14524   eval "ac_cv_func_strftime=no"
14525 fi
14526 rm -f conftest*
14527 fi
14528
14529 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14530   echo "$ac_t""yes" 1>&6
14531   cat >> confdefs.h <<\EOF
14532 #define HAVE_STRFTIME 1
14533 EOF
14534
14535 else
14536   echo "$ac_t""no" 1>&6
14537 # strftime is in -lintl on SCO UNIX.
14538 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14539 echo "configure:14540: checking for strftime in -lintl" >&5
14540 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14542   echo $ac_n "(cached) $ac_c" 1>&6
14543 else
14544   ac_save_LIBS="$LIBS"
14545 LIBS="-lintl  $LIBS"
14546 cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 /* Override any gcc2 internal prototype to avoid an error.  */
14550 /* We use char because int might match the return type of a gcc2
14551     builtin and then its argument prototype would still apply.  */
14552 char strftime();
14553
14554 int main() {
14555 strftime()
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14559   rm -rf conftest*
14560   eval "ac_cv_lib_$ac_lib_var=yes"
14561 else
14562   echo "configure: failed program was:" >&5
14563   cat conftest.$ac_ext >&5
14564   rm -rf conftest*
14565   eval "ac_cv_lib_$ac_lib_var=no"
14566 fi
14567 rm -f conftest*
14568 LIBS="$ac_save_LIBS"
14569
14570 fi
14571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14572   echo "$ac_t""yes" 1>&6
14573   cat >> confdefs.h <<\EOF
14574 #define HAVE_STRFTIME 1
14575 EOF
14576
14577 LIBS="-lintl $LIBS"
14578 else
14579   echo "$ac_t""no" 1>&6
14580 fi
14581
14582 fi
14583
14584
14585 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14586 echo "configure:14587: checking for inet_aton()" >&5
14587 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14588   echo $ac_n "(cached) $ac_c" 1>&6
14589 else
14590   cat > conftest.$ac_ext <<EOF
14591 #line 14592 "configure"
14592 #include "confdefs.h"
14593
14594 #ifdef HAVE_SYS_TYPES_H
14595 #       include <sys/types.h>
14596 #endif
14597 #ifdef HAVE_SYS_SOCKET_H
14598 #       include <sys/socket.h>
14599 #       ifdef HAVE_SYS_SELECT_H
14600 #               include <sys/select.h>
14601 #       endif
14602 #       include <netinet/in.h>
14603 #       ifdef HAVE_ARPA_INET_H
14604 #               include <arpa/inet.h>
14605 #       endif
14606 #endif
14607
14608 int main() {
14609 struct in_addr in;
14610 int rc = inet_aton( "255.255.255.255", &in );
14611 ; return 0; }
14612 EOF
14613 if { (eval echo configure:14614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14614   rm -rf conftest*
14615   ol_cv_func_inet_aton=yes
14616 else
14617   echo "configure: failed program was:" >&5
14618   cat conftest.$ac_ext >&5
14619   rm -rf conftest*
14620   ol_cv_func_inet_aton=no
14621 fi
14622 rm -f conftest*
14623 fi
14624
14625 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14626   if test $ol_cv_func_inet_aton != no; then
14627     cat >> confdefs.h <<\EOF
14628 #define HAVE_INET_ATON 1
14629 EOF
14630
14631   fi
14632  
14633
14634 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14635 echo "configure:14636: checking for _spawnlp" >&5
14636 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14637   echo $ac_n "(cached) $ac_c" 1>&6
14638 else
14639   cat > conftest.$ac_ext <<EOF
14640 #line 14641 "configure"
14641 #include "confdefs.h"
14642 /* System header to define __stub macros and hopefully few prototypes,
14643     which can conflict with char _spawnlp(); below.  */
14644 #include <assert.h>
14645 /* Override any gcc2 internal prototype to avoid an error.  */
14646 /* We use char because int might match the return type of a gcc2
14647     builtin and then its argument prototype would still apply.  */
14648 char _spawnlp();
14649 char (*f)();
14650
14651 int main() {
14652
14653 /* The GNU C library defines this for functions which it implements
14654     to always fail with ENOSYS.  Some functions are actually named
14655     something starting with __ and the normal name is an alias.  */
14656 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14657 choke me
14658 #else
14659 f = _spawnlp;
14660 #endif
14661
14662 ; return 0; }
14663 EOF
14664 if { (eval echo configure:14665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14665   rm -rf conftest*
14666   eval "ac_cv_func__spawnlp=yes"
14667 else
14668   echo "configure: failed program was:" >&5
14669   cat conftest.$ac_ext >&5
14670   rm -rf conftest*
14671   eval "ac_cv_func__spawnlp=no"
14672 fi
14673 rm -f conftest*
14674 fi
14675
14676 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14677   echo "$ac_t""yes" 1>&6
14678   cat >> confdefs.h <<\EOF
14679 #define HAVE_SPAWNLP 1
14680 EOF
14681
14682 else
14683   echo "$ac_t""no" 1>&6
14684 fi
14685
14686
14687 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14688 echo "configure:14689: checking for _snprintf" >&5
14689 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14690   echo $ac_n "(cached) $ac_c" 1>&6
14691 else
14692   cat > conftest.$ac_ext <<EOF
14693 #line 14694 "configure"
14694 #include "confdefs.h"
14695 /* System header to define __stub macros and hopefully few prototypes,
14696     which can conflict with char _snprintf(); below.  */
14697 #include <assert.h>
14698 /* Override any gcc2 internal prototype to avoid an error.  */
14699 /* We use char because int might match the return type of a gcc2
14700     builtin and then its argument prototype would still apply.  */
14701 char _snprintf();
14702 char (*f)();
14703
14704 int main() {
14705
14706 /* The GNU C library defines this for functions which it implements
14707     to always fail with ENOSYS.  Some functions are actually named
14708     something starting with __ and the normal name is an alias.  */
14709 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14710 choke me
14711 #else
14712 f = _snprintf;
14713 #endif
14714
14715 ; return 0; }
14716 EOF
14717 if { (eval echo configure:14718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14718   rm -rf conftest*
14719   eval "ac_cv_func__snprintf=yes"
14720 else
14721   echo "configure: failed program was:" >&5
14722   cat conftest.$ac_ext >&5
14723   rm -rf conftest*
14724   eval "ac_cv_func__snprintf=no"
14725 fi
14726 rm -f conftest*
14727 fi
14728
14729 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14730   echo "$ac_t""yes" 1>&6
14731   ac_cv_func_snprintf=yes
14732         cat >> confdefs.h <<\EOF
14733 #define snprintf _snprintf
14734 EOF
14735
14736
14737 else
14738   echo "$ac_t""no" 1>&6
14739 fi
14740
14741
14742 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14743 echo "configure:14744: checking for _vsnprintf" >&5
14744 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   cat > conftest.$ac_ext <<EOF
14748 #line 14749 "configure"
14749 #include "confdefs.h"
14750 /* System header to define __stub macros and hopefully few prototypes,
14751     which can conflict with char _vsnprintf(); below.  */
14752 #include <assert.h>
14753 /* Override any gcc2 internal prototype to avoid an error.  */
14754 /* We use char because int might match the return type of a gcc2
14755     builtin and then its argument prototype would still apply.  */
14756 char _vsnprintf();
14757 char (*f)();
14758
14759 int main() {
14760
14761 /* The GNU C library defines this for functions which it implements
14762     to always fail with ENOSYS.  Some functions are actually named
14763     something starting with __ and the normal name is an alias.  */
14764 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14765 choke me
14766 #else
14767 f = _vsnprintf;
14768 #endif
14769
14770 ; return 0; }
14771 EOF
14772 if { (eval echo configure:14773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14773   rm -rf conftest*
14774   eval "ac_cv_func__vsnprintf=yes"
14775 else
14776   echo "configure: failed program was:" >&5
14777   cat conftest.$ac_ext >&5
14778   rm -rf conftest*
14779   eval "ac_cv_func__vsnprintf=no"
14780 fi
14781 rm -f conftest*
14782 fi
14783
14784 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14785   echo "$ac_t""yes" 1>&6
14786   ac_cv_func_vsnprintf=yes
14787         cat >> confdefs.h <<\EOF
14788 #define vsnprintf _vsnprintf
14789 EOF
14790
14791
14792 else
14793   echo "$ac_t""no" 1>&6
14794 fi
14795
14796
14797 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14798 echo "configure:14799: checking for vprintf" >&5
14799 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14800   echo $ac_n "(cached) $ac_c" 1>&6
14801 else
14802   cat > conftest.$ac_ext <<EOF
14803 #line 14804 "configure"
14804 #include "confdefs.h"
14805 /* System header to define __stub macros and hopefully few prototypes,
14806     which can conflict with char vprintf(); below.  */
14807 #include <assert.h>
14808 /* Override any gcc2 internal prototype to avoid an error.  */
14809 /* We use char because int might match the return type of a gcc2
14810     builtin and then its argument prototype would still apply.  */
14811 char vprintf();
14812 char (*f)();
14813
14814 int main() {
14815
14816 /* The GNU C library defines this for functions which it implements
14817     to always fail with ENOSYS.  Some functions are actually named
14818     something starting with __ and the normal name is an alias.  */
14819 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14820 choke me
14821 #else
14822 f = vprintf;
14823 #endif
14824
14825 ; return 0; }
14826 EOF
14827 if { (eval echo configure:14828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14828   rm -rf conftest*
14829   eval "ac_cv_func_vprintf=yes"
14830 else
14831   echo "configure: failed program was:" >&5
14832   cat conftest.$ac_ext >&5
14833   rm -rf conftest*
14834   eval "ac_cv_func_vprintf=no"
14835 fi
14836 rm -f conftest*
14837 fi
14838
14839 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14840   echo "$ac_t""yes" 1>&6
14841   cat >> confdefs.h <<\EOF
14842 #define HAVE_VPRINTF 1
14843 EOF
14844
14845 else
14846   echo "$ac_t""no" 1>&6
14847 fi
14848
14849 if test "$ac_cv_func_vprintf" != yes; then
14850 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14851 echo "configure:14852: checking for _doprnt" >&5
14852 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14853   echo $ac_n "(cached) $ac_c" 1>&6
14854 else
14855   cat > conftest.$ac_ext <<EOF
14856 #line 14857 "configure"
14857 #include "confdefs.h"
14858 /* System header to define __stub macros and hopefully few prototypes,
14859     which can conflict with char _doprnt(); below.  */
14860 #include <assert.h>
14861 /* Override any gcc2 internal prototype to avoid an error.  */
14862 /* We use char because int might match the return type of a gcc2
14863     builtin and then its argument prototype would still apply.  */
14864 char _doprnt();
14865 char (*f)();
14866
14867 int main() {
14868
14869 /* The GNU C library defines this for functions which it implements
14870     to always fail with ENOSYS.  Some functions are actually named
14871     something starting with __ and the normal name is an alias.  */
14872 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14873 choke me
14874 #else
14875 f = _doprnt;
14876 #endif
14877
14878 ; return 0; }
14879 EOF
14880 if { (eval echo configure:14881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14881   rm -rf conftest*
14882   eval "ac_cv_func__doprnt=yes"
14883 else
14884   echo "configure: failed program was:" >&5
14885   cat conftest.$ac_ext >&5
14886   rm -rf conftest*
14887   eval "ac_cv_func__doprnt=no"
14888 fi
14889 rm -f conftest*
14890 fi
14891
14892 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14893   echo "$ac_t""yes" 1>&6
14894   cat >> confdefs.h <<\EOF
14895 #define HAVE_DOPRNT 1
14896 EOF
14897
14898 else
14899   echo "$ac_t""no" 1>&6
14900 fi
14901
14902 fi
14903
14904
14905 if test $ac_cv_func_vprintf = yes ; then
14906                 for ac_func in vsnprintf vsprintf
14907 do
14908 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14909 echo "configure:14910: checking for $ac_func" >&5
14910 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14911   echo $ac_n "(cached) $ac_c" 1>&6
14912 else
14913   cat > conftest.$ac_ext <<EOF
14914 #line 14915 "configure"
14915 #include "confdefs.h"
14916 /* System header to define __stub macros and hopefully few prototypes,
14917     which can conflict with char $ac_func(); below.  */
14918 #include <assert.h>
14919 /* Override any gcc2 internal prototype to avoid an error.  */
14920 /* We use char because int might match the return type of a gcc2
14921     builtin and then its argument prototype would still apply.  */
14922 char $ac_func();
14923 char (*f)();
14924
14925 int main() {
14926
14927 /* The GNU C library defines this for functions which it implements
14928     to always fail with ENOSYS.  Some functions are actually named
14929     something starting with __ and the normal name is an alias.  */
14930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14931 choke me
14932 #else
14933 f = $ac_func;
14934 #endif
14935
14936 ; return 0; }
14937 EOF
14938 if { (eval echo configure:14939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14939   rm -rf conftest*
14940   eval "ac_cv_func_$ac_func=yes"
14941 else
14942   echo "configure: failed program was:" >&5
14943   cat conftest.$ac_ext >&5
14944   rm -rf conftest*
14945   eval "ac_cv_func_$ac_func=no"
14946 fi
14947 rm -f conftest*
14948 fi
14949
14950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14951   echo "$ac_t""yes" 1>&6
14952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14953   cat >> confdefs.h <<EOF
14954 #define $ac_tr_func 1
14955 EOF
14956  
14957 else
14958   echo "$ac_t""no" 1>&6
14959 fi
14960 done
14961
14962 fi
14963
14964 for ac_func in \
14965         bcopy                   \
14966         closesocket             \
14967         endgrent                \
14968         endpwent                \
14969         flock                   \
14970         getdtablesize   \
14971         getgrgid                \
14972         gethostname             \
14973         getpass                 \
14974         getpwuid                \
14975         getpwnam                \
14976         getspnam                \
14977         gettimeofday    \
14978         initgroups              \
14979         lockf                   \
14980         memcpy                  \
14981         memmove                 \
14982         mkstemp                 \
14983         pipe                    \
14984         read                    \
14985         recv                    \
14986         recvfrom                \
14987         setpwfile               \
14988         setgid                  \
14989         setegid                 \
14990         setsid                  \
14991         setuid                  \
14992         seteuid                 \
14993         sigaction               \
14994         signal                  \
14995         sigset                  \
14996         snprintf                \
14997         strdup                  \
14998         strerror                \
14999         strpbrk                 \
15000         strrchr                 \
15001         strsep                  \
15002         strstr                  \
15003         strtol                  \
15004         strtoul                 \
15005         strspn                  \
15006         sysconf                 \
15007         waitpid                 \
15008         wait4                   \
15009         write                   \
15010         send                    \
15011         sendto                  \
15012
15013 do
15014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15015 echo "configure:15016: checking for $ac_func" >&5
15016 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15017   echo $ac_n "(cached) $ac_c" 1>&6
15018 else
15019   cat > conftest.$ac_ext <<EOF
15020 #line 15021 "configure"
15021 #include "confdefs.h"
15022 /* System header to define __stub macros and hopefully few prototypes,
15023     which can conflict with char $ac_func(); below.  */
15024 #include <assert.h>
15025 /* Override any gcc2 internal prototype to avoid an error.  */
15026 /* We use char because int might match the return type of a gcc2
15027     builtin and then its argument prototype would still apply.  */
15028 char $ac_func();
15029 char (*f)();
15030
15031 int main() {
15032
15033 /* The GNU C library defines this for functions which it implements
15034     to always fail with ENOSYS.  Some functions are actually named
15035     something starting with __ and the normal name is an alias.  */
15036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15037 choke me
15038 #else
15039 f = $ac_func;
15040 #endif
15041
15042 ; return 0; }
15043 EOF
15044 if { (eval echo configure:15045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15045   rm -rf conftest*
15046   eval "ac_cv_func_$ac_func=yes"
15047 else
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   rm -rf conftest*
15051   eval "ac_cv_func_$ac_func=no"
15052 fi
15053 rm -f conftest*
15054 fi
15055
15056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15057   echo "$ac_t""yes" 1>&6
15058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15059   cat >> confdefs.h <<EOF
15060 #define $ac_tr_func 1
15061 EOF
15062  
15063 else
15064   echo "$ac_t""no" 1>&6
15065 fi
15066 done
15067
15068
15069 for ac_func in getopt tempnam
15070 do
15071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15072 echo "configure:15073: checking for $ac_func" >&5
15073 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15074   echo $ac_n "(cached) $ac_c" 1>&6
15075 else
15076   cat > conftest.$ac_ext <<EOF
15077 #line 15078 "configure"
15078 #include "confdefs.h"
15079 /* System header to define __stub macros and hopefully few prototypes,
15080     which can conflict with char $ac_func(); below.  */
15081 #include <assert.h>
15082 /* Override any gcc2 internal prototype to avoid an error.  */
15083 /* We use char because int might match the return type of a gcc2
15084     builtin and then its argument prototype would still apply.  */
15085 char $ac_func();
15086 char (*f)();
15087
15088 int main() {
15089
15090 /* The GNU C library defines this for functions which it implements
15091     to always fail with ENOSYS.  Some functions are actually named
15092     something starting with __ and the normal name is an alias.  */
15093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15094 choke me
15095 #else
15096 f = $ac_func;
15097 #endif
15098
15099 ; return 0; }
15100 EOF
15101 if { (eval echo configure:15102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15102   rm -rf conftest*
15103   eval "ac_cv_func_$ac_func=yes"
15104 else
15105   echo "configure: failed program was:" >&5
15106   cat conftest.$ac_ext >&5
15107   rm -rf conftest*
15108   eval "ac_cv_func_$ac_func=no"
15109 fi
15110 rm -f conftest*
15111 fi
15112
15113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15114   echo "$ac_t""yes" 1>&6
15115     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15116   cat >> confdefs.h <<EOF
15117 #define $ac_tr_func 1
15118 EOF
15119  
15120 else
15121   echo "$ac_t""no" 1>&6
15122 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15123 fi
15124 done
15125
15126
15127
15128 if test "$ac_cv_func_getopt" != yes; then
15129     LIBSRCS="$LIBSRCS getopt.c"
15130 fi
15131
15132 if test "$ac_cv_func_tempnam" != yes; then
15133     LIBSRCS="$LIBSRCS tempnam.c"
15134 fi
15135
15136 # Check Configuration
15137 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15138 echo "configure:15139: checking declaration of sys_errlist" >&5
15139 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15140   echo $ac_n "(cached) $ac_c" 1>&6
15141 else
15142   
15143         cat > conftest.$ac_ext <<EOF
15144 #line 15145 "configure"
15145 #include "confdefs.h"
15146
15147 #include <stdio.h>
15148 #include <sys/types.h>
15149 #include <errno.h>
15150 #ifdef WINNT
15151 #include <stdlib.h>
15152 #endif 
15153 int main() {
15154 char *c = (char *) *sys_errlist
15155 ; return 0; }
15156 EOF
15157 if { (eval echo configure:15158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15158   rm -rf conftest*
15159   ol_cv_dcl_sys_errlist=yes
15160         ol_cv_have_sys_errlist=yes
15161 else
15162   echo "configure: failed program was:" >&5
15163   cat conftest.$ac_ext >&5
15164   rm -rf conftest*
15165   ol_cv_dcl_sys_errlist=no
15166 fi
15167 rm -f conftest*
15168 fi
15169
15170 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15171 #
15172 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15173 if test $ol_cv_dcl_sys_errlist = no ; then
15174         cat >> confdefs.h <<\EOF
15175 #define DECL_SYS_ERRLIST 1
15176 EOF
15177
15178
15179         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15180 echo "configure:15181: checking existence of sys_errlist" >&5
15181 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15182   echo $ac_n "(cached) $ac_c" 1>&6
15183 else
15184   
15185                 cat > conftest.$ac_ext <<EOF
15186 #line 15187 "configure"
15187 #include "confdefs.h"
15188 #include <errno.h>
15189 int main() {
15190 char *c = (char *) *sys_errlist
15191 ; return 0; }
15192 EOF
15193 if { (eval echo configure:15194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15194   rm -rf conftest*
15195   ol_cv_have_sys_errlist=yes
15196 else
15197   echo "configure: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   rm -rf conftest*
15200   ol_cv_have_sys_errlist=no
15201 fi
15202 rm -f conftest*
15203 fi
15204
15205 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15206 fi
15207 if test $ol_cv_have_sys_errlist = yes ; then
15208         cat >> confdefs.h <<\EOF
15209 #define HAVE_SYS_ERRLIST 1
15210 EOF
15211
15212 fi
15213
15214
15215
15216 if test "$ol_enable_debug" != no ; then
15217         cat >> confdefs.h <<\EOF
15218 #define LDAP_DEBUG 1
15219 EOF
15220
15221 fi
15222 if test "$ol_enable_syslog" = yes ; then
15223         cat >> confdefs.h <<\EOF
15224 #define LDAP_SYSLOG 1
15225 EOF
15226
15227 fi
15228 if test "$ol_enable_libui" = yes ; then
15229         cat >> confdefs.h <<\EOF
15230 #define LDAP_LIBUI 1
15231 EOF
15232
15233 fi
15234 if test "$ol_enable_cache" = no ; then
15235         cat >> confdefs.h <<\EOF
15236 #define LDAP_NOCACHE 1
15237 EOF
15238
15239 fi
15240 if test "$ol_link_kbind" != no ; then
15241         cat >> confdefs.h <<\EOF
15242 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15243 EOF
15244
15245 fi
15246 if test "$ol_enable_dns" != no ; then
15247         cat >> confdefs.h <<\EOF
15248 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15249 EOF
15250
15251 fi
15252 if test "$ol_enable_proctitle" != no ; then
15253         cat >> confdefs.h <<\EOF
15254 #define LDAP_PROCTITLE 1
15255 EOF
15256
15257 fi
15258 if test "$ol_enable_referrals" != no ; then
15259         cat >> confdefs.h <<\EOF
15260 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15261 EOF
15262
15263 fi
15264 if test "$ol_enable_cldap" != no ; then
15265         cat >> confdefs.h <<\EOF
15266 #define LDAP_CONNECTIONLESS 1
15267 EOF
15268
15269 fi
15270 if test "$ol_enable_ldapi" != no; then
15271         cat >> confdefs.h <<\EOF
15272 #define USE_PF_LOCAL 1
15273 EOF
15274
15275 fi
15276
15277 if test "$ol_enable_cleartext" != no ; then
15278         cat >> confdefs.h <<\EOF
15279 #define SLAPD_CLEARTEXT 1
15280 EOF
15281
15282 fi
15283 if test "$ol_enable_crypt" != no ; then
15284         cat >> confdefs.h <<\EOF
15285 #define SLAPD_CRYPT 1
15286 EOF
15287
15288 fi
15289 if test "$ol_link_kpasswd" != no ; then
15290         cat >> confdefs.h <<\EOF
15291 #define SLAPD_KPASSWD 1
15292 EOF
15293
15294 fi
15295 if test "$ol_enable_multimaster" != no ; then
15296         cat >> confdefs.h <<\EOF
15297 #define SLAPD_MULTIMASTER 1
15298 EOF
15299
15300 fi
15301 if test "$ol_enable_phonetic" != no ; then
15302         cat >> confdefs.h <<\EOF
15303 #define SLAPD_PHONETIC 1
15304 EOF
15305
15306 fi
15307 if test "$ol_enable_rlookups" != no ; then
15308         cat >> confdefs.h <<\EOF
15309 #define SLAPD_RLOOKUPS 1
15310 EOF
15311
15312 fi
15313 if test "$ol_enable_aci" != no ; then
15314         cat >> confdefs.h <<\EOF
15315 #define SLAPD_ACI_ENABLED 1
15316 EOF
15317
15318 fi
15319 if test "$ol_enable_discreteaci" != no ; then
15320         cat >> confdefs.h <<\EOF
15321 #define SLAPD_ACI_DISCRETE_RIGHTS 1
15322 EOF
15323
15324 fi
15325
15326 if test "$ol_link_modules" != no ; then
15327         cat >> confdefs.h <<\EOF
15328 #define SLAPD_MODULES 1
15329 EOF
15330
15331         BUILD_SLAPD=yes
15332         SLAPD_MODULES_LDFLAGS="-dlopen self"
15333 fi
15334
15335 if test "$ol_link_bdb2" != no ; then
15336         cat >> confdefs.h <<\EOF
15337 #define SLAPD_BDB2 1
15338 EOF
15339
15340         BUILD_SLAPD=yes
15341         BUILD_BDB2=yes
15342         if test "$ol_with_bdb2_module" != static ; then
15343                 cat >> confdefs.h <<\EOF
15344 #define SLAPD_BDB2_DYNAMIC 1
15345 EOF
15346
15347                 BUILD_BDB2=mod
15348                 BUILD_BDB2_DYNAMIC=shared
15349                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15350         fi
15351 fi
15352
15353 if test "$ol_enable_ldap" != no ; then
15354         cat >> confdefs.h <<\EOF
15355 #define SLAPD_LDAP 1
15356 EOF
15357
15358         BUILD_SLAPD=yes
15359         BUILD_LDAP=yes
15360         if test "$ol_with_ldap_module" != static ; then
15361                 cat >> confdefs.h <<\EOF
15362 #define SLAPD_LDAP_DYNAMIC 1
15363 EOF
15364
15365                 BUILD_LDAP=mod
15366                 BUILD_LDAP_DYNAMIC=shared
15367                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15368         fi
15369 fi
15370
15371 if test "$ol_link_ldbm" != no ; then
15372         cat >> confdefs.h <<\EOF
15373 #define SLAPD_LDBM 1
15374 EOF
15375
15376         BUILD_SLAPD=yes
15377         BUILD_LDBM=yes
15378         if test "$ol_with_ldbm_module" != static ; then
15379                 cat >> confdefs.h <<\EOF
15380 #define SLAPD_LDBM_DYNAMIC 1
15381 EOF
15382
15383                 BUILD_LDBM=mod
15384                 BUILD_LDBM_DYNAMIC=shared
15385                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15386         fi
15387 fi
15388
15389 if test "$ol_enable_passwd" != no ; then
15390         cat >> confdefs.h <<\EOF
15391 #define SLAPD_PASSWD 1
15392 EOF
15393
15394         BUILD_SLAPD=yes
15395         BUILD_PASSWD=yes
15396         if test "$ol_with_passwd_module" != static ; then
15397                 cat >> confdefs.h <<\EOF
15398 #define SLAPD_PASSWD_DYNAMIC 1
15399 EOF
15400
15401                 BUILD_PASSWD=mod
15402                 BUILD_PASSWD_DYNAMIC=shared
15403                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15404         fi
15405 fi
15406
15407 if test "$ol_link_perl" != no ; then
15408         cat >> confdefs.h <<\EOF
15409 #define SLAPD_PERL 1
15410 EOF
15411
15412         BUILD_SLAPD=yes
15413         BUILD_PERL=yes
15414         if test "$ol_with_perl_module" != static ; then
15415                 cat >> confdefs.h <<\EOF
15416 #define SLAPD_PERL_DYNAMIC 1
15417 EOF
15418
15419                 BUILD_PERL=mod
15420                 BUILD_PERL_DYNAMIC=shared
15421                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15422         fi
15423 fi
15424
15425 if test "$ol_enable_shell" != no ; then
15426         cat >> confdefs.h <<\EOF
15427 #define SLAPD_SHELL 1
15428 EOF
15429
15430         BUILD_SLAPD=yes
15431         BUILD_SHELL=yes
15432         if test "$ol_with_shell_module" != static ; then
15433                 cat >> confdefs.h <<\EOF
15434 #define SLAPD_SHELL_DYNAMIC 1
15435 EOF
15436
15437                 BUILD_SHELL=mod
15438                 BUILD_SHELL_DYNAMIC=shared
15439                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15440         fi
15441 fi
15442
15443 if test "$ol_enable_tcl" != no ; then
15444         cat >> confdefs.h <<\EOF
15445 #define SLAPD_TCL 1
15446 EOF
15447
15448         BUILD_SLAPD=yes
15449         BUILD_TCL=yes
15450         if test "$ol_with_tcl_module" != static; then
15451                 cat >> confdefs.h <<\EOF
15452 #define SLAPD_TCL_DYNAMIC 1
15453 EOF
15454
15455                 BUILD_TCL=mod
15456                 BUILD_TCL_DYNAMIC=shared
15457                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15458         fi
15459 fi
15460
15461 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15462         $BUILD_SLAPD = yes ; then
15463         BUILD_SLURPD=yes
15464 fi
15465
15466 if test "$ol_link_isode" != no ; then
15467         BUILD_LDAPD=yes
15468 fi
15469
15470
15471 if test "$LINK_BINS_DYNAMIC" = yes; then
15472     LIB_LINKAGE=DYN
15473     LT_LIB_LINKAGE=shared
15474 else
15475     LIB_LINKAGE=STAT
15476     LT_LIB_LINKAGE=static
15477 fi
15478
15479 if test "$ac_cv_mingw32" = yes ; then
15480     PLAT=NT
15481     DYN_EXT=dll
15482 else
15483     PLAT=UNIX
15484     DYN_EXT=so
15485 fi
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496   
15497   
15498   
15499   
15500   
15501   
15502   
15503   
15504   
15505   
15506   
15507   
15508   
15509   
15510   
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542 trap '' 1 2 15
15543
15544 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15545
15546 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15547 # Let make expand exec_prefix.
15548 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15549
15550 # Any assignment to VPATH causes Sun make to only execute
15551 # the first set of double-colon rules, so remove it if not needed.
15552 # If there is a colon in the path, we need to keep it.
15553 if test "x$srcdir" = x.; then
15554   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15555 fi
15556
15557 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15558
15559 DEFS=-DHAVE_CONFIG_H
15560
15561 # Without the "./", some shells look in PATH for config.status.
15562 : ${CONFIG_STATUS=./config.status}
15563
15564 echo creating $CONFIG_STATUS
15565 rm -f $CONFIG_STATUS
15566 cat > $CONFIG_STATUS <<EOF
15567 #! /bin/sh
15568 # Generated automatically by configure.
15569 # Run this file to recreate the current configuration.
15570 # This directory was configured as follows,
15571 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15572 #
15573 # $0 $ac_configure_args
15574 #
15575 # Compiler output produced by configure, useful for debugging
15576 # configure, is in ./config.log if it exists.
15577
15578 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15579 for ac_option
15580 do
15581   case "\$ac_option" in
15582   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15583     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15584     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15585   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15586     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15587     exit 0 ;;
15588   -help | --help | --hel | --he | --h)
15589     echo "\$ac_cs_usage"; exit 0 ;;
15590   *) echo "\$ac_cs_usage"; exit 1 ;;
15591   esac
15592 done
15593
15594 ac_given_srcdir=$srcdir
15595 ac_given_INSTALL="$INSTALL"
15596
15597 trap 'rm -fr `echo "\
15598 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15599 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15600 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15601 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15602 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15603 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15604 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15605 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15606 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15607 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15608 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15609 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15610 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15611 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15612 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15613 include/Makefile:build/top.mk:include/Makefile.in \
15614 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15615 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15616 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15617 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15618 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15619 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15620 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15621 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15622 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15623 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15624 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15625 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15626 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15627 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15628 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15629 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15630 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15631 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15632 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15633 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15634 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15635 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15636 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15637 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15638 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15639 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15640  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15641 EOF
15642 cat >> $CONFIG_STATUS <<EOF
15643
15644 # Protect against being on the right side of a sed subst in config.status.
15645 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15646  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15647 $ac_vpsub
15648 $extrasub
15649 s%@SHELL@%$SHELL%g
15650 s%@CFLAGS@%$CFLAGS%g
15651 s%@CPPFLAGS@%$CPPFLAGS%g
15652 s%@CXXFLAGS@%$CXXFLAGS%g
15653 s%@FFLAGS@%$FFLAGS%g
15654 s%@DEFS@%$DEFS%g
15655 s%@LDFLAGS@%$LDFLAGS%g
15656 s%@LIBS@%$LIBS%g
15657 s%@exec_prefix@%$exec_prefix%g
15658 s%@prefix@%$prefix%g
15659 s%@program_transform_name@%$program_transform_name%g
15660 s%@bindir@%$bindir%g
15661 s%@sbindir@%$sbindir%g
15662 s%@libexecdir@%$libexecdir%g
15663 s%@datadir@%$datadir%g
15664 s%@sysconfdir@%$sysconfdir%g
15665 s%@sharedstatedir@%$sharedstatedir%g
15666 s%@localstatedir@%$localstatedir%g
15667 s%@libdir@%$libdir%g
15668 s%@includedir@%$includedir%g
15669 s%@oldincludedir@%$oldincludedir%g
15670 s%@infodir@%$infodir%g
15671 s%@mandir@%$mandir%g
15672 s%@host@%$host%g
15673 s%@host_alias@%$host_alias%g
15674 s%@host_cpu@%$host_cpu%g
15675 s%@host_vendor@%$host_vendor%g
15676 s%@host_os@%$host_os%g
15677 s%@target@%$target%g
15678 s%@target_alias@%$target_alias%g
15679 s%@target_cpu@%$target_cpu%g
15680 s%@target_vendor@%$target_vendor%g
15681 s%@target_os@%$target_os%g
15682 s%@build@%$build%g
15683 s%@build_alias@%$build_alias%g
15684 s%@build_cpu@%$build_cpu%g
15685 s%@build_vendor@%$build_vendor%g
15686 s%@build_os@%$build_os%g
15687 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15688 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15689 s%@INSTALL_DATA@%$INSTALL_DATA%g
15690 s%@PACKAGE@%$PACKAGE%g
15691 s%@VERSION@%$VERSION%g
15692 s%@ACLOCAL@%$ACLOCAL%g
15693 s%@AUTOCONF@%$AUTOCONF%g
15694 s%@AUTOMAKE@%$AUTOMAKE%g
15695 s%@AUTOHEADER@%$AUTOHEADER%g
15696 s%@MAKEINFO@%$MAKEINFO%g
15697 s%@install_sh@%$install_sh%g
15698 s%@AMTAR@%$AMTAR%g
15699 s%@AWK@%$AWK%g
15700 s%@AMTARFLAGS@%$AMTARFLAGS%g
15701 s%@SET_MAKE@%$SET_MAKE%g
15702 s%@top_builddir@%$top_builddir%g
15703 s%@ldap_subdir@%$ldap_subdir%g
15704 s%@CC@%$CC%g
15705 s%@RANLIB@%$RANLIB%g
15706 s%@LD@%$LD%g
15707 s%@NM@%$NM%g
15708 s%@LN_S@%$LN_S%g
15709 s%@DLLTOOL@%$DLLTOOL%g
15710 s%@AS@%$AS%g
15711 s%@OBJDUMP@%$OBJDUMP%g
15712 s%@LIBTOOL@%$LIBTOOL%g
15713 s%@LN_H@%$LN_H%g
15714 s%@SENDMAIL@%$SENDMAIL%g
15715 s%@EDITOR@%$EDITOR%g
15716 s%@FINGER@%$FINGER%g
15717 s%@PERLBIN@%$PERLBIN%g
15718 s%@CPP@%$CPP%g
15719 s%@EXEEXT@%$EXEEXT%g
15720 s%@OBJEXT@%$OBJEXT%g
15721 s%@OL_MKDEP@%$OL_MKDEP%g
15722 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15723 s%@PEPSY@%$PEPSY%g
15724 s%@LIBOBJS@%$LIBOBJS%g
15725 s%@LIBSRCS@%$LIBSRCS%g
15726 s%@PLAT@%$PLAT%g
15727 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15728 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15729 s%@DYN_EXT@%$DYN_EXT%g
15730 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15731 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15732 s%@BUILD_BDB2@%$BUILD_BDB2%g
15733 s%@BUILD_LDAP@%$BUILD_LDAP%g
15734 s%@BUILD_LDBM@%$BUILD_LDBM%g
15735 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15736 s%@BUILD_PERL@%$BUILD_PERL%g
15737 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15738 s%@BUILD_SHELL@%$BUILD_SHELL%g
15739 s%@BUILD_TCL@%$BUILD_TCL%g
15740 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15741 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15742 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15743 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15744 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15745 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15746 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15747 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15748 s%@LDAP_LIBS@%$LDAP_LIBS%g
15749 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15750 s%@LDIF_LIBS@%$LDIF_LIBS%g
15751 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15752 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15753 s%@LDBM_LIBS@%$LDBM_LIBS%g
15754 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15755 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15756 s%@WRAP_LIBS@%$WRAP_LIBS%g
15757 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15758 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15759 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15760 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15761 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15762 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15763 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15764 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15765 s%@KRB4_LIBS@%$KRB4_LIBS%g
15766 s%@KRB5_LIBS@%$KRB5_LIBS%g
15767 s%@READLINE_LIBS@%$READLINE_LIBS%g
15768 s%@SASL_LIBS@%$SASL_LIBS%g
15769 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15770 s%@TLS_LIBS@%$TLS_LIBS%g
15771 s%@MODULES_LIBS@%$MODULES_LIBS%g
15772
15773 CEOF
15774 EOF
15775
15776 cat >> $CONFIG_STATUS <<\EOF
15777
15778 # Split the substitutions into bite-sized pieces for seds with
15779 # small command number limits, like on Digital OSF/1 and HP-UX.
15780 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15781 ac_file=1 # Number of current file.
15782 ac_beg=1 # First line for current file.
15783 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15784 ac_more_lines=:
15785 ac_sed_cmds=""
15786 while $ac_more_lines; do
15787   if test $ac_beg -gt 1; then
15788     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15789   else
15790     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15791   fi
15792   if test ! -s conftest.s$ac_file; then
15793     ac_more_lines=false
15794     rm -f conftest.s$ac_file
15795   else
15796     if test -z "$ac_sed_cmds"; then
15797       ac_sed_cmds="sed -f conftest.s$ac_file"
15798     else
15799       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15800     fi
15801     ac_file=`expr $ac_file + 1`
15802     ac_beg=$ac_end
15803     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15804   fi
15805 done
15806 if test -z "$ac_sed_cmds"; then
15807   ac_sed_cmds=cat
15808 fi
15809 EOF
15810
15811 cat >> $CONFIG_STATUS <<EOF
15812
15813 CONFIG_FILES=\${CONFIG_FILES-"\
15814 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15815 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15816 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15817 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15818 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15819 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15820 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15821 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15822 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15823 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15824 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15825 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15826 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15827 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15828 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15829 include/Makefile:build/top.mk:include/Makefile.in \
15830 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15831 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15832 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15833 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15834 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15835 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15836 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15837 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15838 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15839 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15840 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15841 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15842 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15843 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15844 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15845 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15846 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15847 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15848 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15849 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15850 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15851 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15852 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15853 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15854 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15855 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15856 "}
15857 EOF
15858 cat >> $CONFIG_STATUS <<\EOF
15859 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15860   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15861   case "$ac_file" in
15862   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15863        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15864   *) ac_file_in="${ac_file}.in" ;;
15865   esac
15866
15867   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15868
15869   # Remove last slash and all that follows it.  Not all systems have dirname.
15870   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15871   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15872     # The file is in a subdirectory.
15873     test ! -d "$ac_dir" && mkdir "$ac_dir"
15874     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15875     # A "../" for each directory in $ac_dir_suffix.
15876     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15877   else
15878     ac_dir_suffix= ac_dots=
15879   fi
15880
15881   case "$ac_given_srcdir" in
15882   .)  srcdir=.
15883       if test -z "$ac_dots"; then top_srcdir=.
15884       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15885   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15886   *) # Relative path.
15887     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15888     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15889   esac
15890
15891   case "$ac_given_INSTALL" in
15892   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15893   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15894   esac
15895
15896   echo creating "$ac_file"
15897   rm -f "$ac_file"
15898   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15899   case "$ac_file" in
15900   *[Mm]akefile*) ac_comsub="1i\\
15901 # $configure_input" ;;
15902   *) ac_comsub= ;;
15903   esac
15904
15905   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15906   sed -e "$ac_comsub
15907 s%@configure_input@%$configure_input%g
15908 s%@srcdir@%$srcdir%g
15909 s%@top_srcdir@%$top_srcdir%g
15910 s%@INSTALL@%$INSTALL%g
15911 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15912 fi; done
15913 rm -f conftest.s*
15914
15915 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15916 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15917 #
15918 # ac_d sets the value in "#define NAME VALUE" lines.
15919 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15920 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15921 ac_dC='\3'
15922 ac_dD='%g'
15923 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15924 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15925 ac_uB='\([      ]\)%\1#\2define\3'
15926 ac_uC=' '
15927 ac_uD='\4%g'
15928 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15929 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15930 ac_eB='$%\1#\2define\3'
15931 ac_eC=' '
15932 ac_eD='%g'
15933
15934 if test "${CONFIG_HEADERS+set}" != set; then
15935 EOF
15936 cat >> $CONFIG_STATUS <<EOF
15937   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15938 EOF
15939 cat >> $CONFIG_STATUS <<\EOF
15940 fi
15941 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15942   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15943   case "$ac_file" in
15944   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15945        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15946   *) ac_file_in="${ac_file}.in" ;;
15947   esac
15948
15949   echo creating $ac_file
15950
15951   rm -f conftest.frag conftest.in conftest.out
15952   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15953   cat $ac_file_inputs > conftest.in
15954
15955 EOF
15956
15957 # Transform confdefs.h into a sed script conftest.vals that substitutes
15958 # the proper values into config.h.in to produce config.h.  And first:
15959 # Protect against being on the right side of a sed subst in config.status.
15960 # Protect against being in an unquoted here document in config.status.
15961 rm -f conftest.vals
15962 cat > conftest.hdr <<\EOF
15963 s/[\\&%]/\\&/g
15964 s%[\\$`]%\\&%g
15965 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15966 s%ac_d%ac_u%gp
15967 s%ac_u%ac_e%gp
15968 EOF
15969 sed -n -f conftest.hdr confdefs.h > conftest.vals
15970 rm -f conftest.hdr
15971
15972 # This sed command replaces #undef with comments.  This is necessary, for
15973 # example, in the case of _POSIX_SOURCE, which is predefined and required
15974 # on some systems where configure will not decide to define it.
15975 cat >> conftest.vals <<\EOF
15976 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15977 EOF
15978
15979 # Break up conftest.vals because some shells have a limit on
15980 # the size of here documents, and old seds have small limits too.
15981
15982 rm -f conftest.tail
15983 while :
15984 do
15985   ac_lines=`grep -c . conftest.vals`
15986   # grep -c gives empty output for an empty file on some AIX systems.
15987   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15988   # Write a limited-size here document to conftest.frag.
15989   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15990   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15991   echo 'CEOF
15992   sed -f conftest.frag conftest.in > conftest.out
15993   rm -f conftest.in
15994   mv conftest.out conftest.in
15995 ' >> $CONFIG_STATUS
15996   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15997   rm -f conftest.vals
15998   mv conftest.tail conftest.vals
15999 done
16000 rm -f conftest.vals
16001
16002 cat >> $CONFIG_STATUS <<\EOF
16003   rm -f conftest.frag conftest.h
16004   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16005   cat conftest.in >> conftest.h
16006   rm -f conftest.in
16007   if cmp -s $ac_file conftest.h 2>/dev/null; then
16008     echo "$ac_file is unchanged"
16009     rm -f conftest.h
16010   else
16011     # Remove last slash and all that follows it.  Not all systems have dirname.
16012       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16013       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16014       # The file is in a subdirectory.
16015       test ! -d "$ac_dir" && mkdir "$ac_dir"
16016     fi
16017     rm -f $ac_file
16018     mv conftest.h $ac_file
16019   fi
16020 fi; done
16021
16022 EOF
16023 cat >> $CONFIG_STATUS <<EOF
16024
16025 EOF
16026 cat >> $CONFIG_STATUS <<\EOF
16027
16028 date > stamp-h
16029 echo Please \"make depend\" to build dependencies
16030
16031 exit 0
16032 EOF
16033 chmod +x $CONFIG_STATUS
16034 rm -fr confdefs* $ac_clean_files
16035 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16036