]> git.sur5r.net Git - openldap/blob - configure
All close and redirect stdin, stdout, stderr.
[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 
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"
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   fi
658 done
659 if test -z "$ac_aux_dir"; then
660   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 fi
662 ac_config_guess=$ac_aux_dir/config.guess
663 ac_config_sub=$ac_aux_dir/config.sub
664 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
665
666 OL_VERSION=`cat $ac_aux_dir/version`
667 if test -z "$OL_VERSION"; then
668         { echo "configure: error: could not determine version" 1>&2; exit 1; }
669 fi
670
671 echo "Configuring OpenLDAP $OL_VERSION ..."
672
673
674 # Do some error checking and defaulting for the host and target type.
675 # The inputs are:
676 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
677 #
678 # The rules are:
679 # 1. You are not allowed to specify --host, --target, and nonopt at the
680 #    same time.
681 # 2. Host defaults to nonopt.
682 # 3. If nonopt is not specified, then host defaults to the current host,
683 #    as determined by config.guess.
684 # 4. Target and build default to nonopt.
685 # 5. If nonopt is not specified, then target and build default to host.
686
687 # The aliases save the names the user supplied, while $host etc.
688 # will get canonicalized.
689 case $host---$target---$nonopt in
690 NONE---*---* | *---NONE---* | *---*---NONE) ;;
691 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
692 esac
693
694
695 # Make sure we can run config.sub.
696 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
697 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
698 fi
699
700 echo $ac_n "checking host system type""... $ac_c" 1>&6
701 echo "configure:702: checking host system type" >&5
702
703 host_alias=$host
704 case "$host_alias" in
705 NONE)
706   case $nonopt in
707   NONE)
708     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
709     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
710     fi ;;
711   *) host_alias=$nonopt ;;
712   esac ;;
713 esac
714
715 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
716 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
717 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
718 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
719 echo "$ac_t""$host" 1>&6
720
721 echo $ac_n "checking target system type""... $ac_c" 1>&6
722 echo "configure:723: checking target system type" >&5
723
724 target_alias=$target
725 case "$target_alias" in
726 NONE)
727   case $nonopt in
728   NONE) target_alias=$host_alias ;;
729   *) target_alias=$nonopt ;;
730   esac ;;
731 esac
732
733 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
734 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
735 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
736 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
737 echo "$ac_t""$target" 1>&6
738
739 echo $ac_n "checking build system type""... $ac_c" 1>&6
740 echo "configure:741: checking build system type" >&5
741
742 build_alias=$build
743 case "$build_alias" in
744 NONE)
745   case $nonopt in
746   NONE) build_alias=$host_alias ;;
747   *) build_alias=$nonopt ;;
748   esac ;;
749 esac
750
751 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
752 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
753 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
754 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
755 echo "$ac_t""$build" 1>&6
756
757 test "$host_alias" != "$target_alias" &&
758   test "$program_prefix$program_suffix$program_transform_name" = \
759     NONENONEs,x,x, &&
760   program_prefix=${target_alias}-
761
762
763 # Find a good install program.  We prefer a C program (faster),
764 # so one script is as good as another.  But avoid the broken or
765 # incompatible versions:
766 # SysV /etc/install, /usr/sbin/install
767 # SunOS /usr/etc/install
768 # IRIX /sbin/install
769 # AIX /bin/install
770 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
771 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
772 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
773 # ./install, which can be erroneously created by make from ./install.sh.
774 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
775 echo "configure:776: checking for a BSD compatible install" >&5
776 if test -z "$INSTALL"; then
777 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
778   echo $ac_n "(cached) $ac_c" 1>&6
779 else
780     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
781   for ac_dir in $PATH; do
782     # Account for people who put trailing slashes in PATH elements.
783     case "$ac_dir/" in
784     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
785     *)
786       # OSF1 and SCO ODT 3.0 have their own names for install.
787       # Don't use installbsd from OSF since it installs stuff as root
788       # by default.
789       for ac_prog in ginstall scoinst install; do
790         if test -f $ac_dir/$ac_prog; then
791           if test $ac_prog = install &&
792             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
793             # AIX install.  It has an incompatible calling convention.
794             :
795           else
796             ac_cv_path_install="$ac_dir/$ac_prog -c"
797             break 2
798           fi
799         fi
800       done
801       ;;
802     esac
803   done
804   IFS="$ac_save_IFS"
805
806 fi
807   if test "${ac_cv_path_install+set}" = set; then
808     INSTALL="$ac_cv_path_install"
809   else
810     # As a last resort, use the slow shell script.  We don't cache a
811     # path for INSTALL within a source directory, because that will
812     # break other packages using the cache if that directory is
813     # removed, or if the path is relative.
814     INSTALL="$ac_install_sh"
815   fi
816 fi
817 echo "$ac_t""$INSTALL" 1>&6
818
819 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
820 # It thinks the first close brace ends the variable substitution.
821 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
822
823 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
824
825 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
826
827 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
828 echo "configure:829: checking whether build environment is sane" >&5
829 # Just in case
830 sleep 1
831 echo timestamp > conftestfile
832 # Do `set' in a subshell so we don't clobber the current shell's
833 # arguments.  Must try -L first in case configure is actually a
834 # symlink; some systems play weird games with the mod time of symlinks
835 # (eg FreeBSD returns the mod time of the symlink's containing
836 # directory).
837 if (
838    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
839    if test "$*" = "X"; then
840       # -L didn't work.
841       set X `ls -t $srcdir/configure conftestfile`
842    fi
843    if test "$*" != "X $srcdir/configure conftestfile" \
844       && test "$*" != "X conftestfile $srcdir/configure"; then
845
846       # If neither matched, then we have a broken ls.  This can happen
847       # if, for instance, CONFIG_SHELL is bash and it inherits a
848       # broken ls alias from the environment.  This has actually
849       # happened.  Such a system could not be considered "sane".
850       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
851 alias in your environment" 1>&2; exit 1; }
852    fi
853
854    test "$2" = conftestfile
855    )
856 then
857    # Ok.
858    :
859 else
860    { echo "configure: error: newly created file is older than distributed files!
861 Check your system clock" 1>&2; exit 1; }
862 fi
863 rm -f conftest*
864 echo "$ac_t""yes" 1>&6
865 if test "$program_transform_name" = s,x,x,; then
866   program_transform_name=
867 else
868   # Double any \ or $.  echo might interpret backslashes.
869   cat <<\EOF_SED > conftestsed
870 s,\\,\\\\,g; s,\$,$$,g
871 EOF_SED
872   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
873   rm -f conftestsed
874 fi
875 test "$program_prefix" != NONE &&
876   program_transform_name="s,^,${program_prefix},; $program_transform_name"
877 # Use a double $ so make ignores it.
878 test "$program_suffix" != NONE &&
879   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
880
881 # sed with no file args requires a program.
882 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
883
884 for ac_prog in mawk gawk nawk awk
885 do
886 # Extract the first word of "$ac_prog", so it can be a program name with args.
887 set dummy $ac_prog; ac_word=$2
888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
889 echo "configure:890: checking for $ac_word" >&5
890 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
891   echo $ac_n "(cached) $ac_c" 1>&6
892 else
893   if test -n "$AWK"; then
894   ac_cv_prog_AWK="$AWK" # Let the user override the test.
895 else
896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
897   ac_dummy="$PATH"
898   for ac_dir in $ac_dummy; do
899     test -z "$ac_dir" && ac_dir=.
900     if test -f $ac_dir/$ac_word; then
901       ac_cv_prog_AWK="$ac_prog"
902       break
903     fi
904   done
905   IFS="$ac_save_ifs"
906 fi
907 fi
908 AWK="$ac_cv_prog_AWK"
909 if test -n "$AWK"; then
910   echo "$ac_t""$AWK" 1>&6
911 else
912   echo "$ac_t""no" 1>&6
913 fi
914
915 test -n "$AWK" && break
916 done
917
918 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
919 echo "configure:920: checking whether ${MAKE-make} sets \${MAKE}" >&5
920 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
921 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
922   echo $ac_n "(cached) $ac_c" 1>&6
923 else
924   cat > conftestmake <<\EOF
925 all:
926         @echo 'ac_maketemp="${MAKE}"'
927 EOF
928 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
929 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
930 if test -n "$ac_maketemp"; then
931   eval ac_cv_prog_make_${ac_make}_set=yes
932 else
933   eval ac_cv_prog_make_${ac_make}_set=no
934 fi
935 rm -f conftestmake
936 fi
937 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
938   echo "$ac_t""yes" 1>&6
939   SET_MAKE=
940 else
941   echo "$ac_t""no" 1>&6
942   SET_MAKE="MAKE=${MAKE-make}"
943 fi
944
945
946
947 PACKAGE=OpenLDAP
948
949 VERSION=$OL_VERSION
950
951 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
952   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
953 fi
954
955
956
957 missing_dir=`cd $ac_aux_dir && pwd`
958 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
959 echo "configure:960: checking for working aclocal" >&5
960 # Run test in a subshell; some versions of sh will print an error if
961 # an executable is not found, even if stderr is redirected.
962 # Redirect stdin to placate older versions of autoconf.  Sigh.
963 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
964    ACLOCAL=aclocal
965    echo "$ac_t""found" 1>&6
966 else
967    ACLOCAL="$missing_dir/missing aclocal"
968    echo "$ac_t""missing" 1>&6
969 fi
970
971 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
972 echo "configure:973: checking for working autoconf" >&5
973 # Run test in a subshell; some versions of sh will print an error if
974 # an executable is not found, even if stderr is redirected.
975 # Redirect stdin to placate older versions of autoconf.  Sigh.
976 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
977    AUTOCONF=autoconf
978    echo "$ac_t""found" 1>&6
979 else
980    AUTOCONF="$missing_dir/missing autoconf"
981    echo "$ac_t""missing" 1>&6
982 fi
983
984 echo $ac_n "checking for working automake""... $ac_c" 1>&6
985 echo "configure:986: checking for working automake" >&5
986 # Run test in a subshell; some versions of sh will print an error if
987 # an executable is not found, even if stderr is redirected.
988 # Redirect stdin to placate older versions of autoconf.  Sigh.
989 if (automake --version) < /dev/null > /dev/null 2>&1; then
990    AUTOMAKE=automake
991    echo "$ac_t""found" 1>&6
992 else
993    AUTOMAKE="$missing_dir/missing automake"
994    echo "$ac_t""missing" 1>&6
995 fi
996
997 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
998 echo "configure:999: checking for working autoheader" >&5
999 # Run test in a subshell; some versions of sh will print an error if
1000 # an executable is not found, even if stderr is redirected.
1001 # Redirect stdin to placate older versions of autoconf.  Sigh.
1002 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1003    AUTOHEADER=autoheader
1004    echo "$ac_t""found" 1>&6
1005 else
1006    AUTOHEADER="$missing_dir/missing autoheader"
1007    echo "$ac_t""missing" 1>&6
1008 fi
1009
1010 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1011 echo "configure:1012: checking for working makeinfo" >&5
1012 # Run test in a subshell; some versions of sh will print an error if
1013 # an executable is not found, even if stderr is redirected.
1014 # Redirect stdin to placate older versions of autoconf.  Sigh.
1015 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1016    MAKEINFO=makeinfo
1017    echo "$ac_t""found" 1>&6
1018 else
1019    MAKEINFO="$missing_dir/missing makeinfo"
1020    echo "$ac_t""missing" 1>&6
1021 fi
1022
1023 install_sh="$missing_dir/install-sh"
1024 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1025
1026 for ac_prog in gnutar gtar tar
1027 do
1028 # Extract the first word of "$ac_prog", so it can be a program name with args.
1029 set dummy $ac_prog; ac_word=$2
1030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1031 echo "configure:1032: checking for $ac_word" >&5
1032 if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
1033   echo $ac_n "(cached) $ac_c" 1>&6
1034 else
1035   if test -n "$AMTAR"; then
1036   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1037 else
1038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1039   ac_dummy="$PATH"
1040   for ac_dir in $ac_dummy; do
1041     test -z "$ac_dir" && ac_dir=.
1042     if test -f $ac_dir/$ac_word; then
1043       ac_cv_prog_AMTAR="$ac_prog"
1044       break
1045     fi
1046   done
1047   IFS="$ac_save_ifs"
1048 fi
1049 fi
1050 AMTAR="$ac_cv_prog_AMTAR"
1051 if test -n "$AMTAR"; then
1052   echo "$ac_t""$AMTAR" 1>&6
1053 else
1054   echo "$ac_t""no" 1>&6
1055 fi
1056
1057 test -n "$AMTAR" && break
1058 done
1059
1060
1061 AMTARFLAGS=
1062 if test -n "$AMTAR"; then
1063   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1064         AMTARFLAGS=o
1065   fi
1066 fi
1067
1068
1069
1070 cat >> confdefs.h <<EOF
1071 #define OPENLDAP_PACKAGE "$PACKAGE"
1072 EOF
1073
1074 cat >> confdefs.h <<EOF
1075 #define OPENLDAP_VERSION "$VERSION"
1076 EOF
1077
1078
1079
1080
1081 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1082 echo "configure:1083: checking configure arguments" >&5
1083
1084
1085 top_builddir=`pwd`
1086
1087 ldap_subdir="/openldap"
1088
1089 # Check whether --with-subdir or --without-subdir was given.
1090 if test "${with_subdir+set}" = set; then
1091   withval="$with_subdir"
1092   case "$withval" in
1093         no) ldap_subdir=""
1094                 ;;
1095         yes)
1096                 ;;
1097         /*|\\*)
1098                 ldap_subdir="$withval"
1099                 ;;
1100         *)
1101                 ldap_subdir="/$withval"
1102                 ;;
1103 esac
1104
1105 fi
1106
1107
1108 # OpenLDAP --enable-debug
1109         # Check whether --enable-debug or --disable-debug was given.
1110 if test "${enable_debug+set}" = set; then
1111   enableval="$enable_debug"
1112   
1113         ol_arg=invalid
1114         for ol_val in auto yes no ; do
1115                 if test "$enableval" = "$ol_val" ; then
1116                         ol_arg="$ol_val"
1117                 fi
1118         done
1119         if test "$ol_arg" = "invalid" ; then
1120                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1121         fi
1122         ol_enable_debug="$ol_arg"
1123
1124 else
1125         ol_enable_debug="yes"
1126 fi
1127 # end --enable-debug
1128 # OpenLDAP --enable-syslog
1129         # Check whether --enable-syslog or --disable-syslog was given.
1130 if test "${enable_syslog+set}" = set; then
1131   enableval="$enable_syslog"
1132   
1133         ol_arg=invalid
1134         for ol_val in auto yes no ; do
1135                 if test "$enableval" = "$ol_val" ; then
1136                         ol_arg="$ol_val"
1137                 fi
1138         done
1139         if test "$ol_arg" = "invalid" ; then
1140                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1141         fi
1142         ol_enable_syslog="$ol_arg"
1143
1144 else
1145         ol_enable_syslog="auto"
1146 fi
1147 # end --enable-syslog
1148 # OpenLDAP --enable-proctitle
1149         # Check whether --enable-proctitle or --disable-proctitle was given.
1150 if test "${enable_proctitle+set}" = set; then
1151   enableval="$enable_proctitle"
1152   
1153         ol_arg=invalid
1154         for ol_val in auto yes no ; do
1155                 if test "$enableval" = "$ol_val" ; then
1156                         ol_arg="$ol_val"
1157                 fi
1158         done
1159         if test "$ol_arg" = "invalid" ; then
1160                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1161         fi
1162         ol_enable_proctitle="$ol_arg"
1163
1164 else
1165         ol_enable_proctitle="yes"
1166 fi
1167 # end --enable-proctitle
1168 # OpenLDAP --enable-cache
1169         # Check whether --enable-cache or --disable-cache was given.
1170 if test "${enable_cache+set}" = set; then
1171   enableval="$enable_cache"
1172   
1173         ol_arg=invalid
1174         for ol_val in auto yes no ; do
1175                 if test "$enableval" = "$ol_val" ; then
1176                         ol_arg="$ol_val"
1177                 fi
1178         done
1179         if test "$ol_arg" = "invalid" ; then
1180                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1181         fi
1182         ol_enable_cache="$ol_arg"
1183
1184 else
1185         ol_enable_cache="yes"
1186 fi
1187 # end --enable-cache
1188 # OpenLDAP --enable-dns
1189         # Check whether --enable-dns or --disable-dns was given.
1190 if test "${enable_dns+set}" = set; then
1191   enableval="$enable_dns"
1192   
1193         ol_arg=invalid
1194         for ol_val in auto yes no ; do
1195                 if test "$enableval" = "$ol_val" ; then
1196                         ol_arg="$ol_val"
1197                 fi
1198         done
1199         if test "$ol_arg" = "invalid" ; then
1200                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1201         fi
1202         ol_enable_dns="$ol_arg"
1203
1204 else
1205         ol_enable_dns="no"
1206 fi
1207 # end --enable-dns
1208 # OpenLDAP --enable-referrals
1209         # Check whether --enable-referrals or --disable-referrals was given.
1210 if test "${enable_referrals+set}" = set; then
1211   enableval="$enable_referrals"
1212   
1213         ol_arg=invalid
1214         for ol_val in auto yes no ; do
1215                 if test "$enableval" = "$ol_val" ; then
1216                         ol_arg="$ol_val"
1217                 fi
1218         done
1219         if test "$ol_arg" = "invalid" ; then
1220                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1221         fi
1222         ol_enable_referrals="$ol_arg"
1223
1224 else
1225         ol_enable_referrals="yes"
1226 fi
1227 # end --enable-referrals
1228 # OpenLDAP --enable-kbind
1229         # Check whether --enable-kbind or --disable-kbind was given.
1230 if test "${enable_kbind+set}" = set; then
1231   enableval="$enable_kbind"
1232   
1233         ol_arg=invalid
1234         for ol_val in auto yes no ; do
1235                 if test "$enableval" = "$ol_val" ; then
1236                         ol_arg="$ol_val"
1237                 fi
1238         done
1239         if test "$ol_arg" = "invalid" ; then
1240                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1241         fi
1242         ol_enable_kbind="$ol_arg"
1243
1244 else
1245         ol_enable_kbind="auto"
1246 fi
1247 # end --enable-kbind
1248 # OpenLDAP --enable-cldap
1249         # Check whether --enable-cldap or --disable-cldap was given.
1250 if test "${enable_cldap+set}" = set; then
1251   enableval="$enable_cldap"
1252   
1253         ol_arg=invalid
1254         for ol_val in auto yes no ; do
1255                 if test "$enableval" = "$ol_val" ; then
1256                         ol_arg="$ol_val"
1257                 fi
1258         done
1259         if test "$ol_arg" = "invalid" ; then
1260                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1261         fi
1262         ol_enable_cldap="$ol_arg"
1263
1264 else
1265         ol_enable_cldap="no"
1266 fi
1267 # end --enable-cldap
1268 # OpenLDAP --enable-ldapi
1269         # Check whether --enable-ldapi or --disable-ldapi was given.
1270 if test "${enable_ldapi+set}" = set; then
1271   enableval="$enable_ldapi"
1272   
1273         ol_arg=invalid
1274         for ol_val in auto yes no ; do
1275                 if test "$enableval" = "$ol_val" ; then
1276                         ol_arg="$ol_val"
1277                 fi
1278         done
1279         if test "$ol_arg" = "invalid" ; then
1280                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1281         fi
1282         ol_enable_ldapi="$ol_arg"
1283
1284 else
1285         ol_enable_ldapi="no"
1286 fi
1287 # end --enable-ldapi
1288 # OpenLDAP --enable-x_compile
1289         # Check whether --enable-x_compile or --disable-x_compile was given.
1290 if test "${enable_x_compile+set}" = set; then
1291   enableval="$enable_x_compile"
1292   
1293         ol_arg=invalid
1294         for ol_val in yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1301         fi
1302         ol_enable_x_compile="$ol_arg"
1303
1304 else
1305         ol_enable_x_compile="no"
1306 fi
1307 # end --enable-x_compile
1308
1309 # OpenLDAP --enable-dmalloc
1310         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1311 if test "${enable_dmalloc+set}" = set; then
1312   enableval="$enable_dmalloc"
1313   
1314         ol_arg=invalid
1315         for ol_val in auto yes no ; do
1316                 if test "$enableval" = "$ol_val" ; then
1317                         ol_arg="$ol_val"
1318                 fi
1319         done
1320         if test "$ol_arg" = "invalid" ; then
1321                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1322         fi
1323         ol_enable_dmalloc="$ol_arg"
1324
1325 else
1326         ol_enable_dmalloc="no"
1327 fi
1328 # end --enable-dmalloc
1329
1330 # OpenLDAP --with-cyrus_sasl
1331         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1332 if test "${with_cyrus_sasl+set}" = set; then
1333   withval="$with_cyrus_sasl"
1334   
1335         ol_arg=invalid
1336         for ol_val in auto yes no  ; do
1337                 if test "$withval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1343         fi
1344         ol_with_cyrus_sasl="$ol_arg"
1345
1346 else
1347         ol_with_cyrus_sasl="auto"
1348 fi
1349 # end --with-cyrus_sasl
1350
1351 # OpenLDAP --with-fetch
1352         # Check whether --with-fetch or --without-fetch was given.
1353 if test "${with_fetch+set}" = set; then
1354   withval="$with_fetch"
1355   
1356         ol_arg=invalid
1357         for ol_val in auto yes no  ; do
1358                 if test "$withval" = "$ol_val" ; then
1359                         ol_arg="$ol_val"
1360                 fi
1361         done
1362         if test "$ol_arg" = "invalid" ; then
1363                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1364         fi
1365         ol_with_fetch="$ol_arg"
1366
1367 else
1368         ol_with_fetch="auto"
1369 fi
1370 # end --with-fetch
1371
1372 # OpenLDAP --with-kerberos
1373         # Check whether --with-kerberos or --without-kerberos was given.
1374 if test "${with_kerberos+set}" = set; then
1375   withval="$with_kerberos"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1379                 if test "$withval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1385         fi
1386         ol_with_kerberos="$ol_arg"
1387
1388 else
1389         ol_with_kerberos="auto"
1390 fi
1391 # end --with-kerberos
1392
1393 # OpenLDAP --with-readline
1394         # Check whether --with-readline or --without-readline was given.
1395 if test "${with_readline+set}" = set; then
1396   withval="$with_readline"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no  ; do
1400                 if test "$withval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1406         fi
1407         ol_with_readline="$ol_arg"
1408
1409 else
1410         ol_with_readline="auto"
1411 fi
1412 # end --with-readline
1413
1414 # OpenLDAP --with-threads
1415         # Check whether --with-threads or --without-threads was given.
1416 if test "${with_threads+set}" = set; then
1417   withval="$with_threads"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1427         fi
1428         ol_with_threads="$ol_arg"
1429
1430 else
1431         ol_with_threads="auto"
1432 fi
1433 # end --with-threads
1434
1435 # OpenLDAP --with-tls
1436         # Check whether --with-tls or --without-tls was given.
1437 if test "${with_tls+set}" = set; then
1438   withval="$with_tls"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto ssleay openssl yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1448         fi
1449         ol_with_tls="$ol_arg"
1450
1451 else
1452         ol_with_tls="auto"
1453 fi
1454 # end --with-tls
1455
1456 # OpenLDAP --with-yielding_select
1457         # Check whether --with-yielding_select or --without-yielding_select was given.
1458 if test "${with_yielding_select+set}" = set; then
1459   withval="$with_yielding_select"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto yes no manual  ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1469         fi
1470         ol_with_yielding_select="$ol_arg"
1471
1472 else
1473         ol_with_yielding_select="auto"
1474 fi
1475 # end --with-yielding_select
1476
1477
1478 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1479 if test "${with_xxldapdoptions+set}" = set; then
1480   withval="$with_xxldapdoptions"
1481   :
1482 fi
1483
1484 # OpenLDAP --enable-ldapd
1485         # Check whether --enable-ldapd or --disable-ldapd was given.
1486 if test "${enable_ldapd+set}" = set; then
1487   enableval="$enable_ldapd"
1488   
1489         ol_arg=invalid
1490         for ol_val in auto yes no ; do
1491                 if test "$enableval" = "$ol_val" ; then
1492                         ol_arg="$ol_val"
1493                 fi
1494         done
1495         if test "$ol_arg" = "invalid" ; then
1496                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1497         fi
1498         ol_enable_ldapd="$ol_arg"
1499
1500 else
1501         ol_enable_ldapd="no"
1502 fi
1503 # end --enable-ldapd
1504
1505 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1506 if test "${with_xxslapdoptions+set}" = set; then
1507   withval="$with_xxslapdoptions"
1508   :
1509 fi
1510
1511 # OpenLDAP --enable-slapd
1512         # Check whether --enable-slapd or --disable-slapd was given.
1513 if test "${enable_slapd+set}" = set; then
1514   enableval="$enable_slapd"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1524         fi
1525         ol_enable_slapd="$ol_arg"
1526
1527 else
1528         ol_enable_slapd="yes"
1529 fi
1530 # end --enable-slapd
1531 # OpenLDAP --enable-cleartext
1532         # Check whether --enable-cleartext or --disable-cleartext was given.
1533 if test "${enable_cleartext+set}" = set; then
1534   enableval="$enable_cleartext"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1544         fi
1545         ol_enable_cleartext="$ol_arg"
1546
1547 else
1548         ol_enable_cleartext="yes"
1549 fi
1550 # end --enable-cleartext
1551 # OpenLDAP --enable-crypt
1552         # Check whether --enable-crypt or --disable-crypt was given.
1553 if test "${enable_crypt+set}" = set; then
1554   enableval="$enable_crypt"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1564         fi
1565         ol_enable_crypt="$ol_arg"
1566
1567 else
1568         ol_enable_crypt="auto"
1569 fi
1570 # end --enable-crypt
1571 # OpenLDAP --enable-kpasswd
1572         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1573 if test "${enable_kpasswd+set}" = set; then
1574   enableval="$enable_kpasswd"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1584         fi
1585         ol_enable_kpasswd="$ol_arg"
1586
1587 else
1588         ol_enable_kpasswd="no"
1589 fi
1590 # end --enable-kpasswd
1591 # OpenLDAP --enable-modules
1592         # Check whether --enable-modules or --disable-modules was given.
1593 if test "${enable_modules+set}" = set; then
1594   enableval="$enable_modules"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto yes no ; do
1598                 if test "$enableval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1604         fi
1605         ol_enable_modules="$ol_arg"
1606
1607 else
1608         ol_enable_modules="no"
1609 fi
1610 # end --enable-modules
1611 # OpenLDAP --enable-multimaster
1612         # Check whether --enable-multimaster or --disable-multimaster was given.
1613 if test "${enable_multimaster+set}" = set; then
1614   enableval="$enable_multimaster"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no ; do
1618                 if test "$enableval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1624         fi
1625         ol_enable_multimaster="$ol_arg"
1626
1627 else
1628         ol_enable_multimaster="no"
1629 fi
1630 # end --enable-multimaster
1631 # OpenLDAP --enable-phonetic
1632         # Check whether --enable-phonetic or --disable-phonetic was given.
1633 if test "${enable_phonetic+set}" = set; then
1634   enableval="$enable_phonetic"
1635   
1636         ol_arg=invalid
1637         for ol_val in auto yes no ; do
1638                 if test "$enableval" = "$ol_val" ; then
1639                         ol_arg="$ol_val"
1640                 fi
1641         done
1642         if test "$ol_arg" = "invalid" ; then
1643                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1644         fi
1645         ol_enable_phonetic="$ol_arg"
1646
1647 else
1648         ol_enable_phonetic="no"
1649 fi
1650 # end --enable-phonetic
1651 # OpenLDAP --enable-quipu
1652         # Check whether --enable-quipu or --disable-quipu was given.
1653 if test "${enable_quipu+set}" = set; then
1654   enableval="$enable_quipu"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1664         fi
1665         ol_enable_quipu="$ol_arg"
1666
1667 else
1668         ol_enable_quipu="no"
1669 fi
1670 # end --enable-quipu
1671 # OpenLDAP --enable-rlookups
1672         # Check whether --enable-rlookups or --disable-rlookups was given.
1673 if test "${enable_rlookups+set}" = set; then
1674   enableval="$enable_rlookups"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1684         fi
1685         ol_enable_rlookups="$ol_arg"
1686
1687 else
1688         ol_enable_rlookups="auto"
1689 fi
1690 # end --enable-rlookups
1691 # OpenLDAP --enable-aci
1692         # Check whether --enable-aci or --disable-aci was given.
1693 if test "${enable_aci+set}" = set; then
1694   enableval="$enable_aci"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1704         fi
1705         ol_enable_aci="$ol_arg"
1706
1707 else
1708         ol_enable_aci="no"
1709 fi
1710 # end --enable-aci
1711 # OpenLDAP --enable-discreteaci
1712         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1713 if test "${enable_discreteaci+set}" = set; then
1714   enableval="$enable_discreteaci"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1724         fi
1725         ol_enable_discreteaci="$ol_arg"
1726
1727 else
1728         ol_enable_discreteaci="no"
1729 fi
1730 # end --enable-discreteaci
1731 # OpenLDAP --enable-wrappers
1732         # Check whether --enable-wrappers or --disable-wrappers was given.
1733 if test "${enable_wrappers+set}" = set; then
1734   enableval="$enable_wrappers"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1744         fi
1745         ol_enable_wrappers="$ol_arg"
1746
1747 else
1748         ol_enable_wrappers="no"
1749 fi
1750 # end --enable-wrappers
1751 # OpenLDAP --enable-dynamic
1752         # Check whether --enable-dynamic or --disable-dynamic was given.
1753 if test "${enable_dynamic+set}" = set; then
1754   enableval="$enable_dynamic"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1764         fi
1765         ol_enable_dynamic="$ol_arg"
1766
1767 else
1768         ol_enable_dynamic="no"
1769 fi
1770 # end --enable-dynamic
1771
1772 # OpenLDAP --enable-bdb2
1773         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1774 if test "${enable_bdb2+set}" = set; then
1775   enableval="$enable_bdb2"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1785         fi
1786         ol_enable_bdb2="$ol_arg"
1787
1788 else
1789         ol_enable_bdb2="no"
1790 fi
1791 # end --enable-bdb2
1792 # OpenLDAP --with-bdb2_module
1793         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1794 if test "${with_bdb2_module+set}" = set; then
1795   withval="$with_bdb2_module"
1796   
1797         ol_arg=invalid
1798         for ol_val in static dynamic ; do
1799                 if test "$withval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1805         fi
1806         ol_with_bdb2_module="$ol_arg"
1807
1808 else
1809         ol_with_bdb2_module="static"
1810 fi
1811 # end --with-bdb2_module
1812
1813 # OpenLDAP --enable-ldap
1814         # Check whether --enable-ldap or --disable-ldap was given.
1815 if test "${enable_ldap+set}" = set; then
1816   enableval="$enable_ldap"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1826         fi
1827         ol_enable_ldap="$ol_arg"
1828
1829 else
1830         ol_enable_ldap="no"
1831 fi
1832 # end --enable-ldap
1833 # OpenLDAP --with-ldap_module
1834         # Check whether --with-ldap_module or --without-ldap_module was given.
1835 if test "${with_ldap_module+set}" = set; then
1836   withval="$with_ldap_module"
1837   
1838         ol_arg=invalid
1839         for ol_val in static dynamic ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1846         fi
1847         ol_with_ldap_module="$ol_arg"
1848
1849 else
1850         ol_with_ldap_module="static"
1851 fi
1852 # end --with-ldap_module
1853
1854 # OpenLDAP --enable-ldbm
1855         # Check whether --enable-ldbm or --disable-ldbm was given.
1856 if test "${enable_ldbm+set}" = set; then
1857   enableval="$enable_ldbm"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1867         fi
1868         ol_enable_ldbm="$ol_arg"
1869
1870 else
1871         ol_enable_ldbm="yes"
1872 fi
1873 # end --enable-ldbm
1874 # OpenLDAP --with-ldbm_api
1875         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1876 if test "${with_ldbm_api+set}" = set; then
1877   withval="$with_ldbm_api"
1878   
1879         ol_arg=invalid
1880         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1881                 if test "$withval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1887         fi
1888         ol_with_ldbm_api="$ol_arg"
1889
1890 else
1891         ol_with_ldbm_api="auto"
1892 fi
1893 # end --with-ldbm_api
1894
1895 # OpenLDAP --with-ldbm_module
1896         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1897 if test "${with_ldbm_module+set}" = set; then
1898   withval="$with_ldbm_module"
1899   
1900         ol_arg=invalid
1901         for ol_val in static dynamic ; do
1902                 if test "$withval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1908         fi
1909         ol_with_ldbm_module="$ol_arg"
1910
1911 else
1912         ol_with_ldbm_module="static"
1913 fi
1914 # end --with-ldbm_module
1915
1916 # OpenLDAP --with-ldbm_type
1917         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1918 if test "${with_ldbm_type+set}" = set; then
1919   withval="$with_ldbm_type"
1920   
1921         ol_arg=invalid
1922         for ol_val in auto btree hash ; do
1923                 if test "$withval" = "$ol_val" ; then
1924                         ol_arg="$ol_val"
1925                 fi
1926         done
1927         if test "$ol_arg" = "invalid" ; then
1928                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1929         fi
1930         ol_with_ldbm_type="$ol_arg"
1931
1932 else
1933         ol_with_ldbm_type="auto"
1934 fi
1935 # end --with-ldbm_type
1936
1937
1938 # OpenLDAP --enable-passwd
1939         # Check whether --enable-passwd or --disable-passwd was given.
1940 if test "${enable_passwd+set}" = set; then
1941   enableval="$enable_passwd"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto yes no ; do
1945                 if test "$enableval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1951         fi
1952         ol_enable_passwd="$ol_arg"
1953
1954 else
1955         ol_enable_passwd="no"
1956 fi
1957 # end --enable-passwd
1958 # OpenLDAP --with-passwd_module
1959         # Check whether --with-passwd_module or --without-passwd_module was given.
1960 if test "${with_passwd_module+set}" = set; then
1961   withval="$with_passwd_module"
1962   
1963         ol_arg=invalid
1964         for ol_val in static dynamic ; do
1965                 if test "$withval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1971         fi
1972         ol_with_passwd_module="$ol_arg"
1973
1974 else
1975         ol_with_passwd_module="static"
1976 fi
1977 # end --with-passwd_module
1978
1979 # OpenLDAP --enable-perl
1980         # Check whether --enable-perl or --disable-perl was given.
1981 if test "${enable_perl+set}" = set; then
1982   enableval="$enable_perl"
1983   
1984         ol_arg=invalid
1985         for ol_val in auto yes no ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1992         fi
1993         ol_enable_perl="$ol_arg"
1994
1995 else
1996         ol_enable_perl="no"
1997 fi
1998 # end --enable-perl
1999 # OpenLDAP --with-perl_module
2000         # Check whether --with-perl_module or --without-perl_module was given.
2001 if test "${with_perl_module+set}" = set; then
2002   withval="$with_perl_module"
2003   
2004         ol_arg=invalid
2005         for ol_val in static dynamic ; do
2006                 if test "$withval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2012         fi
2013         ol_with_perl_module="$ol_arg"
2014
2015 else
2016         ol_with_perl_module="static"
2017 fi
2018 # end --with-perl_module
2019
2020 # OpenLDAP --enable-shell
2021         # Check whether --enable-shell or --disable-shell was given.
2022 if test "${enable_shell+set}" = set; then
2023   enableval="$enable_shell"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2033         fi
2034         ol_enable_shell="$ol_arg"
2035
2036 else
2037         ol_enable_shell="no"
2038 fi
2039 # end --enable-shell
2040 # OpenLDAP --with-shell_module
2041         # Check whether --with-shell_module or --without-shell_module was given.
2042 if test "${with_shell_module+set}" = set; then
2043   withval="$with_shell_module"
2044   
2045         ol_arg=invalid
2046         for ol_val in static dynamic ; do
2047                 if test "$withval" = "$ol_val" ; then
2048                         ol_arg="$ol_val"
2049                 fi
2050         done
2051         if test "$ol_arg" = "invalid" ; then
2052                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2053         fi
2054         ol_with_shell_module="$ol_arg"
2055
2056 else
2057         ol_with_shell_module="static"
2058 fi
2059 # end --with-shell_module
2060
2061 # OpenLDAP --enable-tcl
2062         # Check whether --enable-tcl or --disable-tcl was given.
2063 if test "${enable_tcl+set}" = set; then
2064   enableval="$enable_tcl"
2065   
2066         ol_arg=invalid
2067         for ol_val in auto yes no ; do
2068                 if test "$enableval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2074         fi
2075         ol_enable_tcl="$ol_arg"
2076
2077 else
2078         ol_enable_tcl="no"
2079 fi
2080 # end --enable-tcl
2081 # OpenLDAP --with-tcl_module
2082         # Check whether --with-tcl_module or --without-tcl_module was given.
2083 if test "${with_tcl_module+set}" = set; then
2084   withval="$with_tcl_module"
2085   
2086         ol_arg=invalid
2087         for ol_val in static dynamic ; do
2088                 if test "$withval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2094         fi
2095         ol_with_tcl_module="$ol_arg"
2096
2097 else
2098         ol_with_tcl_module="static"
2099 fi
2100 # end --with-tcl_module
2101
2102
2103 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2104 if test "${with_xxslurpdoptions+set}" = set; then
2105   withval="$with_xxslurpdoptions"
2106   :
2107 fi
2108
2109 # OpenLDAP --enable-slurpd
2110         # Check whether --enable-slurpd or --disable-slurpd was given.
2111 if test "${enable_slurpd+set}" = set; then
2112   enableval="$enable_slurpd"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2122         fi
2123         ol_enable_slurpd="$ol_arg"
2124
2125 else
2126         ol_enable_slurpd="auto"
2127 fi
2128 # end --enable-slurpd
2129
2130 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2131 if test "${with_xxliboptions+set}" = set; then
2132   withval="$with_xxliboptions"
2133   :
2134 fi
2135
2136 # Check whether --enable-static or --disable-static was given.
2137 if test "${enable_static+set}" = set; then
2138   enableval="$enable_static"
2139   p=${PACKAGE-default}
2140 case "$enableval" in
2141 yes) enable_static=yes ;;
2142 no) enable_static=no ;;
2143 *)
2144   enable_static=no
2145   # Look at the argument we got.  We use all the common list separators.
2146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2147   for pkg in $enableval; do
2148     if test "X$pkg" = "X$p"; then
2149       enable_static=yes
2150     fi
2151   done
2152   IFS="$ac_save_ifs"
2153   ;;
2154 esac
2155 else
2156   enable_static=yes
2157 fi
2158
2159 # Check whether --enable-shared or --disable-shared was given.
2160 if test "${enable_shared+set}" = set; then
2161   enableval="$enable_shared"
2162   p=${PACKAGE-default}
2163 case "$enableval" in
2164 yes) enable_shared=yes ;;
2165 no) enable_shared=no ;;
2166 *)
2167   enable_shared=no
2168   # Look at the argument we got.  We use all the common list separators.
2169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2170   for pkg in $enableval; do
2171     if test "X$pkg" = "X$p"; then
2172       enable_shared=yes
2173     fi
2174   done
2175   IFS="$ac_save_ifs"
2176   ;;
2177 esac
2178 else
2179   enable_shared=yes
2180 fi
2181
2182
2183
2184 # validate options
2185 if test $ol_enable_dns = yes ; then
2186         if test $ol_enable_referrals = no ; then
2187                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2188         fi
2189         if test $ol_enable_referrals = auto ; then
2190                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2191                 ol_enable_referrals=yes
2192         fi
2193 fi
2194
2195 if test $ol_enable_slapd = no ; then
2196                 if test $ol_enable_bdb2 = yes ; then
2197                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2198         fi
2199         if test $ol_enable_ldap = yes ; then
2200                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2201         fi
2202         if test $ol_enable_ldbm = yes ; then
2203                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2204         fi
2205         if test $ol_enable_passwd = yes ; then
2206                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2207         fi
2208         if test $ol_enable_perl = yes ; then
2209                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2210         fi
2211         if test $ol_enable_shell = yes ; then
2212                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2213         fi
2214         if test $ol_enable_tcl = yes ; then
2215                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2216         fi
2217         if test $ol_enable_modules = yes ; then
2218                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2219         fi
2220         if test $ol_enable_multimaster = yes ; then
2221                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2222         fi
2223         if test $ol_enable_wrappers = yes ; then
2224                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2225         fi
2226         if test $ol_enable_phonetic = yes ; then
2227                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2228         fi
2229         if test $ol_enable_quipu = yes ; then
2230                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2231         fi
2232         if test $ol_enable_rlookups = yes ; then
2233                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2234         fi
2235         if test $ol_enable_aci = yes ; then
2236                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2237         fi
2238         if test $ol_enable_discreteaci = yes ; then
2239                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2240         fi
2241         if test $ol_with_ldbm_api != auto ; then
2242                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2243         fi
2244         if test $ol_with_ldbm_type != auto ; then
2245                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2246         fi
2247         if test $ol_with_bdb2_module != static ; then
2248                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2249         fi
2250         if test $ol_with_ldap_module != static ; then
2251                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2252         fi
2253         if test $ol_with_ldbm_module != static ; then
2254                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2255         fi
2256         if test $ol_with_passwd_module != static ; then
2257                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2258         fi
2259         if test $ol_with_perl_module != static ; then
2260                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2261         fi
2262         if test $ol_with_shell_module != static ; then
2263                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2264         fi
2265         if test $ol_with_tcl_module != static ; then
2266                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2267         fi
2268         if test $ol_enable_slurpd = yes ; then
2269                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2270         fi
2271
2272         # force settings to no
2273         ol_enable_bdb2=no
2274         ol_enable_ldap=no
2275         ol_enable_ldbm=no
2276         ol_enable_passwd=no
2277         ol_enable_perl=no
2278         ol_enable_shell=no
2279         ol_enable_tcl=no
2280
2281         ol_enable_modules=no
2282         ol_enable_multimaster=no
2283         ol_enable_phonetic=no
2284         ol_enable_quipu=no
2285         ol_enable_rlookups=no
2286         ol_enable_aci=no
2287         ol_enable_discreteaci=no
2288         ol_enable_wrappers=no
2289         ol_enable_dynamic=no
2290
2291         ol_with_ldbm_api=no
2292         ol_with_ldbm_type=no
2293
2294         ol_with_bdb2_module=static
2295         ol_with_ldap_module=static
2296         ol_with_ldbm_module=static
2297         ol_with_passwd_module=static
2298         ol_with_perl_module=static
2299         ol_with_shell_module=static
2300         ol_with_tcl_module=static
2301
2302         ol_enable_slurpd=no
2303
2304 elif test $ol_enable_ldbm = no ; then
2305         
2306         if test $ol_with_ldbm_api != auto ; then
2307                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2308         fi
2309
2310         if test $ol_with_ldbm_type != auto ; then
2311                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2312         fi
2313
2314         if test $ol_with_ldbm_module != static ; then
2315                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2316         fi
2317
2318         if test $ol_enable_bdb2 = yes ; then
2319                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2320         fi
2321
2322         if test $ol_enable_modules != yes -a \
2323                 $ol_enable_ldap = no -a \
2324                 $ol_enable_passwd = no -a \
2325                 $ol_enable_perl = no -a \
2326                 $ol_enable_shell = no -a \
2327                 $ol_enable_tcl = no ; then
2328                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2329         fi
2330
2331         ol_with_ldbm_api=no
2332         ol_with_ldbm_type=no
2333         ol_with_ldbm_module=static
2334
2335 elif test $ol_enable_bdb2 = yes ; then
2336         
2337         if test $ol_with_ldbm_api != auto -a \
2338                 $ol_with_ldbm_api != db2 ; then
2339                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2340         fi
2341
2342         ol_with_ldbm_api=db2
2343
2344 else
2345         
2346         if test $ol_enable_bdb2 != no ; then
2347                 if test $ol_with_ldbm_api != auto -a \
2348                         $ol_with_ldbm_api != db2 ; then
2349                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2350                         ol_enable_bdb2=no
2351                 fi
2352         fi
2353
2354         if test $ol_with_ldbm_api = gdbm -a \
2355                 $ol_with_ldbm_type = btree ; then
2356                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2357         fi
2358         if test $ol_with_ldbm_api = mdbm -a \
2359                 $ol_with_ldbm_type = btree ; then
2360                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2361         fi
2362         if test $ol_with_ldbm_api = ndbm -a \
2363                 $ol_with_ldbm_type = btree ; then
2364                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2365         fi
2366 fi
2367
2368 if test $ol_enable_slurpd = yes ; then
2369                 if test $ol_with_threads = no ; then
2370                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2371         fi
2372 fi
2373
2374 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2375         if test $ol_with_kerberos = no ; then
2376                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2377         fi
2378 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2379         if test $ol_with_kerberos != auto ; then
2380                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2381         else
2382                 ol_with_kerberos=no
2383         fi
2384 fi
2385
2386 echo "$ac_t""done" 1>&6
2387
2388 LDAP_LIBS=
2389 LDIF_LIBS=
2390 LDBM_LIBS=
2391 LTHREAD_LIBS=
2392 LUTIL_LIBS=
2393
2394 LDAPD_LIBS=
2395 SLAPD_LIBS=
2396 SLURPD_LIBS=
2397
2398 BUILD_LDAPD=no
2399 BUILD_SLAPD=no
2400 BUILD_SLURPD=no
2401
2402 BUILD_BDB2=no
2403 BUILD_LDAP=no
2404 BUILD_LDBM=no
2405 BUILD_PASSWD=no
2406 BUILD_PERL=no
2407 BUILD_QUIPU=no
2408 BUILD_SHELL=no
2409 BUILD_TCL=no
2410 BUILD_THREAD=no
2411
2412 BUILD_BDB2_DYNAMIC=static
2413 BUILD_LDAP_DYNAMIC=static
2414 BUILD_LDBM_DYNAMIC=static
2415 BUILD_PASSWD_DYNAMIC=static
2416 BUILD_PERL_DYNAMIC=static
2417 BUILD_SHELL_DYNAMIC=static
2418 BUILD_TCL_DYNAMIC=static
2419
2420 SLAPD_MODULES_LDFLAGS=
2421 SLAPD_MODULES_CPPFLAGS=
2422 SLAPD_MODULES_LIST=
2423
2424 SLAPD_PERL_LDFLAGS=
2425 MOD_PERL_LDFLAGS=
2426 PERL_CPPFLAGS=
2427
2428 MOD_TCL_LIB=
2429 KRB4_LIBS=
2430 KRB5_LIBS=
2431 READLINE_LIBS=
2432 SASL_LIBS=
2433 TERMCAP_LIBS=
2434 TLS_LIBS=
2435 MODULES_LIBS=
2436
2437
2438
2439 cat >> confdefs.h <<\EOF
2440 #define HAVE_MKVERSION 1
2441 EOF
2442
2443
2444
2445
2446 ol_aix_threads=no
2447 case "$target" in
2448 *-*-aix*)       if test -z "$CC" ; then
2449                 case "$ol_with_threads" in
2450                 auto | yes |  posix) ol_aix_threads=yes ;;
2451                 esac
2452         fi
2453 ;;
2454 esac
2455
2456 if test $ol_aix_threads = yes ; then
2457         if test -z "${CC}" ; then
2458                 for ac_prog in cc_r xlc_r cc
2459 do
2460 # Extract the first word of "$ac_prog", so it can be a program name with args.
2461 set dummy $ac_prog; ac_word=$2
2462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2463 echo "configure:2464: checking for $ac_word" >&5
2464 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2465   echo $ac_n "(cached) $ac_c" 1>&6
2466 else
2467   if test -n "$CC"; then
2468   ac_cv_prog_CC="$CC" # Let the user override the test.
2469 else
2470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2471   ac_dummy="$PATH"
2472   for ac_dir in $ac_dummy; do
2473     test -z "$ac_dir" && ac_dir=.
2474     if test -f $ac_dir/$ac_word; then
2475       ac_cv_prog_CC="$ac_prog"
2476       break
2477     fi
2478   done
2479   IFS="$ac_save_ifs"
2480 fi
2481 fi
2482 CC="$ac_cv_prog_CC"
2483 if test -n "$CC"; then
2484   echo "$ac_t""$CC" 1>&6
2485 else
2486   echo "$ac_t""no" 1>&6
2487 fi
2488
2489 test -n "$CC" && break
2490 done
2491
2492
2493                 if test "$CC" = cc ; then
2494                                                 if test $ol_with_threads != auto ; then
2495                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2496                         else
2497                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2498                         fi
2499                         ol_with_threads=no
2500                 fi
2501         fi
2502
2503         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2504                 ol_with_threads=posix
2505                 ol_cv_pthread_create=yes
2506         fi
2507 fi
2508
2509 if test -z "${CC}"; then
2510         for ac_prog in cc
2511 do
2512 # Extract the first word of "$ac_prog", so it can be a program name with args.
2513 set dummy $ac_prog; ac_word=$2
2514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2515 echo "configure:2516: checking for $ac_word" >&5
2516 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   if test -n "$CC"; then
2520   ac_cv_prog_CC="$CC" # Let the user override the test.
2521 else
2522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2523   ac_dummy="$PATH"
2524   for ac_dir in $ac_dummy; do
2525     test -z "$ac_dir" && ac_dir=.
2526     if test -f $ac_dir/$ac_word; then
2527       ac_cv_prog_CC="$ac_prog"
2528       break
2529     fi
2530   done
2531   IFS="$ac_save_ifs"
2532 fi
2533 fi
2534 CC="$ac_cv_prog_CC"
2535 if test -n "$CC"; then
2536   echo "$ac_t""$CC" 1>&6
2537 else
2538   echo "$ac_t""no" 1>&6
2539 fi
2540
2541 test -n "$CC" && break
2542 done
2543
2544 fi
2545
2546
2547
2548
2549 # Check whether --enable-fast-install or --disable-fast-install was given.
2550 if test "${enable_fast_install+set}" = set; then
2551   enableval="$enable_fast_install"
2552   p=${PACKAGE-default}
2553 case "$enableval" in
2554 yes) enable_fast_install=yes ;;
2555 no) enable_fast_install=no ;;
2556 *)
2557   enable_fast_install=no
2558   # Look at the argument we got.  We use all the common list separators.
2559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2560   for pkg in $enableval; do
2561     if test "X$pkg" = "X$p"; then
2562       enable_fast_install=yes
2563     fi
2564   done
2565   IFS="$ac_save_ifs"
2566   ;;
2567 esac
2568 else
2569   enable_fast_install=yes
2570 fi
2571
2572 # Extract the first word of "ranlib", so it can be a program name with args.
2573 set dummy ranlib; ac_word=$2
2574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2575 echo "configure:2576: checking for $ac_word" >&5
2576 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   if test -n "$RANLIB"; then
2580   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2581 else
2582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2583   ac_dummy="$PATH"
2584   for ac_dir in $ac_dummy; do
2585     test -z "$ac_dir" && ac_dir=.
2586     if test -f $ac_dir/$ac_word; then
2587       ac_cv_prog_RANLIB="ranlib"
2588       break
2589     fi
2590   done
2591   IFS="$ac_save_ifs"
2592   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2593 fi
2594 fi
2595 RANLIB="$ac_cv_prog_RANLIB"
2596 if test -n "$RANLIB"; then
2597   echo "$ac_t""$RANLIB" 1>&6
2598 else
2599   echo "$ac_t""no" 1>&6
2600 fi
2601
2602 # Extract the first word of "gcc", so it can be a program name with args.
2603 set dummy gcc; ac_word=$2
2604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2605 echo "configure:2606: checking for $ac_word" >&5
2606 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2607   echo $ac_n "(cached) $ac_c" 1>&6
2608 else
2609   if test -n "$CC"; then
2610   ac_cv_prog_CC="$CC" # Let the user override the test.
2611 else
2612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2613   ac_dummy="$PATH"
2614   for ac_dir in $ac_dummy; do
2615     test -z "$ac_dir" && ac_dir=.
2616     if test -f $ac_dir/$ac_word; then
2617       ac_cv_prog_CC="gcc"
2618       break
2619     fi
2620   done
2621   IFS="$ac_save_ifs"
2622 fi
2623 fi
2624 CC="$ac_cv_prog_CC"
2625 if test -n "$CC"; then
2626   echo "$ac_t""$CC" 1>&6
2627 else
2628   echo "$ac_t""no" 1>&6
2629 fi
2630
2631 if test -z "$CC"; then
2632   # Extract the first word of "cc", so it can be a program name with args.
2633 set dummy cc; ac_word=$2
2634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2635 echo "configure:2636: checking for $ac_word" >&5
2636 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2637   echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639   if test -n "$CC"; then
2640   ac_cv_prog_CC="$CC" # Let the user override the test.
2641 else
2642   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2643   ac_prog_rejected=no
2644   ac_dummy="$PATH"
2645   for ac_dir in $ac_dummy; do
2646     test -z "$ac_dir" && ac_dir=.
2647     if test -f $ac_dir/$ac_word; then
2648       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2649         ac_prog_rejected=yes
2650         continue
2651       fi
2652       ac_cv_prog_CC="cc"
2653       break
2654     fi
2655   done
2656   IFS="$ac_save_ifs"
2657 if test $ac_prog_rejected = yes; then
2658   # We found a bogon in the path, so make sure we never use it.
2659   set dummy $ac_cv_prog_CC
2660   shift
2661   if test $# -gt 0; then
2662     # We chose a different compiler from the bogus one.
2663     # However, it has the same basename, so the bogon will be chosen
2664     # first if we set CC to just the basename; use the full file name.
2665     shift
2666     set dummy "$ac_dir/$ac_word" "$@"
2667     shift
2668     ac_cv_prog_CC="$@"
2669   fi
2670 fi
2671 fi
2672 fi
2673 CC="$ac_cv_prog_CC"
2674 if test -n "$CC"; then
2675   echo "$ac_t""$CC" 1>&6
2676 else
2677   echo "$ac_t""no" 1>&6
2678 fi
2679
2680   if test -z "$CC"; then
2681     case "`uname -s`" in
2682     *win32* | *WIN32*)
2683       # Extract the first word of "cl", so it can be a program name with args.
2684 set dummy cl; ac_word=$2
2685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2686 echo "configure:2687: checking for $ac_word" >&5
2687 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2688   echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690   if test -n "$CC"; then
2691   ac_cv_prog_CC="$CC" # Let the user override the test.
2692 else
2693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2694   ac_dummy="$PATH"
2695   for ac_dir in $ac_dummy; do
2696     test -z "$ac_dir" && ac_dir=.
2697     if test -f $ac_dir/$ac_word; then
2698       ac_cv_prog_CC="cl"
2699       break
2700     fi
2701   done
2702   IFS="$ac_save_ifs"
2703 fi
2704 fi
2705 CC="$ac_cv_prog_CC"
2706 if test -n "$CC"; then
2707   echo "$ac_t""$CC" 1>&6
2708 else
2709   echo "$ac_t""no" 1>&6
2710 fi
2711  ;;
2712     esac
2713   fi
2714   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2715 fi
2716
2717 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2718 echo "configure:2719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2719
2720 ac_ext=c
2721 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2722 ac_cpp='$CPP $CPPFLAGS'
2723 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2724 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2725 cross_compiling=$ac_cv_prog_cc_cross
2726
2727 cat > conftest.$ac_ext << EOF
2728
2729 #line 2730 "configure"
2730 #include "confdefs.h"
2731
2732 main(){return(0);}
2733 EOF
2734 if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2735   ac_cv_prog_cc_works=yes
2736   # If we can't run a trivial program, we are probably using a cross compiler.
2737   if (./conftest; exit) 2>/dev/null; then
2738     ac_cv_prog_cc_cross=no
2739   else
2740     ac_cv_prog_cc_cross=yes
2741   fi
2742 else
2743   echo "configure: failed program was:" >&5
2744   cat conftest.$ac_ext >&5
2745   ac_cv_prog_cc_works=no
2746 fi
2747 rm -fr conftest*
2748 ac_ext=c
2749 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2752 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2753 cross_compiling=$ac_cv_prog_cc_cross
2754
2755 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2756 if test $ac_cv_prog_cc_works = no; then
2757   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2758 fi
2759 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2760 echo "configure:2761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2761 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2762 cross_compiling=$ac_cv_prog_cc_cross
2763
2764 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2765 echo "configure:2766: checking whether we are using GNU C" >&5
2766 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2767   echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769   cat > conftest.c <<EOF
2770 #ifdef __GNUC__
2771   yes;
2772 #endif
2773 EOF
2774 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2775   ac_cv_prog_gcc=yes
2776 else
2777   ac_cv_prog_gcc=no
2778 fi
2779 fi
2780
2781 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2782
2783 if test $ac_cv_prog_gcc = yes; then
2784   GCC=yes
2785 else
2786   GCC=
2787 fi
2788
2789 ac_test_CFLAGS="${CFLAGS+set}"
2790 ac_save_CFLAGS="$CFLAGS"
2791 CFLAGS=
2792 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2793 echo "configure:2794: checking whether ${CC-cc} accepts -g" >&5
2794 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2795   echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797   echo 'void f(){}' > conftest.c
2798 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2799   ac_cv_prog_cc_g=yes
2800 else
2801   ac_cv_prog_cc_g=no
2802 fi
2803 rm -f conftest*
2804
2805 fi
2806
2807 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2808 if test "$ac_test_CFLAGS" = set; then
2809   CFLAGS="$ac_save_CFLAGS"
2810 elif test $ac_cv_prog_cc_g = yes; then
2811   if test "$GCC" = yes; then
2812     CFLAGS="-g -O2"
2813   else
2814     CFLAGS="-g"
2815   fi
2816 else
2817   if test "$GCC" = yes; then
2818     CFLAGS="-O2"
2819   else
2820     CFLAGS=
2821   fi
2822 fi
2823
2824 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2825 if test "${with_gnu_ld+set}" = set; then
2826   withval="$with_gnu_ld"
2827   test "$withval" = no || with_gnu_ld=yes
2828 else
2829   with_gnu_ld=no
2830 fi
2831
2832 ac_prog=ld
2833 if test "$ac_cv_prog_gcc" = yes; then
2834   # Check if gcc -print-prog-name=ld gives a path.
2835   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2836 echo "configure:2837: checking for ld used by GCC" >&5
2837   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2838   case "$ac_prog" in
2839     # Accept absolute paths.
2840     [\\/]* | [A-Za-z]:[\\/]*)
2841       re_direlt='/[^/][^/]*/\.\./'
2842       # Canonicalize the path of ld
2843       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2844       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2845         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2846       done
2847       test -z "$LD" && LD="$ac_prog"
2848       ;;
2849   "")
2850     # If it fails, then pretend we aren't using GCC.
2851     ac_prog=ld
2852     ;;
2853   *)
2854     # If it is relative, then search for the first ld in PATH.
2855     with_gnu_ld=unknown
2856     ;;
2857   esac
2858 elif test "$with_gnu_ld" = yes; then
2859   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2860 echo "configure:2861: checking for GNU ld" >&5
2861 else
2862   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2863 echo "configure:2864: checking for non-GNU ld" >&5
2864 fi
2865 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2866   echo $ac_n "(cached) $ac_c" 1>&6
2867 else
2868   if test -z "$LD"; then
2869   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2870   for ac_dir in $PATH; do
2871     test -z "$ac_dir" && ac_dir=.
2872     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2873       ac_cv_path_LD="$ac_dir/$ac_prog"
2874       # Check to see if the program is GNU ld.  I'd rather use --version,
2875       # but apparently some GNU ld's only accept -v.
2876       # Break only if it was the GNU/non-GNU ld that we prefer.
2877       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2878         test "$with_gnu_ld" != no && break
2879       else
2880         test "$with_gnu_ld" != yes && break
2881       fi
2882     fi
2883   done
2884   IFS="$ac_save_ifs"
2885 else
2886   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2887 fi
2888 fi
2889
2890 LD="$ac_cv_path_LD"
2891 if test -n "$LD"; then
2892   echo "$ac_t""$LD" 1>&6
2893 else
2894   echo "$ac_t""no" 1>&6
2895 fi
2896 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2897
2898 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2899 echo "configure:2900: checking if the linker ($LD) is GNU ld" >&5
2900 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2904 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2905   ac_cv_prog_gnu_ld=yes
2906 else
2907   ac_cv_prog_gnu_ld=no
2908 fi
2909 fi
2910
2911 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2912
2913
2914 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2915 echo "configure:2916: checking for BSD-compatible nm" >&5
2916 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2917   echo $ac_n "(cached) $ac_c" 1>&6
2918 else
2919   if test -n "$NM"; then
2920   # Let the user override the test.
2921   ac_cv_path_NM="$NM"
2922 else
2923   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2924   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2925     test -z "$ac_dir" && ac_dir=.
2926     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2927       # Check to see if the nm accepts a BSD-compat flag.
2928       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2929       #   nm: unknown option "B" ignored
2930       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2931         ac_cv_path_NM="$ac_dir/nm -B"
2932         break
2933       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2934         ac_cv_path_NM="$ac_dir/nm -p"
2935         break
2936       else
2937         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2938         continue # so that we can try to find one that supports BSD flags
2939       fi
2940     fi
2941   done
2942   IFS="$ac_save_ifs"
2943   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2944 fi
2945 fi
2946
2947 NM="$ac_cv_path_NM"
2948 echo "$ac_t""$NM" 1>&6
2949
2950
2951 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2952 echo "configure:2953: checking whether ln -s works" >&5
2953 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2954   echo $ac_n "(cached) $ac_c" 1>&6
2955 else
2956   rm -f conftestdata
2957 if ln -s X conftestdata 2>/dev/null
2958 then
2959   rm -f conftestdata
2960   ac_cv_prog_LN_S="ln -s"
2961 else
2962   ac_cv_prog_LN_S=ln
2963 fi
2964 fi
2965 LN_S="$ac_cv_prog_LN_S"
2966 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2967   echo "$ac_t""yes" 1>&6
2968 else
2969   echo "$ac_t""no" 1>&6
2970 fi
2971
2972 if test $host != $build; then
2973   ac_tool_prefix=${host_alias}-
2974 else
2975   ac_tool_prefix=
2976 fi
2977
2978
2979 # Check for any special flags to pass to ltconfig.
2980 libtool_flags="--cache-file=$cache_file"
2981 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2982 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2983 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2984 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2985 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2986 libtool_flags="$libtool_flags --enable-dlopen"
2987 libtool_flags="$libtool_flags --enable-win32-dll"
2988 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2989 if test "${enable_libtool_lock+set}" = set; then
2990   enableval="$enable_libtool_lock"
2991   :
2992 fi
2993
2994 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2995 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2996
2997 # Some flags need to be propagated to the compiler or linker for good
2998 # libtool support.
2999 case "$host" in
3000 *-*-irix6*)
3001   # Find out which ABI we are using.
3002   echo '#line 3003 "configure"' > conftest.$ac_ext
3003   if { (eval echo configure:3004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3004     case "`/usr/bin/file conftest.o`" in
3005     *32-bit*)
3006       LD="${LD-ld} -32"
3007       ;;
3008     *N32*)
3009       LD="${LD-ld} -n32"
3010       ;;
3011     *64-bit*)
3012       LD="${LD-ld} -64"
3013       ;;
3014     esac
3015   fi
3016   rm -rf conftest*
3017   ;;
3018
3019 *-*-sco3.2v5*)
3020   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3021   SAVE_CFLAGS="$CFLAGS"
3022   CFLAGS="$CFLAGS -belf"
3023   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3024 echo "configure:3025: checking whether the C compiler needs -belf" >&5
3025 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
3026   echo $ac_n "(cached) $ac_c" 1>&6
3027 else
3028   cat > conftest.$ac_ext <<EOF
3029 #line 3030 "configure"
3030 #include "confdefs.h"
3031
3032 int main() {
3033
3034 ; return 0; }
3035 EOF
3036 if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3037   rm -rf conftest*
3038   lt_cv_cc_needs_belf=yes
3039 else
3040   echo "configure: failed program was:" >&5
3041   cat conftest.$ac_ext >&5
3042   rm -rf conftest*
3043   lt_cv_cc_needs_belf=no
3044 fi
3045 rm -f conftest*
3046 fi
3047
3048 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3049   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3050     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3051     CFLAGS="$SAVE_CFLAGS"
3052   fi
3053   ;;
3054
3055 *-*-cygwin* | *-*-mingw*)
3056   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3057 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3059 echo "configure:3060: checking for $ac_word" >&5
3060 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   if test -n "$DLLTOOL"; then
3064   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3065 else
3066   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3067   ac_dummy="$PATH"
3068   for ac_dir in $ac_dummy; do
3069     test -z "$ac_dir" && ac_dir=.
3070     if test -f $ac_dir/$ac_word; then
3071       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3072       break
3073     fi
3074   done
3075   IFS="$ac_save_ifs"
3076 fi
3077 fi
3078 DLLTOOL="$ac_cv_prog_DLLTOOL"
3079 if test -n "$DLLTOOL"; then
3080   echo "$ac_t""$DLLTOOL" 1>&6
3081 else
3082   echo "$ac_t""no" 1>&6
3083 fi
3084
3085
3086 if test -z "$ac_cv_prog_DLLTOOL"; then
3087 if test -n "$ac_tool_prefix"; then
3088   # Extract the first word of "dlltool", so it can be a program name with args.
3089 set dummy dlltool; ac_word=$2
3090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3091 echo "configure:3092: checking for $ac_word" >&5
3092 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3093   echo $ac_n "(cached) $ac_c" 1>&6
3094 else
3095   if test -n "$DLLTOOL"; then
3096   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3097 else
3098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3099   ac_dummy="$PATH"
3100   for ac_dir in $ac_dummy; do
3101     test -z "$ac_dir" && ac_dir=.
3102     if test -f $ac_dir/$ac_word; then
3103       ac_cv_prog_DLLTOOL="dlltool"
3104       break
3105     fi
3106   done
3107   IFS="$ac_save_ifs"
3108   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3109 fi
3110 fi
3111 DLLTOOL="$ac_cv_prog_DLLTOOL"
3112 if test -n "$DLLTOOL"; then
3113   echo "$ac_t""$DLLTOOL" 1>&6
3114 else
3115   echo "$ac_t""no" 1>&6
3116 fi
3117
3118 else
3119   DLLTOOL="false"
3120 fi
3121 fi
3122
3123   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3124 set dummy ${ac_tool_prefix}as; ac_word=$2
3125 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3126 echo "configure:3127: checking for $ac_word" >&5
3127 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3128   echo $ac_n "(cached) $ac_c" 1>&6
3129 else
3130   if test -n "$AS"; then
3131   ac_cv_prog_AS="$AS" # Let the user override the test.
3132 else
3133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3134   ac_dummy="$PATH"
3135   for ac_dir in $ac_dummy; do
3136     test -z "$ac_dir" && ac_dir=.
3137     if test -f $ac_dir/$ac_word; then
3138       ac_cv_prog_AS="${ac_tool_prefix}as"
3139       break
3140     fi
3141   done
3142   IFS="$ac_save_ifs"
3143 fi
3144 fi
3145 AS="$ac_cv_prog_AS"
3146 if test -n "$AS"; then
3147   echo "$ac_t""$AS" 1>&6
3148 else
3149   echo "$ac_t""no" 1>&6
3150 fi
3151
3152
3153 if test -z "$ac_cv_prog_AS"; then
3154 if test -n "$ac_tool_prefix"; then
3155   # Extract the first word of "as", so it can be a program name with args.
3156 set dummy as; ac_word=$2
3157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3158 echo "configure:3159: checking for $ac_word" >&5
3159 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3160   echo $ac_n "(cached) $ac_c" 1>&6
3161 else
3162   if test -n "$AS"; then
3163   ac_cv_prog_AS="$AS" # Let the user override the test.
3164 else
3165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3166   ac_dummy="$PATH"
3167   for ac_dir in $ac_dummy; do
3168     test -z "$ac_dir" && ac_dir=.
3169     if test -f $ac_dir/$ac_word; then
3170       ac_cv_prog_AS="as"
3171       break
3172     fi
3173   done
3174   IFS="$ac_save_ifs"
3175   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3176 fi
3177 fi
3178 AS="$ac_cv_prog_AS"
3179 if test -n "$AS"; then
3180   echo "$ac_t""$AS" 1>&6
3181 else
3182   echo "$ac_t""no" 1>&6
3183 fi
3184
3185 else
3186   AS="false"
3187 fi
3188 fi
3189
3190   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3191 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3192 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3193 echo "configure:3194: checking for $ac_word" >&5
3194 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3195   echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197   if test -n "$OBJDUMP"; then
3198   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3199 else
3200   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3201   ac_dummy="$PATH"
3202   for ac_dir in $ac_dummy; do
3203     test -z "$ac_dir" && ac_dir=.
3204     if test -f $ac_dir/$ac_word; then
3205       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3206       break
3207     fi
3208   done
3209   IFS="$ac_save_ifs"
3210 fi
3211 fi
3212 OBJDUMP="$ac_cv_prog_OBJDUMP"
3213 if test -n "$OBJDUMP"; then
3214   echo "$ac_t""$OBJDUMP" 1>&6
3215 else
3216   echo "$ac_t""no" 1>&6
3217 fi
3218
3219
3220 if test -z "$ac_cv_prog_OBJDUMP"; then
3221 if test -n "$ac_tool_prefix"; then
3222   # Extract the first word of "objdump", so it can be a program name with args.
3223 set dummy objdump; ac_word=$2
3224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3225 echo "configure:3226: checking for $ac_word" >&5
3226 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   if test -n "$OBJDUMP"; then
3230   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3231 else
3232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3233   ac_dummy="$PATH"
3234   for ac_dir in $ac_dummy; do
3235     test -z "$ac_dir" && ac_dir=.
3236     if test -f $ac_dir/$ac_word; then
3237       ac_cv_prog_OBJDUMP="objdump"
3238       break
3239     fi
3240   done
3241   IFS="$ac_save_ifs"
3242   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3243 fi
3244 fi
3245 OBJDUMP="$ac_cv_prog_OBJDUMP"
3246 if test -n "$OBJDUMP"; then
3247   echo "$ac_t""$OBJDUMP" 1>&6
3248 else
3249   echo "$ac_t""no" 1>&6
3250 fi
3251
3252 else
3253   OBJDUMP="false"
3254 fi
3255 fi
3256
3257   ;;
3258
3259 esac
3260
3261
3262 # Save cache, so that ltconfig can load it
3263
3264
3265 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3266 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3267 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3268 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3269 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3270 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3271 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3272 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3273
3274 # Reload cache, that may have been modified by ltconfig
3275
3276
3277 # This can be used to rebuild libtool when needed
3278 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3279
3280 # Always use our own libtool.
3281 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3282
3283 # Redirect the config.log output again, so that the ltconfig log is not
3284 # clobbered by the next message.
3285 exec 5>>./config.log
3286
3287
3288 for ac_prog in mawk gawk nawk awk
3289 do
3290 # Extract the first word of "$ac_prog", so it can be a program name with args.
3291 set dummy $ac_prog; ac_word=$2
3292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3293 echo "configure:3294: checking for $ac_word" >&5
3294 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   if test -n "$AWK"; then
3298   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3299 else
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       ac_cv_prog_AWK="$ac_prog"
3306       break
3307     fi
3308   done
3309   IFS="$ac_save_ifs"
3310 fi
3311 fi
3312 AWK="$ac_cv_prog_AWK"
3313 if test -n "$AWK"; then
3314   echo "$ac_t""$AWK" 1>&6
3315 else
3316   echo "$ac_t""no" 1>&6
3317 fi
3318
3319 test -n "$AWK" && break
3320 done
3321
3322 # test for ln hardlink support
3323 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3324 echo "configure:3325: checking whether ln works" >&5
3325 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   rm -f conftest.src conftest.dst
3329 echo "conftest" > conftest.src
3330 if ln conftest.src conftest.dst 2>/dev/null
3331 then
3332   ol_cv_prog_LN_H="ln"
3333 else
3334   ol_cv_prog_LN_H="cp"
3335 fi
3336 rm -f conftest.src conftest.dst
3337
3338 fi
3339 LN_H="$ol_cv_prog_LN_H"
3340 if test "$ol_cv_prog_LN_H" = "ln"; then
3341         echo "$ac_t""yes" 1>&6
3342 else
3343         echo "$ac_t""no" 1>&6
3344 fi
3345
3346 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3347 echo "configure:3348: checking whether ln -s works" >&5
3348 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3349   echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351   rm -f conftestdata
3352 if ln -s X conftestdata 2>/dev/null
3353 then
3354   rm -f conftestdata
3355   ac_cv_prog_LN_S="ln -s"
3356 else
3357   ac_cv_prog_LN_S=ln
3358 fi
3359 fi
3360 LN_S="$ac_cv_prog_LN_S"
3361 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3362   echo "$ac_t""yes" 1>&6
3363 else
3364   echo "$ac_t""no" 1>&6
3365 fi
3366
3367
3368 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3369         LN_S="$LN_H"
3370 fi
3371
3372 # Extract the first word of "sendmail", so it can be a program name with args.
3373 set dummy sendmail; ac_word=$2
3374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3375 echo "configure:3376: checking for $ac_word" >&5
3376 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   case "$SENDMAIL" in
3380   /*)
3381   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3382   ;;
3383   ?:/*)                  
3384   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3385   ;;
3386   *)
3387   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3388   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3389   for ac_dir in $ac_dummy; do 
3390     test -z "$ac_dir" && ac_dir=.
3391     if test -f $ac_dir/$ac_word; then
3392       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3393       break
3394     fi
3395   done
3396   IFS="$ac_save_ifs"
3397   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3398   ;;
3399 esac
3400 fi
3401 SENDMAIL="$ac_cv_path_SENDMAIL"
3402 if test -n "$SENDMAIL"; then
3403   echo "$ac_t""$SENDMAIL" 1>&6
3404 else
3405   echo "$ac_t""no" 1>&6
3406 fi
3407
3408 # Extract the first word of "vi", so it can be a program name with args.
3409 set dummy vi; ac_word=$2
3410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3411 echo "configure:3412: checking for $ac_word" >&5
3412 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
3413   echo $ac_n "(cached) $ac_c" 1>&6
3414 else
3415   case "$EDITOR" in
3416   /*)
3417   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3418   ;;
3419   ?:/*)                  
3420   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3421   ;;
3422   *)
3423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3424   ac_dummy="$PATH:/usr/ucb"
3425   for ac_dir in $ac_dummy; do 
3426     test -z "$ac_dir" && ac_dir=.
3427     if test -f $ac_dir/$ac_word; then
3428       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3429       break
3430     fi
3431   done
3432   IFS="$ac_save_ifs"
3433   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3434   ;;
3435 esac
3436 fi
3437 EDITOR="$ac_cv_path_EDITOR"
3438 if test -n "$EDITOR"; then
3439   echo "$ac_t""$EDITOR" 1>&6
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443
3444 # Extract the first word of "finger", so it can be a program name with args.
3445 set dummy finger; ac_word=$2
3446 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3447 echo "configure:3448: checking for $ac_word" >&5
3448 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   case "$FINGER" in
3452   /*)
3453   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3454   ;;
3455   ?:/*)                  
3456   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3457   ;;
3458   *)
3459   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3460   ac_dummy="$PATH:/usr/ucb"
3461   for ac_dir in $ac_dummy; do 
3462     test -z "$ac_dir" && ac_dir=.
3463     if test -f $ac_dir/$ac_word; then
3464       ac_cv_path_FINGER="$ac_dir/$ac_word"
3465       break
3466     fi
3467   done
3468   IFS="$ac_save_ifs"
3469   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3470   ;;
3471 esac
3472 fi
3473 FINGER="$ac_cv_path_FINGER"
3474 if test -n "$FINGER"; then
3475   echo "$ac_t""$FINGER" 1>&6
3476 else
3477   echo "$ac_t""no" 1>&6
3478 fi
3479
3480
3481 ol_link_perl=no
3482 if test $ol_enable_perl != no ; then
3483         # Extract the first word of "perl", so it can be a program name with args.
3484 set dummy perl; ac_word=$2
3485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3486 echo "configure:3487: checking for $ac_word" >&5
3487 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
3488   echo $ac_n "(cached) $ac_c" 1>&6
3489 else
3490   case "$PERLBIN" in
3491   /*)
3492   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3493   ;;
3494   ?:/*)                  
3495   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3496   ;;
3497   *)
3498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3499   ac_dummy="$PATH"
3500   for ac_dir in $ac_dummy; do 
3501     test -z "$ac_dir" && ac_dir=.
3502     if test -f $ac_dir/$ac_word; then
3503       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3504       break
3505     fi
3506   done
3507   IFS="$ac_save_ifs"
3508   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3509   ;;
3510 esac
3511 fi
3512 PERLBIN="$ac_cv_path_PERLBIN"
3513 if test -n "$PERLBIN"; then
3514   echo "$ac_t""$PERLBIN" 1>&6
3515 else
3516   echo "$ac_t""no" 1>&6
3517 fi
3518
3519
3520         if test "no$PERLBIN" = "no" ; then
3521                 if test $ol_enable_perl = yes ; then
3522                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3523                 fi
3524
3525         else
3526                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3527                 if test x"$ol_with_perl_module" = "xstatic" ; then
3528                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3529                 else
3530                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3531                 fi
3532                                 ol_link_perl=yes
3533         fi
3534 fi
3535
3536 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3537 echo "configure:3538: checking how to run the C preprocessor" >&5
3538 # On Suns, sometimes $CPP names a directory.
3539 if test -n "$CPP" && test -d "$CPP"; then
3540   CPP=
3541 fi
3542 if test -z "$CPP"; then
3543 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546     # This must be in double quotes, not single quotes, because CPP may get
3547   # substituted into the Makefile and "${CC-cc}" will confuse make.
3548   CPP="${CC-cc} -E"
3549   # On the NeXT, cc -E runs the code through the compiler's parser,
3550   # not just through cpp.
3551   cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <assert.h>
3555 Syntax Error
3556 EOF
3557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3558 { (eval echo configure:3559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3560 if test -z "$ac_err"; then
3561   :
3562 else
3563   echo "$ac_err" >&5
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   CPP="${CC-cc} -E -traditional-cpp"
3568   cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <assert.h>
3572 Syntax Error
3573 EOF
3574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3575 { (eval echo configure:3576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3577 if test -z "$ac_err"; then
3578   :
3579 else
3580   echo "$ac_err" >&5
3581   echo "configure: failed program was:" >&5
3582   cat conftest.$ac_ext >&5
3583   rm -rf conftest*
3584   CPP="${CC-cc} -nologo -E"
3585   cat > conftest.$ac_ext <<EOF
3586 #line 3587 "configure"
3587 #include "confdefs.h"
3588 #include <assert.h>
3589 Syntax Error
3590 EOF
3591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3592 { (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3594 if test -z "$ac_err"; then
3595   :
3596 else
3597   echo "$ac_err" >&5
3598   echo "configure: failed program was:" >&5
3599   cat conftest.$ac_ext >&5
3600   rm -rf conftest*
3601   CPP=/lib/cpp
3602 fi
3603 rm -f conftest*
3604 fi
3605 rm -f conftest*
3606 fi
3607 rm -f conftest*
3608   ac_cv_prog_CPP="$CPP"
3609 fi
3610   CPP="$ac_cv_prog_CPP"
3611 else
3612   ac_cv_prog_CPP="$CPP"
3613 fi
3614 echo "$ac_t""$CPP" 1>&6
3615
3616
3617 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3618         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3619
3620 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3621         echo "configure: warning: programs compiled here do run here..." 1>&2
3622         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3623
3624 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3625         echo "configure: warning: programs compiled here do not run here..." 1>&2
3626         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3627 fi
3628
3629 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3630 echo "configure:3631: checking for AIX" >&5
3631 cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634 #ifdef _AIX
3635   yes
3636 #endif
3637
3638 EOF
3639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3640   egrep "yes" >/dev/null 2>&1; then
3641   rm -rf conftest*
3642   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3643 #define _ALL_SOURCE 1
3644 EOF
3645
3646 else
3647   rm -rf conftest*
3648   echo "$ac_t""no" 1>&6
3649 fi
3650 rm -f conftest*
3651
3652
3653 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3654 echo "configure:3655: checking for POSIXized ISC" >&5
3655 if test -d /etc/conf/kconfig.d &&
3656   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3657 then
3658   echo "$ac_t""yes" 1>&6
3659   ISC=yes # If later tests want to check for ISC.
3660   cat >> confdefs.h <<\EOF
3661 #define _POSIX_SOURCE 1
3662 EOF
3663
3664   if test "$GCC" = yes; then
3665     CC="$CC -posix"
3666   else
3667     CC="$CC -Xp"
3668   fi
3669 else
3670   echo "$ac_t""no" 1>&6
3671   ISC=
3672 fi
3673
3674 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3675 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3676 echo "configure:3677: checking for minix/config.h" >&5
3677 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683 #include <minix/config.h>
3684 EOF
3685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3686 { (eval echo configure:3687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3688 if test -z "$ac_err"; then
3689   rm -rf conftest*
3690   eval "ac_cv_header_$ac_safe=yes"
3691 else
3692   echo "$ac_err" >&5
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   eval "ac_cv_header_$ac_safe=no"
3697 fi
3698 rm -f conftest*
3699 fi
3700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3701   echo "$ac_t""yes" 1>&6
3702   MINIX=yes
3703 else
3704   echo "$ac_t""no" 1>&6
3705 MINIX=
3706 fi
3707
3708 if test "$MINIX" = yes; then
3709   cat >> confdefs.h <<\EOF
3710 #define _POSIX_SOURCE 1
3711 EOF
3712
3713   cat >> confdefs.h <<\EOF
3714 #define _POSIX_1_SOURCE 2
3715 EOF
3716
3717   cat >> confdefs.h <<\EOF
3718 #define _MINIX 1
3719 EOF
3720
3721 fi
3722
3723
3724 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3725 echo "configure:3726: checking for Cygwin environment" >&5
3726 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3727   echo $ac_n "(cached) $ac_c" 1>&6
3728 else
3729   cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732
3733 int main() {
3734
3735 #ifndef __CYGWIN__
3736 #define __CYGWIN__ __CYGWIN32__
3737 #endif
3738 return __CYGWIN__;
3739 ; return 0; }
3740 EOF
3741 if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3742   rm -rf conftest*
3743   ac_cv_cygwin=yes
3744 else
3745   echo "configure: failed program was:" >&5
3746   cat conftest.$ac_ext >&5
3747   rm -rf conftest*
3748   ac_cv_cygwin=no
3749 fi
3750 rm -f conftest*
3751 rm -f conftest*
3752 fi
3753
3754 echo "$ac_t""$ac_cv_cygwin" 1>&6
3755 CYGWIN=
3756 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3757 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3758 echo "configure:3759: checking for mingw32 environment" >&5
3759 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765
3766 int main() {
3767 return __MINGW32__;
3768 ; return 0; }
3769 EOF
3770 if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3771   rm -rf conftest*
3772   ac_cv_mingw32=yes
3773 else
3774   echo "configure: failed program was:" >&5
3775   cat conftest.$ac_ext >&5
3776   rm -rf conftest*
3777   ac_cv_mingw32=no
3778 fi
3779 rm -f conftest*
3780 rm -f conftest*
3781 fi
3782
3783 echo "$ac_t""$ac_cv_mingw32" 1>&6
3784 MINGW32=
3785 test "$ac_cv_mingw32" = yes && MINGW32=yes
3786
3787
3788 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3789 echo "configure:3790: checking for executable suffix" >&5
3790 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3791   echo $ac_n "(cached) $ac_c" 1>&6
3792 else
3793   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3794   ac_cv_exeext=.exe
3795 else
3796   rm -f conftest*
3797   echo 'int main () { return 0; }' > conftest.$ac_ext
3798   ac_cv_exeext=
3799   if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3800     for file in conftest.*; do
3801       case $file in
3802       *.c | *.o | *.obj) ;;
3803       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3804       esac
3805     done
3806   else
3807     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3808   fi
3809   rm -f conftest*
3810   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3811 fi
3812 fi
3813
3814 EXEEXT=""
3815 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3816 echo "$ac_t""${ac_cv_exeext}" 1>&6
3817 ac_exeext=$EXEEXT
3818
3819 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3820 echo "configure:3821: checking for object suffix" >&5
3821 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   rm -f conftest*
3825 echo 'int i = 1;' > conftest.$ac_ext
3826 if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3827   for ac_file in conftest.*; do
3828     case $ac_file in
3829     *.c) ;;
3830     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3831     esac
3832   done
3833 else
3834   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3835 fi
3836 rm -f conftest*
3837 fi
3838
3839 echo "$ac_t""$ac_cv_objext" 1>&6
3840 OBJEXT=$ac_cv_objext
3841 ac_objext=$ac_cv_objext
3842
3843
3844 cat >> confdefs.h <<EOF
3845 #define EXEEXT "${EXEEXT}"
3846 EOF
3847
3848
3849 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3850 echo "configure:3851: checking for be_app in -lbe" >&5
3851 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   ac_save_LIBS="$LIBS"
3856 LIBS="-lbe -lroot -lnet $LIBS"
3857 cat > conftest.$ac_ext <<EOF
3858 #line 3859 "configure"
3859 #include "confdefs.h"
3860 /* Override any gcc2 internal prototype to avoid an error.  */
3861 /* We use char because int might match the return type of a gcc2
3862     builtin and then its argument prototype would still apply.  */
3863 char be_app();
3864
3865 int main() {
3866 be_app()
3867 ; return 0; }
3868 EOF
3869 if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3870   rm -rf conftest*
3871   eval "ac_cv_lib_$ac_lib_var=yes"
3872 else
3873   echo "configure: failed program was:" >&5
3874   cat conftest.$ac_ext >&5
3875   rm -rf conftest*
3876   eval "ac_cv_lib_$ac_lib_var=no"
3877 fi
3878 rm -f conftest*
3879 LIBS="$ac_save_LIBS"
3880
3881 fi
3882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3883   echo "$ac_t""yes" 1>&6
3884   LIBS="$LIBS -lbe -lroot -lnet"
3885 else
3886   echo "$ac_t""no" 1>&6
3887 :
3888 fi
3889
3890
3891
3892
3893
3894 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3895 echo "configure:3896: checking for ${CC-cc} option to accept ANSI C" >&5
3896 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3897   echo $ac_n "(cached) $ac_c" 1>&6
3898 else
3899   am_cv_prog_cc_stdc=no
3900 ac_save_CC="$CC"
3901 # Don't try gcc -ansi; that turns off useful extensions and
3902 # breaks some systems' header files.
3903 # AIX                   -qlanglvl=ansi
3904 # Ultrix and OSF/1      -std1
3905 # HP-UX 10.20 and later -Ae
3906 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3907 # SVR4                  -Xc -D__EXTENSIONS__
3908 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3909 do
3910   CC="$ac_save_CC $ac_arg"
3911   cat > conftest.$ac_ext <<EOF
3912 #line 3913 "configure"
3913 #include "confdefs.h"
3914 #include <stdarg.h>
3915 #include <stdio.h>
3916 #include <sys/types.h>
3917 #include <sys/stat.h>
3918 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3919 struct buf { int x; };
3920 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3921 static char *e (p, i)
3922      char **p;
3923      int i;
3924 {
3925   return p[i];
3926 }
3927 static char *f (char * (*g) (char **, int), char **p, ...)
3928 {
3929   char *s;
3930   va_list v;
3931   va_start (v,p);
3932   s = g (p, va_arg (v,int));
3933   va_end (v);
3934   return s;
3935 }
3936 int test (int i, double x);
3937 struct s1 {int (*f) (int a);};
3938 struct s2 {int (*f) (double a);};
3939 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3940 int argc;
3941 char **argv;
3942
3943 int main() {
3944
3945 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3946
3947 ; return 0; }
3948 EOF
3949 if { (eval echo configure:3950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3950   rm -rf conftest*
3951   am_cv_prog_cc_stdc="$ac_arg"; break
3952 else
3953   echo "configure: failed program was:" >&5
3954   cat conftest.$ac_ext >&5
3955 fi
3956 rm -f conftest*
3957 done
3958 CC="$ac_save_CC"
3959
3960 fi
3961
3962 if test -z "$am_cv_prog_cc_stdc"; then
3963   echo "$ac_t""none needed" 1>&6
3964 else
3965   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3966 fi
3967 case "x$am_cv_prog_cc_stdc" in
3968   x|xno) ;;
3969   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3970 esac
3971
3972 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3973         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3974 fi
3975
3976 # test for make depend flag
3977 OL_MKDEP=
3978 OL_MKDEP_FLAGS=
3979 if test -z "${MKDEP}"; then
3980         OL_MKDEP="${CC-cc}"
3981         if test -z "${MKDEP_FLAGS}"; then
3982                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3983 echo "configure:3984: checking for ${OL_MKDEP} depend flag" >&5
3984 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3985   echo $ac_n "(cached) $ac_c" 1>&6
3986 else
3987   
3988                         ol_cv_mkdep=no
3989                         for flag in "-M" "-xM"; do
3990                                 cat > conftest.c <<EOF
3991  noCode;
3992 EOF
3993                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3994                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3995                                 then
3996                                         if test ! -f conftest."${ac_object}" ; then
3997                                                 ol_cv_mkdep=$flag
3998                                                 OL_MKDEP_FLAGS="$flag"
3999                                                 break
4000                                         fi
4001                                 fi
4002                         done
4003                         rm -f conftest*
4004                 
4005 fi
4006
4007 echo "$ac_t""$ol_cv_mkdep" 1>&6
4008         else
4009                 cc_cv_mkdep=yes
4010                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4011         fi
4012 else
4013         cc_cv_mkdep=yes
4014         OL_MKDEP="${MKDEP}"
4015         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4016 fi
4017
4018
4019
4020 if test "${ol_cv_mkdep}" = no ; then
4021         # this will soon become an error
4022         echo "configure: warning: do not know how to generate dependencies" 1>&2
4023 fi
4024
4025 ol_link_modules=no
4026 if test $ol_enable_modules != no ; then
4027         for ac_hdr in ltdl.h
4028 do
4029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4031 echo "configure:4032: checking for $ac_hdr" >&5
4032 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4033   echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035   cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <$ac_hdr>
4039 EOF
4040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4041 { (eval echo configure:4042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4043 if test -z "$ac_err"; then
4044   rm -rf conftest*
4045   eval "ac_cv_header_$ac_safe=yes"
4046 else
4047   echo "$ac_err" >&5
4048   echo "configure: failed program was:" >&5
4049   cat conftest.$ac_ext >&5
4050   rm -rf conftest*
4051   eval "ac_cv_header_$ac_safe=no"
4052 fi
4053 rm -f conftest*
4054 fi
4055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4056   echo "$ac_t""yes" 1>&6
4057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4058   cat >> confdefs.h <<EOF
4059 #define $ac_tr_hdr 1
4060 EOF
4061  
4062 else
4063   echo "$ac_t""no" 1>&6
4064 fi
4065 done
4066
4067
4068         if test $ac_cv_header_ltdl_h = no ; then
4069                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4070         fi
4071
4072         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4073 echo "configure:4074: checking for lt_dlinit in -lltdl" >&5
4074 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-%__p_%'`
4075 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4076   echo $ac_n "(cached) $ac_c" 1>&6
4077 else
4078   ac_save_LIBS="$LIBS"
4079 LIBS="-lltdl  $LIBS"
4080 cat > conftest.$ac_ext <<EOF
4081 #line 4082 "configure"
4082 #include "confdefs.h"
4083 /* Override any gcc2 internal prototype to avoid an error.  */
4084 /* We use char because int might match the return type of a gcc2
4085     builtin and then its argument prototype would still apply.  */
4086 char lt_dlinit();
4087
4088 int main() {
4089 lt_dlinit()
4090 ; return 0; }
4091 EOF
4092 if { (eval echo configure:4093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4093   rm -rf conftest*
4094   eval "ac_cv_lib_$ac_lib_var=yes"
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   eval "ac_cv_lib_$ac_lib_var=no"
4100 fi
4101 rm -f conftest*
4102 LIBS="$ac_save_LIBS"
4103
4104 fi
4105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4106   echo "$ac_t""yes" 1>&6
4107   
4108             MODULES_LIBS=-lltdl
4109             cat >> confdefs.h <<\EOF
4110 #define HAVE_LIBLTDL 1
4111 EOF
4112
4113         
4114 else
4115   echo "$ac_t""no" 1>&6
4116 fi
4117
4118
4119         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4120                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4121         fi
4122         ol_link_modules=yes
4123 else
4124         ol_with_bdb2_module=static
4125         ol_with_ldap_module=static
4126         ol_with_ldbm_module=static
4127         ol_with_passwd_module=static
4128         ol_with_perl_module=static
4129         ol_with_shell_module=static
4130         ol_with_tcl_module=static
4131 fi
4132
4133 # test for EBCDIC
4134 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4135 echo "configure:4136: checking for EBCDIC" >&5
4136 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   
4140         cat > conftest.$ac_ext <<EOF
4141 #line 4142 "configure"
4142 #include "confdefs.h"
4143
4144 #if !('M' == 0xd4)
4145 #include <__ASCII__/generate_error.h>
4146 #endif
4147
4148 EOF
4149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4150 { (eval echo configure:4151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4152 if test -z "$ac_err"; then
4153   rm -rf conftest*
4154   ol_cv_cpp_ebcdic=yes
4155 else
4156   echo "$ac_err" >&5
4157   echo "configure: failed program was:" >&5
4158   cat conftest.$ac_ext >&5
4159   rm -rf conftest*
4160   ol_cv_cpp_ebcdic=no
4161 fi
4162 rm -f conftest*
4163 fi
4164
4165 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4166 if test $ol_cv_cpp_ebcdic = yes ; then
4167         cat >> confdefs.h <<\EOF
4168 #define HAVE_EBCDIC 1
4169 EOF
4170
4171 fi
4172
4173 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4174 echo "configure:4175: checking for ANSI C header files" >&5
4175 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
4176   echo $ac_n "(cached) $ac_c" 1>&6
4177 else
4178   cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 #include <stdlib.h>
4182 #include <stdarg.h>
4183 #include <string.h>
4184 #include <float.h>
4185 EOF
4186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4187 { (eval echo configure:4188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4189 if test -z "$ac_err"; then
4190   rm -rf conftest*
4191   ol_cv_header_stdc=yes
4192 else
4193   echo "$ac_err" >&5
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   ol_cv_header_stdc=no
4198 fi
4199 rm -f conftest*
4200
4201 if test $ol_cv_header_stdc = yes; then
4202   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4203 cat > conftest.$ac_ext <<EOF
4204 #line 4205 "configure"
4205 #include "confdefs.h"
4206 #include <string.h>
4207 EOF
4208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4209   egrep "memchr" >/dev/null 2>&1; then
4210   :
4211 else
4212   rm -rf conftest*
4213   ol_cv_header_stdc=no
4214 fi
4215 rm -f conftest*
4216
4217 fi
4218
4219 if test $ol_cv_header_stdc = yes; then
4220   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4221 cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 #include <stdlib.h>
4225 EOF
4226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4227   egrep "free" >/dev/null 2>&1; then
4228   :
4229 else
4230   rm -rf conftest*
4231   ol_cv_header_stdc=no
4232 fi
4233 rm -f conftest*
4234
4235 fi
4236
4237 if test $ol_cv_header_stdc = yes; then
4238   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4239 if test "$cross_compiling" = yes; then
4240   :
4241 else
4242   cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 #include <ctype.h>
4246 #ifndef HAVE_EBCDIC
4247 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4248 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4249 #else
4250 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4251                 || ('j' <= (c) && (c) <= 'r') \
4252                 || ('s' <= (c) && (c) <= 'z'))
4253 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4254 #endif
4255 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4256 int main () { int i; for (i = 0; i < 256; i++)
4257 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4258 exit (0); }
4259
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4262 then
4263   :
4264 else
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -fr conftest*
4268   ol_cv_header_stdc=no
4269 fi
4270 rm -fr conftest*
4271 fi
4272
4273 fi
4274 fi
4275
4276 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4277 if test $ol_cv_header_stdc = yes; then
4278   cat >> confdefs.h <<\EOF
4279 #define STDC_HEADERS 1
4280 EOF
4281
4282 fi
4283 ac_cv_header_stdc=disable
4284
4285
4286 if test $ol_cv_header_stdc != yes; then
4287         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4288 fi
4289
4290 ac_header_dirent=no
4291 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4292 do
4293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4294 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4295 echo "configure:4296: checking for $ac_hdr that defines DIR" >&5
4296 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   cat > conftest.$ac_ext <<EOF
4300 #line 4301 "configure"
4301 #include "confdefs.h"
4302 #include <sys/types.h>
4303 #include <$ac_hdr>
4304 int main() {
4305 DIR *dirp = 0;
4306 ; return 0; }
4307 EOF
4308 if { (eval echo configure:4309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4309   rm -rf conftest*
4310   eval "ac_cv_header_dirent_$ac_safe=yes"
4311 else
4312   echo "configure: failed program was:" >&5
4313   cat conftest.$ac_ext >&5
4314   rm -rf conftest*
4315   eval "ac_cv_header_dirent_$ac_safe=no"
4316 fi
4317 rm -f conftest*
4318 fi
4319 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4320   echo "$ac_t""yes" 1>&6
4321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4322   cat >> confdefs.h <<EOF
4323 #define $ac_tr_hdr 1
4324 EOF
4325  ac_header_dirent=$ac_hdr; break
4326 else
4327   echo "$ac_t""no" 1>&6
4328 fi
4329 done
4330 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4331 if test $ac_header_dirent = dirent.h; then
4332 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4333 echo "configure:4334: checking for opendir in -ldir" >&5
4334 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4336   echo $ac_n "(cached) $ac_c" 1>&6
4337 else
4338   ac_save_LIBS="$LIBS"
4339 LIBS="-ldir  $LIBS"
4340 cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 /* Override any gcc2 internal prototype to avoid an error.  */
4344 /* We use char because int might match the return type of a gcc2
4345     builtin and then its argument prototype would still apply.  */
4346 char opendir();
4347
4348 int main() {
4349 opendir()
4350 ; return 0; }
4351 EOF
4352 if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4353   rm -rf conftest*
4354   eval "ac_cv_lib_$ac_lib_var=yes"
4355 else
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   eval "ac_cv_lib_$ac_lib_var=no"
4360 fi
4361 rm -f conftest*
4362 LIBS="$ac_save_LIBS"
4363
4364 fi
4365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4366   echo "$ac_t""yes" 1>&6
4367   LIBS="$LIBS -ldir"
4368 else
4369   echo "$ac_t""no" 1>&6
4370 fi
4371
4372 else
4373 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4374 echo "configure:4375: checking for opendir in -lx" >&5
4375 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   ac_save_LIBS="$LIBS"
4380 LIBS="-lx  $LIBS"
4381 cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 /* Override any gcc2 internal prototype to avoid an error.  */
4385 /* We use char because int might match the return type of a gcc2
4386     builtin and then its argument prototype would still apply.  */
4387 char opendir();
4388
4389 int main() {
4390 opendir()
4391 ; return 0; }
4392 EOF
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394   rm -rf conftest*
4395   eval "ac_cv_lib_$ac_lib_var=yes"
4396 else
4397   echo "configure: failed program was:" >&5
4398   cat conftest.$ac_ext >&5
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=no"
4401 fi
4402 rm -f conftest*
4403 LIBS="$ac_save_LIBS"
4404
4405 fi
4406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407   echo "$ac_t""yes" 1>&6
4408   LIBS="$LIBS -lx"
4409 else
4410   echo "$ac_t""no" 1>&6
4411 fi
4412
4413 fi
4414
4415 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4416 echo "configure:4417: checking for sys/wait.h that is POSIX.1 compatible" >&5
4417 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4418   echo $ac_n "(cached) $ac_c" 1>&6
4419 else
4420   cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423 #include <sys/types.h>
4424 #include <sys/wait.h>
4425 #ifndef WEXITSTATUS
4426 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4427 #endif
4428 #ifndef WIFEXITED
4429 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4430 #endif
4431 int main() {
4432 int s;
4433 wait (&s);
4434 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4435 ; return 0; }
4436 EOF
4437 if { (eval echo configure:4438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4438   rm -rf conftest*
4439   ac_cv_header_sys_wait_h=yes
4440 else
4441   echo "configure: failed program was:" >&5
4442   cat conftest.$ac_ext >&5
4443   rm -rf conftest*
4444   ac_cv_header_sys_wait_h=no
4445 fi
4446 rm -f conftest*
4447 fi
4448
4449 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4450 if test $ac_cv_header_sys_wait_h = yes; then
4451   cat >> confdefs.h <<\EOF
4452 #define HAVE_SYS_WAIT_H 1
4453 EOF
4454
4455 fi
4456
4457 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4458 echo "configure:4459: checking POSIX termios" >&5
4459 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 #include <sys/types.h>
4466 #include <unistd.h>
4467 #include <termios.h>
4468 int main() {
4469 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4470    tcgetattr(0, 0);
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   am_cv_sys_posix_termios=yes
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   am_cv_sys_posix_termios=no
4481 fi
4482 rm -f conftest*
4483 fi
4484
4485 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4486
4487
4488  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4489 echo "configure:4490: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4490 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
4491   echo $ac_n "(cached) $ac_c" 1>&6
4492 else
4493   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4494
4495   gwinsz_in_termios_h=no
4496   if test $am_cv_sys_posix_termios = yes; then
4497     cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 #include <sys/types.h>
4501 #     include <termios.h>
4502 #     ifdef TIOCGWINSZ
4503         yes
4504 #     endif
4505     
4506 EOF
4507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4508   egrep "yes" >/dev/null 2>&1; then
4509   rm -rf conftest*
4510   gwinsz_in_termios_h=yes
4511 fi
4512 rm -f conftest*
4513
4514   fi
4515
4516   if test $gwinsz_in_termios_h = no; then
4517     cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 #include <sys/types.h>
4521 #     include <sys/ioctl.h>
4522 #     ifdef TIOCGWINSZ
4523         yes
4524 #     endif
4525     
4526 EOF
4527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4528   egrep "yes" >/dev/null 2>&1; then
4529   rm -rf conftest*
4530   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4531 fi
4532 rm -f conftest*
4533
4534   fi
4535   
4536 fi
4537
4538 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4539   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4540     cat >> confdefs.h <<\EOF
4541 #define GWINSZ_IN_SYS_IOCTL 1
4542 EOF
4543
4544   fi
4545
4546 if test $am_cv_sys_posix_termios = yes ; then
4547         cat >> confdefs.h <<\EOF
4548 #define HAVE_POSIX_TERMIOS 1
4549 EOF
4550
4551 fi
4552
4553 for ac_hdr in \
4554         arpa/inet.h             \
4555         arpa/nameser.h  \
4556         assert.h                \
4557         conio.h                 \
4558         crypt.h                 \
4559         direct.h                \
4560         errno.h                 \
4561         fcntl.h                 \
4562         filio.h                 \
4563         getopt.h                \
4564         grp.h                   \
4565         io.h                    \
4566         libutil.h               \
4567         limits.h                \
4568         locale.h                \
4569         netinet/tcp.h   \
4570         malloc.h                \
4571         memory.h                \
4572         psap.h                  \
4573         pwd.h                   \
4574         process.h               \
4575         resolv.h                \
4576         sgtty.h                 \
4577         shadow.h                \
4578         stddef.h                \
4579         string.h                \
4580         strings.h               \
4581         sysexits.h              \
4582         sys/file.h              \
4583         sys/filio.h             \
4584         sys/errno.h             \
4585         sys/ioctl.h             \
4586         sys/param.h             \
4587         sys/resource.h  \
4588         sys/select.h    \
4589         sys/socket.h    \
4590         sys/syslog.h    \
4591         sys/time.h              \
4592         sys/types.h             \
4593         syslog.h                \
4594         termios.h               \
4595         unistd.h                \
4596         winsock.h               \
4597
4598 do
4599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4601 echo "configure:4602: checking for $ac_hdr" >&5
4602 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <$ac_hdr>
4609 EOF
4610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4611 { (eval echo configure:4612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4613 if test -z "$ac_err"; then
4614   rm -rf conftest*
4615   eval "ac_cv_header_$ac_safe=yes"
4616 else
4617   echo "$ac_err" >&5
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   eval "ac_cv_header_$ac_safe=no"
4622 fi
4623 rm -f conftest*
4624 fi
4625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4626   echo "$ac_t""yes" 1>&6
4627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4628   cat >> confdefs.h <<EOF
4629 #define $ac_tr_hdr 1
4630 EOF
4631  
4632 else
4633   echo "$ac_t""no" 1>&6
4634 fi
4635 done
4636
4637
4638
4639
4640 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4641 echo "configure:4642: checking for sigset in -lV3" >&5
4642 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4643 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4644   echo $ac_n "(cached) $ac_c" 1>&6
4645 else
4646   ac_save_LIBS="$LIBS"
4647 LIBS="-lV3  $LIBS"
4648 cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 /* Override any gcc2 internal prototype to avoid an error.  */
4652 /* We use char because int might match the return type of a gcc2
4653     builtin and then its argument prototype would still apply.  */
4654 char sigset();
4655
4656 int main() {
4657 sigset()
4658 ; return 0; }
4659 EOF
4660 if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4661   rm -rf conftest*
4662   eval "ac_cv_lib_$ac_lib_var=yes"
4663 else
4664   echo "configure: failed program was:" >&5
4665   cat conftest.$ac_ext >&5
4666   rm -rf conftest*
4667   eval "ac_cv_lib_$ac_lib_var=no"
4668 fi
4669 rm -f conftest*
4670 LIBS="$ac_save_LIBS"
4671
4672 fi
4673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4674   echo "$ac_t""yes" 1>&6
4675     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4676     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4677   cat >> confdefs.h <<EOF
4678 #define $ac_tr_lib 1
4679 EOF
4680
4681   LIBS="-lV3 $LIBS"
4682
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686
4687
4688 if test $ac_cv_header_winsock_h = yes; then
4689         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4690 echo "configure:4691: checking for winsock" >&5
4691 if eval "test \"`echo '$''{'ol_cv_winsock'+set}'`\" = set"; then
4692   echo $ac_n "(cached) $ac_c" 1>&6
4693 else
4694   cat > conftest.$ac_ext <<EOF
4695 #line 4696 "configure"
4696 #include "confdefs.h"
4697 #include <winsock.h>
4698 int main() {
4699
4700                         socket(0,0,0);
4701                         select(0,NULL,NULL,NULL,NULL);
4702                         closesocket(0);
4703                         gethostname(NULL,0);
4704         
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708   rm -rf conftest*
4709   ol_cv_winsock=yes
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   ol_cv_winsock=no
4715 fi
4716 rm -f conftest*]
4717 fi
4718
4719 echo "$ac_t""$ol_cv_winsock" 1>&6
4720
4721         if test $ol_cv_winsock = yes ; then
4722                 cat >> confdefs.h <<\EOF
4723 #define HAVE_WINSOCK 1
4724 EOF
4725
4726                 ac_cv_func_socket=yes
4727                 ac_cv_func_select=yes
4728                 ac_cv_func_closesocket=yes
4729                 ac_cv_func_gethostname=yes
4730         fi
4731 fi
4732
4733
4734 echo $ac_n "checking for socket""... $ac_c" 1>&6
4735 echo "configure:4736: checking for socket" >&5
4736 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
4737   echo $ac_n "(cached) $ac_c" 1>&6
4738 else
4739   cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742 /* System header to define __stub macros and hopefully few prototypes,
4743     which can conflict with char socket(); below.  */
4744 #include <assert.h>
4745 /* Override any gcc2 internal prototype to avoid an error.  */
4746 /* We use char because int might match the return type of a gcc2
4747     builtin and then its argument prototype would still apply.  */
4748 char socket();
4749
4750 int main() {
4751
4752 /* The GNU C library defines this for functions which it implements
4753     to always fail with ENOSYS.  Some functions are actually named
4754     something starting with __ and the normal name is an alias.  */
4755 #if defined (__stub_socket) || defined (__stub___socket)
4756 choke me
4757 #else
4758 socket();
4759 #endif
4760
4761 ; return 0; }
4762 EOF
4763 if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4764   rm -rf conftest*
4765   eval "ac_cv_func_socket=yes"
4766 else
4767   echo "configure: failed program was:" >&5
4768   cat conftest.$ac_ext >&5
4769   rm -rf conftest*
4770   eval "ac_cv_func_socket=no"
4771 fi
4772 rm -f conftest*
4773 fi
4774
4775 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4776   echo "$ac_t""yes" 1>&6
4777   :
4778 else
4779   echo "$ac_t""no" 1>&6
4780         
4781         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4782 echo "configure:4783: checking for main in -lsocket" >&5
4783 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4784 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   ac_save_LIBS="$LIBS"
4788 LIBS="-lsocket  $LIBS"
4789 cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792
4793 int main() {
4794 main()
4795 ; return 0; }
4796 EOF
4797 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4798   rm -rf conftest*
4799   eval "ac_cv_lib_$ac_lib_var=yes"
4800 else
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -rf conftest*
4804   eval "ac_cv_lib_$ac_lib_var=no"
4805 fi
4806 rm -f conftest*
4807 LIBS="$ac_save_LIBS"
4808
4809 fi
4810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4813     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4814   cat >> confdefs.h <<EOF
4815 #define $ac_tr_lib 1
4816 EOF
4817
4818   LIBS="-lsocket $LIBS"
4819
4820 else
4821   echo "$ac_t""no" 1>&6
4822 fi
4823
4824         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4825 echo "configure:4826: checking for main in -lnet" >&5
4826 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
4827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830   ac_save_LIBS="$LIBS"
4831 LIBS="-lnet  $LIBS"
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835
4836 int main() {
4837 main()
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   eval "ac_cv_lib_$ac_lib_var=yes"
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=no"
4848 fi
4849 rm -f conftest*
4850 LIBS="$ac_save_LIBS"
4851
4852 fi
4853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4854   echo "$ac_t""yes" 1>&6
4855     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4856     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4857   cat >> confdefs.h <<EOF
4858 #define $ac_tr_lib 1
4859 EOF
4860
4861   LIBS="-lnet $LIBS"
4862
4863 else
4864   echo "$ac_t""no" 1>&6
4865 fi
4866
4867         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4868 echo "configure:4869: checking for main in -lnsl_s" >&5
4869 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
4870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   ac_save_LIBS="$LIBS"
4874 LIBS="-lnsl_s  $LIBS"
4875 cat > conftest.$ac_ext <<EOF
4876 #line 4877 "configure"
4877 #include "confdefs.h"
4878
4879 int main() {
4880 main()
4881 ; return 0; }
4882 EOF
4883 if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4884   rm -rf conftest*
4885   eval "ac_cv_lib_$ac_lib_var=yes"
4886 else
4887   echo "configure: failed program was:" >&5
4888   cat conftest.$ac_ext >&5
4889   rm -rf conftest*
4890   eval "ac_cv_lib_$ac_lib_var=no"
4891 fi
4892 rm -f conftest*
4893 LIBS="$ac_save_LIBS"
4894
4895 fi
4896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4897   echo "$ac_t""yes" 1>&6
4898     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4899     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4900   cat >> confdefs.h <<EOF
4901 #define $ac_tr_lib 1
4902 EOF
4903
4904   LIBS="-lnsl_s $LIBS"
4905
4906 else
4907   echo "$ac_t""no" 1>&6
4908 fi
4909
4910         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4911 echo "configure:4912: checking for main in -lnsl" >&5
4912 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4913 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   ac_save_LIBS="$LIBS"
4917 LIBS="-lnsl  $LIBS"
4918 cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921
4922 int main() {
4923 main()
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   eval "ac_cv_lib_$ac_lib_var=yes"
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_lib_$ac_lib_var=no"
4934 fi
4935 rm -f conftest*
4936 LIBS="$ac_save_LIBS"
4937
4938 fi
4939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4940   echo "$ac_t""yes" 1>&6
4941     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4942     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4943   cat >> confdefs.h <<EOF
4944 #define $ac_tr_lib 1
4945 EOF
4946
4947   LIBS="-lnsl $LIBS"
4948
4949 else
4950   echo "$ac_t""no" 1>&6
4951 fi
4952
4953         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4954 echo "configure:4955: checking for socket in -linet" >&5
4955 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
4956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   ac_save_LIBS="$LIBS"
4960 LIBS="-linet  $LIBS"
4961 cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964 /* Override any gcc2 internal prototype to avoid an error.  */
4965 /* We use char because int might match the return type of a gcc2
4966     builtin and then its argument prototype would still apply.  */
4967 char socket();
4968
4969 int main() {
4970 socket()
4971 ; return 0; }
4972 EOF
4973 if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4974   rm -rf conftest*
4975   eval "ac_cv_lib_$ac_lib_var=yes"
4976 else
4977   echo "configure: failed program was:" >&5
4978   cat conftest.$ac_ext >&5
4979   rm -rf conftest*
4980   eval "ac_cv_lib_$ac_lib_var=no"
4981 fi
4982 rm -f conftest*
4983 LIBS="$ac_save_LIBS"
4984
4985 fi
4986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4987   echo "$ac_t""yes" 1>&6
4988     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4990   cat >> confdefs.h <<EOF
4991 #define $ac_tr_lib 1
4992 EOF
4993
4994   LIBS="-linet $LIBS"
4995
4996 else
4997   echo "$ac_t""no" 1>&6
4998 fi
4999
5000         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5001 echo "configure:5002: checking for main in -lgen" >&5
5002 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
5003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   ac_save_LIBS="$LIBS"
5007 LIBS="-lgen  $LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011
5012 int main() {
5013 main()
5014 ; return 0; }
5015 EOF
5016 if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5017   rm -rf conftest*
5018   eval "ac_cv_lib_$ac_lib_var=yes"
5019 else
5020   echo "configure: failed program was:" >&5
5021   cat conftest.$ac_ext >&5
5022   rm -rf conftest*
5023   eval "ac_cv_lib_$ac_lib_var=no"
5024 fi
5025 rm -f conftest*
5026 LIBS="$ac_save_LIBS"
5027
5028 fi
5029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5030   echo "$ac_t""yes" 1>&6
5031     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5032     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5033   cat >> confdefs.h <<EOF
5034 #define $ac_tr_lib 1
5035 EOF
5036
5037   LIBS="-lgen $LIBS"
5038
5039 else
5040   echo "$ac_t""no" 1>&6
5041 fi
5042
5043
5044 fi
5045
5046
5047 echo $ac_n "checking for select""... $ac_c" 1>&6
5048 echo "configure:5049: checking for select" >&5
5049 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
5050   echo $ac_n "(cached) $ac_c" 1>&6
5051 else
5052   cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055 /* System header to define __stub macros and hopefully few prototypes,
5056     which can conflict with char select(); below.  */
5057 #include <assert.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 select();
5062
5063 int main() {
5064
5065 /* The GNU C library defines this for functions which it implements
5066     to always fail with ENOSYS.  Some functions are actually named
5067     something starting with __ and the normal name is an alias.  */
5068 #if defined (__stub_select) || defined (__stub___select)
5069 choke me
5070 #else
5071 select();
5072 #endif
5073
5074 ; return 0; }
5075 EOF
5076 if { (eval echo configure:5077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5077   rm -rf conftest*
5078   eval "ac_cv_func_select=yes"
5079 else
5080   echo "configure: failed program was:" >&5
5081   cat conftest.$ac_ext >&5
5082   rm -rf conftest*
5083   eval "ac_cv_func_select=no"
5084 fi
5085 rm -f conftest*
5086 fi
5087
5088 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5089   echo "$ac_t""yes" 1>&6
5090   :
5091 else
5092   echo "$ac_t""no" 1>&6
5093 { echo "configure: error: select() required." 1>&2; exit 1; }
5094 fi
5095
5096
5097 if test "${ac_cv_header_winsock_h}" != yes; then
5098                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5099 echo "configure:5100: checking types of arguments for select()" >&5
5100  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
5101   echo $ac_n "(cached) $ac_c" 1>&6
5102 else
5103    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
5104   echo $ac_n "(cached) $ac_c" 1>&6
5105 else
5106     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
5107   echo $ac_n "(cached) $ac_c" 1>&6
5108 else
5109      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5110      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5111       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5112        cat > conftest.$ac_ext <<EOF
5113 #line 5114 "configure"
5114 #include "confdefs.h"
5115 #ifdef HAVE_SYS_TYPES_H
5116 #include <sys/types.h>
5117 #endif
5118 #ifdef HAVE_SYS_TIME_H
5119 #include <sys/time.h>
5120 #endif
5121 #ifdef HAVE_SYS_SELECT_H
5122 #include <sys/select.h>
5123 #endif
5124 #ifdef HAVE_SYS_SOCKET_H
5125 #include <sys/socket.h>
5126 #endif
5127 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);
5128 int main() {
5129
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5133   rm -rf conftest*
5134           ac_not_found=no ; break 3
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   ac_not_found=yes
5140 fi
5141 rm -f conftest*
5142       done
5143      done
5144     done
5145    
5146 fi
5147   
5148 fi
5149  
5150 fi
5151  if test "$ac_not_found" = yes; then
5152   ac_cv_func_select_arg1=int 
5153   ac_cv_func_select_arg234='int *' 
5154   ac_cv_func_select_arg5='struct timeval *'
5155  fi
5156  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5157  cat >> confdefs.h <<EOF
5158 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5159 EOF
5160
5161  cat >> confdefs.h <<EOF
5162 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5163 EOF
5164
5165  cat >> confdefs.h <<EOF
5166 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5167 EOF
5168
5169
5170 fi
5171
5172
5173 for ac_hdr in regex.h 
5174 do
5175 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5176 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5177 echo "configure:5178: checking for $ac_hdr" >&5
5178 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5179   echo $ac_n "(cached) $ac_c" 1>&6
5180 else
5181   cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184 #include <$ac_hdr>
5185 EOF
5186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5187 { (eval echo configure:5188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5189 if test -z "$ac_err"; then
5190   rm -rf conftest*
5191   eval "ac_cv_header_$ac_safe=yes"
5192 else
5193   echo "$ac_err" >&5
5194   echo "configure: failed program was:" >&5
5195   cat conftest.$ac_ext >&5
5196   rm -rf conftest*
5197   eval "ac_cv_header_$ac_safe=no"
5198 fi
5199 rm -f conftest*
5200 fi
5201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5202   echo "$ac_t""yes" 1>&6
5203     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5204   cat >> confdefs.h <<EOF
5205 #define $ac_tr_hdr 1
5206 EOF
5207  
5208 else
5209   echo "$ac_t""no" 1>&6
5210 fi
5211 done
5212
5213 if test "$ac_cv_header_regex_h" != yes ; then
5214         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5215 fi
5216 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5217 echo "configure:5218: checking for regfree" >&5
5218 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224 /* System header to define __stub macros and hopefully few prototypes,
5225     which can conflict with char regfree(); below.  */
5226 #include <assert.h>
5227 /* Override any gcc2 internal prototype to avoid an error.  */
5228 /* We use char because int might match the return type of a gcc2
5229     builtin and then its argument prototype would still apply.  */
5230 char regfree();
5231
5232 int main() {
5233
5234 /* The GNU C library defines this for functions which it implements
5235     to always fail with ENOSYS.  Some functions are actually named
5236     something starting with __ and the normal name is an alias.  */
5237 #if defined (__stub_regfree) || defined (__stub___regfree)
5238 choke me
5239 #else
5240 regfree();
5241 #endif
5242
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   eval "ac_cv_func_regfree=yes"
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   eval "ac_cv_func_regfree=no"
5253 fi
5254 rm -f conftest*
5255 fi
5256
5257 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259   :
5260 else
5261   echo "$ac_t""no" 1>&6
5262 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5263 fi
5264
5265
5266
5267 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5268 echo "configure:5269: checking for compatible POSIX regex" >&5
5269 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
5270   echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272   
5273         if test "$cross_compiling" = yes; then
5274   ol_cv_c_posix_regex=cross
5275 else
5276   cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279
5280 #include <sys/types.h>
5281 #include <regex.h>
5282 static char *pattern, *string;
5283 main()
5284 {
5285         int rc;
5286         regex_t re;
5287
5288         pattern = "^A";
5289
5290         if(regcomp(&re, pattern, 0)) {
5291                 return -1;
5292         }
5293         
5294         string = "ALL MATCH";
5295         
5296         rc = regexec(&re, string, 0, (void*)0, 0);
5297
5298         regfree(&re);
5299
5300         return rc;
5301 }
5302 EOF
5303 if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5304 then
5305   ol_cv_c_posix_regex=yes
5306 else
5307   echo "configure: failed program was:" >&5
5308   cat conftest.$ac_ext >&5
5309   rm -fr conftest*
5310   ol_cv_c_posix_regex=no
5311 fi
5312 rm -fr conftest*
5313 fi
5314
5315 fi
5316
5317 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5318
5319 if test "$ol_cv_c_posix_regex" = no ; then
5320         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5321 fi
5322
5323 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5324 echo "configure:5325: checking for res_search" >&5
5325 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328   cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331 /* System header to define __stub macros and hopefully few prototypes,
5332     which can conflict with char res_search(); below.  */
5333 #include <assert.h>
5334 /* Override any gcc2 internal prototype to avoid an error.  */
5335 /* We use char because int might match the return type of a gcc2
5336     builtin and then its argument prototype would still apply.  */
5337 char res_search();
5338
5339 int main() {
5340
5341 /* The GNU C library defines this for functions which it implements
5342     to always fail with ENOSYS.  Some functions are actually named
5343     something starting with __ and the normal name is an alias.  */
5344 #if defined (__stub_res_search) || defined (__stub___res_search)
5345 choke me
5346 #else
5347 res_search();
5348 #endif
5349
5350 ; return 0; }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5353   rm -rf conftest*
5354   eval "ac_cv_func_res_search=yes"
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -rf conftest*
5359   eval "ac_cv_func_res_search=no"
5360 fi
5361 rm -f conftest*
5362 fi
5363
5364 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5365   echo "$ac_t""yes" 1>&6
5366   :
5367 else
5368   echo "$ac_t""no" 1>&6
5369 fi
5370
5371 if test $ac_cv_func_res_search = no ; then 
5372         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5373 echo "configure:5374: checking for res_search in -lbind" >&5
5374 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
5375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   ac_save_LIBS="$LIBS"
5379 LIBS="-lbind  $LIBS"
5380 cat > conftest.$ac_ext <<EOF
5381 #line 5382 "configure"
5382 #include "confdefs.h"
5383 /* Override any gcc2 internal prototype to avoid an error.  */
5384 /* We use char because int might match the return type of a gcc2
5385     builtin and then its argument prototype would still apply.  */
5386 char res_search();
5387
5388 int main() {
5389 res_search()
5390 ; return 0; }
5391 EOF
5392 if { (eval echo configure:5393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5393   rm -rf conftest*
5394   eval "ac_cv_lib_$ac_lib_var=yes"
5395 else
5396   echo "configure: failed program was:" >&5
5397   cat conftest.$ac_ext >&5
5398   rm -rf conftest*
5399   eval "ac_cv_lib_$ac_lib_var=no"
5400 fi
5401 rm -f conftest*
5402 LIBS="$ac_save_LIBS"
5403
5404 fi
5405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5406   echo "$ac_t""yes" 1>&6
5407     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5408     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5409   cat >> confdefs.h <<EOF
5410 #define $ac_tr_lib 1
5411 EOF
5412
5413   LIBS="-lbind $LIBS"
5414
5415 else
5416   echo "$ac_t""no" 1>&6
5417 fi
5418
5419         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5420 fi
5421
5422 if test $ac_cv_func_res_search = no ; then 
5423         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5424 echo "configure:5425: checking for __res_search in -lbind" >&5
5425 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'`
5426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5427   echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429   ac_save_LIBS="$LIBS"
5430 LIBS="-lbind  $LIBS"
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 /* We use char because int might match the return type of a gcc2
5436     builtin and then its argument prototype would still apply.  */
5437 char __res_search();
5438
5439 int main() {
5440 __res_search()
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_lib_$ac_lib_var=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_lib_$ac_lib_var=no"
5451 fi
5452 rm -f conftest*
5453 LIBS="$ac_save_LIBS"
5454
5455 fi
5456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5457   echo "$ac_t""yes" 1>&6
5458     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5459     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5460   cat >> confdefs.h <<EOF
5461 #define $ac_tr_lib 1
5462 EOF
5463
5464   LIBS="-lbind $LIBS"
5465
5466 else
5467   echo "$ac_t""no" 1>&6
5468 fi
5469
5470         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5471 fi
5472
5473 if test $ac_cv_func_res_search = no ; then 
5474         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5475 echo "configure:5476: checking for res_search in -lresolv" >&5
5476 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5477 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5478   echo $ac_n "(cached) $ac_c" 1>&6
5479 else
5480   ac_save_LIBS="$LIBS"
5481 LIBS="-lresolv  $LIBS"
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* Override any gcc2 internal prototype to avoid an error.  */
5486 /* We use char because int might match the return type of a gcc2
5487     builtin and then its argument prototype would still apply.  */
5488 char res_search();
5489
5490 int main() {
5491 res_search()
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=yes"
5497 else
5498   echo "configure: failed program was:" >&5
5499   cat conftest.$ac_ext >&5
5500   rm -rf conftest*
5501   eval "ac_cv_lib_$ac_lib_var=no"
5502 fi
5503 rm -f conftest*
5504 LIBS="$ac_save_LIBS"
5505
5506 fi
5507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5510     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5511   cat >> confdefs.h <<EOF
5512 #define $ac_tr_lib 1
5513 EOF
5514
5515   LIBS="-lresolv $LIBS"
5516
5517 else
5518   echo "$ac_t""no" 1>&6
5519 fi
5520
5521         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5522 fi
5523
5524 if test "$ac_cv_func_res_search" = yes ; then
5525         cat >> confdefs.h <<\EOF
5526 #define HAVE_RES_SEARCH 1
5527 EOF
5528
5529 elif test $ol_enable_dns = yes ; then
5530         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5531 elif test $ol_enable_dns != no ; then
5532         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5533 fi
5534
5535
5536 ol_link_isode=no
5537 if test $ol_enable_ldapd != no ; then
5538         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5539
5540                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5541 echo "configure:5542: checking for main in -lxtpp" >&5
5542 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
5543 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5544   echo $ac_n "(cached) $ac_c" 1>&6
5545 else
5546   ac_save_LIBS="$LIBS"
5547 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5548 cat > conftest.$ac_ext <<EOF
5549 #line 5550 "configure"
5550 #include "confdefs.h"
5551
5552 int main() {
5553 main()
5554 ; return 0; }
5555 EOF
5556 if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5557   rm -rf conftest*
5558   eval "ac_cv_lib_$ac_lib_var=yes"
5559 else
5560   echo "configure: failed program was:" >&5
5561   cat conftest.$ac_ext >&5
5562   rm -rf conftest*
5563   eval "ac_cv_lib_$ac_lib_var=no"
5564 fi
5565 rm -f conftest*
5566 LIBS="$ac_save_LIBS"
5567
5568 fi
5569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5570   echo "$ac_t""yes" 1>&6
5571   
5572                 ol_link_isode=yes
5573                 cat >> confdefs.h <<\EOF
5574 #define HAVE_XTPP 1
5575 EOF
5576
5577                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5578                 
5579 else
5580   echo "$ac_t""no" 1>&6
5581 :
5582 fi
5583
5584         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5585 echo "configure:5586: checking for main in -ldsap" >&5
5586 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
5587 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5588   echo $ac_n "(cached) $ac_c" 1>&6
5589 else
5590   ac_save_LIBS="$LIBS"
5591 LIBS="-ldsap -lisode $LIBS"
5592 cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595
5596 int main() {
5597 main()
5598 ; return 0; }
5599 EOF
5600 if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5601   rm -rf conftest*
5602   eval "ac_cv_lib_$ac_lib_var=yes"
5603 else
5604   echo "configure: failed program was:" >&5
5605   cat conftest.$ac_ext >&5
5606   rm -rf conftest*
5607   eval "ac_cv_lib_$ac_lib_var=no"
5608 fi
5609 rm -f conftest*
5610 LIBS="$ac_save_LIBS"
5611
5612 fi
5613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5614   echo "$ac_t""yes" 1>&6
5615   
5616                 ol_link_isode=yes
5617                 cat >> confdefs.h <<\EOF
5618 #define HAVE_DSAP 1
5619 EOF
5620
5621                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5622                 
5623 else
5624   echo "$ac_t""no" 1>&6
5625 :
5626 fi
5627
5628         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5629 echo "configure:5630: checking for main in -lisode" >&5
5630 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
5631 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5632   echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634   ac_save_LIBS="$LIBS"
5635 LIBS="-lisode  $LIBS"
5636 cat > conftest.$ac_ext <<EOF
5637 #line 5638 "configure"
5638 #include "confdefs.h"
5639
5640 int main() {
5641 main()
5642 ; return 0; }
5643 EOF
5644 if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5645   rm -rf conftest*
5646   eval "ac_cv_lib_$ac_lib_var=yes"
5647 else
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650   rm -rf conftest*
5651   eval "ac_cv_lib_$ac_lib_var=no"
5652 fi
5653 rm -f conftest*
5654 LIBS="$ac_save_LIBS"
5655
5656 fi
5657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5658   echo "$ac_t""yes" 1>&6
5659   
5660                 ol_link_isode=yes
5661                 cat >> confdefs.h <<\EOF
5662 #define HAVE_ISODE 1
5663 EOF
5664
5665                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5666                 
5667 else
5668   echo "$ac_t""no" 1>&6
5669 :
5670 fi
5671
5672 fi
5673
5674 if test $ol_link_isode != no; then
5675         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5676 echo "configure:5677: checking for main in -lpp" >&5
5677 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
5678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5679   echo $ac_n "(cached) $ac_c" 1>&6
5680 else
5681   ac_save_LIBS="$LIBS"
5682 LIBS="-lpp  $LIBS"
5683 cat > conftest.$ac_ext <<EOF
5684 #line 5685 "configure"
5685 #include "confdefs.h"
5686
5687 int main() {
5688 main()
5689 ; return 0; }
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5692   rm -rf conftest*
5693   eval "ac_cv_lib_$ac_lib_var=yes"
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   eval "ac_cv_lib_$ac_lib_var=no"
5699 fi
5700 rm -f conftest*
5701 LIBS="$ac_save_LIBS"
5702
5703 fi
5704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5705   echo "$ac_t""yes" 1>&6
5706   
5707                 cat >> confdefs.h <<\EOF
5708 #define HAVE_PP 1
5709 EOF
5710
5711                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5712                 
5713 else
5714   echo "$ac_t""no" 1>&6
5715 :
5716 fi
5717
5718
5719         # Extract the first word of "pepsy", so it can be a program name with args.
5720 set dummy pepsy; ac_word=$2
5721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5722 echo "configure:5723: checking for $ac_word" >&5
5723 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
5724   echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726   case "$PEPSY" in
5727   /*)
5728   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5729   ;;
5730   ?:/*)                  
5731   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5732   ;;
5733   *)
5734   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5735   ac_dummy="$PATH"
5736   for ac_dir in $ac_dummy; do 
5737     test -z "$ac_dir" && ac_dir=.
5738     if test -f $ac_dir/$ac_word; then
5739       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5740       break
5741     fi
5742   done
5743   IFS="$ac_save_ifs"
5744   ;;
5745 esac
5746 fi
5747 PEPSY="$ac_cv_path_PEPSY"
5748 if test -n "$PEPSY"; then
5749   echo "$ac_t""$PEPSY" 1>&6
5750 else
5751   echo "$ac_t""no" 1>&6
5752 fi
5753
5754 fi
5755
5756 if test $ol_enable_quipu != no ; then
5757         for ac_hdr in quipu/commonarg.h
5758 do
5759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_hdr" >&5
5762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 #include <$ac_hdr>
5769 EOF
5770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5771 { (eval echo configure:5772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5773 if test -z "$ac_err"; then
5774   rm -rf conftest*
5775   eval "ac_cv_header_$ac_safe=yes"
5776 else
5777   echo "$ac_err" >&5
5778   echo "configure: failed program was:" >&5
5779   cat conftest.$ac_ext >&5
5780   rm -rf conftest*
5781   eval "ac_cv_header_$ac_safe=no"
5782 fi
5783 rm -f conftest*
5784 fi
5785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5786   echo "$ac_t""yes" 1>&6
5787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5788   cat >> confdefs.h <<EOF
5789 #define $ac_tr_hdr 1
5790 EOF
5791  
5792 else
5793   echo "$ac_t""no" 1>&6
5794 fi
5795 done
5796
5797
5798         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5799                 BUILD_QUIPU=yes
5800         elif test $ol_enable_quipu = auto ; then
5801                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5802         else
5803                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5804         fi
5805 fi
5806
5807 ol_link_kbind=no
5808 ol_link_kpasswd=no
5809 ol_link_krb5=no
5810 ol_link_krb4=no
5811
5812 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5813         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5814
5815         for ac_hdr in krb5.h
5816 do
5817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_hdr" >&5
5820 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 #include <$ac_hdr>
5827 EOF
5828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5829 { (eval echo configure:5830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5831 if test -z "$ac_err"; then
5832   rm -rf conftest*
5833   eval "ac_cv_header_$ac_safe=yes"
5834 else
5835   echo "$ac_err" >&5
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_header_$ac_safe=no"
5840 fi
5841 rm -f conftest*
5842 fi
5843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5844   echo "$ac_t""yes" 1>&6
5845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5846   cat >> confdefs.h <<EOF
5847 #define $ac_tr_hdr 1
5848 EOF
5849  
5850 else
5851   echo "$ac_t""no" 1>&6
5852 fi
5853 done
5854
5855
5856         if test $ac_cv_header_krb5_h = yes ; then
5857                                 for ac_hdr in heim_err.h
5858 do
5859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5861 echo "configure:5862: checking for $ac_hdr" >&5
5862 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5863   echo $ac_n "(cached) $ac_c" 1>&6
5864 else
5865   cat > conftest.$ac_ext <<EOF
5866 #line 5867 "configure"
5867 #include "confdefs.h"
5868 #include <$ac_hdr>
5869 EOF
5870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5871 { (eval echo configure:5872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5873 if test -z "$ac_err"; then
5874   rm -rf conftest*
5875   eval "ac_cv_header_$ac_safe=yes"
5876 else
5877   echo "$ac_err" >&5
5878   echo "configure: failed program was:" >&5
5879   cat conftest.$ac_ext >&5
5880   rm -rf conftest*
5881   eval "ac_cv_header_$ac_safe=no"
5882 fi
5883 rm -f conftest*
5884 fi
5885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5886   echo "$ac_t""yes" 1>&6
5887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5888   cat >> confdefs.h <<EOF
5889 #define $ac_tr_hdr 1
5890 EOF
5891  
5892 else
5893   echo "$ac_t""no" 1>&6
5894 fi
5895 done
5896
5897                 if test $ac_cv_header_heim_err_h = yes ; then
5898                         krb5_impl=heimdal
5899                 else
5900                         krb5_impl=mit
5901                 fi
5902
5903                 if test $krb5_impl = mit; then
5904                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5905 echo "configure:5906: checking for main in -lkrb5" >&5
5906 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
5907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5908   echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910   ac_save_LIBS="$LIBS"
5911 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5912 cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915
5916 int main() {
5917 main()
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   eval "ac_cv_lib_$ac_lib_var=yes"
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   eval "ac_cv_lib_$ac_lib_var=no"
5928 fi
5929 rm -f conftest*
5930 LIBS="$ac_save_LIBS"
5931
5932 fi
5933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5934   echo "$ac_t""yes" 1>&6
5935   have_krb5=yes
5936                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5937 else
5938   echo "$ac_t""no" 1>&6
5939 have_krb5=no
5940 fi
5941
5942
5943                 elif test $krb5_impl = heimdal; then
5944                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5945 echo "configure:5946: checking for main in -lkrb5" >&5
5946 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
5947 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5948   echo $ac_n "(cached) $ac_c" 1>&6
5949 else
5950   ac_save_LIBS="$LIBS"
5951 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955
5956 int main() {
5957 main()
5958 ; return 0; }
5959 EOF
5960 if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5961   rm -rf conftest*
5962   eval "ac_cv_lib_$ac_lib_var=yes"
5963 else
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   eval "ac_cv_lib_$ac_lib_var=no"
5968 fi
5969 rm -f conftest*
5970 LIBS="$ac_save_LIBS"
5971
5972 fi
5973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5974   echo "$ac_t""yes" 1>&6
5975   have_krb5=yes
5976                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5977 else
5978   echo "$ac_t""no" 1>&6
5979 have_krb5=no
5980 fi
5981
5982
5983                         cat >> confdefs.h <<\EOF
5984 #define HAVE_HEIMDAL_KERBEROS 1
5985 EOF
5986
5987                 else
5988                         have_krb5=no
5989                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5990                 fi
5991
5992                 if test $have_krb5 = yes ; then
5993                         ol_link_krb5=yes
5994
5995                         cat >> confdefs.h <<\EOF
5996 #define HAVE_KRB5 1
5997 EOF
5998
5999
6000                         if test $ol_enable_kpasswd != no ; then
6001                                 ol_link_kpasswd=yes;
6002                         fi
6003
6004                         if test $ol_with_kerberos = k5only ; then
6005                                 ol_with_kerberos=found
6006                         fi
6007
6008                 elif test $ol_with_kerberos != auto ; then
6009                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6010                 fi
6011
6012         fi
6013 fi
6014
6015 if test $ol_link_krb5 = yes -a \
6016         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6017
6018         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6019 do
6020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6022 echo "configure:6023: checking for $ac_hdr" >&5
6023 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6024   echo $ac_n "(cached) $ac_c" 1>&6
6025 else
6026   cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029 #include <$ac_hdr>
6030 EOF
6031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6032 { (eval echo configure:6033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6034 if test -z "$ac_err"; then
6035   rm -rf conftest*
6036   eval "ac_cv_header_$ac_safe=yes"
6037 else
6038   echo "$ac_err" >&5
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   eval "ac_cv_header_$ac_safe=no"
6043 fi
6044 rm -f conftest*
6045 fi
6046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6047   echo "$ac_t""yes" 1>&6
6048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6049   cat >> confdefs.h <<EOF
6050 #define $ac_tr_hdr 1
6051 EOF
6052  
6053 else
6054   echo "$ac_t""no" 1>&6
6055 fi
6056 done
6057
6058
6059         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6060                 if test $krb5_impl = mit; then
6061                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6062 echo "configure:6063: checking for main in -lkrb4" >&5
6063 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
6064 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6065   echo $ac_n "(cached) $ac_c" 1>&6
6066 else
6067   ac_save_LIBS="$LIBS"
6068 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6069 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072
6073 int main() {
6074 main()
6075 ; return 0; }
6076 EOF
6077 if { (eval echo configure:6078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6078   rm -rf conftest*
6079   eval "ac_cv_lib_$ac_lib_var=yes"
6080 else
6081   echo "configure: failed program was:" >&5
6082   cat conftest.$ac_ext >&5
6083   rm -rf conftest*
6084   eval "ac_cv_lib_$ac_lib_var=no"
6085 fi
6086 rm -f conftest*
6087 LIBS="$ac_save_LIBS"
6088
6089 fi
6090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6091   echo "$ac_t""yes" 1>&6
6092   have_k425=yes
6093                                 KRB4_LIBS="-lkrb4 -ldes425"
6094 else
6095   echo "$ac_t""no" 1>&6
6096 have_k425=no
6097 fi
6098
6099
6100                 elif test $krb5_impl = heimdal; then
6101                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6102 echo "configure:6103: checking for main in -lkrb4" >&5
6103 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
6104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6105   echo $ac_n "(cached) $ac_c" 1>&6
6106 else
6107   ac_save_LIBS="$LIBS"
6108 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6109 cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112
6113 int main() {
6114 main()
6115 ; return 0; }
6116 EOF
6117 if { (eval echo configure:6118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6118   rm -rf conftest*
6119   eval "ac_cv_lib_$ac_lib_var=yes"
6120 else
6121   echo "configure: failed program was:" >&5
6122   cat conftest.$ac_ext >&5
6123   rm -rf conftest*
6124   eval "ac_cv_lib_$ac_lib_var=no"
6125 fi
6126 rm -f conftest*
6127 LIBS="$ac_save_LIBS"
6128
6129 fi
6130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6131   echo "$ac_t""yes" 1>&6
6132   have_k425=yes
6133                                 KRB4_LIBS="-lkrb4"
6134 else
6135   echo "$ac_t""no" 1>&6
6136 have_k425=no
6137 fi
6138
6139
6140                 else
6141                         have_425=no
6142                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6143                 fi
6144
6145                 if test $have_k425 = yes ; then
6146                         ol_with_kerberos=found
6147                         ol_link_krb4=yes
6148
6149                         cat >> confdefs.h <<\EOF
6150 #define HAVE_KRB425 1
6151 EOF
6152
6153                         cat >> confdefs.h <<\EOF
6154 #define HAVE_KRB4 1
6155 EOF
6156
6157
6158                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6159 echo "configure:6160: checking for des_debug in Kerberos libraries" >&5
6160 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
6161   echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163   
6164                                                                 save_LIBS="$LIBS"
6165                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6166                                 cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169
6170 #include <kerberosIV/krb.h>
6171 #include <kerberosIV/des.h>
6172 extern int des_debug;
6173
6174 int main() {
6175
6176 des_debug = 1;
6177
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   ol_cv_var_des_debug=yes
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   ol_cv_var_des_debug=no
6188 fi
6189 rm -f conftest*
6190                                                                 LIBS="$save_LIBS"
6191                         
6192 fi
6193
6194 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6195
6196                         if test $ol_cv_var_des_debug = yes ; then
6197                                 cat >> confdefs.h <<\EOF
6198 #define HAVE_DES_DEBUG 1
6199 EOF
6200
6201                         fi
6202
6203                         LIBS="$save_LIBS"
6204                 fi
6205         fi
6206 fi
6207
6208 if test $ol_link_krb5 = yes ; then
6209         ol_with_kerberos=found
6210 fi
6211
6212 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6213         -o $ol_with_kerberos = kth ; then
6214
6215         for ac_hdr in krb.h des.h krb-archaeology.h 
6216 do
6217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6219 echo "configure:6220: checking for $ac_hdr" >&5
6220 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 #include <$ac_hdr>
6227 EOF
6228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6229 { (eval echo configure:6230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6231 if test -z "$ac_err"; then
6232   rm -rf conftest*
6233   eval "ac_cv_header_$ac_safe=yes"
6234 else
6235   echo "$ac_err" >&5
6236   echo "configure: failed program was:" >&5
6237   cat conftest.$ac_ext >&5
6238   rm -rf conftest*
6239   eval "ac_cv_header_$ac_safe=no"
6240 fi
6241 rm -f conftest*
6242 fi
6243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6244   echo "$ac_t""yes" 1>&6
6245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6246   cat >> confdefs.h <<EOF
6247 #define $ac_tr_hdr 1
6248 EOF
6249  
6250 else
6251   echo "$ac_t""no" 1>&6
6252 fi
6253 done
6254
6255
6256         if test $ac_cv_header_krb_h = yes ; then
6257                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6258 echo "configure:6259: checking for main in -lkrb" >&5
6259 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
6260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6261   echo $ac_n "(cached) $ac_c" 1>&6
6262 else
6263   ac_save_LIBS="$LIBS"
6264 LIBS="-lkrb -ldes $LIBS"
6265 cat > conftest.$ac_ext <<EOF
6266 #line 6267 "configure"
6267 #include "confdefs.h"
6268
6269 int main() {
6270 main()
6271 ; return 0; }
6272 EOF
6273 if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6274   rm -rf conftest*
6275   eval "ac_cv_lib_$ac_lib_var=yes"
6276 else
6277   echo "configure: failed program was:" >&5
6278   cat conftest.$ac_ext >&5
6279   rm -rf conftest*
6280   eval "ac_cv_lib_$ac_lib_var=no"
6281 fi
6282 rm -f conftest*
6283 LIBS="$ac_save_LIBS"
6284
6285 fi
6286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6287   echo "$ac_t""yes" 1>&6
6288   have_k4=yes
6289 else
6290   echo "$ac_t""no" 1>&6
6291 have_k4=no
6292 fi
6293
6294
6295                 if test $have_k4 = yes ; then
6296                         ol_with_kerberos=found
6297                         ol_link_krb4=yes
6298
6299                         cat >> confdefs.h <<\EOF
6300 #define HAVE_KRB4 1
6301 EOF
6302
6303
6304                         KRB4_LIBS="-lkrb -ldes"
6305
6306                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6307                                 cat >> confdefs.h <<\EOF
6308 #define HAVE_KTH_KERBEROS 1
6309 EOF
6310
6311                         fi
6312                 fi
6313         fi
6314 fi
6315
6316 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6317         ol_link_kpasswd=yes;
6318 fi
6319
6320 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6321         cat >> confdefs.h <<\EOF
6322 #define HAVE_KERBEROS 1
6323 EOF
6324
6325
6326 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6327         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6328 fi
6329
6330 ol_link_tls=no
6331 if test $ol_with_tls != no ; then
6332         
6333         for ac_hdr in openssl/ssl.h ssl.h
6334 do
6335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6337 echo "configure:6338: checking for $ac_hdr" >&5
6338 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6339   echo $ac_n "(cached) $ac_c" 1>&6
6340 else
6341   cat > conftest.$ac_ext <<EOF
6342 #line 6343 "configure"
6343 #include "confdefs.h"
6344 #include <$ac_hdr>
6345 EOF
6346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6347 { (eval echo configure:6348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6349 if test -z "$ac_err"; then
6350   rm -rf conftest*
6351   eval "ac_cv_header_$ac_safe=yes"
6352 else
6353   echo "$ac_err" >&5
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -rf conftest*
6357   eval "ac_cv_header_$ac_safe=no"
6358 fi
6359 rm -f conftest*
6360 fi
6361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6362   echo "$ac_t""yes" 1>&6
6363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6364   cat >> confdefs.h <<EOF
6365 #define $ac_tr_hdr 1
6366 EOF
6367  
6368 else
6369   echo "$ac_t""no" 1>&6
6370 fi
6371 done
6372
6373         
6374         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6375                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6376 echo "configure:6377: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6377 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
6378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6379   echo $ac_n "(cached) $ac_c" 1>&6
6380 else
6381   ac_save_LIBS="$LIBS"
6382 LIBS="-lssl -lcrypto $LIBS"
6383 cat > conftest.$ac_ext <<EOF
6384 #line 6385 "configure"
6385 #include "confdefs.h"
6386 /* Override any gcc2 internal prototype to avoid an error.  */
6387 /* We use char because int might match the return type of a gcc2
6388     builtin and then its argument prototype would still apply.  */
6389 char SSLeay_add_ssl_algorithms();
6390
6391 int main() {
6392 SSLeay_add_ssl_algorithms()
6393 ; return 0; }
6394 EOF
6395 if { (eval echo configure:6396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6396   rm -rf conftest*
6397   eval "ac_cv_lib_$ac_lib_var=yes"
6398 else
6399   echo "configure: failed program was:" >&5
6400   cat conftest.$ac_ext >&5
6401   rm -rf conftest*
6402   eval "ac_cv_lib_$ac_lib_var=no"
6403 fi
6404 rm -f conftest*
6405 LIBS="$ac_save_LIBS"
6406
6407 fi
6408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6409   echo "$ac_t""yes" 1>&6
6410   have_ssleay=yes
6411                         need_rsaref=no
6412 else
6413   echo "$ac_t""no" 1>&6
6414 have_ssleay=no
6415 fi
6416
6417                         
6418                 if test $have_ssleay = no ; then
6419                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6420 echo "configure:6421: checking for SSL_library_init in -lssl" >&5
6421 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
6422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6423   echo $ac_n "(cached) $ac_c" 1>&6
6424 else
6425   ac_save_LIBS="$LIBS"
6426 LIBS="-lssl -lcrypto $LIBS"
6427 cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 /* Override any gcc2 internal prototype to avoid an error.  */
6431 /* We use char because int might match the return type of a gcc2
6432     builtin and then its argument prototype would still apply.  */
6433 char SSL_library_init();
6434
6435 int main() {
6436 SSL_library_init()
6437 ; return 0; }
6438 EOF
6439 if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440   rm -rf conftest*
6441   eval "ac_cv_lib_$ac_lib_var=yes"
6442 else
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445   rm -rf conftest*
6446   eval "ac_cv_lib_$ac_lib_var=no"
6447 fi
6448 rm -f conftest*
6449 LIBS="$ac_save_LIBS"
6450
6451 fi
6452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6453   echo "$ac_t""yes" 1>&6
6454   have_ssleay=yes
6455                                 need_rsaref=no
6456 else
6457   echo "$ac_t""no" 1>&6
6458 have_ssleay=no
6459 fi
6460
6461                 fi
6462
6463                 if test $have_ssleay = no ; then
6464                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6465 echo "configure:6466: checking for ssl3_accept in -lssl" >&5
6466 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
6467 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   ac_save_LIBS="$LIBS"
6471 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6472 cat > conftest.$ac_ext <<EOF
6473 #line 6474 "configure"
6474 #include "confdefs.h"
6475 /* Override any gcc2 internal prototype to avoid an error.  */
6476 /* We use char because int might match the return type of a gcc2
6477     builtin and then its argument prototype would still apply.  */
6478 char ssl3_accept();
6479
6480 int main() {
6481 ssl3_accept()
6482 ; return 0; }
6483 EOF
6484 if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6485   rm -rf conftest*
6486   eval "ac_cv_lib_$ac_lib_var=yes"
6487 else
6488   echo "configure: failed program was:" >&5
6489   cat conftest.$ac_ext >&5
6490   rm -rf conftest*
6491   eval "ac_cv_lib_$ac_lib_var=no"
6492 fi
6493 rm -f conftest*
6494 LIBS="$ac_save_LIBS"
6495
6496 fi
6497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6498   echo "$ac_t""yes" 1>&6
6499   have_ssleay=yes
6500                                 need_rsaref=yes
6501 else
6502   echo "$ac_t""no" 1>&6
6503 have_ssleay=no
6504 fi
6505
6506                 fi
6507
6508                 if test $have_ssleay = yes ; then
6509                         ol_with_tls=found
6510                         ol_link_tls=yes
6511
6512                         cat >> confdefs.h <<\EOF
6513 #define HAVE_SSLEAY 1
6514 EOF
6515
6516
6517                         if test $need_rsaref = yes; then
6518                                 cat >> confdefs.h <<\EOF
6519 #define HAVE_RSAREF 1
6520 EOF
6521
6522
6523                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6524                         else
6525                                 TLS_LIBS="-lssl -lcrypto"
6526                         fi
6527                 fi
6528         fi
6529 fi
6530
6531 if test $ol_link_tls = yes ; then
6532         cat >> confdefs.h <<\EOF
6533 #define HAVE_TLS 1
6534 EOF
6535
6536 fi      
6537
6538 for ac_func in \
6539         ctime_r                 \
6540         gethostbyname_r gethostbyaddr_r \
6541
6542 do
6543 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6544 echo "configure:6545: checking for $ac_func" >&5
6545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6546   echo $ac_n "(cached) $ac_c" 1>&6
6547 else
6548   cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 /* System header to define __stub macros and hopefully few prototypes,
6552     which can conflict with char $ac_func(); below.  */
6553 #include <assert.h>
6554 /* Override any gcc2 internal prototype to avoid an error.  */
6555 /* We use char because int might match the return type of a gcc2
6556     builtin and then its argument prototype would still apply.  */
6557 char $ac_func();
6558
6559 int main() {
6560
6561 /* The GNU C library defines this for functions which it implements
6562     to always fail with ENOSYS.  Some functions are actually named
6563     something starting with __ and the normal name is an alias.  */
6564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6565 choke me
6566 #else
6567 $ac_func();
6568 #endif
6569
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6573   rm -rf conftest*
6574   eval "ac_cv_func_$ac_func=yes"
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   eval "ac_cv_func_$ac_func=no"
6580 fi
6581 rm -f conftest*
6582 fi
6583
6584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6585   echo "$ac_t""yes" 1>&6
6586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6587   cat >> confdefs.h <<EOF
6588 #define $ac_tr_func 1
6589 EOF
6590  
6591 else
6592   echo "$ac_t""no" 1>&6
6593 fi
6594 done
6595
6596
6597 if test "$ac_cv_func_ctime_r" = no ; then
6598         ol_cv_func_ctime_r_nargs=0
6599 else
6600         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6601 echo "configure:6602: checking number of arguments of ctime_r" >&5
6602 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 #include <time.h>
6609 int main() {
6610 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6614   rm -rf conftest*
6615   ol_cv_func_ctime_r_nargs3=yes
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   ol_cv_func_ctime_r_nargs3=no
6621 fi
6622 rm -f conftest*
6623
6624         cat > conftest.$ac_ext <<EOF
6625 #line 6626 "configure"
6626 #include "confdefs.h"
6627 #include <time.h>
6628 int main() {
6629 time_t ti; char *buffer; ctime_r(&ti,buffer);
6630 ; return 0; }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6633   rm -rf conftest*
6634   ol_cv_func_ctime_r_nargs2=yes
6635 else
6636   echo "configure: failed program was:" >&5
6637   cat conftest.$ac_ext >&5
6638   rm -rf conftest*
6639   ol_cv_func_ctime_r_nargs2=no
6640 fi
6641 rm -f conftest*
6642
6643         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6644                 $ol_cv_func_ctime_r_nargs2 = no ; then
6645
6646                 ol_cv_func_ctime_r_nargs=3
6647
6648         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6649                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6650
6651                 ol_cv_func_ctime_r_nargs=2
6652
6653         else
6654                 ol_cv_func_ctime_r_nargs=0
6655         fi
6656   
6657 fi
6658
6659 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6660
6661   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6662         cat >> confdefs.h <<EOF
6663 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6664 EOF
6665
6666   fi
6667
6668 fi
6669
6670 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6671         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6672 echo "configure:6673: checking number of arguments of gethostbyname_r" >&5
6673 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
6674   echo $ac_n "(cached) $ac_c" 1>&6
6675 else
6676   cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679 #include <sys/types.h>
6680 #include <sys/socket.h>
6681 #include <netinet/in.h>
6682 #include <netdb.h>
6683 #define BUFSIZE (sizeof(struct hostent)+10)
6684 int main() {
6685 struct hostent hent; char buffer[BUFSIZE];
6686                 int bufsize=BUFSIZE;int h_errno;
6687                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6688                         buffer, bufsize, &h_errno);
6689 ; return 0; }
6690 EOF
6691 if { (eval echo configure:6692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6692   rm -rf conftest*
6693   ol_cv_func_gethostbyname_r_nargs5=yes
6694 else
6695   echo "configure: failed program was:" >&5
6696   cat conftest.$ac_ext >&5
6697   rm -rf conftest*
6698   ol_cv_func_gethostbyname_r_nargs5=no
6699 fi
6700 rm -f conftest*
6701
6702         cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705 #include <sys/types.h>
6706 #include <sys/socket.h>
6707 #include <netinet/in.h>
6708 #include <netdb.h>
6709 #define BUFSIZE (sizeof(struct hostent)+10)
6710 int main() {
6711 struct hostent hent;struct hostent *rhent;
6712                 char buffer[BUFSIZE];
6713                 int bufsize=BUFSIZE;int h_errno;
6714                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6715                         &rhent, &h_errno);
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6719   rm -rf conftest*
6720   ol_cv_func_gethostbyname_r_nargs6=yes
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   ol_cv_func_gethostbyname_r_nargs6=no
6726 fi
6727 rm -f conftest*
6728
6729         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6730                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6731
6732                 ol_cv_func_gethostbyname_r_nargs=5
6733
6734         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6735                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6736
6737                 ol_cv_func_gethostbyname_r_nargs=6
6738
6739         else
6740                 ol_cv_func_gethostbyname_r_nargs=0
6741         fi
6742   
6743 fi
6744
6745 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6746   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6747         cat >> confdefs.h <<EOF
6748 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6749 EOF
6750
6751   fi
6752
6753 else
6754         ol_cv_func_gethostbyname_r_nargs=0
6755 fi
6756  
6757 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6758         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6759 echo "configure:6760: checking number of arguments of gethostbyaddr_r" >&5
6760 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
6761   echo $ac_n "(cached) $ac_c" 1>&6
6762 else
6763   cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 #include <sys/types.h>
6767 #include <sys/socket.h>
6768 #include <netinet/in.h>
6769 #include <netdb.h>
6770 #define BUFSIZE (sizeof(struct hostent)+10)
6771 int main() {
6772 struct hostent hent; char buffer[BUFSIZE]; 
6773             struct in_addr add;
6774             size_t alen=sizeof(struct in_addr);
6775             int bufsize=BUFSIZE;int h_errno;
6776                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6777                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6778 ; return 0; }
6779 EOF
6780 if { (eval echo configure:6781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6781   rm -rf conftest*
6782   ol_cv_func_gethostbyaddr_r_nargs7=yes
6783 else
6784   echo "configure: failed program was:" >&5
6785   cat conftest.$ac_ext >&5
6786   rm -rf conftest*
6787   ol_cv_func_gethostbyaddr_r_nargs7=no
6788 fi
6789 rm -f conftest*
6790
6791         cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794 #include <sys/types.h>
6795 #include <sys/socket.h>
6796 #include <netinet/in.h>
6797 #include <netdb.h>
6798 #define BUFSIZE (sizeof(struct hostent)+10)
6799 int main() {
6800 struct hostent hent;
6801                 struct hostent *rhent; char buffer[BUFSIZE]; 
6802                 struct in_addr add;
6803                 size_t alen=sizeof(struct in_addr);
6804                 int bufsize=BUFSIZE;int h_errno;
6805                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6806                         alen, AF_INET, &hent, buffer, bufsize, 
6807                         &rhent, &h_errno);
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6811   rm -rf conftest*
6812   ol_cv_func_gethostbyaddr_r_nargs8=yes
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   ol_cv_func_gethostbyaddr_r_nargs8=no
6818 fi
6819 rm -f conftest*
6820
6821         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6822                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6823
6824                 ol_cv_func_gethostbyaddr_r_nargs=7
6825
6826         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6827                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6828
6829                 ol_cv_func_gethostbyaddr_r_nargs=8
6830
6831         else
6832                 ol_cv_func_gethostbyaddr_r_nargs=0
6833         fi
6834   
6835 fi
6836
6837 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6838   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6839     cat >> confdefs.h <<EOF
6840 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6841 EOF
6842
6843   fi
6844
6845 else
6846         ol_cv_func_gethostbyaddr_r_nargs=0
6847 fi
6848
6849 if test "$ac_cv_func_ctime_r" = yes \
6850         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6851         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6852         -a "$ac_cv_func_gethostbyname_r" = yes \
6853         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6854         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6855         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6856         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6857         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6858         ; then
6859  
6860         cat >> confdefs.h <<\EOF
6861 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6862 EOF
6863
6864 fi
6865
6866 ol_link_threads=no
6867
6868 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6869         -o $ol_with_threads = nt ; then
6870
6871         
6872         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6873 echo "configure:6874: checking for NT Threads" >&5
6874 if eval "test \"`echo '$''{'ol_cv_nt_threads'+set}'`\" = set"; then
6875   echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877   
6878                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6879 echo "configure:6880: checking for _beginthread" >&5
6880 if eval "test \"`echo '$''{'ac_cv_func__beginthread'+set}'`\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 /* System header to define __stub macros and hopefully few prototypes,
6887     which can conflict with char _beginthread(); below.  */
6888 #include <assert.h>
6889 /* Override any gcc2 internal prototype to avoid an error.  */
6890 /* We use char because int might match the return type of a gcc2
6891     builtin and then its argument prototype would still apply.  */
6892 char _beginthread();
6893
6894 int main() {
6895
6896 /* The GNU C library defines this for functions which it implements
6897     to always fail with ENOSYS.  Some functions are actually named
6898     something starting with __ and the normal name is an alias.  */
6899 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6900 choke me
6901 #else
6902 _beginthread();
6903 #endif
6904
6905 ; return 0; }
6906 EOF
6907 if { (eval echo configure:6908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6908   rm -rf conftest*
6909   eval "ac_cv_func__beginthread=yes"
6910 else
6911   echo "configure: failed program was:" >&5
6912   cat conftest.$ac_ext >&5
6913   rm -rf conftest*
6914   eval "ac_cv_func__beginthread=no"
6915 fi
6916 rm -f conftest*
6917 fi
6918
6919 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6920   echo "$ac_t""yes" 1>&6
6921   ol_cv_nt_threads=yes
6922 else
6923   echo "$ac_t""no" 1>&6
6924 ol_cv_nt_threads=no
6925 fi
6926
6927         
6928 fi
6929
6930 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6931
6932         if test $ol_cv_nt_threads = yes ; then
6933                 cat >> confdefs.h <<\EOF
6934 #define HAVE_NT_THREADS 1
6935 EOF
6936
6937         fi
6938
6939
6940         if test "$ol_cv_nt_threads" = yes ; then
6941         ol_link_threads=nt
6942         ol_with_threads=found
6943         ol_with_yielding_select=yes
6944
6945                 cat >> confdefs.h <<\EOF
6946 #define HAVE_NT_SERVICE_MANAGER 1
6947 EOF
6948
6949                 cat >> confdefs.h <<\EOF
6950 #define HAVE_NT_EVENT_LOG 1
6951 EOF
6952
6953         fi
6954
6955         if test $ol_with_threads = nt ; then
6956                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6957         fi
6958 fi
6959
6960 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6961         -o $ol_with_threads = posix ; then
6962
6963         for ac_hdr in pthread.h
6964 do
6965 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6966 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6967 echo "configure:6968: checking for $ac_hdr" >&5
6968 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 #include <$ac_hdr>
6975 EOF
6976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6977 { (eval echo configure:6978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6979 if test -z "$ac_err"; then
6980   rm -rf conftest*
6981   eval "ac_cv_header_$ac_safe=yes"
6982 else
6983   echo "$ac_err" >&5
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   eval "ac_cv_header_$ac_safe=no"
6988 fi
6989 rm -f conftest*
6990 fi
6991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6992   echo "$ac_t""yes" 1>&6
6993     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6994   cat >> confdefs.h <<EOF
6995 #define $ac_tr_hdr 1
6996 EOF
6997  
6998 else
6999   echo "$ac_t""no" 1>&6
7000 fi
7001 done
7002
7003
7004         if test $ac_cv_header_pthread_h = yes ; then
7005                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7006 echo "configure:7007: checking POSIX thread version" >&5
7007 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
7008   echo $ac_n "(cached) $ac_c" 1>&6
7009 else
7010   
7011         cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014
7015 #               include <pthread.h>
7016                 /* this check could be improved */
7017 #               ifdef PTHREAD_ONCE_INIT
7018                         pthread_version_final;
7019 #               endif
7020         
7021 EOF
7022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7023   egrep "pthread_version_final" >/dev/null 2>&1; then
7024   rm -rf conftest*
7025   ol_pthread_final=yes
7026 else
7027   rm -rf conftest*
7028   ol_pthread_final=no
7029 fi
7030 rm -f conftest*
7031
7032
7033         cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036
7037 #               include <pthread.h>
7038                 /* this check could be improved */
7039 #               ifdef pthread_once_init
7040                         pthread_version_draft4;
7041 #               endif
7042         
7043 EOF
7044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7045   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7046   rm -rf conftest*
7047   ol_pthread_draft4=yes
7048 else
7049   rm -rf conftest*
7050   ol_pthread_draft4=no
7051 fi
7052 rm -f conftest*
7053
7054
7055         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7056                 ol_cv_pthread_version=final
7057         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7058                 ol_cv_pthread_version=draft4
7059         else
7060                 ol_cv_pthread_version=unknown
7061         fi
7062
7063 fi
7064
7065 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7066
7067
7068                 if test $ol_cv_pthread_version = final ; then
7069                         cat >> confdefs.h <<\EOF
7070 #define HAVE_PTHREADS_FINAL 1
7071 EOF
7072
7073                 elif test $ol_cv_pthread_version = draft4 ; then
7074                         cat >> confdefs.h <<\EOF
7075 #define HAVE_PTHREADS_D4 1
7076 EOF
7077
7078                 else
7079                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7080                 fi
7081
7082                 # consider threads found
7083                 ol_with_threads=found
7084
7085                 
7086         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7087 echo "configure:7088: checking for LinuxThreads pthread.h" >&5
7088 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7089   echo $ac_n "(cached) $ac_c" 1>&6
7090 else
7091   cat > conftest.$ac_ext <<EOF
7092 #line 7093 "configure"
7093 #include "confdefs.h"
7094 #include <pthread.h>
7095 EOF
7096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7097   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7098   rm -rf conftest*
7099   ol_cv_header_linux_threads=yes
7100 else
7101   rm -rf conftest*
7102   ol_cv_header_linux_threads=no
7103 fi
7104 rm -f conftest*
7105
7106                 
7107 fi
7108
7109 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7110         if test $ol_cv_header_linux_threads = yes; then
7111                 cat >> confdefs.h <<\EOF
7112 #define HAVE_LINUX_THREADS 1
7113 EOF
7114
7115         fi
7116
7117                 
7118         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7119 echo "configure:7120: checking for GNU Pth pthread.h" >&5
7120 if eval "test \"`echo '$''{'ol_cv_header_gnu_pth_pthread_h'+set}'`\" = set"; then
7121   echo $ac_n "(cached) $ac_c" 1>&6
7122 else
7123   cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 #include <pthread.h>
7127 #ifdef _POSIX_THREAD_IS_GNU_PTH
7128         __gnu_pth__;
7129 #endif
7130
7131 EOF
7132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7133   egrep "__gnu_pth__" >/dev/null 2>&1; then
7134   rm -rf conftest*
7135   ol_cv_header_gnu_pth_pthread_h=yes
7136 else
7137   rm -rf conftest*
7138   ol_cv_header_gnu_pth_pthread_h=no
7139 fi
7140 rm -f conftest*
7141
7142                 
7143 fi
7144
7145 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7146
7147
7148                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7149                         for ac_hdr in sched.h
7150 do
7151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7153 echo "configure:7154: checking for $ac_hdr" >&5
7154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7155   echo $ac_n "(cached) $ac_c" 1>&6
7156 else
7157   cat > conftest.$ac_ext <<EOF
7158 #line 7159 "configure"
7159 #include "confdefs.h"
7160 #include <$ac_hdr>
7161 EOF
7162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7163 { (eval echo configure:7164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7165 if test -z "$ac_err"; then
7166   rm -rf conftest*
7167   eval "ac_cv_header_$ac_safe=yes"
7168 else
7169   echo "$ac_err" >&5
7170   echo "configure: failed program was:" >&5
7171   cat conftest.$ac_ext >&5
7172   rm -rf conftest*
7173   eval "ac_cv_header_$ac_safe=no"
7174 fi
7175 rm -f conftest*
7176 fi
7177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7178   echo "$ac_t""yes" 1>&6
7179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7180   cat >> confdefs.h <<EOF
7181 #define $ac_tr_hdr 1
7182 EOF
7183  
7184 else
7185   echo "$ac_t""no" 1>&6
7186 fi
7187 done
7188
7189                 fi
7190
7191                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7192                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7193 echo "configure:7194: checking for pthread_create in default libraries" >&5
7194 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   
7198                 if test "$cross_compiling" = yes; then
7199   cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202 /* pthread test headers */
7203 #include <pthread.h>
7204 #ifndef NULL
7205 #define NULL (void*)0
7206 #endif
7207
7208 static void *task(p)
7209         void *p;
7210 {
7211         return (void *) (p == NULL);
7212 }
7213
7214 int main() {
7215
7216         /* pthread test function */
7217         pthread_t t;
7218         int status;
7219
7220         /* make sure pthread_create() isn't just a stub */
7221 #if HAVE_PTHREADS_D4
7222         status = pthread_create(&t, pthread_attr_default, task, NULL);
7223 #else
7224         status = pthread_create(&t, NULL, task, NULL);
7225 #endif
7226
7227         if( status ) exit( status );
7228
7229         /* make sure pthread_detach() isn't just a stub */
7230 #if HAVE_PTHREADS_D4
7231         status = pthread_detach( &t );
7232 #else
7233         status = pthread_detach( t );
7234 #endif
7235
7236 #ifdef HAVE_LINUX_THREADS
7237         pthread_kill_other_threads_np();
7238 #endif
7239
7240         exit( status );
7241
7242 ; return 0; }
7243 EOF
7244 if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7245   rm -rf conftest*
7246   ol_cv_pthread_create=yes
7247 else
7248   echo "configure: failed program was:" >&5
7249   cat conftest.$ac_ext >&5
7250   rm -rf conftest*
7251   ol_cv_pthread_create=no
7252 fi
7253 rm -f conftest*
7254 else
7255   cat > conftest.$ac_ext <<EOF
7256 #line 7257 "configure"
7257 #include "confdefs.h"
7258 /* pthread test headers */
7259 #include <pthread.h>
7260 #ifndef NULL
7261 #define NULL (void*)0
7262 #endif
7263
7264 static void *task(p)
7265         void *p;
7266 {
7267         return (void *) (p == NULL);
7268 }
7269
7270
7271 int main(argc, argv)
7272         int argc;
7273         char **argv;
7274 {
7275
7276         /* pthread test function */
7277         pthread_t t;
7278         int status;
7279
7280         /* make sure pthread_create() isn't just a stub */
7281 #if HAVE_PTHREADS_D4
7282         status = pthread_create(&t, pthread_attr_default, task, NULL);
7283 #else
7284         status = pthread_create(&t, NULL, task, NULL);
7285 #endif
7286
7287         if( status ) exit( status );
7288
7289         /* make sure pthread_detach() isn't just a stub */
7290 #if HAVE_PTHREADS_D4
7291         status = pthread_detach( &t );
7292 #else
7293         status = pthread_detach( t );
7294 #endif
7295
7296 #ifdef HAVE_LINUX_THREADS
7297         pthread_kill_other_threads_np();
7298 #endif
7299
7300         exit( status );
7301
7302 }
7303
7304 EOF
7305 if { (eval echo configure:7306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7306 then
7307   ol_cv_pthread_create=yes
7308 else
7309   echo "configure: failed program was:" >&5
7310   cat conftest.$ac_ext >&5
7311   rm -fr conftest*
7312   ol_cv_pthread_create=no
7313 fi
7314 rm -fr conftest*
7315 fi
7316
7317 fi
7318
7319 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7320
7321                 if test $ol_cv_pthread_create != no ; then
7322                         ol_link_threads=posix
7323                         ol_link_pthreads=""
7324                 fi
7325                 
7326                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7327 if test "$ol_link_threads" = no ; then
7328         # try -kthread
7329         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7330 echo "configure:7331: checking for pthread link with -kthread" >&5
7331 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
7332   echo $ac_n "(cached) $ac_c" 1>&6
7333 else
7334   
7335                 # save the flags
7336                 ol_LIBS="$LIBS"
7337                 LIBS="-kthread $LIBS"
7338
7339                 if test "$cross_compiling" = yes; then
7340   cat > conftest.$ac_ext <<EOF
7341 #line 7342 "configure"
7342 #include "confdefs.h"
7343 /* pthread test headers */
7344 #include <pthread.h>
7345 #ifndef NULL
7346 #define NULL (void*)0
7347 #endif
7348
7349 static void *task(p)
7350         void *p;
7351 {
7352         return (void *) (p == NULL);
7353 }
7354
7355 int main() {
7356
7357         /* pthread test function */
7358         pthread_t t;
7359         int status;
7360
7361         /* make sure pthread_create() isn't just a stub */
7362 #if HAVE_PTHREADS_D4
7363         status = pthread_create(&t, pthread_attr_default, task, NULL);
7364 #else
7365         status = pthread_create(&t, NULL, task, NULL);
7366 #endif
7367
7368         if( status ) exit( status );
7369
7370         /* make sure pthread_detach() isn't just a stub */
7371 #if HAVE_PTHREADS_D4
7372         status = pthread_detach( &t );
7373 #else
7374         status = pthread_detach( t );
7375 #endif
7376
7377 #ifdef HAVE_LINUX_THREADS
7378         pthread_kill_other_threads_np();
7379 #endif
7380
7381         exit( status );
7382
7383 ; return 0; }
7384 EOF
7385 if { (eval echo configure:7386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7386   rm -rf conftest*
7387   ol_cv_pthread_kthread=yes
7388 else
7389   echo "configure: failed program was:" >&5
7390   cat conftest.$ac_ext >&5
7391   rm -rf conftest*
7392   ol_cv_pthread_kthread=no
7393 fi
7394 rm -f conftest*
7395 else
7396   cat > conftest.$ac_ext <<EOF
7397 #line 7398 "configure"
7398 #include "confdefs.h"
7399 /* pthread test headers */
7400 #include <pthread.h>
7401 #ifndef NULL
7402 #define NULL (void*)0
7403 #endif
7404
7405 static void *task(p)
7406         void *p;
7407 {
7408         return (void *) (p == NULL);
7409 }
7410
7411
7412 int main(argc, argv)
7413         int argc;
7414         char **argv;
7415 {
7416
7417         /* pthread test function */
7418         pthread_t t;
7419         int status;
7420
7421         /* make sure pthread_create() isn't just a stub */
7422 #if HAVE_PTHREADS_D4
7423         status = pthread_create(&t, pthread_attr_default, task, NULL);
7424 #else
7425         status = pthread_create(&t, NULL, task, NULL);
7426 #endif
7427
7428         if( status ) exit( status );
7429
7430         /* make sure pthread_detach() isn't just a stub */
7431 #if HAVE_PTHREADS_D4
7432         status = pthread_detach( &t );
7433 #else
7434         status = pthread_detach( t );
7435 #endif
7436
7437 #ifdef HAVE_LINUX_THREADS
7438         pthread_kill_other_threads_np();
7439 #endif
7440
7441         exit( status );
7442
7443 }
7444
7445 EOF
7446 if { (eval echo configure:7447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7447 then
7448   ol_cv_pthread_kthread=yes
7449 else
7450   echo "configure: failed program was:" >&5
7451   cat conftest.$ac_ext >&5
7452   rm -fr conftest*
7453   ol_cv_pthread_kthread=no
7454 fi
7455 rm -fr conftest*
7456 fi
7457
7458
7459                 # restore the LIBS
7460                 LIBS="$ol_LIBS"
7461         
7462 fi
7463
7464 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7465
7466         if test $ol_cv_pthread_kthread = yes ; then
7467                 ol_link_pthreads="-kthread"
7468                 ol_link_threads=posix
7469         fi
7470 fi
7471
7472                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7473 if test "$ol_link_threads" = no ; then
7474         # try -pthread
7475         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7476 echo "configure:7477: checking for pthread link with -pthread" >&5
7477 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
7478   echo $ac_n "(cached) $ac_c" 1>&6
7479 else
7480   
7481                 # save the flags
7482                 ol_LIBS="$LIBS"
7483                 LIBS="-pthread $LIBS"
7484
7485                 if test "$cross_compiling" = yes; then
7486   cat > conftest.$ac_ext <<EOF
7487 #line 7488 "configure"
7488 #include "confdefs.h"
7489 /* pthread test headers */
7490 #include <pthread.h>
7491 #ifndef NULL
7492 #define NULL (void*)0
7493 #endif
7494
7495 static void *task(p)
7496         void *p;
7497 {
7498         return (void *) (p == NULL);
7499 }
7500
7501 int main() {
7502
7503         /* pthread test function */
7504         pthread_t t;
7505         int status;
7506
7507         /* make sure pthread_create() isn't just a stub */
7508 #if HAVE_PTHREADS_D4
7509         status = pthread_create(&t, pthread_attr_default, task, NULL);
7510 #else
7511         status = pthread_create(&t, NULL, task, NULL);
7512 #endif
7513
7514         if( status ) exit( status );
7515
7516         /* make sure pthread_detach() isn't just a stub */
7517 #if HAVE_PTHREADS_D4
7518         status = pthread_detach( &t );
7519 #else
7520         status = pthread_detach( t );
7521 #endif
7522
7523 #ifdef HAVE_LINUX_THREADS
7524         pthread_kill_other_threads_np();
7525 #endif
7526
7527         exit( status );
7528
7529 ; return 0; }
7530 EOF
7531 if { (eval echo configure:7532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7532   rm -rf conftest*
7533   ol_cv_pthread_pthread=yes
7534 else
7535   echo "configure: failed program was:" >&5
7536   cat conftest.$ac_ext >&5
7537   rm -rf conftest*
7538   ol_cv_pthread_pthread=no
7539 fi
7540 rm -f conftest*
7541 else
7542   cat > conftest.$ac_ext <<EOF
7543 #line 7544 "configure"
7544 #include "confdefs.h"
7545 /* pthread test headers */
7546 #include <pthread.h>
7547 #ifndef NULL
7548 #define NULL (void*)0
7549 #endif
7550
7551 static void *task(p)
7552         void *p;
7553 {
7554         return (void *) (p == NULL);
7555 }
7556
7557
7558 int main(argc, argv)
7559         int argc;
7560         char **argv;
7561 {
7562
7563         /* pthread test function */
7564         pthread_t t;
7565         int status;
7566
7567         /* make sure pthread_create() isn't just a stub */
7568 #if HAVE_PTHREADS_D4
7569         status = pthread_create(&t, pthread_attr_default, task, NULL);
7570 #else
7571         status = pthread_create(&t, NULL, task, NULL);
7572 #endif
7573
7574         if( status ) exit( status );
7575
7576         /* make sure pthread_detach() isn't just a stub */
7577 #if HAVE_PTHREADS_D4
7578         status = pthread_detach( &t );
7579 #else
7580         status = pthread_detach( t );
7581 #endif
7582
7583 #ifdef HAVE_LINUX_THREADS
7584         pthread_kill_other_threads_np();
7585 #endif
7586
7587         exit( status );
7588
7589 }
7590
7591 EOF
7592 if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7593 then
7594   ol_cv_pthread_pthread=yes
7595 else
7596   echo "configure: failed program was:" >&5
7597   cat conftest.$ac_ext >&5
7598   rm -fr conftest*
7599   ol_cv_pthread_pthread=no
7600 fi
7601 rm -fr conftest*
7602 fi
7603
7604
7605                 # restore the LIBS
7606                 LIBS="$ol_LIBS"
7607         
7608 fi
7609
7610 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7611
7612         if test $ol_cv_pthread_pthread = yes ; then
7613                 ol_link_pthreads="-pthread"
7614                 ol_link_threads=posix
7615         fi
7616 fi
7617
7618                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7619 if test "$ol_link_threads" = no ; then
7620         # try -pthreads
7621         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7622 echo "configure:7623: checking for pthread link with -pthreads" >&5
7623 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
7624   echo $ac_n "(cached) $ac_c" 1>&6
7625 else
7626   
7627                 # save the flags
7628                 ol_LIBS="$LIBS"
7629                 LIBS="-pthreads $LIBS"
7630
7631                 if test "$cross_compiling" = yes; then
7632   cat > conftest.$ac_ext <<EOF
7633 #line 7634 "configure"
7634 #include "confdefs.h"
7635 /* pthread test headers */
7636 #include <pthread.h>
7637 #ifndef NULL
7638 #define NULL (void*)0
7639 #endif
7640
7641 static void *task(p)
7642         void *p;
7643 {
7644         return (void *) (p == NULL);
7645 }
7646
7647 int main() {
7648
7649         /* pthread test function */
7650         pthread_t t;
7651         int status;
7652
7653         /* make sure pthread_create() isn't just a stub */
7654 #if HAVE_PTHREADS_D4
7655         status = pthread_create(&t, pthread_attr_default, task, NULL);
7656 #else
7657         status = pthread_create(&t, NULL, task, NULL);
7658 #endif
7659
7660         if( status ) exit( status );
7661
7662         /* make sure pthread_detach() isn't just a stub */
7663 #if HAVE_PTHREADS_D4
7664         status = pthread_detach( &t );
7665 #else
7666         status = pthread_detach( t );
7667 #endif
7668
7669 #ifdef HAVE_LINUX_THREADS
7670         pthread_kill_other_threads_np();
7671 #endif
7672
7673         exit( status );
7674
7675 ; return 0; }
7676 EOF
7677 if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7678   rm -rf conftest*
7679   ol_cv_pthread_pthreads=yes
7680 else
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -rf conftest*
7684   ol_cv_pthread_pthreads=no
7685 fi
7686 rm -f conftest*
7687 else
7688   cat > conftest.$ac_ext <<EOF
7689 #line 7690 "configure"
7690 #include "confdefs.h"
7691 /* pthread test headers */
7692 #include <pthread.h>
7693 #ifndef NULL
7694 #define NULL (void*)0
7695 #endif
7696
7697 static void *task(p)
7698         void *p;
7699 {
7700         return (void *) (p == NULL);
7701 }
7702
7703
7704 int main(argc, argv)
7705         int argc;
7706         char **argv;
7707 {
7708
7709         /* pthread test function */
7710         pthread_t t;
7711         int status;
7712
7713         /* make sure pthread_create() isn't just a stub */
7714 #if HAVE_PTHREADS_D4
7715         status = pthread_create(&t, pthread_attr_default, task, NULL);
7716 #else
7717         status = pthread_create(&t, NULL, task, NULL);
7718 #endif
7719
7720         if( status ) exit( status );
7721
7722         /* make sure pthread_detach() isn't just a stub */
7723 #if HAVE_PTHREADS_D4
7724         status = pthread_detach( &t );
7725 #else
7726         status = pthread_detach( t );
7727 #endif
7728
7729 #ifdef HAVE_LINUX_THREADS
7730         pthread_kill_other_threads_np();
7731 #endif
7732
7733         exit( status );
7734
7735 }
7736
7737 EOF
7738 if { (eval echo configure:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7739 then
7740   ol_cv_pthread_pthreads=yes
7741 else
7742   echo "configure: failed program was:" >&5
7743   cat conftest.$ac_ext >&5
7744   rm -fr conftest*
7745   ol_cv_pthread_pthreads=no
7746 fi
7747 rm -fr conftest*
7748 fi
7749
7750
7751                 # restore the LIBS
7752                 LIBS="$ol_LIBS"
7753         
7754 fi
7755
7756 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7757
7758         if test $ol_cv_pthread_pthreads = yes ; then
7759                 ol_link_pthreads="-pthreads"
7760                 ol_link_threads=posix
7761         fi
7762 fi
7763
7764                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7765 if test "$ol_link_threads" = no ; then
7766         # try -mthreads
7767         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7768 echo "configure:7769: checking for pthread link with -mthreads" >&5
7769 if eval "test \"`echo '$''{'ol_cv_pthread_mthreads'+set}'`\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   
7773                 # save the flags
7774                 ol_LIBS="$LIBS"
7775                 LIBS="-mthreads $LIBS"
7776
7777                 if test "$cross_compiling" = yes; then
7778   cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 /* pthread test headers */
7782 #include <pthread.h>
7783 #ifndef NULL
7784 #define NULL (void*)0
7785 #endif
7786
7787 static void *task(p)
7788         void *p;
7789 {
7790         return (void *) (p == NULL);
7791 }
7792
7793 int main() {
7794
7795         /* pthread test function */
7796         pthread_t t;
7797         int status;
7798
7799         /* make sure pthread_create() isn't just a stub */
7800 #if HAVE_PTHREADS_D4
7801         status = pthread_create(&t, pthread_attr_default, task, NULL);
7802 #else
7803         status = pthread_create(&t, NULL, task, NULL);
7804 #endif
7805
7806         if( status ) exit( status );
7807
7808         /* make sure pthread_detach() isn't just a stub */
7809 #if HAVE_PTHREADS_D4
7810         status = pthread_detach( &t );
7811 #else
7812         status = pthread_detach( t );
7813 #endif
7814
7815 #ifdef HAVE_LINUX_THREADS
7816         pthread_kill_other_threads_np();
7817 #endif
7818
7819         exit( status );
7820
7821 ; return 0; }
7822 EOF
7823 if { (eval echo configure:7824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7824   rm -rf conftest*
7825   ol_cv_pthread_mthreads=yes
7826 else
7827   echo "configure: failed program was:" >&5
7828   cat conftest.$ac_ext >&5
7829   rm -rf conftest*
7830   ol_cv_pthread_mthreads=no
7831 fi
7832 rm -f conftest*
7833 else
7834   cat > conftest.$ac_ext <<EOF
7835 #line 7836 "configure"
7836 #include "confdefs.h"
7837 /* pthread test headers */
7838 #include <pthread.h>
7839 #ifndef NULL
7840 #define NULL (void*)0
7841 #endif
7842
7843 static void *task(p)
7844         void *p;
7845 {
7846         return (void *) (p == NULL);
7847 }
7848
7849
7850 int main(argc, argv)
7851         int argc;
7852         char **argv;
7853 {
7854
7855         /* pthread test function */
7856         pthread_t t;
7857         int status;
7858
7859         /* make sure pthread_create() isn't just a stub */
7860 #if HAVE_PTHREADS_D4
7861         status = pthread_create(&t, pthread_attr_default, task, NULL);
7862 #else
7863         status = pthread_create(&t, NULL, task, NULL);
7864 #endif
7865
7866         if( status ) exit( status );
7867
7868         /* make sure pthread_detach() isn't just a stub */
7869 #if HAVE_PTHREADS_D4
7870         status = pthread_detach( &t );
7871 #else
7872         status = pthread_detach( t );
7873 #endif
7874
7875 #ifdef HAVE_LINUX_THREADS
7876         pthread_kill_other_threads_np();
7877 #endif
7878
7879         exit( status );
7880
7881 }
7882
7883 EOF
7884 if { (eval echo configure:7885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7885 then
7886   ol_cv_pthread_mthreads=yes
7887 else
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -fr conftest*
7891   ol_cv_pthread_mthreads=no
7892 fi
7893 rm -fr conftest*
7894 fi
7895
7896
7897                 # restore the LIBS
7898                 LIBS="$ol_LIBS"
7899         
7900 fi
7901
7902 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7903
7904         if test $ol_cv_pthread_mthreads = yes ; then
7905                 ol_link_pthreads="-mthreads"
7906                 ol_link_threads=posix
7907         fi
7908 fi
7909
7910                 # Pthread try link: -thread (ol_cv_pthread_thread)
7911 if test "$ol_link_threads" = no ; then
7912         # try -thread
7913         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7914 echo "configure:7915: checking for pthread link with -thread" >&5
7915 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
7916   echo $ac_n "(cached) $ac_c" 1>&6
7917 else
7918   
7919                 # save the flags
7920                 ol_LIBS="$LIBS"
7921                 LIBS="-thread $LIBS"
7922
7923                 if test "$cross_compiling" = yes; then
7924   cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 /* pthread test headers */
7928 #include <pthread.h>
7929 #ifndef NULL
7930 #define NULL (void*)0
7931 #endif
7932
7933 static void *task(p)
7934         void *p;
7935 {
7936         return (void *) (p == NULL);
7937 }
7938
7939 int main() {
7940
7941         /* pthread test function */
7942         pthread_t t;
7943         int status;
7944
7945         /* make sure pthread_create() isn't just a stub */
7946 #if HAVE_PTHREADS_D4
7947         status = pthread_create(&t, pthread_attr_default, task, NULL);
7948 #else
7949         status = pthread_create(&t, NULL, task, NULL);
7950 #endif
7951
7952         if( status ) exit( status );
7953
7954         /* make sure pthread_detach() isn't just a stub */
7955 #if HAVE_PTHREADS_D4
7956         status = pthread_detach( &t );
7957 #else
7958         status = pthread_detach( t );
7959 #endif
7960
7961 #ifdef HAVE_LINUX_THREADS
7962         pthread_kill_other_threads_np();
7963 #endif
7964
7965         exit( status );
7966
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7970   rm -rf conftest*
7971   ol_cv_pthread_thread=yes
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   ol_cv_pthread_thread=no
7977 fi
7978 rm -f conftest*
7979 else
7980   cat > conftest.$ac_ext <<EOF
7981 #line 7982 "configure"
7982 #include "confdefs.h"
7983 /* pthread test headers */
7984 #include <pthread.h>
7985 #ifndef NULL
7986 #define NULL (void*)0
7987 #endif
7988
7989 static void *task(p)
7990         void *p;
7991 {
7992         return (void *) (p == NULL);
7993 }
7994
7995
7996 int main(argc, argv)
7997         int argc;
7998         char **argv;
7999 {
8000
8001         /* pthread test function */
8002         pthread_t t;
8003         int status;
8004
8005         /* make sure pthread_create() isn't just a stub */
8006 #if HAVE_PTHREADS_D4
8007         status = pthread_create(&t, pthread_attr_default, task, NULL);
8008 #else
8009         status = pthread_create(&t, NULL, task, NULL);
8010 #endif
8011
8012         if( status ) exit( status );
8013
8014         /* make sure pthread_detach() isn't just a stub */
8015 #if HAVE_PTHREADS_D4
8016         status = pthread_detach( &t );
8017 #else
8018         status = pthread_detach( t );
8019 #endif
8020
8021 #ifdef HAVE_LINUX_THREADS
8022         pthread_kill_other_threads_np();
8023 #endif
8024
8025         exit( status );
8026
8027 }
8028
8029 EOF
8030 if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8031 then
8032   ol_cv_pthread_thread=yes
8033 else
8034   echo "configure: failed program was:" >&5
8035   cat conftest.$ac_ext >&5
8036   rm -fr conftest*
8037   ol_cv_pthread_thread=no
8038 fi
8039 rm -fr conftest*
8040 fi
8041
8042
8043                 # restore the LIBS
8044                 LIBS="$ol_LIBS"
8045         
8046 fi
8047
8048 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8049
8050         if test $ol_cv_pthread_thread = yes ; then
8051                 ol_link_pthreads="-thread"
8052                 ol_link_threads=posix
8053         fi
8054 fi
8055
8056
8057                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8058 if test "$ol_link_threads" = no ; then
8059         # try -lpthread -lmach -lexc -lc_r
8060         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8061 echo "configure:8062: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8062 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
8063   echo $ac_n "(cached) $ac_c" 1>&6
8064 else
8065   
8066                 # save the flags
8067                 ol_LIBS="$LIBS"
8068                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8069
8070                 if test "$cross_compiling" = yes; then
8071   cat > conftest.$ac_ext <<EOF
8072 #line 8073 "configure"
8073 #include "confdefs.h"
8074 /* pthread test headers */
8075 #include <pthread.h>
8076 #ifndef NULL
8077 #define NULL (void*)0
8078 #endif
8079
8080 static void *task(p)
8081         void *p;
8082 {
8083         return (void *) (p == NULL);
8084 }
8085
8086 int main() {
8087
8088         /* pthread test function */
8089         pthread_t t;
8090         int status;
8091
8092         /* make sure pthread_create() isn't just a stub */
8093 #if HAVE_PTHREADS_D4
8094         status = pthread_create(&t, pthread_attr_default, task, NULL);
8095 #else
8096         status = pthread_create(&t, NULL, task, NULL);
8097 #endif
8098
8099         if( status ) exit( status );
8100
8101         /* make sure pthread_detach() isn't just a stub */
8102 #if HAVE_PTHREADS_D4
8103         status = pthread_detach( &t );
8104 #else
8105         status = pthread_detach( t );
8106 #endif
8107
8108 #ifdef HAVE_LINUX_THREADS
8109         pthread_kill_other_threads_np();
8110 #endif
8111
8112         exit( status );
8113
8114 ; return 0; }
8115 EOF
8116 if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8117   rm -rf conftest*
8118   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8119 else
8120   echo "configure: failed program was:" >&5
8121   cat conftest.$ac_ext >&5
8122   rm -rf conftest*
8123   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8124 fi
8125 rm -f conftest*
8126 else
8127   cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130 /* pthread test headers */
8131 #include <pthread.h>
8132 #ifndef NULL
8133 #define NULL (void*)0
8134 #endif
8135
8136 static void *task(p)
8137         void *p;
8138 {
8139         return (void *) (p == NULL);
8140 }
8141
8142
8143 int main(argc, argv)
8144         int argc;
8145         char **argv;
8146 {
8147
8148         /* pthread test function */
8149         pthread_t t;
8150         int status;
8151
8152         /* make sure pthread_create() isn't just a stub */
8153 #if HAVE_PTHREADS_D4
8154         status = pthread_create(&t, pthread_attr_default, task, NULL);
8155 #else
8156         status = pthread_create(&t, NULL, task, NULL);
8157 #endif
8158
8159         if( status ) exit( status );
8160
8161         /* make sure pthread_detach() isn't just a stub */
8162 #if HAVE_PTHREADS_D4
8163         status = pthread_detach( &t );
8164 #else
8165         status = pthread_detach( t );
8166 #endif
8167
8168 #ifdef HAVE_LINUX_THREADS
8169         pthread_kill_other_threads_np();
8170 #endif
8171
8172         exit( status );
8173
8174 }
8175
8176 EOF
8177 if { (eval echo configure:8178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8178 then
8179   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8180 else
8181   echo "configure: failed program was:" >&5
8182   cat conftest.$ac_ext >&5
8183   rm -fr conftest*
8184   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8185 fi
8186 rm -fr conftest*
8187 fi
8188
8189
8190                 # restore the LIBS
8191                 LIBS="$ol_LIBS"
8192         
8193 fi
8194
8195 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8196
8197         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8198                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8199                 ol_link_threads=posix
8200         fi
8201 fi
8202
8203                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8204 if test "$ol_link_threads" = no ; then
8205         # try -lpthread -lmach -lexc
8206         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8207 echo "configure:8208: checking for pthread link with -lpthread -lmach -lexc" >&5
8208 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
8209   echo $ac_n "(cached) $ac_c" 1>&6
8210 else
8211   
8212                 # save the flags
8213                 ol_LIBS="$LIBS"
8214                 LIBS="-lpthread -lmach -lexc $LIBS"
8215
8216                 if test "$cross_compiling" = yes; then
8217   cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* pthread test headers */
8221 #include <pthread.h>
8222 #ifndef NULL
8223 #define NULL (void*)0
8224 #endif
8225
8226 static void *task(p)
8227         void *p;
8228 {
8229         return (void *) (p == NULL);
8230 }
8231
8232 int main() {
8233
8234         /* pthread test function */
8235         pthread_t t;
8236         int status;
8237
8238         /* make sure pthread_create() isn't just a stub */
8239 #if HAVE_PTHREADS_D4
8240         status = pthread_create(&t, pthread_attr_default, task, NULL);
8241 #else
8242         status = pthread_create(&t, NULL, task, NULL);
8243 #endif
8244
8245         if( status ) exit( status );
8246
8247         /* make sure pthread_detach() isn't just a stub */
8248 #if HAVE_PTHREADS_D4
8249         status = pthread_detach( &t );
8250 #else
8251         status = pthread_detach( t );
8252 #endif
8253
8254 #ifdef HAVE_LINUX_THREADS
8255         pthread_kill_other_threads_np();
8256 #endif
8257
8258         exit( status );
8259
8260 ; return 0; }
8261 EOF
8262 if { (eval echo configure:8263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8263   rm -rf conftest*
8264   ol_cv_pthread_lpthread_lmach_lexc=yes
8265 else
8266   echo "configure: failed program was:" >&5
8267   cat conftest.$ac_ext >&5
8268   rm -rf conftest*
8269   ol_cv_pthread_lpthread_lmach_lexc=no
8270 fi
8271 rm -f conftest*
8272 else
8273   cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* pthread test headers */
8277 #include <pthread.h>
8278 #ifndef NULL
8279 #define NULL (void*)0
8280 #endif
8281
8282 static void *task(p)
8283         void *p;
8284 {
8285         return (void *) (p == NULL);
8286 }
8287
8288
8289 int main(argc, argv)
8290         int argc;
8291         char **argv;
8292 {
8293
8294         /* pthread test function */
8295         pthread_t t;
8296         int status;
8297
8298         /* make sure pthread_create() isn't just a stub */
8299 #if HAVE_PTHREADS_D4
8300         status = pthread_create(&t, pthread_attr_default, task, NULL);
8301 #else
8302         status = pthread_create(&t, NULL, task, NULL);
8303 #endif
8304
8305         if( status ) exit( status );
8306
8307         /* make sure pthread_detach() isn't just a stub */
8308 #if HAVE_PTHREADS_D4
8309         status = pthread_detach( &t );
8310 #else
8311         status = pthread_detach( t );
8312 #endif
8313
8314 #ifdef HAVE_LINUX_THREADS
8315         pthread_kill_other_threads_np();
8316 #endif
8317
8318         exit( status );
8319
8320 }
8321
8322 EOF
8323 if { (eval echo configure:8324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8324 then
8325   ol_cv_pthread_lpthread_lmach_lexc=yes
8326 else
8327   echo "configure: failed program was:" >&5
8328   cat conftest.$ac_ext >&5
8329   rm -fr conftest*
8330   ol_cv_pthread_lpthread_lmach_lexc=no
8331 fi
8332 rm -fr conftest*
8333 fi
8334
8335
8336                 # restore the LIBS
8337                 LIBS="$ol_LIBS"
8338         
8339 fi
8340
8341 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8342
8343         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8344                 ol_link_pthreads="-lpthread -lmach -lexc"
8345                 ol_link_threads=posix
8346         fi
8347 fi
8348
8349
8350                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8351 if test "$ol_link_threads" = no ; then
8352         # try -lpthread -Wl,-woff,85
8353         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8354 echo "configure:8355: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8355 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
8356   echo $ac_n "(cached) $ac_c" 1>&6
8357 else
8358   
8359                 # save the flags
8360                 ol_LIBS="$LIBS"
8361                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8362
8363                 if test "$cross_compiling" = yes; then
8364   cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* pthread test headers */
8368 #include <pthread.h>
8369 #ifndef NULL
8370 #define NULL (void*)0
8371 #endif
8372
8373 static void *task(p)
8374         void *p;
8375 {
8376         return (void *) (p == NULL);
8377 }
8378
8379 int main() {
8380
8381         /* pthread test function */
8382         pthread_t t;
8383         int status;
8384
8385         /* make sure pthread_create() isn't just a stub */
8386 #if HAVE_PTHREADS_D4
8387         status = pthread_create(&t, pthread_attr_default, task, NULL);
8388 #else
8389         status = pthread_create(&t, NULL, task, NULL);
8390 #endif
8391
8392         if( status ) exit( status );
8393
8394         /* make sure pthread_detach() isn't just a stub */
8395 #if HAVE_PTHREADS_D4
8396         status = pthread_detach( &t );
8397 #else
8398         status = pthread_detach( t );
8399 #endif
8400
8401 #ifdef HAVE_LINUX_THREADS
8402         pthread_kill_other_threads_np();
8403 #endif
8404
8405         exit( status );
8406
8407 ; return 0; }
8408 EOF
8409 if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8410   rm -rf conftest*
8411   ol_cv_pthread_lib_lpthread_woff=yes
8412 else
8413   echo "configure: failed program was:" >&5
8414   cat conftest.$ac_ext >&5
8415   rm -rf conftest*
8416   ol_cv_pthread_lib_lpthread_woff=no
8417 fi
8418 rm -f conftest*
8419 else
8420   cat > conftest.$ac_ext <<EOF
8421 #line 8422 "configure"
8422 #include "confdefs.h"
8423 /* pthread test headers */
8424 #include <pthread.h>
8425 #ifndef NULL
8426 #define NULL (void*)0
8427 #endif
8428
8429 static void *task(p)
8430         void *p;
8431 {
8432         return (void *) (p == NULL);
8433 }
8434
8435
8436 int main(argc, argv)
8437         int argc;
8438         char **argv;
8439 {
8440
8441         /* pthread test function */
8442         pthread_t t;
8443         int status;
8444
8445         /* make sure pthread_create() isn't just a stub */
8446 #if HAVE_PTHREADS_D4
8447         status = pthread_create(&t, pthread_attr_default, task, NULL);
8448 #else
8449         status = pthread_create(&t, NULL, task, NULL);
8450 #endif
8451
8452         if( status ) exit( status );
8453
8454         /* make sure pthread_detach() isn't just a stub */
8455 #if HAVE_PTHREADS_D4
8456         status = pthread_detach( &t );
8457 #else
8458         status = pthread_detach( t );
8459 #endif
8460
8461 #ifdef HAVE_LINUX_THREADS
8462         pthread_kill_other_threads_np();
8463 #endif
8464
8465         exit( status );
8466
8467 }
8468
8469 EOF
8470 if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8471 then
8472   ol_cv_pthread_lib_lpthread_woff=yes
8473 else
8474   echo "configure: failed program was:" >&5
8475   cat conftest.$ac_ext >&5
8476   rm -fr conftest*
8477   ol_cv_pthread_lib_lpthread_woff=no
8478 fi
8479 rm -fr conftest*
8480 fi
8481
8482
8483                 # restore the LIBS
8484                 LIBS="$ol_LIBS"
8485         
8486 fi
8487
8488 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8489
8490         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8491                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8492                 ol_link_threads=posix
8493         fi
8494 fi
8495
8496
8497                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8498 if test "$ol_link_threads" = no ; then
8499         # try -lpthread
8500         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8501 echo "configure:8502: checking for pthread link with -lpthread" >&5
8502 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
8503   echo $ac_n "(cached) $ac_c" 1>&6
8504 else
8505   
8506                 # save the flags
8507                 ol_LIBS="$LIBS"
8508                 LIBS="-lpthread $LIBS"
8509
8510                 if test "$cross_compiling" = yes; then
8511   cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 /* pthread test headers */
8515 #include <pthread.h>
8516 #ifndef NULL
8517 #define NULL (void*)0
8518 #endif
8519
8520 static void *task(p)
8521         void *p;
8522 {
8523         return (void *) (p == NULL);
8524 }
8525
8526 int main() {
8527
8528         /* pthread test function */
8529         pthread_t t;
8530         int status;
8531
8532         /* make sure pthread_create() isn't just a stub */
8533 #if HAVE_PTHREADS_D4
8534         status = pthread_create(&t, pthread_attr_default, task, NULL);
8535 #else
8536         status = pthread_create(&t, NULL, task, NULL);
8537 #endif
8538
8539         if( status ) exit( status );
8540
8541         /* make sure pthread_detach() isn't just a stub */
8542 #if HAVE_PTHREADS_D4
8543         status = pthread_detach( &t );
8544 #else
8545         status = pthread_detach( t );
8546 #endif
8547
8548 #ifdef HAVE_LINUX_THREADS
8549         pthread_kill_other_threads_np();
8550 #endif
8551
8552         exit( status );
8553
8554 ; return 0; }
8555 EOF
8556 if { (eval echo configure:8557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8557   rm -rf conftest*
8558   ol_cv_pthread_lpthread=yes
8559 else
8560   echo "configure: failed program was:" >&5
8561   cat conftest.$ac_ext >&5
8562   rm -rf conftest*
8563   ol_cv_pthread_lpthread=no
8564 fi
8565 rm -f conftest*
8566 else
8567   cat > conftest.$ac_ext <<EOF
8568 #line 8569 "configure"
8569 #include "confdefs.h"
8570 /* pthread test headers */
8571 #include <pthread.h>
8572 #ifndef NULL
8573 #define NULL (void*)0
8574 #endif
8575
8576 static void *task(p)
8577         void *p;
8578 {
8579         return (void *) (p == NULL);
8580 }
8581
8582
8583 int main(argc, argv)
8584         int argc;
8585         char **argv;
8586 {
8587
8588         /* pthread test function */
8589         pthread_t t;
8590         int status;
8591
8592         /* make sure pthread_create() isn't just a stub */
8593 #if HAVE_PTHREADS_D4
8594         status = pthread_create(&t, pthread_attr_default, task, NULL);
8595 #else
8596         status = pthread_create(&t, NULL, task, NULL);
8597 #endif
8598
8599         if( status ) exit( status );
8600
8601         /* make sure pthread_detach() isn't just a stub */
8602 #if HAVE_PTHREADS_D4
8603         status = pthread_detach( &t );
8604 #else
8605         status = pthread_detach( t );
8606 #endif
8607
8608 #ifdef HAVE_LINUX_THREADS
8609         pthread_kill_other_threads_np();
8610 #endif
8611
8612         exit( status );
8613
8614 }
8615
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8618 then
8619   ol_cv_pthread_lpthread=yes
8620 else
8621   echo "configure: failed program was:" >&5
8622   cat conftest.$ac_ext >&5
8623   rm -fr conftest*
8624   ol_cv_pthread_lpthread=no
8625 fi
8626 rm -fr conftest*
8627 fi
8628
8629
8630                 # restore the LIBS
8631                 LIBS="$ol_LIBS"
8632         
8633 fi
8634
8635 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8636
8637         if test $ol_cv_pthread_lpthread = yes ; then
8638                 ol_link_pthreads="-lpthread"
8639                 ol_link_threads=posix
8640         fi
8641 fi
8642
8643                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8644 if test "$ol_link_threads" = no ; then
8645         # try -lc_r
8646         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8647 echo "configure:8648: checking for pthread link with -lc_r" >&5
8648 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
8649   echo $ac_n "(cached) $ac_c" 1>&6
8650 else
8651   
8652                 # save the flags
8653                 ol_LIBS="$LIBS"
8654                 LIBS="-lc_r $LIBS"
8655
8656                 if test "$cross_compiling" = yes; then
8657   cat > conftest.$ac_ext <<EOF
8658 #line 8659 "configure"
8659 #include "confdefs.h"
8660 /* pthread test headers */
8661 #include <pthread.h>
8662 #ifndef NULL
8663 #define NULL (void*)0
8664 #endif
8665
8666 static void *task(p)
8667         void *p;
8668 {
8669         return (void *) (p == NULL);
8670 }
8671
8672 int main() {
8673
8674         /* pthread test function */
8675         pthread_t t;
8676         int status;
8677
8678         /* make sure pthread_create() isn't just a stub */
8679 #if HAVE_PTHREADS_D4
8680         status = pthread_create(&t, pthread_attr_default, task, NULL);
8681 #else
8682         status = pthread_create(&t, NULL, task, NULL);
8683 #endif
8684
8685         if( status ) exit( status );
8686
8687         /* make sure pthread_detach() isn't just a stub */
8688 #if HAVE_PTHREADS_D4
8689         status = pthread_detach( &t );
8690 #else
8691         status = pthread_detach( t );
8692 #endif
8693
8694 #ifdef HAVE_LINUX_THREADS
8695         pthread_kill_other_threads_np();
8696 #endif
8697
8698         exit( status );
8699
8700 ; return 0; }
8701 EOF
8702 if { (eval echo configure:8703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8703   rm -rf conftest*
8704   ol_cv_pthread_lc_r=yes
8705 else
8706   echo "configure: failed program was:" >&5
8707   cat conftest.$ac_ext >&5
8708   rm -rf conftest*
8709   ol_cv_pthread_lc_r=no
8710 fi
8711 rm -f conftest*
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 /* pthread test headers */
8717 #include <pthread.h>
8718 #ifndef NULL
8719 #define NULL (void*)0
8720 #endif
8721
8722 static void *task(p)
8723         void *p;
8724 {
8725         return (void *) (p == NULL);
8726 }
8727
8728
8729 int main(argc, argv)
8730         int argc;
8731         char **argv;
8732 {
8733
8734         /* pthread test function */
8735         pthread_t t;
8736         int status;
8737
8738         /* make sure pthread_create() isn't just a stub */
8739 #if HAVE_PTHREADS_D4
8740         status = pthread_create(&t, pthread_attr_default, task, NULL);
8741 #else
8742         status = pthread_create(&t, NULL, task, NULL);
8743 #endif
8744
8745         if( status ) exit( status );
8746
8747         /* make sure pthread_detach() isn't just a stub */
8748 #if HAVE_PTHREADS_D4
8749         status = pthread_detach( &t );
8750 #else
8751         status = pthread_detach( t );
8752 #endif
8753
8754 #ifdef HAVE_LINUX_THREADS
8755         pthread_kill_other_threads_np();
8756 #endif
8757
8758         exit( status );
8759
8760 }
8761
8762 EOF
8763 if { (eval echo configure:8764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8764 then
8765   ol_cv_pthread_lc_r=yes
8766 else
8767   echo "configure: failed program was:" >&5
8768   cat conftest.$ac_ext >&5
8769   rm -fr conftest*
8770   ol_cv_pthread_lc_r=no
8771 fi
8772 rm -fr conftest*
8773 fi
8774
8775
8776                 # restore the LIBS
8777                 LIBS="$ol_LIBS"
8778         
8779 fi
8780
8781 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8782
8783         if test $ol_cv_pthread_lc_r = yes ; then
8784                 ol_link_pthreads="-lc_r"
8785                 ol_link_threads=posix
8786         fi
8787 fi
8788
8789
8790                 # Pthread try link: -threads (ol_cv_pthread_threads)
8791 if test "$ol_link_threads" = no ; then
8792         # try -threads
8793         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8794 echo "configure:8795: checking for pthread link with -threads" >&5
8795 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
8796   echo $ac_n "(cached) $ac_c" 1>&6
8797 else
8798   
8799                 # save the flags
8800                 ol_LIBS="$LIBS"
8801                 LIBS="-threads $LIBS"
8802
8803                 if test "$cross_compiling" = yes; then
8804   cat > conftest.$ac_ext <<EOF
8805 #line 8806 "configure"
8806 #include "confdefs.h"
8807 /* pthread test headers */
8808 #include <pthread.h>
8809 #ifndef NULL
8810 #define NULL (void*)0
8811 #endif
8812
8813 static void *task(p)
8814         void *p;
8815 {
8816         return (void *) (p == NULL);
8817 }
8818
8819 int main() {
8820
8821         /* pthread test function */
8822         pthread_t t;
8823         int status;
8824
8825         /* make sure pthread_create() isn't just a stub */
8826 #if HAVE_PTHREADS_D4
8827         status = pthread_create(&t, pthread_attr_default, task, NULL);
8828 #else
8829         status = pthread_create(&t, NULL, task, NULL);
8830 #endif
8831
8832         if( status ) exit( status );
8833
8834         /* make sure pthread_detach() isn't just a stub */
8835 #if HAVE_PTHREADS_D4
8836         status = pthread_detach( &t );
8837 #else
8838         status = pthread_detach( t );
8839 #endif
8840
8841 #ifdef HAVE_LINUX_THREADS
8842         pthread_kill_other_threads_np();
8843 #endif
8844
8845         exit( status );
8846
8847 ; return 0; }
8848 EOF
8849 if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8850   rm -rf conftest*
8851   ol_cv_pthread_threads=yes
8852 else
8853   echo "configure: failed program was:" >&5
8854   cat conftest.$ac_ext >&5
8855   rm -rf conftest*
8856   ol_cv_pthread_threads=no
8857 fi
8858 rm -f conftest*
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 /* pthread test headers */
8864 #include <pthread.h>
8865 #ifndef NULL
8866 #define NULL (void*)0
8867 #endif
8868
8869 static void *task(p)
8870         void *p;
8871 {
8872         return (void *) (p == NULL);
8873 }
8874
8875
8876 int main(argc, argv)
8877         int argc;
8878         char **argv;
8879 {
8880
8881         /* pthread test function */
8882         pthread_t t;
8883         int status;
8884
8885         /* make sure pthread_create() isn't just a stub */
8886 #if HAVE_PTHREADS_D4
8887         status = pthread_create(&t, pthread_attr_default, task, NULL);
8888 #else
8889         status = pthread_create(&t, NULL, task, NULL);
8890 #endif
8891
8892         if( status ) exit( status );
8893
8894         /* make sure pthread_detach() isn't just a stub */
8895 #if HAVE_PTHREADS_D4
8896         status = pthread_detach( &t );
8897 #else
8898         status = pthread_detach( t );
8899 #endif
8900
8901 #ifdef HAVE_LINUX_THREADS
8902         pthread_kill_other_threads_np();
8903 #endif
8904
8905         exit( status );
8906
8907 }
8908
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8911 then
8912   ol_cv_pthread_threads=yes
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -fr conftest*
8917   ol_cv_pthread_threads=no
8918 fi
8919 rm -fr conftest*
8920 fi
8921
8922
8923                 # restore the LIBS
8924                 LIBS="$ol_LIBS"
8925         
8926 fi
8927
8928 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8929
8930         if test $ol_cv_pthread_threads = yes ; then
8931                 ol_link_pthreads="-threads"
8932                 ol_link_threads=posix
8933         fi
8934 fi
8935
8936
8937                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8938 if test "$ol_link_threads" = no ; then
8939         # try -lpthreads -lmach -lexc -lc_r
8940         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8941 echo "configure:8942: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8942 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
8943   echo $ac_n "(cached) $ac_c" 1>&6
8944 else
8945   
8946                 # save the flags
8947                 ol_LIBS="$LIBS"
8948                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8949
8950                 if test "$cross_compiling" = yes; then
8951   cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 /* pthread test headers */
8955 #include <pthread.h>
8956 #ifndef NULL
8957 #define NULL (void*)0
8958 #endif
8959
8960 static void *task(p)
8961         void *p;
8962 {
8963         return (void *) (p == NULL);
8964 }
8965
8966 int main() {
8967
8968         /* pthread test function */
8969         pthread_t t;
8970         int status;
8971
8972         /* make sure pthread_create() isn't just a stub */
8973 #if HAVE_PTHREADS_D4
8974         status = pthread_create(&t, pthread_attr_default, task, NULL);
8975 #else
8976         status = pthread_create(&t, NULL, task, NULL);
8977 #endif
8978
8979         if( status ) exit( status );
8980
8981         /* make sure pthread_detach() isn't just a stub */
8982 #if HAVE_PTHREADS_D4
8983         status = pthread_detach( &t );
8984 #else
8985         status = pthread_detach( t );
8986 #endif
8987
8988 #ifdef HAVE_LINUX_THREADS
8989         pthread_kill_other_threads_np();
8990 #endif
8991
8992         exit( status );
8993
8994 ; return 0; }
8995 EOF
8996 if { (eval echo configure:8997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8997   rm -rf conftest*
8998   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8999 else
9000   echo "configure: failed program was:" >&5
9001   cat conftest.$ac_ext >&5
9002   rm -rf conftest*
9003   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9004 fi
9005 rm -f conftest*
9006 else
9007   cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 /* pthread test headers */
9011 #include <pthread.h>
9012 #ifndef NULL
9013 #define NULL (void*)0
9014 #endif
9015
9016 static void *task(p)
9017         void *p;
9018 {
9019         return (void *) (p == NULL);
9020 }
9021
9022
9023 int main(argc, argv)
9024         int argc;
9025         char **argv;
9026 {
9027
9028         /* pthread test function */
9029         pthread_t t;
9030         int status;
9031
9032         /* make sure pthread_create() isn't just a stub */
9033 #if HAVE_PTHREADS_D4
9034         status = pthread_create(&t, pthread_attr_default, task, NULL);
9035 #else
9036         status = pthread_create(&t, NULL, task, NULL);
9037 #endif
9038
9039         if( status ) exit( status );
9040
9041         /* make sure pthread_detach() isn't just a stub */
9042 #if HAVE_PTHREADS_D4
9043         status = pthread_detach( &t );
9044 #else
9045         status = pthread_detach( t );
9046 #endif
9047
9048 #ifdef HAVE_LINUX_THREADS
9049         pthread_kill_other_threads_np();
9050 #endif
9051
9052         exit( status );
9053
9054 }
9055
9056 EOF
9057 if { (eval echo configure:9058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9058 then
9059   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9060 else
9061   echo "configure: failed program was:" >&5
9062   cat conftest.$ac_ext >&5
9063   rm -fr conftest*
9064   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9065 fi
9066 rm -fr conftest*
9067 fi
9068
9069
9070                 # restore the LIBS
9071                 LIBS="$ol_LIBS"
9072         
9073 fi
9074
9075 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9076
9077         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9078                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9079                 ol_link_threads=posix
9080         fi
9081 fi
9082
9083                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9084 if test "$ol_link_threads" = no ; then
9085         # try -lpthreads -lmach -lexc
9086         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9087 echo "configure:9088: checking for pthread link with -lpthreads -lmach -lexc" >&5
9088 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
9089   echo $ac_n "(cached) $ac_c" 1>&6
9090 else
9091   
9092                 # save the flags
9093                 ol_LIBS="$LIBS"
9094                 LIBS="-lpthreads -lmach -lexc $LIBS"
9095
9096                 if test "$cross_compiling" = yes; then
9097   cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 /* pthread test headers */
9101 #include <pthread.h>
9102 #ifndef NULL
9103 #define NULL (void*)0
9104 #endif
9105
9106 static void *task(p)
9107         void *p;
9108 {
9109         return (void *) (p == NULL);
9110 }
9111
9112 int main() {
9113
9114         /* pthread test function */
9115         pthread_t t;
9116         int status;
9117
9118         /* make sure pthread_create() isn't just a stub */
9119 #if HAVE_PTHREADS_D4
9120         status = pthread_create(&t, pthread_attr_default, task, NULL);
9121 #else
9122         status = pthread_create(&t, NULL, task, NULL);
9123 #endif
9124
9125         if( status ) exit( status );
9126
9127         /* make sure pthread_detach() isn't just a stub */
9128 #if HAVE_PTHREADS_D4
9129         status = pthread_detach( &t );
9130 #else
9131         status = pthread_detach( t );
9132 #endif
9133
9134 #ifdef HAVE_LINUX_THREADS
9135         pthread_kill_other_threads_np();
9136 #endif
9137
9138         exit( status );
9139
9140 ; return 0; }
9141 EOF
9142 if { (eval echo configure:9143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9143   rm -rf conftest*
9144   ol_cv_pthread_lpthreads_lmach_lexc=yes
9145 else
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -rf conftest*
9149   ol_cv_pthread_lpthreads_lmach_lexc=no
9150 fi
9151 rm -f conftest*
9152 else
9153   cat > conftest.$ac_ext <<EOF
9154 #line 9155 "configure"
9155 #include "confdefs.h"
9156 /* pthread test headers */
9157 #include <pthread.h>
9158 #ifndef NULL
9159 #define NULL (void*)0
9160 #endif
9161
9162 static void *task(p)
9163         void *p;
9164 {
9165         return (void *) (p == NULL);
9166 }
9167
9168
9169 int main(argc, argv)
9170         int argc;
9171         char **argv;
9172 {
9173
9174         /* pthread test function */
9175         pthread_t t;
9176         int status;
9177
9178         /* make sure pthread_create() isn't just a stub */
9179 #if HAVE_PTHREADS_D4
9180         status = pthread_create(&t, pthread_attr_default, task, NULL);
9181 #else
9182         status = pthread_create(&t, NULL, task, NULL);
9183 #endif
9184
9185         if( status ) exit( status );
9186
9187         /* make sure pthread_detach() isn't just a stub */
9188 #if HAVE_PTHREADS_D4
9189         status = pthread_detach( &t );
9190 #else
9191         status = pthread_detach( t );
9192 #endif
9193
9194 #ifdef HAVE_LINUX_THREADS
9195         pthread_kill_other_threads_np();
9196 #endif
9197
9198         exit( status );
9199
9200 }
9201
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9204 then
9205   ol_cv_pthread_lpthreads_lmach_lexc=yes
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -fr conftest*
9210   ol_cv_pthread_lpthreads_lmach_lexc=no
9211 fi
9212 rm -fr conftest*
9213 fi
9214
9215
9216                 # restore the LIBS
9217                 LIBS="$ol_LIBS"
9218         
9219 fi
9220
9221 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9222
9223         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9224                 ol_link_pthreads="-lpthreads -lmach -lexc"
9225                 ol_link_threads=posix
9226         fi
9227 fi
9228
9229                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9230 if test "$ol_link_threads" = no ; then
9231         # try -lpthreads -lexc
9232         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9233 echo "configure:9234: checking for pthread link with -lpthreads -lexc" >&5
9234 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
9235   echo $ac_n "(cached) $ac_c" 1>&6
9236 else
9237   
9238                 # save the flags
9239                 ol_LIBS="$LIBS"
9240                 LIBS="-lpthreads -lexc $LIBS"
9241
9242                 if test "$cross_compiling" = yes; then
9243   cat > conftest.$ac_ext <<EOF
9244 #line 9245 "configure"
9245 #include "confdefs.h"
9246 /* pthread test headers */
9247 #include <pthread.h>
9248 #ifndef NULL
9249 #define NULL (void*)0
9250 #endif
9251
9252 static void *task(p)
9253         void *p;
9254 {
9255         return (void *) (p == NULL);
9256 }
9257
9258 int main() {
9259
9260         /* pthread test function */
9261         pthread_t t;
9262         int status;
9263
9264         /* make sure pthread_create() isn't just a stub */
9265 #if HAVE_PTHREADS_D4
9266         status = pthread_create(&t, pthread_attr_default, task, NULL);
9267 #else
9268         status = pthread_create(&t, NULL, task, NULL);
9269 #endif
9270
9271         if( status ) exit( status );
9272
9273         /* make sure pthread_detach() isn't just a stub */
9274 #if HAVE_PTHREADS_D4
9275         status = pthread_detach( &t );
9276 #else
9277         status = pthread_detach( t );
9278 #endif
9279
9280 #ifdef HAVE_LINUX_THREADS
9281         pthread_kill_other_threads_np();
9282 #endif
9283
9284         exit( status );
9285
9286 ; return 0; }
9287 EOF
9288 if { (eval echo configure:9289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9289   rm -rf conftest*
9290   ol_cv_pthread_lpthreads_lexc=yes
9291 else
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   ol_cv_pthread_lpthreads_lexc=no
9296 fi
9297 rm -f conftest*
9298 else
9299   cat > conftest.$ac_ext <<EOF
9300 #line 9301 "configure"
9301 #include "confdefs.h"
9302 /* pthread test headers */
9303 #include <pthread.h>
9304 #ifndef NULL
9305 #define NULL (void*)0
9306 #endif
9307
9308 static void *task(p)
9309         void *p;
9310 {
9311         return (void *) (p == NULL);
9312 }
9313
9314
9315 int main(argc, argv)
9316         int argc;
9317         char **argv;
9318 {
9319
9320         /* pthread test function */
9321         pthread_t t;
9322         int status;
9323
9324         /* make sure pthread_create() isn't just a stub */
9325 #if HAVE_PTHREADS_D4
9326         status = pthread_create(&t, pthread_attr_default, task, NULL);
9327 #else
9328         status = pthread_create(&t, NULL, task, NULL);
9329 #endif
9330
9331         if( status ) exit( status );
9332
9333         /* make sure pthread_detach() isn't just a stub */
9334 #if HAVE_PTHREADS_D4
9335         status = pthread_detach( &t );
9336 #else
9337         status = pthread_detach( t );
9338 #endif
9339
9340 #ifdef HAVE_LINUX_THREADS
9341         pthread_kill_other_threads_np();
9342 #endif
9343
9344         exit( status );
9345
9346 }
9347
9348 EOF
9349 if { (eval echo configure:9350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9350 then
9351   ol_cv_pthread_lpthreads_lexc=yes
9352 else
9353   echo "configure: failed program was:" >&5
9354   cat conftest.$ac_ext >&5
9355   rm -fr conftest*
9356   ol_cv_pthread_lpthreads_lexc=no
9357 fi
9358 rm -fr conftest*
9359 fi
9360
9361
9362                 # restore the LIBS
9363                 LIBS="$ol_LIBS"
9364         
9365 fi
9366
9367 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9368
9369         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9370                 ol_link_pthreads="-lpthreads -lexc"
9371                 ol_link_threads=posix
9372         fi
9373 fi
9374
9375
9376                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9377 if test "$ol_link_threads" = no ; then
9378         # try -lpthreads
9379         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9380 echo "configure:9381: checking for pthread link with -lpthreads" >&5
9381 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
9382   echo $ac_n "(cached) $ac_c" 1>&6
9383 else
9384   
9385                 # save the flags
9386                 ol_LIBS="$LIBS"
9387                 LIBS="-lpthreads $LIBS"
9388
9389                 if test "$cross_compiling" = yes; then
9390   cat > conftest.$ac_ext <<EOF
9391 #line 9392 "configure"
9392 #include "confdefs.h"
9393 /* pthread test headers */
9394 #include <pthread.h>
9395 #ifndef NULL
9396 #define NULL (void*)0
9397 #endif
9398
9399 static void *task(p)
9400         void *p;
9401 {
9402         return (void *) (p == NULL);
9403 }
9404
9405 int main() {
9406
9407         /* pthread test function */
9408         pthread_t t;
9409         int status;
9410
9411         /* make sure pthread_create() isn't just a stub */
9412 #if HAVE_PTHREADS_D4
9413         status = pthread_create(&t, pthread_attr_default, task, NULL);
9414 #else
9415         status = pthread_create(&t, NULL, task, NULL);
9416 #endif
9417
9418         if( status ) exit( status );
9419
9420         /* make sure pthread_detach() isn't just a stub */
9421 #if HAVE_PTHREADS_D4
9422         status = pthread_detach( &t );
9423 #else
9424         status = pthread_detach( t );
9425 #endif
9426
9427 #ifdef HAVE_LINUX_THREADS
9428         pthread_kill_other_threads_np();
9429 #endif
9430
9431         exit( status );
9432
9433 ; return 0; }
9434 EOF
9435 if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9436   rm -rf conftest*
9437   ol_cv_pthread_lib_lpthreads=yes
9438 else
9439   echo "configure: failed program was:" >&5
9440   cat conftest.$ac_ext >&5
9441   rm -rf conftest*
9442   ol_cv_pthread_lib_lpthreads=no
9443 fi
9444 rm -f conftest*
9445 else
9446   cat > conftest.$ac_ext <<EOF
9447 #line 9448 "configure"
9448 #include "confdefs.h"
9449 /* pthread test headers */
9450 #include <pthread.h>
9451 #ifndef NULL
9452 #define NULL (void*)0
9453 #endif
9454
9455 static void *task(p)
9456         void *p;
9457 {
9458         return (void *) (p == NULL);
9459 }
9460
9461
9462 int main(argc, argv)
9463         int argc;
9464         char **argv;
9465 {
9466
9467         /* pthread test function */
9468         pthread_t t;
9469         int status;
9470
9471         /* make sure pthread_create() isn't just a stub */
9472 #if HAVE_PTHREADS_D4
9473         status = pthread_create(&t, pthread_attr_default, task, NULL);
9474 #else
9475         status = pthread_create(&t, NULL, task, NULL);
9476 #endif
9477
9478         if( status ) exit( status );
9479
9480         /* make sure pthread_detach() isn't just a stub */
9481 #if HAVE_PTHREADS_D4
9482         status = pthread_detach( &t );
9483 #else
9484         status = pthread_detach( t );
9485 #endif
9486
9487 #ifdef HAVE_LINUX_THREADS
9488         pthread_kill_other_threads_np();
9489 #endif
9490
9491         exit( status );
9492
9493 }
9494
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9497 then
9498   ol_cv_pthread_lib_lpthreads=yes
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -fr conftest*
9503   ol_cv_pthread_lib_lpthreads=no
9504 fi
9505 rm -fr conftest*
9506 fi
9507
9508
9509                 # restore the LIBS
9510                 LIBS="$ol_LIBS"
9511         
9512 fi
9513
9514 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9515
9516         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9517                 ol_link_pthreads="-lpthreads"
9518                 ol_link_threads=posix
9519         fi
9520 fi
9521
9522
9523                 if test $ol_link_threads != no ; then
9524                         cat >> confdefs.h <<\EOF
9525 #define HAVE_PTHREADS 1
9526 EOF
9527
9528
9529                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9530
9531                                                 save_CPPFLAGS="$CPPFLAGS"
9532                         save_LIBS="$LIBS"
9533                         LIBS="$LTHREAD_LIBS $LIBS"
9534
9535                                                                                                 for ac_func in sched_yield pthread_yield
9536 do
9537 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9538 echo "configure:9539: checking for $ac_func" >&5
9539 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542   cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 /* System header to define __stub macros and hopefully few prototypes,
9546     which can conflict with char $ac_func(); below.  */
9547 #include <assert.h>
9548 /* Override any gcc2 internal prototype to avoid an error.  */
9549 /* We use char because int might match the return type of a gcc2
9550     builtin and then its argument prototype would still apply.  */
9551 char $ac_func();
9552
9553 int main() {
9554
9555 /* The GNU C library defines this for functions which it implements
9556     to always fail with ENOSYS.  Some functions are actually named
9557     something starting with __ and the normal name is an alias.  */
9558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9559 choke me
9560 #else
9561 $ac_func();
9562 #endif
9563
9564 ; return 0; }
9565 EOF
9566 if { (eval echo configure:9567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9567   rm -rf conftest*
9568   eval "ac_cv_func_$ac_func=yes"
9569 else
9570   echo "configure: failed program was:" >&5
9571   cat conftest.$ac_ext >&5
9572   rm -rf conftest*
9573   eval "ac_cv_func_$ac_func=no"
9574 fi
9575 rm -f conftest*
9576 fi
9577
9578 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9579   echo "$ac_t""yes" 1>&6
9580     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9581   cat >> confdefs.h <<EOF
9582 #define $ac_tr_func 1
9583 EOF
9584  
9585 else
9586   echo "$ac_t""no" 1>&6
9587 fi
9588 done
9589
9590
9591                         if test $ac_cv_func_sched_yield = no -a \
9592                                 $ac_cv_func_pthread_yield = no ; then
9593                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9594 echo "configure:9595: checking for sched_yield in -lrt" >&5
9595 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
9596 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9597   echo $ac_n "(cached) $ac_c" 1>&6
9598 else
9599   ac_save_LIBS="$LIBS"
9600 LIBS="-lrt  $LIBS"
9601 cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 /* Override any gcc2 internal prototype to avoid an error.  */
9605 /* We use char because int might match the return type of a gcc2
9606     builtin and then its argument prototype would still apply.  */
9607 char sched_yield();
9608
9609 int main() {
9610 sched_yield()
9611 ; return 0; }
9612 EOF
9613 if { (eval echo configure:9614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9614   rm -rf conftest*
9615   eval "ac_cv_lib_$ac_lib_var=yes"
9616 else
9617   echo "configure: failed program was:" >&5
9618   cat conftest.$ac_ext >&5
9619   rm -rf conftest*
9620   eval "ac_cv_lib_$ac_lib_var=no"
9621 fi
9622 rm -f conftest*
9623 LIBS="$ac_save_LIBS"
9624
9625 fi
9626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9627   echo "$ac_t""yes" 1>&6
9628   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9629                                         cat >> confdefs.h <<\EOF
9630 #define HAVE_SCHED_YIELD 1
9631 EOF
9632
9633                                         ac_cv_func_sched_yield=yes
9634 else
9635   echo "$ac_t""no" 1>&6
9636 ac_cv_func_sched_yield=no
9637 fi
9638
9639                         fi
9640                         if test $ac_cv_func_sched_yield = no -a \
9641                                 $ac_cv_func_pthread_yield = no ; then
9642                                                                                                 for ac_func in thr_yield
9643 do
9644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9645 echo "configure:9646: checking for $ac_func" >&5
9646 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9647   echo $ac_n "(cached) $ac_c" 1>&6
9648 else
9649   cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 /* System header to define __stub macros and hopefully few prototypes,
9653     which can conflict with char $ac_func(); below.  */
9654 #include <assert.h>
9655 /* Override any gcc2 internal prototype to avoid an error.  */
9656 /* We use char because int might match the return type of a gcc2
9657     builtin and then its argument prototype would still apply.  */
9658 char $ac_func();
9659
9660 int main() {
9661
9662 /* The GNU C library defines this for functions which it implements
9663     to always fail with ENOSYS.  Some functions are actually named
9664     something starting with __ and the normal name is an alias.  */
9665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9666 choke me
9667 #else
9668 $ac_func();
9669 #endif
9670
9671 ; return 0; }
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9674   rm -rf conftest*
9675   eval "ac_cv_func_$ac_func=yes"
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -rf conftest*
9680   eval "ac_cv_func_$ac_func=no"
9681 fi
9682 rm -f conftest*
9683 fi
9684
9685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9686   echo "$ac_t""yes" 1>&6
9687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9688   cat >> confdefs.h <<EOF
9689 #define $ac_tr_func 1
9690 EOF
9691  
9692 else
9693   echo "$ac_t""no" 1>&6
9694 fi
9695 done
9696
9697                         fi
9698                         if test $ac_cv_func_sched_yield = no -a \
9699                                 $ac_cv_func_pthread_yield = no -a \
9700                                 "$ac_cv_func_thr_yield" = no ; then
9701                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9702                         fi
9703
9704                                                 for ac_func in pthread_kill
9705 do
9706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9707 echo "configure:9708: checking for $ac_func" >&5
9708 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9709   echo $ac_n "(cached) $ac_c" 1>&6
9710 else
9711   cat > conftest.$ac_ext <<EOF
9712 #line 9713 "configure"
9713 #include "confdefs.h"
9714 /* System header to define __stub macros and hopefully few prototypes,
9715     which can conflict with char $ac_func(); below.  */
9716 #include <assert.h>
9717 /* Override any gcc2 internal prototype to avoid an error.  */
9718 /* We use char because int might match the return type of a gcc2
9719     builtin and then its argument prototype would still apply.  */
9720 char $ac_func();
9721
9722 int main() {
9723
9724 /* The GNU C library defines this for functions which it implements
9725     to always fail with ENOSYS.  Some functions are actually named
9726     something starting with __ and the normal name is an alias.  */
9727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9728 choke me
9729 #else
9730 $ac_func();
9731 #endif
9732
9733 ; return 0; }
9734 EOF
9735 if { (eval echo configure:9736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9736   rm -rf conftest*
9737   eval "ac_cv_func_$ac_func=yes"
9738 else
9739   echo "configure: failed program was:" >&5
9740   cat conftest.$ac_ext >&5
9741   rm -rf conftest*
9742   eval "ac_cv_func_$ac_func=no"
9743 fi
9744 rm -f conftest*
9745 fi
9746
9747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9748   echo "$ac_t""yes" 1>&6
9749     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9750   cat >> confdefs.h <<EOF
9751 #define $ac_tr_func 1
9752 EOF
9753  
9754 else
9755   echo "$ac_t""no" 1>&6
9756 fi
9757 done
9758
9759
9760                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9761 echo "configure:9762: checking for pthread_detach with <pthread.h>" >&5
9762 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
9763   echo $ac_n "(cached) $ac_c" 1>&6
9764 else
9765   
9766                                                                 cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769
9770 #include <pthread.h>
9771 #ifndef NULL
9772 #define NULL (void*)0
9773 #endif
9774
9775 int main() {
9776 pthread_detach(NULL);
9777 ; return 0; }
9778 EOF
9779 if { (eval echo configure:9780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9780   rm -rf conftest*
9781   ol_cv_func_pthread_detach=yes
9782 else
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   ol_cv_func_pthread_detach=no
9787 fi
9788 rm -f conftest*
9789                         
9790 fi
9791
9792 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9793
9794                         if test $ol_cv_func_pthread_detach = no ; then
9795                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9796                         fi
9797
9798                         cat >> confdefs.h <<\EOF
9799 #define HAVE_PTHREAD_DETACH 1
9800 EOF
9801
9802
9803                                                 for ac_func in \
9804                                 pthread_setconcurrency \
9805                                 pthread_getconcurrency \
9806                                 thr_setconcurrency \
9807                                 thr_getconcurrency \
9808                         
9809 do
9810 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9811 echo "configure:9812: checking for $ac_func" >&5
9812 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9813   echo $ac_n "(cached) $ac_c" 1>&6
9814 else
9815   cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 /* System header to define __stub macros and hopefully few prototypes,
9819     which can conflict with char $ac_func(); below.  */
9820 #include <assert.h>
9821 /* Override any gcc2 internal prototype to avoid an error.  */
9822 /* We use char because int might match the return type of a gcc2
9823     builtin and then its argument prototype would still apply.  */
9824 char $ac_func();
9825
9826 int main() {
9827
9828 /* The GNU C library defines this for functions which it implements
9829     to always fail with ENOSYS.  Some functions are actually named
9830     something starting with __ and the normal name is an alias.  */
9831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9832 choke me
9833 #else
9834 $ac_func();
9835 #endif
9836
9837 ; return 0; }
9838 EOF
9839 if { (eval echo configure:9840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9840   rm -rf conftest*
9841   eval "ac_cv_func_$ac_func=yes"
9842 else
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845   rm -rf conftest*
9846   eval "ac_cv_func_$ac_func=no"
9847 fi
9848 rm -f conftest*
9849 fi
9850
9851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9852   echo "$ac_t""yes" 1>&6
9853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9854   cat >> confdefs.h <<EOF
9855 #define $ac_tr_func 1
9856 EOF
9857  
9858 else
9859   echo "$ac_t""no" 1>&6
9860 fi
9861 done
9862
9863
9864                         
9865         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9866 echo "configure:9867: checking for pthread_kill_other_threads_np" >&5
9867 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
9868   echo $ac_n "(cached) $ac_c" 1>&6
9869 else
9870   cat > conftest.$ac_ext <<EOF
9871 #line 9872 "configure"
9872 #include "confdefs.h"
9873 /* System header to define __stub macros and hopefully few prototypes,
9874     which can conflict with char pthread_kill_other_threads_np(); below.  */
9875 #include <assert.h>
9876 /* Override any gcc2 internal prototype to avoid an error.  */
9877 /* We use char because int might match the return type of a gcc2
9878     builtin and then its argument prototype would still apply.  */
9879 char pthread_kill_other_threads_np();
9880
9881 int main() {
9882
9883 /* The GNU C library defines this for functions which it implements
9884     to always fail with ENOSYS.  Some functions are actually named
9885     something starting with __ and the normal name is an alias.  */
9886 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9887 choke me
9888 #else
9889 pthread_kill_other_threads_np();
9890 #endif
9891
9892 ; return 0; }
9893 EOF
9894 if { (eval echo configure:9895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9895   rm -rf conftest*
9896   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9897 else
9898   echo "configure: failed program was:" >&5
9899   cat conftest.$ac_ext >&5
9900   rm -rf conftest*
9901   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9902 fi
9903 rm -f conftest*
9904 fi
9905
9906 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9907   echo "$ac_t""yes" 1>&6
9908   :
9909 else
9910   echo "$ac_t""no" 1>&6
9911 fi
9912
9913         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9914 echo "configure:9915: checking for LinuxThreads implementation" >&5
9915 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
9916   echo $ac_n "(cached) $ac_c" 1>&6
9917 else
9918   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9919 fi
9920
9921 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9922
9923                         
9924         
9925         
9926         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9927 echo "configure:9928: checking for LinuxThreads consistency" >&5
9928 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
9929   echo $ac_n "(cached) $ac_c" 1>&6
9930 else
9931   
9932                 if test $ol_cv_header_linux_threads = yes -a \
9933                         $ol_cv_sys_linux_threads = yes; then
9934                         ol_cv_linux_threads=yes
9935                 elif test $ol_cv_header_linux_threads = no -a \
9936                         $ol_cv_sys_linux_threads = no; then
9937                         ol_cv_linux_threads=no
9938                 else
9939                         ol_cv_linux_threads=error
9940                 fi
9941         
9942 fi
9943
9944 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9945
9946
9947                         if test $ol_cv_linux_threads = error; then
9948                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9949                         fi
9950
9951                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9952 echo "configure:9953: checking if pthread_create() works" >&5
9953 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
9954   echo $ac_n "(cached) $ac_c" 1>&6
9955 else
9956   
9957                         if test "$cross_compiling" = yes; then
9958                                 ol_cv_pthread_create_works=yes
9959 else
9960   cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 /* pthread test headers */
9964 #include <pthread.h>
9965 #ifndef NULL
9966 #define NULL (void*)0
9967 #endif
9968
9969 static void *task(p)
9970         void *p;
9971 {
9972         return (void *) (p == NULL);
9973 }
9974
9975
9976 int main(argc, argv)
9977         int argc;
9978         char **argv;
9979 {
9980
9981         /* pthread test function */
9982         pthread_t t;
9983         int status;
9984
9985         /* make sure pthread_create() isn't just a stub */
9986 #if HAVE_PTHREADS_D4
9987         status = pthread_create(&t, pthread_attr_default, task, NULL);
9988 #else
9989         status = pthread_create(&t, NULL, task, NULL);
9990 #endif
9991
9992         if( status ) exit( status );
9993
9994         /* make sure pthread_detach() isn't just a stub */
9995 #if HAVE_PTHREADS_D4
9996         status = pthread_detach( &t );
9997 #else
9998         status = pthread_detach( t );
9999 #endif
10000
10001 #ifdef HAVE_LINUX_THREADS
10002         pthread_kill_other_threads_np();
10003 #endif
10004
10005         exit( status );
10006
10007 }
10008
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10011 then
10012   ol_cv_pthread_create_works=yes
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016   rm -fr conftest*
10017   ol_cv_pthread_create_works=no
10018 fi
10019 rm -fr conftest*
10020 fi
10021
10022 fi
10023
10024 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10025
10026                         if test $ol_cv_pthread_create_works = no ; then
10027                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10028                         fi
10029
10030                                                 if test $ol_with_yielding_select = auto ; then
10031                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10032 echo "configure:10033: checking if select yields when using pthreads" >&5
10033 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   
10037                                 if test "$cross_compiling" = yes; then
10038   ol_cv_pthread_select_yields=cross
10039 else
10040   cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043
10044 #include <sys/types.h>
10045 #include <sys/time.h>
10046 #include <unistd.h>
10047 #include <pthread.h>
10048 #ifndef NULL
10049 #define NULL (void*) 0
10050 #endif
10051
10052 static int fildes[2];
10053
10054 static void *task(p)
10055         void *p;
10056 {
10057         int i;
10058         struct timeval tv;
10059
10060         fd_set rfds;
10061
10062         tv.tv_sec=10;
10063         tv.tv_usec=0;
10064
10065         FD_ZERO(&rfds);
10066         FD_SET(fildes[0], &rfds);
10067
10068         /* we're not interested in any fds */
10069         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10070
10071         if(i < 0) {
10072                 perror("select");
10073                 exit(10);
10074         }
10075
10076         exit(0); /* if we exit here, the select blocked the whole process */
10077 }
10078
10079 int main(argc, argv)
10080         int argc;
10081         char **argv;
10082 {
10083         pthread_t t;
10084
10085         /* create a pipe to select */
10086         if(pipe(&fildes[0])) {
10087                 perror("select");
10088                 exit(1);
10089         }
10090
10091 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10092         (void) pthread_setconcurrency(2);
10093 #else
10094 #ifdef HAVE_THR_SETCONCURRENCY
10095         /* Set Solaris LWP concurrency to 2 */
10096         thr_setconcurrency(2);
10097 #endif
10098 #endif
10099
10100 #if HAVE_PTHREADS_D4
10101         pthread_create(&t, pthread_attr_default, task, NULL);
10102 #else
10103         pthread_create(&t, NULL, task, NULL);
10104 #endif
10105
10106 #if HAVE_SCHED_YIELD
10107         sched_yield();  /* make sure task runs first */
10108 #else
10109 #ifdef HAVE_PTHREAD_YIELD
10110         pthread_yield();        /* make sure task runs first */
10111 #endif
10112 #endif
10113
10114         exit(2);
10115 }
10116 EOF
10117 if { (eval echo configure:10118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10118 then
10119   ol_cv_pthread_select_yields=no
10120 else
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -fr conftest*
10124   ol_cv_pthread_select_yields=yes
10125 fi
10126 rm -fr conftest*
10127 fi
10128
10129 fi
10130
10131 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10132
10133                                 if test $ol_cv_pthread_select_yields = cross ; then
10134                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10135                                 fi
10136
10137                                 if test $ol_cv_pthread_select_yields = yes ; then
10138                                         ol_with_yielding_select=yes
10139                                 fi
10140                         fi
10141
10142                                                 CPPFLAGS="$save_CPPFLAGS"
10143                         LIBS="$save_LIBS"
10144                 else
10145                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10146                 fi
10147         fi
10148
10149         if test $ol_with_threads = posix ; then
10150                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10151         fi
10152 fi
10153
10154 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10155         -o $ol_with_threads = mach ; then
10156
10157                 for ac_hdr in mach/cthreads.h
10158 do
10159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10161 echo "configure:10162: checking for $ac_hdr" >&5
10162 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 #include <$ac_hdr>
10169 EOF
10170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10171 { (eval echo configure:10172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10173 if test -z "$ac_err"; then
10174   rm -rf conftest*
10175   eval "ac_cv_header_$ac_safe=yes"
10176 else
10177   echo "$ac_err" >&5
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=no"
10182 fi
10183 rm -f conftest*
10184 fi
10185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10188   cat >> confdefs.h <<EOF
10189 #define $ac_tr_hdr 1
10190 EOF
10191  
10192 else
10193   echo "$ac_t""no" 1>&6
10194 fi
10195 done
10196
10197         if test $ac_cv_header_mach_cthreads_h = yes ; then
10198                 ol_with_threads=found
10199
10200                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10201 echo "configure:10202: checking for cthread_fork" >&5
10202 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   cat > conftest.$ac_ext <<EOF
10206 #line 10207 "configure"
10207 #include "confdefs.h"
10208 /* System header to define __stub macros and hopefully few prototypes,
10209     which can conflict with char cthread_fork(); below.  */
10210 #include <assert.h>
10211 /* Override any gcc2 internal prototype to avoid an error.  */
10212 /* We use char because int might match the return type of a gcc2
10213     builtin and then its argument prototype would still apply.  */
10214 char cthread_fork();
10215
10216 int main() {
10217
10218 /* The GNU C library defines this for functions which it implements
10219     to always fail with ENOSYS.  Some functions are actually named
10220     something starting with __ and the normal name is an alias.  */
10221 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10222 choke me
10223 #else
10224 cthread_fork();
10225 #endif
10226
10227 ; return 0; }
10228 EOF
10229 if { (eval echo configure:10230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10230   rm -rf conftest*
10231   eval "ac_cv_func_cthread_fork=yes"
10232 else
10233   echo "configure: failed program was:" >&5
10234   cat conftest.$ac_ext >&5
10235   rm -rf conftest*
10236   eval "ac_cv_func_cthread_fork=no"
10237 fi
10238 rm -f conftest*
10239 fi
10240
10241 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10242   echo "$ac_t""yes" 1>&6
10243   ol_link_threads=yes
10244 else
10245   echo "$ac_t""no" 1>&6
10246 fi
10247
10248
10249                 if test $ol_link_threads = no ; then
10250                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10251 echo "configure:10252: checking for cthread_fork with -all_load" >&5
10252 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   
10256                                                                 save_LIBS="$LIBS"
10257                                 LIBS="-all_load $LIBS"
10258                                 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 #include <mach/cthreads.h>
10262 int main() {
10263
10264                                         cthread_fork((void *)0, (void *)0);
10265                                         
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10269   rm -rf conftest*
10270   ol_cv_cthread_all_load=yes
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   ol_cv_cthread_all_load=no
10276 fi
10277 rm -f conftest*
10278                                                                 LIBS="$save_LIBS"
10279                         
10280 fi
10281
10282 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10283
10284                         if test $ol_cv_cthread_all_load = yes ; then
10285                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10286                                 ol_link_threads=mach
10287                         fi
10288                 fi
10289
10290                 if test $ol_link_threads != no ; then
10291                         : check for cthread specific functionality here
10292                         cat >> confdefs.h <<\EOF
10293 #define HAVE_MACH_CTHREADS 1
10294 EOF
10295
10296                 else
10297                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10298                 fi
10299         fi
10300
10301         if test $ol_with_threads = mach ; then
10302                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10303         fi
10304 fi
10305
10306 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10307         -o $ol_with_threads = pth ; then
10308
10309         for ac_hdr in pth.h
10310 do
10311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10313 echo "configure:10314: checking for $ac_hdr" >&5
10314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   cat > conftest.$ac_ext <<EOF
10318 #line 10319 "configure"
10319 #include "confdefs.h"
10320 #include <$ac_hdr>
10321 EOF
10322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10323 { (eval echo configure:10324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10325 if test -z "$ac_err"; then
10326   rm -rf conftest*
10327   eval "ac_cv_header_$ac_safe=yes"
10328 else
10329   echo "$ac_err" >&5
10330   echo "configure: failed program was:" >&5
10331   cat conftest.$ac_ext >&5
10332   rm -rf conftest*
10333   eval "ac_cv_header_$ac_safe=no"
10334 fi
10335 rm -f conftest*
10336 fi
10337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10338   echo "$ac_t""yes" 1>&6
10339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10340   cat >> confdefs.h <<EOF
10341 #define $ac_tr_hdr 1
10342 EOF
10343  
10344 else
10345   echo "$ac_t""no" 1>&6
10346 fi
10347 done
10348
10349
10350         if test $ac_cv_header_pth_h = yes ; then
10351                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10352 echo "configure:10353: checking for pth_version in -lpth" >&5
10353 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-%__p_%'`
10354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10355   echo $ac_n "(cached) $ac_c" 1>&6
10356 else
10357   ac_save_LIBS="$LIBS"
10358 LIBS="-lpth  $LIBS"
10359 cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362 /* Override any gcc2 internal prototype to avoid an error.  */
10363 /* We use char because int might match the return type of a gcc2
10364     builtin and then its argument prototype would still apply.  */
10365 char pth_version();
10366
10367 int main() {
10368 pth_version()
10369 ; return 0; }
10370 EOF
10371 if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10372   rm -rf conftest*
10373   eval "ac_cv_lib_$ac_lib_var=yes"
10374 else
10375   echo "configure: failed program was:" >&5
10376   cat conftest.$ac_ext >&5
10377   rm -rf conftest*
10378   eval "ac_cv_lib_$ac_lib_var=no"
10379 fi
10380 rm -f conftest*
10381 LIBS="$ac_save_LIBS"
10382
10383 fi
10384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10385   echo "$ac_t""yes" 1>&6
10386   have_pth=yes
10387 else
10388   echo "$ac_t""no" 1>&6
10389 have_pth=no
10390 fi
10391
10392
10393                 if test $have_pth = yes ; then
10394                         cat >> confdefs.h <<\EOF
10395 #define HAVE_GNU_PTH 1
10396 EOF
10397
10398                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10399                         ol_link_threads=pth
10400
10401                         if test $ol_with_yielding_select = auto ; then
10402                                 ol_with_yielding_select=yes
10403                         fi
10404                 fi
10405         fi
10406 fi
10407
10408 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10409         -o $ol_with_threads = lwp ; then
10410
10411                 for ac_hdr in thread.h synch.h
10412 do
10413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10415 echo "configure:10416: checking for $ac_hdr" >&5
10416 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10417   echo $ac_n "(cached) $ac_c" 1>&6
10418 else
10419   cat > conftest.$ac_ext <<EOF
10420 #line 10421 "configure"
10421 #include "confdefs.h"
10422 #include <$ac_hdr>
10423 EOF
10424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10425 { (eval echo configure:10426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10427 if test -z "$ac_err"; then
10428   rm -rf conftest*
10429   eval "ac_cv_header_$ac_safe=yes"
10430 else
10431   echo "$ac_err" >&5
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=no"
10436 fi
10437 rm -f conftest*
10438 fi
10439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10440   echo "$ac_t""yes" 1>&6
10441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10442   cat >> confdefs.h <<EOF
10443 #define $ac_tr_hdr 1
10444 EOF
10445  
10446 else
10447   echo "$ac_t""no" 1>&6
10448 fi
10449 done
10450
10451         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10452                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10453 echo "configure:10454: checking for thr_create in -lthread" >&5
10454 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
10455 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10456   echo $ac_n "(cached) $ac_c" 1>&6
10457 else
10458   ac_save_LIBS="$LIBS"
10459 LIBS="-lthread  $LIBS"
10460 cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 /* Override any gcc2 internal prototype to avoid an error.  */
10464 /* We use char because int might match the return type of a gcc2
10465     builtin and then its argument prototype would still apply.  */
10466 char thr_create();
10467
10468 int main() {
10469 thr_create()
10470 ; return 0; }
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10473   rm -rf conftest*
10474   eval "ac_cv_lib_$ac_lib_var=yes"
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_lib_$ac_lib_var=no"
10480 fi
10481 rm -f conftest*
10482 LIBS="$ac_save_LIBS"
10483
10484 fi
10485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10486   echo "$ac_t""yes" 1>&6
10487   have_thr=yes
10488 else
10489   echo "$ac_t""no" 1>&6
10490 have_thr=no
10491 fi
10492
10493
10494                 if test $have_thr = yes ; then
10495                         cat >> confdefs.h <<\EOF
10496 #define HAVE_THR 1
10497 EOF
10498
10499                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10500                         ol_link_threads=thr
10501
10502                         if test $ol_with_yielding_select = auto ; then
10503                                 ol_with_yielding_select=yes
10504                         fi
10505
10506                                                 for ac_func in \
10507                                 thr_setconcurrency \
10508                                 thr_getconcurrency \
10509                         
10510 do
10511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10512 echo "configure:10513: checking for $ac_func" >&5
10513 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10514   echo $ac_n "(cached) $ac_c" 1>&6
10515 else
10516   cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 /* System header to define __stub macros and hopefully few prototypes,
10520     which can conflict with char $ac_func(); below.  */
10521 #include <assert.h>
10522 /* Override any gcc2 internal prototype to avoid an error.  */
10523 /* We use char because int might match the return type of a gcc2
10524     builtin and then its argument prototype would still apply.  */
10525 char $ac_func();
10526
10527 int main() {
10528
10529 /* The GNU C library defines this for functions which it implements
10530     to always fail with ENOSYS.  Some functions are actually named
10531     something starting with __ and the normal name is an alias.  */
10532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10533 choke me
10534 #else
10535 $ac_func();
10536 #endif
10537
10538 ; return 0; }
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10541   rm -rf conftest*
10542   eval "ac_cv_func_$ac_func=yes"
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -rf conftest*
10547   eval "ac_cv_func_$ac_func=no"
10548 fi
10549 rm -f conftest*
10550 fi
10551
10552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10553   echo "$ac_t""yes" 1>&6
10554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10555   cat >> confdefs.h <<EOF
10556 #define $ac_tr_func 1
10557 EOF
10558  
10559 else
10560   echo "$ac_t""no" 1>&6
10561 fi
10562 done
10563
10564                 fi
10565         fi
10566
10567                 for ac_hdr in lwp/lwp.h
10568 do
10569 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10570 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10571 echo "configure:10572: checking for $ac_hdr" >&5
10572 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 #include <$ac_hdr>
10579 EOF
10580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10581 { (eval echo configure:10582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10583 if test -z "$ac_err"; then
10584   rm -rf conftest*
10585   eval "ac_cv_header_$ac_safe=yes"
10586 else
10587   echo "$ac_err" >&5
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_header_$ac_safe=no"
10592 fi
10593 rm -f conftest*
10594 fi
10595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10596   echo "$ac_t""yes" 1>&6
10597     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10598   cat >> confdefs.h <<EOF
10599 #define $ac_tr_hdr 1
10600 EOF
10601  
10602 else
10603   echo "$ac_t""no" 1>&6
10604 fi
10605 done
10606
10607         if test $ac_cv_header_lwp_lwp_h = yes ; then
10608                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10609 echo "configure:10610: checking for lwp_create in -llwp" >&5
10610 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
10611 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10612   echo $ac_n "(cached) $ac_c" 1>&6
10613 else
10614   ac_save_LIBS="$LIBS"
10615 LIBS="-llwp  $LIBS"
10616 cat > conftest.$ac_ext <<EOF
10617 #line 10618 "configure"
10618 #include "confdefs.h"
10619 /* Override any gcc2 internal prototype to avoid an error.  */
10620 /* We use char because int might match the return type of a gcc2
10621     builtin and then its argument prototype would still apply.  */
10622 char lwp_create();
10623
10624 int main() {
10625 lwp_create()
10626 ; return 0; }
10627 EOF
10628 if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10629   rm -rf conftest*
10630   eval "ac_cv_lib_$ac_lib_var=yes"
10631 else
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   eval "ac_cv_lib_$ac_lib_var=no"
10636 fi
10637 rm -f conftest*
10638 LIBS="$ac_save_LIBS"
10639
10640 fi
10641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643   have_lwp=yes
10644 else
10645   echo "$ac_t""no" 1>&6
10646 have_lwp=no
10647 fi
10648
10649
10650                 if test $have_lwp = yes ; then
10651                         cat >> confdefs.h <<\EOF
10652 #define HAVE_LWP 1
10653 EOF
10654
10655                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10656                         ol_link_threads=lwp
10657
10658                         if test $ol_with_yielding_select = auto ; then
10659                                 ol_with_yielding_select=no
10660                         fi
10661                 fi
10662         fi
10663 fi
10664
10665 if test $ol_with_yielding_select = yes ; then
10666         cat >> confdefs.h <<\EOF
10667 #define HAVE_YIELDING_SELECT 1
10668 EOF
10669
10670 fi
10671
10672 if test $ol_with_threads = manual ; then
10673                 ol_link_threads=yes
10674
10675         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10676
10677         for ac_hdr in pthread.h sched.h
10678 do
10679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10681 echo "configure:10682: checking for $ac_hdr" >&5
10682 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 #include <$ac_hdr>
10689 EOF
10690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10691 { (eval echo configure:10692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10693 if test -z "$ac_err"; then
10694   rm -rf conftest*
10695   eval "ac_cv_header_$ac_safe=yes"
10696 else
10697   echo "$ac_err" >&5
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=no"
10702 fi
10703 rm -f conftest*
10704 fi
10705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10706   echo "$ac_t""yes" 1>&6
10707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10708   cat >> confdefs.h <<EOF
10709 #define $ac_tr_hdr 1
10710 EOF
10711  
10712 else
10713   echo "$ac_t""no" 1>&6
10714 fi
10715 done
10716
10717         for ac_func in sched_yield pthread_yield
10718 do
10719 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10720 echo "configure:10721: checking for $ac_func" >&5
10721 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727 /* System header to define __stub macros and hopefully few prototypes,
10728     which can conflict with char $ac_func(); below.  */
10729 #include <assert.h>
10730 /* Override any gcc2 internal prototype to avoid an error.  */
10731 /* We use char because int might match the return type of a gcc2
10732     builtin and then its argument prototype would still apply.  */
10733 char $ac_func();
10734
10735 int main() {
10736
10737 /* The GNU C library defines this for functions which it implements
10738     to always fail with ENOSYS.  Some functions are actually named
10739     something starting with __ and the normal name is an alias.  */
10740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10741 choke me
10742 #else
10743 $ac_func();
10744 #endif
10745
10746 ; return 0; }
10747 EOF
10748 if { (eval echo configure:10749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10749   rm -rf conftest*
10750   eval "ac_cv_func_$ac_func=yes"
10751 else
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -rf conftest*
10755   eval "ac_cv_func_$ac_func=no"
10756 fi
10757 rm -f conftest*
10758 fi
10759
10760 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10761   echo "$ac_t""yes" 1>&6
10762     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10763   cat >> confdefs.h <<EOF
10764 #define $ac_tr_func 1
10765 EOF
10766  
10767 else
10768   echo "$ac_t""no" 1>&6
10769 fi
10770 done
10771
10772         
10773         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10774 echo "configure:10775: checking for LinuxThreads pthread.h" >&5
10775 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
10776   echo $ac_n "(cached) $ac_c" 1>&6
10777 else
10778   cat > conftest.$ac_ext <<EOF
10779 #line 10780 "configure"
10780 #include "confdefs.h"
10781 #include <pthread.h>
10782 EOF
10783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10784   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10785   rm -rf conftest*
10786   ol_cv_header_linux_threads=yes
10787 else
10788   rm -rf conftest*
10789   ol_cv_header_linux_threads=no
10790 fi
10791 rm -f conftest*
10792
10793                 
10794 fi
10795
10796 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10797         if test $ol_cv_header_linux_threads = yes; then
10798                 cat >> confdefs.h <<\EOF
10799 #define HAVE_LINUX_THREADS 1
10800 EOF
10801
10802         fi
10803
10804
10805         for ac_hdr in mach/cthreads.h
10806 do
10807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10809 echo "configure:10810: checking for $ac_hdr" >&5
10810 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   cat > conftest.$ac_ext <<EOF
10814 #line 10815 "configure"
10815 #include "confdefs.h"
10816 #include <$ac_hdr>
10817 EOF
10818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10819 { (eval echo configure:10820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10821 if test -z "$ac_err"; then
10822   rm -rf conftest*
10823   eval "ac_cv_header_$ac_safe=yes"
10824 else
10825   echo "$ac_err" >&5
10826   echo "configure: failed program was:" >&5
10827   cat conftest.$ac_ext >&5
10828   rm -rf conftest*
10829   eval "ac_cv_header_$ac_safe=no"
10830 fi
10831 rm -f conftest*
10832 fi
10833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10834   echo "$ac_t""yes" 1>&6
10835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10836   cat >> confdefs.h <<EOF
10837 #define $ac_tr_hdr 1
10838 EOF
10839  
10840 else
10841   echo "$ac_t""no" 1>&6
10842 fi
10843 done
10844
10845         for ac_hdr in lwp/lwp.h
10846 do
10847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10849 echo "configure:10850: checking for $ac_hdr" >&5
10850 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   cat > conftest.$ac_ext <<EOF
10854 #line 10855 "configure"
10855 #include "confdefs.h"
10856 #include <$ac_hdr>
10857 EOF
10858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10859 { (eval echo configure:10860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10861 if test -z "$ac_err"; then
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=yes"
10864 else
10865   echo "$ac_err" >&5
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=no"
10870 fi
10871 rm -f conftest*
10872 fi
10873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10876   cat >> confdefs.h <<EOF
10877 #define $ac_tr_hdr 1
10878 EOF
10879  
10880 else
10881   echo "$ac_t""no" 1>&6
10882 fi
10883 done
10884
10885         for ac_hdr in thread.h synch.h
10886 do
10887 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10888 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10889 echo "configure:10890: checking for $ac_hdr" >&5
10890 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10891   echo $ac_n "(cached) $ac_c" 1>&6
10892 else
10893   cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 #include <$ac_hdr>
10897 EOF
10898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10899 { (eval echo configure:10900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10901 if test -z "$ac_err"; then
10902   rm -rf conftest*
10903   eval "ac_cv_header_$ac_safe=yes"
10904 else
10905   echo "$ac_err" >&5
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -rf conftest*
10909   eval "ac_cv_header_$ac_safe=no"
10910 fi
10911 rm -f conftest*
10912 fi
10913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10914   echo "$ac_t""yes" 1>&6
10915     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10916   cat >> confdefs.h <<EOF
10917 #define $ac_tr_hdr 1
10918 EOF
10919  
10920 else
10921   echo "$ac_t""no" 1>&6
10922 fi
10923 done
10924
10925 fi
10926
10927 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10928                         cat >> confdefs.h <<\EOF
10929 #define REENTRANT 1
10930 EOF
10931
10932         cat >> confdefs.h <<\EOF
10933 #define _REENTRANT 1
10934 EOF
10935
10936         cat >> confdefs.h <<\EOF
10937 #define THREAD_SAFE 1
10938 EOF
10939
10940         cat >> confdefs.h <<\EOF
10941 #define _THREAD_SAFE 1
10942 EOF
10943
10944         cat >> confdefs.h <<\EOF
10945 #define THREADSAFE 1
10946 EOF
10947
10948         cat >> confdefs.h <<\EOF
10949 #define _THREADSAFE 1
10950 EOF
10951
10952         cat >> confdefs.h <<\EOF
10953 #define _SGI_MP_SOURCE 1
10954 EOF
10955
10956
10957                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10958 echo "configure:10959: checking for thread specific errno" >&5
10959 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
10960   echo $ac_n "(cached) $ac_c" 1>&6
10961 else
10962   
10963                 cat > conftest.$ac_ext <<EOF
10964 #line 10965 "configure"
10965 #include "confdefs.h"
10966 #include <errno.h>
10967 int main() {
10968 errno = 0;
10969 ; return 0; }
10970 EOF
10971 if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10972   rm -rf conftest*
10973   ol_cv_errno_thread_specific=yes
10974 else
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -rf conftest*
10978   ol_cv_errno_thread_specific=no
10979 fi
10980 rm -f conftest*
10981         
10982 fi
10983
10984 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10985
10986                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10987 echo "configure:10988: checking for thread specific h_errno" >&5
10988 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
10989   echo $ac_n "(cached) $ac_c" 1>&6
10990 else
10991   
10992                 cat > conftest.$ac_ext <<EOF
10993 #line 10994 "configure"
10994 #include "confdefs.h"
10995 #include <netdb.h>
10996 int main() {
10997 h_errno = 0;
10998 ; return 0; }
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11001   rm -rf conftest*
11002   ol_cv_h_errno_thread_specific=yes
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -rf conftest*
11007   ol_cv_h_errno_thread_specific=no
11008 fi
11009 rm -f conftest*
11010         
11011 fi
11012
11013 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11014
11015         if test $ol_cv_errno_thread_specific != yes \
11016                 -o $ol_cv_h_errno_thread_specific != yes ; then
11017                 LIBS="$LTHREAD_LIBS $LIBS"
11018                 LTHREAD_LIBS=""
11019         fi
11020
11021 fi  
11022
11023 if test $ol_link_threads = no ; then
11024         if test $ol_with_threads = yes ; then
11025                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11026         fi
11027
11028         if test $ol_with_threads = auto ; then
11029                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11030                 ol_with_threads=no
11031         fi
11032
11033         cat >> confdefs.h <<\EOF
11034 #define NO_THREADS 1
11035 EOF
11036
11037         LTHREAD_LIBS=""
11038 fi
11039
11040 if test $ol_link_threads != no ; then
11041         cat >> confdefs.h <<\EOF
11042 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11043 EOF
11044
11045 fi
11046
11047
11048 ol_link_ldbm=no 
11049 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11050         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11051 echo "configure:11052: checking for DB2 library" >&5
11052 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
11053   echo $ac_n "(cached) $ac_c" 1>&6
11054 else
11055         ol_LIBS="$LIBS"
11056         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11057 echo "configure:11058: checking for db_appexit in -ldb" >&5
11058 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-%__p_%'`
11059 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11060   echo $ac_n "(cached) $ac_c" 1>&6
11061 else
11062   ac_save_LIBS="$LIBS"
11063 LIBS="-ldb  $LIBS"
11064 cat > conftest.$ac_ext <<EOF
11065 #line 11066 "configure"
11066 #include "confdefs.h"
11067 /* Override any gcc2 internal prototype to avoid an error.  */
11068 /* We use char because int might match the return type of a gcc2
11069     builtin and then its argument prototype would still apply.  */
11070 char db_appexit();
11071
11072 int main() {
11073 db_appexit()
11074 ; return 0; }
11075 EOF
11076 if { (eval echo configure:11077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11077   rm -rf conftest*
11078   eval "ac_cv_lib_$ac_lib_var=yes"
11079 else
11080   echo "configure: failed program was:" >&5
11081   cat conftest.$ac_ext >&5
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=no"
11084 fi
11085 rm -f conftest*
11086 LIBS="$ac_save_LIBS"
11087
11088 fi
11089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11090   echo "$ac_t""yes" 1>&6
11091   ol_cv_lib_db2=-ldb
11092 else
11093   echo "$ac_t""no" 1>&6
11094 ol_cv_lib_db2=no
11095 fi
11096
11097         LIBS="$ol_LIBS"
11098
11099 fi
11100
11101 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11102
11103 for ac_hdr in db.h
11104 do
11105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11107 echo "configure:11108: checking for $ac_hdr" >&5
11108 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11109   echo $ac_n "(cached) $ac_c" 1>&6
11110 else
11111   cat > conftest.$ac_ext <<EOF
11112 #line 11113 "configure"
11113 #include "confdefs.h"
11114 #include <$ac_hdr>
11115 EOF
11116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11117 { (eval echo configure:11118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11119 if test -z "$ac_err"; then
11120   rm -rf conftest*
11121   eval "ac_cv_header_$ac_safe=yes"
11122 else
11123   echo "$ac_err" >&5
11124   echo "configure: failed program was:" >&5
11125   cat conftest.$ac_ext >&5
11126   rm -rf conftest*
11127   eval "ac_cv_header_$ac_safe=no"
11128 fi
11129 rm -f conftest*
11130 fi
11131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11132   echo "$ac_t""yes" 1>&6
11133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11134   cat >> confdefs.h <<EOF
11135 #define $ac_tr_hdr 1
11136 EOF
11137  
11138 else
11139   echo "$ac_t""no" 1>&6
11140 fi
11141 done
11142
11143 if test $ac_cv_header_db_h = yes ; then
11144         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11145 echo "configure:11146: checking if db.h is DB2" >&5
11146 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
11147   echo $ac_n "(cached) $ac_c" 1>&6
11148 else
11149   
11150                 cat > conftest.$ac_ext <<EOF
11151 #line 11152 "configure"
11152 #include "confdefs.h"
11153
11154 #                       include <db.h>
11155                         /* this check could be improved */
11156 #                       ifdef DB_VERSION_MAJOR
11157 #                               if DB_VERSION_MAJOR == 2
11158                                         __db_version_2;
11159 #                               endif
11160 #                       endif
11161                 
11162 EOF
11163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11164   egrep "__db_version_2" >/dev/null 2>&1; then
11165   rm -rf conftest*
11166   ol_cv_header_db2=yes
11167 else
11168   rm -rf conftest*
11169   ol_cv_header_db2=no
11170 fi
11171 rm -f conftest*
11172
11173 fi
11174
11175 echo "$ac_t""$ol_cv_header_db2" 1>&6
11176 else
11177         ol_cv_header_db2=no
11178 fi
11179
11180
11181  
11182  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11183 echo "configure:11184: checking for Berkeley DB2" >&5
11184 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
11185   echo $ac_n "(cached) $ac_c" 1>&6
11186 else
11187   
11188         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11189                 ol_cv_berkeley_db2=no
11190         else
11191                 ol_cv_berkeley_db2=yes
11192         fi
11193
11194 fi
11195
11196 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11197  if test $ol_cv_berkeley_db2 = yes ; then
11198         cat >> confdefs.h <<\EOF
11199 #define HAVE_BERKELEY_DB2 1
11200 EOF
11201
11202  fi
11203
11204
11205         if test $ol_cv_berkeley_db2 = yes ; then
11206                 ol_link_ldbm=db2
11207                 ol_with_ldbm_api=db2
11208
11209                 if test $ol_with_ldbm_type = hash ; then
11210                         cat >> confdefs.h <<\EOF
11211 #define LDBM_USE_DBHASH 1
11212 EOF
11213
11214                 else
11215                         cat >> confdefs.h <<\EOF
11216 #define LDBM_USE_DBBTREE 1
11217 EOF
11218
11219                 fi
11220
11221                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11222 echo "configure:11223: checking for DB_THREAD support" >&5
11223 if eval "test \"`echo '$''{'ol_cv_berkeley_db2_db_thread'+set}'`\" = set"; then
11224   echo $ac_n "(cached) $ac_c" 1>&6
11225 else
11226   
11227         ol_LIBS="$LIBS"
11228         if test $ol_cv_lib_db2 != yes ; then
11229                 LIBS="$ol_cv_lib_db2"
11230         fi
11231
11232         if test "$cross_compiling" = yes; then
11233   ol_cv_berkeley_db2_db_thread=cross
11234 else
11235   cat > conftest.$ac_ext <<EOF
11236 #line 11237 "configure"
11237 #include "confdefs.h"
11238
11239 #include <db.h>
11240 #ifndef NULL
11241 #define NULL ((void *)0)
11242 #endif
11243 main()
11244 {
11245         int rc;
11246         DB_ENV env;
11247         u_int32_t flags = DB_CREATE | DB_THREAD;
11248
11249         memset( &env, '\0', sizeof(env) );
11250
11251         rc = db_appinit( NULL, NULL, &env, flags );
11252
11253         if( rc == 0 ) {
11254                 db_appexit( &env );
11255         }
11256
11257         return rc;
11258 }
11259 EOF
11260 if { (eval echo configure:11261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11261 then
11262   ol_cv_berkeley_db2_db_thread=yes
11263 else
11264   echo "configure: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   rm -fr conftest*
11267   ol_cv_berkeley_db2_db_thread=no
11268 fi
11269 rm -fr conftest*
11270 fi
11271
11272
11273         LIBS="$ol_LIBS"
11274
11275         if test $ol_cv_berkeley_db2_db_thread != no ; then
11276                 cat >> confdefs.h <<\EOF
11277 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11278 EOF
11279
11280         fi
11281
11282 fi
11283
11284 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11285
11286                                                 if test $ol_cv_lib_db2 != yes ; then
11287                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11288                 fi
11289         fi
11290 fi
11291
11292 ol_link_bdb2=no
11293 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11294         if test $ol_cv_berkeley_db2_db_thread != no ; then
11295                 ol_link_bdb2=yes
11296         else
11297                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11298         fi
11299 fi
11300
11301 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11302         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11303 echo "configure:11304: checking for Berkeley DB library" >&5
11304 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
11305   echo $ac_n "(cached) $ac_c" 1>&6
11306 else
11307   
11308         for ac_hdr in db1/db.h
11309 do
11310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11312 echo "configure:11313: checking for $ac_hdr" >&5
11313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11314   echo $ac_n "(cached) $ac_c" 1>&6
11315 else
11316   cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319 #include <$ac_hdr>
11320 EOF
11321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11322 { (eval echo configure:11323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11324 if test -z "$ac_err"; then
11325   rm -rf conftest*
11326   eval "ac_cv_header_$ac_safe=yes"
11327 else
11328   echo "$ac_err" >&5
11329   echo "configure: failed program was:" >&5
11330   cat conftest.$ac_ext >&5
11331   rm -rf conftest*
11332   eval "ac_cv_header_$ac_safe=no"
11333 fi
11334 rm -f conftest*
11335 fi
11336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11337   echo "$ac_t""yes" 1>&6
11338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11339   cat >> confdefs.h <<EOF
11340 #define $ac_tr_hdr 1
11341 EOF
11342  
11343 else
11344   echo "$ac_t""no" 1>&6
11345 fi
11346 done
11347
11348         ol_LIBS="$LIBS"
11349         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11350 echo "configure:11351: checking for dbopen" >&5
11351 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
11352   echo $ac_n "(cached) $ac_c" 1>&6
11353 else
11354   cat > conftest.$ac_ext <<EOF
11355 #line 11356 "configure"
11356 #include "confdefs.h"
11357 /* System header to define __stub macros and hopefully few prototypes,
11358     which can conflict with char dbopen(); below.  */
11359 #include <assert.h>
11360 /* Override any gcc2 internal prototype to avoid an error.  */
11361 /* We use char because int might match the return type of a gcc2
11362     builtin and then its argument prototype would still apply.  */
11363 char dbopen();
11364
11365 int main() {
11366
11367 /* The GNU C library defines this for functions which it implements
11368     to always fail with ENOSYS.  Some functions are actually named
11369     something starting with __ and the normal name is an alias.  */
11370 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11371 choke me
11372 #else
11373 dbopen();
11374 #endif
11375
11376 ; return 0; }
11377 EOF
11378 if { (eval echo configure:11379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11379   rm -rf conftest*
11380   eval "ac_cv_func_dbopen=yes"
11381 else
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   eval "ac_cv_func_dbopen=no"
11386 fi
11387 rm -f conftest*
11388 fi
11389
11390 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11391   echo "$ac_t""yes" 1>&6
11392   ol_cv_lib_db=yes
11393 else
11394   echo "$ac_t""no" 1>&6
11395
11396                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11397 echo "configure:11398: checking for dbopen in -ldb1" >&5
11398 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
11399 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11400   echo $ac_n "(cached) $ac_c" 1>&6
11401 else
11402   ac_save_LIBS="$LIBS"
11403 LIBS="-ldb1  $LIBS"
11404 cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407 /* Override any gcc2 internal prototype to avoid an error.  */
11408 /* We use char because int might match the return type of a gcc2
11409     builtin and then its argument prototype would still apply.  */
11410 char dbopen();
11411
11412 int main() {
11413 dbopen()
11414 ; return 0; }
11415 EOF
11416 if { (eval echo configure:11417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11417   rm -rf conftest*
11418   eval "ac_cv_lib_$ac_lib_var=yes"
11419 else
11420   echo "configure: failed program was:" >&5
11421   cat conftest.$ac_ext >&5
11422   rm -rf conftest*
11423   eval "ac_cv_lib_$ac_lib_var=no"
11424 fi
11425 rm -f conftest*
11426 LIBS="$ac_save_LIBS"
11427
11428 fi
11429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11430   echo "$ac_t""yes" 1>&6
11431   ol_cv_lib_db=-ldb1
11432 else
11433   echo "$ac_t""no" 1>&6
11434
11435                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11436 echo "configure:11437: checking for dbopen in -ldb" >&5
11437 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
11438 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11439   echo $ac_n "(cached) $ac_c" 1>&6
11440 else
11441   ac_save_LIBS="$LIBS"
11442 LIBS="-ldb  $LIBS"
11443 cat > conftest.$ac_ext <<EOF
11444 #line 11445 "configure"
11445 #include "confdefs.h"
11446 /* Override any gcc2 internal prototype to avoid an error.  */
11447 /* We use char because int might match the return type of a gcc2
11448     builtin and then its argument prototype would still apply.  */
11449 char dbopen();
11450
11451 int main() {
11452 dbopen()
11453 ; return 0; }
11454 EOF
11455 if { (eval echo configure:11456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11456   rm -rf conftest*
11457   eval "ac_cv_lib_$ac_lib_var=yes"
11458 else
11459   echo "configure: failed program was:" >&5
11460   cat conftest.$ac_ext >&5
11461   rm -rf conftest*
11462   eval "ac_cv_lib_$ac_lib_var=no"
11463 fi
11464 rm -f conftest*
11465 LIBS="$ac_save_LIBS"
11466
11467 fi
11468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11469   echo "$ac_t""yes" 1>&6
11470   ol_cv_lib_db=-ldb
11471 else
11472   echo "$ac_t""no" 1>&6
11473 ol_cv_lib_db=no
11474 fi
11475
11476                 
11477 fi
11478
11479         
11480 fi
11481
11482         LIBS="$ol_LIBS"
11483
11484 fi
11485
11486 echo "$ac_t""$ol_cv_lib_db" 1>&6
11487
11488
11489 for ac_hdr in db_185.h
11490 do
11491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11493 echo "configure:11494: checking for $ac_hdr" >&5
11494 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11495   echo $ac_n "(cached) $ac_c" 1>&6
11496 else
11497   cat > conftest.$ac_ext <<EOF
11498 #line 11499 "configure"
11499 #include "confdefs.h"
11500 #include <$ac_hdr>
11501 EOF
11502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11503 { (eval echo configure:11504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11505 if test -z "$ac_err"; then
11506   rm -rf conftest*
11507   eval "ac_cv_header_$ac_safe=yes"
11508 else
11509   echo "$ac_err" >&5
11510   echo "configure: failed program was:" >&5
11511   cat conftest.$ac_ext >&5
11512   rm -rf conftest*
11513   eval "ac_cv_header_$ac_safe=no"
11514 fi
11515 rm -f conftest*
11516 fi
11517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11518   echo "$ac_t""yes" 1>&6
11519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11520   cat >> confdefs.h <<EOF
11521 #define $ac_tr_hdr 1
11522 EOF
11523  
11524 else
11525   echo "$ac_t""no" 1>&6
11526 fi
11527 done
11528
11529 if test "$ol_cv_header_db2" = yes ; then
11530         
11531         ol_cv_header_db=$ac_cv_header_db_185_h
11532 else
11533         ol_cv_header_db=$ac_cv_header_db_h
11534 fi
11535
11536
11537  
11538  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11539 echo "configure:11540: checking for Berkeley DB" >&5
11540 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   
11544         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11545                 ol_cv_berkeley_db=no
11546         else
11547                 ol_cv_berkeley_db=yes
11548         fi
11549
11550 fi
11551
11552 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11553  if test $ol_cv_berkeley_db = yes ; then
11554         cat >> confdefs.h <<\EOF
11555 #define HAVE_BERKELEY_DB 1
11556 EOF
11557
11558  fi
11559
11560
11561         if test $ol_cv_berkeley_db = yes ; then
11562                 ol_link_ldbm=db
11563                 ol_with_ldbm_api=db
11564
11565                 if test $ol_with_ldbm_type = hash ; then
11566                         cat >> confdefs.h <<\EOF
11567 #define LDBM_USE_DBHASH 1
11568 EOF
11569
11570                 else
11571                         cat >> confdefs.h <<\EOF
11572 #define LDBM_USE_DBBTREE 1
11573 EOF
11574
11575                 fi
11576
11577                                                 if test $ol_cv_lib_db != yes ; then
11578                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11579                 fi
11580         fi
11581 fi
11582
11583 if test $ol_with_ldbm_api = manual ; then
11584                 ol_link_ldbm=yes
11585
11586         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11587
11588         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11589 do
11590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11592 echo "configure:11593: checking for $ac_hdr" >&5
11593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11594   echo $ac_n "(cached) $ac_c" 1>&6
11595 else
11596   cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599 #include <$ac_hdr>
11600 EOF
11601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11602 { (eval echo configure:11603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11604 if test -z "$ac_err"; then
11605   rm -rf conftest*
11606   eval "ac_cv_header_$ac_safe=yes"
11607 else
11608   echo "$ac_err" >&5
11609   echo "configure: failed program was:" >&5
11610   cat conftest.$ac_ext >&5
11611   rm -rf conftest*
11612   eval "ac_cv_header_$ac_safe=no"
11613 fi
11614 rm -f conftest*
11615 fi
11616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11617   echo "$ac_t""yes" 1>&6
11618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11619   cat >> confdefs.h <<EOF
11620 #define $ac_tr_hdr 1
11621 EOF
11622  
11623 else
11624   echo "$ac_t""no" 1>&6
11625 fi
11626 done
11627
11628 fi
11629
11630 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11631         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11632         ol_with_ldbm_api=none
11633 fi
11634
11635 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11636         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11637 echo "configure:11638: checking for MDBM library" >&5
11638 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
11639   echo $ac_n "(cached) $ac_c" 1>&6
11640 else
11641         ol_LIBS="$LIBS"
11642         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11643 echo "configure:11644: checking for mdbm_set_chain" >&5
11644 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
11645   echo $ac_n "(cached) $ac_c" 1>&6
11646 else
11647   cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650 /* System header to define __stub macros and hopefully few prototypes,
11651     which can conflict with char mdbm_set_chain(); below.  */
11652 #include <assert.h>
11653 /* Override any gcc2 internal prototype to avoid an error.  */
11654 /* We use char because int might match the return type of a gcc2
11655     builtin and then its argument prototype would still apply.  */
11656 char mdbm_set_chain();
11657
11658 int main() {
11659
11660 /* The GNU C library defines this for functions which it implements
11661     to always fail with ENOSYS.  Some functions are actually named
11662     something starting with __ and the normal name is an alias.  */
11663 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11664 choke me
11665 #else
11666 mdbm_set_chain();
11667 #endif
11668
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11672   rm -rf conftest*
11673   eval "ac_cv_func_mdbm_set_chain=yes"
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   eval "ac_cv_func_mdbm_set_chain=no"
11679 fi
11680 rm -f conftest*
11681 fi
11682
11683 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11684   echo "$ac_t""yes" 1>&6
11685   ol_cv_lib_mdbm=yes
11686 else
11687   echo "$ac_t""no" 1>&6
11688
11689                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11690 echo "configure:11691: checking for mdbm_set_chain in -lmdbm" >&5
11691 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
11692 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   ac_save_LIBS="$LIBS"
11696 LIBS="-lmdbm  $LIBS"
11697 cat > conftest.$ac_ext <<EOF
11698 #line 11699 "configure"
11699 #include "confdefs.h"
11700 /* Override any gcc2 internal prototype to avoid an error.  */
11701 /* We use char because int might match the return type of a gcc2
11702     builtin and then its argument prototype would still apply.  */
11703 char mdbm_set_chain();
11704
11705 int main() {
11706 mdbm_set_chain()
11707 ; return 0; }
11708 EOF
11709 if { (eval echo configure:11710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11710   rm -rf conftest*
11711   eval "ac_cv_lib_$ac_lib_var=yes"
11712 else
11713   echo "configure: failed program was:" >&5
11714   cat conftest.$ac_ext >&5
11715   rm -rf conftest*
11716   eval "ac_cv_lib_$ac_lib_var=no"
11717 fi
11718 rm -f conftest*
11719 LIBS="$ac_save_LIBS"
11720
11721 fi
11722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11723   echo "$ac_t""yes" 1>&6
11724   ol_cv_lib_mdbm=-lmdbm
11725 else
11726   echo "$ac_t""no" 1>&6
11727 ol_cv_lib_mdbm=no
11728 fi
11729
11730         
11731 fi
11732
11733         LIBS="$ol_LIBS"
11734
11735 fi
11736
11737 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11738
11739
11740  for ac_hdr in mdbm.h
11741 do
11742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11744 echo "configure:11745: checking for $ac_hdr" >&5
11745 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11746   echo $ac_n "(cached) $ac_c" 1>&6
11747 else
11748   cat > conftest.$ac_ext <<EOF
11749 #line 11750 "configure"
11750 #include "confdefs.h"
11751 #include <$ac_hdr>
11752 EOF
11753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11754 { (eval echo configure:11755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11756 if test -z "$ac_err"; then
11757   rm -rf conftest*
11758   eval "ac_cv_header_$ac_safe=yes"
11759 else
11760   echo "$ac_err" >&5
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -rf conftest*
11764   eval "ac_cv_header_$ac_safe=no"
11765 fi
11766 rm -f conftest*
11767 fi
11768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11769   echo "$ac_t""yes" 1>&6
11770     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11771   cat >> confdefs.h <<EOF
11772 #define $ac_tr_hdr 1
11773 EOF
11774  
11775 else
11776   echo "$ac_t""no" 1>&6
11777 fi
11778 done
11779
11780  echo $ac_n "checking for db""... $ac_c" 1>&6
11781 echo "configure:11782: checking for db" >&5
11782 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
11783   echo $ac_n "(cached) $ac_c" 1>&6
11784 else
11785   
11786         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11787                 ol_cv_mdbm=no
11788         else
11789                 ol_cv_mdbm=yes
11790         fi
11791
11792 fi
11793
11794 echo "$ac_t""$ol_cv_mdbm" 1>&6
11795  if test $ol_cv_mdbm = yes ; then
11796         cat >> confdefs.h <<\EOF
11797 #define HAVE_MDBM 1
11798 EOF
11799
11800  fi
11801
11802
11803         if test $ol_cv_mdbm = yes ; then
11804                 ol_link_ldbm=mdbm
11805                 ol_with_ldbm_api=mdbm
11806                 if test $ol_cv_lib_mdbm != yes ; then
11807                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11808                 fi
11809         fi
11810 fi
11811
11812 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11813         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11814 echo "configure:11815: checking for GDBM library" >&5
11815 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
11816   echo $ac_n "(cached) $ac_c" 1>&6
11817 else
11818         ol_LIBS="$LIBS"
11819         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11820 echo "configure:11821: checking for gdbm_open" >&5
11821 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
11822   echo $ac_n "(cached) $ac_c" 1>&6
11823 else
11824   cat > conftest.$ac_ext <<EOF
11825 #line 11826 "configure"
11826 #include "confdefs.h"
11827 /* System header to define __stub macros and hopefully few prototypes,
11828     which can conflict with char gdbm_open(); below.  */
11829 #include <assert.h>
11830 /* Override any gcc2 internal prototype to avoid an error.  */
11831 /* We use char because int might match the return type of a gcc2
11832     builtin and then its argument prototype would still apply.  */
11833 char gdbm_open();
11834
11835 int main() {
11836
11837 /* The GNU C library defines this for functions which it implements
11838     to always fail with ENOSYS.  Some functions are actually named
11839     something starting with __ and the normal name is an alias.  */
11840 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11841 choke me
11842 #else
11843 gdbm_open();
11844 #endif
11845
11846 ; return 0; }
11847 EOF
11848 if { (eval echo configure:11849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11849   rm -rf conftest*
11850   eval "ac_cv_func_gdbm_open=yes"
11851 else
11852   echo "configure: failed program was:" >&5
11853   cat conftest.$ac_ext >&5
11854   rm -rf conftest*
11855   eval "ac_cv_func_gdbm_open=no"
11856 fi
11857 rm -f conftest*
11858 fi
11859
11860 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11861   echo "$ac_t""yes" 1>&6
11862   ol_cv_lib_gdbm=yes
11863 else
11864   echo "$ac_t""no" 1>&6
11865
11866                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11867 echo "configure:11868: checking for gdbm_open in -lgdbm" >&5
11868 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
11869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11870   echo $ac_n "(cached) $ac_c" 1>&6
11871 else
11872   ac_save_LIBS="$LIBS"
11873 LIBS="-lgdbm  $LIBS"
11874 cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877 /* Override any gcc2 internal prototype to avoid an error.  */
11878 /* We use char because int might match the return type of a gcc2
11879     builtin and then its argument prototype would still apply.  */
11880 char gdbm_open();
11881
11882 int main() {
11883 gdbm_open()
11884 ; return 0; }
11885 EOF
11886 if { (eval echo configure:11887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11887   rm -rf conftest*
11888   eval "ac_cv_lib_$ac_lib_var=yes"
11889 else
11890   echo "configure: failed program was:" >&5
11891   cat conftest.$ac_ext >&5
11892   rm -rf conftest*
11893   eval "ac_cv_lib_$ac_lib_var=no"
11894 fi
11895 rm -f conftest*
11896 LIBS="$ac_save_LIBS"
11897
11898 fi
11899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11900   echo "$ac_t""yes" 1>&6
11901   ol_cv_lib_gdbm=-lgdbm
11902 else
11903   echo "$ac_t""no" 1>&6
11904 ol_cv_lib_gdbm=no
11905 fi
11906
11907         
11908 fi
11909
11910         LIBS="$ol_LIBS"
11911
11912 fi
11913
11914 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11915
11916
11917  for ac_hdr in gdbm.h
11918 do
11919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11921 echo "configure:11922: checking for $ac_hdr" >&5
11922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11923   echo $ac_n "(cached) $ac_c" 1>&6
11924 else
11925   cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928 #include <$ac_hdr>
11929 EOF
11930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11931 { (eval echo configure:11932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11933 if test -z "$ac_err"; then
11934   rm -rf conftest*
11935   eval "ac_cv_header_$ac_safe=yes"
11936 else
11937   echo "$ac_err" >&5
11938   echo "configure: failed program was:" >&5
11939   cat conftest.$ac_ext >&5
11940   rm -rf conftest*
11941   eval "ac_cv_header_$ac_safe=no"
11942 fi
11943 rm -f conftest*
11944 fi
11945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11946   echo "$ac_t""yes" 1>&6
11947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11948   cat >> confdefs.h <<EOF
11949 #define $ac_tr_hdr 1
11950 EOF
11951  
11952 else
11953   echo "$ac_t""no" 1>&6
11954 fi
11955 done
11956
11957  echo $ac_n "checking for db""... $ac_c" 1>&6
11958 echo "configure:11959: checking for db" >&5
11959 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
11960   echo $ac_n "(cached) $ac_c" 1>&6
11961 else
11962   
11963         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11964                 ol_cv_gdbm=no
11965         else
11966                 ol_cv_gdbm=yes
11967         fi
11968
11969 fi
11970
11971 echo "$ac_t""$ol_cv_gdbm" 1>&6
11972  if test $ol_cv_gdbm = yes ; then
11973         cat >> confdefs.h <<\EOF
11974 #define HAVE_GDBM 1
11975 EOF
11976
11977  fi
11978
11979
11980         if test $ol_cv_gdbm = yes ; then
11981                 ol_link_ldbm=gdbm
11982                 ol_with_ldbm_api=gdbm
11983
11984                 if test $ol_cv_lib_gdbm != yes ; then
11985                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11986                 fi
11987         fi
11988 fi
11989
11990 if test $ol_with_ldbm_api = auto ; then
11991         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11992 elif test $ol_with_ldbm_api = ndbm ; then
11993         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11994 echo "configure:11995: checking for NDBM library" >&5
11995 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
11996   echo $ac_n "(cached) $ac_c" 1>&6
11997 else
11998         ol_LIBS="$LIBS"
11999         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12000 echo "configure:12001: checking for dbm_open" >&5
12001 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
12002   echo $ac_n "(cached) $ac_c" 1>&6
12003 else
12004   cat > conftest.$ac_ext <<EOF
12005 #line 12006 "configure"
12006 #include "confdefs.h"
12007 /* System header to define __stub macros and hopefully few prototypes,
12008     which can conflict with char dbm_open(); below.  */
12009 #include <assert.h>
12010 /* Override any gcc2 internal prototype to avoid an error.  */
12011 /* We use char because int might match the return type of a gcc2
12012     builtin and then its argument prototype would still apply.  */
12013 char dbm_open();
12014
12015 int main() {
12016
12017 /* The GNU C library defines this for functions which it implements
12018     to always fail with ENOSYS.  Some functions are actually named
12019     something starting with __ and the normal name is an alias.  */
12020 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12021 choke me
12022 #else
12023 dbm_open();
12024 #endif
12025
12026 ; return 0; }
12027 EOF
12028 if { (eval echo configure:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12029   rm -rf conftest*
12030   eval "ac_cv_func_dbm_open=yes"
12031 else
12032   echo "configure: failed program was:" >&5
12033   cat conftest.$ac_ext >&5
12034   rm -rf conftest*
12035   eval "ac_cv_func_dbm_open=no"
12036 fi
12037 rm -f conftest*
12038 fi
12039
12040 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12041   echo "$ac_t""yes" 1>&6
12042   ol_cv_lib_ndbm=yes
12043 else
12044   echo "$ac_t""no" 1>&6
12045
12046                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12047 echo "configure:12048: checking for dbm_open in -lndbm" >&5
12048 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
12049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12050   echo $ac_n "(cached) $ac_c" 1>&6
12051 else
12052   ac_save_LIBS="$LIBS"
12053 LIBS="-lndbm  $LIBS"
12054 cat > conftest.$ac_ext <<EOF
12055 #line 12056 "configure"
12056 #include "confdefs.h"
12057 /* Override any gcc2 internal prototype to avoid an error.  */
12058 /* We use char because int might match the return type of a gcc2
12059     builtin and then its argument prototype would still apply.  */
12060 char dbm_open();
12061
12062 int main() {
12063 dbm_open()
12064 ; return 0; }
12065 EOF
12066 if { (eval echo configure:12067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12067   rm -rf conftest*
12068   eval "ac_cv_lib_$ac_lib_var=yes"
12069 else
12070   echo "configure: failed program was:" >&5
12071   cat conftest.$ac_ext >&5
12072   rm -rf conftest*
12073   eval "ac_cv_lib_$ac_lib_var=no"
12074 fi
12075 rm -f conftest*
12076 LIBS="$ac_save_LIBS"
12077
12078 fi
12079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12080   echo "$ac_t""yes" 1>&6
12081   ol_cv_lib_ndbm=-lndbm
12082 else
12083   echo "$ac_t""no" 1>&6
12084
12085                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12086 echo "configure:12087: checking for dbm_open in -ldbm" >&5
12087 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12089   echo $ac_n "(cached) $ac_c" 1>&6
12090 else
12091   ac_save_LIBS="$LIBS"
12092 LIBS="-ldbm  $LIBS"
12093 cat > conftest.$ac_ext <<EOF
12094 #line 12095 "configure"
12095 #include "confdefs.h"
12096 /* Override any gcc2 internal prototype to avoid an error.  */
12097 /* We use char because int might match the return type of a gcc2
12098     builtin and then its argument prototype would still apply.  */
12099 char dbm_open();
12100
12101 int main() {
12102 dbm_open()
12103 ; return 0; }
12104 EOF
12105 if { (eval echo configure:12106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12106   rm -rf conftest*
12107   eval "ac_cv_lib_$ac_lib_var=yes"
12108 else
12109   echo "configure: failed program was:" >&5
12110   cat conftest.$ac_ext >&5
12111   rm -rf conftest*
12112   eval "ac_cv_lib_$ac_lib_var=no"
12113 fi
12114 rm -f conftest*
12115 LIBS="$ac_save_LIBS"
12116
12117 fi
12118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12119   echo "$ac_t""yes" 1>&6
12120   ol_cv_lib_ndbm=-ldbm
12121 else
12122   echo "$ac_t""no" 1>&6
12123 ol_cv_lib_ndbm=no
12124 fi
12125                 
12126 fi
12127
12128         
12129 fi
12130
12131         LIBS="$ol_LIBS"
12132
12133 fi
12134
12135 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12136
12137
12138  for ac_hdr in ndbm.h
12139 do
12140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12141 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12142 echo "configure:12143: checking for $ac_hdr" >&5
12143 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12144   echo $ac_n "(cached) $ac_c" 1>&6
12145 else
12146   cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149 #include <$ac_hdr>
12150 EOF
12151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12152 { (eval echo configure:12153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12154 if test -z "$ac_err"; then
12155   rm -rf conftest*
12156   eval "ac_cv_header_$ac_safe=yes"
12157 else
12158   echo "$ac_err" >&5
12159   echo "configure: failed program was:" >&5
12160   cat conftest.$ac_ext >&5
12161   rm -rf conftest*
12162   eval "ac_cv_header_$ac_safe=no"
12163 fi
12164 rm -f conftest*
12165 fi
12166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12167   echo "$ac_t""yes" 1>&6
12168     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12169   cat >> confdefs.h <<EOF
12170 #define $ac_tr_hdr 1
12171 EOF
12172  
12173 else
12174   echo "$ac_t""no" 1>&6
12175 fi
12176 done
12177
12178  echo $ac_n "checking for db""... $ac_c" 1>&6
12179 echo "configure:12180: checking for db" >&5
12180 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
12181   echo $ac_n "(cached) $ac_c" 1>&6
12182 else
12183   
12184         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12185                 ol_cv_ndbm=no
12186         else
12187                 ol_cv_ndbm=yes
12188         fi
12189
12190 fi
12191
12192 echo "$ac_t""$ol_cv_ndbm" 1>&6
12193  if test $ol_cv_ndbm = yes ; then
12194         cat >> confdefs.h <<\EOF
12195 #define HAVE_NDBM 1
12196 EOF
12197
12198  fi
12199
12200
12201         if test $ol_cv_ndbm = yes ; then
12202                 ol_link_ldbm=ndbm
12203                 ol_with_ldbm_api=ndbm
12204
12205                 if test $ol_cv_lib_ndbm != yes ; then
12206                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12207                 fi
12208         fi
12209 fi
12210
12211 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12212         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12213         if test $ol_enable_ldbm = yes ; then
12214                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12215         fi
12216
12217         echo "configure: warning: disabling LDBM" 1>&2
12218         ol_enable_ldbm=no
12219 fi
12220
12221 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12222         LINK_BINS_DYNAMIC="yes"
12223 else
12224         LINK_BINS_DYNAMIC="no"
12225 fi
12226
12227 if test $ol_enable_wrappers != no ; then
12228         for ac_hdr in tcpd.h
12229 do
12230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12232 echo "configure:12233: checking for $ac_hdr" >&5
12233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12234   echo $ac_n "(cached) $ac_c" 1>&6
12235 else
12236   cat > conftest.$ac_ext <<EOF
12237 #line 12238 "configure"
12238 #include "confdefs.h"
12239 #include <$ac_hdr>
12240 EOF
12241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12242 { (eval echo configure:12243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12244 if test -z "$ac_err"; then
12245   rm -rf conftest*
12246   eval "ac_cv_header_$ac_safe=yes"
12247 else
12248   echo "$ac_err" >&5
12249   echo "configure: failed program was:" >&5
12250   cat conftest.$ac_ext >&5
12251   rm -rf conftest*
12252   eval "ac_cv_header_$ac_safe=no"
12253 fi
12254 rm -f conftest*
12255 fi
12256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12257   echo "$ac_t""yes" 1>&6
12258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12259   cat >> confdefs.h <<EOF
12260 #define $ac_tr_hdr 1
12261 EOF
12262  
12263 else
12264   echo "$ac_t""no" 1>&6
12265 fi
12266 done
12267
12268
12269         if test $ac_cv_header_tcpd_h != yes ; then
12270                 have_wrappers=no
12271         else
12272                 cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275
12276 int allow_severity = 0;
12277 int deny_severity  = 0;
12278                 
12279 int main() {
12280 hosts_access()
12281 ; return 0; }
12282 EOF
12283 if { (eval echo configure:12284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12284   rm -rf conftest*
12285   have_wrappers=yes
12286 else
12287   echo "configure: failed program was:" >&5
12288   cat conftest.$ac_ext >&5
12289   rm -rf conftest*
12290   have_wrappers=no
12291 fi
12292 rm -f conftest*
12293         fi
12294
12295         if test $have_wrappers = yes ; then
12296                 cat >> confdefs.h <<\EOF
12297 #define HAVE_TCPD 1
12298 EOF
12299
12300                 WRAP_LIBS="-lwrap"
12301
12302                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12303 echo "configure:12304: checking for main in -lnsl" >&5
12304 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
12305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12306   echo $ac_n "(cached) $ac_c" 1>&6
12307 else
12308   ac_save_LIBS="$LIBS"
12309 LIBS="-lnsl  $LIBS"
12310 cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313
12314 int main() {
12315 main()
12316 ; return 0; }
12317 EOF
12318 if { (eval echo configure:12319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12319   rm -rf conftest*
12320   eval "ac_cv_lib_$ac_lib_var=yes"
12321 else
12322   echo "configure: failed program was:" >&5
12323   cat conftest.$ac_ext >&5
12324   rm -rf conftest*
12325   eval "ac_cv_lib_$ac_lib_var=no"
12326 fi
12327 rm -f conftest*
12328 LIBS="$ac_save_LIBS"
12329
12330 fi
12331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12332   echo "$ac_t""yes" 1>&6
12333     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12334     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12335   cat >> confdefs.h <<EOF
12336 #define $ac_tr_lib 1
12337 EOF
12338
12339   LIBS="-lnsl $LIBS"
12340
12341 else
12342   echo "$ac_t""no" 1>&6
12343 fi
12344
12345         else
12346                 echo "configure: warning: could not find -lwrap" 1>&2
12347                 if test $ol_enable_wrappers = yes ; then
12348                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12349                 fi
12350
12351                 echo "configure: warning: disabling wrappers support" 1>&2
12352                 ol_enable_wrappers=no
12353                 WRAP_LIBS=""
12354         fi
12355 fi
12356
12357 if test $ol_enable_syslog != no ; then
12358         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12359 echo "configure:12360: checking for openlog" >&5
12360 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
12361   echo $ac_n "(cached) $ac_c" 1>&6
12362 else
12363   cat > conftest.$ac_ext <<EOF
12364 #line 12365 "configure"
12365 #include "confdefs.h"
12366 /* System header to define __stub macros and hopefully few prototypes,
12367     which can conflict with char openlog(); below.  */
12368 #include <assert.h>
12369 /* Override any gcc2 internal prototype to avoid an error.  */
12370 /* We use char because int might match the return type of a gcc2
12371     builtin and then its argument prototype would still apply.  */
12372 char openlog();
12373
12374 int main() {
12375
12376 /* The GNU C library defines this for functions which it implements
12377     to always fail with ENOSYS.  Some functions are actually named
12378     something starting with __ and the normal name is an alias.  */
12379 #if defined (__stub_openlog) || defined (__stub___openlog)
12380 choke me
12381 #else
12382 openlog();
12383 #endif
12384
12385 ; return 0; }
12386 EOF
12387 if { (eval echo configure:12388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12388   rm -rf conftest*
12389   eval "ac_cv_func_openlog=yes"
12390 else
12391   echo "configure: failed program was:" >&5
12392   cat conftest.$ac_ext >&5
12393   rm -rf conftest*
12394   eval "ac_cv_func_openlog=no"
12395 fi
12396 rm -f conftest*
12397 fi
12398
12399 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12400   echo "$ac_t""yes" 1>&6
12401   :
12402 else
12403   echo "$ac_t""no" 1>&6
12404 fi
12405
12406         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12407                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12408         fi
12409         ol_enable_syslog=$ac_cv_func_openlog
12410 fi
12411
12412 if test $ol_enable_dmalloc != no ; then
12413         for ac_hdr in dmalloc.h
12414 do
12415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12417 echo "configure:12418: checking for $ac_hdr" >&5
12418 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12419   echo $ac_n "(cached) $ac_c" 1>&6
12420 else
12421   cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 #include <$ac_hdr>
12425 EOF
12426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12427 { (eval echo configure:12428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12429 if test -z "$ac_err"; then
12430   rm -rf conftest*
12431   eval "ac_cv_header_$ac_safe=yes"
12432 else
12433   echo "$ac_err" >&5
12434   echo "configure: failed program was:" >&5
12435   cat conftest.$ac_ext >&5
12436   rm -rf conftest*
12437   eval "ac_cv_header_$ac_safe=no"
12438 fi
12439 rm -f conftest*
12440 fi
12441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12442   echo "$ac_t""yes" 1>&6
12443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12444   cat >> confdefs.h <<EOF
12445 #define $ac_tr_hdr 1
12446 EOF
12447  
12448 else
12449   echo "$ac_t""no" 1>&6
12450 fi
12451 done
12452
12453         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12454 echo "configure:12455: checking for dmalloc_shutdown in -ldmalloc" >&5
12455 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
12456 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12457   echo $ac_n "(cached) $ac_c" 1>&6
12458 else
12459   ac_save_LIBS="$LIBS"
12460 LIBS="-ldmalloc  $LIBS"
12461 cat > conftest.$ac_ext <<EOF
12462 #line 12463 "configure"
12463 #include "confdefs.h"
12464 /* Override any gcc2 internal prototype to avoid an error.  */
12465 /* We use char because int might match the return type of a gcc2
12466     builtin and then its argument prototype would still apply.  */
12467 char dmalloc_shutdown();
12468
12469 int main() {
12470 dmalloc_shutdown()
12471 ; return 0; }
12472 EOF
12473 if { (eval echo configure:12474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12474   rm -rf conftest*
12475   eval "ac_cv_lib_$ac_lib_var=yes"
12476 else
12477   echo "configure: failed program was:" >&5
12478   cat conftest.$ac_ext >&5
12479   rm -rf conftest*
12480   eval "ac_cv_lib_$ac_lib_var=no"
12481 fi
12482 rm -f conftest*
12483 LIBS="$ac_save_LIBS"
12484
12485 fi
12486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12487   echo "$ac_t""yes" 1>&6
12488     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12489     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12490   cat >> confdefs.h <<EOF
12491 #define $ac_tr_lib 1
12492 EOF
12493
12494   LIBS="-ldmalloc $LIBS"
12495
12496 else
12497   echo "$ac_t""no" 1>&6
12498 fi
12499
12500 fi
12501
12502 if test $ol_enable_tcl != no ; then
12503         for ac_hdr in tcl.h
12504 do
12505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12507 echo "configure:12508: checking for $ac_hdr" >&5
12508 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12509   echo $ac_n "(cached) $ac_c" 1>&6
12510 else
12511   cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514 #include <$ac_hdr>
12515 EOF
12516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12517 { (eval echo configure:12518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12519 if test -z "$ac_err"; then
12520   rm -rf conftest*
12521   eval "ac_cv_header_$ac_safe=yes"
12522 else
12523   echo "$ac_err" >&5
12524   echo "configure: failed program was:" >&5
12525   cat conftest.$ac_ext >&5
12526   rm -rf conftest*
12527   eval "ac_cv_header_$ac_safe=no"
12528 fi
12529 rm -f conftest*
12530 fi
12531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12532   echo "$ac_t""yes" 1>&6
12533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12534   cat >> confdefs.h <<EOF
12535 #define $ac_tr_hdr 1
12536 EOF
12537  
12538 else
12539   echo "$ac_t""no" 1>&6
12540 fi
12541 done
12542
12543
12544         if test $ac_cv_header_tcl_h != yes ; then
12545                 have_tcl=no
12546         else
12547                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12548                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12549 echo "configure:12550: checking for main in -l$lib" >&5
12550 ac_lib_var=`echo $lib'_'main | sed 'y%./+-%__p_%'`
12551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   ac_save_LIBS="$LIBS"
12555 LIBS="-l$lib  $LIBS"
12556 cat > conftest.$ac_ext <<EOF
12557 #line 12558 "configure"
12558 #include "confdefs.h"
12559
12560 int main() {
12561 main()
12562 ; return 0; }
12563 EOF
12564 if { (eval echo configure:12565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12565   rm -rf conftest*
12566   eval "ac_cv_lib_$ac_lib_var=yes"
12567 else
12568   echo "configure: failed program was:" >&5
12569   cat conftest.$ac_ext >&5
12570   rm -rf conftest*
12571   eval "ac_cv_lib_$ac_lib_var=no"
12572 fi
12573 rm -f conftest*
12574 LIBS="$ac_save_LIBS"
12575
12576 fi
12577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12578   echo "$ac_t""yes" 1>&6
12579   have_tcl=yes
12580                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12581                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12582                            else
12583                                MOD_TCL_LIB="-l${lib}"
12584                            fi;break
12585 else
12586   echo "$ac_t""no" 1>&6
12587 have_tcl=no
12588 fi
12589
12590                 done
12591         fi
12592
12593         if test $have_tcl != yes ; then
12594                 echo "configure: warning: could not find -ltcl" 1>&2
12595                 if test $ol_enable_tcl = yes ; then
12596                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12597                 fi
12598
12599                 ol_enable_tcl=no
12600         fi
12601 fi
12602
12603 ol_link_termcap=no
12604 for ac_hdr in termcap.h ncurses.h
12605 do
12606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12608 echo "configure:12609: checking for $ac_hdr" >&5
12609 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12610   echo $ac_n "(cached) $ac_c" 1>&6
12611 else
12612   cat > conftest.$ac_ext <<EOF
12613 #line 12614 "configure"
12614 #include "confdefs.h"
12615 #include <$ac_hdr>
12616 EOF
12617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12618 { (eval echo configure:12619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12620 if test -z "$ac_err"; then
12621   rm -rf conftest*
12622   eval "ac_cv_header_$ac_safe=yes"
12623 else
12624   echo "$ac_err" >&5
12625   echo "configure: failed program was:" >&5
12626   cat conftest.$ac_ext >&5
12627   rm -rf conftest*
12628   eval "ac_cv_header_$ac_safe=no"
12629 fi
12630 rm -f conftest*
12631 fi
12632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12633   echo "$ac_t""yes" 1>&6
12634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12635   cat >> confdefs.h <<EOF
12636 #define $ac_tr_hdr 1
12637 EOF
12638  
12639 else
12640   echo "$ac_t""no" 1>&6
12641 fi
12642 done
12643
12644
12645 if test $ol_link_termcap = no ; then
12646         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12647 echo "configure:12648: checking for tputs in -ltermcap" >&5
12648 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
12649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12650   echo $ac_n "(cached) $ac_c" 1>&6
12651 else
12652   ac_save_LIBS="$LIBS"
12653 LIBS="-ltermcap  $LIBS"
12654 cat > conftest.$ac_ext <<EOF
12655 #line 12656 "configure"
12656 #include "confdefs.h"
12657 /* Override any gcc2 internal prototype to avoid an error.  */
12658 /* We use char because int might match the return type of a gcc2
12659     builtin and then its argument prototype would still apply.  */
12660 char tputs();
12661
12662 int main() {
12663 tputs()
12664 ; return 0; }
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12667   rm -rf conftest*
12668   eval "ac_cv_lib_$ac_lib_var=yes"
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -rf conftest*
12673   eval "ac_cv_lib_$ac_lib_var=no"
12674 fi
12675 rm -f conftest*
12676 LIBS="$ac_save_LIBS"
12677
12678 fi
12679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12680   echo "$ac_t""yes" 1>&6
12681   have_termcap=yes
12682 else
12683   echo "$ac_t""no" 1>&6
12684 have_termcap=no
12685 fi
12686
12687         if test $have_termcap = yes ; then
12688                 cat >> confdefs.h <<\EOF
12689 #define HAVE_TERMCAP 1
12690 EOF
12691
12692                 ol_link_termcap=yes
12693                 TERMCAP_LIBS=-ltermcap
12694         fi
12695 fi
12696
12697 if test $ol_link_termcap = no ; then
12698         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12699 echo "configure:12700: checking for initscr in -lncurses" >&5
12700 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
12701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12702   echo $ac_n "(cached) $ac_c" 1>&6
12703 else
12704   ac_save_LIBS="$LIBS"
12705 LIBS="-lncurses  $LIBS"
12706 cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 /* Override any gcc2 internal prototype to avoid an error.  */
12710 /* We use char because int might match the return type of a gcc2
12711     builtin and then its argument prototype would still apply.  */
12712 char initscr();
12713
12714 int main() {
12715 initscr()
12716 ; return 0; }
12717 EOF
12718 if { (eval echo configure:12719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12719   rm -rf conftest*
12720   eval "ac_cv_lib_$ac_lib_var=yes"
12721 else
12722   echo "configure: failed program was:" >&5
12723   cat conftest.$ac_ext >&5
12724   rm -rf conftest*
12725   eval "ac_cv_lib_$ac_lib_var=no"
12726 fi
12727 rm -f conftest*
12728 LIBS="$ac_save_LIBS"
12729
12730 fi
12731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12732   echo "$ac_t""yes" 1>&6
12733   have_ncurses=yes
12734 else
12735   echo "$ac_t""no" 1>&6
12736 have_ncurses=no
12737 fi
12738
12739         if test $have_ncurses = yes ; then
12740                 cat >> confdefs.h <<\EOF
12741 #define HAVE_NCURSES 1
12742 EOF
12743
12744                 ol_link_termcap=yes
12745                 TERMCAP_LIBS=-lncurses
12746         fi
12747 fi
12748
12749 if test $ol_link_termcap = no ; then
12750         cat >> confdefs.h <<\EOF
12751 #define NO_TERMCAP 1
12752 EOF
12753
12754         TERMCAP_LIBS=
12755 fi
12756
12757 ol_link_sasl=no
12758 if test $ol_with_cyrus_sasl != no ; then
12759         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12760 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12761 echo "configure:12762: checking for sasl.h" >&5
12762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12763   echo $ac_n "(cached) $ac_c" 1>&6
12764 else
12765   cat > conftest.$ac_ext <<EOF
12766 #line 12767 "configure"
12767 #include "confdefs.h"
12768 #include <sasl.h>
12769 EOF
12770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12771 { (eval echo configure:12772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12773 if test -z "$ac_err"; then
12774   rm -rf conftest*
12775   eval "ac_cv_header_$ac_safe=yes"
12776 else
12777   echo "$ac_err" >&5
12778   echo "configure: failed program was:" >&5
12779   cat conftest.$ac_ext >&5
12780   rm -rf conftest*
12781   eval "ac_cv_header_$ac_safe=no"
12782 fi
12783 rm -f conftest*
12784 fi
12785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12786   echo "$ac_t""yes" 1>&6
12787   :
12788 else
12789   echo "$ac_t""no" 1>&6
12790 fi
12791
12792
12793         if test $ac_cv_header_sasl_h = yes ; then
12794                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12795 echo "configure:12796: checking for sasl_client_init in -lsasl" >&5
12796 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
12797 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12798   echo $ac_n "(cached) $ac_c" 1>&6
12799 else
12800   ac_save_LIBS="$LIBS"
12801 LIBS="-lsasl  $LIBS"
12802 cat > conftest.$ac_ext <<EOF
12803 #line 12804 "configure"
12804 #include "confdefs.h"
12805 /* Override any gcc2 internal prototype to avoid an error.  */
12806 /* We use char because int might match the return type of a gcc2
12807     builtin and then its argument prototype would still apply.  */
12808 char sasl_client_init();
12809
12810 int main() {
12811 sasl_client_init()
12812 ; return 0; }
12813 EOF
12814 if { (eval echo configure:12815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12815   rm -rf conftest*
12816   eval "ac_cv_lib_$ac_lib_var=yes"
12817 else
12818   echo "configure: failed program was:" >&5
12819   cat conftest.$ac_ext >&5
12820   rm -rf conftest*
12821   eval "ac_cv_lib_$ac_lib_var=no"
12822 fi
12823 rm -f conftest*
12824 LIBS="$ac_save_LIBS"
12825
12826 fi
12827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12828   echo "$ac_t""yes" 1>&6
12829   have_cyrus_sasl=yes
12830 else
12831   echo "$ac_t""no" 1>&6
12832 have_cyrus_sasl=no
12833 fi
12834
12835
12836                 if test $have_cyrus_sasl != no ; then
12837                         SASL_LIBS="-lsasl"
12838                         cat >> confdefs.h <<\EOF
12839 #define HAVE_CYRUS_SASL 1
12840 EOF
12841
12842                         ol_link_sasl=yes
12843                 fi
12844         fi
12845
12846         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12847                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12848         fi
12849 fi
12850
12851 if test $cross_compiling != yes ; then
12852         dev=no
12853         if test -r /dev/urandom ; then
12854                 dev="/dev/urandom";
12855         elif test -r /idev/urandom ; then
12856                 dev="/idev/urandom";
12857         elif test -r /dev/srandom ; then
12858                 dev="/dev/srandom";
12859         elif test -r /dev/random ; then
12860                 dev="/dev/random";
12861         elif test -r /idev/random ; then
12862                 dev="/idev/random";
12863         fi
12864
12865         if test $dev != no ; then
12866                 cat >> confdefs.h <<EOF
12867 #define URANDOM_DEVICE "$dev"
12868 EOF
12869
12870         fi
12871 fi
12872
12873 ol_link_fetch=no
12874 if test $ol_with_fetch != no ; then
12875         ol=$LIBS
12876 LIBS="-lfetch -lcom_err $LIBS"
12877 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12878 echo "configure:12879: checking fetch(3) library" >&5
12879 if eval "test \"`echo '$''{'ol_cv_lib_fetch'+set}'`\" = set"; then
12880   echo $ac_n "(cached) $ac_c" 1>&6
12881 else
12882   
12883         cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886
12887 #include <sys/param.h>
12888 #include <stdio.h>
12889 #include <fetch.h>
12890 int main() {
12891 struct url *u = fetchParseURL("file:///"); 
12892 ; return 0; }
12893 EOF
12894 if { (eval echo configure:12895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12895   rm -rf conftest*
12896   ol_cv_lib_fetch=yes
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   ol_cv_lib_fetch=no
12902 fi
12903 rm -f conftest*
12904 fi
12905
12906 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12907 LIBS=$ol_LIBS
12908 if test $ol_cv_lib_fetch != no ; then
12909         ol_link_fetch="-lfetch -lcom_err"
12910         cat >> confdefs.h <<\EOF
12911 #define HAVE_FETCH 1
12912 EOF
12913
12914 fi
12915
12916
12917         if test $ol_cv_lib_fetch != no ; then
12918                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12919                 ol_link_fetch=freebsd
12920
12921         elif test $ol_with_fetch != auto ; then
12922                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12923         fi 
12924 fi
12925
12926 ol_link_readline=no
12927 if test $ol_with_readline != no ; then
12928         for ac_hdr in readline/readline.h readline/history.h
12929 do
12930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12932 echo "configure:12933: checking for $ac_hdr" >&5
12933 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12934   echo $ac_n "(cached) $ac_c" 1>&6
12935 else
12936   cat > conftest.$ac_ext <<EOF
12937 #line 12938 "configure"
12938 #include "confdefs.h"
12939 #include <$ac_hdr>
12940 EOF
12941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12942 { (eval echo configure:12943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12944 if test -z "$ac_err"; then
12945   rm -rf conftest*
12946   eval "ac_cv_header_$ac_safe=yes"
12947 else
12948   echo "$ac_err" >&5
12949   echo "configure: failed program was:" >&5
12950   cat conftest.$ac_ext >&5
12951   rm -rf conftest*
12952   eval "ac_cv_header_$ac_safe=no"
12953 fi
12954 rm -f conftest*
12955 fi
12956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12957   echo "$ac_t""yes" 1>&6
12958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12959   cat >> confdefs.h <<EOF
12960 #define $ac_tr_hdr 1
12961 EOF
12962  
12963 else
12964   echo "$ac_t""no" 1>&6
12965 fi
12966 done
12967
12968
12969         if test $ac_cv_header_readline_readline_h = yes ; then
12970                 save_LIBS="$LIBS"
12971                 LIBS="$TERMCAP_LIBS $LIBS"
12972                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12973 echo "configure:12974: checking for readline in -lreadline" >&5
12974 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
12975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12976   echo $ac_n "(cached) $ac_c" 1>&6
12977 else
12978   ac_save_LIBS="$LIBS"
12979 LIBS="-lreadline  $LIBS"
12980 cat > conftest.$ac_ext <<EOF
12981 #line 12982 "configure"
12982 #include "confdefs.h"
12983 /* Override any gcc2 internal prototype to avoid an error.  */
12984 /* We use char because int might match the return type of a gcc2
12985     builtin and then its argument prototype would still apply.  */
12986 char readline();
12987
12988 int main() {
12989 readline()
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12993   rm -rf conftest*
12994   eval "ac_cv_lib_$ac_lib_var=yes"
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   eval "ac_cv_lib_$ac_lib_var=no"
13000 fi
13001 rm -f conftest*
13002 LIBS="$ac_save_LIBS"
13003
13004 fi
13005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13006   echo "$ac_t""yes" 1>&6
13007   have_readline=yes
13008 else
13009   echo "$ac_t""no" 1>&6
13010 have_readline=no
13011 fi
13012
13013                 LIBS="$save_LIBS"
13014                         
13015                 if test $have_readline = yes ; then
13016                         ol_with_readline=found
13017                         ol_link_readline=yes
13018
13019                         READLINE_LIBS="-lreadline"
13020                 fi
13021         fi
13022 fi
13023
13024 if test $ol_link_readline = yes ; then
13025         cat >> confdefs.h <<\EOF
13026 #define HAVE_READLINE 1
13027 EOF
13028
13029 fi
13030
13031
13032 if test $ol_enable_crypt != no ; then
13033         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13034 echo "configure:13035: checking for crypt" >&5
13035 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
13036   echo $ac_n "(cached) $ac_c" 1>&6
13037 else
13038   cat > conftest.$ac_ext <<EOF
13039 #line 13040 "configure"
13040 #include "confdefs.h"
13041 /* System header to define __stub macros and hopefully few prototypes,
13042     which can conflict with char crypt(); below.  */
13043 #include <assert.h>
13044 /* Override any gcc2 internal prototype to avoid an error.  */
13045 /* We use char because int might match the return type of a gcc2
13046     builtin and then its argument prototype would still apply.  */
13047 char crypt();
13048
13049 int main() {
13050
13051 /* The GNU C library defines this for functions which it implements
13052     to always fail with ENOSYS.  Some functions are actually named
13053     something starting with __ and the normal name is an alias.  */
13054 #if defined (__stub_crypt) || defined (__stub___crypt)
13055 choke me
13056 #else
13057 crypt();
13058 #endif
13059
13060 ; return 0; }
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13063   rm -rf conftest*
13064   eval "ac_cv_func_crypt=yes"
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   eval "ac_cv_func_crypt=no"
13070 fi
13071 rm -f conftest*
13072 fi
13073
13074 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13075   echo "$ac_t""yes" 1>&6
13076   have_crypt=yes
13077 else
13078   echo "$ac_t""no" 1>&6
13079
13080                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13081 echo "configure:13082: checking for crypt in -lcrypt" >&5
13082 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
13083 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13084   echo $ac_n "(cached) $ac_c" 1>&6
13085 else
13086   ac_save_LIBS="$LIBS"
13087 LIBS="-lcrypt  $LIBS"
13088 cat > conftest.$ac_ext <<EOF
13089 #line 13090 "configure"
13090 #include "confdefs.h"
13091 /* Override any gcc2 internal prototype to avoid an error.  */
13092 /* We use char because int might match the return type of a gcc2
13093     builtin and then its argument prototype would still apply.  */
13094 char crypt();
13095
13096 int main() {
13097 crypt()
13098 ; return 0; }
13099 EOF
13100 if { (eval echo configure:13101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13101   rm -rf conftest*
13102   eval "ac_cv_lib_$ac_lib_var=yes"
13103 else
13104   echo "configure: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   rm -rf conftest*
13107   eval "ac_cv_lib_$ac_lib_var=no"
13108 fi
13109 rm -f conftest*
13110 LIBS="$ac_save_LIBS"
13111
13112 fi
13113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13114   echo "$ac_t""yes" 1>&6
13115   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13116                         have_crypt=yes
13117 else
13118   echo "$ac_t""no" 1>&6
13119 have_crypt=no
13120 fi
13121
13122 fi
13123
13124
13125         if test $have_crypt = yes ; then
13126                 cat >> confdefs.h <<\EOF
13127 #define HAVE_CRYPT 1
13128 EOF
13129
13130         else
13131                 echo "configure: warning: could not find crypt" 1>&2
13132                 if test $ol_enable_crypt = yes ; then
13133                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13134                 fi
13135
13136                 echo "configure: warning: disabling crypt support" 1>&2
13137                 ol_enable_crypt=no
13138         fi
13139 fi
13140
13141 if test $ol_enable_proctitle != no ; then
13142         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13143 echo "configure:13144: checking for setproctitle" >&5
13144 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
13145   echo $ac_n "(cached) $ac_c" 1>&6
13146 else
13147   cat > conftest.$ac_ext <<EOF
13148 #line 13149 "configure"
13149 #include "confdefs.h"
13150 /* System header to define __stub macros and hopefully few prototypes,
13151     which can conflict with char setproctitle(); below.  */
13152 #include <assert.h>
13153 /* Override any gcc2 internal prototype to avoid an error.  */
13154 /* We use char because int might match the return type of a gcc2
13155     builtin and then its argument prototype would still apply.  */
13156 char setproctitle();
13157
13158 int main() {
13159
13160 /* The GNU C library defines this for functions which it implements
13161     to always fail with ENOSYS.  Some functions are actually named
13162     something starting with __ and the normal name is an alias.  */
13163 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13164 choke me
13165 #else
13166 setproctitle();
13167 #endif
13168
13169 ; return 0; }
13170 EOF
13171 if { (eval echo configure:13172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13172   rm -rf conftest*
13173   eval "ac_cv_func_setproctitle=yes"
13174 else
13175   echo "configure: failed program was:" >&5
13176   cat conftest.$ac_ext >&5
13177   rm -rf conftest*
13178   eval "ac_cv_func_setproctitle=no"
13179 fi
13180 rm -f conftest*
13181 fi
13182
13183 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13184   echo "$ac_t""yes" 1>&6
13185   have_setproctitle=yes
13186 else
13187   echo "$ac_t""no" 1>&6
13188
13189                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13190 echo "configure:13191: checking for setproctitle in -lutil" >&5
13191 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
13192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13193   echo $ac_n "(cached) $ac_c" 1>&6
13194 else
13195   ac_save_LIBS="$LIBS"
13196 LIBS="-lutil  $LIBS"
13197 cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200 /* Override any gcc2 internal prototype to avoid an error.  */
13201 /* We use char because int might match the return type of a gcc2
13202     builtin and then its argument prototype would still apply.  */
13203 char setproctitle();
13204
13205 int main() {
13206 setproctitle()
13207 ; return 0; }
13208 EOF
13209 if { (eval echo configure:13210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13210   rm -rf conftest*
13211   eval "ac_cv_lib_$ac_lib_var=yes"
13212 else
13213   echo "configure: failed program was:" >&5
13214   cat conftest.$ac_ext >&5
13215   rm -rf conftest*
13216   eval "ac_cv_lib_$ac_lib_var=no"
13217 fi
13218 rm -f conftest*
13219 LIBS="$ac_save_LIBS"
13220
13221 fi
13222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13223   echo "$ac_t""yes" 1>&6
13224   have_setproctitle=yes
13225                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13226 else
13227   echo "$ac_t""no" 1>&6
13228 have_setproctitle=no
13229                         LIBOBJS="$LIBOBJS setproctitle.o"
13230                         LIBSRCS="$LIBSRCS setproctitle.c"
13231 fi
13232
13233 fi
13234
13235
13236         if test $have_setproctitle = yes ; then
13237                 cat >> confdefs.h <<\EOF
13238 #define HAVE_SETPROCTITLE 1
13239 EOF
13240
13241         fi
13242 fi
13243
13244 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13245 echo "configure:13246: checking for ANSI C header files" >&5
13246 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
13247   echo $ac_n "(cached) $ac_c" 1>&6
13248 else
13249   cat > conftest.$ac_ext <<EOF
13250 #line 13251 "configure"
13251 #include "confdefs.h"
13252 #include <stdlib.h>
13253 #include <stdarg.h>
13254 #include <string.h>
13255 #include <float.h>
13256 EOF
13257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13258 { (eval echo configure:13259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13260 if test -z "$ac_err"; then
13261   rm -rf conftest*
13262   ac_cv_header_stdc=yes
13263 else
13264   echo "$ac_err" >&5
13265   echo "configure: failed program was:" >&5
13266   cat conftest.$ac_ext >&5
13267   rm -rf conftest*
13268   ac_cv_header_stdc=no
13269 fi
13270 rm -f conftest*
13271
13272 if test $ac_cv_header_stdc = yes; then
13273   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13274 cat > conftest.$ac_ext <<EOF
13275 #line 13276 "configure"
13276 #include "confdefs.h"
13277 #include <string.h>
13278 EOF
13279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13280   egrep "memchr" >/dev/null 2>&1; then
13281   :
13282 else
13283   rm -rf conftest*
13284   ac_cv_header_stdc=no
13285 fi
13286 rm -f conftest*
13287
13288 fi
13289
13290 if test $ac_cv_header_stdc = yes; then
13291   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13292 cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 #include <stdlib.h>
13296 EOF
13297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13298   egrep "free" >/dev/null 2>&1; then
13299   :
13300 else
13301   rm -rf conftest*
13302   ac_cv_header_stdc=no
13303 fi
13304 rm -f conftest*
13305
13306 fi
13307
13308 if test $ac_cv_header_stdc = yes; then
13309   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13310 if test "$cross_compiling" = yes; then
13311   :
13312 else
13313   cat > conftest.$ac_ext <<EOF
13314 #line 13315 "configure"
13315 #include "confdefs.h"
13316 #include <ctype.h>
13317 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13318 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13319 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13320 int main () { int i; for (i = 0; i < 256; i++)
13321 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13322 exit (0); }
13323
13324 EOF
13325 if { (eval echo configure:13326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13326 then
13327   :
13328 else
13329   echo "configure: failed program was:" >&5
13330   cat conftest.$ac_ext >&5
13331   rm -fr conftest*
13332   ac_cv_header_stdc=no
13333 fi
13334 rm -fr conftest*
13335 fi
13336
13337 fi
13338 fi
13339
13340 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13341 if test $ac_cv_header_stdc = yes; then
13342   cat >> confdefs.h <<\EOF
13343 #define STDC_HEADERS 1
13344 EOF
13345
13346 fi
13347
13348 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13349 echo "configure:13350: checking for mode_t" >&5
13350 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
13351   echo $ac_n "(cached) $ac_c" 1>&6
13352 else
13353   cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 #include <sys/types.h>
13357 #if STDC_HEADERS
13358 #include <stdlib.h>
13359 #include <stddef.h>
13360 #endif
13361 EOF
13362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13363   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13364   rm -rf conftest*
13365   ac_cv_type_mode_t=yes
13366 else
13367   rm -rf conftest*
13368   ac_cv_type_mode_t=no
13369 fi
13370 rm -f conftest*
13371
13372 fi
13373 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
13374 if test $ac_cv_type_mode_t = no; then
13375   cat >> confdefs.h <<\EOF
13376 #define mode_t int
13377 EOF
13378
13379 fi
13380
13381 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13382 echo "configure:13383: checking for off_t" >&5
13383 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
13384   echo $ac_n "(cached) $ac_c" 1>&6
13385 else
13386   cat > conftest.$ac_ext <<EOF
13387 #line 13388 "configure"
13388 #include "confdefs.h"
13389 #include <sys/types.h>
13390 #if STDC_HEADERS
13391 #include <stdlib.h>
13392 #include <stddef.h>
13393 #endif
13394 EOF
13395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13396   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13397   rm -rf conftest*
13398   ac_cv_type_off_t=yes
13399 else
13400   rm -rf conftest*
13401   ac_cv_type_off_t=no
13402 fi
13403 rm -f conftest*
13404
13405 fi
13406 echo "$ac_t""$ac_cv_type_off_t" 1>&6
13407 if test $ac_cv_type_off_t = no; then
13408   cat >> confdefs.h <<\EOF
13409 #define off_t long
13410 EOF
13411
13412 fi
13413
13414 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13415 echo "configure:13416: checking for pid_t" >&5
13416 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
13417   echo $ac_n "(cached) $ac_c" 1>&6
13418 else
13419   cat > conftest.$ac_ext <<EOF
13420 #line 13421 "configure"
13421 #include "confdefs.h"
13422 #include <sys/types.h>
13423 #if STDC_HEADERS
13424 #include <stdlib.h>
13425 #include <stddef.h>
13426 #endif
13427 EOF
13428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13429   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13430   rm -rf conftest*
13431   ac_cv_type_pid_t=yes
13432 else
13433   rm -rf conftest*
13434   ac_cv_type_pid_t=no
13435 fi
13436 rm -f conftest*
13437
13438 fi
13439 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
13440 if test $ac_cv_type_pid_t = no; then
13441   cat >> confdefs.h <<\EOF
13442 #define pid_t int
13443 EOF
13444
13445 fi
13446
13447 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13448 echo "configure:13449: checking for ptrdiff_t" >&5
13449 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
13450   echo $ac_n "(cached) $ac_c" 1>&6
13451 else
13452   cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 #include <stddef.h>
13456 int main() {
13457 ptrdiff_t p
13458 ; return 0; }
13459 EOF
13460 if { (eval echo configure:13461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13461   rm -rf conftest*
13462   am_cv_type_ptrdiff_t=yes
13463 else
13464   echo "configure: failed program was:" >&5
13465   cat conftest.$ac_ext >&5
13466   rm -rf conftest*
13467   am_cv_type_ptrdiff_t=no
13468 fi
13469 rm -f conftest*
13470 fi
13471
13472 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13473    if test $am_cv_type_ptrdiff_t = yes; then
13474      cat >> confdefs.h <<\EOF
13475 #define HAVE_PTRDIFF_T 1
13476 EOF
13477
13478    fi
13479
13480 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13481 echo "configure:13482: checking return type of signal handlers" >&5
13482 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
13483   echo $ac_n "(cached) $ac_c" 1>&6
13484 else
13485   cat > conftest.$ac_ext <<EOF
13486 #line 13487 "configure"
13487 #include "confdefs.h"
13488 #include <sys/types.h>
13489 #include <signal.h>
13490 #ifdef signal
13491 #undef signal
13492 #endif
13493 #ifdef __cplusplus
13494 extern "C" void (*signal (int, void (*)(int)))(int);
13495 #else
13496 void (*signal ()) ();
13497 #endif
13498
13499 int main() {
13500 int i;
13501 ; return 0; }
13502 EOF
13503 if { (eval echo configure:13504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13504   rm -rf conftest*
13505   ac_cv_type_signal=void
13506 else
13507   echo "configure: failed program was:" >&5
13508   cat conftest.$ac_ext >&5
13509   rm -rf conftest*
13510   ac_cv_type_signal=int
13511 fi
13512 rm -f conftest*
13513 fi
13514
13515 echo "$ac_t""$ac_cv_type_signal" 1>&6
13516 cat >> confdefs.h <<EOF
13517 #define RETSIGTYPE $ac_cv_type_signal
13518 EOF
13519
13520
13521 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13522 echo "configure:13523: checking for size_t" >&5
13523 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
13524   echo $ac_n "(cached) $ac_c" 1>&6
13525 else
13526   cat > conftest.$ac_ext <<EOF
13527 #line 13528 "configure"
13528 #include "confdefs.h"
13529 #include <sys/types.h>
13530 #if STDC_HEADERS
13531 #include <stdlib.h>
13532 #include <stddef.h>
13533 #endif
13534 EOF
13535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13536   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13537   rm -rf conftest*
13538   ac_cv_type_size_t=yes
13539 else
13540   rm -rf conftest*
13541   ac_cv_type_size_t=no
13542 fi
13543 rm -f conftest*
13544
13545 fi
13546 echo "$ac_t""$ac_cv_type_size_t" 1>&6
13547 if test $ac_cv_type_size_t = no; then
13548   cat >> confdefs.h <<\EOF
13549 #define size_t unsigned
13550 EOF
13551
13552 fi
13553
13554
13555 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13556 echo "configure:13557: checking for ssize_t" >&5
13557 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
13558   echo $ac_n "(cached) $ac_c" 1>&6
13559 else
13560   cat > conftest.$ac_ext <<EOF
13561 #line 13562 "configure"
13562 #include "confdefs.h"
13563 #include <sys/types.h>
13564 #if STDC_HEADERS
13565 #include <stdlib.h>
13566 #include <stddef.h>
13567 #endif
13568 EOF
13569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13570   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13571   rm -rf conftest*
13572   ac_cv_type_ssize_t=yes
13573 else
13574   rm -rf conftest*
13575   ac_cv_type_ssize_t=no
13576 fi
13577 rm -f conftest*
13578
13579 fi
13580 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
13581 if test $ac_cv_type_ssize_t = no; then
13582   cat >> confdefs.h <<\EOF
13583 #define ssize_t signed int
13584 EOF
13585
13586 fi
13587
13588 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13589 echo "configure:13590: checking for caddr_t" >&5
13590 if eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then
13591   echo $ac_n "(cached) $ac_c" 1>&6
13592 else
13593   cat > conftest.$ac_ext <<EOF
13594 #line 13595 "configure"
13595 #include "confdefs.h"
13596 #include <sys/types.h>
13597 #if STDC_HEADERS
13598 #include <stdlib.h>
13599 #include <stddef.h>
13600 #endif
13601 EOF
13602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13603   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13604   rm -rf conftest*
13605   ac_cv_type_caddr_t=yes
13606 else
13607   rm -rf conftest*
13608   ac_cv_type_caddr_t=no
13609 fi
13610 rm -f conftest*
13611
13612 fi
13613 echo "$ac_t""$ac_cv_type_caddr_t" 1>&6
13614 if test $ac_cv_type_caddr_t = no; then
13615   cat >> confdefs.h <<\EOF
13616 #define caddr_t char *
13617 EOF
13618
13619 fi
13620
13621
13622 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13623 echo "configure:13624: checking for socklen_t" >&5
13624 if eval "test \"`echo '$''{'ol_cv_type_socklen_t'+set}'`\" = set"; then
13625   echo $ac_n "(cached) $ac_c" 1>&6
13626 else
13627   cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630
13631 #ifdef HAVE_SYS_TYPES_H
13632 #include <sys/types.h>
13633 #endif
13634 #ifdef HAVE_SYS_SOCKET_H
13635 #include <sys/socket.h>
13636 #endif
13637
13638 int main() {
13639 socklen_t len;
13640 ; return 0; }
13641 EOF
13642 if { (eval echo configure:13643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13643   rm -rf conftest*
13644   ol_cv_type_socklen_t=yes
13645 else
13646   echo "configure: failed program was:" >&5
13647   cat conftest.$ac_ext >&5
13648   rm -rf conftest*
13649   ol_cv_type_socklen_t=no
13650 fi
13651 rm -f conftest*
13652 fi
13653
13654 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13655   if test $ol_cv_type_socklen_t = no; then
13656     cat >> confdefs.h <<\EOF
13657 #define socklen_t int
13658 EOF
13659
13660   fi
13661  
13662 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
13663 echo "configure:13664: checking for st_blksize in struct stat" >&5
13664 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
13665   echo $ac_n "(cached) $ac_c" 1>&6
13666 else
13667   cat > conftest.$ac_ext <<EOF
13668 #line 13669 "configure"
13669 #include "confdefs.h"
13670 #include <sys/types.h>
13671 #include <sys/stat.h>
13672 int main() {
13673 struct stat s; s.st_blksize;
13674 ; return 0; }
13675 EOF
13676 if { (eval echo configure:13677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13677   rm -rf conftest*
13678   ac_cv_struct_st_blksize=yes
13679 else
13680   echo "configure: failed program was:" >&5
13681   cat conftest.$ac_ext >&5
13682   rm -rf conftest*
13683   ac_cv_struct_st_blksize=no
13684 fi
13685 rm -f conftest*
13686 fi
13687
13688 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
13689 if test $ac_cv_struct_st_blksize = yes; then
13690   cat >> confdefs.h <<\EOF
13691 #define HAVE_ST_BLKSIZE 1
13692 EOF
13693
13694 fi
13695
13696 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13697 echo "configure:13698: checking whether time.h and sys/time.h may both be included" >&5
13698 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
13699   echo $ac_n "(cached) $ac_c" 1>&6
13700 else
13701   cat > conftest.$ac_ext <<EOF
13702 #line 13703 "configure"
13703 #include "confdefs.h"
13704 #include <sys/types.h>
13705 #include <sys/time.h>
13706 #include <time.h>
13707 int main() {
13708 struct tm *tp;
13709 ; return 0; }
13710 EOF
13711 if { (eval echo configure:13712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13712   rm -rf conftest*
13713   ac_cv_header_time=yes
13714 else
13715   echo "configure: failed program was:" >&5
13716   cat conftest.$ac_ext >&5
13717   rm -rf conftest*
13718   ac_cv_header_time=no
13719 fi
13720 rm -f conftest*
13721 fi
13722
13723 echo "$ac_t""$ac_cv_header_time" 1>&6
13724 if test $ac_cv_header_time = yes; then
13725   cat >> confdefs.h <<\EOF
13726 #define TIME_WITH_SYS_TIME 1
13727 EOF
13728
13729 fi
13730
13731 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13732 echo "configure:13733: checking whether struct tm is in sys/time.h or time.h" >&5
13733 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
13734   echo $ac_n "(cached) $ac_c" 1>&6
13735 else
13736   cat > conftest.$ac_ext <<EOF
13737 #line 13738 "configure"
13738 #include "confdefs.h"
13739 #include <sys/types.h>
13740 #include <time.h>
13741 int main() {
13742 struct tm *tp; tp->tm_sec;
13743 ; return 0; }
13744 EOF
13745 if { (eval echo configure:13746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13746   rm -rf conftest*
13747   ac_cv_struct_tm=time.h
13748 else
13749   echo "configure: failed program was:" >&5
13750   cat conftest.$ac_ext >&5
13751   rm -rf conftest*
13752   ac_cv_struct_tm=sys/time.h
13753 fi
13754 rm -f conftest*
13755 fi
13756
13757 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13758 if test $ac_cv_struct_tm = sys/time.h; then
13759   cat >> confdefs.h <<\EOF
13760 #define TM_IN_SYS_TIME 1
13761 EOF
13762
13763 fi
13764
13765 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13766 echo "configure:13767: checking for uid_t in sys/types.h" >&5
13767 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
13768   echo $ac_n "(cached) $ac_c" 1>&6
13769 else
13770   cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773 #include <sys/types.h>
13774 EOF
13775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13776   egrep "uid_t" >/dev/null 2>&1; then
13777   rm -rf conftest*
13778   ac_cv_type_uid_t=yes
13779 else
13780   rm -rf conftest*
13781   ac_cv_type_uid_t=no
13782 fi
13783 rm -f conftest*
13784
13785 fi
13786
13787 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13788 if test $ac_cv_type_uid_t = no; then
13789   cat >> confdefs.h <<\EOF
13790 #define uid_t int
13791 EOF
13792
13793   cat >> confdefs.h <<\EOF
13794 #define gid_t int
13795 EOF
13796
13797 fi
13798
13799 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13800 echo "configure:13801: checking for sig_atomic_t" >&5
13801 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
13802   echo $ac_n "(cached) $ac_c" 1>&6
13803 else
13804   cat > conftest.$ac_ext <<EOF
13805 #line 13806 "configure"
13806 #include "confdefs.h"
13807 #include <signal.h>
13808 int main() {
13809 sig_atomic_t atomic;
13810 ; return 0; }
13811 EOF
13812 if { (eval echo configure:13813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13813   rm -rf conftest*
13814   ol_cv_type_sig_atomic_t=yes
13815 else
13816   echo "configure: failed program was:" >&5
13817   cat conftest.$ac_ext >&5
13818   rm -rf conftest*
13819   ol_cv_type_sig_atomic_t=no
13820 fi
13821 rm -f conftest*
13822 fi
13823
13824 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13825   if test $ol_cv_type_sig_atomic_t = no; then
13826     cat >> confdefs.h <<\EOF
13827 #define sig_atomic_t int
13828 EOF
13829
13830   fi
13831  
13832
13833
13834 # test for pw_gecos in struct passwd
13835 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13836 echo "configure:13837: checking struct passwd for pw_gecos" >&5
13837 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
13838   echo $ac_n "(cached) $ac_c" 1>&6
13839 else
13840   
13841         cat > conftest.$ac_ext <<EOF
13842 #line 13843 "configure"
13843 #include "confdefs.h"
13844 #include <pwd.h>
13845 int main() {
13846
13847         struct passwd pwd;
13848         pwd.pw_gecos = pwd.pw_name;
13849
13850 ; return 0; }
13851 EOF
13852 if { (eval echo configure:13853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13853   rm -rf conftest*
13854   ol_cv_struct_passwd_pw_gecos=yes
13855 else
13856   echo "configure: failed program was:" >&5
13857   cat conftest.$ac_ext >&5
13858   rm -rf conftest*
13859   ol_cv_struct_passwd_pw_gecos=no
13860 fi
13861 rm -f conftest*
13862 fi
13863
13864 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13865 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13866         cat >> confdefs.h <<\EOF
13867 #define HAVE_PW_GECOS 1
13868 EOF
13869
13870 fi
13871
13872 # test for pw_passwd in struct passwd
13873 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13874 echo "configure:13875: checking struct passwd for pw_passwd" >&5
13875 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
13876   echo $ac_n "(cached) $ac_c" 1>&6
13877 else
13878   
13879         cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 #include <pwd.h>
13883 int main() {
13884
13885         struct passwd pwd;
13886         pwd.pw_passwd = pwd.pw_name;
13887
13888 ; return 0; }
13889 EOF
13890 if { (eval echo configure:13891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13891   rm -rf conftest*
13892   ol_cv_struct_passwd_pw_passwd=yes
13893 else
13894   echo "configure: failed program was:" >&5
13895   cat conftest.$ac_ext >&5
13896   rm -rf conftest*
13897   ol_cv_struct_passwd_pw_passwd=no
13898 fi
13899 rm -f conftest*
13900 fi
13901
13902 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13903 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13904         cat >> confdefs.h <<\EOF
13905 #define HAVE_PW_PASSWD 1
13906 EOF
13907
13908 fi
13909
13910
13911 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13912 echo "configure:13913: checking if toupper() requires islower()" >&5
13913 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
13914   echo $ac_n "(cached) $ac_c" 1>&6
13915 else
13916   
13917         if test "$cross_compiling" = yes; then
13918   ol_cv_c_upper_lower=safe
13919 else
13920   cat > conftest.$ac_ext <<EOF
13921 #line 13922 "configure"
13922 #include "confdefs.h"
13923
13924 #include <ctype.h>
13925 main()
13926 {
13927         if ('C' == toupper('C'))
13928                 exit(0);
13929         else
13930                 exit(1);
13931 }
13932 EOF
13933 if { (eval echo configure:13934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13934 then
13935   ol_cv_c_upper_lower=no
13936 else
13937   echo "configure: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939   rm -fr conftest*
13940   ol_cv_c_upper_lower=yes
13941 fi
13942 rm -fr conftest*
13943 fi
13944
13945 fi
13946
13947 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13948 if test $ol_cv_c_upper_lower != no ; then
13949         cat >> confdefs.h <<\EOF
13950 #define C_UPPER_LOWER 1
13951 EOF
13952
13953 fi
13954
13955 echo $ac_n "checking for working const""... $ac_c" 1>&6
13956 echo "configure:13957: checking for working const" >&5
13957 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
13958   echo $ac_n "(cached) $ac_c" 1>&6
13959 else
13960   cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963
13964 int main() {
13965
13966 /* Ultrix mips cc rejects this.  */
13967 typedef int charset[2]; const charset x;
13968 /* SunOS 4.1.1 cc rejects this.  */
13969 char const *const *ccp;
13970 char **p;
13971 /* NEC SVR4.0.2 mips cc rejects this.  */
13972 struct point {int x, y;};
13973 static struct point const zero = {0,0};
13974 /* AIX XL C 1.02.0.0 rejects this.
13975    It does not let you subtract one const X* pointer from another in an arm
13976    of an if-expression whose if-part is not a constant expression */
13977 const char *g = "string";
13978 ccp = &g + (g ? g-g : 0);
13979 /* HPUX 7.0 cc rejects these. */
13980 ++ccp;
13981 p = (char**) ccp;
13982 ccp = (char const *const *) p;
13983 { /* SCO 3.2v4 cc rejects this.  */
13984   char *t;
13985   char const *s = 0 ? (char *) 0 : (char const *) 0;
13986
13987   *t++ = 0;
13988 }
13989 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13990   int x[] = {25, 17};
13991   const int *foo = &x[0];
13992   ++foo;
13993 }
13994 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13995   typedef const int *iptr;
13996   iptr p = 0;
13997   ++p;
13998 }
13999 { /* AIX XL C 1.02.0.0 rejects this saying
14000      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14001   struct s { int j; const int *ap[3]; };
14002   struct s *b; b->j = 5;
14003 }
14004 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14005   const int foo = 10;
14006 }
14007
14008 ; return 0; }
14009 EOF
14010 if { (eval echo configure:14011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14011   rm -rf conftest*
14012   ac_cv_c_const=yes
14013 else
14014   echo "configure: failed program was:" >&5
14015   cat conftest.$ac_ext >&5
14016   rm -rf conftest*
14017   ac_cv_c_const=no
14018 fi
14019 rm -f conftest*
14020 fi
14021
14022 echo "$ac_t""$ac_cv_c_const" 1>&6
14023 if test $ac_cv_c_const = no; then
14024   cat >> confdefs.h <<\EOF
14025 #define const 
14026 EOF
14027
14028 fi
14029
14030 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14031 echo "configure:14032: checking if compiler understands volatile" >&5
14032 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
14033   echo $ac_n "(cached) $ac_c" 1>&6
14034 else
14035   cat > conftest.$ac_ext <<EOF
14036 #line 14037 "configure"
14037 #include "confdefs.h"
14038 int x, y, z;
14039 int main() {
14040 volatile int a; int * volatile b = x ? &y : &z;
14041       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14042       *b = 0;
14043 ; return 0; }
14044 EOF
14045 if { (eval echo configure:14046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14046   rm -rf conftest*
14047   ol_cv_c_volatile=yes
14048 else
14049   echo "configure: failed program was:" >&5
14050   cat conftest.$ac_ext >&5
14051   rm -rf conftest*
14052   ol_cv_c_volatile=no
14053 fi
14054 rm -f conftest*
14055 fi
14056
14057 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14058   if test $ol_cv_c_volatile = yes; then
14059     : 
14060   else
14061     cat >> confdefs.h <<\EOF
14062 #define volatile 
14063 EOF
14064
14065   fi
14066  
14067
14068 if test $cross_compiling = yes ; then
14069         cat >> confdefs.h <<\EOF
14070 #define CROSS_COMPILING 1
14071 EOF
14072
14073 else
14074         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14075 echo "configure:14076: checking whether byte ordering is bigendian" >&5
14076 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
14077   echo $ac_n "(cached) $ac_c" 1>&6
14078 else
14079   ac_cv_c_bigendian=unknown
14080 # See if sys/param.h defines the BYTE_ORDER macro.
14081 cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 #include <sys/types.h>
14085 #include <sys/param.h>
14086 int main() {
14087
14088 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14089  bogus endian macros
14090 #endif
14091 ; return 0; }
14092 EOF
14093 if { (eval echo configure:14094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14094   rm -rf conftest*
14095   # It does; now see whether it defined to BIG_ENDIAN or not.
14096 cat > conftest.$ac_ext <<EOF
14097 #line 14098 "configure"
14098 #include "confdefs.h"
14099 #include <sys/types.h>
14100 #include <sys/param.h>
14101 int main() {
14102
14103 #if BYTE_ORDER != BIG_ENDIAN
14104  not big endian
14105 #endif
14106 ; return 0; }
14107 EOF
14108 if { (eval echo configure:14109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14109   rm -rf conftest*
14110   ac_cv_c_bigendian=yes
14111 else
14112   echo "configure: failed program was:" >&5
14113   cat conftest.$ac_ext >&5
14114   rm -rf conftest*
14115   ac_cv_c_bigendian=no
14116 fi
14117 rm -f conftest*
14118 else
14119   echo "configure: failed program was:" >&5
14120   cat conftest.$ac_ext >&5
14121 fi
14122 rm -f conftest*
14123 if test $ac_cv_c_bigendian = unknown; then
14124 if test "$cross_compiling" = yes; then
14125     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14126 else
14127   cat > conftest.$ac_ext <<EOF
14128 #line 14129 "configure"
14129 #include "confdefs.h"
14130 main () {
14131   /* Are we little or big endian?  From Harbison&Steele.  */
14132   union
14133   {
14134     long l;
14135     char c[sizeof (long)];
14136   } u;
14137   u.l = 1;
14138   exit (u.c[sizeof (long) - 1] == 1);
14139 }
14140 EOF
14141 if { (eval echo configure:14142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14142 then
14143   ac_cv_c_bigendian=no
14144 else
14145   echo "configure: failed program was:" >&5
14146   cat conftest.$ac_ext >&5
14147   rm -fr conftest*
14148   ac_cv_c_bigendian=yes
14149 fi
14150 rm -fr conftest*
14151 fi
14152
14153 fi
14154 fi
14155
14156 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14157 if test $ac_cv_c_bigendian = yes; then
14158   cat >> confdefs.h <<\EOF
14159 #define WORDS_BIGENDIAN 1
14160 EOF
14161
14162 fi
14163
14164 fi
14165
14166 echo $ac_n "checking size of short""... $ac_c" 1>&6
14167 echo "configure:14168: checking size of short" >&5 
14168 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
14169   echo $ac_n "(cached) $ac_c" 1>&6
14170 else
14171   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14172   cat > conftest.$ac_ext <<EOF
14173 #line 14174 "configure"
14174 #include "confdefs.h"
14175 #include "confdefs.h" 
14176 #include <sys/types.h> 
14177  
14178
14179 int main() {
14180 switch (0) case 0: case (sizeof (short) == $ac_size):;
14181 ; return 0; }
14182 EOF
14183 if { (eval echo configure:14184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14184   rm -rf conftest*
14185   ac_cv_sizeof_short=$ac_size
14186 else
14187   echo "configure: failed program was:" >&5
14188   cat conftest.$ac_ext >&5
14189 fi
14190 rm -f conftest* 
14191   if test x$ac_cv_sizeof_short != x ; then break; fi 
14192 done 
14193
14194 fi
14195  
14196 if test x$ac_cv_sizeof_short = x ; then 
14197   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14198 fi 
14199 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14200 cat >> confdefs.h <<EOF
14201 #define SIZEOF_SHORT $ac_cv_sizeof_short
14202 EOF
14203  
14204  
14205 echo $ac_n "checking size of int""... $ac_c" 1>&6
14206 echo "configure:14207: checking size of int" >&5 
14207 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
14208   echo $ac_n "(cached) $ac_c" 1>&6
14209 else
14210   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14211   cat > conftest.$ac_ext <<EOF
14212 #line 14213 "configure"
14213 #include "confdefs.h"
14214 #include "confdefs.h" 
14215 #include <sys/types.h> 
14216  
14217
14218 int main() {
14219 switch (0) case 0: case (sizeof (int) == $ac_size):;
14220 ; return 0; }
14221 EOF
14222 if { (eval echo configure:14223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14223   rm -rf conftest*
14224   ac_cv_sizeof_int=$ac_size
14225 else
14226   echo "configure: failed program was:" >&5
14227   cat conftest.$ac_ext >&5
14228 fi
14229 rm -f conftest* 
14230   if test x$ac_cv_sizeof_int != x ; then break; fi 
14231 done 
14232
14233 fi
14234  
14235 if test x$ac_cv_sizeof_int = x ; then 
14236   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14237 fi 
14238 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14239 cat >> confdefs.h <<EOF
14240 #define SIZEOF_INT $ac_cv_sizeof_int
14241 EOF
14242  
14243  
14244 echo $ac_n "checking size of long""... $ac_c" 1>&6
14245 echo "configure:14246: checking size of long" >&5 
14246 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
14247   echo $ac_n "(cached) $ac_c" 1>&6
14248 else
14249   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14250   cat > conftest.$ac_ext <<EOF
14251 #line 14252 "configure"
14252 #include "confdefs.h"
14253 #include "confdefs.h" 
14254 #include <sys/types.h> 
14255  
14256
14257 int main() {
14258 switch (0) case 0: case (sizeof (long) == $ac_size):;
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14262   rm -rf conftest*
14263   ac_cv_sizeof_long=$ac_size
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267 fi
14268 rm -f conftest* 
14269   if test x$ac_cv_sizeof_long != x ; then break; fi 
14270 done 
14271
14272 fi
14273  
14274 if test x$ac_cv_sizeof_long = x ; then 
14275   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14276 fi 
14277 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14278 cat >> confdefs.h <<EOF
14279 #define SIZEOF_LONG $ac_cv_sizeof_long
14280 EOF
14281  
14282
14283
14284 if test "$ac_cv_sizeof_int" -lt 4 ; then
14285         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14286
14287         cat >> confdefs.h <<\EOF
14288 #define LBER_INT_T long
14289 EOF
14290
14291 else
14292         cat >> confdefs.h <<\EOF
14293 #define LBER_INT_T int
14294 EOF
14295
14296 fi
14297
14298 cat >> confdefs.h <<\EOF
14299 #define LBER_LEN_T long
14300 EOF
14301
14302 cat >> confdefs.h <<\EOF
14303 #define LBER_SOCKET_T int
14304 EOF
14305
14306 cat >> confdefs.h <<\EOF
14307 #define LBER_TAG_T long
14308 EOF
14309
14310
14311 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14312 echo "configure:14313: checking for 8-bit clean memcmp" >&5
14313 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
14314   echo $ac_n "(cached) $ac_c" 1>&6
14315 else
14316   if test "$cross_compiling" = yes; then
14317   ac_cv_func_memcmp_clean=no
14318 else
14319   cat > conftest.$ac_ext <<EOF
14320 #line 14321 "configure"
14321 #include "confdefs.h"
14322
14323 main()
14324 {
14325   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14326   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14327 }
14328
14329 EOF
14330 if { (eval echo configure:14331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14331 then
14332   ac_cv_func_memcmp_clean=yes
14333 else
14334   echo "configure: failed program was:" >&5
14335   cat conftest.$ac_ext >&5
14336   rm -fr conftest*
14337   ac_cv_func_memcmp_clean=no
14338 fi
14339 rm -fr conftest*
14340 fi
14341
14342 fi
14343
14344 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14345 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14346
14347 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14348 echo "configure:14349: checking for strftime" >&5
14349 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
14350   echo $ac_n "(cached) $ac_c" 1>&6
14351 else
14352   cat > conftest.$ac_ext <<EOF
14353 #line 14354 "configure"
14354 #include "confdefs.h"
14355 /* System header to define __stub macros and hopefully few prototypes,
14356     which can conflict with char strftime(); below.  */
14357 #include <assert.h>
14358 /* Override any gcc2 internal prototype to avoid an error.  */
14359 /* We use char because int might match the return type of a gcc2
14360     builtin and then its argument prototype would still apply.  */
14361 char strftime();
14362
14363 int main() {
14364
14365 /* The GNU C library defines this for functions which it implements
14366     to always fail with ENOSYS.  Some functions are actually named
14367     something starting with __ and the normal name is an alias.  */
14368 #if defined (__stub_strftime) || defined (__stub___strftime)
14369 choke me
14370 #else
14371 strftime();
14372 #endif
14373
14374 ; return 0; }
14375 EOF
14376 if { (eval echo configure:14377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14377   rm -rf conftest*
14378   eval "ac_cv_func_strftime=yes"
14379 else
14380   echo "configure: failed program was:" >&5
14381   cat conftest.$ac_ext >&5
14382   rm -rf conftest*
14383   eval "ac_cv_func_strftime=no"
14384 fi
14385 rm -f conftest*
14386 fi
14387
14388 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14389   echo "$ac_t""yes" 1>&6
14390   cat >> confdefs.h <<\EOF
14391 #define HAVE_STRFTIME 1
14392 EOF
14393
14394 else
14395   echo "$ac_t""no" 1>&6
14396 # strftime is in -lintl on SCO UNIX.
14397 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14398 echo "configure:14399: checking for strftime in -lintl" >&5
14399 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
14400 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14401   echo $ac_n "(cached) $ac_c" 1>&6
14402 else
14403   ac_save_LIBS="$LIBS"
14404 LIBS="-lintl  $LIBS"
14405 cat > conftest.$ac_ext <<EOF
14406 #line 14407 "configure"
14407 #include "confdefs.h"
14408 /* Override any gcc2 internal prototype to avoid an error.  */
14409 /* We use char because int might match the return type of a gcc2
14410     builtin and then its argument prototype would still apply.  */
14411 char strftime();
14412
14413 int main() {
14414 strftime()
14415 ; return 0; }
14416 EOF
14417 if { (eval echo configure:14418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14418   rm -rf conftest*
14419   eval "ac_cv_lib_$ac_lib_var=yes"
14420 else
14421   echo "configure: failed program was:" >&5
14422   cat conftest.$ac_ext >&5
14423   rm -rf conftest*
14424   eval "ac_cv_lib_$ac_lib_var=no"
14425 fi
14426 rm -f conftest*
14427 LIBS="$ac_save_LIBS"
14428
14429 fi
14430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14431   echo "$ac_t""yes" 1>&6
14432   cat >> confdefs.h <<\EOF
14433 #define HAVE_STRFTIME 1
14434 EOF
14435
14436 LIBS="-lintl $LIBS"
14437 else
14438   echo "$ac_t""no" 1>&6
14439 fi
14440
14441 fi
14442
14443
14444 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14445 echo "configure:14446: checking for inet_aton()" >&5
14446 if eval "test \"`echo '$''{'ol_cv_func_inet_aton'+set}'`\" = set"; then
14447   echo $ac_n "(cached) $ac_c" 1>&6
14448 else
14449   cat > conftest.$ac_ext <<EOF
14450 #line 14451 "configure"
14451 #include "confdefs.h"
14452
14453 #ifdef HAVE_SYS_TYPES_H
14454 #       include <sys/types.h>
14455 #endif
14456 #ifdef HAVE_SYS_SOCKET_H
14457 #       include <sys/socket.h>
14458 #       ifdef HAVE_SYS_SELECT_H
14459 #               include <sys/select.h>
14460 #       endif
14461 #       include <netinet/in.h>
14462 #       ifdef HAVE_ARPA_INET_H
14463 #               include <arpa/inet.h>
14464 #       endif
14465 #endif
14466
14467 int main() {
14468 struct in_addr in;
14469 int rc = inet_aton( "255.255.255.255", &in );
14470 ; return 0; }
14471 EOF
14472 if { (eval echo configure:14473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14473   rm -rf conftest*
14474   ol_cv_func_inet_aton=yes
14475 else
14476   echo "configure: failed program was:" >&5
14477   cat conftest.$ac_ext >&5
14478   rm -rf conftest*
14479   ol_cv_func_inet_aton=no
14480 fi
14481 rm -f conftest*
14482 fi
14483
14484 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14485   if test $ol_cv_func_inet_aton != no; then
14486     cat >> confdefs.h <<\EOF
14487 #define HAVE_INET_ATON 1
14488 EOF
14489
14490   fi
14491  
14492
14493 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14494 echo "configure:14495: checking for _spawnlp" >&5
14495 if eval "test \"`echo '$''{'ac_cv_func__spawnlp'+set}'`\" = set"; then
14496   echo $ac_n "(cached) $ac_c" 1>&6
14497 else
14498   cat > conftest.$ac_ext <<EOF
14499 #line 14500 "configure"
14500 #include "confdefs.h"
14501 /* System header to define __stub macros and hopefully few prototypes,
14502     which can conflict with char _spawnlp(); below.  */
14503 #include <assert.h>
14504 /* Override any gcc2 internal prototype to avoid an error.  */
14505 /* We use char because int might match the return type of a gcc2
14506     builtin and then its argument prototype would still apply.  */
14507 char _spawnlp();
14508
14509 int main() {
14510
14511 /* The GNU C library defines this for functions which it implements
14512     to always fail with ENOSYS.  Some functions are actually named
14513     something starting with __ and the normal name is an alias.  */
14514 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14515 choke me
14516 #else
14517 _spawnlp();
14518 #endif
14519
14520 ; return 0; }
14521 EOF
14522 if { (eval echo configure:14523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14523   rm -rf conftest*
14524   eval "ac_cv_func__spawnlp=yes"
14525 else
14526   echo "configure: failed program was:" >&5
14527   cat conftest.$ac_ext >&5
14528   rm -rf conftest*
14529   eval "ac_cv_func__spawnlp=no"
14530 fi
14531 rm -f conftest*
14532 fi
14533
14534 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14535   echo "$ac_t""yes" 1>&6
14536   cat >> confdefs.h <<\EOF
14537 #define HAVE_SPAWNLP 1
14538 EOF
14539
14540 else
14541   echo "$ac_t""no" 1>&6
14542 fi
14543
14544
14545 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14546 echo "configure:14547: checking for _snprintf" >&5
14547 if eval "test \"`echo '$''{'ac_cv_func__snprintf'+set}'`\" = set"; then
14548   echo $ac_n "(cached) $ac_c" 1>&6
14549 else
14550   cat > conftest.$ac_ext <<EOF
14551 #line 14552 "configure"
14552 #include "confdefs.h"
14553 /* System header to define __stub macros and hopefully few prototypes,
14554     which can conflict with char _snprintf(); below.  */
14555 #include <assert.h>
14556 /* Override any gcc2 internal prototype to avoid an error.  */
14557 /* We use char because int might match the return type of a gcc2
14558     builtin and then its argument prototype would still apply.  */
14559 char _snprintf();
14560
14561 int main() {
14562
14563 /* The GNU C library defines this for functions which it implements
14564     to always fail with ENOSYS.  Some functions are actually named
14565     something starting with __ and the normal name is an alias.  */
14566 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14567 choke me
14568 #else
14569 _snprintf();
14570 #endif
14571
14572 ; return 0; }
14573 EOF
14574 if { (eval echo configure:14575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14575   rm -rf conftest*
14576   eval "ac_cv_func__snprintf=yes"
14577 else
14578   echo "configure: failed program was:" >&5
14579   cat conftest.$ac_ext >&5
14580   rm -rf conftest*
14581   eval "ac_cv_func__snprintf=no"
14582 fi
14583 rm -f conftest*
14584 fi
14585
14586 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14587   echo "$ac_t""yes" 1>&6
14588   ac_cv_func_snprintf=yes
14589         cat >> confdefs.h <<\EOF
14590 #define snprintf _snprintf
14591 EOF
14592
14593
14594 else
14595   echo "$ac_t""no" 1>&6
14596 fi
14597
14598
14599 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14600 echo "configure:14601: checking for _vsnprintf" >&5
14601 if eval "test \"`echo '$''{'ac_cv_func__vsnprintf'+set}'`\" = set"; then
14602   echo $ac_n "(cached) $ac_c" 1>&6
14603 else
14604   cat > conftest.$ac_ext <<EOF
14605 #line 14606 "configure"
14606 #include "confdefs.h"
14607 /* System header to define __stub macros and hopefully few prototypes,
14608     which can conflict with char _vsnprintf(); below.  */
14609 #include <assert.h>
14610 /* Override any gcc2 internal prototype to avoid an error.  */
14611 /* We use char because int might match the return type of a gcc2
14612     builtin and then its argument prototype would still apply.  */
14613 char _vsnprintf();
14614
14615 int main() {
14616
14617 /* The GNU C library defines this for functions which it implements
14618     to always fail with ENOSYS.  Some functions are actually named
14619     something starting with __ and the normal name is an alias.  */
14620 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14621 choke me
14622 #else
14623 _vsnprintf();
14624 #endif
14625
14626 ; return 0; }
14627 EOF
14628 if { (eval echo configure:14629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14629   rm -rf conftest*
14630   eval "ac_cv_func__vsnprintf=yes"
14631 else
14632   echo "configure: failed program was:" >&5
14633   cat conftest.$ac_ext >&5
14634   rm -rf conftest*
14635   eval "ac_cv_func__vsnprintf=no"
14636 fi
14637 rm -f conftest*
14638 fi
14639
14640 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14641   echo "$ac_t""yes" 1>&6
14642   ac_cv_func_vsnprintf=yes
14643         cat >> confdefs.h <<\EOF
14644 #define vsnprintf _vsnprintf
14645 EOF
14646
14647
14648 else
14649   echo "$ac_t""no" 1>&6
14650 fi
14651
14652
14653 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14654 echo "configure:14655: checking for vprintf" >&5
14655 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
14656   echo $ac_n "(cached) $ac_c" 1>&6
14657 else
14658   cat > conftest.$ac_ext <<EOF
14659 #line 14660 "configure"
14660 #include "confdefs.h"
14661 /* System header to define __stub macros and hopefully few prototypes,
14662     which can conflict with char vprintf(); below.  */
14663 #include <assert.h>
14664 /* Override any gcc2 internal prototype to avoid an error.  */
14665 /* We use char because int might match the return type of a gcc2
14666     builtin and then its argument prototype would still apply.  */
14667 char vprintf();
14668
14669 int main() {
14670
14671 /* The GNU C library defines this for functions which it implements
14672     to always fail with ENOSYS.  Some functions are actually named
14673     something starting with __ and the normal name is an alias.  */
14674 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14675 choke me
14676 #else
14677 vprintf();
14678 #endif
14679
14680 ; return 0; }
14681 EOF
14682 if { (eval echo configure:14683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14683   rm -rf conftest*
14684   eval "ac_cv_func_vprintf=yes"
14685 else
14686   echo "configure: failed program was:" >&5
14687   cat conftest.$ac_ext >&5
14688   rm -rf conftest*
14689   eval "ac_cv_func_vprintf=no"
14690 fi
14691 rm -f conftest*
14692 fi
14693
14694 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14695   echo "$ac_t""yes" 1>&6
14696   cat >> confdefs.h <<\EOF
14697 #define HAVE_VPRINTF 1
14698 EOF
14699
14700 else
14701   echo "$ac_t""no" 1>&6
14702 fi
14703
14704 if test "$ac_cv_func_vprintf" != yes; then
14705 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14706 echo "configure:14707: checking for _doprnt" >&5
14707 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
14708   echo $ac_n "(cached) $ac_c" 1>&6
14709 else
14710   cat > conftest.$ac_ext <<EOF
14711 #line 14712 "configure"
14712 #include "confdefs.h"
14713 /* System header to define __stub macros and hopefully few prototypes,
14714     which can conflict with char _doprnt(); below.  */
14715 #include <assert.h>
14716 /* Override any gcc2 internal prototype to avoid an error.  */
14717 /* We use char because int might match the return type of a gcc2
14718     builtin and then its argument prototype would still apply.  */
14719 char _doprnt();
14720
14721 int main() {
14722
14723 /* The GNU C library defines this for functions which it implements
14724     to always fail with ENOSYS.  Some functions are actually named
14725     something starting with __ and the normal name is an alias.  */
14726 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14727 choke me
14728 #else
14729 _doprnt();
14730 #endif
14731
14732 ; return 0; }
14733 EOF
14734 if { (eval echo configure:14735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14735   rm -rf conftest*
14736   eval "ac_cv_func__doprnt=yes"
14737 else
14738   echo "configure: failed program was:" >&5
14739   cat conftest.$ac_ext >&5
14740   rm -rf conftest*
14741   eval "ac_cv_func__doprnt=no"
14742 fi
14743 rm -f conftest*
14744 fi
14745
14746 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14747   echo "$ac_t""yes" 1>&6
14748   cat >> confdefs.h <<\EOF
14749 #define HAVE_DOPRNT 1
14750 EOF
14751
14752 else
14753   echo "$ac_t""no" 1>&6
14754 fi
14755
14756 fi
14757
14758
14759 if test $ac_cv_func_vprintf = yes ; then
14760                 for ac_func in vsnprintf vsprintf
14761 do
14762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14763 echo "configure:14764: checking for $ac_func" >&5
14764 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14765   echo $ac_n "(cached) $ac_c" 1>&6
14766 else
14767   cat > conftest.$ac_ext <<EOF
14768 #line 14769 "configure"
14769 #include "confdefs.h"
14770 /* System header to define __stub macros and hopefully few prototypes,
14771     which can conflict with char $ac_func(); below.  */
14772 #include <assert.h>
14773 /* Override any gcc2 internal prototype to avoid an error.  */
14774 /* We use char because int might match the return type of a gcc2
14775     builtin and then its argument prototype would still apply.  */
14776 char $ac_func();
14777
14778 int main() {
14779
14780 /* The GNU C library defines this for functions which it implements
14781     to always fail with ENOSYS.  Some functions are actually named
14782     something starting with __ and the normal name is an alias.  */
14783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14784 choke me
14785 #else
14786 $ac_func();
14787 #endif
14788
14789 ; return 0; }
14790 EOF
14791 if { (eval echo configure:14792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14792   rm -rf conftest*
14793   eval "ac_cv_func_$ac_func=yes"
14794 else
14795   echo "configure: failed program was:" >&5
14796   cat conftest.$ac_ext >&5
14797   rm -rf conftest*
14798   eval "ac_cv_func_$ac_func=no"
14799 fi
14800 rm -f conftest*
14801 fi
14802
14803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14804   echo "$ac_t""yes" 1>&6
14805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14806   cat >> confdefs.h <<EOF
14807 #define $ac_tr_func 1
14808 EOF
14809  
14810 else
14811   echo "$ac_t""no" 1>&6
14812 fi
14813 done
14814
14815 fi
14816
14817 for ac_func in \
14818         bcopy                   \
14819         closesocket             \
14820         endgrent                \
14821         endpwent                \
14822         flock                   \
14823         getdtablesize   \
14824         getgrgid                \
14825         gethostname             \
14826         getpass                 \
14827         getpwuid                \
14828         getpwnam                \
14829         getspnam                \
14830         gettimeofday    \
14831         initgroups              \
14832         lockf                   \
14833         memcpy                  \
14834         memmove                 \
14835         mkstemp                 \
14836         pipe                    \
14837         read                    \
14838         recv                    \
14839         recvfrom                \
14840         setpwfile               \
14841         setgid                  \
14842         setegid                 \
14843         setsid                  \
14844         setuid                  \
14845         seteuid                 \
14846         sigaction               \
14847         signal                  \
14848         sigset                  \
14849         snprintf                \
14850         strdup                  \
14851         strerror                \
14852         strpbrk                 \
14853         strrchr                 \
14854         strsep                  \
14855         strstr                  \
14856         strtol                  \
14857         strtoul                 \
14858         strspn                  \
14859         sysconf                 \
14860         waitpid                 \
14861         wait4                   \
14862         write                   \
14863         send                    \
14864         sendto                  \
14865
14866 do
14867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14868 echo "configure:14869: checking for $ac_func" >&5
14869 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14870   echo $ac_n "(cached) $ac_c" 1>&6
14871 else
14872   cat > conftest.$ac_ext <<EOF
14873 #line 14874 "configure"
14874 #include "confdefs.h"
14875 /* System header to define __stub macros and hopefully few prototypes,
14876     which can conflict with char $ac_func(); below.  */
14877 #include <assert.h>
14878 /* Override any gcc2 internal prototype to avoid an error.  */
14879 /* We use char because int might match the return type of a gcc2
14880     builtin and then its argument prototype would still apply.  */
14881 char $ac_func();
14882
14883 int main() {
14884
14885 /* The GNU C library defines this for functions which it implements
14886     to always fail with ENOSYS.  Some functions are actually named
14887     something starting with __ and the normal name is an alias.  */
14888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14889 choke me
14890 #else
14891 $ac_func();
14892 #endif
14893
14894 ; return 0; }
14895 EOF
14896 if { (eval echo configure:14897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14897   rm -rf conftest*
14898   eval "ac_cv_func_$ac_func=yes"
14899 else
14900   echo "configure: failed program was:" >&5
14901   cat conftest.$ac_ext >&5
14902   rm -rf conftest*
14903   eval "ac_cv_func_$ac_func=no"
14904 fi
14905 rm -f conftest*
14906 fi
14907
14908 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14909   echo "$ac_t""yes" 1>&6
14910     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14911   cat >> confdefs.h <<EOF
14912 #define $ac_tr_func 1
14913 EOF
14914  
14915 else
14916   echo "$ac_t""no" 1>&6
14917 fi
14918 done
14919
14920
14921 for ac_func in getopt tempnam
14922 do
14923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14924 echo "configure:14925: checking for $ac_func" >&5
14925 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14926   echo $ac_n "(cached) $ac_c" 1>&6
14927 else
14928   cat > conftest.$ac_ext <<EOF
14929 #line 14930 "configure"
14930 #include "confdefs.h"
14931 /* System header to define __stub macros and hopefully few prototypes,
14932     which can conflict with char $ac_func(); below.  */
14933 #include <assert.h>
14934 /* Override any gcc2 internal prototype to avoid an error.  */
14935 /* We use char because int might match the return type of a gcc2
14936     builtin and then its argument prototype would still apply.  */
14937 char $ac_func();
14938
14939 int main() {
14940
14941 /* The GNU C library defines this for functions which it implements
14942     to always fail with ENOSYS.  Some functions are actually named
14943     something starting with __ and the normal name is an alias.  */
14944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14945 choke me
14946 #else
14947 $ac_func();
14948 #endif
14949
14950 ; return 0; }
14951 EOF
14952 if { (eval echo configure:14953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14953   rm -rf conftest*
14954   eval "ac_cv_func_$ac_func=yes"
14955 else
14956   echo "configure: failed program was:" >&5
14957   cat conftest.$ac_ext >&5
14958   rm -rf conftest*
14959   eval "ac_cv_func_$ac_func=no"
14960 fi
14961 rm -f conftest*
14962 fi
14963
14964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14965   echo "$ac_t""yes" 1>&6
14966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14967   cat >> confdefs.h <<EOF
14968 #define $ac_tr_func 1
14969 EOF
14970  
14971 else
14972   echo "$ac_t""no" 1>&6
14973 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14974 fi
14975 done
14976
14977
14978
14979 if test "$ac_cv_func_getopt" != yes; then
14980     LIBSRCS="$LIBSRCS getopt.c"
14981 fi
14982
14983 if test "$ac_cv_func_tempnam" != yes; then
14984     LIBSRCS="$LIBSRCS tempnam.c"
14985 fi
14986
14987 # Check Configuration
14988 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14989 echo "configure:14990: checking declaration of sys_errlist" >&5
14990 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
14991   echo $ac_n "(cached) $ac_c" 1>&6
14992 else
14993   
14994         cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997
14998 #include <stdio.h>
14999 #include <sys/types.h>
15000 #include <errno.h>
15001 #ifdef WINNT
15002 #include <stdlib.h>
15003 #endif 
15004 int main() {
15005 char *c = (char *) *sys_errlist
15006 ; return 0; }
15007 EOF
15008 if { (eval echo configure:15009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15009   rm -rf conftest*
15010   ol_cv_dcl_sys_errlist=yes
15011         ol_cv_have_sys_errlist=yes
15012 else
15013   echo "configure: failed program was:" >&5
15014   cat conftest.$ac_ext >&5
15015   rm -rf conftest*
15016   ol_cv_dcl_sys_errlist=no
15017 fi
15018 rm -f conftest*
15019 fi
15020
15021 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15022 #
15023 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15024 if test $ol_cv_dcl_sys_errlist = no ; then
15025         cat >> confdefs.h <<\EOF
15026 #define DECL_SYS_ERRLIST 1
15027 EOF
15028
15029
15030         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15031 echo "configure:15032: checking existence of sys_errlist" >&5
15032 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
15033   echo $ac_n "(cached) $ac_c" 1>&6
15034 else
15035   
15036                 cat > conftest.$ac_ext <<EOF
15037 #line 15038 "configure"
15038 #include "confdefs.h"
15039 #include <errno.h>
15040 int main() {
15041 char *c = (char *) *sys_errlist
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   ol_cv_have_sys_errlist=yes
15047 else
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   rm -rf conftest*
15051   ol_cv_have_sys_errlist=no
15052 fi
15053 rm -f conftest*
15054 fi
15055
15056 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15057 fi
15058 if test $ol_cv_have_sys_errlist = yes ; then
15059         cat >> confdefs.h <<\EOF
15060 #define HAVE_SYS_ERRLIST 1
15061 EOF
15062
15063 fi
15064
15065
15066
15067 if test "$ol_enable_debug" != no ; then
15068         cat >> confdefs.h <<\EOF
15069 #define LDAP_DEBUG 1
15070 EOF
15071
15072 fi
15073 if test "$ol_enable_syslog" = yes ; then
15074         cat >> confdefs.h <<\EOF
15075 #define LDAP_SYSLOG 1
15076 EOF
15077
15078 fi
15079 if test "$ol_enable_libui" = yes ; then
15080         cat >> confdefs.h <<\EOF
15081 #define LDAP_LIBUI 1
15082 EOF
15083
15084 fi
15085 if test "$ol_enable_cache" = no ; then
15086         cat >> confdefs.h <<\EOF
15087 #define LDAP_NOCACHE 1
15088 EOF
15089
15090 fi
15091 if test "$ol_link_kbind" != no ; then
15092         cat >> confdefs.h <<\EOF
15093 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15094 EOF
15095
15096 fi
15097 if test "$ol_enable_dns" != no ; then
15098         cat >> confdefs.h <<\EOF
15099 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15100 EOF
15101
15102 fi
15103 if test "$ol_enable_proctitle" != no ; then
15104         cat >> confdefs.h <<\EOF
15105 #define LDAP_PROCTITLE 1
15106 EOF
15107
15108 fi
15109 if test "$ol_enable_referrals" != no ; then
15110         cat >> confdefs.h <<\EOF
15111 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15112 EOF
15113
15114 fi
15115 if test "$ol_enable_cldap" != no ; then
15116         cat >> confdefs.h <<\EOF
15117 #define LDAP_CONNECTIONLESS 1
15118 EOF
15119
15120 fi
15121 if test "$ol_enable_ldapi" != no; then
15122         cat >> confdefs.h <<\EOF
15123 #define USE_PF_LOCAL 1
15124 EOF
15125
15126 fi
15127
15128 if test "$ol_enable_cleartext" != no ; then
15129         cat >> confdefs.h <<\EOF
15130 #define SLAPD_CLEARTEXT 1
15131 EOF
15132
15133 fi
15134 if test "$ol_enable_crypt" != no ; then
15135         cat >> confdefs.h <<\EOF
15136 #define SLAPD_CRYPT 1
15137 EOF
15138
15139 fi
15140 if test "$ol_link_kpasswd" != no ; then
15141         cat >> confdefs.h <<\EOF
15142 #define SLAPD_KPASSWD 1
15143 EOF
15144
15145 fi
15146 if test "$ol_enable_multimaster" != no ; then
15147         cat >> confdefs.h <<\EOF
15148 #define SLAPD_MULTIMASTER 1
15149 EOF
15150
15151 fi
15152 if test "$ol_enable_phonetic" != no ; then
15153         cat >> confdefs.h <<\EOF
15154 #define SLAPD_PHONETIC 1
15155 EOF
15156
15157 fi
15158 if test "$ol_enable_rlookups" != no ; then
15159         cat >> confdefs.h <<\EOF
15160 #define SLAPD_RLOOKUPS 1
15161 EOF
15162
15163 fi
15164 if test "$ol_enable_aci" != no ; then
15165         cat >> confdefs.h <<\EOF
15166 #define SLAPD_ACI_ENABLED 1
15167 EOF
15168
15169 fi
15170 if test "$ol_enable_discreteaci" != no ; then
15171         cat >> confdefs.h <<\EOF
15172 #define SLAPD_ACI_DISCRETE_RIGHTS 1
15173 EOF
15174
15175 fi
15176
15177 if test "$ol_link_modules" != no ; then
15178         cat >> confdefs.h <<\EOF
15179 #define SLAPD_MODULES 1
15180 EOF
15181
15182         BUILD_SLAPD=yes
15183         SLAPD_MODULES_LDFLAGS="-dlopen self"
15184 fi
15185
15186 if test "$ol_link_bdb2" != no ; then
15187         cat >> confdefs.h <<\EOF
15188 #define SLAPD_BDB2 1
15189 EOF
15190
15191         BUILD_SLAPD=yes
15192         BUILD_BDB2=yes
15193         if test "$ol_with_bdb2_module" != static ; then
15194                 cat >> confdefs.h <<\EOF
15195 #define SLAPD_BDB2_DYNAMIC 1
15196 EOF
15197
15198                 BUILD_BDB2=mod
15199                 BUILD_BDB2_DYNAMIC=shared
15200                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15201         fi
15202 fi
15203
15204 if test "$ol_enable_ldap" != no ; then
15205         cat >> confdefs.h <<\EOF
15206 #define SLAPD_LDAP 1
15207 EOF
15208
15209         BUILD_SLAPD=yes
15210         BUILD_LDAP=yes
15211         if test "$ol_with_ldap_module" != static ; then
15212                 cat >> confdefs.h <<\EOF
15213 #define SLAPD_LDAP_DYNAMIC 1
15214 EOF
15215
15216                 BUILD_LDAP=mod
15217                 BUILD_LDAP_DYNAMIC=shared
15218                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15219         fi
15220 fi
15221
15222 if test "$ol_link_ldbm" != no ; then
15223         cat >> confdefs.h <<\EOF
15224 #define SLAPD_LDBM 1
15225 EOF
15226
15227         BUILD_SLAPD=yes
15228         BUILD_LDBM=yes
15229         if test "$ol_with_ldbm_module" != static ; then
15230                 cat >> confdefs.h <<\EOF
15231 #define SLAPD_LDBM_DYNAMIC 1
15232 EOF
15233
15234                 BUILD_LDBM=mod
15235                 BUILD_LDBM_DYNAMIC=shared
15236                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15237         fi
15238 fi
15239
15240 if test "$ol_enable_passwd" != no ; then
15241         cat >> confdefs.h <<\EOF
15242 #define SLAPD_PASSWD 1
15243 EOF
15244
15245         BUILD_SLAPD=yes
15246         BUILD_PASSWD=yes
15247         if test "$ol_with_passwd_module" != static ; then
15248                 cat >> confdefs.h <<\EOF
15249 #define SLAPD_PASSWD_DYNAMIC 1
15250 EOF
15251
15252                 BUILD_PASSWD=mod
15253                 BUILD_PASSWD_DYNAMIC=shared
15254                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15255         fi
15256 fi
15257
15258 if test "$ol_link_perl" != no ; then
15259         cat >> confdefs.h <<\EOF
15260 #define SLAPD_PERL 1
15261 EOF
15262
15263         BUILD_SLAPD=yes
15264         BUILD_PERL=yes
15265         if test "$ol_with_perl_module" != static ; then
15266                 cat >> confdefs.h <<\EOF
15267 #define SLAPD_PERL_DYNAMIC 1
15268 EOF
15269
15270                 BUILD_PERL=mod
15271                 BUILD_PERL_DYNAMIC=shared
15272                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15273         fi
15274 fi
15275
15276 if test "$ol_enable_shell" != no ; then
15277         cat >> confdefs.h <<\EOF
15278 #define SLAPD_SHELL 1
15279 EOF
15280
15281         BUILD_SLAPD=yes
15282         BUILD_SHELL=yes
15283         if test "$ol_with_shell_module" != static ; then
15284                 cat >> confdefs.h <<\EOF
15285 #define SLAPD_SHELL_DYNAMIC 1
15286 EOF
15287
15288                 BUILD_SHELL=mod
15289                 BUILD_SHELL_DYNAMIC=shared
15290                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15291         fi
15292 fi
15293
15294 if test "$ol_enable_tcl" != no ; then
15295         cat >> confdefs.h <<\EOF
15296 #define SLAPD_TCL 1
15297 EOF
15298
15299         BUILD_SLAPD=yes
15300         BUILD_TCL=yes
15301         if test "$ol_with_tcl_module" != static; then
15302                 cat >> confdefs.h <<\EOF
15303 #define SLAPD_TCL_DYNAMIC 1
15304 EOF
15305
15306                 BUILD_TCL=mod
15307                 BUILD_TCL_DYNAMIC=shared
15308                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15309         fi
15310 fi
15311
15312 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15313         $BUILD_SLAPD = yes ; then
15314         BUILD_SLURPD=yes
15315 fi
15316
15317 if test "$ol_link_isode" != no ; then
15318         BUILD_LDAPD=yes
15319 fi
15320
15321
15322 if test "$LINK_BINS_DYNAMIC" = yes; then
15323     LIB_LINKAGE=DYN
15324     LT_LIB_LINKAGE=shared
15325 else
15326     LIB_LINKAGE=STAT
15327     LT_LIB_LINKAGE=static
15328 fi
15329
15330 if test "$ac_cv_mingw32" = yes ; then
15331     PLAT=NT
15332     DYN_EXT=dll
15333 else
15334     PLAT=UNIX
15335     DYN_EXT=so
15336 fi
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347   
15348   
15349   
15350   
15351   
15352   
15353   
15354   
15355   
15356   
15357   
15358   
15359   
15360   
15361   
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393 trap '' 1 2 15
15394
15395 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15396
15397 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15398 # Let make expand exec_prefix.
15399 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15400
15401 # Any assignment to VPATH causes Sun make to only execute
15402 # the first set of double-colon rules, so remove it if not needed.
15403 # If there is a colon in the path, we need to keep it.
15404 if test "x$srcdir" = x.; then
15405   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15406 fi
15407
15408 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15409
15410 DEFS=-DHAVE_CONFIG_H
15411
15412 # Without the "./", some shells look in PATH for config.status.
15413 : ${CONFIG_STATUS=./config.status}
15414
15415 echo creating $CONFIG_STATUS
15416 rm -f $CONFIG_STATUS
15417 cat > $CONFIG_STATUS <<EOF
15418 #! /bin/sh
15419 # Generated automatically by configure.
15420 # Run this file to recreate the current configuration.
15421 # This directory was configured as follows,
15422 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15423 #
15424 # $0 $ac_configure_args
15425 #
15426 # Compiler output produced by configure, useful for debugging
15427 # configure, is in ./config.log if it exists.
15428
15429 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15430 for ac_option
15431 do
15432   case "\$ac_option" in
15433   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15434     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15435     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15436   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15437     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15438     exit 0 ;;
15439   -help | --help | --hel | --he | --h)
15440     echo "\$ac_cs_usage"; exit 0 ;;
15441   *) echo "\$ac_cs_usage"; exit 1 ;;
15442   esac
15443 done
15444
15445 ac_given_srcdir=$srcdir
15446 ac_given_INSTALL="$INSTALL"
15447
15448 trap 'rm -fr `echo "\
15449 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15450 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15451 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15452 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15453 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15454 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15455 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15456 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15457 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15458 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15459 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15460 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15461 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15462 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15463 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15464 include/Makefile:build/top.mk:include/Makefile.in \
15465 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15466 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15467 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15468 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15469 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15470 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15471 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15472 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15473 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15474 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15475 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15476 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15477 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15478 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15479 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15480 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15481 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15482 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15483 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15484 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15485 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15486 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15487 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15488 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15489 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15490 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15491  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15492 EOF
15493 cat >> $CONFIG_STATUS <<EOF
15494
15495 # Protect against being on the right side of a sed subst in config.status.
15496 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15497  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15498 $ac_vpsub
15499 $extrasub
15500 s%@SHELL@%$SHELL%g
15501 s%@CFLAGS@%$CFLAGS%g
15502 s%@CPPFLAGS@%$CPPFLAGS%g
15503 s%@CXXFLAGS@%$CXXFLAGS%g
15504 s%@FFLAGS@%$FFLAGS%g
15505 s%@DEFS@%$DEFS%g
15506 s%@LDFLAGS@%$LDFLAGS%g
15507 s%@LIBS@%$LIBS%g
15508 s%@exec_prefix@%$exec_prefix%g
15509 s%@prefix@%$prefix%g
15510 s%@program_transform_name@%$program_transform_name%g
15511 s%@bindir@%$bindir%g
15512 s%@sbindir@%$sbindir%g
15513 s%@libexecdir@%$libexecdir%g
15514 s%@datadir@%$datadir%g
15515 s%@sysconfdir@%$sysconfdir%g
15516 s%@sharedstatedir@%$sharedstatedir%g
15517 s%@localstatedir@%$localstatedir%g
15518 s%@libdir@%$libdir%g
15519 s%@includedir@%$includedir%g
15520 s%@oldincludedir@%$oldincludedir%g
15521 s%@infodir@%$infodir%g
15522 s%@mandir@%$mandir%g
15523 s%@host@%$host%g
15524 s%@host_alias@%$host_alias%g
15525 s%@host_cpu@%$host_cpu%g
15526 s%@host_vendor@%$host_vendor%g
15527 s%@host_os@%$host_os%g
15528 s%@target@%$target%g
15529 s%@target_alias@%$target_alias%g
15530 s%@target_cpu@%$target_cpu%g
15531 s%@target_vendor@%$target_vendor%g
15532 s%@target_os@%$target_os%g
15533 s%@build@%$build%g
15534 s%@build_alias@%$build_alias%g
15535 s%@build_cpu@%$build_cpu%g
15536 s%@build_vendor@%$build_vendor%g
15537 s%@build_os@%$build_os%g
15538 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15539 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15540 s%@INSTALL_DATA@%$INSTALL_DATA%g
15541 s%@PACKAGE@%$PACKAGE%g
15542 s%@VERSION@%$VERSION%g
15543 s%@ACLOCAL@%$ACLOCAL%g
15544 s%@AUTOCONF@%$AUTOCONF%g
15545 s%@AUTOMAKE@%$AUTOMAKE%g
15546 s%@AUTOHEADER@%$AUTOHEADER%g
15547 s%@MAKEINFO@%$MAKEINFO%g
15548 s%@install_sh@%$install_sh%g
15549 s%@AMTAR@%$AMTAR%g
15550 s%@AWK@%$AWK%g
15551 s%@AMTARFLAGS@%$AMTARFLAGS%g
15552 s%@SET_MAKE@%$SET_MAKE%g
15553 s%@top_builddir@%$top_builddir%g
15554 s%@ldap_subdir@%$ldap_subdir%g
15555 s%@CC@%$CC%g
15556 s%@RANLIB@%$RANLIB%g
15557 s%@LD@%$LD%g
15558 s%@NM@%$NM%g
15559 s%@LN_S@%$LN_S%g
15560 s%@DLLTOOL@%$DLLTOOL%g
15561 s%@AS@%$AS%g
15562 s%@OBJDUMP@%$OBJDUMP%g
15563 s%@LIBTOOL@%$LIBTOOL%g
15564 s%@LN_H@%$LN_H%g
15565 s%@SENDMAIL@%$SENDMAIL%g
15566 s%@EDITOR@%$EDITOR%g
15567 s%@FINGER@%$FINGER%g
15568 s%@PERLBIN@%$PERLBIN%g
15569 s%@CPP@%$CPP%g
15570 s%@EXEEXT@%$EXEEXT%g
15571 s%@OBJEXT@%$OBJEXT%g
15572 s%@OL_MKDEP@%$OL_MKDEP%g
15573 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15574 s%@PEPSY@%$PEPSY%g
15575 s%@LIBOBJS@%$LIBOBJS%g
15576 s%@LIBSRCS@%$LIBSRCS%g
15577 s%@PLAT@%$PLAT%g
15578 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15579 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15580 s%@DYN_EXT@%$DYN_EXT%g
15581 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15582 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15583 s%@BUILD_BDB2@%$BUILD_BDB2%g
15584 s%@BUILD_LDAP@%$BUILD_LDAP%g
15585 s%@BUILD_LDBM@%$BUILD_LDBM%g
15586 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15587 s%@BUILD_PERL@%$BUILD_PERL%g
15588 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15589 s%@BUILD_SHELL@%$BUILD_SHELL%g
15590 s%@BUILD_TCL@%$BUILD_TCL%g
15591 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15592 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15593 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15594 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15595 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15596 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15597 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15598 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15599 s%@LDAP_LIBS@%$LDAP_LIBS%g
15600 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15601 s%@LDIF_LIBS@%$LDIF_LIBS%g
15602 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15603 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15604 s%@LDBM_LIBS@%$LDBM_LIBS%g
15605 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15606 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15607 s%@WRAP_LIBS@%$WRAP_LIBS%g
15608 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15609 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15610 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15611 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15612 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15613 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15614 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15615 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15616 s%@KRB4_LIBS@%$KRB4_LIBS%g
15617 s%@KRB5_LIBS@%$KRB5_LIBS%g
15618 s%@READLINE_LIBS@%$READLINE_LIBS%g
15619 s%@SASL_LIBS@%$SASL_LIBS%g
15620 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15621 s%@TLS_LIBS@%$TLS_LIBS%g
15622 s%@MODULES_LIBS@%$MODULES_LIBS%g
15623
15624 CEOF
15625 EOF
15626
15627 cat >> $CONFIG_STATUS <<\EOF
15628
15629 # Split the substitutions into bite-sized pieces for seds with
15630 # small command number limits, like on Digital OSF/1 and HP-UX.
15631 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15632 ac_file=1 # Number of current file.
15633 ac_beg=1 # First line for current file.
15634 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15635 ac_more_lines=:
15636 ac_sed_cmds=""
15637 while $ac_more_lines; do
15638   if test $ac_beg -gt 1; then
15639     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15640   else
15641     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15642   fi
15643   if test ! -s conftest.s$ac_file; then
15644     ac_more_lines=false
15645     rm -f conftest.s$ac_file
15646   else
15647     if test -z "$ac_sed_cmds"; then
15648       ac_sed_cmds="sed -f conftest.s$ac_file"
15649     else
15650       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15651     fi
15652     ac_file=`expr $ac_file + 1`
15653     ac_beg=$ac_end
15654     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15655   fi
15656 done
15657 if test -z "$ac_sed_cmds"; then
15658   ac_sed_cmds=cat
15659 fi
15660 EOF
15661
15662 cat >> $CONFIG_STATUS <<EOF
15663
15664 CONFIG_FILES=\${CONFIG_FILES-"\
15665 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15666 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15667 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15668 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15669 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15670 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15671 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15672 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15673 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15674 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15675 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15676 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15677 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15678 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15679 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15680 include/Makefile:build/top.mk:include/Makefile.in \
15681 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15682 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15683 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15684 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15685 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15686 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15687 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15688 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15689 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15690 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15691 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15692 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15693 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15694 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15695 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15696 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15697 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15698 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15699 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15700 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15701 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15702 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15703 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15704 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15705 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15706 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15707 "}
15708 EOF
15709 cat >> $CONFIG_STATUS <<\EOF
15710 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15711   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15712   case "$ac_file" in
15713   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15714        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15715   *) ac_file_in="${ac_file}.in" ;;
15716   esac
15717
15718   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15719
15720   # Remove last slash and all that follows it.  Not all systems have dirname.
15721   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15722   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15723     # The file is in a subdirectory.
15724     test ! -d "$ac_dir" && mkdir "$ac_dir"
15725     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15726     # A "../" for each directory in $ac_dir_suffix.
15727     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15728   else
15729     ac_dir_suffix= ac_dots=
15730   fi
15731
15732   case "$ac_given_srcdir" in
15733   .)  srcdir=.
15734       if test -z "$ac_dots"; then top_srcdir=.
15735       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15736   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15737   *) # Relative path.
15738     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15739     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15740   esac
15741
15742   case "$ac_given_INSTALL" in
15743   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15744   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15745   esac
15746
15747   echo creating "$ac_file"
15748   rm -f "$ac_file"
15749   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15750   case "$ac_file" in
15751   *Makefile*) ac_comsub="1i\\
15752 # $configure_input" ;;
15753   *) ac_comsub= ;;
15754   esac
15755
15756   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15757   sed -e "$ac_comsub
15758 s%@configure_input@%$configure_input%g
15759 s%@srcdir@%$srcdir%g
15760 s%@top_srcdir@%$top_srcdir%g
15761 s%@INSTALL@%$INSTALL%g
15762 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15763 fi; done
15764 rm -f conftest.s*
15765
15766 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15767 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15768 #
15769 # ac_d sets the value in "#define NAME VALUE" lines.
15770 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15771 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15772 ac_dC='\3'
15773 ac_dD='%g'
15774 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15775 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15776 ac_uB='\([      ]\)%\1#\2define\3'
15777 ac_uC=' '
15778 ac_uD='\4%g'
15779 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15780 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15781 ac_eB='$%\1#\2define\3'
15782 ac_eC=' '
15783 ac_eD='%g'
15784
15785 if test "${CONFIG_HEADERS+set}" != set; then
15786 EOF
15787 cat >> $CONFIG_STATUS <<EOF
15788   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15789 EOF
15790 cat >> $CONFIG_STATUS <<\EOF
15791 fi
15792 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15793   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15794   case "$ac_file" in
15795   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15796        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15797   *) ac_file_in="${ac_file}.in" ;;
15798   esac
15799
15800   echo creating $ac_file
15801
15802   rm -f conftest.frag conftest.in conftest.out
15803   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15804   cat $ac_file_inputs > conftest.in
15805
15806 EOF
15807
15808 # Transform confdefs.h into a sed script conftest.vals that substitutes
15809 # the proper values into config.h.in to produce config.h.  And first:
15810 # Protect against being on the right side of a sed subst in config.status.
15811 # Protect against being in an unquoted here document in config.status.
15812 rm -f conftest.vals
15813 cat > conftest.hdr <<\EOF
15814 s/[\\&%]/\\&/g
15815 s%[\\$`]%\\&%g
15816 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15817 s%ac_d%ac_u%gp
15818 s%ac_u%ac_e%gp
15819 EOF
15820 sed -n -f conftest.hdr confdefs.h > conftest.vals
15821 rm -f conftest.hdr
15822
15823 # This sed command replaces #undef with comments.  This is necessary, for
15824 # example, in the case of _POSIX_SOURCE, which is predefined and required
15825 # on some systems where configure will not decide to define it.
15826 cat >> conftest.vals <<\EOF
15827 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15828 EOF
15829
15830 # Break up conftest.vals because some shells have a limit on
15831 # the size of here documents, and old seds have small limits too.
15832
15833 rm -f conftest.tail
15834 while :
15835 do
15836   ac_lines=`grep -c . conftest.vals`
15837   # grep -c gives empty output for an empty file on some AIX systems.
15838   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15839   # Write a limited-size here document to conftest.frag.
15840   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15841   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15842   echo 'CEOF
15843   sed -f conftest.frag conftest.in > conftest.out
15844   rm -f conftest.in
15845   mv conftest.out conftest.in
15846 ' >> $CONFIG_STATUS
15847   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15848   rm -f conftest.vals
15849   mv conftest.tail conftest.vals
15850 done
15851 rm -f conftest.vals
15852
15853 cat >> $CONFIG_STATUS <<\EOF
15854   rm -f conftest.frag conftest.h
15855   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15856   cat conftest.in >> conftest.h
15857   rm -f conftest.in
15858   if cmp -s $ac_file conftest.h 2>/dev/null; then
15859     echo "$ac_file is unchanged"
15860     rm -f conftest.h
15861   else
15862     # Remove last slash and all that follows it.  Not all systems have dirname.
15863       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15864       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15865       # The file is in a subdirectory.
15866       test ! -d "$ac_dir" && mkdir "$ac_dir"
15867     fi
15868     rm -f $ac_file
15869     mv conftest.h $ac_file
15870   fi
15871 fi; done
15872
15873 EOF
15874 cat >> $CONFIG_STATUS <<EOF
15875
15876 EOF
15877 cat >> $CONFIG_STATUS <<\EOF
15878
15879 date > stamp-h
15880 echo Please \"make depend\" to build dependencies
15881
15882 exit 0
15883 EOF
15884 chmod +x $CONFIG_STATUS
15885 rm -fr confdefs* $ac_clean_files
15886 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15887