]> git.sur5r.net Git - openldap/blob - configure
Add ldap_pvt_tls_get_peer_dn() routine. Returns peer as an LDAP DN.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.347 2001/01/16 21:18:42 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (no)"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords (yes)"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords (auto)"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification (no)"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords (auto)"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support (no)"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex (no)"
83 ac_help="$ac_help
84     --enable-rlookups     enable reverse lookups (no)"
85 ac_help="$ac_help
86   --enable-slp            enable SLPv2 support (no)"
87 ac_help="$ac_help
88     --enable-wrappers     enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend (no)"
91 ac_help="$ac_help
92     --with-bdb-module  module type (static)"
93 ac_help="$ac_help
94     --enable-dnssrv       enable dnssrv backend (no)"
95 ac_help="$ac_help
96     --with-dnssrv-module  module type (static)"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend (no)"
99 ac_help="$ac_help
100     --with-ldap-module    module type (static)"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend (yes)"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API (auto)"
105 ac_help="$ac_help
106     --with-ldbm-module    module type (static)"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type (auto)"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend (no)"
111 ac_help="$ac_help
112     --with-passwd-module  module type (static)"
113 ac_help="$ac_help
114     --enable-perl         enable perl backend (no)"
115 ac_help="$ac_help
116     --with-perl-module    module type (static)"
117 ac_help="$ac_help
118     --enable-shell        enable shell backend (no)"
119 ac_help="$ac_help
120     --with-shell-module   module type (static)"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend (no)"
123 ac_help="$ac_help
124     --with-sql-module     module type (static)"
125 ac_help="$ac_help
126     --enable-tcl          enable tcl backend (no)"
127 ac_help="$ac_help
128     --with-tcl-module     module type (static)"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd         enable building slurpd (auto)"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13.1"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version.sh
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
648 # set unset (borrowed from autoconf 2.49c)
649 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
650   ol_unset=unset
651 else
652   ol_unset=false
653 fi
654 # unset CDPATH
655 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
656
657 ac_aux_dir=
658 for ac_dir in build $srcdir/build; do
659   if test -f $ac_dir/install-sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install-sh -c"
662     break
663   elif test -f $ac_dir/install.sh; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/install.sh -c"
666     break
667   elif test -f $ac_dir/shtool; then
668     ac_aux_dir=$ac_dir
669     ac_install_sh="$ac_aux_dir/shtool install -c"
670     break
671   fi
672 done
673 if test -z "$ac_aux_dir"; then
674   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
675 fi
676 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
677 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
678 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
679
680 eval `$ac_aux_dir/version.sh`
681 if test -z "$OL_STRING"; then
682         { echo "configure: error: could not determine version" 1>&2; exit 1; }
683 fi
684
685 echo "Configuring $OL_STRING ..."
686
687
688 echo $ac_n "checking host system type""... $ac_c" 1>&6
689 echo "configure:690: checking host system type" >&5
690 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
691
692 # Make sure we can run config.sub.
693   if $ac_config_sub sun4 >/dev/null 2>&1; then :
694     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
695   fi
696
697   ac_cv_host_alias=$host
698   case "$ac_cv_host_alias" in
699   NONE)
700     case $nonopt in
701     NONE)
702       if ac_cv_host_alias=`$ac_config_guess`; then :
703       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
704       fi ;;
705     *) ac_cv_host_alias=$nonopt ;;
706     esac ;;
707   esac
708
709   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
710   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
711   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
712   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
713 else
714   echo $ac_n "(cached) $ac_c" 1>&6
715 fi
716
717 echo "$ac_t""$ac_cv_host" 1>&6
718
719 host=$ac_cv_host
720 host_alias=$ac_cv_host_alias
721 host_cpu=$ac_cv_host_cpu
722 host_vendor=$ac_cv_host_vendor
723 host_os=$ac_cv_host_os
724
725
726
727
728
729 echo $ac_n "checking target system type""... $ac_c" 1>&6
730 echo "configure:731: checking target system type" >&5
731 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
732
733 # Make sure we can run config.sub.
734   if $ac_config_sub sun4 >/dev/null 2>&1; then :
735     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
736   fi
737
738   ac_cv_target_alias=$target
739   case "$ac_cv_target_alias" in
740   NONE)
741     case $nonopt in
742     NONE)
743       ac_cv_target_alias=$host_alias ;;
744
745     *) ac_cv_target_alias=$nonopt ;;
746     esac ;;
747   esac
748
749   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
750   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
751   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
752   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
753 else
754   echo $ac_n "(cached) $ac_c" 1>&6
755 fi
756
757 echo "$ac_t""$ac_cv_target" 1>&6
758
759 target=$ac_cv_target
760 target_alias=$ac_cv_target_alias
761 target_cpu=$ac_cv_target_cpu
762 target_vendor=$ac_cv_target_vendor
763 target_os=$ac_cv_target_os
764
765
766
767
768
769 echo $ac_n "checking build system type""... $ac_c" 1>&6
770 echo "configure:771: checking build system type" >&5
771 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
772
773 # Make sure we can run config.sub.
774   if $ac_config_sub sun4 >/dev/null 2>&1; then :
775     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
776   fi
777
778   ac_cv_build_alias=$build
779   case "$ac_cv_build_alias" in
780   NONE)
781     case $nonopt in
782     NONE)
783       ac_cv_build_alias=$host_alias ;;
784
785     *) ac_cv_build_alias=$nonopt ;;
786     esac ;;
787   esac
788
789   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
790   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
791   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
792   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
793 else
794   echo $ac_n "(cached) $ac_c" 1>&6
795 fi
796
797 echo "$ac_t""$ac_cv_build" 1>&6
798
799 build=$ac_cv_build
800 build_alias=$ac_cv_build_alias
801 build_cpu=$ac_cv_build_cpu
802 build_vendor=$ac_cv_build_vendor
803 build_os=$ac_cv_build_os
804
805
806
807
808
809 # Do some error checking and defaulting for the host and target type.
810 # The inputs are:
811 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
812 #
813 # The rules are:
814 # 1. You are not allowed to specify --host, --target, and nonopt at the
815 #    same time.
816 # 2. Host defaults to nonopt.
817 # 3. If nonopt is not specified, then host defaults to the current host,
818 #    as determined by config.guess.
819 # 4. Target and build default to nonopt.
820 # 5. If nonopt is not specified, then target and build default to host.
821
822 # The aliases save the names the user supplied, while $host etc.
823 # will get canonicalized.
824 case $host---$target---$nonopt in
825 NONE---*---* | *---NONE---* | *---*---NONE) ;;
826 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
827 esac
828
829 test "$host_alias" != "$target_alias" &&
830   test "$program_prefix$program_suffix$program_transform_name" = \
831     NONENONEs,x,x, &&
832   program_prefix=${target_alias}-
833
834
835 # Find a good install program.  We prefer a C program (faster),
836 # so one script is as good as another.  But avoid the broken or
837 # incompatible versions:
838 # SysV /etc/install, /usr/sbin/install
839 # SunOS /usr/etc/install
840 # IRIX /sbin/install
841 # AIX /bin/install
842 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
843 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
844 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
845 # ./install, which can be erroneously created by make from ./install.sh.
846 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
847 echo "configure:848: checking for a BSD compatible install" >&5
848 if test -z "$INSTALL"; then
849 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
850   echo $ac_n "(cached) $ac_c" 1>&6
851 else
852     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
853   for ac_dir in $PATH; do
854     # Account for people who put trailing slashes in PATH elements.
855     case "$ac_dir/" in
856     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
857     *)
858       # OSF1 and SCO ODT 3.0 have their own names for install.
859       # Don't use installbsd from OSF since it installs stuff as root
860       # by default.
861       for ac_prog in ginstall scoinst install; do
862         if test -f $ac_dir/$ac_prog; then
863           if test $ac_prog = install &&
864             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # AIX install.  It has an incompatible calling convention.
866             :
867           elif test $ac_prog = install &&
868             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
869             # program-specific install script used by HP pwplus--don't use.
870             :
871           else
872             ac_cv_path_install="$ac_dir/$ac_prog -c"
873             break 2
874           fi
875         fi
876       done
877       ;;
878     esac
879   done
880   IFS="$ac_save_IFS"
881
882 fi
883   if test "${ac_cv_path_install+set}" = set; then
884     INSTALL="$ac_cv_path_install"
885   else
886     # As a last resort, use the slow shell script.  We don't cache a
887     # path for INSTALL within a source directory, because that will
888     # break other packages using the cache if that directory is
889     # removed, or if the path is relative.
890     INSTALL="$ac_install_sh"
891   fi
892 fi
893 echo "$ac_t""$INSTALL" 1>&6
894
895 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
896 # It thinks the first close brace ends the variable substitution.
897 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
898
899 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
900
901 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
902
903 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
904 echo "configure:905: checking whether build environment is sane" >&5
905 # Just in case
906 sleep 1
907 echo timestamp > conftestfile
908 # Do `set' in a subshell so we don't clobber the current shell's
909 # arguments.  Must try -L first in case configure is actually a
910 # symlink; some systems play weird games with the mod time of symlinks
911 # (eg FreeBSD returns the mod time of the symlink's containing
912 # directory).
913 if (
914    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
915    if test "$*" = "X"; then
916       # -L didn't work.
917       set X `ls -t $srcdir/configure conftestfile`
918    fi
919    if test "$*" != "X $srcdir/configure conftestfile" \
920       && test "$*" != "X conftestfile $srcdir/configure"; then
921
922       # If neither matched, then we have a broken ls.  This can happen
923       # if, for instance, CONFIG_SHELL is bash and it inherits a
924       # broken ls alias from the environment.  This has actually
925       # happened.  Such a system could not be considered "sane".
926       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
927 alias in your environment" 1>&2; exit 1; }
928    fi
929
930    test "$2" = conftestfile
931    )
932 then
933    # Ok.
934    :
935 else
936    { echo "configure: error: newly created file is older than distributed files!
937 Check your system clock" 1>&2; exit 1; }
938 fi
939 rm -f conftest*
940 echo "$ac_t""yes" 1>&6
941 if test "$program_transform_name" = s,x,x,; then
942   program_transform_name=
943 else
944   # Double any \ or $.  echo might interpret backslashes.
945   cat <<\EOF_SED > conftestsed
946 s,\\,\\\\,g; s,\$,$$,g
947 EOF_SED
948   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
949   rm -f conftestsed
950 fi
951 test "$program_prefix" != NONE &&
952   program_transform_name="s,^,${program_prefix},;$program_transform_name"
953 # Use a double $ so make ignores it.
954 test "$program_suffix" != NONE &&
955   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
956
957 # sed with no file args requires a program.
958 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
959
960 for ac_prog in mawk gawk nawk awk
961 do
962 # Extract the first word of "$ac_prog", so it can be a program name with args.
963 set dummy $ac_prog; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
967   echo $ac_n "(cached) $ac_c" 1>&6
968 else
969   if test -n "$AWK"; then
970   ac_cv_prog_AWK="$AWK" # Let the user override the test.
971 else
972   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
973   ac_dummy="$PATH"
974   for ac_dir in $ac_dummy; do
975     test -z "$ac_dir" && ac_dir=.
976     if test -f $ac_dir/$ac_word; then
977       ac_cv_prog_AWK="$ac_prog"
978       break
979     fi
980   done
981   IFS="$ac_save_ifs"
982 fi
983 fi
984 AWK="$ac_cv_prog_AWK"
985 if test -n "$AWK"; then
986   echo "$ac_t""$AWK" 1>&6
987 else
988   echo "$ac_t""no" 1>&6
989 fi
990
991 test -n "$AWK" && break
992 done
993
994 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
995 echo "configure:996: checking whether ${MAKE-make} sets \${MAKE}" >&5
996 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
997 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
998   echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000   cat > conftestmake <<\EOF
1001 all:
1002         @echo 'ac_maketemp="${MAKE}"'
1003 EOF
1004 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1005 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1006 if test -n "$ac_maketemp"; then
1007   eval ac_cv_prog_make_${ac_make}_set=yes
1008 else
1009   eval ac_cv_prog_make_${ac_make}_set=no
1010 fi
1011 rm -f conftestmake
1012 fi
1013 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1014   echo "$ac_t""yes" 1>&6
1015   SET_MAKE=
1016 else
1017   echo "$ac_t""no" 1>&6
1018   SET_MAKE="MAKE=${MAKE-make}"
1019 fi
1020
1021
1022
1023 PACKAGE=$OL_PACKAGE
1024
1025 VERSION=$OL_VERSION
1026
1027 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1028   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1029 fi
1030
1031
1032
1033 missing_dir=`cd $ac_aux_dir && pwd`
1034 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1035 echo "configure:1036: checking for working aclocal" >&5
1036 # Run test in a subshell; some versions of sh will print an error if
1037 # an executable is not found, even if stderr is redirected.
1038 # Redirect stdin to placate older versions of autoconf.  Sigh.
1039 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1040    ACLOCAL=aclocal
1041    echo "$ac_t""found" 1>&6
1042 else
1043    ACLOCAL="$missing_dir/missing aclocal"
1044    echo "$ac_t""missing" 1>&6
1045 fi
1046
1047 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1048 echo "configure:1049: checking for working autoconf" >&5
1049 # Run test in a subshell; some versions of sh will print an error if
1050 # an executable is not found, even if stderr is redirected.
1051 # Redirect stdin to placate older versions of autoconf.  Sigh.
1052 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1053    AUTOCONF=autoconf
1054    echo "$ac_t""found" 1>&6
1055 else
1056    AUTOCONF="$missing_dir/missing autoconf"
1057    echo "$ac_t""missing" 1>&6
1058 fi
1059
1060 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1061 echo "configure:1062: checking for working automake" >&5
1062 # Run test in a subshell; some versions of sh will print an error if
1063 # an executable is not found, even if stderr is redirected.
1064 # Redirect stdin to placate older versions of autoconf.  Sigh.
1065 if (automake --version) < /dev/null > /dev/null 2>&1; then
1066    AUTOMAKE=automake
1067    echo "$ac_t""found" 1>&6
1068 else
1069    AUTOMAKE="$missing_dir/missing automake"
1070    echo "$ac_t""missing" 1>&6
1071 fi
1072
1073 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1074 echo "configure:1075: checking for working autoheader" >&5
1075 # Run test in a subshell; some versions of sh will print an error if
1076 # an executable is not found, even if stderr is redirected.
1077 # Redirect stdin to placate older versions of autoconf.  Sigh.
1078 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1079    AUTOHEADER=autoheader
1080    echo "$ac_t""found" 1>&6
1081 else
1082    AUTOHEADER="$missing_dir/missing autoheader"
1083    echo "$ac_t""missing" 1>&6
1084 fi
1085
1086 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1087 echo "configure:1088: checking for working makeinfo" >&5
1088 # Run test in a subshell; some versions of sh will print an error if
1089 # an executable is not found, even if stderr is redirected.
1090 # Redirect stdin to placate older versions of autoconf.  Sigh.
1091 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1092    MAKEINFO=makeinfo
1093    echo "$ac_t""found" 1>&6
1094 else
1095    MAKEINFO="$missing_dir/missing makeinfo"
1096    echo "$ac_t""missing" 1>&6
1097 fi
1098
1099 install_sh="$missing_dir/install-sh"
1100 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1101
1102 for ac_prog in gnutar gtar tar
1103 do
1104 # Extract the first word of "$ac_prog", so it can be a program name with args.
1105 set dummy $ac_prog; ac_word=$2
1106 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1107 echo "configure:1108: checking for $ac_word" >&5
1108 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1109   echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111   if test -n "$AMTAR"; then
1112   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1113 else
1114   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1115   ac_dummy="$PATH"
1116   for ac_dir in $ac_dummy; do
1117     test -z "$ac_dir" && ac_dir=.
1118     if test -f $ac_dir/$ac_word; then
1119       ac_cv_prog_AMTAR="$ac_prog"
1120       break
1121     fi
1122   done
1123   IFS="$ac_save_ifs"
1124 fi
1125 fi
1126 AMTAR="$ac_cv_prog_AMTAR"
1127 if test -n "$AMTAR"; then
1128   echo "$ac_t""$AMTAR" 1>&6
1129 else
1130   echo "$ac_t""no" 1>&6
1131 fi
1132
1133 test -n "$AMTAR" && break
1134 done
1135
1136
1137 AMTARFLAGS=
1138 if test -n "$AMTAR"; then
1139   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1140         AMTARFLAGS=o
1141   fi
1142 fi
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION $OL_API_INC
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1163 EOF
1164
1165 cat >> confdefs.h <<EOF
1166 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1167 EOF
1168
1169
1170 OPENLDAP_LIBVERSION=$OL_API_LIB
1171
1172
1173
1174 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1175 echo "configure:1176: checking configure arguments" >&5
1176
1177
1178 top_builddir=`pwd`
1179
1180 ldap_subdir="/openldap"
1181
1182 # Check whether --with-subdir or --without-subdir was given.
1183 if test "${with_subdir+set}" = set; then
1184   withval="$with_subdir"
1185   case "$withval" in
1186         no) ldap_subdir=""
1187                 ;;
1188         yes)
1189                 ;;
1190         /*|\\*)
1191                 ldap_subdir="$withval"
1192                 ;;
1193         *)
1194                 ldap_subdir="/$withval"
1195                 ;;
1196 esac
1197
1198 fi
1199
1200
1201 # OpenLDAP --enable-debug
1202         # Check whether --enable-debug or --disable-debug was given.
1203 if test "${enable_debug+set}" = set; then
1204   enableval="$enable_debug"
1205   
1206         ol_arg=invalid
1207         for ol_val in auto yes no ; do
1208                 if test "$enableval" = "$ol_val" ; then
1209                         ol_arg="$ol_val"
1210                 fi
1211         done
1212         if test "$ol_arg" = "invalid" ; then
1213                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1214         fi
1215         ol_enable_debug="$ol_arg"
1216
1217 else
1218         ol_enable_debug="yes"
1219 fi
1220 # end --enable-debug
1221 # OpenLDAP --enable-syslog
1222         # Check whether --enable-syslog or --disable-syslog was given.
1223 if test "${enable_syslog+set}" = set; then
1224   enableval="$enable_syslog"
1225   
1226         ol_arg=invalid
1227         for ol_val in auto yes no ; do
1228                 if test "$enableval" = "$ol_val" ; then
1229                         ol_arg="$ol_val"
1230                 fi
1231         done
1232         if test "$ol_arg" = "invalid" ; then
1233                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1234         fi
1235         ol_enable_syslog="$ol_arg"
1236
1237 else
1238         ol_enable_syslog="auto"
1239 fi
1240 # end --enable-syslog
1241 # OpenLDAP --enable-proctitle
1242         # Check whether --enable-proctitle or --disable-proctitle was given.
1243 if test "${enable_proctitle+set}" = set; then
1244   enableval="$enable_proctitle"
1245   
1246         ol_arg=invalid
1247         for ol_val in auto yes no ; do
1248                 if test "$enableval" = "$ol_val" ; then
1249                         ol_arg="$ol_val"
1250                 fi
1251         done
1252         if test "$ol_arg" = "invalid" ; then
1253                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1254         fi
1255         ol_enable_proctitle="$ol_arg"
1256
1257 else
1258         ol_enable_proctitle="yes"
1259 fi
1260 # end --enable-proctitle
1261 # OpenLDAP --enable-cache
1262         # Check whether --enable-cache or --disable-cache was given.
1263 if test "${enable_cache+set}" = set; then
1264   enableval="$enable_cache"
1265   
1266         ol_arg=invalid
1267         for ol_val in auto yes no ; do
1268                 if test "$enableval" = "$ol_val" ; then
1269                         ol_arg="$ol_val"
1270                 fi
1271         done
1272         if test "$ol_arg" = "invalid" ; then
1273                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1274         fi
1275         ol_enable_cache="$ol_arg"
1276
1277 else
1278         ol_enable_cache="yes"
1279 fi
1280 # end --enable-cache
1281 # OpenLDAP --enable-referrals
1282         # Check whether --enable-referrals or --disable-referrals was given.
1283 if test "${enable_referrals+set}" = set; then
1284   enableval="$enable_referrals"
1285   
1286         ol_arg=invalid
1287         for ol_val in auto yes no ; do
1288                 if test "$enableval" = "$ol_val" ; then
1289                         ol_arg="$ol_val"
1290                 fi
1291         done
1292         if test "$ol_arg" = "invalid" ; then
1293                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1294         fi
1295         ol_enable_referrals="$ol_arg"
1296
1297 else
1298         ol_enable_referrals="yes"
1299 fi
1300 # end --enable-referrals
1301 # OpenLDAP --enable-kbind
1302         # Check whether --enable-kbind or --disable-kbind was given.
1303 if test "${enable_kbind+set}" = set; then
1304   enableval="$enable_kbind"
1305   
1306         ol_arg=invalid
1307         for ol_val in auto yes no ; do
1308                 if test "$enableval" = "$ol_val" ; then
1309                         ol_arg="$ol_val"
1310                 fi
1311         done
1312         if test "$ol_arg" = "invalid" ; then
1313                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1314         fi
1315         ol_enable_kbind="$ol_arg"
1316
1317 else
1318         ol_enable_kbind="no"
1319 fi
1320 # end --enable-kbind
1321 # OpenLDAP --enable-ipv6
1322         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1323 if test "${enable_ipv6+set}" = set; then
1324   enableval="$enable_ipv6"
1325   
1326         ol_arg=invalid
1327         for ol_val in auto yes no ; do
1328                 if test "$enableval" = "$ol_val" ; then
1329                         ol_arg="$ol_val"
1330                 fi
1331         done
1332         if test "$ol_arg" = "invalid" ; then
1333                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1334         fi
1335         ol_enable_ipv6="$ol_arg"
1336
1337 else
1338         ol_enable_ipv6="auto"
1339 fi
1340 # end --enable-ipv6
1341 # OpenLDAP --enable-local
1342         # Check whether --enable-local or --disable-local was given.
1343 if test "${enable_local+set}" = set; then
1344   enableval="$enable_local"
1345   
1346         ol_arg=invalid
1347         for ol_val in auto yes no ; do
1348                 if test "$enableval" = "$ol_val" ; then
1349                         ol_arg="$ol_val"
1350                 fi
1351         done
1352         if test "$ol_arg" = "invalid" ; then
1353                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1354         fi
1355         ol_enable_local="$ol_arg"
1356
1357 else
1358         ol_enable_local="auto"
1359 fi
1360 # end --enable-local
1361 # OpenLDAP --enable-x_compile
1362         # Check whether --enable-x_compile or --disable-x_compile was given.
1363 if test "${enable_x_compile+set}" = set; then
1364   enableval="$enable_x_compile"
1365   
1366         ol_arg=invalid
1367         for ol_val in yes no ; do
1368                 if test "$enableval" = "$ol_val" ; then
1369                         ol_arg="$ol_val"
1370                 fi
1371         done
1372         if test "$ol_arg" = "invalid" ; then
1373                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1374         fi
1375         ol_enable_x_compile="$ol_arg"
1376
1377 else
1378         ol_enable_x_compile="no"
1379 fi
1380 # end --enable-x_compile
1381
1382
1383 # OpenLDAP --with-cyrus_sasl
1384         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1385 if test "${with_cyrus_sasl+set}" = set; then
1386   withval="$with_cyrus_sasl"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no  ; do
1390                 if test "$withval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1396         fi
1397         ol_with_cyrus_sasl="$ol_arg"
1398
1399 else
1400         ol_with_cyrus_sasl="auto"
1401 fi
1402 # end --with-cyrus_sasl
1403
1404 # OpenLDAP --with-fetch
1405         # Check whether --with-fetch or --without-fetch was given.
1406 if test "${with_fetch+set}" = set; then
1407   withval="$with_fetch"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no  ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1417         fi
1418         ol_with_fetch="$ol_arg"
1419
1420 else
1421         ol_with_fetch="auto"
1422 fi
1423 # end --with-fetch
1424
1425 # OpenLDAP --with-kerberos
1426         # Check whether --with-kerberos or --without-kerberos was given.
1427 if test "${with_kerberos+set}" = set; then
1428   withval="$with_kerberos"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1438         fi
1439         ol_with_kerberos="$ol_arg"
1440
1441 else
1442         ol_with_kerberos="auto"
1443 fi
1444 # end --with-kerberos
1445
1446 # OpenLDAP --with-readline
1447         # Check whether --with-readline or --without-readline was given.
1448 if test "${with_readline+set}" = set; then
1449   withval="$with_readline"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no  ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1459         fi
1460         ol_with_readline="$ol_arg"
1461
1462 else
1463         ol_with_readline="auto"
1464 fi
1465 # end --with-readline
1466
1467 # OpenLDAP --with-threads
1468         # Check whether --with-threads or --without-threads was given.
1469 if test "${with_threads+set}" = set; then
1470   withval="$with_threads"
1471   
1472         ol_arg=invalid
1473         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1474                 if test "$withval" = "$ol_val" ; then
1475                         ol_arg="$ol_val"
1476                 fi
1477         done
1478         if test "$ol_arg" = "invalid" ; then
1479                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1480         fi
1481         ol_with_threads="$ol_arg"
1482
1483 else
1484         ol_with_threads="auto"
1485 fi
1486 # end --with-threads
1487
1488 # OpenLDAP --with-tls
1489         # Check whether --with-tls or --without-tls was given.
1490 if test "${with_tls+set}" = set; then
1491   withval="$with_tls"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto ssleay openssl yes no  ; do
1495                 if test "$withval" = "$ol_val" ; then
1496                         ol_arg="$ol_val"
1497                 fi
1498         done
1499         if test "$ol_arg" = "invalid" ; then
1500                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1501         fi
1502         ol_with_tls="$ol_arg"
1503
1504 else
1505         ol_with_tls="auto"
1506 fi
1507 # end --with-tls
1508
1509 # OpenLDAP --with-yielding_select
1510         # Check whether --with-yielding_select or --without-yielding_select was given.
1511 if test "${with_yielding_select+set}" = set; then
1512   withval="$with_yielding_select"
1513   
1514         ol_arg=invalid
1515         for ol_val in auto yes no manual  ; do
1516                 if test "$withval" = "$ol_val" ; then
1517                         ol_arg="$ol_val"
1518                 fi
1519         done
1520         if test "$ol_arg" = "invalid" ; then
1521                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1522         fi
1523         ol_with_yielding_select="$ol_arg"
1524
1525 else
1526         ol_with_yielding_select="auto"
1527 fi
1528 # end --with-yielding_select
1529
1530
1531
1532 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1533 if test "${with_xxslapdoptions+set}" = set; then
1534   withval="$with_xxslapdoptions"
1535   :
1536 fi
1537
1538 # OpenLDAP --enable-slapd
1539         # Check whether --enable-slapd or --disable-slapd was given.
1540 if test "${enable_slapd+set}" = set; then
1541   enableval="$enable_slapd"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no ; do
1545                 if test "$enableval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1551         fi
1552         ol_enable_slapd="$ol_arg"
1553
1554 else
1555         ol_enable_slapd="yes"
1556 fi
1557 # end --enable-slapd
1558 # OpenLDAP --enable-aci
1559         # Check whether --enable-aci or --disable-aci was given.
1560 if test "${enable_aci+set}" = set; then
1561   enableval="$enable_aci"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no ; do
1565                 if test "$enableval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1571         fi
1572         ol_enable_aci="$ol_arg"
1573
1574 else
1575         ol_enable_aci="no"
1576 fi
1577 # end --enable-aci
1578 # OpenLDAP --enable-cleartext
1579         # Check whether --enable-cleartext or --disable-cleartext was given.
1580 if test "${enable_cleartext+set}" = set; then
1581   enableval="$enable_cleartext"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no ; do
1585                 if test "$enableval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1591         fi
1592         ol_enable_cleartext="$ol_arg"
1593
1594 else
1595         ol_enable_cleartext="yes"
1596 fi
1597 # end --enable-cleartext
1598 # OpenLDAP --enable-crypt
1599         # Check whether --enable-crypt or --disable-crypt was given.
1600 if test "${enable_crypt+set}" = set; then
1601   enableval="$enable_crypt"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no ; do
1605                 if test "$enableval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1611         fi
1612         ol_enable_crypt="$ol_arg"
1613
1614 else
1615         ol_enable_crypt="auto"
1616 fi
1617 # end --enable-crypt
1618 # OpenLDAP --enable-dynamic
1619         # Check whether --enable-dynamic or --disable-dynamic was given.
1620 if test "${enable_dynamic+set}" = set; then
1621   enableval="$enable_dynamic"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto yes no ; do
1625                 if test "$enableval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1631         fi
1632         ol_enable_dynamic="$ol_arg"
1633
1634 else
1635         ol_enable_dynamic="no"
1636 fi
1637 # end --enable-dynamic
1638 # OpenLDAP --enable-kpasswd
1639         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1640 if test "${enable_kpasswd+set}" = set; then
1641   enableval="$enable_kpasswd"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_kpasswd="$ol_arg"
1653
1654 else
1655         ol_enable_kpasswd="no"
1656 fi
1657 # end --enable-kpasswd
1658 # OpenLDAP --enable-lmpasswd
1659         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1660 if test "${enable_lmpasswd+set}" = set; then
1661   enableval="$enable_lmpasswd"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1671         fi
1672         ol_enable_lmpasswd="$ol_arg"
1673
1674 else
1675         ol_enable_lmpasswd="auto"
1676 fi
1677 # end --enable-lmpasswd
1678 # OpenLDAP --enable-spasswd
1679         # Check whether --enable-spasswd or --disable-spasswd was given.
1680 if test "${enable_spasswd+set}" = set; then
1681   enableval="$enable_spasswd"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1691         fi
1692         ol_enable_spasswd="$ol_arg"
1693
1694 else
1695         ol_enable_spasswd="no"
1696 fi
1697 # end --enable-spasswd
1698 # OpenLDAP --enable-modules
1699         # Check whether --enable-modules or --disable-modules was given.
1700 if test "${enable_modules+set}" = set; then
1701   enableval="$enable_modules"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1711         fi
1712         ol_enable_modules="$ol_arg"
1713
1714 else
1715         ol_enable_modules="no"
1716 fi
1717 # end --enable-modules
1718 # OpenLDAP --enable-phonetic
1719         # Check whether --enable-phonetic or --disable-phonetic was given.
1720 if test "${enable_phonetic+set}" = set; then
1721   enableval="$enable_phonetic"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1731         fi
1732         ol_enable_phonetic="$ol_arg"
1733
1734 else
1735         ol_enable_phonetic="no"
1736 fi
1737 # end --enable-phonetic
1738 # OpenLDAP --enable-rlookups
1739         # Check whether --enable-rlookups or --disable-rlookups was given.
1740 if test "${enable_rlookups+set}" = set; then
1741   enableval="$enable_rlookups"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1751         fi
1752         ol_enable_rlookups="$ol_arg"
1753
1754 else
1755         ol_enable_rlookups="no"
1756 fi
1757 # end --enable-rlookups
1758 # OpenLDAP --enable-slp
1759         # Check whether --enable-slp or --disable-slp was given.
1760 if test "${enable_slp+set}" = set; then
1761   enableval="$enable_slp"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1771         fi
1772         ol_enable_slp="$ol_arg"
1773
1774 else
1775         ol_enable_slp="no"
1776 fi
1777 # end --enable-slp
1778 # OpenLDAP --enable-wrappers
1779         # Check whether --enable-wrappers or --disable-wrappers was given.
1780 if test "${enable_wrappers+set}" = set; then
1781   enableval="$enable_wrappers"
1782   
1783         ol_arg=invalid
1784         for ol_val in auto yes no ; do
1785                 if test "$enableval" = "$ol_val" ; then
1786                         ol_arg="$ol_val"
1787                 fi
1788         done
1789         if test "$ol_arg" = "invalid" ; then
1790                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1791         fi
1792         ol_enable_wrappers="$ol_arg"
1793
1794 else
1795         ol_enable_wrappers="no"
1796 fi
1797 # end --enable-wrappers
1798
1799 # OpenLDAP --enable-bdb
1800         # Check whether --enable-bdb or --disable-bdb was given.
1801 if test "${enable_bdb+set}" = set; then
1802   enableval="$enable_bdb"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1812         fi
1813         ol_enable_bdb="$ol_arg"
1814
1815 else
1816         ol_enable_bdb="no"
1817 fi
1818 # end --enable-bdb
1819 # OpenLDAP --with-bdb_module
1820         # Check whether --with-bdb_module or --without-bdb_module was given.
1821 if test "${with_bdb_module+set}" = set; then
1822   withval="$with_bdb_module"
1823   
1824         ol_arg=invalid
1825         for ol_val in static dynamic ; do
1826                 if test "$withval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1832         fi
1833         ol_with_bdb_module="$ol_arg"
1834
1835 else
1836         ol_with_bdb_module="static"
1837 fi
1838 # end --with-bdb_module
1839
1840 # OpenLDAP --enable-dnssrv
1841         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1842 if test "${enable_dnssrv+set}" = set; then
1843   enableval="$enable_dnssrv"
1844   
1845         ol_arg=invalid
1846         for ol_val in auto yes no ; do
1847                 if test "$enableval" = "$ol_val" ; then
1848                         ol_arg="$ol_val"
1849                 fi
1850         done
1851         if test "$ol_arg" = "invalid" ; then
1852                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1853         fi
1854         ol_enable_dnssrv="$ol_arg"
1855
1856 else
1857         ol_enable_dnssrv="no"
1858 fi
1859 # end --enable-dnssrv
1860 # OpenLDAP --with-dnssrv_module
1861         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1862 if test "${with_dnssrv_module+set}" = set; then
1863   withval="$with_dnssrv_module"
1864   
1865         ol_arg=invalid
1866         for ol_val in static dynamic ; do
1867                 if test "$withval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1873         fi
1874         ol_with_dnssrv_module="$ol_arg"
1875
1876 else
1877         ol_with_dnssrv_module="static"
1878 fi
1879 # end --with-dnssrv_module
1880
1881 # OpenLDAP --enable-ldap
1882         # Check whether --enable-ldap or --disable-ldap was given.
1883 if test "${enable_ldap+set}" = set; then
1884   enableval="$enable_ldap"
1885   
1886         ol_arg=invalid
1887         for ol_val in auto yes no ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1894         fi
1895         ol_enable_ldap="$ol_arg"
1896
1897 else
1898         ol_enable_ldap="no"
1899 fi
1900 # end --enable-ldap
1901 # OpenLDAP --with-ldap_module
1902         # Check whether --with-ldap_module or --without-ldap_module was given.
1903 if test "${with_ldap_module+set}" = set; then
1904   withval="$with_ldap_module"
1905   
1906         ol_arg=invalid
1907         for ol_val in static dynamic ; do
1908                 if test "$withval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1914         fi
1915         ol_with_ldap_module="$ol_arg"
1916
1917 else
1918         ol_with_ldap_module="static"
1919 fi
1920 # end --with-ldap_module
1921
1922 # OpenLDAP --enable-ldbm
1923         # Check whether --enable-ldbm or --disable-ldbm was given.
1924 if test "${enable_ldbm+set}" = set; then
1925   enableval="$enable_ldbm"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto yes no ; do
1929                 if test "$enableval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1935         fi
1936         ol_enable_ldbm="$ol_arg"
1937
1938 else
1939         ol_enable_ldbm="yes"
1940 fi
1941 # end --enable-ldbm
1942 # OpenLDAP --with-ldbm_api
1943         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1944 if test "${with_ldbm_api+set}" = set; then
1945   withval="$with_ldbm_api"
1946   
1947         ol_arg=invalid
1948         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1949                 if test "$withval" = "$ol_val" ; then
1950                         ol_arg="$ol_val"
1951                 fi
1952         done
1953         if test "$ol_arg" = "invalid" ; then
1954                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1955         fi
1956         ol_with_ldbm_api="$ol_arg"
1957
1958 else
1959         ol_with_ldbm_api="auto"
1960 fi
1961 # end --with-ldbm_api
1962
1963 # OpenLDAP --with-ldbm_module
1964         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1965 if test "${with_ldbm_module+set}" = set; then
1966   withval="$with_ldbm_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_ldbm_module="$ol_arg"
1978
1979 else
1980         ol_with_ldbm_module="static"
1981 fi
1982 # end --with-ldbm_module
1983
1984 # OpenLDAP --with-ldbm_type
1985         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1986 if test "${with_ldbm_type+set}" = set; then
1987   withval="$with_ldbm_type"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto btree hash ; do
1991                 if test "$withval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1997         fi
1998         ol_with_ldbm_type="$ol_arg"
1999
2000 else
2001         ol_with_ldbm_type="auto"
2002 fi
2003 # end --with-ldbm_type
2004
2005 # OpenLDAP --enable-passwd
2006         # Check whether --enable-passwd or --disable-passwd was given.
2007 if test "${enable_passwd+set}" = set; then
2008   enableval="$enable_passwd"
2009   
2010         ol_arg=invalid
2011         for ol_val in auto yes no ; do
2012                 if test "$enableval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2018         fi
2019         ol_enable_passwd="$ol_arg"
2020
2021 else
2022         ol_enable_passwd="no"
2023 fi
2024 # end --enable-passwd
2025 # OpenLDAP --with-passwd_module
2026         # Check whether --with-passwd_module or --without-passwd_module was given.
2027 if test "${with_passwd_module+set}" = set; then
2028   withval="$with_passwd_module"
2029   
2030         ol_arg=invalid
2031         for ol_val in static dynamic ; do
2032                 if test "$withval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2038         fi
2039         ol_with_passwd_module="$ol_arg"
2040
2041 else
2042         ol_with_passwd_module="static"
2043 fi
2044 # end --with-passwd_module
2045
2046 # OpenLDAP --enable-perl
2047         # Check whether --enable-perl or --disable-perl was given.
2048 if test "${enable_perl+set}" = set; then
2049   enableval="$enable_perl"
2050   
2051         ol_arg=invalid
2052         for ol_val in auto yes no ; do
2053                 if test "$enableval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2059         fi
2060         ol_enable_perl="$ol_arg"
2061
2062 else
2063         ol_enable_perl="no"
2064 fi
2065 # end --enable-perl
2066 # OpenLDAP --with-perl_module
2067         # Check whether --with-perl_module or --without-perl_module was given.
2068 if test "${with_perl_module+set}" = set; then
2069   withval="$with_perl_module"
2070   
2071         ol_arg=invalid
2072         for ol_val in static dynamic ; do
2073                 if test "$withval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2079         fi
2080         ol_with_perl_module="$ol_arg"
2081
2082 else
2083         ol_with_perl_module="static"
2084 fi
2085 # end --with-perl_module
2086
2087 # OpenLDAP --enable-shell
2088         # Check whether --enable-shell or --disable-shell was given.
2089 if test "${enable_shell+set}" = set; then
2090   enableval="$enable_shell"
2091   
2092         ol_arg=invalid
2093         for ol_val in auto yes no ; do
2094                 if test "$enableval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2100         fi
2101         ol_enable_shell="$ol_arg"
2102
2103 else
2104         ol_enable_shell="no"
2105 fi
2106 # end --enable-shell
2107 # OpenLDAP --with-shell_module
2108         # Check whether --with-shell_module or --without-shell_module was given.
2109 if test "${with_shell_module+set}" = set; then
2110   withval="$with_shell_module"
2111   
2112         ol_arg=invalid
2113         for ol_val in static dynamic ; do
2114                 if test "$withval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2120         fi
2121         ol_with_shell_module="$ol_arg"
2122
2123 else
2124         ol_with_shell_module="static"
2125 fi
2126 # end --with-shell_module
2127
2128 # OpenLDAP --enable-sql
2129         # Check whether --enable-sql or --disable-sql was given.
2130 if test "${enable_sql+set}" = set; then
2131   enableval="$enable_sql"
2132   
2133         ol_arg=invalid
2134         for ol_val in auto yes no ; do
2135                 if test "$enableval" = "$ol_val" ; then
2136                         ol_arg="$ol_val"
2137                 fi
2138         done
2139         if test "$ol_arg" = "invalid" ; then
2140                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2141         fi
2142         ol_enable_sql="$ol_arg"
2143
2144 else
2145         ol_enable_sql="no"
2146 fi
2147 # end --enable-sql
2148 # OpenLDAP --with-sql_module
2149         # Check whether --with-sql_module or --without-sql_module was given.
2150 if test "${with_sql_module+set}" = set; then
2151   withval="$with_sql_module"
2152   
2153         ol_arg=invalid
2154         for ol_val in static dynamic ; do
2155                 if test "$withval" = "$ol_val" ; then
2156                         ol_arg="$ol_val"
2157                 fi
2158         done
2159         if test "$ol_arg" = "invalid" ; then
2160                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2161         fi
2162         ol_with_sql_module="$ol_arg"
2163
2164 else
2165         ol_with_sql_module="static"
2166 fi
2167 # end --with-sql_module
2168
2169 # OpenLDAP --enable-tcl
2170         # Check whether --enable-tcl or --disable-tcl was given.
2171 if test "${enable_tcl+set}" = set; then
2172   enableval="$enable_tcl"
2173   
2174         ol_arg=invalid
2175         for ol_val in auto yes no ; do
2176                 if test "$enableval" = "$ol_val" ; then
2177                         ol_arg="$ol_val"
2178                 fi
2179         done
2180         if test "$ol_arg" = "invalid" ; then
2181                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2182         fi
2183         ol_enable_tcl="$ol_arg"
2184
2185 else
2186         ol_enable_tcl="no"
2187 fi
2188 # end --enable-tcl
2189 # OpenLDAP --with-tcl_module
2190         # Check whether --with-tcl_module or --without-tcl_module was given.
2191 if test "${with_tcl_module+set}" = set; then
2192   withval="$with_tcl_module"
2193   
2194         ol_arg=invalid
2195         for ol_val in static dynamic ; do
2196                 if test "$withval" = "$ol_val" ; then
2197                         ol_arg="$ol_val"
2198                 fi
2199         done
2200         if test "$ol_arg" = "invalid" ; then
2201                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2202         fi
2203         ol_with_tcl_module="$ol_arg"
2204
2205 else
2206         ol_with_tcl_module="static"
2207 fi
2208 # end --with-tcl_module
2209
2210
2211 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2212 if test "${with_xxslurpdoptions+set}" = set; then
2213   withval="$with_xxslurpdoptions"
2214   :
2215 fi
2216
2217 # OpenLDAP --enable-slurpd
2218         # Check whether --enable-slurpd or --disable-slurpd was given.
2219 if test "${enable_slurpd+set}" = set; then
2220   enableval="$enable_slurpd"
2221   
2222         ol_arg=invalid
2223         for ol_val in auto yes no ; do
2224                 if test "$enableval" = "$ol_val" ; then
2225                         ol_arg="$ol_val"
2226                 fi
2227         done
2228         if test "$ol_arg" = "invalid" ; then
2229                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2230         fi
2231         ol_enable_slurpd="$ol_arg"
2232
2233 else
2234         ol_enable_slurpd="auto"
2235 fi
2236 # end --enable-slurpd
2237
2238 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2239 if test "${with_xxliboptions+set}" = set; then
2240   withval="$with_xxliboptions"
2241   :
2242 fi
2243
2244 # Check whether --enable-static or --disable-static was given.
2245 if test "${enable_static+set}" = set; then
2246   enableval="$enable_static"
2247   p=${PACKAGE-default}
2248 case "$enableval" in
2249 yes) enable_static=yes ;;
2250 no) enable_static=no ;;
2251 *)
2252   enable_static=no
2253   # Look at the argument we got.  We use all the common list separators.
2254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2255   for pkg in $enableval; do
2256     if test "X$pkg" = "X$p"; then
2257       enable_static=yes
2258     fi
2259   done
2260   IFS="$ac_save_ifs"
2261   ;;
2262 esac
2263 else
2264   enable_static=yes
2265 fi
2266
2267 # Check whether --enable-shared or --disable-shared was given.
2268 if test "${enable_shared+set}" = set; then
2269   enableval="$enable_shared"
2270   p=${PACKAGE-default}
2271 case "$enableval" in
2272 yes) enable_shared=yes ;;
2273 no) enable_shared=no ;;
2274 *)
2275   enable_shared=no
2276   # Look at the argument we got.  We use all the common list separators.
2277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2278   for pkg in $enableval; do
2279     if test "X$pkg" = "X$p"; then
2280       enable_shared=yes
2281     fi
2282   done
2283   IFS="$ac_save_ifs"
2284   ;;
2285 esac
2286 else
2287   enable_shared=yes
2288 fi
2289
2290
2291
2292 # validate options
2293 if test $ol_enable_slapd = no ; then
2294                 if test $ol_enable_bdb = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2296         fi
2297         if test $ol_enable_dnssrv = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2299         fi
2300         if test $ol_enable_ldap = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2302         fi
2303         if test $ol_enable_ldbm = yes ; then
2304                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2305         fi
2306         if test $ol_enable_passwd = yes ; then
2307                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2308         fi
2309         if test $ol_enable_perl = yes ; then
2310                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2311         fi
2312         if test $ol_enable_shell = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2314         fi
2315         if test $ol_enable_tcl = yes ; then
2316                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2317         fi
2318         if test $ol_enable_sql = yes ; then
2319                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2320         fi
2321         if test $ol_enable_modules = yes ; then
2322                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2323         fi
2324         if test $ol_enable_wrappers = yes ; then
2325                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2326         fi
2327         if test $ol_enable_phonetic = yes ; then
2328                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2329         fi
2330         if test $ol_enable_rlookups = yes ; then
2331                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2332         fi
2333         if test $ol_enable_aci = yes ; then
2334                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2335         fi
2336         if test $ol_with_ldbm_api != auto ; then
2337                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2338         fi
2339         if test $ol_with_ldbm_type != auto ; then
2340                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2341         fi
2342         if test $ol_with_bdb_module != static ; then
2343                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2344         fi
2345         if test $ol_with_dnssrv_module != static ; then
2346                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2347         fi
2348         if test $ol_with_ldap_module != static ; then
2349                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2350         fi
2351         if test $ol_with_ldbm_module != static ; then
2352                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2353         fi
2354         if test $ol_with_passwd_module != static ; then
2355                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2356         fi
2357         if test $ol_with_perl_module != static ; then
2358                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2359         fi
2360         if test $ol_with_shell_module != static ; then
2361                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2362         fi
2363         if test $ol_with_tcl_module != static ; then
2364                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2365         fi
2366         if test $ol_with_sql_module != static ; then
2367                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2368         fi
2369         if test $ol_enable_slurpd = yes ; then
2370                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2371         fi
2372
2373         # force settings to no
2374         ol_enable_bdb=no
2375         ol_enable_dnssrv=no
2376         ol_enable_ldap=no
2377         ol_enable_ldbm=no
2378         ol_enable_passwd=no
2379         ol_enable_perl=no
2380         ol_enable_shell=no
2381         ol_enable_tcl=no
2382         ol_enable_sql=no
2383
2384         ol_enable_modules=no
2385         ol_enable_phonetic=no
2386         ol_enable_rlookups=no
2387         ol_enable_aci=no
2388         ol_enable_wrappers=no
2389         ol_enable_dynamic=no
2390
2391         ol_with_ldbm_api=no
2392         ol_with_ldbm_type=no
2393
2394         ol_with_bdb_module=static
2395         ol_with_dnssrv_module=static
2396         ol_with_ldap_module=static
2397         ol_with_ldbm_module=static
2398         ol_with_passwd_module=static
2399         ol_with_perl_module=static
2400         ol_with_shell_module=static
2401         ol_with_tcl_module=static
2402         ol_with_sql_module=static
2403
2404         ol_enable_slurpd=no
2405
2406 elif test $ol_enable_ldbm = no ; then
2407         
2408         if test $ol_with_ldbm_api != auto ; then
2409                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2410         fi
2411
2412         if test $ol_with_ldbm_type != auto ; then
2413                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2414         fi
2415
2416         if test $ol_with_ldbm_module != static ; then
2417                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2418         fi
2419
2420         if test $ol_enable_modules != yes -a \
2421                 $ol_enable_bdb = no -a \
2422                 $ol_enable_dnssrv = no -a \
2423                 $ol_enable_ldap = no -a \
2424                 $ol_enable_passwd = no -a \
2425                 $ol_enable_perl = no -a \
2426                 $ol_enable_shell = no -a \
2427                 $ol_enable_sql = no -a \
2428                 $ol_enable_tcl = no ; then
2429                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2430         fi
2431
2432         ol_with_ldbm_api=no
2433         ol_with_ldbm_type=no
2434         ol_with_ldbm_module=static
2435
2436 else
2437                 if test $ol_with_ldbm_api = gdbm -a \
2438                 $ol_with_ldbm_type = btree ; then
2439                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2440         fi
2441         if test $ol_with_ldbm_api = mdbm -a \
2442                 $ol_with_ldbm_type = btree ; then
2443                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2444         fi
2445         if test $ol_with_ldbm_api = ndbm -a \
2446                 $ol_with_ldbm_type = btree ; then
2447                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2448         fi
2449 fi
2450
2451 if test $ol_enable_slurpd = yes ; then
2452                 if test $ol_with_threads = no ; then
2453                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2454         fi
2455 fi
2456
2457 if test $ol_enable_lmpasswd = yes ; then
2458         if test $ol_with_tls = no ; then
2459                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2460         fi
2461 fi
2462
2463 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2464         if test $ol_with_kerberos = no ; then
2465                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2466         fi
2467         ol_with_kerberos=yes
2468 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2469         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2470                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2471         fi
2472         ol_with_kerberos=no
2473 fi
2474
2475 if test $ol_enable_spasswd = yes ; then
2476         if test $ol_with_cyrus_sasl = no ; then
2477                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2478         fi
2479         ol_with_cyrus_sasl=yes
2480 fi
2481
2482 echo "$ac_t""done" 1>&6
2483
2484 LDAP_LIBS=
2485 LDIF_LIBS=
2486 LDBM_LIBS=
2487 LTHREAD_LIBS=
2488 LUTIL_LIBS=
2489
2490 SLAPD_LIBS=
2491 SLURPD_LIBS=
2492
2493 BUILD_SLAPD=no
2494 BUILD_SLURPD=no
2495
2496 BUILD_THREAD=no
2497
2498 BUILD_BDB=no
2499 BUILD_DNSSRV=no
2500 BUILD_LDAP=no
2501 BUILD_LDBM=no
2502 BUILD_PASSWD=no
2503 BUILD_PERL=no
2504 BUILD_SHELL=no
2505 BUILD_SQL=no
2506 BUILD_TCL=no
2507
2508 BUILD_BDB_DYNAMIC=static
2509 BUILD_DNSSRV_DYNAMIC=static
2510 BUILD_LDAP_DYNAMIC=static
2511 BUILD_LDBM_DYNAMIC=static
2512 BUILD_PASSWD_DYNAMIC=static
2513 BUILD_PERL_DYNAMIC=static
2514 BUILD_SHELL_DYNAMIC=static
2515 BUILD_TCL_DYNAMIC=static
2516 BUILD_SQL_DYNAMIC=static
2517
2518 SLAPD_MODULES_LDFLAGS=
2519 SLAPD_MODULES_CPPFLAGS=
2520 SLAPD_MODULES_LIST=
2521
2522 SLAPD_PERL_LDFLAGS=
2523 MOD_PERL_LDFLAGS=
2524 PERL_CPPFLAGS=
2525
2526 SLAPD_SQL_LDFLAGS=
2527 SLAPD_SQL_LIBS=
2528 SLAPD_SQL_INCLUDES=
2529
2530 MOD_TCL_LIB=
2531 KRB4_LIBS=
2532 KRB5_LIBS=
2533 READLINE_LIBS=
2534 SASL_LIBS=
2535 TERMCAP_LIBS=
2536 TLS_LIBS=
2537 MODULES_LIBS=
2538 AUTH_LIBS=
2539
2540 SLAPD_SLP_LIBS=
2541
2542
2543
2544 cat >> confdefs.h <<\EOF
2545 #define HAVE_MKVERSION 1
2546 EOF
2547
2548
2549
2550
2551 ol_aix_threads=no
2552 case "$target" in
2553 *-*-aix*)       if test -z "$CC" ; then
2554                 case "$ol_with_threads" in
2555                 auto | yes |  posix) ol_aix_threads=yes ;;
2556                 esac
2557         fi
2558 ;;
2559 esac
2560
2561 if test $ol_aix_threads = yes ; then
2562         if test -z "${CC}" ; then
2563                 for ac_prog in cc_r xlc_r cc
2564 do
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566 set dummy $ac_prog; ac_word=$2
2567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2568 echo "configure:2569: checking for $ac_word" >&5
2569 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2570   echo $ac_n "(cached) $ac_c" 1>&6
2571 else
2572   if test -n "$CC"; then
2573   ac_cv_prog_CC="$CC" # Let the user override the test.
2574 else
2575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2576   ac_dummy="$PATH"
2577   for ac_dir in $ac_dummy; do
2578     test -z "$ac_dir" && ac_dir=.
2579     if test -f $ac_dir/$ac_word; then
2580       ac_cv_prog_CC="$ac_prog"
2581       break
2582     fi
2583   done
2584   IFS="$ac_save_ifs"
2585 fi
2586 fi
2587 CC="$ac_cv_prog_CC"
2588 if test -n "$CC"; then
2589   echo "$ac_t""$CC" 1>&6
2590 else
2591   echo "$ac_t""no" 1>&6
2592 fi
2593
2594 test -n "$CC" && break
2595 done
2596
2597
2598                 if test "$CC" = cc ; then
2599                                                 if test $ol_with_threads != auto ; then
2600                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2601                         else
2602                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2603                         fi
2604                         ol_with_threads=no
2605                 fi
2606         fi
2607
2608         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2609                 ol_with_threads=posix
2610                 ol_cv_pthread_create=yes
2611         fi
2612 fi
2613
2614 if test -z "${CC}"; then
2615         for ac_prog in cc
2616 do
2617 # Extract the first word of "$ac_prog", so it can be a program name with args.
2618 set dummy $ac_prog; ac_word=$2
2619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2620 echo "configure:2621: checking for $ac_word" >&5
2621 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2622   echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624   if test -n "$CC"; then
2625   ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2628   ac_dummy="$PATH"
2629   for ac_dir in $ac_dummy; do
2630     test -z "$ac_dir" && ac_dir=.
2631     if test -f $ac_dir/$ac_word; then
2632       ac_cv_prog_CC="$ac_prog"
2633       break
2634     fi
2635   done
2636   IFS="$ac_save_ifs"
2637 fi
2638 fi
2639 CC="$ac_cv_prog_CC"
2640 if test -n "$CC"; then
2641   echo "$ac_t""$CC" 1>&6
2642 else
2643   echo "$ac_t""no" 1>&6
2644 fi
2645
2646 test -n "$CC" && break
2647 done
2648
2649 fi
2650
2651
2652
2653
2654 # Check whether --enable-fast-install or --disable-fast-install was given.
2655 if test "${enable_fast_install+set}" = set; then
2656   enableval="$enable_fast_install"
2657   p=${PACKAGE-default}
2658 case "$enableval" in
2659 yes) enable_fast_install=yes ;;
2660 no) enable_fast_install=no ;;
2661 *)
2662   enable_fast_install=no
2663   # Look at the argument we got.  We use all the common list separators.
2664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2665   for pkg in $enableval; do
2666     if test "X$pkg" = "X$p"; then
2667       enable_fast_install=yes
2668     fi
2669   done
2670   IFS="$ac_save_ifs"
2671   ;;
2672 esac
2673 else
2674   enable_fast_install=yes
2675 fi
2676
2677 # Extract the first word of "ranlib", so it can be a program name with args.
2678 set dummy ranlib; ac_word=$2
2679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2680 echo "configure:2681: checking for $ac_word" >&5
2681 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   if test -n "$RANLIB"; then
2685   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2686 else
2687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2688   ac_dummy="$PATH"
2689   for ac_dir in $ac_dummy; do
2690     test -z "$ac_dir" && ac_dir=.
2691     if test -f $ac_dir/$ac_word; then
2692       ac_cv_prog_RANLIB="ranlib"
2693       break
2694     fi
2695   done
2696   IFS="$ac_save_ifs"
2697   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2698 fi
2699 fi
2700 RANLIB="$ac_cv_prog_RANLIB"
2701 if test -n "$RANLIB"; then
2702   echo "$ac_t""$RANLIB" 1>&6
2703 else
2704   echo "$ac_t""no" 1>&6
2705 fi
2706
2707 # Extract the first word of "gcc", so it can be a program name with args.
2708 set dummy gcc; ac_word=$2
2709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2710 echo "configure:2711: checking for $ac_word" >&5
2711 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   if test -n "$CC"; then
2715   ac_cv_prog_CC="$CC" # Let the user override the test.
2716 else
2717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2718   ac_dummy="$PATH"
2719   for ac_dir in $ac_dummy; do
2720     test -z "$ac_dir" && ac_dir=.
2721     if test -f $ac_dir/$ac_word; then
2722       ac_cv_prog_CC="gcc"
2723       break
2724     fi
2725   done
2726   IFS="$ac_save_ifs"
2727 fi
2728 fi
2729 CC="$ac_cv_prog_CC"
2730 if test -n "$CC"; then
2731   echo "$ac_t""$CC" 1>&6
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736 if test -z "$CC"; then
2737   # Extract the first word of "cc", so it can be a program name with args.
2738 set dummy cc; ac_word=$2
2739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2740 echo "configure:2741: checking for $ac_word" >&5
2741 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   if test -n "$CC"; then
2745   ac_cv_prog_CC="$CC" # Let the user override the test.
2746 else
2747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2748   ac_prog_rejected=no
2749   ac_dummy="$PATH"
2750   for ac_dir in $ac_dummy; do
2751     test -z "$ac_dir" && ac_dir=.
2752     if test -f $ac_dir/$ac_word; then
2753       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2754         ac_prog_rejected=yes
2755         continue
2756       fi
2757       ac_cv_prog_CC="cc"
2758       break
2759     fi
2760   done
2761   IFS="$ac_save_ifs"
2762 if test $ac_prog_rejected = yes; then
2763   # We found a bogon in the path, so make sure we never use it.
2764   set dummy $ac_cv_prog_CC
2765   shift
2766   if test $# -gt 0; then
2767     # We chose a different compiler from the bogus one.
2768     # However, it has the same basename, so the bogon will be chosen
2769     # first if we set CC to just the basename; use the full file name.
2770     shift
2771     set dummy "$ac_dir/$ac_word" "$@"
2772     shift
2773     ac_cv_prog_CC="$@"
2774   fi
2775 fi
2776 fi
2777 fi
2778 CC="$ac_cv_prog_CC"
2779 if test -n "$CC"; then
2780   echo "$ac_t""$CC" 1>&6
2781 else
2782   echo "$ac_t""no" 1>&6
2783 fi
2784
2785   if test -z "$CC"; then
2786     case "`uname -s`" in
2787     *win32* | *WIN32* | *CYGWIN*)
2788       # Extract the first word of "cl", so it can be a program name with args.
2789 set dummy cl; ac_word=$2
2790 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2791 echo "configure:2792: checking for $ac_word" >&5
2792 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   if test -n "$CC"; then
2796   ac_cv_prog_CC="$CC" # Let the user override the test.
2797 else
2798   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2799   ac_dummy="$PATH"
2800   for ac_dir in $ac_dummy; do
2801     test -z "$ac_dir" && ac_dir=.
2802     if test -f $ac_dir/$ac_word; then
2803       ac_cv_prog_CC="cl"
2804       break
2805     fi
2806   done
2807   IFS="$ac_save_ifs"
2808 fi
2809 fi
2810 CC="$ac_cv_prog_CC"
2811 if test -n "$CC"; then
2812   echo "$ac_t""$CC" 1>&6
2813 else
2814   echo "$ac_t""no" 1>&6
2815 fi
2816  ;;
2817     esac
2818   fi
2819   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2820 fi
2821
2822 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2823 echo "configure:2824: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2824
2825 ac_ext=c
2826 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2827 ac_cpp='$CPP $CPPFLAGS'
2828 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2829 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2830 cross_compiling=$ac_cv_prog_cc_cross
2831
2832 cat > conftest.$ac_ext << EOF
2833
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836
2837 main(){return(0);}
2838 EOF
2839 if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2840   ac_cv_prog_cc_works=yes
2841   # If we can't run a trivial program, we are probably using a cross compiler.
2842   if (./conftest; exit) 2>/dev/null; then
2843     ac_cv_prog_cc_cross=no
2844   else
2845     ac_cv_prog_cc_cross=yes
2846   fi
2847 else
2848   echo "configure: failed program was:" >&5
2849   cat conftest.$ac_ext >&5
2850   ac_cv_prog_cc_works=no
2851 fi
2852 rm -fr conftest*
2853 ac_ext=c
2854 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2857 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2858 cross_compiling=$ac_cv_prog_cc_cross
2859
2860 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2861 if test $ac_cv_prog_cc_works = no; then
2862   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2863 fi
2864 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2865 echo "configure:2866: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2866 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2867 cross_compiling=$ac_cv_prog_cc_cross
2868
2869 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2870 echo "configure:2871: checking whether we are using GNU C" >&5
2871 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   cat > conftest.c <<EOF
2875 #ifdef __GNUC__
2876   yes;
2877 #endif
2878 EOF
2879 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2880   ac_cv_prog_gcc=yes
2881 else
2882   ac_cv_prog_gcc=no
2883 fi
2884 fi
2885
2886 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2887
2888 if test $ac_cv_prog_gcc = yes; then
2889   GCC=yes
2890 else
2891   GCC=
2892 fi
2893
2894 ac_test_CFLAGS="${CFLAGS+set}"
2895 ac_save_CFLAGS="$CFLAGS"
2896 CFLAGS=
2897 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2898 echo "configure:2899: checking whether ${CC-cc} accepts -g" >&5
2899 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   echo 'void f(){}' > conftest.c
2903 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2904   ac_cv_prog_cc_g=yes
2905 else
2906   ac_cv_prog_cc_g=no
2907 fi
2908 rm -f conftest*
2909
2910 fi
2911
2912 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2913 if test "$ac_test_CFLAGS" = set; then
2914   CFLAGS="$ac_save_CFLAGS"
2915 elif test $ac_cv_prog_cc_g = yes; then
2916   if test "$GCC" = yes; then
2917     CFLAGS="-g -O2"
2918   else
2919     CFLAGS="-g"
2920   fi
2921 else
2922   if test "$GCC" = yes; then
2923     CFLAGS="-O2"
2924   else
2925     CFLAGS=
2926   fi
2927 fi
2928
2929 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2930 if test "${with_gnu_ld+set}" = set; then
2931   withval="$with_gnu_ld"
2932   test "$withval" = no || with_gnu_ld=yes
2933 else
2934   with_gnu_ld=no
2935 fi
2936
2937 ac_prog=ld
2938 if test "$ac_cv_prog_gcc" = yes; then
2939   # Check if gcc -print-prog-name=ld gives a path.
2940   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2941 echo "configure:2942: checking for ld used by GCC" >&5
2942   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2943   case "$ac_prog" in
2944     # Accept absolute paths.
2945     [\\/]* | [A-Za-z]:[\\/]*)
2946       re_direlt='/[^/][^/]*/\.\./'
2947       # Canonicalize the path of ld
2948       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2949       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2950         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2951       done
2952       test -z "$LD" && LD="$ac_prog"
2953       ;;
2954   "")
2955     # If it fails, then pretend we aren't using GCC.
2956     ac_prog=ld
2957     ;;
2958   *)
2959     # If it is relative, then search for the first ld in PATH.
2960     with_gnu_ld=unknown
2961     ;;
2962   esac
2963 elif test "$with_gnu_ld" = yes; then
2964   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2965 echo "configure:2966: checking for GNU ld" >&5
2966 else
2967   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2968 echo "configure:2969: checking for non-GNU ld" >&5
2969 fi
2970 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   if test -z "$LD"; then
2974   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2975   for ac_dir in $PATH; do
2976     test -z "$ac_dir" && ac_dir=.
2977     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2978       ac_cv_path_LD="$ac_dir/$ac_prog"
2979       # Check to see if the program is GNU ld.  I'd rather use --version,
2980       # but apparently some GNU ld's only accept -v.
2981       # Break only if it was the GNU/non-GNU ld that we prefer.
2982       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2983         test "$with_gnu_ld" != no && break
2984       else
2985         test "$with_gnu_ld" != yes && break
2986       fi
2987     fi
2988   done
2989   IFS="$ac_save_ifs"
2990 else
2991   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2992 fi
2993 fi
2994
2995 LD="$ac_cv_path_LD"
2996 if test -n "$LD"; then
2997   echo "$ac_t""$LD" 1>&6
2998 else
2999   echo "$ac_t""no" 1>&6
3000 fi
3001 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3002 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3003 echo "configure:3004: checking if the linker ($LD) is GNU ld" >&5
3004 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3005   echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3008 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3009   ac_cv_prog_gnu_ld=yes
3010 else
3011   ac_cv_prog_gnu_ld=no
3012 fi
3013 fi
3014
3015 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3016
3017
3018 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3019 echo "configure:3020: checking for BSD-compatible nm" >&5
3020 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   if test -n "$NM"; then
3024   # Let the user override the test.
3025   ac_cv_path_NM="$NM"
3026 else
3027   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3028   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3029     test -z "$ac_dir" && ac_dir=.
3030     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3031       # Check to see if the nm accepts a BSD-compat flag.
3032       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3033       #   nm: unknown option "B" ignored
3034       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3035         ac_cv_path_NM="$ac_dir/nm -B"
3036         break
3037       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3038         ac_cv_path_NM="$ac_dir/nm -p"
3039         break
3040       else
3041         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3042         continue # so that we can try to find one that supports BSD flags
3043       fi
3044     fi
3045   done
3046   IFS="$ac_save_ifs"
3047   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3048 fi
3049 fi
3050
3051 NM="$ac_cv_path_NM"
3052 echo "$ac_t""$NM" 1>&6
3053
3054 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3055 echo "configure:3056: checking whether ln -s works" >&5
3056 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   rm -f conftestdata
3060 if ln -s X conftestdata 2>/dev/null
3061 then
3062   rm -f conftestdata
3063   ac_cv_prog_LN_S="ln -s"
3064 else
3065   ac_cv_prog_LN_S=ln
3066 fi
3067 fi
3068 LN_S="$ac_cv_prog_LN_S"
3069 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3070   echo "$ac_t""yes" 1>&6
3071 else
3072   echo "$ac_t""no" 1>&6
3073 fi
3074
3075 if test $host != $build; then
3076   ac_tool_prefix=${host_alias}-
3077 else
3078   ac_tool_prefix=
3079 fi
3080
3081
3082 case "$target" in
3083 NONE) lt_target="$host" ;;
3084 *) lt_target="$target" ;;
3085 esac
3086
3087 # Check for any special flags to pass to ltconfig.
3088 libtool_flags="--cache-file=$cache_file"
3089 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3090 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3091 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3092 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3093 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3094 libtool_flags="$libtool_flags --enable-dlopen"
3095 libtool_flags="$libtool_flags --enable-win32-dll"
3096 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3097 if test "${enable_libtool_lock+set}" = set; then
3098   enableval="$enable_libtool_lock"
3099   :
3100 fi
3101
3102 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3103 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3104
3105 # Some flags need to be propagated to the compiler or linker for good
3106 # libtool support.
3107 case "$lt_target" in
3108 *-*-irix6*)
3109   # Find out which ABI we are using.
3110   echo '#line 3111 "configure"' > conftest.$ac_ext
3111   if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3112     case "`/usr/bin/file conftest.o`" in
3113     *32-bit*)
3114       LD="${LD-ld} -32"
3115       ;;
3116     *N32*)
3117       LD="${LD-ld} -n32"
3118       ;;
3119     *64-bit*)
3120       LD="${LD-ld} -64"
3121       ;;
3122     esac
3123   fi
3124   rm -rf conftest*
3125   ;;
3126
3127 *-*-sco3.2v5*)
3128   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3129   SAVE_CFLAGS="$CFLAGS"
3130   CFLAGS="$CFLAGS -belf"
3131   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3132 echo "configure:3133: checking whether the C compiler needs -belf" >&5
3133 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3145   rm -rf conftest*
3146   lt_cv_cc_needs_belf=yes
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   lt_cv_cc_needs_belf=no
3152 fi
3153 rm -f conftest*
3154 fi
3155
3156 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3157   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3158     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3159     CFLAGS="$SAVE_CFLAGS"
3160   fi
3161   ;;
3162
3163 *-*-cygwin* | *-*-mingw*)
3164   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3165 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3167 echo "configure:3168: checking for $ac_word" >&5
3168 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   if test -n "$DLLTOOL"; then
3172   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3173 else
3174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3175   ac_dummy="$PATH"
3176   for ac_dir in $ac_dummy; do
3177     test -z "$ac_dir" && ac_dir=.
3178     if test -f $ac_dir/$ac_word; then
3179       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3180       break
3181     fi
3182   done
3183   IFS="$ac_save_ifs"
3184 fi
3185 fi
3186 DLLTOOL="$ac_cv_prog_DLLTOOL"
3187 if test -n "$DLLTOOL"; then
3188   echo "$ac_t""$DLLTOOL" 1>&6
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192
3193
3194 if test -z "$ac_cv_prog_DLLTOOL"; then
3195 if test -n "$ac_tool_prefix"; then
3196   # Extract the first word of "dlltool", so it can be a program name with args.
3197 set dummy dlltool; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   if test -n "$DLLTOOL"; then
3204   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3205 else
3206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3207   ac_dummy="$PATH"
3208   for ac_dir in $ac_dummy; do
3209     test -z "$ac_dir" && ac_dir=.
3210     if test -f $ac_dir/$ac_word; then
3211       ac_cv_prog_DLLTOOL="dlltool"
3212       break
3213     fi
3214   done
3215   IFS="$ac_save_ifs"
3216   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3217 fi
3218 fi
3219 DLLTOOL="$ac_cv_prog_DLLTOOL"
3220 if test -n "$DLLTOOL"; then
3221   echo "$ac_t""$DLLTOOL" 1>&6
3222 else
3223   echo "$ac_t""no" 1>&6
3224 fi
3225
3226 else
3227   DLLTOOL="false"
3228 fi
3229 fi
3230
3231   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3232 set dummy ${ac_tool_prefix}as; ac_word=$2
3233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_word" >&5
3235 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3236   echo $ac_n "(cached) $ac_c" 1>&6
3237 else
3238   if test -n "$AS"; then
3239   ac_cv_prog_AS="$AS" # Let the user override the test.
3240 else
3241   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3242   ac_dummy="$PATH"
3243   for ac_dir in $ac_dummy; do
3244     test -z "$ac_dir" && ac_dir=.
3245     if test -f $ac_dir/$ac_word; then
3246       ac_cv_prog_AS="${ac_tool_prefix}as"
3247       break
3248     fi
3249   done
3250   IFS="$ac_save_ifs"
3251 fi
3252 fi
3253 AS="$ac_cv_prog_AS"
3254 if test -n "$AS"; then
3255   echo "$ac_t""$AS" 1>&6
3256 else
3257   echo "$ac_t""no" 1>&6
3258 fi
3259
3260
3261 if test -z "$ac_cv_prog_AS"; then
3262 if test -n "$ac_tool_prefix"; then
3263   # Extract the first word of "as", so it can be a program name with args.
3264 set dummy as; ac_word=$2
3265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3266 echo "configure:3267: checking for $ac_word" >&5
3267 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   if test -n "$AS"; then
3271   ac_cv_prog_AS="$AS" # Let the user override the test.
3272 else
3273   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3274   ac_dummy="$PATH"
3275   for ac_dir in $ac_dummy; do
3276     test -z "$ac_dir" && ac_dir=.
3277     if test -f $ac_dir/$ac_word; then
3278       ac_cv_prog_AS="as"
3279       break
3280     fi
3281   done
3282   IFS="$ac_save_ifs"
3283   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3284 fi
3285 fi
3286 AS="$ac_cv_prog_AS"
3287 if test -n "$AS"; then
3288   echo "$ac_t""$AS" 1>&6
3289 else
3290   echo "$ac_t""no" 1>&6
3291 fi
3292
3293 else
3294   AS="false"
3295 fi
3296 fi
3297
3298   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3299 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_word" >&5
3302 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   if test -n "$OBJDUMP"; then
3306   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3307 else
3308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3309   ac_dummy="$PATH"
3310   for ac_dir in $ac_dummy; do
3311     test -z "$ac_dir" && ac_dir=.
3312     if test -f $ac_dir/$ac_word; then
3313       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3314       break
3315     fi
3316   done
3317   IFS="$ac_save_ifs"
3318 fi
3319 fi
3320 OBJDUMP="$ac_cv_prog_OBJDUMP"
3321 if test -n "$OBJDUMP"; then
3322   echo "$ac_t""$OBJDUMP" 1>&6
3323 else
3324   echo "$ac_t""no" 1>&6
3325 fi
3326
3327
3328 if test -z "$ac_cv_prog_OBJDUMP"; then
3329 if test -n "$ac_tool_prefix"; then
3330   # Extract the first word of "objdump", so it can be a program name with args.
3331 set dummy objdump; ac_word=$2
3332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3333 echo "configure:3334: checking for $ac_word" >&5
3334 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   if test -n "$OBJDUMP"; then
3338   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3339 else
3340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3341   ac_dummy="$PATH"
3342   for ac_dir in $ac_dummy; do
3343     test -z "$ac_dir" && ac_dir=.
3344     if test -f $ac_dir/$ac_word; then
3345       ac_cv_prog_OBJDUMP="objdump"
3346       break
3347     fi
3348   done
3349   IFS="$ac_save_ifs"
3350   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3351 fi
3352 fi
3353 OBJDUMP="$ac_cv_prog_OBJDUMP"
3354 if test -n "$OBJDUMP"; then
3355   echo "$ac_t""$OBJDUMP" 1>&6
3356 else
3357   echo "$ac_t""no" 1>&6
3358 fi
3359
3360 else
3361   OBJDUMP="false"
3362 fi
3363 fi
3364
3365   ;;
3366
3367 esac
3368
3369
3370 # Save cache, so that ltconfig can load it
3371
3372
3373 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3374 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3375 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3376 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3377 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3378 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3379 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3380 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3381
3382 # Reload cache, that may have been modified by ltconfig
3383
3384
3385 # This can be used to rebuild libtool when needed
3386 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3387
3388 # Always use our own libtool.
3389 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3390
3391 # Redirect the config.log output again, so that the ltconfig log is not
3392 # clobbered by the next message.
3393 exec 5>>./config.log
3394
3395
3396 for ac_prog in mawk gawk nawk awk
3397 do
3398 # Extract the first word of "$ac_prog", so it can be a program name with args.
3399 set dummy $ac_prog; ac_word=$2
3400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3401 echo "configure:3402: checking for $ac_word" >&5
3402 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   if test -n "$AWK"; then
3406   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3407 else
3408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3409   ac_dummy="$PATH"
3410   for ac_dir in $ac_dummy; do
3411     test -z "$ac_dir" && ac_dir=.
3412     if test -f $ac_dir/$ac_word; then
3413       ac_cv_prog_AWK="$ac_prog"
3414       break
3415     fi
3416   done
3417   IFS="$ac_save_ifs"
3418 fi
3419 fi
3420 AWK="$ac_cv_prog_AWK"
3421 if test -n "$AWK"; then
3422   echo "$ac_t""$AWK" 1>&6
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427 test -n "$AWK" && break
3428 done
3429
3430 # test for ln hardlink support
3431 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3432 echo "configure:3433: checking whether ln works" >&5
3433 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   rm -f conftest.src conftest.dst
3437 echo "conftest" > conftest.src
3438 if ln conftest.src conftest.dst 2>/dev/null
3439 then
3440   ol_cv_prog_LN_H="ln"
3441 else
3442   ol_cv_prog_LN_H="cp"
3443 fi
3444 rm -f conftest.src conftest.dst
3445
3446 fi
3447 LN_H="$ol_cv_prog_LN_H"
3448 if test "$ol_cv_prog_LN_H" = "ln"; then
3449         echo "$ac_t""yes" 1>&6
3450 else
3451         echo "$ac_t""no" 1>&6
3452 fi
3453
3454 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3455 echo "configure:3456: checking whether ln -s works" >&5
3456 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3457   echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459   rm -f conftestdata
3460 if ln -s X conftestdata 2>/dev/null
3461 then
3462   rm -f conftestdata
3463   ac_cv_prog_LN_S="ln -s"
3464 else
3465   ac_cv_prog_LN_S=ln
3466 fi
3467 fi
3468 LN_S="$ac_cv_prog_LN_S"
3469 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3470   echo "$ac_t""yes" 1>&6
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474
3475
3476 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3477         LN_S="$LN_H"
3478 fi
3479
3480 # Extract the first word of "sendmail", so it can be a program name with args.
3481 set dummy sendmail; ac_word=$2
3482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_word" >&5
3484 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   case "$SENDMAIL" in
3488   /*)
3489   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3490   ;;
3491   ?:/*)
3492   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3493   ;;
3494   *)
3495   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3496   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3497   for ac_dir in $ac_dummy; do 
3498     test -z "$ac_dir" && ac_dir=.
3499     if test -f $ac_dir/$ac_word; then
3500       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3501       break
3502     fi
3503   done
3504   IFS="$ac_save_ifs"
3505   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3506   ;;
3507 esac
3508 fi
3509 SENDMAIL="$ac_cv_path_SENDMAIL"
3510 if test -n "$SENDMAIL"; then
3511   echo "$ac_t""$SENDMAIL" 1>&6
3512 else
3513   echo "$ac_t""no" 1>&6
3514 fi
3515
3516 # Extract the first word of "vi", so it can be a program name with args.
3517 set dummy vi; ac_word=$2
3518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3519 echo "configure:3520: checking for $ac_word" >&5
3520 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3521   echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523   case "$EDITOR" in
3524   /*)
3525   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3526   ;;
3527   ?:/*)
3528   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3529   ;;
3530   *)
3531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3532   ac_dummy="$PATH:/usr/ucb"
3533   for ac_dir in $ac_dummy; do 
3534     test -z "$ac_dir" && ac_dir=.
3535     if test -f $ac_dir/$ac_word; then
3536       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3537       break
3538     fi
3539   done
3540   IFS="$ac_save_ifs"
3541   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3542   ;;
3543 esac
3544 fi
3545 EDITOR="$ac_cv_path_EDITOR"
3546 if test -n "$EDITOR"; then
3547   echo "$ac_t""$EDITOR" 1>&6
3548 else
3549   echo "$ac_t""no" 1>&6
3550 fi
3551
3552 # Extract the first word of "finger", so it can be a program name with args.
3553 set dummy finger; ac_word=$2
3554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3555 echo "configure:3556: checking for $ac_word" >&5
3556 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3557   echo $ac_n "(cached) $ac_c" 1>&6
3558 else
3559   case "$FINGER" in
3560   /*)
3561   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3562   ;;
3563   ?:/*)
3564   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3565   ;;
3566   *)
3567   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3568   ac_dummy="$PATH:/usr/ucb"
3569   for ac_dir in $ac_dummy; do 
3570     test -z "$ac_dir" && ac_dir=.
3571     if test -f $ac_dir/$ac_word; then
3572       ac_cv_path_FINGER="$ac_dir/$ac_word"
3573       break
3574     fi
3575   done
3576   IFS="$ac_save_ifs"
3577   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3578   ;;
3579 esac
3580 fi
3581 FINGER="$ac_cv_path_FINGER"
3582 if test -n "$FINGER"; then
3583   echo "$ac_t""$FINGER" 1>&6
3584 else
3585   echo "$ac_t""no" 1>&6
3586 fi
3587
3588
3589 ol_link_perl=no
3590 if test $ol_enable_perl != no ; then
3591         # Extract the first word of "perl", so it can be a program name with args.
3592 set dummy perl; ac_word=$2
3593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3594 echo "configure:3595: checking for $ac_word" >&5
3595 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   case "$PERLBIN" in
3599   /*)
3600   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3601   ;;
3602   ?:/*)
3603   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3604   ;;
3605   *)
3606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3607   ac_dummy="$PATH"
3608   for ac_dir in $ac_dummy; do 
3609     test -z "$ac_dir" && ac_dir=.
3610     if test -f $ac_dir/$ac_word; then
3611       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3612       break
3613     fi
3614   done
3615   IFS="$ac_save_ifs"
3616   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3617   ;;
3618 esac
3619 fi
3620 PERLBIN="$ac_cv_path_PERLBIN"
3621 if test -n "$PERLBIN"; then
3622   echo "$ac_t""$PERLBIN" 1>&6
3623 else
3624   echo "$ac_t""no" 1>&6
3625 fi
3626
3627
3628         if test "no$PERLBIN" = "no" ; then
3629                 if test $ol_enable_perl = yes ; then
3630                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3631                 fi
3632
3633         else
3634                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3635                 if test x"$ol_with_perl_module" = "xstatic" ; then
3636                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3637                 else
3638                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3639                 fi
3640                                 ol_link_perl=yes
3641         fi
3642 fi
3643
3644 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3645 echo "configure:3646: checking how to run the C preprocessor" >&5
3646 # On Suns, sometimes $CPP names a directory.
3647 if test -n "$CPP" && test -d "$CPP"; then
3648   CPP=
3649 fi
3650 if test -z "$CPP"; then
3651 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3652   echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654     # This must be in double quotes, not single quotes, because CPP may get
3655   # substituted into the Makefile and "${CC-cc}" will confuse make.
3656   CPP="${CC-cc} -E"
3657   # On the NeXT, cc -E runs the code through the compiler's parser,
3658   # not just through cpp.
3659   cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <assert.h>
3663 Syntax Error
3664 EOF
3665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3666 { (eval echo configure:3667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3668 if test -z "$ac_err"; then
3669   :
3670 else
3671   echo "$ac_err" >&5
3672   echo "configure: failed program was:" >&5
3673   cat conftest.$ac_ext >&5
3674   rm -rf conftest*
3675   CPP="${CC-cc} -E -traditional-cpp"
3676   cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <assert.h>
3680 Syntax Error
3681 EOF
3682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3683 { (eval echo configure:3684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3685 if test -z "$ac_err"; then
3686   :
3687 else
3688   echo "$ac_err" >&5
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   CPP="${CC-cc} -nologo -E"
3693   cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <assert.h>
3697 Syntax Error
3698 EOF
3699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3700 { (eval echo configure:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3702 if test -z "$ac_err"; then
3703   :
3704 else
3705   echo "$ac_err" >&5
3706   echo "configure: failed program was:" >&5
3707   cat conftest.$ac_ext >&5
3708   rm -rf conftest*
3709   CPP=/lib/cpp
3710 fi
3711 rm -f conftest*
3712 fi
3713 rm -f conftest*
3714 fi
3715 rm -f conftest*
3716   ac_cv_prog_CPP="$CPP"
3717 fi
3718   CPP="$ac_cv_prog_CPP"
3719 else
3720   ac_cv_prog_CPP="$CPP"
3721 fi
3722 echo "$ac_t""$CPP" 1>&6
3723
3724
3725 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3726         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3727
3728 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3729         echo "configure: warning: programs compiled here do run here..." 1>&2
3730         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3731
3732 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3733         echo "configure: warning: programs compiled here do not run here..." 1>&2
3734         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3735 fi
3736
3737 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3738 echo "configure:3739: checking for AIX" >&5
3739 cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 #ifdef _AIX
3743   yes
3744 #endif
3745
3746 EOF
3747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748   egrep "yes" >/dev/null 2>&1; then
3749   rm -rf conftest*
3750   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3751 #define _ALL_SOURCE 1
3752 EOF
3753
3754 else
3755   rm -rf conftest*
3756   echo "$ac_t""no" 1>&6
3757 fi
3758 rm -f conftest*
3759
3760
3761 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3762 echo "configure:3763: checking for POSIXized ISC" >&5
3763 if test -d /etc/conf/kconfig.d &&
3764   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3765 then
3766   echo "$ac_t""yes" 1>&6
3767   ISC=yes # If later tests want to check for ISC.
3768   cat >> confdefs.h <<\EOF
3769 #define _POSIX_SOURCE 1
3770 EOF
3771
3772   if test "$GCC" = yes; then
3773     CC="$CC -posix"
3774   else
3775     CC="$CC -Xp"
3776   fi
3777 else
3778   echo "$ac_t""no" 1>&6
3779   ISC=
3780 fi
3781
3782 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3783 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3784 echo "configure:3785: checking for minix/config.h" >&5
3785 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3786   echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788   cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791 #include <minix/config.h>
3792 EOF
3793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3794 { (eval echo configure:3795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3796 if test -z "$ac_err"; then
3797   rm -rf conftest*
3798   eval "ac_cv_header_$ac_safe=yes"
3799 else
3800   echo "$ac_err" >&5
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   eval "ac_cv_header_$ac_safe=no"
3805 fi
3806 rm -f conftest*
3807 fi
3808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3809   echo "$ac_t""yes" 1>&6
3810   MINIX=yes
3811 else
3812   echo "$ac_t""no" 1>&6
3813 MINIX=
3814 fi
3815
3816 if test "$MINIX" = yes; then
3817   cat >> confdefs.h <<\EOF
3818 #define _POSIX_SOURCE 1
3819 EOF
3820
3821   cat >> confdefs.h <<\EOF
3822 #define _POSIX_1_SOURCE 2
3823 EOF
3824
3825   cat >> confdefs.h <<\EOF
3826 #define _MINIX 1
3827 EOF
3828
3829 fi
3830
3831
3832 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3833 echo "configure:3834: checking for Cygwin environment" >&5
3834 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3835   echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837   cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840
3841 int main() {
3842
3843 #ifndef __CYGWIN__
3844 #define __CYGWIN__ __CYGWIN32__
3845 #endif
3846 return __CYGWIN__;
3847 ; return 0; }
3848 EOF
3849 if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3850   rm -rf conftest*
3851   ac_cv_cygwin=yes
3852 else
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -rf conftest*
3856   ac_cv_cygwin=no
3857 fi
3858 rm -f conftest*
3859 fi
3860
3861 echo "$ac_t""$ac_cv_cygwin" 1>&6
3862 CYGWIN=
3863 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3864 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3865 echo "configure:3866: checking for mingw32 environment" >&5
3866 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872
3873 int main() {
3874 return __MINGW32__;
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_mingw32=yes
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_mingw32=no
3885 fi
3886 rm -f conftest*
3887 fi
3888
3889 echo "$ac_t""$ac_cv_mingw32" 1>&6
3890 MINGW32=
3891 test "$ac_cv_mingw32" = yes && MINGW32=yes
3892 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3893 echo "configure:3894: checking for EMX OS/2 environment" >&5
3894 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3895   echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897   cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900
3901 int main() {
3902 return __EMX__;
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3906   rm -rf conftest*
3907   ac_cv_emxos2=yes
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   ac_cv_emxos2=no
3913 fi
3914 rm -f conftest*
3915 fi
3916
3917 echo "$ac_t""$ac_cv_emxos2" 1>&6
3918 EMXOS2=
3919 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3920
3921
3922
3923 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3924 echo "configure:3925: checking for executable suffix" >&5
3925 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3926   echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3929   ac_cv_exeext=.exe
3930 else
3931   rm -f conftest*
3932   echo 'int main () { return 0; }' > conftest.$ac_ext
3933   ac_cv_exeext=
3934   if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3935     for file in conftest.*; do
3936       case $file in
3937       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3938       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3939       esac
3940     done
3941   else
3942     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3943   fi
3944   rm -f conftest*
3945   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3946 fi
3947 fi
3948
3949 EXEEXT=""
3950 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3951 echo "$ac_t""${ac_cv_exeext}" 1>&6
3952 ac_exeext=$EXEEXT
3953
3954 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3955 echo "configure:3956: checking for object suffix" >&5
3956 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3957   echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959   rm -f conftest*
3960 echo 'int i = 1;' > conftest.$ac_ext
3961 if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3962   for ac_file in conftest.*; do
3963     case $ac_file in
3964     *.c) ;;
3965     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3966     esac
3967   done
3968 else
3969   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3970 fi
3971 rm -f conftest*
3972 fi
3973
3974 echo "$ac_t""$ac_cv_objext" 1>&6
3975 OBJEXT=$ac_cv_objext
3976 ac_objext=$ac_cv_objext
3977
3978
3979 cat >> confdefs.h <<EOF
3980 #define EXEEXT "${EXEEXT}"
3981 EOF
3982
3983
3984 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3985 echo "configure:3986: checking for be_app in -lbe" >&5
3986 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3988   echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990   ac_save_LIBS="$LIBS"
3991 LIBS="-lbe -lroot -lnet $LIBS"
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 /* Override any gcc2 internal prototype to avoid an error.  */
3996 /* We use char because int might match the return type of a gcc2
3997     builtin and then its argument prototype would still apply.  */
3998 char be_app();
3999
4000 int main() {
4001 be_app()
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4005   rm -rf conftest*
4006   eval "ac_cv_lib_$ac_lib_var=yes"
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   eval "ac_cv_lib_$ac_lib_var=no"
4012 fi
4013 rm -f conftest*
4014 LIBS="$ac_save_LIBS"
4015
4016 fi
4017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4018   echo "$ac_t""yes" 1>&6
4019   LIBS="$LIBS -lbe -lroot -lnet"
4020 else
4021   echo "$ac_t""no" 1>&6
4022 :
4023 fi
4024
4025
4026
4027
4028
4029 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4030 echo "configure:4031: checking for ${CC-cc} option to accept ANSI C" >&5
4031 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4032   echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034   am_cv_prog_cc_stdc=no
4035 ac_save_CC="$CC"
4036 # Don't try gcc -ansi; that turns off useful extensions and
4037 # breaks some systems' header files.
4038 # AIX                   -qlanglvl=ansi
4039 # Ultrix and OSF/1      -std1
4040 # HP-UX 10.20 and later -Ae
4041 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4042 # SVR4                  -Xc -D__EXTENSIONS__
4043 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4044 do
4045   CC="$ac_save_CC $ac_arg"
4046   cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <stdarg.h>
4050 #include <stdio.h>
4051 #include <sys/types.h>
4052 #include <sys/stat.h>
4053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4054 struct buf { int x; };
4055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4056 static char *e (p, i)
4057      char **p;
4058      int i;
4059 {
4060   return p[i];
4061 }
4062 static char *f (char * (*g) (char **, int), char **p, ...)
4063 {
4064   char *s;
4065   va_list v;
4066   va_start (v,p);
4067   s = g (p, va_arg (v,int));
4068   va_end (v);
4069   return s;
4070 }
4071 int test (int i, double x);
4072 struct s1 {int (*f) (int a);};
4073 struct s2 {int (*f) (double a);};
4074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4075 int argc;
4076 char **argv;
4077
4078 int main() {
4079
4080 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4081
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4085   rm -rf conftest*
4086   am_cv_prog_cc_stdc="$ac_arg"; break
4087 else
4088   echo "configure: failed program was:" >&5
4089   cat conftest.$ac_ext >&5
4090 fi
4091 rm -f conftest*
4092 done
4093 CC="$ac_save_CC"
4094
4095 fi
4096
4097 if test -z "$am_cv_prog_cc_stdc"; then
4098   echo "$ac_t""none needed" 1>&6
4099 else
4100   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4101 fi
4102 case "x$am_cv_prog_cc_stdc" in
4103   x|xno) ;;
4104   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4105 esac
4106
4107 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4108         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4109 fi
4110
4111 # test for make depend flag
4112 OL_MKDEP=
4113 OL_MKDEP_FLAGS=
4114 if test -z "${MKDEP}"; then
4115         OL_MKDEP="${CC-cc}"
4116         if test -z "${MKDEP_FLAGS}"; then
4117                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4118 echo "configure:4119: checking for ${OL_MKDEP} depend flag" >&5
4119 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4120   echo $ac_n "(cached) $ac_c" 1>&6
4121 else
4122   
4123                         ol_cv_mkdep=no
4124                         for flag in "-M" "-xM"; do
4125                                 cat > conftest.c <<EOF
4126  noCode;
4127 EOF
4128                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4129                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4130                                 then
4131                                         if test ! -f conftest."${ac_object}" ; then
4132                                                 ol_cv_mkdep=$flag
4133                                                 OL_MKDEP_FLAGS="$flag"
4134                                                 break
4135                                         fi
4136                                 fi
4137                         done
4138                         rm -f conftest*
4139                 
4140 fi
4141
4142 echo "$ac_t""$ol_cv_mkdep" 1>&6
4143         else
4144                 cc_cv_mkdep=yes
4145                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4146         fi
4147 else
4148         cc_cv_mkdep=yes
4149         OL_MKDEP="${MKDEP}"
4150         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4151 fi
4152
4153
4154
4155 if test "${ol_cv_mkdep}" = no ; then
4156         # this will soon become an error
4157         echo "configure: warning: do not know how to generate dependencies" 1>&2
4158 fi
4159
4160 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4161 echo "configure:4162: checking for afopen in -ls" >&5
4162 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4164   echo $ac_n "(cached) $ac_c" 1>&6
4165 else
4166   ac_save_LIBS="$LIBS"
4167 LIBS="-ls  $LIBS"
4168 cat > conftest.$ac_ext <<EOF
4169 #line 4170 "configure"
4170 #include "confdefs.h"
4171 /* Override any gcc2 internal prototype to avoid an error.  */
4172 /* We use char because int might match the return type of a gcc2
4173     builtin and then its argument prototype would still apply.  */
4174 char afopen();
4175
4176 int main() {
4177 afopen()
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4181   rm -rf conftest*
4182   eval "ac_cv_lib_$ac_lib_var=yes"
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186   rm -rf conftest*
4187   eval "ac_cv_lib_$ac_lib_var=no"
4188 fi
4189 rm -f conftest*
4190 LIBS="$ac_save_LIBS"
4191
4192 fi
4193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4194   echo "$ac_t""yes" 1>&6
4195   
4196         AUTH_LIBS=-ls
4197         cat >> confdefs.h <<\EOF
4198 #define HAVE_AIX_SECURITY 1
4199 EOF
4200
4201
4202 else
4203   echo "$ac_t""no" 1>&6
4204 fi
4205
4206
4207
4208 ol_link_modules=no
4209 if test $ol_enable_modules != no ; then
4210         for ac_hdr in ltdl.h
4211 do
4212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4214 echo "configure:4215: checking for $ac_hdr" >&5
4215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4216   echo $ac_n "(cached) $ac_c" 1>&6
4217 else
4218   cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <$ac_hdr>
4222 EOF
4223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4224 { (eval echo configure:4225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4226 if test -z "$ac_err"; then
4227   rm -rf conftest*
4228   eval "ac_cv_header_$ac_safe=yes"
4229 else
4230   echo "$ac_err" >&5
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=no"
4235 fi
4236 rm -f conftest*
4237 fi
4238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4239   echo "$ac_t""yes" 1>&6
4240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4241   cat >> confdefs.h <<EOF
4242 #define $ac_tr_hdr 1
4243 EOF
4244  
4245 else
4246   echo "$ac_t""no" 1>&6
4247 fi
4248 done
4249
4250
4251         if test $ac_cv_header_ltdl_h = no ; then
4252                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4253         fi
4254
4255         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4256 echo "configure:4257: checking for lt_dlinit in -lltdl" >&5
4257 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4259   echo $ac_n "(cached) $ac_c" 1>&6
4260 else
4261   ac_save_LIBS="$LIBS"
4262 LIBS="-lltdl  $LIBS"
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 /* We use char because int might match the return type of a gcc2
4268     builtin and then its argument prototype would still apply.  */
4269 char lt_dlinit();
4270
4271 int main() {
4272 lt_dlinit()
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=yes"
4278 else
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -rf conftest*
4282   eval "ac_cv_lib_$ac_lib_var=no"
4283 fi
4284 rm -f conftest*
4285 LIBS="$ac_save_LIBS"
4286
4287 fi
4288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4289   echo "$ac_t""yes" 1>&6
4290   
4291             MODULES_LIBS=-lltdl
4292             cat >> confdefs.h <<\EOF
4293 #define HAVE_LIBLTDL 1
4294 EOF
4295
4296         
4297 else
4298   echo "$ac_t""no" 1>&6
4299 fi
4300
4301
4302         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4303                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4304         fi
4305         ol_link_modules=yes
4306 else
4307         ol_with_bdb_module=static
4308         ol_with_dnssrv_module=static
4309         ol_with_ldap_module=static
4310         ol_with_ldbm_module=static
4311         ol_with_passwd_module=static
4312         ol_with_perl_module=static
4313         ol_with_shell_module=static
4314         ol_with_tcl_module=static
4315         ol_with_sql_module=static
4316 fi
4317
4318 # test for EBCDIC
4319 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4320 echo "configure:4321: checking for EBCDIC" >&5
4321 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   
4325         cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4328
4329 #if !('M' == 0xd4)
4330 #include <__ASCII__/generate_error.h>
4331 #endif
4332
4333 EOF
4334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4335 { (eval echo configure:4336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4337 if test -z "$ac_err"; then
4338   rm -rf conftest*
4339   ol_cv_cpp_ebcdic=yes
4340 else
4341   echo "$ac_err" >&5
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   ol_cv_cpp_ebcdic=no
4346 fi
4347 rm -f conftest*
4348 fi
4349
4350 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4351 if test $ol_cv_cpp_ebcdic = yes ; then
4352         cat >> confdefs.h <<\EOF
4353 #define HAVE_EBCDIC 1
4354 EOF
4355
4356 fi
4357
4358 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4359 echo "configure:4360: checking for ANSI C header files" >&5
4360 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <stdlib.h>
4367 #include <stdarg.h>
4368 #include <string.h>
4369 #include <float.h>
4370 EOF
4371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4372 { (eval echo configure:4373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4374 if test -z "$ac_err"; then
4375   rm -rf conftest*
4376   ol_cv_header_stdc=yes
4377 else
4378   echo "$ac_err" >&5
4379   echo "configure: failed program was:" >&5
4380   cat conftest.$ac_ext >&5
4381   rm -rf conftest*
4382   ol_cv_header_stdc=no
4383 fi
4384 rm -f conftest*
4385
4386 if test $ol_cv_header_stdc = yes; then
4387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 #include <string.h>
4392 EOF
4393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394   egrep "memchr" >/dev/null 2>&1; then
4395   :
4396 else
4397   rm -rf conftest*
4398   ol_cv_header_stdc=no
4399 fi
4400 rm -f conftest*
4401
4402 fi
4403
4404 if test $ol_cv_header_stdc = yes; then
4405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 #include <stdlib.h>
4410 EOF
4411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4412   egrep "free" >/dev/null 2>&1; then
4413   :
4414 else
4415   rm -rf conftest*
4416   ol_cv_header_stdc=no
4417 fi
4418 rm -f conftest*
4419
4420 fi
4421
4422 if test $ol_cv_header_stdc = yes; then
4423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4424 if test "$cross_compiling" = yes; then
4425   :
4426 else
4427   cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 #include <ctype.h>
4431 #ifndef HAVE_EBCDIC
4432 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4433 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4434 #else
4435 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4436                 || ('j' <= (c) && (c) <= 'r') \
4437                 || ('s' <= (c) && (c) <= 'z'))
4438 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4439 #endif
4440 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4441 int main () { int i; for (i = 0; i < 256; i++)
4442 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4443 exit (0); }
4444
4445 EOF
4446 if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4447 then
4448   :
4449 else
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452   rm -fr conftest*
4453   ol_cv_header_stdc=no
4454 fi
4455 rm -fr conftest*
4456 fi
4457
4458 fi
4459 fi
4460
4461 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4462 if test $ol_cv_header_stdc = yes; then
4463   cat >> confdefs.h <<\EOF
4464 #define STDC_HEADERS 1
4465 EOF
4466
4467 fi
4468 ac_cv_header_stdc=disable
4469
4470
4471 if test $ol_cv_header_stdc != yes; then
4472         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4473 fi
4474
4475 ac_header_dirent=no
4476 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4477 do
4478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4479 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4480 echo "configure:4481: checking for $ac_hdr that defines DIR" >&5
4481 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   cat > conftest.$ac_ext <<EOF
4485 #line 4486 "configure"
4486 #include "confdefs.h"
4487 #include <sys/types.h>
4488 #include <$ac_hdr>
4489 int main() {
4490 DIR *dirp = 0;
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4494   rm -rf conftest*
4495   eval "ac_cv_header_dirent_$ac_safe=yes"
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   eval "ac_cv_header_dirent_$ac_safe=no"
4501 fi
4502 rm -f conftest*
4503 fi
4504 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4505   echo "$ac_t""yes" 1>&6
4506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4507   cat >> confdefs.h <<EOF
4508 #define $ac_tr_hdr 1
4509 EOF
4510  ac_header_dirent=$ac_hdr; break
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514 done
4515 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4516 if test $ac_header_dirent = dirent.h; then
4517 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4518 echo "configure:4519: checking for opendir in -ldir" >&5
4519 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4521   echo $ac_n "(cached) $ac_c" 1>&6
4522 else
4523   ac_save_LIBS="$LIBS"
4524 LIBS="-ldir  $LIBS"
4525 cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 /* Override any gcc2 internal prototype to avoid an error.  */
4529 /* We use char because int might match the return type of a gcc2
4530     builtin and then its argument prototype would still apply.  */
4531 char opendir();
4532
4533 int main() {
4534 opendir()
4535 ; return 0; }
4536 EOF
4537 if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4538   rm -rf conftest*
4539   eval "ac_cv_lib_$ac_lib_var=yes"
4540 else
4541   echo "configure: failed program was:" >&5
4542   cat conftest.$ac_ext >&5
4543   rm -rf conftest*
4544   eval "ac_cv_lib_$ac_lib_var=no"
4545 fi
4546 rm -f conftest*
4547 LIBS="$ac_save_LIBS"
4548
4549 fi
4550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6
4552   LIBS="$LIBS -ldir"
4553 else
4554   echo "$ac_t""no" 1>&6
4555 fi
4556
4557 else
4558 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4559 echo "configure:4560: checking for opendir in -lx" >&5
4560 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4562   echo $ac_n "(cached) $ac_c" 1>&6
4563 else
4564   ac_save_LIBS="$LIBS"
4565 LIBS="-lx  $LIBS"
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 /* Override any gcc2 internal prototype to avoid an error.  */
4570 /* We use char because int might match the return type of a gcc2
4571     builtin and then its argument prototype would still apply.  */
4572 char opendir();
4573
4574 int main() {
4575 opendir()
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   eval "ac_cv_lib_$ac_lib_var=yes"
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   eval "ac_cv_lib_$ac_lib_var=no"
4586 fi
4587 rm -f conftest*
4588 LIBS="$ac_save_LIBS"
4589
4590 fi
4591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4592   echo "$ac_t""yes" 1>&6
4593   LIBS="$LIBS -lx"
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598 fi
4599
4600 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4601 echo "configure:4602: checking for sys/wait.h that is POSIX.1 compatible" >&5
4602 if eval "test \"\${ac_cv_header_sys_wait_h+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 <sys/types.h>
4609 #include <sys/wait.h>
4610 #ifndef WEXITSTATUS
4611 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4612 #endif
4613 #ifndef WIFEXITED
4614 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4615 #endif
4616 int main() {
4617 int s;
4618 wait (&s);
4619 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4620 ; return 0; }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4623   rm -rf conftest*
4624   ac_cv_header_sys_wait_h=yes
4625 else
4626   echo "configure: failed program was:" >&5
4627   cat conftest.$ac_ext >&5
4628   rm -rf conftest*
4629   ac_cv_header_sys_wait_h=no
4630 fi
4631 rm -f conftest*
4632 fi
4633
4634 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4635 if test $ac_cv_header_sys_wait_h = yes; then
4636   cat >> confdefs.h <<\EOF
4637 #define HAVE_SYS_WAIT_H 1
4638 EOF
4639
4640 fi
4641
4642 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4643 echo "configure:4644: checking POSIX termios" >&5
4644 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <sys/types.h>
4651 #include <unistd.h>
4652 #include <termios.h>
4653 int main() {
4654 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4655    tcgetattr(0, 0);
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   am_cv_sys_posix_termios=yes
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   am_cv_sys_posix_termios=no
4666 fi
4667 rm -f conftest*
4668 fi
4669
4670 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4671
4672
4673  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4674 echo "configure:4675: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4675 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4679
4680   gwinsz_in_termios_h=no
4681   if test $am_cv_sys_posix_termios = yes; then
4682     cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <sys/types.h>
4686 #     include <termios.h>
4687 #     ifdef TIOCGWINSZ
4688         yes
4689 #     endif
4690     
4691 EOF
4692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4693   egrep "yes" >/dev/null 2>&1; then
4694   rm -rf conftest*
4695   gwinsz_in_termios_h=yes
4696 fi
4697 rm -f conftest*
4698
4699   fi
4700
4701   if test $gwinsz_in_termios_h = no; then
4702     cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <sys/types.h>
4706 #     include <sys/ioctl.h>
4707 #     ifdef TIOCGWINSZ
4708         yes
4709 #     endif
4710     
4711 EOF
4712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4713   egrep "yes" >/dev/null 2>&1; then
4714   rm -rf conftest*
4715   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4716 fi
4717 rm -f conftest*
4718
4719   fi
4720   
4721 fi
4722
4723 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4724   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4725     cat >> confdefs.h <<\EOF
4726 #define GWINSZ_IN_SYS_IOCTL 1
4727 EOF
4728
4729   fi
4730
4731 if test $am_cv_sys_posix_termios = yes ; then
4732         cat >> confdefs.h <<\EOF
4733 #define HAVE_POSIX_TERMIOS 1
4734 EOF
4735
4736 fi
4737
4738 for ac_hdr in \
4739         arpa/inet.h             \
4740         arpa/nameser.h  \
4741         assert.h                \
4742         conio.h                 \
4743         crypt.h                 \
4744         direct.h                \
4745         errno.h                 \
4746         fcntl.h                 \
4747         filio.h                 \
4748         getopt.h                \
4749         grp.h                   \
4750         io.h                    \
4751         libutil.h               \
4752         limits.h                \
4753         locale.h                \
4754         netinet/tcp.h   \
4755         malloc.h                \
4756         memory.h                \
4757         psap.h                  \
4758         pwd.h                   \
4759         process.h               \
4760         resolv.h                \
4761         sgtty.h                 \
4762         shadow.h                \
4763         stddef.h                \
4764         string.h                \
4765         strings.h               \
4766         sysexits.h              \
4767         sys/file.h              \
4768         sys/filio.h             \
4769         sys/errno.h             \
4770         sys/ioctl.h             \
4771         sys/param.h             \
4772         sys/resource.h  \
4773         sys/select.h    \
4774         sys/socket.h    \
4775         sys/syslog.h    \
4776         sys/time.h              \
4777         sys/types.h             \
4778         syslog.h                \
4779         termios.h               \
4780         unistd.h                \
4781         winsock.h               \
4782
4783 do
4784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4786 echo "configure:4787: checking for $ac_hdr" >&5
4787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793 #include <$ac_hdr>
4794 EOF
4795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4796 { (eval echo configure:4797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4798 if test -z "$ac_err"; then
4799   rm -rf conftest*
4800   eval "ac_cv_header_$ac_safe=yes"
4801 else
4802   echo "$ac_err" >&5
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   eval "ac_cv_header_$ac_safe=no"
4807 fi
4808 rm -f conftest*
4809 fi
4810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4811   echo "$ac_t""yes" 1>&6
4812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4813   cat >> confdefs.h <<EOF
4814 #define $ac_tr_hdr 1
4815 EOF
4816  
4817 else
4818   echo "$ac_t""no" 1>&6
4819 fi
4820 done
4821
4822
4823
4824
4825 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4826 echo "configure:4827: checking for sigset in -lV3" >&5
4827 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4829   echo $ac_n "(cached) $ac_c" 1>&6
4830 else
4831   ac_save_LIBS="$LIBS"
4832 LIBS="-lV3  $LIBS"
4833 cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 /* Override any gcc2 internal prototype to avoid an error.  */
4837 /* We use char because int might match the return type of a gcc2
4838     builtin and then its argument prototype would still apply.  */
4839 char sigset();
4840
4841 int main() {
4842 sigset()
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=yes"
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   eval "ac_cv_lib_$ac_lib_var=no"
4853 fi
4854 rm -f conftest*
4855 LIBS="$ac_save_LIBS"
4856
4857 fi
4858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4859   echo "$ac_t""yes" 1>&6
4860     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4861     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4862   cat >> confdefs.h <<EOF
4863 #define $ac_tr_lib 1
4864 EOF
4865
4866   LIBS="-lV3 $LIBS"
4867
4868 else
4869   echo "$ac_t""no" 1>&6
4870 fi
4871
4872
4873 if test $ac_cv_header_winsock_h = yes; then
4874         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4875 echo "configure:4876: checking for winsock" >&5
4876 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 #include <winsock.h>
4883 int main() {
4884
4885                         socket(0,0,0);
4886                         select(0,NULL,NULL,NULL,NULL);
4887                         closesocket(0);
4888                         gethostname(NULL,0);
4889         
4890 ; return 0; }
4891 EOF
4892 if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4893   rm -rf conftest*
4894   ol_cv_winsock=yes
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898   rm -rf conftest*
4899   ol_cv_winsock=no
4900 fi
4901 rm -f conftest*]
4902 fi
4903
4904 echo "$ac_t""$ol_cv_winsock" 1>&6
4905
4906         if test $ol_cv_winsock = yes ; then
4907                 cat >> confdefs.h <<\EOF
4908 #define HAVE_WINSOCK 1
4909 EOF
4910
4911                 ac_cv_func_socket=yes
4912                 ac_cv_func_select=yes
4913                 ac_cv_func_closesocket=yes
4914                 ac_cv_func_gethostname=yes
4915         fi
4916 fi
4917
4918
4919 echo $ac_n "checking for socket""... $ac_c" 1>&6
4920 echo "configure:4921: checking for socket" >&5
4921 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4922   echo $ac_n "(cached) $ac_c" 1>&6
4923 else
4924   cat > conftest.$ac_ext <<EOF
4925 #line 4926 "configure"
4926 #include "confdefs.h"
4927 /* System header to define __stub macros and hopefully few prototypes,
4928     which can conflict with char socket(); below.  */
4929 #include <assert.h>
4930 /* Override any gcc2 internal prototype to avoid an error.  */
4931 /* We use char because int might match the return type of a gcc2
4932     builtin and then its argument prototype would still apply.  */
4933 char socket();
4934 char (*f)();
4935
4936 int main() {
4937
4938 /* The GNU C library defines this for functions which it implements
4939     to always fail with ENOSYS.  Some functions are actually named
4940     something starting with __ and the normal name is an alias.  */
4941 #if defined (__stub_socket) || defined (__stub___socket)
4942 choke me
4943 #else
4944 f = socket;
4945 #endif
4946
4947 ; return 0; }
4948 EOF
4949 if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4950   rm -rf conftest*
4951   eval "ac_cv_func_socket=yes"
4952 else
4953   echo "configure: failed program was:" >&5
4954   cat conftest.$ac_ext >&5
4955   rm -rf conftest*
4956   eval "ac_cv_func_socket=no"
4957 fi
4958 rm -f conftest*
4959 fi
4960
4961 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4962   echo "$ac_t""yes" 1>&6
4963   :
4964 else
4965   echo "$ac_t""no" 1>&6
4966         
4967         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4968 echo "configure:4969: checking for main in -lsocket" >&5
4969 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4970 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4971   echo $ac_n "(cached) $ac_c" 1>&6
4972 else
4973   ac_save_LIBS="$LIBS"
4974 LIBS="-lsocket  $LIBS"
4975 cat > conftest.$ac_ext <<EOF
4976 #line 4977 "configure"
4977 #include "confdefs.h"
4978
4979 int main() {
4980 main()
4981 ; return 0; }
4982 EOF
4983 if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4984   rm -rf conftest*
4985   eval "ac_cv_lib_$ac_lib_var=yes"
4986 else
4987   echo "configure: failed program was:" >&5
4988   cat conftest.$ac_ext >&5
4989   rm -rf conftest*
4990   eval "ac_cv_lib_$ac_lib_var=no"
4991 fi
4992 rm -f conftest*
4993 LIBS="$ac_save_LIBS"
4994
4995 fi
4996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4997   echo "$ac_t""yes" 1>&6
4998     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4999     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5000   cat >> confdefs.h <<EOF
5001 #define $ac_tr_lib 1
5002 EOF
5003
5004   LIBS="-lsocket $LIBS"
5005
5006 else
5007   echo "$ac_t""no" 1>&6
5008 fi
5009
5010         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5011 echo "configure:5012: checking for main in -lnet" >&5
5012 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016   ac_save_LIBS="$LIBS"
5017 LIBS="-lnet  $LIBS"
5018 cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021
5022 int main() {
5023 main()
5024 ; return 0; }
5025 EOF
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5027   rm -rf conftest*
5028   eval "ac_cv_lib_$ac_lib_var=yes"
5029 else
5030   echo "configure: failed program was:" >&5
5031   cat conftest.$ac_ext >&5
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=no"
5034 fi
5035 rm -f conftest*
5036 LIBS="$ac_save_LIBS"
5037
5038 fi
5039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5040   echo "$ac_t""yes" 1>&6
5041     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5042     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5043   cat >> confdefs.h <<EOF
5044 #define $ac_tr_lib 1
5045 EOF
5046
5047   LIBS="-lnet $LIBS"
5048
5049 else
5050   echo "$ac_t""no" 1>&6
5051 fi
5052
5053         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5054 echo "configure:5055: checking for main in -lnsl_s" >&5
5055 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5057   echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059   ac_save_LIBS="$LIBS"
5060 LIBS="-lnsl_s  $LIBS"
5061 cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064
5065 int main() {
5066 main()
5067 ; return 0; }
5068 EOF
5069 if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=yes"
5072 else
5073   echo "configure: failed program was:" >&5
5074   cat conftest.$ac_ext >&5
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=no"
5077 fi
5078 rm -f conftest*
5079 LIBS="$ac_save_LIBS"
5080
5081 fi
5082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5085     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5086   cat >> confdefs.h <<EOF
5087 #define $ac_tr_lib 1
5088 EOF
5089
5090   LIBS="-lnsl_s $LIBS"
5091
5092 else
5093   echo "$ac_t""no" 1>&6
5094 fi
5095
5096         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5097 echo "configure:5098: checking for main in -lnsl" >&5
5098 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5100   echo $ac_n "(cached) $ac_c" 1>&6
5101 else
5102   ac_save_LIBS="$LIBS"
5103 LIBS="-lnsl  $LIBS"
5104 cat > conftest.$ac_ext <<EOF
5105 #line 5106 "configure"
5106 #include "confdefs.h"
5107
5108 int main() {
5109 main()
5110 ; return 0; }
5111 EOF
5112 if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5113   rm -rf conftest*
5114   eval "ac_cv_lib_$ac_lib_var=yes"
5115 else
5116   echo "configure: failed program was:" >&5
5117   cat conftest.$ac_ext >&5
5118   rm -rf conftest*
5119   eval "ac_cv_lib_$ac_lib_var=no"
5120 fi
5121 rm -f conftest*
5122 LIBS="$ac_save_LIBS"
5123
5124 fi
5125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5126   echo "$ac_t""yes" 1>&6
5127     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5128     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5129   cat >> confdefs.h <<EOF
5130 #define $ac_tr_lib 1
5131 EOF
5132
5133   LIBS="-lnsl $LIBS"
5134
5135 else
5136   echo "$ac_t""no" 1>&6
5137 fi
5138
5139         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5140 echo "configure:5141: checking for socket in -linet" >&5
5141 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145   ac_save_LIBS="$LIBS"
5146 LIBS="-linet  $LIBS"
5147 cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 /* We use char because int might match the return type of a gcc2
5152     builtin and then its argument prototype would still apply.  */
5153 char socket();
5154
5155 int main() {
5156 socket()
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=no"
5167 fi
5168 rm -f conftest*
5169 LIBS="$ac_save_LIBS"
5170
5171 fi
5172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5173   echo "$ac_t""yes" 1>&6
5174     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5176   cat >> confdefs.h <<EOF
5177 #define $ac_tr_lib 1
5178 EOF
5179
5180   LIBS="-linet $LIBS"
5181
5182 else
5183   echo "$ac_t""no" 1>&6
5184 fi
5185
5186         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5187 echo "configure:5188: checking for main in -lgen" >&5
5188 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5190   echo $ac_n "(cached) $ac_c" 1>&6
5191 else
5192   ac_save_LIBS="$LIBS"
5193 LIBS="-lgen  $LIBS"
5194 cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197
5198 int main() {
5199 main()
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5203   rm -rf conftest*
5204   eval "ac_cv_lib_$ac_lib_var=yes"
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208   rm -rf conftest*
5209   eval "ac_cv_lib_$ac_lib_var=no"
5210 fi
5211 rm -f conftest*
5212 LIBS="$ac_save_LIBS"
5213
5214 fi
5215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5216   echo "$ac_t""yes" 1>&6
5217     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5219   cat >> confdefs.h <<EOF
5220 #define $ac_tr_lib 1
5221 EOF
5222
5223   LIBS="-lgen $LIBS"
5224
5225 else
5226   echo "$ac_t""no" 1>&6
5227 fi
5228
5229
5230 fi
5231
5232
5233 echo $ac_n "checking for select""... $ac_c" 1>&6
5234 echo "configure:5235: checking for select" >&5
5235 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241 /* System header to define __stub macros and hopefully few prototypes,
5242     which can conflict with char select(); below.  */
5243 #include <assert.h>
5244 /* Override any gcc2 internal prototype to avoid an error.  */
5245 /* We use char because int might match the return type of a gcc2
5246     builtin and then its argument prototype would still apply.  */
5247 char select();
5248 char (*f)();
5249
5250 int main() {
5251
5252 /* The GNU C library defines this for functions which it implements
5253     to always fail with ENOSYS.  Some functions are actually named
5254     something starting with __ and the normal name is an alias.  */
5255 #if defined (__stub_select) || defined (__stub___select)
5256 choke me
5257 #else
5258 f = select;
5259 #endif
5260
5261 ; return 0; }
5262 EOF
5263 if { (eval echo configure:5264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5264   rm -rf conftest*
5265   eval "ac_cv_func_select=yes"
5266 else
5267   echo "configure: failed program was:" >&5
5268   cat conftest.$ac_ext >&5
5269   rm -rf conftest*
5270   eval "ac_cv_func_select=no"
5271 fi
5272 rm -f conftest*
5273 fi
5274
5275 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5276   echo "$ac_t""yes" 1>&6
5277   :
5278 else
5279   echo "$ac_t""no" 1>&6
5280 { echo "configure: error: select() required." 1>&2; exit 1; }
5281 fi
5282
5283
5284 if test "${ac_cv_header_winsock_h}" != yes; then
5285                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5286 echo "configure:5287: checking types of arguments for select()" >&5
5287  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5291   echo $ac_n "(cached) $ac_c" 1>&6
5292 else
5293     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5297      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5298       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5299        cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 #ifdef HAVE_SYS_TYPES_H
5303 #include <sys/types.h>
5304 #endif
5305 #ifdef HAVE_SYS_TIME_H
5306 #include <sys/time.h>
5307 #endif
5308 #ifdef HAVE_SYS_SELECT_H
5309 #include <sys/select.h>
5310 #endif
5311 #ifdef HAVE_SYS_SOCKET_H
5312 #include <sys/socket.h>
5313 #endif
5314 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);
5315 int main() {
5316
5317 ; return 0; }
5318 EOF
5319 if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5320   rm -rf conftest*
5321           ac_not_found=no ; break 3
5322 else
5323   echo "configure: failed program was:" >&5
5324   cat conftest.$ac_ext >&5
5325   rm -rf conftest*
5326   ac_not_found=yes
5327 fi
5328 rm -f conftest*
5329       done
5330      done
5331     done
5332    
5333 fi
5334   
5335 fi
5336  
5337 fi
5338  if test "$ac_not_found" = yes; then
5339   ac_cv_func_select_arg1=int 
5340   ac_cv_func_select_arg234='int *' 
5341   ac_cv_func_select_arg5='struct timeval *'
5342  fi
5343  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5344  cat >> confdefs.h <<EOF
5345 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5346 EOF
5347
5348  cat >> confdefs.h <<EOF
5349 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5350 EOF
5351
5352  cat >> confdefs.h <<EOF
5353 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5354 EOF
5355
5356
5357 fi
5358
5359
5360 for ac_hdr in regex.h 
5361 do
5362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5364 echo "configure:5365: checking for $ac_hdr" >&5
5365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5366   echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368   cat > conftest.$ac_ext <<EOF
5369 #line 5370 "configure"
5370 #include "confdefs.h"
5371 #include <$ac_hdr>
5372 EOF
5373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5374 { (eval echo configure:5375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5376 if test -z "$ac_err"; then
5377   rm -rf conftest*
5378   eval "ac_cv_header_$ac_safe=yes"
5379 else
5380   echo "$ac_err" >&5
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_header_$ac_safe=no"
5385 fi
5386 rm -f conftest*
5387 fi
5388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5389   echo "$ac_t""yes" 1>&6
5390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5391   cat >> confdefs.h <<EOF
5392 #define $ac_tr_hdr 1
5393 EOF
5394  
5395 else
5396   echo "$ac_t""no" 1>&6
5397 fi
5398 done
5399
5400 if test "$ac_cv_header_regex_h" != yes ; then
5401         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5402 fi
5403 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5404 echo "configure:5405: checking for regfree" >&5
5405 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5406   echo $ac_n "(cached) $ac_c" 1>&6
5407 else
5408   cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411 /* System header to define __stub macros and hopefully few prototypes,
5412     which can conflict with char regfree(); below.  */
5413 #include <assert.h>
5414 /* Override any gcc2 internal prototype to avoid an error.  */
5415 /* We use char because int might match the return type of a gcc2
5416     builtin and then its argument prototype would still apply.  */
5417 char regfree();
5418 char (*f)();
5419
5420 int main() {
5421
5422 /* The GNU C library defines this for functions which it implements
5423     to always fail with ENOSYS.  Some functions are actually named
5424     something starting with __ and the normal name is an alias.  */
5425 #if defined (__stub_regfree) || defined (__stub___regfree)
5426 choke me
5427 #else
5428 f = regfree;
5429 #endif
5430
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_func_regfree=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_func_regfree=no"
5441 fi
5442 rm -f conftest*
5443 fi
5444
5445 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5446   echo "$ac_t""yes" 1>&6
5447   :
5448 else
5449   echo "$ac_t""no" 1>&6
5450 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5451 fi
5452
5453
5454
5455 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5456 echo "configure:5457: checking for compatible POSIX regex" >&5
5457 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5458   echo $ac_n "(cached) $ac_c" 1>&6
5459 else
5460   
5461         if test "$cross_compiling" = yes; then
5462   ol_cv_c_posix_regex=cross
5463 else
5464   cat > conftest.$ac_ext <<EOF
5465 #line 5466 "configure"
5466 #include "confdefs.h"
5467
5468 #include <sys/types.h>
5469 #include <regex.h>
5470 static char *pattern, *string;
5471 main()
5472 {
5473         int rc;
5474         regex_t re;
5475
5476         pattern = "^A";
5477
5478         if(regcomp(&re, pattern, 0)) {
5479                 return -1;
5480         }
5481         
5482         string = "ALL MATCH";
5483         
5484         rc = regexec(&re, string, 0, (void*)0, 0);
5485
5486         regfree(&re);
5487
5488         return rc;
5489 }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5492 then
5493   ol_cv_c_posix_regex=yes
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -fr conftest*
5498   ol_cv_c_posix_regex=no
5499 fi
5500 rm -fr conftest*
5501 fi
5502
5503 fi
5504
5505 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5506
5507 if test "$ol_cv_c_posix_regex" = no ; then
5508         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5509 fi
5510
5511 ol_link_dnssrv=no
5512 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5513 echo "configure:5514: checking for res_query" >&5
5514 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5515   echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517   cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 /* System header to define __stub macros and hopefully few prototypes,
5521     which can conflict with char res_query(); below.  */
5522 #include <assert.h>
5523 /* Override any gcc2 internal prototype to avoid an error.  */
5524 /* We use char because int might match the return type of a gcc2
5525     builtin and then its argument prototype would still apply.  */
5526 char res_query();
5527 char (*f)();
5528
5529 int main() {
5530
5531 /* The GNU C library defines this for functions which it implements
5532     to always fail with ENOSYS.  Some functions are actually named
5533     something starting with __ and the normal name is an alias.  */
5534 #if defined (__stub_res_query) || defined (__stub___res_query)
5535 choke me
5536 #else
5537 f = res_query;
5538 #endif
5539
5540 ; return 0; }
5541 EOF
5542 if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5543   rm -rf conftest*
5544   eval "ac_cv_func_res_query=yes"
5545 else
5546   echo "configure: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   rm -rf conftest*
5549   eval "ac_cv_func_res_query=no"
5550 fi
5551 rm -f conftest*
5552 fi
5553
5554 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5555   echo "$ac_t""yes" 1>&6
5556   :
5557 else
5558   echo "$ac_t""no" 1>&6
5559 fi
5560
5561 if test $ac_cv_func_res_query = no ; then 
5562         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5563 echo "configure:5564: checking for res_query in -lbind" >&5
5564 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5566   echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568   ac_save_LIBS="$LIBS"
5569 LIBS="-lbind  $LIBS"
5570 cat > conftest.$ac_ext <<EOF
5571 #line 5572 "configure"
5572 #include "confdefs.h"
5573 /* Override any gcc2 internal prototype to avoid an error.  */
5574 /* We use char because int might match the return type of a gcc2
5575     builtin and then its argument prototype would still apply.  */
5576 char res_query();
5577
5578 int main() {
5579 res_query()
5580 ; return 0; }
5581 EOF
5582 if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5583   rm -rf conftest*
5584   eval "ac_cv_lib_$ac_lib_var=yes"
5585 else
5586   echo "configure: failed program was:" >&5
5587   cat conftest.$ac_ext >&5
5588   rm -rf conftest*
5589   eval "ac_cv_lib_$ac_lib_var=no"
5590 fi
5591 rm -f conftest*
5592 LIBS="$ac_save_LIBS"
5593
5594 fi
5595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5596   echo "$ac_t""yes" 1>&6
5597     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5598     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5599   cat >> confdefs.h <<EOF
5600 #define $ac_tr_lib 1
5601 EOF
5602
5603   LIBS="-lbind $LIBS"
5604
5605 else
5606   echo "$ac_t""no" 1>&6
5607 fi
5608
5609         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5610 fi
5611
5612 if test $ac_cv_func_res_query = no ; then 
5613         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5614 echo "configure:5615: checking for __res_query in -lbind" >&5
5615 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5616 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5617   echo $ac_n "(cached) $ac_c" 1>&6
5618 else
5619   ac_save_LIBS="$LIBS"
5620 LIBS="-lbind  $LIBS"
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 /* Override any gcc2 internal prototype to avoid an error.  */
5625 /* We use char because int might match the return type of a gcc2
5626     builtin and then its argument prototype would still apply.  */
5627 char __res_query();
5628
5629 int main() {
5630 __res_query()
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5634   rm -rf conftest*
5635   eval "ac_cv_lib_$ac_lib_var=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_lib_$ac_lib_var=no"
5641 fi
5642 rm -f conftest*
5643 LIBS="$ac_save_LIBS"
5644
5645 fi
5646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5647   echo "$ac_t""yes" 1>&6
5648     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5649     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_lib 1
5652 EOF
5653
5654   LIBS="-lbind $LIBS"
5655
5656 else
5657   echo "$ac_t""no" 1>&6
5658 fi
5659
5660         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5661 fi
5662
5663 if test $ac_cv_func_res_query = no ; then 
5664         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5665 echo "configure:5666: checking for res_query in -lresolv" >&5
5666 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5668   echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670   ac_save_LIBS="$LIBS"
5671 LIBS="-lresolv  $LIBS"
5672 cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675 /* Override any gcc2 internal prototype to avoid an error.  */
5676 /* We use char because int might match the return type of a gcc2
5677     builtin and then its argument prototype would still apply.  */
5678 char res_query();
5679
5680 int main() {
5681 res_query()
5682 ; return 0; }
5683 EOF
5684 if { (eval echo configure:5685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5685   rm -rf conftest*
5686   eval "ac_cv_lib_$ac_lib_var=yes"
5687 else
5688   echo "configure: failed program was:" >&5
5689   cat conftest.$ac_ext >&5
5690   rm -rf conftest*
5691   eval "ac_cv_lib_$ac_lib_var=no"
5692 fi
5693 rm -f conftest*
5694 LIBS="$ac_save_LIBS"
5695
5696 fi
5697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5698   echo "$ac_t""yes" 1>&6
5699     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5701   cat >> confdefs.h <<EOF
5702 #define $ac_tr_lib 1
5703 EOF
5704
5705   LIBS="-lresolv $LIBS"
5706
5707 else
5708   echo "$ac_t""no" 1>&6
5709 fi
5710
5711         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5712 fi
5713
5714 if test "$ac_cv_func_res_query" = yes ; then
5715         cat >> confdefs.h <<\EOF
5716 #define HAVE_RES_QUERY 1
5717 EOF
5718
5719
5720         if test $ol_enable_dnssrv != no ; then
5721                 ol_link_dnssrv=yes
5722         fi
5723 fi
5724
5725 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5726         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5727 fi
5728
5729 for ac_func in getaddrinfo 
5730 do
5731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_func" >&5
5733 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* System header to define __stub macros and hopefully few prototypes,
5740     which can conflict with char $ac_func(); below.  */
5741 #include <assert.h>
5742 /* Override any gcc2 internal prototype to avoid an error.  */
5743 /* We use char because int might match the return type of a gcc2
5744     builtin and then its argument prototype would still apply.  */
5745 char $ac_func();
5746 char (*f)();
5747
5748 int main() {
5749
5750 /* The GNU C library defines this for functions which it implements
5751     to always fail with ENOSYS.  Some functions are actually named
5752     something starting with __ and the normal name is an alias.  */
5753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5754 choke me
5755 #else
5756 f = $ac_func;
5757 #endif
5758
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_func_$ac_func=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_func_$ac_func=no"
5769 fi
5770 rm -f conftest*
5771 fi
5772
5773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5774   echo "$ac_t""yes" 1>&6
5775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5776   cat >> confdefs.h <<EOF
5777 #define $ac_tr_func 1
5778 EOF
5779  
5780 else
5781   echo "$ac_t""no" 1>&6
5782 fi
5783 done
5784
5785
5786 ol_link_ipv6=no
5787 if test $ac_cv_func_getaddrinfo = no ; then
5788         if test $ol_enable_ipv6 = yes ; then
5789                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5790         fi
5791 else
5792         for ac_func in gai_strerror 
5793 do
5794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5795 echo "configure:5796: checking for $ac_func" >&5
5796 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5797   echo $ac_n "(cached) $ac_c" 1>&6
5798 else
5799   cat > conftest.$ac_ext <<EOF
5800 #line 5801 "configure"
5801 #include "confdefs.h"
5802 /* System header to define __stub macros and hopefully few prototypes,
5803     which can conflict with char $ac_func(); below.  */
5804 #include <assert.h>
5805 /* Override any gcc2 internal prototype to avoid an error.  */
5806 /* We use char because int might match the return type of a gcc2
5807     builtin and then its argument prototype would still apply.  */
5808 char $ac_func();
5809 char (*f)();
5810
5811 int main() {
5812
5813 /* The GNU C library defines this for functions which it implements
5814     to always fail with ENOSYS.  Some functions are actually named
5815     something starting with __ and the normal name is an alias.  */
5816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5817 choke me
5818 #else
5819 f = $ac_func;
5820 #endif
5821
5822 ; return 0; }
5823 EOF
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5825   rm -rf conftest*
5826   eval "ac_cv_func_$ac_func=yes"
5827 else
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -rf conftest*
5831   eval "ac_cv_func_$ac_func=no"
5832 fi
5833 rm -f conftest*
5834 fi
5835
5836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5837   echo "$ac_t""yes" 1>&6
5838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5839   cat >> confdefs.h <<EOF
5840 #define $ac_tr_func 1
5841 EOF
5842  
5843 else
5844   echo "$ac_t""no" 1>&6
5845 fi
5846 done
5847
5848
5849         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5850 echo "configure:5851: checking INET6_ADDRSTRLEN" >&5
5851 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5852   echo $ac_n "(cached) $ac_c" 1>&6
5853 else
5854   
5855                 cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858
5859 #                       include <netinet/in.h>
5860 #                       ifdef INET6_ADDRSTRLEN
5861                                 __has_inet6_addrstrlen__;
5862 #                       endif
5863                 
5864 EOF
5865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5866   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5867   rm -rf conftest*
5868   ol_cv_inet6_addrstrlen=yes
5869 else
5870   rm -rf conftest*
5871   ol_cv_inet6_addrstrlen=no
5872 fi
5873 rm -f conftest*
5874
5875 fi
5876
5877 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5878
5879         if test $ol_cv_inet6_addrstrlen = yes ; then
5880                 ol_link_ipv6=yes
5881         elif test $ol_enable_ipv6 = yes ; then
5882                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5883         fi
5884 fi
5885
5886 if test $ol_enable_local != no ; then
5887         for ac_hdr in sys/un.h 
5888 do
5889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5891 echo "configure:5892: checking for $ac_hdr" >&5
5892 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5893   echo $ac_n "(cached) $ac_c" 1>&6
5894 else
5895   cat > conftest.$ac_ext <<EOF
5896 #line 5897 "configure"
5897 #include "confdefs.h"
5898 #include <$ac_hdr>
5899 EOF
5900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5901 { (eval echo configure:5902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5903 if test -z "$ac_err"; then
5904   rm -rf conftest*
5905   eval "ac_cv_header_$ac_safe=yes"
5906 else
5907   echo "$ac_err" >&5
5908   echo "configure: failed program was:" >&5
5909   cat conftest.$ac_ext >&5
5910   rm -rf conftest*
5911   eval "ac_cv_header_$ac_safe=no"
5912 fi
5913 rm -f conftest*
5914 fi
5915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5916   echo "$ac_t""yes" 1>&6
5917     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5918   cat >> confdefs.h <<EOF
5919 #define $ac_tr_hdr 1
5920 EOF
5921  
5922 else
5923   echo "$ac_t""no" 1>&6
5924 fi
5925 done
5926
5927
5928         if test $ol_enable_local = auto ; then
5929                 ol_enable_local=$ac_cv_header_sys_un_h
5930         elif test $ac_cv_header_sys_un_h = no ; then
5931                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5932         fi
5933 fi
5934
5935 ol_link_kbind=no
5936 ol_link_kpasswd=no
5937 ol_link_krb5=no
5938 ol_link_krb4=no
5939
5940 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5941         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5942         -o $ol_with_kerberos = k425 ; then
5943
5944         for ac_hdr in krb5.h
5945 do
5946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5948 echo "configure:5949: checking for $ac_hdr" >&5
5949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5950   echo $ac_n "(cached) $ac_c" 1>&6
5951 else
5952   cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955 #include <$ac_hdr>
5956 EOF
5957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5958 { (eval echo configure:5959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5960 if test -z "$ac_err"; then
5961   rm -rf conftest*
5962   eval "ac_cv_header_$ac_safe=yes"
5963 else
5964   echo "$ac_err" >&5
5965   echo "configure: failed program was:" >&5
5966   cat conftest.$ac_ext >&5
5967   rm -rf conftest*
5968   eval "ac_cv_header_$ac_safe=no"
5969 fi
5970 rm -f conftest*
5971 fi
5972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5973   echo "$ac_t""yes" 1>&6
5974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5975   cat >> confdefs.h <<EOF
5976 #define $ac_tr_hdr 1
5977 EOF
5978  
5979 else
5980   echo "$ac_t""no" 1>&6
5981 fi
5982 done
5983
5984
5985         if test $ac_cv_header_krb5_h = yes ; then
5986                                 for ac_hdr in heim_err.h
5987 do
5988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5990 echo "configure:5991: checking for $ac_hdr" >&5
5991 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5992   echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994   cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 #include <$ac_hdr>
5998 EOF
5999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6000 { (eval echo configure:6001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6002 if test -z "$ac_err"; then
6003   rm -rf conftest*
6004   eval "ac_cv_header_$ac_safe=yes"
6005 else
6006   echo "$ac_err" >&5
6007   echo "configure: failed program was:" >&5
6008   cat conftest.$ac_ext >&5
6009   rm -rf conftest*
6010   eval "ac_cv_header_$ac_safe=no"
6011 fi
6012 rm -f conftest*
6013 fi
6014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6015   echo "$ac_t""yes" 1>&6
6016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6017   cat >> confdefs.h <<EOF
6018 #define $ac_tr_hdr 1
6019 EOF
6020  
6021 else
6022   echo "$ac_t""no" 1>&6
6023 fi
6024 done
6025
6026                 if test $ac_cv_header_heim_err_h = yes ; then
6027                         krb5_impl=heimdal
6028                 else
6029                         krb5_impl=mit
6030                 fi
6031
6032                 if test $krb5_impl = mit; then
6033                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6034 echo "configure:6035: checking for main in -lkrb5" >&5
6035 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6037   echo $ac_n "(cached) $ac_c" 1>&6
6038 else
6039   ac_save_LIBS="$LIBS"
6040 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6041 cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044
6045 int main() {
6046 main()
6047 ; return 0; }
6048 EOF
6049 if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6050   rm -rf conftest*
6051   eval "ac_cv_lib_$ac_lib_var=yes"
6052 else
6053   echo "configure: failed program was:" >&5
6054   cat conftest.$ac_ext >&5
6055   rm -rf conftest*
6056   eval "ac_cv_lib_$ac_lib_var=no"
6057 fi
6058 rm -f conftest*
6059 LIBS="$ac_save_LIBS"
6060
6061 fi
6062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6063   echo "$ac_t""yes" 1>&6
6064   have_krb5=yes
6065                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6066 else
6067   echo "$ac_t""no" 1>&6
6068 have_krb5=no
6069 fi
6070
6071
6072                 elif test $krb5_impl = heimdal; then
6073                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6074 echo "configure:6075: checking for main in -lkrb5" >&5
6075 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6077   echo $ac_n "(cached) $ac_c" 1>&6
6078 else
6079   ac_save_LIBS="$LIBS"
6080 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6081 cat > conftest.$ac_ext <<EOF
6082 #line 6083 "configure"
6083 #include "confdefs.h"
6084
6085 int main() {
6086 main()
6087 ; return 0; }
6088 EOF
6089 if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6090   rm -rf conftest*
6091   eval "ac_cv_lib_$ac_lib_var=yes"
6092 else
6093   echo "configure: failed program was:" >&5
6094   cat conftest.$ac_ext >&5
6095   rm -rf conftest*
6096   eval "ac_cv_lib_$ac_lib_var=no"
6097 fi
6098 rm -f conftest*
6099 LIBS="$ac_save_LIBS"
6100
6101 fi
6102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6103   echo "$ac_t""yes" 1>&6
6104   have_krb5=yes
6105                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6106 else
6107   echo "$ac_t""no" 1>&6
6108 have_krb5=no
6109 fi
6110
6111
6112                         cat >> confdefs.h <<\EOF
6113 #define HAVE_HEIMDAL_KERBEROS 1
6114 EOF
6115
6116                 else
6117                         have_krb5=no
6118                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6119                 fi
6120
6121                 if test $have_krb5 = yes ; then
6122                         ol_link_krb5=yes
6123
6124                         cat >> confdefs.h <<\EOF
6125 #define HAVE_KRB5 1
6126 EOF
6127
6128
6129                         if test $ol_enable_kpasswd != no ; then
6130                                 ol_link_kpasswd=yes;
6131                         fi
6132
6133                         if test $ol_with_kerberos = k5only ; then
6134                                 ol_with_kerberos=found
6135                         fi
6136
6137                 elif test $ol_with_kerberos != auto ; then
6138                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6139                 fi
6140
6141         fi
6142 fi
6143
6144 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6145         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6146
6147         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6148 do
6149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6151 echo "configure:6152: checking for $ac_hdr" >&5
6152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6153   echo $ac_n "(cached) $ac_c" 1>&6
6154 else
6155   cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158 #include <$ac_hdr>
6159 EOF
6160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6161 { (eval echo configure:6162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6163 if test -z "$ac_err"; then
6164   rm -rf conftest*
6165   eval "ac_cv_header_$ac_safe=yes"
6166 else
6167   echo "$ac_err" >&5
6168   echo "configure: failed program was:" >&5
6169   cat conftest.$ac_ext >&5
6170   rm -rf conftest*
6171   eval "ac_cv_header_$ac_safe=no"
6172 fi
6173 rm -f conftest*
6174 fi
6175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6176   echo "$ac_t""yes" 1>&6
6177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6178   cat >> confdefs.h <<EOF
6179 #define $ac_tr_hdr 1
6180 EOF
6181  
6182 else
6183   echo "$ac_t""no" 1>&6
6184 fi
6185 done
6186
6187
6188         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6189                 if test $krb5_impl = mit; then
6190                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6191 echo "configure:6192: checking for main in -lkrb4" >&5
6192 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6194   echo $ac_n "(cached) $ac_c" 1>&6
6195 else
6196   ac_save_LIBS="$LIBS"
6197 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6198 cat > conftest.$ac_ext <<EOF
6199 #line 6200 "configure"
6200 #include "confdefs.h"
6201
6202 int main() {
6203 main()
6204 ; return 0; }
6205 EOF
6206 if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6207   rm -rf conftest*
6208   eval "ac_cv_lib_$ac_lib_var=yes"
6209 else
6210   echo "configure: failed program was:" >&5
6211   cat conftest.$ac_ext >&5
6212   rm -rf conftest*
6213   eval "ac_cv_lib_$ac_lib_var=no"
6214 fi
6215 rm -f conftest*
6216 LIBS="$ac_save_LIBS"
6217
6218 fi
6219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6220   echo "$ac_t""yes" 1>&6
6221   have_k425=yes
6222                                 KRB4_LIBS="-lkrb4 -ldes425"
6223 else
6224   echo "$ac_t""no" 1>&6
6225 have_k425=no
6226 fi
6227
6228
6229                 elif test $krb5_impl = heimdal; then
6230                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6231 echo "configure:6232: checking for main in -lkrb4" >&5
6232 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6234   echo $ac_n "(cached) $ac_c" 1>&6
6235 else
6236   ac_save_LIBS="$LIBS"
6237 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6238 cat > conftest.$ac_ext <<EOF
6239 #line 6240 "configure"
6240 #include "confdefs.h"
6241
6242 int main() {
6243 main()
6244 ; return 0; }
6245 EOF
6246 if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6247   rm -rf conftest*
6248   eval "ac_cv_lib_$ac_lib_var=yes"
6249 else
6250   echo "configure: failed program was:" >&5
6251   cat conftest.$ac_ext >&5
6252   rm -rf conftest*
6253   eval "ac_cv_lib_$ac_lib_var=no"
6254 fi
6255 rm -f conftest*
6256 LIBS="$ac_save_LIBS"
6257
6258 fi
6259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261   have_k425=yes
6262                                 KRB4_LIBS="-lkrb4"
6263 else
6264   echo "$ac_t""no" 1>&6
6265 have_k425=no
6266 fi
6267
6268
6269                 else
6270                         have_425=no
6271                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6272                 fi
6273
6274                 if test $have_k425 = yes ; then
6275                         ol_with_kerberos=found
6276                         ol_link_krb4=yes
6277
6278                         cat >> confdefs.h <<\EOF
6279 #define HAVE_KRB425 1
6280 EOF
6281
6282                         cat >> confdefs.h <<\EOF
6283 #define HAVE_KRB4 1
6284 EOF
6285
6286
6287                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6288 echo "configure:6289: checking for des_debug in Kerberos libraries" >&5
6289 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6290   echo $ac_n "(cached) $ac_c" 1>&6
6291 else
6292   
6293                                                                 save_LIBS="$LIBS"
6294                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6295                                 cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298
6299 #include <kerberosIV/krb.h>
6300 #include <kerberosIV/des.h>
6301 extern int des_debug;
6302
6303 int main() {
6304
6305 des_debug = 1;
6306
6307 ; return 0; }
6308 EOF
6309 if { (eval echo configure:6310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6310   rm -rf conftest*
6311   ol_cv_var_des_debug=yes
6312 else
6313   echo "configure: failed program was:" >&5
6314   cat conftest.$ac_ext >&5
6315   rm -rf conftest*
6316   ol_cv_var_des_debug=no
6317 fi
6318 rm -f conftest*
6319                                                                 LIBS="$save_LIBS"
6320                         
6321 fi
6322
6323 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6324
6325                         if test $ol_cv_var_des_debug = yes ; then
6326                                 cat >> confdefs.h <<\EOF
6327 #define HAVE_DES_DEBUG 1
6328 EOF
6329
6330                         fi
6331
6332                         LIBS="$save_LIBS"
6333                 fi
6334         fi
6335 fi
6336
6337 if test $ol_link_krb5 = yes ; then
6338         ol_with_kerberos=found
6339 fi
6340
6341 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6342         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6343
6344         for ac_hdr in krb.h des.h krb-archaeology.h 
6345 do
6346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6348 echo "configure:6349: checking for $ac_hdr" >&5
6349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6350   echo $ac_n "(cached) $ac_c" 1>&6
6351 else
6352   cat > conftest.$ac_ext <<EOF
6353 #line 6354 "configure"
6354 #include "confdefs.h"
6355 #include <$ac_hdr>
6356 EOF
6357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6358 { (eval echo configure:6359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6360 if test -z "$ac_err"; then
6361   rm -rf conftest*
6362   eval "ac_cv_header_$ac_safe=yes"
6363 else
6364   echo "$ac_err" >&5
6365   echo "configure: failed program was:" >&5
6366   cat conftest.$ac_ext >&5
6367   rm -rf conftest*
6368   eval "ac_cv_header_$ac_safe=no"
6369 fi
6370 rm -f conftest*
6371 fi
6372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6373   echo "$ac_t""yes" 1>&6
6374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6375   cat >> confdefs.h <<EOF
6376 #define $ac_tr_hdr 1
6377 EOF
6378  
6379 else
6380   echo "$ac_t""no" 1>&6
6381 fi
6382 done
6383
6384
6385         if test $ac_cv_header_krb_h = yes ; then
6386                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6387 echo "configure:6388: checking for main in -lkrb" >&5
6388 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6390   echo $ac_n "(cached) $ac_c" 1>&6
6391 else
6392   ac_save_LIBS="$LIBS"
6393 LIBS="-lkrb -ldes $LIBS"
6394 cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397
6398 int main() {
6399 main()
6400 ; return 0; }
6401 EOF
6402 if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6403   rm -rf conftest*
6404   eval "ac_cv_lib_$ac_lib_var=yes"
6405 else
6406   echo "configure: failed program was:" >&5
6407   cat conftest.$ac_ext >&5
6408   rm -rf conftest*
6409   eval "ac_cv_lib_$ac_lib_var=no"
6410 fi
6411 rm -f conftest*
6412 LIBS="$ac_save_LIBS"
6413
6414 fi
6415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6416   echo "$ac_t""yes" 1>&6
6417   have_k4=yes
6418 else
6419   echo "$ac_t""no" 1>&6
6420 have_k4=no
6421 fi
6422
6423
6424                 if test $have_k4 = yes ; then
6425                         ol_with_kerberos=found
6426                         ol_link_krb4=yes
6427
6428                         cat >> confdefs.h <<\EOF
6429 #define HAVE_KRB4 1
6430 EOF
6431
6432
6433                         KRB4_LIBS="-lkrb -ldes"
6434
6435                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6436                                 cat >> confdefs.h <<\EOF
6437 #define HAVE_KTH_KERBEROS 1
6438 EOF
6439
6440                         fi
6441                 fi
6442         fi
6443 fi
6444
6445 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6446         ol_link_kpasswd=yes
6447 fi
6448
6449 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6450         ol_link_kbind=yes
6451
6452 elif test $ol_enable_kbind = yes ; then
6453         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6454 fi
6455
6456 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6457         cat >> confdefs.h <<\EOF
6458 #define HAVE_KERBEROS 1
6459 EOF
6460
6461
6462 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6463         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6464 fi
6465
6466 ol_link_tls=no
6467 if test $ol_with_tls != no ; then
6468         for ac_hdr in openssl/ssl.h ssl.h
6469 do
6470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6472 echo "configure:6473: checking for $ac_hdr" >&5
6473 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6474   echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476   cat > conftest.$ac_ext <<EOF
6477 #line 6478 "configure"
6478 #include "confdefs.h"
6479 #include <$ac_hdr>
6480 EOF
6481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6482 { (eval echo configure:6483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6484 if test -z "$ac_err"; then
6485   rm -rf conftest*
6486   eval "ac_cv_header_$ac_safe=yes"
6487 else
6488   echo "$ac_err" >&5
6489   echo "configure: failed program was:" >&5
6490   cat conftest.$ac_ext >&5
6491   rm -rf conftest*
6492   eval "ac_cv_header_$ac_safe=no"
6493 fi
6494 rm -f conftest*
6495 fi
6496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6497   echo "$ac_t""yes" 1>&6
6498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6499   cat >> confdefs.h <<EOF
6500 #define $ac_tr_hdr 1
6501 EOF
6502  
6503 else
6504   echo "$ac_t""no" 1>&6
6505 fi
6506 done
6507
6508         
6509         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6510                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6511 echo "configure:6512: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6512 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6514   echo $ac_n "(cached) $ac_c" 1>&6
6515 else
6516   ac_save_LIBS="$LIBS"
6517 LIBS="-lssl -lcrypto $LIBS"
6518 cat > conftest.$ac_ext <<EOF
6519 #line 6520 "configure"
6520 #include "confdefs.h"
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 /* We use char because int might match the return type of a gcc2
6523     builtin and then its argument prototype would still apply.  */
6524 char SSLeay_add_ssl_algorithms();
6525
6526 int main() {
6527 SSLeay_add_ssl_algorithms()
6528 ; return 0; }
6529 EOF
6530 if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6531   rm -rf conftest*
6532   eval "ac_cv_lib_$ac_lib_var=yes"
6533 else
6534   echo "configure: failed program was:" >&5
6535   cat conftest.$ac_ext >&5
6536   rm -rf conftest*
6537   eval "ac_cv_lib_$ac_lib_var=no"
6538 fi
6539 rm -f conftest*
6540 LIBS="$ac_save_LIBS"
6541
6542 fi
6543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6544   echo "$ac_t""yes" 1>&6
6545   have_ssleay=yes
6546                         need_rsaref=no
6547 else
6548   echo "$ac_t""no" 1>&6
6549 have_ssleay=no
6550 fi
6551
6552                         
6553                 if test $have_ssleay = no ; then
6554                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6555 echo "configure:6556: checking for SSL_library_init in -lssl" >&5
6556 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6558   echo $ac_n "(cached) $ac_c" 1>&6
6559 else
6560   ac_save_LIBS="$LIBS"
6561 LIBS="-lssl -lcrypto $LIBS"
6562 cat > conftest.$ac_ext <<EOF
6563 #line 6564 "configure"
6564 #include "confdefs.h"
6565 /* Override any gcc2 internal prototype to avoid an error.  */
6566 /* We use char because int might match the return type of a gcc2
6567     builtin and then its argument prototype would still apply.  */
6568 char SSL_library_init();
6569
6570 int main() {
6571 SSL_library_init()
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575   rm -rf conftest*
6576   eval "ac_cv_lib_$ac_lib_var=yes"
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   eval "ac_cv_lib_$ac_lib_var=no"
6582 fi
6583 rm -f conftest*
6584 LIBS="$ac_save_LIBS"
6585
6586 fi
6587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6588   echo "$ac_t""yes" 1>&6
6589   have_ssleay=yes
6590                                 need_rsaref=no
6591 else
6592   echo "$ac_t""no" 1>&6
6593 have_ssleay=no
6594 fi
6595
6596                 fi
6597
6598                 if test $have_ssleay = no ; then
6599                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6600 echo "configure:6601: checking for ssl3_accept in -lssl" >&5
6601 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6602 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   ac_save_LIBS="$LIBS"
6606 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6607 cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610 /* Override any gcc2 internal prototype to avoid an error.  */
6611 /* We use char because int might match the return type of a gcc2
6612     builtin and then its argument prototype would still apply.  */
6613 char ssl3_accept();
6614
6615 int main() {
6616 ssl3_accept()
6617 ; return 0; }
6618 EOF
6619 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6620   rm -rf conftest*
6621   eval "ac_cv_lib_$ac_lib_var=yes"
6622 else
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   eval "ac_cv_lib_$ac_lib_var=no"
6627 fi
6628 rm -f conftest*
6629 LIBS="$ac_save_LIBS"
6630
6631 fi
6632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6633   echo "$ac_t""yes" 1>&6
6634   have_ssleay=yes
6635                                 need_rsaref=yes
6636 else
6637   echo "$ac_t""no" 1>&6
6638 have_ssleay=no
6639 fi
6640
6641                 fi
6642
6643                 if test $have_ssleay = yes ; then
6644                         ol_with_tls=found
6645                         ol_link_tls=yes
6646
6647                         cat >> confdefs.h <<\EOF
6648 #define HAVE_SSLEAY 1
6649 EOF
6650
6651
6652                         if test $need_rsaref = yes; then
6653                                 cat >> confdefs.h <<\EOF
6654 #define HAVE_RSAREF 1
6655 EOF
6656
6657
6658                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6659                         else
6660                                 TLS_LIBS="-lssl -lcrypto"
6661                         fi
6662                 fi
6663         fi
6664
6665 else
6666         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6667 fi
6668
6669 if test $ol_link_tls = yes ; then
6670         cat >> confdefs.h <<\EOF
6671 #define HAVE_TLS 1
6672 EOF
6673
6674
6675 elif test $ol_with_tls = auto ; then
6676         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6677         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6678
6679 elif test $ol_with_tls != no ; then
6680         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6681 fi
6682
6683 if test $ol_enable_lmpasswd != no; then
6684         if test $ol_link_tls != yes ; then
6685                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6686         fi
6687
6688         cat >> confdefs.h <<\EOF
6689 #define SLAPD_LMHASH 1
6690 EOF
6691
6692 fi
6693
6694 for ac_func in \
6695         ctime_r                 \
6696         gethostbyname_r gethostbyaddr_r \
6697
6698 do
6699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6700 echo "configure:6701: checking for $ac_func" >&5
6701 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char $ac_func(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char $ac_func();
6714 char (*f)();
6715
6716 int main() {
6717
6718 /* The GNU C library defines this for functions which it implements
6719     to always fail with ENOSYS.  Some functions are actually named
6720     something starting with __ and the normal name is an alias.  */
6721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6722 choke me
6723 #else
6724 f = $ac_func;
6725 #endif
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   eval "ac_cv_func_$ac_func=yes"
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_func_$ac_func=no"
6737 fi
6738 rm -f conftest*
6739 fi
6740
6741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6744   cat >> confdefs.h <<EOF
6745 #define $ac_tr_func 1
6746 EOF
6747  
6748 else
6749   echo "$ac_t""no" 1>&6
6750 fi
6751 done
6752
6753
6754 if test "$ac_cv_func_ctime_r" = no ; then
6755         ol_cv_func_ctime_r_nargs=0
6756 else
6757         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6758 echo "configure:6759: checking number of arguments of ctime_r" >&5
6759 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6760   echo $ac_n "(cached) $ac_c" 1>&6
6761 else
6762   cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 #include <time.h>
6766 int main() {
6767 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6768 ; return 0; }
6769 EOF
6770 if { (eval echo configure:6771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6771   rm -rf conftest*
6772   ol_cv_func_ctime_r_nargs3=yes
6773 else
6774   echo "configure: failed program was:" >&5
6775   cat conftest.$ac_ext >&5
6776   rm -rf conftest*
6777   ol_cv_func_ctime_r_nargs3=no
6778 fi
6779 rm -f conftest*
6780
6781         cat > conftest.$ac_ext <<EOF
6782 #line 6783 "configure"
6783 #include "confdefs.h"
6784 #include <time.h>
6785 int main() {
6786 time_t ti; char *buffer; ctime_r(&ti,buffer);
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6790   rm -rf conftest*
6791   ol_cv_func_ctime_r_nargs2=yes
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   rm -rf conftest*
6796   ol_cv_func_ctime_r_nargs2=no
6797 fi
6798 rm -f conftest*
6799
6800         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6801                 $ol_cv_func_ctime_r_nargs2 = no ; then
6802
6803                 ol_cv_func_ctime_r_nargs=3
6804
6805         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6806                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6807
6808                 ol_cv_func_ctime_r_nargs=2
6809
6810         else
6811                 ol_cv_func_ctime_r_nargs=0
6812         fi
6813   
6814 fi
6815
6816 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6817
6818   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6819         cat >> confdefs.h <<EOF
6820 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6821 EOF
6822
6823   fi
6824
6825 fi
6826
6827 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6828         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6829 echo "configure:6830: checking number of arguments of gethostbyname_r" >&5
6830 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836 #include <sys/types.h>
6837 #include <sys/socket.h>
6838 #include <netinet/in.h>
6839 #include <netdb.h>
6840 #define BUFSIZE (sizeof(struct hostent)+10)
6841 int main() {
6842 struct hostent hent; char buffer[BUFSIZE];
6843                 int bufsize=BUFSIZE;int h_errno;
6844                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6845                         buffer, bufsize, &h_errno);
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6849   rm -rf conftest*
6850   ol_cv_func_gethostbyname_r_nargs5=yes
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855   ol_cv_func_gethostbyname_r_nargs5=no
6856 fi
6857 rm -f conftest*
6858
6859         cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 #include <sys/types.h>
6863 #include <sys/socket.h>
6864 #include <netinet/in.h>
6865 #include <netdb.h>
6866 #define BUFSIZE (sizeof(struct hostent)+10)
6867 int main() {
6868 struct hostent hent;struct hostent *rhent;
6869                 char buffer[BUFSIZE];
6870                 int bufsize=BUFSIZE;int h_errno;
6871                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6872                         &rhent, &h_errno);
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6876   rm -rf conftest*
6877   ol_cv_func_gethostbyname_r_nargs6=yes
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   ol_cv_func_gethostbyname_r_nargs6=no
6883 fi
6884 rm -f conftest*
6885
6886         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6887                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6888
6889                 ol_cv_func_gethostbyname_r_nargs=5
6890
6891         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6892                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6893
6894                 ol_cv_func_gethostbyname_r_nargs=6
6895
6896         else
6897                 ol_cv_func_gethostbyname_r_nargs=0
6898         fi
6899   
6900 fi
6901
6902 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6903   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6904         cat >> confdefs.h <<EOF
6905 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6906 EOF
6907
6908   fi
6909
6910 else
6911         ol_cv_func_gethostbyname_r_nargs=0
6912 fi
6913  
6914 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6915         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6916 echo "configure:6917: checking number of arguments of gethostbyaddr_r" >&5
6917 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6918   echo $ac_n "(cached) $ac_c" 1>&6
6919 else
6920   cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 #include <sys/types.h>
6924 #include <sys/socket.h>
6925 #include <netinet/in.h>
6926 #include <netdb.h>
6927 #define BUFSIZE (sizeof(struct hostent)+10)
6928 int main() {
6929 struct hostent hent; char buffer[BUFSIZE]; 
6930             struct in_addr add;
6931             size_t alen=sizeof(struct in_addr);
6932             int bufsize=BUFSIZE;int h_errno;
6933                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6934                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6938   rm -rf conftest*
6939   ol_cv_func_gethostbyaddr_r_nargs7=yes
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   ol_cv_func_gethostbyaddr_r_nargs7=no
6945 fi
6946 rm -f conftest*
6947
6948         cat > conftest.$ac_ext <<EOF
6949 #line 6950 "configure"
6950 #include "confdefs.h"
6951 #include <sys/types.h>
6952 #include <sys/socket.h>
6953 #include <netinet/in.h>
6954 #include <netdb.h>
6955 #define BUFSIZE (sizeof(struct hostent)+10)
6956 int main() {
6957 struct hostent hent;
6958                 struct hostent *rhent; char buffer[BUFSIZE]; 
6959                 struct in_addr add;
6960                 size_t alen=sizeof(struct in_addr);
6961                 int bufsize=BUFSIZE;int h_errno;
6962                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6963                         alen, AF_INET, &hent, buffer, bufsize, 
6964                         &rhent, &h_errno);
6965 ; return 0; }
6966 EOF
6967 if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6968   rm -rf conftest*
6969   ol_cv_func_gethostbyaddr_r_nargs8=yes
6970 else
6971   echo "configure: failed program was:" >&5
6972   cat conftest.$ac_ext >&5
6973   rm -rf conftest*
6974   ol_cv_func_gethostbyaddr_r_nargs8=no
6975 fi
6976 rm -f conftest*
6977
6978         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6979                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6980
6981                 ol_cv_func_gethostbyaddr_r_nargs=7
6982
6983         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6984                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6985
6986                 ol_cv_func_gethostbyaddr_r_nargs=8
6987
6988         else
6989                 ol_cv_func_gethostbyaddr_r_nargs=0
6990         fi
6991   
6992 fi
6993
6994 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6995   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6996     cat >> confdefs.h <<EOF
6997 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6998 EOF
6999
7000   fi
7001
7002 else
7003         ol_cv_func_gethostbyaddr_r_nargs=0
7004 fi
7005
7006 if test "$ac_cv_func_ctime_r" = yes \
7007         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7008         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7009         -a "$ac_cv_func_gethostbyname_r" = yes \
7010         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7011         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7012         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7013         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7014         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7015         ; then
7016  
7017         cat >> confdefs.h <<\EOF
7018 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7019 EOF
7020
7021 fi
7022
7023 ol_link_threads=no
7024
7025 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7026         -o $ol_with_threads = nt ; then
7027
7028         
7029         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7030 echo "configure:7031: checking for NT Threads" >&5
7031 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7032   echo $ac_n "(cached) $ac_c" 1>&6
7033 else
7034   
7035                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7036 echo "configure:7037: checking for _beginthread" >&5
7037 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7038   echo $ac_n "(cached) $ac_c" 1>&6
7039 else
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043 /* System header to define __stub macros and hopefully few prototypes,
7044     which can conflict with char _beginthread(); below.  */
7045 #include <assert.h>
7046 /* Override any gcc2 internal prototype to avoid an error.  */
7047 /* We use char because int might match the return type of a gcc2
7048     builtin and then its argument prototype would still apply.  */
7049 char _beginthread();
7050 char (*f)();
7051
7052 int main() {
7053
7054 /* The GNU C library defines this for functions which it implements
7055     to always fail with ENOSYS.  Some functions are actually named
7056     something starting with __ and the normal name is an alias.  */
7057 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7058 choke me
7059 #else
7060 f = _beginthread;
7061 #endif
7062
7063 ; return 0; }
7064 EOF
7065 if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7066   rm -rf conftest*
7067   eval "ac_cv_func__beginthread=yes"
7068 else
7069   echo "configure: failed program was:" >&5
7070   cat conftest.$ac_ext >&5
7071   rm -rf conftest*
7072   eval "ac_cv_func__beginthread=no"
7073 fi
7074 rm -f conftest*
7075 fi
7076
7077 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7078   echo "$ac_t""yes" 1>&6
7079   ol_cv_nt_threads=yes
7080 else
7081   echo "$ac_t""no" 1>&6
7082 ol_cv_nt_threads=no
7083 fi
7084
7085         
7086 fi
7087
7088 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7089
7090         if test $ol_cv_nt_threads = yes ; then
7091                 cat >> confdefs.h <<\EOF
7092 #define HAVE_NT_THREADS 1
7093 EOF
7094
7095         fi
7096
7097
7098         if test "$ol_cv_nt_threads" = yes ; then
7099         ol_link_threads=nt
7100         ol_with_threads=found
7101         ol_with_yielding_select=yes
7102
7103                 cat >> confdefs.h <<\EOF
7104 #define HAVE_NT_SERVICE_MANAGER 1
7105 EOF
7106
7107                 cat >> confdefs.h <<\EOF
7108 #define HAVE_NT_EVENT_LOG 1
7109 EOF
7110
7111         fi
7112
7113         if test $ol_with_threads = nt ; then
7114                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7115         fi
7116 fi
7117
7118 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7119         -o $ol_with_threads = posix ; then
7120
7121         for ac_hdr in pthread.h
7122 do
7123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7125 echo "configure:7126: checking for $ac_hdr" >&5
7126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7127   echo $ac_n "(cached) $ac_c" 1>&6
7128 else
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132 #include <$ac_hdr>
7133 EOF
7134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7135 { (eval echo configure:7136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7137 if test -z "$ac_err"; then
7138   rm -rf conftest*
7139   eval "ac_cv_header_$ac_safe=yes"
7140 else
7141   echo "$ac_err" >&5
7142   echo "configure: failed program was:" >&5
7143   cat conftest.$ac_ext >&5
7144   rm -rf conftest*
7145   eval "ac_cv_header_$ac_safe=no"
7146 fi
7147 rm -f conftest*
7148 fi
7149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7150   echo "$ac_t""yes" 1>&6
7151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7152   cat >> confdefs.h <<EOF
7153 #define $ac_tr_hdr 1
7154 EOF
7155  
7156 else
7157   echo "$ac_t""no" 1>&6
7158 fi
7159 done
7160
7161
7162         if test $ac_cv_header_pthread_h = yes ; then
7163                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7164 echo "configure:7165: checking POSIX thread version" >&5
7165 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7166   echo $ac_n "(cached) $ac_c" 1>&6
7167 else
7168   
7169         cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172
7173 #               include <pthread.h>
7174                 /* this check could be improved */
7175 #               ifdef PTHREAD_ONCE_INIT
7176                         pthread_version_final;
7177 #               endif
7178         
7179 EOF
7180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7181   egrep "pthread_version_final" >/dev/null 2>&1; then
7182   rm -rf conftest*
7183   ol_pthread_final=yes
7184 else
7185   rm -rf conftest*
7186   ol_pthread_final=no
7187 fi
7188 rm -f conftest*
7189
7190
7191         cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194
7195 #               include <pthread.h>
7196                 /* this check could be improved */
7197 #               ifdef pthread_once_init
7198                         pthread_version_draft4;
7199 #               endif
7200         
7201 EOF
7202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7203   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7204   rm -rf conftest*
7205   ol_pthread_draft4=yes
7206 else
7207   rm -rf conftest*
7208   ol_pthread_draft4=no
7209 fi
7210 rm -f conftest*
7211
7212
7213         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7214                 ol_cv_pthread_version=final
7215         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7216                 ol_cv_pthread_version=draft4
7217         else
7218                 ol_cv_pthread_version=unknown
7219         fi
7220
7221 fi
7222
7223 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7224
7225
7226                 if test $ol_cv_pthread_version = final ; then
7227                         cat >> confdefs.h <<\EOF
7228 #define HAVE_PTHREADS_FINAL 1
7229 EOF
7230
7231                 elif test $ol_cv_pthread_version = draft4 ; then
7232                         cat >> confdefs.h <<\EOF
7233 #define HAVE_PTHREADS_D4 1
7234 EOF
7235
7236                 else
7237                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7238                 fi
7239
7240                 # consider threads found
7241                 ol_with_threads=found
7242
7243                 
7244         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7245 echo "configure:7246: checking for LinuxThreads pthread.h" >&5
7246 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7247   echo $ac_n "(cached) $ac_c" 1>&6
7248 else
7249   cat > conftest.$ac_ext <<EOF
7250 #line 7251 "configure"
7251 #include "confdefs.h"
7252 #include <pthread.h>
7253 EOF
7254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7255   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7256   rm -rf conftest*
7257   ol_cv_header_linux_threads=yes
7258 else
7259   rm -rf conftest*
7260   ol_cv_header_linux_threads=no
7261 fi
7262 rm -f conftest*
7263
7264                 
7265 fi
7266
7267 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7268         if test $ol_cv_header_linux_threads = yes; then
7269                 cat >> confdefs.h <<\EOF
7270 #define HAVE_LINUX_THREADS 1
7271 EOF
7272
7273         fi
7274
7275                 
7276         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7277 echo "configure:7278: checking for GNU Pth pthread.h" >&5
7278 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   cat > conftest.$ac_ext <<EOF
7282 #line 7283 "configure"
7283 #include "confdefs.h"
7284 #include <pthread.h>
7285 #ifdef _POSIX_THREAD_IS_GNU_PTH
7286         __gnu_pth__;
7287 #endif
7288
7289 EOF
7290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7291   egrep "__gnu_pth__" >/dev/null 2>&1; then
7292   rm -rf conftest*
7293   ol_cv_header_gnu_pth_pthread_h=yes
7294 else
7295   rm -rf conftest*
7296   ol_cv_header_gnu_pth_pthread_h=no
7297 fi
7298 rm -f conftest*
7299
7300                 
7301 fi
7302
7303 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7304
7305
7306                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7307                         for ac_hdr in sched.h
7308 do
7309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7311 echo "configure:7312: checking for $ac_hdr" >&5
7312 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7313   echo $ac_n "(cached) $ac_c" 1>&6
7314 else
7315   cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 #include <$ac_hdr>
7319 EOF
7320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7321 { (eval echo configure:7322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7323 if test -z "$ac_err"; then
7324   rm -rf conftest*
7325   eval "ac_cv_header_$ac_safe=yes"
7326 else
7327   echo "$ac_err" >&5
7328   echo "configure: failed program was:" >&5
7329   cat conftest.$ac_ext >&5
7330   rm -rf conftest*
7331   eval "ac_cv_header_$ac_safe=no"
7332 fi
7333 rm -f conftest*
7334 fi
7335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7336   echo "$ac_t""yes" 1>&6
7337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7338   cat >> confdefs.h <<EOF
7339 #define $ac_tr_hdr 1
7340 EOF
7341  
7342 else
7343   echo "$ac_t""no" 1>&6
7344 fi
7345 done
7346
7347                 fi
7348
7349                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7350                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7351 echo "configure:7352: checking for pthread_create in default libraries" >&5
7352 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   
7356                 if test "$cross_compiling" = yes; then
7357   cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 /* pthread test headers */
7361 #include <pthread.h>
7362 #ifndef NULL
7363 #define NULL (void*)0
7364 #endif
7365
7366 static void *task(p)
7367         void *p;
7368 {
7369         return (void *) (p == NULL);
7370 }
7371
7372 int main() {
7373
7374         /* pthread test function */
7375         pthread_t t;
7376         int status;
7377 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7378         /* This system (e.g. AIX) defaults detached; must override */
7379         pthread_attr_t attr;
7380
7381         status = pthread_attr_init(&attr);
7382         if( status ) exit( status );
7383
7384         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7385         if( status ) exit( status );
7386
7387 #define ATTR    &attr
7388 #else
7389 #if HAVE_PTHREADS_D4
7390 #define ATTR    pthread_attr_default
7391 #else
7392 #define ATTR    NULL
7393 #endif
7394 #endif
7395         /* make sure pthread_create() isn't just a stub */
7396         status = pthread_create(&t, ATTR, task, NULL);
7397         if( status ) exit( status );
7398
7399         /* make sure pthread_detach() isn't just a stub */
7400 #if HAVE_PTHREADS_D4
7401         status = pthread_detach( &t );
7402 #else
7403         status = pthread_detach( t );
7404 #endif
7405
7406 #ifdef HAVE_LINUX_THREADS
7407         pthread_kill_other_threads_np();
7408 #endif
7409
7410         exit( status );
7411
7412 ; return 0; }
7413 EOF
7414 if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7415   rm -rf conftest*
7416   ol_cv_pthread_create=yes
7417 else
7418   echo "configure: failed program was:" >&5
7419   cat conftest.$ac_ext >&5
7420   rm -rf conftest*
7421   ol_cv_pthread_create=no
7422 fi
7423 rm -f conftest*
7424 else
7425   cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 /* pthread test headers */
7429 #include <pthread.h>
7430 #ifndef NULL
7431 #define NULL (void*)0
7432 #endif
7433
7434 static void *task(p)
7435         void *p;
7436 {
7437         return (void *) (p == NULL);
7438 }
7439
7440
7441 int main(argc, argv)
7442         int argc;
7443         char **argv;
7444 {
7445
7446         /* pthread test function */
7447         pthread_t t;
7448         int status;
7449 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7450         /* This system (e.g. AIX) defaults detached; must override */
7451         pthread_attr_t attr;
7452
7453         status = pthread_attr_init(&attr);
7454         if( status ) exit( status );
7455
7456         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7457         if( status ) exit( status );
7458
7459 #define ATTR    &attr
7460 #else
7461 #if HAVE_PTHREADS_D4
7462 #define ATTR    pthread_attr_default
7463 #else
7464 #define ATTR    NULL
7465 #endif
7466 #endif
7467         /* make sure pthread_create() isn't just a stub */
7468         status = pthread_create(&t, ATTR, task, NULL);
7469         if( status ) exit( status );
7470
7471         /* make sure pthread_detach() isn't just a stub */
7472 #if HAVE_PTHREADS_D4
7473         status = pthread_detach( &t );
7474 #else
7475         status = pthread_detach( t );
7476 #endif
7477
7478 #ifdef HAVE_LINUX_THREADS
7479         pthread_kill_other_threads_np();
7480 #endif
7481
7482         exit( status );
7483
7484 }
7485
7486 EOF
7487 if { (eval echo configure:7488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7488 then
7489   ol_cv_pthread_create=yes
7490 else
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -fr conftest*
7494   ol_cv_pthread_create=no
7495 fi
7496 rm -fr conftest*
7497 fi
7498
7499 fi
7500
7501 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7502
7503                 if test $ol_cv_pthread_create != no ; then
7504                         ol_link_threads=posix
7505                         ol_link_pthreads=""
7506                 fi
7507                 
7508                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7509 if test "$ol_link_threads" = no ; then
7510         # try -kthread
7511         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7512 echo "configure:7513: checking for pthread link with -kthread" >&5
7513 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7514   echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7516   
7517                 # save the flags
7518                 ol_LIBS="$LIBS"
7519                 LIBS="-kthread $LIBS"
7520
7521                 if test "$cross_compiling" = yes; then
7522   cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525 /* pthread test headers */
7526 #include <pthread.h>
7527 #ifndef NULL
7528 #define NULL (void*)0
7529 #endif
7530
7531 static void *task(p)
7532         void *p;
7533 {
7534         return (void *) (p == NULL);
7535 }
7536
7537 int main() {
7538
7539         /* pthread test function */
7540         pthread_t t;
7541         int status;
7542 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7543         /* This system (e.g. AIX) defaults detached; must override */
7544         pthread_attr_t attr;
7545
7546         status = pthread_attr_init(&attr);
7547         if( status ) exit( status );
7548
7549         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7550         if( status ) exit( status );
7551
7552 #define ATTR    &attr
7553 #else
7554 #if HAVE_PTHREADS_D4
7555 #define ATTR    pthread_attr_default
7556 #else
7557 #define ATTR    NULL
7558 #endif
7559 #endif
7560         /* make sure pthread_create() isn't just a stub */
7561         status = pthread_create(&t, ATTR, task, NULL);
7562         if( status ) exit( status );
7563
7564         /* make sure pthread_detach() isn't just a stub */
7565 #if HAVE_PTHREADS_D4
7566         status = pthread_detach( &t );
7567 #else
7568         status = pthread_detach( t );
7569 #endif
7570
7571 #ifdef HAVE_LINUX_THREADS
7572         pthread_kill_other_threads_np();
7573 #endif
7574
7575         exit( status );
7576
7577 ; return 0; }
7578 EOF
7579 if { (eval echo configure:7580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7580   rm -rf conftest*
7581   ol_cv_pthread_kthread=yes
7582 else
7583   echo "configure: failed program was:" >&5
7584   cat conftest.$ac_ext >&5
7585   rm -rf conftest*
7586   ol_cv_pthread_kthread=no
7587 fi
7588 rm -f conftest*
7589 else
7590   cat > conftest.$ac_ext <<EOF
7591 #line 7592 "configure"
7592 #include "confdefs.h"
7593 /* pthread test headers */
7594 #include <pthread.h>
7595 #ifndef NULL
7596 #define NULL (void*)0
7597 #endif
7598
7599 static void *task(p)
7600         void *p;
7601 {
7602         return (void *) (p == NULL);
7603 }
7604
7605
7606 int main(argc, argv)
7607         int argc;
7608         char **argv;
7609 {
7610
7611         /* pthread test function */
7612         pthread_t t;
7613         int status;
7614 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7615         /* This system (e.g. AIX) defaults detached; must override */
7616         pthread_attr_t attr;
7617
7618         status = pthread_attr_init(&attr);
7619         if( status ) exit( status );
7620
7621         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7622         if( status ) exit( status );
7623
7624 #define ATTR    &attr
7625 #else
7626 #if HAVE_PTHREADS_D4
7627 #define ATTR    pthread_attr_default
7628 #else
7629 #define ATTR    NULL
7630 #endif
7631 #endif
7632         /* make sure pthread_create() isn't just a stub */
7633         status = pthread_create(&t, ATTR, task, NULL);
7634         if( status ) exit( status );
7635
7636         /* make sure pthread_detach() isn't just a stub */
7637 #if HAVE_PTHREADS_D4
7638         status = pthread_detach( &t );
7639 #else
7640         status = pthread_detach( t );
7641 #endif
7642
7643 #ifdef HAVE_LINUX_THREADS
7644         pthread_kill_other_threads_np();
7645 #endif
7646
7647         exit( status );
7648
7649 }
7650
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7653 then
7654   ol_cv_pthread_kthread=yes
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -fr conftest*
7659   ol_cv_pthread_kthread=no
7660 fi
7661 rm -fr conftest*
7662 fi
7663
7664
7665                 # restore the LIBS
7666                 LIBS="$ol_LIBS"
7667         
7668 fi
7669
7670 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7671
7672         if test $ol_cv_pthread_kthread = yes ; then
7673                 ol_link_pthreads="-kthread"
7674                 ol_link_threads=posix
7675         fi
7676 fi
7677
7678                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7679 if test "$ol_link_threads" = no ; then
7680         # try -pthread
7681         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7682 echo "configure:7683: checking for pthread link with -pthread" >&5
7683 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7684   echo $ac_n "(cached) $ac_c" 1>&6
7685 else
7686   
7687                 # save the flags
7688                 ol_LIBS="$LIBS"
7689                 LIBS="-pthread $LIBS"
7690
7691                 if test "$cross_compiling" = yes; then
7692   cat > conftest.$ac_ext <<EOF
7693 #line 7694 "configure"
7694 #include "confdefs.h"
7695 /* pthread test headers */
7696 #include <pthread.h>
7697 #ifndef NULL
7698 #define NULL (void*)0
7699 #endif
7700
7701 static void *task(p)
7702         void *p;
7703 {
7704         return (void *) (p == NULL);
7705 }
7706
7707 int main() {
7708
7709         /* pthread test function */
7710         pthread_t t;
7711         int status;
7712 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7713         /* This system (e.g. AIX) defaults detached; must override */
7714         pthread_attr_t attr;
7715
7716         status = pthread_attr_init(&attr);
7717         if( status ) exit( status );
7718
7719         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7720         if( status ) exit( status );
7721
7722 #define ATTR    &attr
7723 #else
7724 #if HAVE_PTHREADS_D4
7725 #define ATTR    pthread_attr_default
7726 #else
7727 #define ATTR    NULL
7728 #endif
7729 #endif
7730         /* make sure pthread_create() isn't just a stub */
7731         status = pthread_create(&t, ATTR, task, NULL);
7732         if( status ) exit( status );
7733
7734         /* make sure pthread_detach() isn't just a stub */
7735 #if HAVE_PTHREADS_D4
7736         status = pthread_detach( &t );
7737 #else
7738         status = pthread_detach( t );
7739 #endif
7740
7741 #ifdef HAVE_LINUX_THREADS
7742         pthread_kill_other_threads_np();
7743 #endif
7744
7745         exit( status );
7746
7747 ; return 0; }
7748 EOF
7749 if { (eval echo configure:7750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7750   rm -rf conftest*
7751   ol_cv_pthread_pthread=yes
7752 else
7753   echo "configure: failed program was:" >&5
7754   cat conftest.$ac_ext >&5
7755   rm -rf conftest*
7756   ol_cv_pthread_pthread=no
7757 fi
7758 rm -f conftest*
7759 else
7760   cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 /* pthread test headers */
7764 #include <pthread.h>
7765 #ifndef NULL
7766 #define NULL (void*)0
7767 #endif
7768
7769 static void *task(p)
7770         void *p;
7771 {
7772         return (void *) (p == NULL);
7773 }
7774
7775
7776 int main(argc, argv)
7777         int argc;
7778         char **argv;
7779 {
7780
7781         /* pthread test function */
7782         pthread_t t;
7783         int status;
7784 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7785         /* This system (e.g. AIX) defaults detached; must override */
7786         pthread_attr_t attr;
7787
7788         status = pthread_attr_init(&attr);
7789         if( status ) exit( status );
7790
7791         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7792         if( status ) exit( status );
7793
7794 #define ATTR    &attr
7795 #else
7796 #if HAVE_PTHREADS_D4
7797 #define ATTR    pthread_attr_default
7798 #else
7799 #define ATTR    NULL
7800 #endif
7801 #endif
7802         /* make sure pthread_create() isn't just a stub */
7803         status = pthread_create(&t, ATTR, task, NULL);
7804         if( status ) exit( status );
7805
7806         /* make sure pthread_detach() isn't just a stub */
7807 #if HAVE_PTHREADS_D4
7808         status = pthread_detach( &t );
7809 #else
7810         status = pthread_detach( t );
7811 #endif
7812
7813 #ifdef HAVE_LINUX_THREADS
7814         pthread_kill_other_threads_np();
7815 #endif
7816
7817         exit( status );
7818
7819 }
7820
7821 EOF
7822 if { (eval echo configure:7823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7823 then
7824   ol_cv_pthread_pthread=yes
7825 else
7826   echo "configure: failed program was:" >&5
7827   cat conftest.$ac_ext >&5
7828   rm -fr conftest*
7829   ol_cv_pthread_pthread=no
7830 fi
7831 rm -fr conftest*
7832 fi
7833
7834
7835                 # restore the LIBS
7836                 LIBS="$ol_LIBS"
7837         
7838 fi
7839
7840 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7841
7842         if test $ol_cv_pthread_pthread = yes ; then
7843                 ol_link_pthreads="-pthread"
7844                 ol_link_threads=posix
7845         fi
7846 fi
7847
7848                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7849 if test "$ol_link_threads" = no ; then
7850         # try -pthreads
7851         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7852 echo "configure:7853: checking for pthread link with -pthreads" >&5
7853 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7854   echo $ac_n "(cached) $ac_c" 1>&6
7855 else
7856   
7857                 # save the flags
7858                 ol_LIBS="$LIBS"
7859                 LIBS="-pthreads $LIBS"
7860
7861                 if test "$cross_compiling" = yes; then
7862   cat > conftest.$ac_ext <<EOF
7863 #line 7864 "configure"
7864 #include "confdefs.h"
7865 /* pthread test headers */
7866 #include <pthread.h>
7867 #ifndef NULL
7868 #define NULL (void*)0
7869 #endif
7870
7871 static void *task(p)
7872         void *p;
7873 {
7874         return (void *) (p == NULL);
7875 }
7876
7877 int main() {
7878
7879         /* pthread test function */
7880         pthread_t t;
7881         int status;
7882 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7883         /* This system (e.g. AIX) defaults detached; must override */
7884         pthread_attr_t attr;
7885
7886         status = pthread_attr_init(&attr);
7887         if( status ) exit( status );
7888
7889         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7890         if( status ) exit( status );
7891
7892 #define ATTR    &attr
7893 #else
7894 #if HAVE_PTHREADS_D4
7895 #define ATTR    pthread_attr_default
7896 #else
7897 #define ATTR    NULL
7898 #endif
7899 #endif
7900         /* make sure pthread_create() isn't just a stub */
7901         status = pthread_create(&t, ATTR, task, NULL);
7902         if( status ) exit( status );
7903
7904         /* make sure pthread_detach() isn't just a stub */
7905 #if HAVE_PTHREADS_D4
7906         status = pthread_detach( &t );
7907 #else
7908         status = pthread_detach( t );
7909 #endif
7910
7911 #ifdef HAVE_LINUX_THREADS
7912         pthread_kill_other_threads_np();
7913 #endif
7914
7915         exit( status );
7916
7917 ; return 0; }
7918 EOF
7919 if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7920   rm -rf conftest*
7921   ol_cv_pthread_pthreads=yes
7922 else
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -rf conftest*
7926   ol_cv_pthread_pthreads=no
7927 fi
7928 rm -f conftest*
7929 else
7930   cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 /* pthread test headers */
7934 #include <pthread.h>
7935 #ifndef NULL
7936 #define NULL (void*)0
7937 #endif
7938
7939 static void *task(p)
7940         void *p;
7941 {
7942         return (void *) (p == NULL);
7943 }
7944
7945
7946 int main(argc, argv)
7947         int argc;
7948         char **argv;
7949 {
7950
7951         /* pthread test function */
7952         pthread_t t;
7953         int status;
7954 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7955         /* This system (e.g. AIX) defaults detached; must override */
7956         pthread_attr_t attr;
7957
7958         status = pthread_attr_init(&attr);
7959         if( status ) exit( status );
7960
7961         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7962         if( status ) exit( status );
7963
7964 #define ATTR    &attr
7965 #else
7966 #if HAVE_PTHREADS_D4
7967 #define ATTR    pthread_attr_default
7968 #else
7969 #define ATTR    NULL
7970 #endif
7971 #endif
7972         /* make sure pthread_create() isn't just a stub */
7973         status = pthread_create(&t, ATTR, task, NULL);
7974         if( status ) exit( status );
7975
7976         /* make sure pthread_detach() isn't just a stub */
7977 #if HAVE_PTHREADS_D4
7978         status = pthread_detach( &t );
7979 #else
7980         status = pthread_detach( t );
7981 #endif
7982
7983 #ifdef HAVE_LINUX_THREADS
7984         pthread_kill_other_threads_np();
7985 #endif
7986
7987         exit( status );
7988
7989 }
7990
7991 EOF
7992 if { (eval echo configure:7993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7993 then
7994   ol_cv_pthread_pthreads=yes
7995 else
7996   echo "configure: failed program was:" >&5
7997   cat conftest.$ac_ext >&5
7998   rm -fr conftest*
7999   ol_cv_pthread_pthreads=no
8000 fi
8001 rm -fr conftest*
8002 fi
8003
8004
8005                 # restore the LIBS
8006                 LIBS="$ol_LIBS"
8007         
8008 fi
8009
8010 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8011
8012         if test $ol_cv_pthread_pthreads = yes ; then
8013                 ol_link_pthreads="-pthreads"
8014                 ol_link_threads=posix
8015         fi
8016 fi
8017
8018                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8019 if test "$ol_link_threads" = no ; then
8020         # try -mthreads
8021         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8022 echo "configure:8023: checking for pthread link with -mthreads" >&5
8023 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8024   echo $ac_n "(cached) $ac_c" 1>&6
8025 else
8026   
8027                 # save the flags
8028                 ol_LIBS="$LIBS"
8029                 LIBS="-mthreads $LIBS"
8030
8031                 if test "$cross_compiling" = yes; then
8032   cat > conftest.$ac_ext <<EOF
8033 #line 8034 "configure"
8034 #include "confdefs.h"
8035 /* pthread test headers */
8036 #include <pthread.h>
8037 #ifndef NULL
8038 #define NULL (void*)0
8039 #endif
8040
8041 static void *task(p)
8042         void *p;
8043 {
8044         return (void *) (p == NULL);
8045 }
8046
8047 int main() {
8048
8049         /* pthread test function */
8050         pthread_t t;
8051         int status;
8052 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8053         /* This system (e.g. AIX) defaults detached; must override */
8054         pthread_attr_t attr;
8055
8056         status = pthread_attr_init(&attr);
8057         if( status ) exit( status );
8058
8059         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8060         if( status ) exit( status );
8061
8062 #define ATTR    &attr
8063 #else
8064 #if HAVE_PTHREADS_D4
8065 #define ATTR    pthread_attr_default
8066 #else
8067 #define ATTR    NULL
8068 #endif
8069 #endif
8070         /* make sure pthread_create() isn't just a stub */
8071         status = pthread_create(&t, ATTR, task, NULL);
8072         if( status ) exit( status );
8073
8074         /* make sure pthread_detach() isn't just a stub */
8075 #if HAVE_PTHREADS_D4
8076         status = pthread_detach( &t );
8077 #else
8078         status = pthread_detach( t );
8079 #endif
8080
8081 #ifdef HAVE_LINUX_THREADS
8082         pthread_kill_other_threads_np();
8083 #endif
8084
8085         exit( status );
8086
8087 ; return 0; }
8088 EOF
8089 if { (eval echo configure:8090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8090   rm -rf conftest*
8091   ol_cv_pthread_mthreads=yes
8092 else
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   ol_cv_pthread_mthreads=no
8097 fi
8098 rm -f conftest*
8099 else
8100   cat > conftest.$ac_ext <<EOF
8101 #line 8102 "configure"
8102 #include "confdefs.h"
8103 /* pthread test headers */
8104 #include <pthread.h>
8105 #ifndef NULL
8106 #define NULL (void*)0
8107 #endif
8108
8109 static void *task(p)
8110         void *p;
8111 {
8112         return (void *) (p == NULL);
8113 }
8114
8115
8116 int main(argc, argv)
8117         int argc;
8118         char **argv;
8119 {
8120
8121         /* pthread test function */
8122         pthread_t t;
8123         int status;
8124 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8125         /* This system (e.g. AIX) defaults detached; must override */
8126         pthread_attr_t attr;
8127
8128         status = pthread_attr_init(&attr);
8129         if( status ) exit( status );
8130
8131         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8132         if( status ) exit( status );
8133
8134 #define ATTR    &attr
8135 #else
8136 #if HAVE_PTHREADS_D4
8137 #define ATTR    pthread_attr_default
8138 #else
8139 #define ATTR    NULL
8140 #endif
8141 #endif
8142         /* make sure pthread_create() isn't just a stub */
8143         status = pthread_create(&t, ATTR, task, NULL);
8144         if( status ) exit( status );
8145
8146         /* make sure pthread_detach() isn't just a stub */
8147 #if HAVE_PTHREADS_D4
8148         status = pthread_detach( &t );
8149 #else
8150         status = pthread_detach( t );
8151 #endif
8152
8153 #ifdef HAVE_LINUX_THREADS
8154         pthread_kill_other_threads_np();
8155 #endif
8156
8157         exit( status );
8158
8159 }
8160
8161 EOF
8162 if { (eval echo configure:8163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8163 then
8164   ol_cv_pthread_mthreads=yes
8165 else
8166   echo "configure: failed program was:" >&5
8167   cat conftest.$ac_ext >&5
8168   rm -fr conftest*
8169   ol_cv_pthread_mthreads=no
8170 fi
8171 rm -fr conftest*
8172 fi
8173
8174
8175                 # restore the LIBS
8176                 LIBS="$ol_LIBS"
8177         
8178 fi
8179
8180 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8181
8182         if test $ol_cv_pthread_mthreads = yes ; then
8183                 ol_link_pthreads="-mthreads"
8184                 ol_link_threads=posix
8185         fi
8186 fi
8187
8188                 # Pthread try link: -thread (ol_cv_pthread_thread)
8189 if test "$ol_link_threads" = no ; then
8190         # try -thread
8191         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8192 echo "configure:8193: checking for pthread link with -thread" >&5
8193 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   
8197                 # save the flags
8198                 ol_LIBS="$LIBS"
8199                 LIBS="-thread $LIBS"
8200
8201                 if test "$cross_compiling" = yes; then
8202   cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* pthread test headers */
8206 #include <pthread.h>
8207 #ifndef NULL
8208 #define NULL (void*)0
8209 #endif
8210
8211 static void *task(p)
8212         void *p;
8213 {
8214         return (void *) (p == NULL);
8215 }
8216
8217 int main() {
8218
8219         /* pthread test function */
8220         pthread_t t;
8221         int status;
8222 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8223         /* This system (e.g. AIX) defaults detached; must override */
8224         pthread_attr_t attr;
8225
8226         status = pthread_attr_init(&attr);
8227         if( status ) exit( status );
8228
8229         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8230         if( status ) exit( status );
8231
8232 #define ATTR    &attr
8233 #else
8234 #if HAVE_PTHREADS_D4
8235 #define ATTR    pthread_attr_default
8236 #else
8237 #define ATTR    NULL
8238 #endif
8239 #endif
8240         /* make sure pthread_create() isn't just a stub */
8241         status = pthread_create(&t, ATTR, task, NULL);
8242         if( status ) exit( status );
8243
8244         /* make sure pthread_detach() isn't just a stub */
8245 #if HAVE_PTHREADS_D4
8246         status = pthread_detach( &t );
8247 #else
8248         status = pthread_detach( t );
8249 #endif
8250
8251 #ifdef HAVE_LINUX_THREADS
8252         pthread_kill_other_threads_np();
8253 #endif
8254
8255         exit( status );
8256
8257 ; return 0; }
8258 EOF
8259 if { (eval echo configure:8260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8260   rm -rf conftest*
8261   ol_cv_pthread_thread=yes
8262 else
8263   echo "configure: failed program was:" >&5
8264   cat conftest.$ac_ext >&5
8265   rm -rf conftest*
8266   ol_cv_pthread_thread=no
8267 fi
8268 rm -f conftest*
8269 else
8270   cat > conftest.$ac_ext <<EOF
8271 #line 8272 "configure"
8272 #include "confdefs.h"
8273 /* pthread test headers */
8274 #include <pthread.h>
8275 #ifndef NULL
8276 #define NULL (void*)0
8277 #endif
8278
8279 static void *task(p)
8280         void *p;
8281 {
8282         return (void *) (p == NULL);
8283 }
8284
8285
8286 int main(argc, argv)
8287         int argc;
8288         char **argv;
8289 {
8290
8291         /* pthread test function */
8292         pthread_t t;
8293         int status;
8294 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8295         /* This system (e.g. AIX) defaults detached; must override */
8296         pthread_attr_t attr;
8297
8298         status = pthread_attr_init(&attr);
8299         if( status ) exit( status );
8300
8301         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8302         if( status ) exit( status );
8303
8304 #define ATTR    &attr
8305 #else
8306 #if HAVE_PTHREADS_D4
8307 #define ATTR    pthread_attr_default
8308 #else
8309 #define ATTR    NULL
8310 #endif
8311 #endif
8312         /* make sure pthread_create() isn't just a stub */
8313         status = pthread_create(&t, ATTR, task, NULL);
8314         if( status ) exit( status );
8315
8316         /* make sure pthread_detach() isn't just a stub */
8317 #if HAVE_PTHREADS_D4
8318         status = pthread_detach( &t );
8319 #else
8320         status = pthread_detach( t );
8321 #endif
8322
8323 #ifdef HAVE_LINUX_THREADS
8324         pthread_kill_other_threads_np();
8325 #endif
8326
8327         exit( status );
8328
8329 }
8330
8331 EOF
8332 if { (eval echo configure:8333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8333 then
8334   ol_cv_pthread_thread=yes
8335 else
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -fr conftest*
8339   ol_cv_pthread_thread=no
8340 fi
8341 rm -fr conftest*
8342 fi
8343
8344
8345                 # restore the LIBS
8346                 LIBS="$ol_LIBS"
8347         
8348 fi
8349
8350 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8351
8352         if test $ol_cv_pthread_thread = yes ; then
8353                 ol_link_pthreads="-thread"
8354                 ol_link_threads=posix
8355         fi
8356 fi
8357
8358
8359                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8360 if test "$ol_link_threads" = no ; then
8361         # try -lpthread -lmach -lexc -lc_r
8362         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8363 echo "configure:8364: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8364 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   
8368                 # save the flags
8369                 ol_LIBS="$LIBS"
8370                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8371
8372                 if test "$cross_compiling" = yes; then
8373   cat > conftest.$ac_ext <<EOF
8374 #line 8375 "configure"
8375 #include "confdefs.h"
8376 /* pthread test headers */
8377 #include <pthread.h>
8378 #ifndef NULL
8379 #define NULL (void*)0
8380 #endif
8381
8382 static void *task(p)
8383         void *p;
8384 {
8385         return (void *) (p == NULL);
8386 }
8387
8388 int main() {
8389
8390         /* pthread test function */
8391         pthread_t t;
8392         int status;
8393 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8394         /* This system (e.g. AIX) defaults detached; must override */
8395         pthread_attr_t attr;
8396
8397         status = pthread_attr_init(&attr);
8398         if( status ) exit( status );
8399
8400         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8401         if( status ) exit( status );
8402
8403 #define ATTR    &attr
8404 #else
8405 #if HAVE_PTHREADS_D4
8406 #define ATTR    pthread_attr_default
8407 #else
8408 #define ATTR    NULL
8409 #endif
8410 #endif
8411         /* make sure pthread_create() isn't just a stub */
8412         status = pthread_create(&t, ATTR, task, NULL);
8413         if( status ) exit( status );
8414
8415         /* make sure pthread_detach() isn't just a stub */
8416 #if HAVE_PTHREADS_D4
8417         status = pthread_detach( &t );
8418 #else
8419         status = pthread_detach( t );
8420 #endif
8421
8422 #ifdef HAVE_LINUX_THREADS
8423         pthread_kill_other_threads_np();
8424 #endif
8425
8426         exit( status );
8427
8428 ; return 0; }
8429 EOF
8430 if { (eval echo configure:8431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8431   rm -rf conftest*
8432   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8433 else
8434   echo "configure: failed program was:" >&5
8435   cat conftest.$ac_ext >&5
8436   rm -rf conftest*
8437   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8438 fi
8439 rm -f conftest*
8440 else
8441   cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 /* pthread test headers */
8445 #include <pthread.h>
8446 #ifndef NULL
8447 #define NULL (void*)0
8448 #endif
8449
8450 static void *task(p)
8451         void *p;
8452 {
8453         return (void *) (p == NULL);
8454 }
8455
8456
8457 int main(argc, argv)
8458         int argc;
8459         char **argv;
8460 {
8461
8462         /* pthread test function */
8463         pthread_t t;
8464         int status;
8465 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8466         /* This system (e.g. AIX) defaults detached; must override */
8467         pthread_attr_t attr;
8468
8469         status = pthread_attr_init(&attr);
8470         if( status ) exit( status );
8471
8472         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8473         if( status ) exit( status );
8474
8475 #define ATTR    &attr
8476 #else
8477 #if HAVE_PTHREADS_D4
8478 #define ATTR    pthread_attr_default
8479 #else
8480 #define ATTR    NULL
8481 #endif
8482 #endif
8483         /* make sure pthread_create() isn't just a stub */
8484         status = pthread_create(&t, ATTR, task, NULL);
8485         if( status ) exit( status );
8486
8487         /* make sure pthread_detach() isn't just a stub */
8488 #if HAVE_PTHREADS_D4
8489         status = pthread_detach( &t );
8490 #else
8491         status = pthread_detach( t );
8492 #endif
8493
8494 #ifdef HAVE_LINUX_THREADS
8495         pthread_kill_other_threads_np();
8496 #endif
8497
8498         exit( status );
8499
8500 }
8501
8502 EOF
8503 if { (eval echo configure:8504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8504 then
8505   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8506 else
8507   echo "configure: failed program was:" >&5
8508   cat conftest.$ac_ext >&5
8509   rm -fr conftest*
8510   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8511 fi
8512 rm -fr conftest*
8513 fi
8514
8515
8516                 # restore the LIBS
8517                 LIBS="$ol_LIBS"
8518         
8519 fi
8520
8521 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8522
8523         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8524                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8525                 ol_link_threads=posix
8526         fi
8527 fi
8528
8529                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8530 if test "$ol_link_threads" = no ; then
8531         # try -lpthread -lmach -lexc
8532         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8533 echo "configure:8534: checking for pthread link with -lpthread -lmach -lexc" >&5
8534 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8535   echo $ac_n "(cached) $ac_c" 1>&6
8536 else
8537   
8538                 # save the flags
8539                 ol_LIBS="$LIBS"
8540                 LIBS="-lpthread -lmach -lexc $LIBS"
8541
8542                 if test "$cross_compiling" = yes; then
8543   cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* pthread test headers */
8547 #include <pthread.h>
8548 #ifndef NULL
8549 #define NULL (void*)0
8550 #endif
8551
8552 static void *task(p)
8553         void *p;
8554 {
8555         return (void *) (p == NULL);
8556 }
8557
8558 int main() {
8559
8560         /* pthread test function */
8561         pthread_t t;
8562         int status;
8563 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8564         /* This system (e.g. AIX) defaults detached; must override */
8565         pthread_attr_t attr;
8566
8567         status = pthread_attr_init(&attr);
8568         if( status ) exit( status );
8569
8570         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8571         if( status ) exit( status );
8572
8573 #define ATTR    &attr
8574 #else
8575 #if HAVE_PTHREADS_D4
8576 #define ATTR    pthread_attr_default
8577 #else
8578 #define ATTR    NULL
8579 #endif
8580 #endif
8581         /* make sure pthread_create() isn't just a stub */
8582         status = pthread_create(&t, ATTR, task, NULL);
8583         if( status ) exit( status );
8584
8585         /* make sure pthread_detach() isn't just a stub */
8586 #if HAVE_PTHREADS_D4
8587         status = pthread_detach( &t );
8588 #else
8589         status = pthread_detach( t );
8590 #endif
8591
8592 #ifdef HAVE_LINUX_THREADS
8593         pthread_kill_other_threads_np();
8594 #endif
8595
8596         exit( status );
8597
8598 ; return 0; }
8599 EOF
8600 if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8601   rm -rf conftest*
8602   ol_cv_pthread_lpthread_lmach_lexc=yes
8603 else
8604   echo "configure: failed program was:" >&5
8605   cat conftest.$ac_ext >&5
8606   rm -rf conftest*
8607   ol_cv_pthread_lpthread_lmach_lexc=no
8608 fi
8609 rm -f conftest*
8610 else
8611   cat > conftest.$ac_ext <<EOF
8612 #line 8613 "configure"
8613 #include "confdefs.h"
8614 /* pthread test headers */
8615 #include <pthread.h>
8616 #ifndef NULL
8617 #define NULL (void*)0
8618 #endif
8619
8620 static void *task(p)
8621         void *p;
8622 {
8623         return (void *) (p == NULL);
8624 }
8625
8626
8627 int main(argc, argv)
8628         int argc;
8629         char **argv;
8630 {
8631
8632         /* pthread test function */
8633         pthread_t t;
8634         int status;
8635 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8636         /* This system (e.g. AIX) defaults detached; must override */
8637         pthread_attr_t attr;
8638
8639         status = pthread_attr_init(&attr);
8640         if( status ) exit( status );
8641
8642         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8643         if( status ) exit( status );
8644
8645 #define ATTR    &attr
8646 #else
8647 #if HAVE_PTHREADS_D4
8648 #define ATTR    pthread_attr_default
8649 #else
8650 #define ATTR    NULL
8651 #endif
8652 #endif
8653         /* make sure pthread_create() isn't just a stub */
8654         status = pthread_create(&t, ATTR, task, NULL);
8655         if( status ) exit( status );
8656
8657         /* make sure pthread_detach() isn't just a stub */
8658 #if HAVE_PTHREADS_D4
8659         status = pthread_detach( &t );
8660 #else
8661         status = pthread_detach( t );
8662 #endif
8663
8664 #ifdef HAVE_LINUX_THREADS
8665         pthread_kill_other_threads_np();
8666 #endif
8667
8668         exit( status );
8669
8670 }
8671
8672 EOF
8673 if { (eval echo configure:8674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8674 then
8675   ol_cv_pthread_lpthread_lmach_lexc=yes
8676 else
8677   echo "configure: failed program was:" >&5
8678   cat conftest.$ac_ext >&5
8679   rm -fr conftest*
8680   ol_cv_pthread_lpthread_lmach_lexc=no
8681 fi
8682 rm -fr conftest*
8683 fi
8684
8685
8686                 # restore the LIBS
8687                 LIBS="$ol_LIBS"
8688         
8689 fi
8690
8691 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8692
8693         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8694                 ol_link_pthreads="-lpthread -lmach -lexc"
8695                 ol_link_threads=posix
8696         fi
8697 fi
8698
8699
8700                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8701 if test "$ol_link_threads" = no ; then
8702         # try -lpthread -Wl,-woff,85
8703         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8704 echo "configure:8705: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8705 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8706   echo $ac_n "(cached) $ac_c" 1>&6
8707 else
8708   
8709                 # save the flags
8710                 ol_LIBS="$LIBS"
8711                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8712
8713                 if test "$cross_compiling" = yes; then
8714   cat > conftest.$ac_ext <<EOF
8715 #line 8716 "configure"
8716 #include "confdefs.h"
8717 /* pthread test headers */
8718 #include <pthread.h>
8719 #ifndef NULL
8720 #define NULL (void*)0
8721 #endif
8722
8723 static void *task(p)
8724         void *p;
8725 {
8726         return (void *) (p == NULL);
8727 }
8728
8729 int main() {
8730
8731         /* pthread test function */
8732         pthread_t t;
8733         int status;
8734 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8735         /* This system (e.g. AIX) defaults detached; must override */
8736         pthread_attr_t attr;
8737
8738         status = pthread_attr_init(&attr);
8739         if( status ) exit( status );
8740
8741         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8742         if( status ) exit( status );
8743
8744 #define ATTR    &attr
8745 #else
8746 #if HAVE_PTHREADS_D4
8747 #define ATTR    pthread_attr_default
8748 #else
8749 #define ATTR    NULL
8750 #endif
8751 #endif
8752         /* make sure pthread_create() isn't just a stub */
8753         status = pthread_create(&t, ATTR, task, NULL);
8754         if( status ) exit( status );
8755
8756         /* make sure pthread_detach() isn't just a stub */
8757 #if HAVE_PTHREADS_D4
8758         status = pthread_detach( &t );
8759 #else
8760         status = pthread_detach( t );
8761 #endif
8762
8763 #ifdef HAVE_LINUX_THREADS
8764         pthread_kill_other_threads_np();
8765 #endif
8766
8767         exit( status );
8768
8769 ; return 0; }
8770 EOF
8771 if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8772   rm -rf conftest*
8773   ol_cv_pthread_lib_lpthread_woff=yes
8774 else
8775   echo "configure: failed program was:" >&5
8776   cat conftest.$ac_ext >&5
8777   rm -rf conftest*
8778   ol_cv_pthread_lib_lpthread_woff=no
8779 fi
8780 rm -f conftest*
8781 else
8782   cat > conftest.$ac_ext <<EOF
8783 #line 8784 "configure"
8784 #include "confdefs.h"
8785 /* pthread test headers */
8786 #include <pthread.h>
8787 #ifndef NULL
8788 #define NULL (void*)0
8789 #endif
8790
8791 static void *task(p)
8792         void *p;
8793 {
8794         return (void *) (p == NULL);
8795 }
8796
8797
8798 int main(argc, argv)
8799         int argc;
8800         char **argv;
8801 {
8802
8803         /* pthread test function */
8804         pthread_t t;
8805         int status;
8806 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8807         /* This system (e.g. AIX) defaults detached; must override */
8808         pthread_attr_t attr;
8809
8810         status = pthread_attr_init(&attr);
8811         if( status ) exit( status );
8812
8813         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8814         if( status ) exit( status );
8815
8816 #define ATTR    &attr
8817 #else
8818 #if HAVE_PTHREADS_D4
8819 #define ATTR    pthread_attr_default
8820 #else
8821 #define ATTR    NULL
8822 #endif
8823 #endif
8824         /* make sure pthread_create() isn't just a stub */
8825         status = pthread_create(&t, ATTR, task, NULL);
8826         if( status ) exit( status );
8827
8828         /* make sure pthread_detach() isn't just a stub */
8829 #if HAVE_PTHREADS_D4
8830         status = pthread_detach( &t );
8831 #else
8832         status = pthread_detach( t );
8833 #endif
8834
8835 #ifdef HAVE_LINUX_THREADS
8836         pthread_kill_other_threads_np();
8837 #endif
8838
8839         exit( status );
8840
8841 }
8842
8843 EOF
8844 if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8845 then
8846   ol_cv_pthread_lib_lpthread_woff=yes
8847 else
8848   echo "configure: failed program was:" >&5
8849   cat conftest.$ac_ext >&5
8850   rm -fr conftest*
8851   ol_cv_pthread_lib_lpthread_woff=no
8852 fi
8853 rm -fr conftest*
8854 fi
8855
8856
8857                 # restore the LIBS
8858                 LIBS="$ol_LIBS"
8859         
8860 fi
8861
8862 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8863
8864         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8865                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8866                 ol_link_threads=posix
8867         fi
8868 fi
8869
8870
8871                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8872 if test "$ol_link_threads" = no ; then
8873         # try -lpthread
8874         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8875 echo "configure:8876: checking for pthread link with -lpthread" >&5
8876 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8877   echo $ac_n "(cached) $ac_c" 1>&6
8878 else
8879   
8880                 # save the flags
8881                 ol_LIBS="$LIBS"
8882                 LIBS="-lpthread $LIBS"
8883
8884                 if test "$cross_compiling" = yes; then
8885   cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 /* pthread test headers */
8889 #include <pthread.h>
8890 #ifndef NULL
8891 #define NULL (void*)0
8892 #endif
8893
8894 static void *task(p)
8895         void *p;
8896 {
8897         return (void *) (p == NULL);
8898 }
8899
8900 int main() {
8901
8902         /* pthread test function */
8903         pthread_t t;
8904         int status;
8905 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8906         /* This system (e.g. AIX) defaults detached; must override */
8907         pthread_attr_t attr;
8908
8909         status = pthread_attr_init(&attr);
8910         if( status ) exit( status );
8911
8912         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8913         if( status ) exit( status );
8914
8915 #define ATTR    &attr
8916 #else
8917 #if HAVE_PTHREADS_D4
8918 #define ATTR    pthread_attr_default
8919 #else
8920 #define ATTR    NULL
8921 #endif
8922 #endif
8923         /* make sure pthread_create() isn't just a stub */
8924         status = pthread_create(&t, ATTR, task, NULL);
8925         if( status ) exit( status );
8926
8927         /* make sure pthread_detach() isn't just a stub */
8928 #if HAVE_PTHREADS_D4
8929         status = pthread_detach( &t );
8930 #else
8931         status = pthread_detach( t );
8932 #endif
8933
8934 #ifdef HAVE_LINUX_THREADS
8935         pthread_kill_other_threads_np();
8936 #endif
8937
8938         exit( status );
8939
8940 ; return 0; }
8941 EOF
8942 if { (eval echo configure:8943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8943   rm -rf conftest*
8944   ol_cv_pthread_lpthread=yes
8945 else
8946   echo "configure: failed program was:" >&5
8947   cat conftest.$ac_ext >&5
8948   rm -rf conftest*
8949   ol_cv_pthread_lpthread=no
8950 fi
8951 rm -f conftest*
8952 else
8953   cat > conftest.$ac_ext <<EOF
8954 #line 8955 "configure"
8955 #include "confdefs.h"
8956 /* pthread test headers */
8957 #include <pthread.h>
8958 #ifndef NULL
8959 #define NULL (void*)0
8960 #endif
8961
8962 static void *task(p)
8963         void *p;
8964 {
8965         return (void *) (p == NULL);
8966 }
8967
8968
8969 int main(argc, argv)
8970         int argc;
8971         char **argv;
8972 {
8973
8974         /* pthread test function */
8975         pthread_t t;
8976         int status;
8977 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8978         /* This system (e.g. AIX) defaults detached; must override */
8979         pthread_attr_t attr;
8980
8981         status = pthread_attr_init(&attr);
8982         if( status ) exit( status );
8983
8984         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8985         if( status ) exit( status );
8986
8987 #define ATTR    &attr
8988 #else
8989 #if HAVE_PTHREADS_D4
8990 #define ATTR    pthread_attr_default
8991 #else
8992 #define ATTR    NULL
8993 #endif
8994 #endif
8995         /* make sure pthread_create() isn't just a stub */
8996         status = pthread_create(&t, ATTR, task, NULL);
8997         if( status ) exit( status );
8998
8999         /* make sure pthread_detach() isn't just a stub */
9000 #if HAVE_PTHREADS_D4
9001         status = pthread_detach( &t );
9002 #else
9003         status = pthread_detach( t );
9004 #endif
9005
9006 #ifdef HAVE_LINUX_THREADS
9007         pthread_kill_other_threads_np();
9008 #endif
9009
9010         exit( status );
9011
9012 }
9013
9014 EOF
9015 if { (eval echo configure:9016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9016 then
9017   ol_cv_pthread_lpthread=yes
9018 else
9019   echo "configure: failed program was:" >&5
9020   cat conftest.$ac_ext >&5
9021   rm -fr conftest*
9022   ol_cv_pthread_lpthread=no
9023 fi
9024 rm -fr conftest*
9025 fi
9026
9027
9028                 # restore the LIBS
9029                 LIBS="$ol_LIBS"
9030         
9031 fi
9032
9033 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9034
9035         if test $ol_cv_pthread_lpthread = yes ; then
9036                 ol_link_pthreads="-lpthread"
9037                 ol_link_threads=posix
9038         fi
9039 fi
9040
9041                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9042 if test "$ol_link_threads" = no ; then
9043         # try -lc_r
9044         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9045 echo "configure:9046: checking for pthread link with -lc_r" >&5
9046 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9047   echo $ac_n "(cached) $ac_c" 1>&6
9048 else
9049   
9050                 # save the flags
9051                 ol_LIBS="$LIBS"
9052                 LIBS="-lc_r $LIBS"
9053
9054                 if test "$cross_compiling" = yes; then
9055   cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058 /* pthread test headers */
9059 #include <pthread.h>
9060 #ifndef NULL
9061 #define NULL (void*)0
9062 #endif
9063
9064 static void *task(p)
9065         void *p;
9066 {
9067         return (void *) (p == NULL);
9068 }
9069
9070 int main() {
9071
9072         /* pthread test function */
9073         pthread_t t;
9074         int status;
9075 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9076         /* This system (e.g. AIX) defaults detached; must override */
9077         pthread_attr_t attr;
9078
9079         status = pthread_attr_init(&attr);
9080         if( status ) exit( status );
9081
9082         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9083         if( status ) exit( status );
9084
9085 #define ATTR    &attr
9086 #else
9087 #if HAVE_PTHREADS_D4
9088 #define ATTR    pthread_attr_default
9089 #else
9090 #define ATTR    NULL
9091 #endif
9092 #endif
9093         /* make sure pthread_create() isn't just a stub */
9094         status = pthread_create(&t, ATTR, task, NULL);
9095         if( status ) exit( status );
9096
9097         /* make sure pthread_detach() isn't just a stub */
9098 #if HAVE_PTHREADS_D4
9099         status = pthread_detach( &t );
9100 #else
9101         status = pthread_detach( t );
9102 #endif
9103
9104 #ifdef HAVE_LINUX_THREADS
9105         pthread_kill_other_threads_np();
9106 #endif
9107
9108         exit( status );
9109
9110 ; return 0; }
9111 EOF
9112 if { (eval echo configure:9113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9113   rm -rf conftest*
9114   ol_cv_pthread_lc_r=yes
9115 else
9116   echo "configure: failed program was:" >&5
9117   cat conftest.$ac_ext >&5
9118   rm -rf conftest*
9119   ol_cv_pthread_lc_r=no
9120 fi
9121 rm -f conftest*
9122 else
9123   cat > conftest.$ac_ext <<EOF
9124 #line 9125 "configure"
9125 #include "confdefs.h"
9126 /* pthread test headers */
9127 #include <pthread.h>
9128 #ifndef NULL
9129 #define NULL (void*)0
9130 #endif
9131
9132 static void *task(p)
9133         void *p;
9134 {
9135         return (void *) (p == NULL);
9136 }
9137
9138
9139 int main(argc, argv)
9140         int argc;
9141         char **argv;
9142 {
9143
9144         /* pthread test function */
9145         pthread_t t;
9146         int status;
9147 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9148         /* This system (e.g. AIX) defaults detached; must override */
9149         pthread_attr_t attr;
9150
9151         status = pthread_attr_init(&attr);
9152         if( status ) exit( status );
9153
9154         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9155         if( status ) exit( status );
9156
9157 #define ATTR    &attr
9158 #else
9159 #if HAVE_PTHREADS_D4
9160 #define ATTR    pthread_attr_default
9161 #else
9162 #define ATTR    NULL
9163 #endif
9164 #endif
9165         /* make sure pthread_create() isn't just a stub */
9166         status = pthread_create(&t, ATTR, task, NULL);
9167         if( status ) exit( status );
9168
9169         /* make sure pthread_detach() isn't just a stub */
9170 #if HAVE_PTHREADS_D4
9171         status = pthread_detach( &t );
9172 #else
9173         status = pthread_detach( t );
9174 #endif
9175
9176 #ifdef HAVE_LINUX_THREADS
9177         pthread_kill_other_threads_np();
9178 #endif
9179
9180         exit( status );
9181
9182 }
9183
9184 EOF
9185 if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9186 then
9187   ol_cv_pthread_lc_r=yes
9188 else
9189   echo "configure: failed program was:" >&5
9190   cat conftest.$ac_ext >&5
9191   rm -fr conftest*
9192   ol_cv_pthread_lc_r=no
9193 fi
9194 rm -fr conftest*
9195 fi
9196
9197
9198                 # restore the LIBS
9199                 LIBS="$ol_LIBS"
9200         
9201 fi
9202
9203 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9204
9205         if test $ol_cv_pthread_lc_r = yes ; then
9206                 ol_link_pthreads="-lc_r"
9207                 ol_link_threads=posix
9208         fi
9209 fi
9210
9211
9212                 # Pthread try link: -threads (ol_cv_pthread_threads)
9213 if test "$ol_link_threads" = no ; then
9214         # try -threads
9215         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9216 echo "configure:9217: checking for pthread link with -threads" >&5
9217 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9218   echo $ac_n "(cached) $ac_c" 1>&6
9219 else
9220   
9221                 # save the flags
9222                 ol_LIBS="$LIBS"
9223                 LIBS="-threads $LIBS"
9224
9225                 if test "$cross_compiling" = yes; then
9226   cat > conftest.$ac_ext <<EOF
9227 #line 9228 "configure"
9228 #include "confdefs.h"
9229 /* pthread test headers */
9230 #include <pthread.h>
9231 #ifndef NULL
9232 #define NULL (void*)0
9233 #endif
9234
9235 static void *task(p)
9236         void *p;
9237 {
9238         return (void *) (p == NULL);
9239 }
9240
9241 int main() {
9242
9243         /* pthread test function */
9244         pthread_t t;
9245         int status;
9246 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9247         /* This system (e.g. AIX) defaults detached; must override */
9248         pthread_attr_t attr;
9249
9250         status = pthread_attr_init(&attr);
9251         if( status ) exit( status );
9252
9253         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9254         if( status ) exit( status );
9255
9256 #define ATTR    &attr
9257 #else
9258 #if HAVE_PTHREADS_D4
9259 #define ATTR    pthread_attr_default
9260 #else
9261 #define ATTR    NULL
9262 #endif
9263 #endif
9264         /* make sure pthread_create() isn't just a stub */
9265         status = pthread_create(&t, ATTR, task, NULL);
9266         if( status ) exit( status );
9267
9268         /* make sure pthread_detach() isn't just a stub */
9269 #if HAVE_PTHREADS_D4
9270         status = pthread_detach( &t );
9271 #else
9272         status = pthread_detach( t );
9273 #endif
9274
9275 #ifdef HAVE_LINUX_THREADS
9276         pthread_kill_other_threads_np();
9277 #endif
9278
9279         exit( status );
9280
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9284   rm -rf conftest*
9285   ol_cv_pthread_threads=yes
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   ol_cv_pthread_threads=no
9291 fi
9292 rm -f conftest*
9293 else
9294   cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297 /* pthread test headers */
9298 #include <pthread.h>
9299 #ifndef NULL
9300 #define NULL (void*)0
9301 #endif
9302
9303 static void *task(p)
9304         void *p;
9305 {
9306         return (void *) (p == NULL);
9307 }
9308
9309
9310 int main(argc, argv)
9311         int argc;
9312         char **argv;
9313 {
9314
9315         /* pthread test function */
9316         pthread_t t;
9317         int status;
9318 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9319         /* This system (e.g. AIX) defaults detached; must override */
9320         pthread_attr_t attr;
9321
9322         status = pthread_attr_init(&attr);
9323         if( status ) exit( status );
9324
9325         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9326         if( status ) exit( status );
9327
9328 #define ATTR    &attr
9329 #else
9330 #if HAVE_PTHREADS_D4
9331 #define ATTR    pthread_attr_default
9332 #else
9333 #define ATTR    NULL
9334 #endif
9335 #endif
9336         /* make sure pthread_create() isn't just a stub */
9337         status = pthread_create(&t, ATTR, task, NULL);
9338         if( status ) exit( status );
9339
9340         /* make sure pthread_detach() isn't just a stub */
9341 #if HAVE_PTHREADS_D4
9342         status = pthread_detach( &t );
9343 #else
9344         status = pthread_detach( t );
9345 #endif
9346
9347 #ifdef HAVE_LINUX_THREADS
9348         pthread_kill_other_threads_np();
9349 #endif
9350
9351         exit( status );
9352
9353 }
9354
9355 EOF
9356 if { (eval echo configure:9357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9357 then
9358   ol_cv_pthread_threads=yes
9359 else
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -fr conftest*
9363   ol_cv_pthread_threads=no
9364 fi
9365 rm -fr conftest*
9366 fi
9367
9368
9369                 # restore the LIBS
9370                 LIBS="$ol_LIBS"
9371         
9372 fi
9373
9374 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9375
9376         if test $ol_cv_pthread_threads = yes ; then
9377                 ol_link_pthreads="-threads"
9378                 ol_link_threads=posix
9379         fi
9380 fi
9381
9382
9383                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9384 if test "$ol_link_threads" = no ; then
9385         # try -lpthreads -lmach -lexc -lc_r
9386         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9387 echo "configure:9388: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9388 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9389   echo $ac_n "(cached) $ac_c" 1>&6
9390 else
9391   
9392                 # save the flags
9393                 ol_LIBS="$LIBS"
9394                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9395
9396                 if test "$cross_compiling" = yes; then
9397   cat > conftest.$ac_ext <<EOF
9398 #line 9399 "configure"
9399 #include "confdefs.h"
9400 /* pthread test headers */
9401 #include <pthread.h>
9402 #ifndef NULL
9403 #define NULL (void*)0
9404 #endif
9405
9406 static void *task(p)
9407         void *p;
9408 {
9409         return (void *) (p == NULL);
9410 }
9411
9412 int main() {
9413
9414         /* pthread test function */
9415         pthread_t t;
9416         int status;
9417 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9418         /* This system (e.g. AIX) defaults detached; must override */
9419         pthread_attr_t attr;
9420
9421         status = pthread_attr_init(&attr);
9422         if( status ) exit( status );
9423
9424         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9425         if( status ) exit( status );
9426
9427 #define ATTR    &attr
9428 #else
9429 #if HAVE_PTHREADS_D4
9430 #define ATTR    pthread_attr_default
9431 #else
9432 #define ATTR    NULL
9433 #endif
9434 #endif
9435         /* make sure pthread_create() isn't just a stub */
9436         status = pthread_create(&t, ATTR, task, NULL);
9437         if( status ) exit( status );
9438
9439         /* make sure pthread_detach() isn't just a stub */
9440 #if HAVE_PTHREADS_D4
9441         status = pthread_detach( &t );
9442 #else
9443         status = pthread_detach( t );
9444 #endif
9445
9446 #ifdef HAVE_LINUX_THREADS
9447         pthread_kill_other_threads_np();
9448 #endif
9449
9450         exit( status );
9451
9452 ; return 0; }
9453 EOF
9454 if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9455   rm -rf conftest*
9456   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9457 else
9458   echo "configure: failed program was:" >&5
9459   cat conftest.$ac_ext >&5
9460   rm -rf conftest*
9461   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9462 fi
9463 rm -f conftest*
9464 else
9465   cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468 /* pthread test headers */
9469 #include <pthread.h>
9470 #ifndef NULL
9471 #define NULL (void*)0
9472 #endif
9473
9474 static void *task(p)
9475         void *p;
9476 {
9477         return (void *) (p == NULL);
9478 }
9479
9480
9481 int main(argc, argv)
9482         int argc;
9483         char **argv;
9484 {
9485
9486         /* pthread test function */
9487         pthread_t t;
9488         int status;
9489 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9490         /* This system (e.g. AIX) defaults detached; must override */
9491         pthread_attr_t attr;
9492
9493         status = pthread_attr_init(&attr);
9494         if( status ) exit( status );
9495
9496         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9497         if( status ) exit( status );
9498
9499 #define ATTR    &attr
9500 #else
9501 #if HAVE_PTHREADS_D4
9502 #define ATTR    pthread_attr_default
9503 #else
9504 #define ATTR    NULL
9505 #endif
9506 #endif
9507         /* make sure pthread_create() isn't just a stub */
9508         status = pthread_create(&t, ATTR, task, NULL);
9509         if( status ) exit( status );
9510
9511         /* make sure pthread_detach() isn't just a stub */
9512 #if HAVE_PTHREADS_D4
9513         status = pthread_detach( &t );
9514 #else
9515         status = pthread_detach( t );
9516 #endif
9517
9518 #ifdef HAVE_LINUX_THREADS
9519         pthread_kill_other_threads_np();
9520 #endif
9521
9522         exit( status );
9523
9524 }
9525
9526 EOF
9527 if { (eval echo configure:9528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9528 then
9529   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9530 else
9531   echo "configure: failed program was:" >&5
9532   cat conftest.$ac_ext >&5
9533   rm -fr conftest*
9534   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9535 fi
9536 rm -fr conftest*
9537 fi
9538
9539
9540                 # restore the LIBS
9541                 LIBS="$ol_LIBS"
9542         
9543 fi
9544
9545 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9546
9547         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9548                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9549                 ol_link_threads=posix
9550         fi
9551 fi
9552
9553                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9554 if test "$ol_link_threads" = no ; then
9555         # try -lpthreads -lmach -lexc
9556         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9557 echo "configure:9558: checking for pthread link with -lpthreads -lmach -lexc" >&5
9558 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   
9562                 # save the flags
9563                 ol_LIBS="$LIBS"
9564                 LIBS="-lpthreads -lmach -lexc $LIBS"
9565
9566                 if test "$cross_compiling" = yes; then
9567   cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570 /* pthread test headers */
9571 #include <pthread.h>
9572 #ifndef NULL
9573 #define NULL (void*)0
9574 #endif
9575
9576 static void *task(p)
9577         void *p;
9578 {
9579         return (void *) (p == NULL);
9580 }
9581
9582 int main() {
9583
9584         /* pthread test function */
9585         pthread_t t;
9586         int status;
9587 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9588         /* This system (e.g. AIX) defaults detached; must override */
9589         pthread_attr_t attr;
9590
9591         status = pthread_attr_init(&attr);
9592         if( status ) exit( status );
9593
9594         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9595         if( status ) exit( status );
9596
9597 #define ATTR    &attr
9598 #else
9599 #if HAVE_PTHREADS_D4
9600 #define ATTR    pthread_attr_default
9601 #else
9602 #define ATTR    NULL
9603 #endif
9604 #endif
9605         /* make sure pthread_create() isn't just a stub */
9606         status = pthread_create(&t, ATTR, task, NULL);
9607         if( status ) exit( status );
9608
9609         /* make sure pthread_detach() isn't just a stub */
9610 #if HAVE_PTHREADS_D4
9611         status = pthread_detach( &t );
9612 #else
9613         status = pthread_detach( t );
9614 #endif
9615
9616 #ifdef HAVE_LINUX_THREADS
9617         pthread_kill_other_threads_np();
9618 #endif
9619
9620         exit( status );
9621
9622 ; return 0; }
9623 EOF
9624 if { (eval echo configure:9625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9625   rm -rf conftest*
9626   ol_cv_pthread_lpthreads_lmach_lexc=yes
9627 else
9628   echo "configure: failed program was:" >&5
9629   cat conftest.$ac_ext >&5
9630   rm -rf conftest*
9631   ol_cv_pthread_lpthreads_lmach_lexc=no
9632 fi
9633 rm -f conftest*
9634 else
9635   cat > conftest.$ac_ext <<EOF
9636 #line 9637 "configure"
9637 #include "confdefs.h"
9638 /* pthread test headers */
9639 #include <pthread.h>
9640 #ifndef NULL
9641 #define NULL (void*)0
9642 #endif
9643
9644 static void *task(p)
9645         void *p;
9646 {
9647         return (void *) (p == NULL);
9648 }
9649
9650
9651 int main(argc, argv)
9652         int argc;
9653         char **argv;
9654 {
9655
9656         /* pthread test function */
9657         pthread_t t;
9658         int status;
9659 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9660         /* This system (e.g. AIX) defaults detached; must override */
9661         pthread_attr_t attr;
9662
9663         status = pthread_attr_init(&attr);
9664         if( status ) exit( status );
9665
9666         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9667         if( status ) exit( status );
9668
9669 #define ATTR    &attr
9670 #else
9671 #if HAVE_PTHREADS_D4
9672 #define ATTR    pthread_attr_default
9673 #else
9674 #define ATTR    NULL
9675 #endif
9676 #endif
9677         /* make sure pthread_create() isn't just a stub */
9678         status = pthread_create(&t, ATTR, task, NULL);
9679         if( status ) exit( status );
9680
9681         /* make sure pthread_detach() isn't just a stub */
9682 #if HAVE_PTHREADS_D4
9683         status = pthread_detach( &t );
9684 #else
9685         status = pthread_detach( t );
9686 #endif
9687
9688 #ifdef HAVE_LINUX_THREADS
9689         pthread_kill_other_threads_np();
9690 #endif
9691
9692         exit( status );
9693
9694 }
9695
9696 EOF
9697 if { (eval echo configure:9698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9698 then
9699   ol_cv_pthread_lpthreads_lmach_lexc=yes
9700 else
9701   echo "configure: failed program was:" >&5
9702   cat conftest.$ac_ext >&5
9703   rm -fr conftest*
9704   ol_cv_pthread_lpthreads_lmach_lexc=no
9705 fi
9706 rm -fr conftest*
9707 fi
9708
9709
9710                 # restore the LIBS
9711                 LIBS="$ol_LIBS"
9712         
9713 fi
9714
9715 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9716
9717         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9718                 ol_link_pthreads="-lpthreads -lmach -lexc"
9719                 ol_link_threads=posix
9720         fi
9721 fi
9722
9723                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9724 if test "$ol_link_threads" = no ; then
9725         # try -lpthreads -lexc
9726         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9727 echo "configure:9728: checking for pthread link with -lpthreads -lexc" >&5
9728 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9729   echo $ac_n "(cached) $ac_c" 1>&6
9730 else
9731   
9732                 # save the flags
9733                 ol_LIBS="$LIBS"
9734                 LIBS="-lpthreads -lexc $LIBS"
9735
9736                 if test "$cross_compiling" = yes; then
9737   cat > conftest.$ac_ext <<EOF
9738 #line 9739 "configure"
9739 #include "confdefs.h"
9740 /* pthread test headers */
9741 #include <pthread.h>
9742 #ifndef NULL
9743 #define NULL (void*)0
9744 #endif
9745
9746 static void *task(p)
9747         void *p;
9748 {
9749         return (void *) (p == NULL);
9750 }
9751
9752 int main() {
9753
9754         /* pthread test function */
9755         pthread_t t;
9756         int status;
9757 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9758         /* This system (e.g. AIX) defaults detached; must override */
9759         pthread_attr_t attr;
9760
9761         status = pthread_attr_init(&attr);
9762         if( status ) exit( status );
9763
9764         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9765         if( status ) exit( status );
9766
9767 #define ATTR    &attr
9768 #else
9769 #if HAVE_PTHREADS_D4
9770 #define ATTR    pthread_attr_default
9771 #else
9772 #define ATTR    NULL
9773 #endif
9774 #endif
9775         /* make sure pthread_create() isn't just a stub */
9776         status = pthread_create(&t, ATTR, task, NULL);
9777         if( status ) exit( status );
9778
9779         /* make sure pthread_detach() isn't just a stub */
9780 #if HAVE_PTHREADS_D4
9781         status = pthread_detach( &t );
9782 #else
9783         status = pthread_detach( t );
9784 #endif
9785
9786 #ifdef HAVE_LINUX_THREADS
9787         pthread_kill_other_threads_np();
9788 #endif
9789
9790         exit( status );
9791
9792 ; return 0; }
9793 EOF
9794 if { (eval echo configure:9795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9795   rm -rf conftest*
9796   ol_cv_pthread_lpthreads_lexc=yes
9797 else
9798   echo "configure: failed program was:" >&5
9799   cat conftest.$ac_ext >&5
9800   rm -rf conftest*
9801   ol_cv_pthread_lpthreads_lexc=no
9802 fi
9803 rm -f conftest*
9804 else
9805   cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 /* pthread test headers */
9809 #include <pthread.h>
9810 #ifndef NULL
9811 #define NULL (void*)0
9812 #endif
9813
9814 static void *task(p)
9815         void *p;
9816 {
9817         return (void *) (p == NULL);
9818 }
9819
9820
9821 int main(argc, argv)
9822         int argc;
9823         char **argv;
9824 {
9825
9826         /* pthread test function */
9827         pthread_t t;
9828         int status;
9829 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9830         /* This system (e.g. AIX) defaults detached; must override */
9831         pthread_attr_t attr;
9832
9833         status = pthread_attr_init(&attr);
9834         if( status ) exit( status );
9835
9836         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9837         if( status ) exit( status );
9838
9839 #define ATTR    &attr
9840 #else
9841 #if HAVE_PTHREADS_D4
9842 #define ATTR    pthread_attr_default
9843 #else
9844 #define ATTR    NULL
9845 #endif
9846 #endif
9847         /* make sure pthread_create() isn't just a stub */
9848         status = pthread_create(&t, ATTR, task, NULL);
9849         if( status ) exit( status );
9850
9851         /* make sure pthread_detach() isn't just a stub */
9852 #if HAVE_PTHREADS_D4
9853         status = pthread_detach( &t );
9854 #else
9855         status = pthread_detach( t );
9856 #endif
9857
9858 #ifdef HAVE_LINUX_THREADS
9859         pthread_kill_other_threads_np();
9860 #endif
9861
9862         exit( status );
9863
9864 }
9865
9866 EOF
9867 if { (eval echo configure:9868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9868 then
9869   ol_cv_pthread_lpthreads_lexc=yes
9870 else
9871   echo "configure: failed program was:" >&5
9872   cat conftest.$ac_ext >&5
9873   rm -fr conftest*
9874   ol_cv_pthread_lpthreads_lexc=no
9875 fi
9876 rm -fr conftest*
9877 fi
9878
9879
9880                 # restore the LIBS
9881                 LIBS="$ol_LIBS"
9882         
9883 fi
9884
9885 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9886
9887         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9888                 ol_link_pthreads="-lpthreads -lexc"
9889                 ol_link_threads=posix
9890         fi
9891 fi
9892
9893
9894                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9895 if test "$ol_link_threads" = no ; then
9896         # try -lpthreads
9897         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9898 echo "configure:9899: checking for pthread link with -lpthreads" >&5
9899 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9900   echo $ac_n "(cached) $ac_c" 1>&6
9901 else
9902   
9903                 # save the flags
9904                 ol_LIBS="$LIBS"
9905                 LIBS="-lpthreads $LIBS"
9906
9907                 if test "$cross_compiling" = yes; then
9908   cat > conftest.$ac_ext <<EOF
9909 #line 9910 "configure"
9910 #include "confdefs.h"
9911 /* pthread test headers */
9912 #include <pthread.h>
9913 #ifndef NULL
9914 #define NULL (void*)0
9915 #endif
9916
9917 static void *task(p)
9918         void *p;
9919 {
9920         return (void *) (p == NULL);
9921 }
9922
9923 int main() {
9924
9925         /* pthread test function */
9926         pthread_t t;
9927         int status;
9928 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9929         /* This system (e.g. AIX) defaults detached; must override */
9930         pthread_attr_t attr;
9931
9932         status = pthread_attr_init(&attr);
9933         if( status ) exit( status );
9934
9935         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9936         if( status ) exit( status );
9937
9938 #define ATTR    &attr
9939 #else
9940 #if HAVE_PTHREADS_D4
9941 #define ATTR    pthread_attr_default
9942 #else
9943 #define ATTR    NULL
9944 #endif
9945 #endif
9946         /* make sure pthread_create() isn't just a stub */
9947         status = pthread_create(&t, ATTR, task, NULL);
9948         if( status ) exit( status );
9949
9950         /* make sure pthread_detach() isn't just a stub */
9951 #if HAVE_PTHREADS_D4
9952         status = pthread_detach( &t );
9953 #else
9954         status = pthread_detach( t );
9955 #endif
9956
9957 #ifdef HAVE_LINUX_THREADS
9958         pthread_kill_other_threads_np();
9959 #endif
9960
9961         exit( status );
9962
9963 ; return 0; }
9964 EOF
9965 if { (eval echo configure:9966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9966   rm -rf conftest*
9967   ol_cv_pthread_lib_lpthreads=yes
9968 else
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971   rm -rf conftest*
9972   ol_cv_pthread_lib_lpthreads=no
9973 fi
9974 rm -f conftest*
9975 else
9976   cat > conftest.$ac_ext <<EOF
9977 #line 9978 "configure"
9978 #include "confdefs.h"
9979 /* pthread test headers */
9980 #include <pthread.h>
9981 #ifndef NULL
9982 #define NULL (void*)0
9983 #endif
9984
9985 static void *task(p)
9986         void *p;
9987 {
9988         return (void *) (p == NULL);
9989 }
9990
9991
9992 int main(argc, argv)
9993         int argc;
9994         char **argv;
9995 {
9996
9997         /* pthread test function */
9998         pthread_t t;
9999         int status;
10000 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10001         /* This system (e.g. AIX) defaults detached; must override */
10002         pthread_attr_t attr;
10003
10004         status = pthread_attr_init(&attr);
10005         if( status ) exit( status );
10006
10007         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10008         if( status ) exit( status );
10009
10010 #define ATTR    &attr
10011 #else
10012 #if HAVE_PTHREADS_D4
10013 #define ATTR    pthread_attr_default
10014 #else
10015 #define ATTR    NULL
10016 #endif
10017 #endif
10018         /* make sure pthread_create() isn't just a stub */
10019         status = pthread_create(&t, ATTR, task, NULL);
10020         if( status ) exit( status );
10021
10022         /* make sure pthread_detach() isn't just a stub */
10023 #if HAVE_PTHREADS_D4
10024         status = pthread_detach( &t );
10025 #else
10026         status = pthread_detach( t );
10027 #endif
10028
10029 #ifdef HAVE_LINUX_THREADS
10030         pthread_kill_other_threads_np();
10031 #endif
10032
10033         exit( status );
10034
10035 }
10036
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10039 then
10040   ol_cv_pthread_lib_lpthreads=yes
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -fr conftest*
10045   ol_cv_pthread_lib_lpthreads=no
10046 fi
10047 rm -fr conftest*
10048 fi
10049
10050
10051                 # restore the LIBS
10052                 LIBS="$ol_LIBS"
10053         
10054 fi
10055
10056 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10057
10058         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10059                 ol_link_pthreads="-lpthreads"
10060                 ol_link_threads=posix
10061         fi
10062 fi
10063
10064
10065                 if test $ol_link_threads != no ; then
10066                         cat >> confdefs.h <<\EOF
10067 #define HAVE_PTHREADS 1
10068 EOF
10069
10070
10071                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10072
10073                                                 save_CPPFLAGS="$CPPFLAGS"
10074                         save_LIBS="$LIBS"
10075                         LIBS="$LTHREAD_LIBS $LIBS"
10076
10077                                                                                                 for ac_func in sched_yield pthread_yield
10078 do
10079 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10080 echo "configure:10081: checking for $ac_func" >&5
10081 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10082   echo $ac_n "(cached) $ac_c" 1>&6
10083 else
10084   cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 /* System header to define __stub macros and hopefully few prototypes,
10088     which can conflict with char $ac_func(); below.  */
10089 #include <assert.h>
10090 /* Override any gcc2 internal prototype to avoid an error.  */
10091 /* We use char because int might match the return type of a gcc2
10092     builtin and then its argument prototype would still apply.  */
10093 char $ac_func();
10094 char (*f)();
10095
10096 int main() {
10097
10098 /* The GNU C library defines this for functions which it implements
10099     to always fail with ENOSYS.  Some functions are actually named
10100     something starting with __ and the normal name is an alias.  */
10101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10102 choke me
10103 #else
10104 f = $ac_func;
10105 #endif
10106
10107 ; return 0; }
10108 EOF
10109 if { (eval echo configure:10110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10110   rm -rf conftest*
10111   eval "ac_cv_func_$ac_func=yes"
10112 else
10113   echo "configure: failed program was:" >&5
10114   cat conftest.$ac_ext >&5
10115   rm -rf conftest*
10116   eval "ac_cv_func_$ac_func=no"
10117 fi
10118 rm -f conftest*
10119 fi
10120
10121 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10122   echo "$ac_t""yes" 1>&6
10123     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10124   cat >> confdefs.h <<EOF
10125 #define $ac_tr_func 1
10126 EOF
10127  
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131 done
10132
10133
10134                         if test $ac_cv_func_sched_yield = no -a \
10135                                 $ac_cv_func_pthread_yield = no ; then
10136                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10137 echo "configure:10138: checking for sched_yield in -lrt" >&5
10138 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10140   echo $ac_n "(cached) $ac_c" 1>&6
10141 else
10142   ac_save_LIBS="$LIBS"
10143 LIBS="-lrt  $LIBS"
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* Override any gcc2 internal prototype to avoid an error.  */
10148 /* We use char because int might match the return type of a gcc2
10149     builtin and then its argument prototype would still apply.  */
10150 char sched_yield();
10151
10152 int main() {
10153 sched_yield()
10154 ; return 0; }
10155 EOF
10156 if { (eval echo configure:10157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=yes"
10159 else
10160   echo "configure: failed program was:" >&5
10161   cat conftest.$ac_ext >&5
10162   rm -rf conftest*
10163   eval "ac_cv_lib_$ac_lib_var=no"
10164 fi
10165 rm -f conftest*
10166 LIBS="$ac_save_LIBS"
10167
10168 fi
10169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10172                                         cat >> confdefs.h <<\EOF
10173 #define HAVE_SCHED_YIELD 1
10174 EOF
10175
10176                                         ac_cv_func_sched_yield=yes
10177 else
10178   echo "$ac_t""no" 1>&6
10179 ac_cv_func_sched_yield=no
10180 fi
10181
10182                         fi
10183                         if test $ac_cv_func_sched_yield = no -a \
10184                                 $ac_cv_func_pthread_yield = no ; then
10185                                                                                                 for ac_func in thr_yield
10186 do
10187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10188 echo "configure:10189: checking for $ac_func" >&5
10189 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10190   echo $ac_n "(cached) $ac_c" 1>&6
10191 else
10192   cat > conftest.$ac_ext <<EOF
10193 #line 10194 "configure"
10194 #include "confdefs.h"
10195 /* System header to define __stub macros and hopefully few prototypes,
10196     which can conflict with char $ac_func(); below.  */
10197 #include <assert.h>
10198 /* Override any gcc2 internal prototype to avoid an error.  */
10199 /* We use char because int might match the return type of a gcc2
10200     builtin and then its argument prototype would still apply.  */
10201 char $ac_func();
10202 char (*f)();
10203
10204 int main() {
10205
10206 /* The GNU C library defines this for functions which it implements
10207     to always fail with ENOSYS.  Some functions are actually named
10208     something starting with __ and the normal name is an alias.  */
10209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10210 choke me
10211 #else
10212 f = $ac_func;
10213 #endif
10214
10215 ; return 0; }
10216 EOF
10217 if { (eval echo configure:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10218   rm -rf conftest*
10219   eval "ac_cv_func_$ac_func=yes"
10220 else
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=no"
10225 fi
10226 rm -f conftest*
10227 fi
10228
10229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10230   echo "$ac_t""yes" 1>&6
10231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10232   cat >> confdefs.h <<EOF
10233 #define $ac_tr_func 1
10234 EOF
10235  
10236 else
10237   echo "$ac_t""no" 1>&6
10238 fi
10239 done
10240
10241                         fi
10242                         if test $ac_cv_func_sched_yield = no -a \
10243                                 $ac_cv_func_pthread_yield = no -a \
10244                                 "$ac_cv_func_thr_yield" = no ; then
10245                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10246                         fi
10247
10248                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10249 do
10250 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10251 echo "configure:10252: checking for $ac_func" >&5
10252 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   cat > conftest.$ac_ext <<EOF
10256 #line 10257 "configure"
10257 #include "confdefs.h"
10258 /* System header to define __stub macros and hopefully few prototypes,
10259     which can conflict with char $ac_func(); below.  */
10260 #include <assert.h>
10261 /* Override any gcc2 internal prototype to avoid an error.  */
10262 /* We use char because int might match the return type of a gcc2
10263     builtin and then its argument prototype would still apply.  */
10264 char $ac_func();
10265 char (*f)();
10266
10267 int main() {
10268
10269 /* The GNU C library defines this for functions which it implements
10270     to always fail with ENOSYS.  Some functions are actually named
10271     something starting with __ and the normal name is an alias.  */
10272 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10273 choke me
10274 #else
10275 f = $ac_func;
10276 #endif
10277
10278 ; return 0; }
10279 EOF
10280 if { (eval echo configure:10281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10281   rm -rf conftest*
10282   eval "ac_cv_func_$ac_func=yes"
10283 else
10284   echo "configure: failed program was:" >&5
10285   cat conftest.$ac_ext >&5
10286   rm -rf conftest*
10287   eval "ac_cv_func_$ac_func=no"
10288 fi
10289 rm -f conftest*
10290 fi
10291
10292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10293   echo "$ac_t""yes" 1>&6
10294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10295   cat >> confdefs.h <<EOF
10296 #define $ac_tr_func 1
10297 EOF
10298  
10299 else
10300   echo "$ac_t""no" 1>&6
10301 fi
10302 done
10303
10304
10305                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10306 echo "configure:10307: checking for pthread_detach with <pthread.h>" >&5
10307 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10308   echo $ac_n "(cached) $ac_c" 1>&6
10309 else
10310   
10311                                                                 cat > conftest.$ac_ext <<EOF
10312 #line 10313 "configure"
10313 #include "confdefs.h"
10314
10315 #include <pthread.h>
10316 #ifndef NULL
10317 #define NULL (void*)0
10318 #endif
10319
10320 int main() {
10321 pthread_detach(NULL);
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   ol_cv_func_pthread_detach=yes
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   ol_cv_func_pthread_detach=no
10332 fi
10333 rm -f conftest*
10334                         
10335 fi
10336
10337 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10338
10339                         if test $ol_cv_func_pthread_detach = no ; then
10340                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10341                         fi
10342
10343                         cat >> confdefs.h <<\EOF
10344 #define HAVE_PTHREAD_DETACH 1
10345 EOF
10346
10347
10348                                                 for ac_func in \
10349                                 pthread_setconcurrency \
10350                                 pthread_getconcurrency \
10351                                 thr_setconcurrency \
10352                                 thr_getconcurrency \
10353                         
10354 do
10355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10356 echo "configure:10357: checking for $ac_func" >&5
10357 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10358   echo $ac_n "(cached) $ac_c" 1>&6
10359 else
10360   cat > conftest.$ac_ext <<EOF
10361 #line 10362 "configure"
10362 #include "confdefs.h"
10363 /* System header to define __stub macros and hopefully few prototypes,
10364     which can conflict with char $ac_func(); below.  */
10365 #include <assert.h>
10366 /* Override any gcc2 internal prototype to avoid an error.  */
10367 /* We use char because int might match the return type of a gcc2
10368     builtin and then its argument prototype would still apply.  */
10369 char $ac_func();
10370 char (*f)();
10371
10372 int main() {
10373
10374 /* The GNU C library defines this for functions which it implements
10375     to always fail with ENOSYS.  Some functions are actually named
10376     something starting with __ and the normal name is an alias.  */
10377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10378 choke me
10379 #else
10380 f = $ac_func;
10381 #endif
10382
10383 ; return 0; }
10384 EOF
10385 if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10386   rm -rf conftest*
10387   eval "ac_cv_func_$ac_func=yes"
10388 else
10389   echo "configure: failed program was:" >&5
10390   cat conftest.$ac_ext >&5
10391   rm -rf conftest*
10392   eval "ac_cv_func_$ac_func=no"
10393 fi
10394 rm -f conftest*
10395 fi
10396
10397 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10398   echo "$ac_t""yes" 1>&6
10399     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10400   cat >> confdefs.h <<EOF
10401 #define $ac_tr_func 1
10402 EOF
10403  
10404 else
10405   echo "$ac_t""no" 1>&6
10406 fi
10407 done
10408
10409
10410                         
10411         for ac_func in pthread_kill_other_threads_np
10412 do
10413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10414 echo "configure:10415: checking for $ac_func" >&5
10415 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10416   echo $ac_n "(cached) $ac_c" 1>&6
10417 else
10418   cat > conftest.$ac_ext <<EOF
10419 #line 10420 "configure"
10420 #include "confdefs.h"
10421 /* System header to define __stub macros and hopefully few prototypes,
10422     which can conflict with char $ac_func(); below.  */
10423 #include <assert.h>
10424 /* Override any gcc2 internal prototype to avoid an error.  */
10425 /* We use char because int might match the return type of a gcc2
10426     builtin and then its argument prototype would still apply.  */
10427 char $ac_func();
10428 char (*f)();
10429
10430 int main() {
10431
10432 /* The GNU C library defines this for functions which it implements
10433     to always fail with ENOSYS.  Some functions are actually named
10434     something starting with __ and the normal name is an alias.  */
10435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10436 choke me
10437 #else
10438 f = $ac_func;
10439 #endif
10440
10441 ; return 0; }
10442 EOF
10443 if { (eval echo configure:10444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10444   rm -rf conftest*
10445   eval "ac_cv_func_$ac_func=yes"
10446 else
10447   echo "configure: failed program was:" >&5
10448   cat conftest.$ac_ext >&5
10449   rm -rf conftest*
10450   eval "ac_cv_func_$ac_func=no"
10451 fi
10452 rm -f conftest*
10453 fi
10454
10455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10456   echo "$ac_t""yes" 1>&6
10457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10458   cat >> confdefs.h <<EOF
10459 #define $ac_tr_func 1
10460 EOF
10461  
10462 else
10463   echo "$ac_t""no" 1>&6
10464 fi
10465 done
10466
10467         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10468 echo "configure:10469: checking for LinuxThreads implementation" >&5
10469 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10470   echo $ac_n "(cached) $ac_c" 1>&6
10471 else
10472   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10473 fi
10474
10475 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10476
10477                         
10478         
10479         
10480         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10481 echo "configure:10482: checking for LinuxThreads consistency" >&5
10482 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10483   echo $ac_n "(cached) $ac_c" 1>&6
10484 else
10485   
10486                 if test $ol_cv_header_linux_threads = yes -a \
10487                         $ol_cv_sys_linux_threads = yes; then
10488                         ol_cv_linux_threads=yes
10489                 elif test $ol_cv_header_linux_threads = no -a \
10490                         $ol_cv_sys_linux_threads = no; then
10491                         ol_cv_linux_threads=no
10492                 else
10493                         ol_cv_linux_threads=error
10494                 fi
10495         
10496 fi
10497
10498 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10499
10500
10501                         if test $ol_cv_linux_threads = error; then
10502                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10503                         fi
10504
10505                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10506 echo "configure:10507: checking if pthread_create() works" >&5
10507 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10508   echo $ac_n "(cached) $ac_c" 1>&6
10509 else
10510   
10511                         if test "$cross_compiling" = yes; then
10512                                 ol_cv_pthread_create_works=yes
10513 else
10514   cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 /* pthread test headers */
10518 #include <pthread.h>
10519 #ifndef NULL
10520 #define NULL (void*)0
10521 #endif
10522
10523 static void *task(p)
10524         void *p;
10525 {
10526         return (void *) (p == NULL);
10527 }
10528
10529
10530 int main(argc, argv)
10531         int argc;
10532         char **argv;
10533 {
10534
10535         /* pthread test function */
10536         pthread_t t;
10537         int status;
10538 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10539         /* This system (e.g. AIX) defaults detached; must override */
10540         pthread_attr_t attr;
10541
10542         status = pthread_attr_init(&attr);
10543         if( status ) exit( status );
10544
10545         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10546         if( status ) exit( status );
10547
10548 #define ATTR    &attr
10549 #else
10550 #if HAVE_PTHREADS_D4
10551 #define ATTR    pthread_attr_default
10552 #else
10553 #define ATTR    NULL
10554 #endif
10555 #endif
10556         /* make sure pthread_create() isn't just a stub */
10557         status = pthread_create(&t, ATTR, task, NULL);
10558         if( status ) exit( status );
10559
10560         /* make sure pthread_detach() isn't just a stub */
10561 #if HAVE_PTHREADS_D4
10562         status = pthread_detach( &t );
10563 #else
10564         status = pthread_detach( t );
10565 #endif
10566
10567 #ifdef HAVE_LINUX_THREADS
10568         pthread_kill_other_threads_np();
10569 #endif
10570
10571         exit( status );
10572
10573 }
10574
10575 EOF
10576 if { (eval echo configure:10577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10577 then
10578   ol_cv_pthread_create_works=yes
10579 else
10580   echo "configure: failed program was:" >&5
10581   cat conftest.$ac_ext >&5
10582   rm -fr conftest*
10583   ol_cv_pthread_create_works=no
10584 fi
10585 rm -fr conftest*
10586 fi
10587
10588 fi
10589
10590 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10591
10592                         if test $ol_cv_pthread_create_works = no ; then
10593                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10594                         fi
10595
10596                                                 if test $ol_with_yielding_select = auto ; then
10597                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10598 echo "configure:10599: checking if select yields when using pthreads" >&5
10599 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   
10603                                 if test "$cross_compiling" = yes; then
10604   ol_cv_pthread_select_yields=cross
10605 else
10606   cat > conftest.$ac_ext <<EOF
10607 #line 10608 "configure"
10608 #include "confdefs.h"
10609
10610 #include <sys/types.h>
10611 #include <sys/time.h>
10612 #include <unistd.h>
10613 #include <pthread.h>
10614 #ifndef NULL
10615 #define NULL (void*) 0
10616 #endif
10617
10618 static int fildes[2];
10619
10620 static void *task(p)
10621         void *p;
10622 {
10623         int i;
10624         struct timeval tv;
10625
10626         fd_set rfds;
10627
10628         tv.tv_sec=10;
10629         tv.tv_usec=0;
10630
10631         FD_ZERO(&rfds);
10632         FD_SET(fildes[0], &rfds);
10633
10634         /* we're not interested in any fds */
10635         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10636
10637         if(i < 0) {
10638                 perror("select");
10639                 exit(10);
10640         }
10641
10642         exit(0); /* if we exit here, the select blocked the whole process */
10643 }
10644
10645 int main(argc, argv)
10646         int argc;
10647         char **argv;
10648 {
10649         pthread_t t;
10650
10651         /* create a pipe to select */
10652         if(pipe(&fildes[0])) {
10653                 perror("select");
10654                 exit(1);
10655         }
10656
10657 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10658         (void) pthread_setconcurrency(2);
10659 #else
10660 #ifdef HAVE_THR_SETCONCURRENCY
10661         /* Set Solaris LWP concurrency to 2 */
10662         thr_setconcurrency(2);
10663 #endif
10664 #endif
10665
10666 #if HAVE_PTHREADS_D4
10667         pthread_create(&t, pthread_attr_default, task, NULL);
10668 #else
10669         pthread_create(&t, NULL, task, NULL);
10670 #endif
10671
10672 #if HAVE_SCHED_YIELD
10673         sched_yield();  /* make sure task runs first */
10674 #else
10675 #ifdef HAVE_PTHREAD_YIELD
10676         pthread_yield();        /* make sure task runs first */
10677 #endif
10678 #endif
10679
10680         exit(2);
10681 }
10682 EOF
10683 if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10684 then
10685   ol_cv_pthread_select_yields=no
10686 else
10687   echo "configure: failed program was:" >&5
10688   cat conftest.$ac_ext >&5
10689   rm -fr conftest*
10690   ol_cv_pthread_select_yields=yes
10691 fi
10692 rm -fr conftest*
10693 fi
10694
10695 fi
10696
10697 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10698
10699                                 if test $ol_cv_pthread_select_yields = cross ; then
10700                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10701                                 fi
10702
10703                                 if test $ol_cv_pthread_select_yields = yes ; then
10704                                         ol_with_yielding_select=yes
10705                                 fi
10706                         fi
10707
10708                                                 CPPFLAGS="$save_CPPFLAGS"
10709                         LIBS="$save_LIBS"
10710                 else
10711                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10712                 fi
10713         fi
10714
10715         if test $ol_with_threads = posix ; then
10716                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10717         fi
10718 fi
10719
10720 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10721         -o $ol_with_threads = mach ; then
10722
10723                 for ac_hdr in mach/cthreads.h
10724 do
10725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10727 echo "configure:10728: checking for $ac_hdr" >&5
10728 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10729   echo $ac_n "(cached) $ac_c" 1>&6
10730 else
10731   cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 #include <$ac_hdr>
10735 EOF
10736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10737 { (eval echo configure:10738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10739 if test -z "$ac_err"; then
10740   rm -rf conftest*
10741   eval "ac_cv_header_$ac_safe=yes"
10742 else
10743   echo "$ac_err" >&5
10744   echo "configure: failed program was:" >&5
10745   cat conftest.$ac_ext >&5
10746   rm -rf conftest*
10747   eval "ac_cv_header_$ac_safe=no"
10748 fi
10749 rm -f conftest*
10750 fi
10751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10752   echo "$ac_t""yes" 1>&6
10753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10754   cat >> confdefs.h <<EOF
10755 #define $ac_tr_hdr 1
10756 EOF
10757  
10758 else
10759   echo "$ac_t""no" 1>&6
10760 fi
10761 done
10762
10763         if test $ac_cv_header_mach_cthreads_h = yes ; then
10764                 ol_with_threads=found
10765
10766                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10767 echo "configure:10768: checking for cthread_fork" >&5
10768 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10769   echo $ac_n "(cached) $ac_c" 1>&6
10770 else
10771   cat > conftest.$ac_ext <<EOF
10772 #line 10773 "configure"
10773 #include "confdefs.h"
10774 /* System header to define __stub macros and hopefully few prototypes,
10775     which can conflict with char cthread_fork(); below.  */
10776 #include <assert.h>
10777 /* Override any gcc2 internal prototype to avoid an error.  */
10778 /* We use char because int might match the return type of a gcc2
10779     builtin and then its argument prototype would still apply.  */
10780 char cthread_fork();
10781 char (*f)();
10782
10783 int main() {
10784
10785 /* The GNU C library defines this for functions which it implements
10786     to always fail with ENOSYS.  Some functions are actually named
10787     something starting with __ and the normal name is an alias.  */
10788 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10789 choke me
10790 #else
10791 f = cthread_fork;
10792 #endif
10793
10794 ; return 0; }
10795 EOF
10796 if { (eval echo configure:10797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10797   rm -rf conftest*
10798   eval "ac_cv_func_cthread_fork=yes"
10799 else
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_func_cthread_fork=no"
10804 fi
10805 rm -f conftest*
10806 fi
10807
10808 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10809   echo "$ac_t""yes" 1>&6
10810   ol_link_threads=yes
10811 else
10812   echo "$ac_t""no" 1>&6
10813 fi
10814
10815
10816                 if test $ol_link_threads = no ; then
10817                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10818 echo "configure:10819: checking for cthread_fork with -all_load" >&5
10819 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   
10823                                                                 save_LIBS="$LIBS"
10824                                 LIBS="-all_load $LIBS"
10825                                 cat > conftest.$ac_ext <<EOF
10826 #line 10827 "configure"
10827 #include "confdefs.h"
10828 #include <mach/cthreads.h>
10829 int main() {
10830
10831                                         cthread_fork((void *)0, (void *)0);
10832                                         
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   ol_cv_cthread_all_load=yes
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   ol_cv_cthread_all_load=no
10843 fi
10844 rm -f conftest*
10845                                                                 LIBS="$save_LIBS"
10846                         
10847 fi
10848
10849 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10850
10851                         if test $ol_cv_cthread_all_load = yes ; then
10852                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10853                                 ol_link_threads=mach
10854                         fi
10855                 fi
10856
10857                 if test $ol_link_threads != no ; then
10858                         : check for cthread specific functionality here
10859                         cat >> confdefs.h <<\EOF
10860 #define HAVE_MACH_CTHREADS 1
10861 EOF
10862
10863                 else
10864                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10865                 fi
10866         fi
10867
10868         if test $ol_with_threads = mach ; then
10869                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10870         fi
10871 fi
10872
10873 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10874         -o $ol_with_threads = pth ; then
10875
10876         for ac_hdr in pth.h
10877 do
10878 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10879 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10880 echo "configure:10881: checking for $ac_hdr" >&5
10881 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10882   echo $ac_n "(cached) $ac_c" 1>&6
10883 else
10884   cat > conftest.$ac_ext <<EOF
10885 #line 10886 "configure"
10886 #include "confdefs.h"
10887 #include <$ac_hdr>
10888 EOF
10889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10890 { (eval echo configure:10891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10892 if test -z "$ac_err"; then
10893   rm -rf conftest*
10894   eval "ac_cv_header_$ac_safe=yes"
10895 else
10896   echo "$ac_err" >&5
10897   echo "configure: failed program was:" >&5
10898   cat conftest.$ac_ext >&5
10899   rm -rf conftest*
10900   eval "ac_cv_header_$ac_safe=no"
10901 fi
10902 rm -f conftest*
10903 fi
10904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10905   echo "$ac_t""yes" 1>&6
10906     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10907   cat >> confdefs.h <<EOF
10908 #define $ac_tr_hdr 1
10909 EOF
10910  
10911 else
10912   echo "$ac_t""no" 1>&6
10913 fi
10914 done
10915
10916
10917         if test $ac_cv_header_pth_h = yes ; then
10918                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10919 echo "configure:10920: checking for pth_version in -lpth" >&5
10920 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   ac_save_LIBS="$LIBS"
10925 LIBS="-lpth  $LIBS"
10926 cat > conftest.$ac_ext <<EOF
10927 #line 10928 "configure"
10928 #include "confdefs.h"
10929 /* Override any gcc2 internal prototype to avoid an error.  */
10930 /* We use char because int might match the return type of a gcc2
10931     builtin and then its argument prototype would still apply.  */
10932 char pth_version();
10933
10934 int main() {
10935 pth_version()
10936 ; return 0; }
10937 EOF
10938 if { (eval echo configure:10939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10939   rm -rf conftest*
10940   eval "ac_cv_lib_$ac_lib_var=yes"
10941 else
10942   echo "configure: failed program was:" >&5
10943   cat conftest.$ac_ext >&5
10944   rm -rf conftest*
10945   eval "ac_cv_lib_$ac_lib_var=no"
10946 fi
10947 rm -f conftest*
10948 LIBS="$ac_save_LIBS"
10949
10950 fi
10951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10952   echo "$ac_t""yes" 1>&6
10953   have_pth=yes
10954 else
10955   echo "$ac_t""no" 1>&6
10956 have_pth=no
10957 fi
10958
10959
10960                 if test $have_pth = yes ; then
10961                         cat >> confdefs.h <<\EOF
10962 #define HAVE_GNU_PTH 1
10963 EOF
10964
10965                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10966                         ol_link_threads=pth
10967
10968                         if test $ol_with_yielding_select = auto ; then
10969                                 ol_with_yielding_select=yes
10970                         fi
10971                 fi
10972         fi
10973 fi
10974
10975 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10976         -o $ol_with_threads = lwp ; then
10977
10978                 for ac_hdr in thread.h synch.h
10979 do
10980 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10981 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10982 echo "configure:10983: checking for $ac_hdr" >&5
10983 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10984   echo $ac_n "(cached) $ac_c" 1>&6
10985 else
10986   cat > conftest.$ac_ext <<EOF
10987 #line 10988 "configure"
10988 #include "confdefs.h"
10989 #include <$ac_hdr>
10990 EOF
10991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10992 { (eval echo configure:10993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10994 if test -z "$ac_err"; then
10995   rm -rf conftest*
10996   eval "ac_cv_header_$ac_safe=yes"
10997 else
10998   echo "$ac_err" >&5
10999   echo "configure: failed program was:" >&5
11000   cat conftest.$ac_ext >&5
11001   rm -rf conftest*
11002   eval "ac_cv_header_$ac_safe=no"
11003 fi
11004 rm -f conftest*
11005 fi
11006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11007   echo "$ac_t""yes" 1>&6
11008     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11009   cat >> confdefs.h <<EOF
11010 #define $ac_tr_hdr 1
11011 EOF
11012  
11013 else
11014   echo "$ac_t""no" 1>&6
11015 fi
11016 done
11017
11018         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11019                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11020 echo "configure:11021: checking for thr_create in -lthread" >&5
11021 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11023   echo $ac_n "(cached) $ac_c" 1>&6
11024 else
11025   ac_save_LIBS="$LIBS"
11026 LIBS="-lthread  $LIBS"
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 /* Override any gcc2 internal prototype to avoid an error.  */
11031 /* We use char because int might match the return type of a gcc2
11032     builtin and then its argument prototype would still apply.  */
11033 char thr_create();
11034
11035 int main() {
11036 thr_create()
11037 ; return 0; }
11038 EOF
11039 if { (eval echo configure:11040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11040   rm -rf conftest*
11041   eval "ac_cv_lib_$ac_lib_var=yes"
11042 else
11043   echo "configure: failed program was:" >&5
11044   cat conftest.$ac_ext >&5
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=no"
11047 fi
11048 rm -f conftest*
11049 LIBS="$ac_save_LIBS"
11050
11051 fi
11052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11053   echo "$ac_t""yes" 1>&6
11054   have_thr=yes
11055 else
11056   echo "$ac_t""no" 1>&6
11057 have_thr=no
11058 fi
11059
11060
11061                 if test $have_thr = yes ; then
11062                         cat >> confdefs.h <<\EOF
11063 #define HAVE_THR 1
11064 EOF
11065
11066                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11067                         ol_link_threads=thr
11068
11069                         if test $ol_with_yielding_select = auto ; then
11070                                 ol_with_yielding_select=yes
11071                         fi
11072
11073                                                 for ac_func in \
11074                                 thr_setconcurrency \
11075                                 thr_getconcurrency \
11076                         
11077 do
11078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11079 echo "configure:11080: checking for $ac_func" >&5
11080 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 /* System header to define __stub macros and hopefully few prototypes,
11087     which can conflict with char $ac_func(); below.  */
11088 #include <assert.h>
11089 /* Override any gcc2 internal prototype to avoid an error.  */
11090 /* We use char because int might match the return type of a gcc2
11091     builtin and then its argument prototype would still apply.  */
11092 char $ac_func();
11093 char (*f)();
11094
11095 int main() {
11096
11097 /* The GNU C library defines this for functions which it implements
11098     to always fail with ENOSYS.  Some functions are actually named
11099     something starting with __ and the normal name is an alias.  */
11100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11101 choke me
11102 #else
11103 f = $ac_func;
11104 #endif
11105
11106 ; return 0; }
11107 EOF
11108 if { (eval echo configure:11109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11109   rm -rf conftest*
11110   eval "ac_cv_func_$ac_func=yes"
11111 else
11112   echo "configure: failed program was:" >&5
11113   cat conftest.$ac_ext >&5
11114   rm -rf conftest*
11115   eval "ac_cv_func_$ac_func=no"
11116 fi
11117 rm -f conftest*
11118 fi
11119
11120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11121   echo "$ac_t""yes" 1>&6
11122     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11123   cat >> confdefs.h <<EOF
11124 #define $ac_tr_func 1
11125 EOF
11126  
11127 else
11128   echo "$ac_t""no" 1>&6
11129 fi
11130 done
11131
11132                 fi
11133         fi
11134
11135                 for ac_hdr in lwp/lwp.h
11136 do
11137 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11138 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11139 echo "configure:11140: checking for $ac_hdr" >&5
11140 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11141   echo $ac_n "(cached) $ac_c" 1>&6
11142 else
11143   cat > conftest.$ac_ext <<EOF
11144 #line 11145 "configure"
11145 #include "confdefs.h"
11146 #include <$ac_hdr>
11147 EOF
11148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11149 { (eval echo configure:11150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11151 if test -z "$ac_err"; then
11152   rm -rf conftest*
11153   eval "ac_cv_header_$ac_safe=yes"
11154 else
11155   echo "$ac_err" >&5
11156   echo "configure: failed program was:" >&5
11157   cat conftest.$ac_ext >&5
11158   rm -rf conftest*
11159   eval "ac_cv_header_$ac_safe=no"
11160 fi
11161 rm -f conftest*
11162 fi
11163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11164   echo "$ac_t""yes" 1>&6
11165     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11166   cat >> confdefs.h <<EOF
11167 #define $ac_tr_hdr 1
11168 EOF
11169  
11170 else
11171   echo "$ac_t""no" 1>&6
11172 fi
11173 done
11174
11175         if test $ac_cv_header_lwp_lwp_h = yes ; then
11176                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11177 echo "configure:11178: checking for lwp_create in -llwp" >&5
11178 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11180   echo $ac_n "(cached) $ac_c" 1>&6
11181 else
11182   ac_save_LIBS="$LIBS"
11183 LIBS="-llwp  $LIBS"
11184 cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187 /* Override any gcc2 internal prototype to avoid an error.  */
11188 /* We use char because int might match the return type of a gcc2
11189     builtin and then its argument prototype would still apply.  */
11190 char lwp_create();
11191
11192 int main() {
11193 lwp_create()
11194 ; return 0; }
11195 EOF
11196 if { (eval echo configure:11197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11197   rm -rf conftest*
11198   eval "ac_cv_lib_$ac_lib_var=yes"
11199 else
11200   echo "configure: failed program was:" >&5
11201   cat conftest.$ac_ext >&5
11202   rm -rf conftest*
11203   eval "ac_cv_lib_$ac_lib_var=no"
11204 fi
11205 rm -f conftest*
11206 LIBS="$ac_save_LIBS"
11207
11208 fi
11209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11210   echo "$ac_t""yes" 1>&6
11211   have_lwp=yes
11212 else
11213   echo "$ac_t""no" 1>&6
11214 have_lwp=no
11215 fi
11216
11217
11218                 if test $have_lwp = yes ; then
11219                         cat >> confdefs.h <<\EOF
11220 #define HAVE_LWP 1
11221 EOF
11222
11223                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11224                         ol_link_threads=lwp
11225
11226                         if test $ol_with_yielding_select = auto ; then
11227                                 ol_with_yielding_select=no
11228                         fi
11229                 fi
11230         fi
11231 fi
11232
11233 if test $ol_with_yielding_select = yes ; then
11234         cat >> confdefs.h <<\EOF
11235 #define HAVE_YIELDING_SELECT 1
11236 EOF
11237
11238 fi
11239
11240 if test $ol_with_threads = manual ; then
11241                 ol_link_threads=yes
11242
11243         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11244
11245         for ac_hdr in pthread.h sched.h
11246 do
11247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11249 echo "configure:11250: checking for $ac_hdr" >&5
11250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11251   echo $ac_n "(cached) $ac_c" 1>&6
11252 else
11253   cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 #include <$ac_hdr>
11257 EOF
11258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11259 { (eval echo configure:11260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11261 if test -z "$ac_err"; then
11262   rm -rf conftest*
11263   eval "ac_cv_header_$ac_safe=yes"
11264 else
11265   echo "$ac_err" >&5
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=no"
11270 fi
11271 rm -f conftest*
11272 fi
11273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11274   echo "$ac_t""yes" 1>&6
11275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11276   cat >> confdefs.h <<EOF
11277 #define $ac_tr_hdr 1
11278 EOF
11279  
11280 else
11281   echo "$ac_t""no" 1>&6
11282 fi
11283 done
11284
11285         for ac_func in sched_yield pthread_yield
11286 do
11287 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11288 echo "configure:11289: checking for $ac_func" >&5
11289 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11290   echo $ac_n "(cached) $ac_c" 1>&6
11291 else
11292   cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295 /* System header to define __stub macros and hopefully few prototypes,
11296     which can conflict with char $ac_func(); below.  */
11297 #include <assert.h>
11298 /* Override any gcc2 internal prototype to avoid an error.  */
11299 /* We use char because int might match the return type of a gcc2
11300     builtin and then its argument prototype would still apply.  */
11301 char $ac_func();
11302 char (*f)();
11303
11304 int main() {
11305
11306 /* The GNU C library defines this for functions which it implements
11307     to always fail with ENOSYS.  Some functions are actually named
11308     something starting with __ and the normal name is an alias.  */
11309 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11310 choke me
11311 #else
11312 f = $ac_func;
11313 #endif
11314
11315 ; return 0; }
11316 EOF
11317 if { (eval echo configure:11318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11318   rm -rf conftest*
11319   eval "ac_cv_func_$ac_func=yes"
11320 else
11321   echo "configure: failed program was:" >&5
11322   cat conftest.$ac_ext >&5
11323   rm -rf conftest*
11324   eval "ac_cv_func_$ac_func=no"
11325 fi
11326 rm -f conftest*
11327 fi
11328
11329 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11330   echo "$ac_t""yes" 1>&6
11331     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11332   cat >> confdefs.h <<EOF
11333 #define $ac_tr_func 1
11334 EOF
11335  
11336 else
11337   echo "$ac_t""no" 1>&6
11338 fi
11339 done
11340
11341         
11342         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11343 echo "configure:11344: checking for LinuxThreads pthread.h" >&5
11344 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350 #include <pthread.h>
11351 EOF
11352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11353   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11354   rm -rf conftest*
11355   ol_cv_header_linux_threads=yes
11356 else
11357   rm -rf conftest*
11358   ol_cv_header_linux_threads=no
11359 fi
11360 rm -f conftest*
11361
11362                 
11363 fi
11364
11365 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11366         if test $ol_cv_header_linux_threads = yes; then
11367                 cat >> confdefs.h <<\EOF
11368 #define HAVE_LINUX_THREADS 1
11369 EOF
11370
11371         fi
11372
11373
11374         for ac_hdr in mach/cthreads.h
11375 do
11376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11378 echo "configure:11379: checking for $ac_hdr" >&5
11379 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11380   echo $ac_n "(cached) $ac_c" 1>&6
11381 else
11382   cat > conftest.$ac_ext <<EOF
11383 #line 11384 "configure"
11384 #include "confdefs.h"
11385 #include <$ac_hdr>
11386 EOF
11387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11388 { (eval echo configure:11389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11390 if test -z "$ac_err"; then
11391   rm -rf conftest*
11392   eval "ac_cv_header_$ac_safe=yes"
11393 else
11394   echo "$ac_err" >&5
11395   echo "configure: failed program was:" >&5
11396   cat conftest.$ac_ext >&5
11397   rm -rf conftest*
11398   eval "ac_cv_header_$ac_safe=no"
11399 fi
11400 rm -f conftest*
11401 fi
11402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11403   echo "$ac_t""yes" 1>&6
11404     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11405   cat >> confdefs.h <<EOF
11406 #define $ac_tr_hdr 1
11407 EOF
11408  
11409 else
11410   echo "$ac_t""no" 1>&6
11411 fi
11412 done
11413
11414         for ac_hdr in lwp/lwp.h
11415 do
11416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11418 echo "configure:11419: checking for $ac_hdr" >&5
11419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11420   echo $ac_n "(cached) $ac_c" 1>&6
11421 else
11422   cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 #include <$ac_hdr>
11426 EOF
11427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11428 { (eval echo configure:11429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11430 if test -z "$ac_err"; then
11431   rm -rf conftest*
11432   eval "ac_cv_header_$ac_safe=yes"
11433 else
11434   echo "$ac_err" >&5
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=no"
11439 fi
11440 rm -f conftest*
11441 fi
11442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11443   echo "$ac_t""yes" 1>&6
11444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11445   cat >> confdefs.h <<EOF
11446 #define $ac_tr_hdr 1
11447 EOF
11448  
11449 else
11450   echo "$ac_t""no" 1>&6
11451 fi
11452 done
11453
11454         for ac_hdr in thread.h synch.h
11455 do
11456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11458 echo "configure:11459: checking for $ac_hdr" >&5
11459 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11460   echo $ac_n "(cached) $ac_c" 1>&6
11461 else
11462   cat > conftest.$ac_ext <<EOF
11463 #line 11464 "configure"
11464 #include "confdefs.h"
11465 #include <$ac_hdr>
11466 EOF
11467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11468 { (eval echo configure:11469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11470 if test -z "$ac_err"; then
11471   rm -rf conftest*
11472   eval "ac_cv_header_$ac_safe=yes"
11473 else
11474   echo "$ac_err" >&5
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   eval "ac_cv_header_$ac_safe=no"
11479 fi
11480 rm -f conftest*
11481 fi
11482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11483   echo "$ac_t""yes" 1>&6
11484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11485   cat >> confdefs.h <<EOF
11486 #define $ac_tr_hdr 1
11487 EOF
11488  
11489 else
11490   echo "$ac_t""no" 1>&6
11491 fi
11492 done
11493
11494 fi
11495
11496 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11497                         cat >> confdefs.h <<\EOF
11498 #define REENTRANT 1
11499 EOF
11500
11501         cat >> confdefs.h <<\EOF
11502 #define _REENTRANT 1
11503 EOF
11504
11505         cat >> confdefs.h <<\EOF
11506 #define THREAD_SAFE 1
11507 EOF
11508
11509         cat >> confdefs.h <<\EOF
11510 #define _THREAD_SAFE 1
11511 EOF
11512
11513         cat >> confdefs.h <<\EOF
11514 #define THREADSAFE 1
11515 EOF
11516
11517         cat >> confdefs.h <<\EOF
11518 #define _THREADSAFE 1
11519 EOF
11520
11521         cat >> confdefs.h <<\EOF
11522 #define _SGI_MP_SOURCE 1
11523 EOF
11524
11525
11526                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11527 echo "configure:11528: checking for thread specific errno" >&5
11528 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11529   echo $ac_n "(cached) $ac_c" 1>&6
11530 else
11531   
11532                 cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535 #include <errno.h>
11536 int main() {
11537 errno = 0;
11538 ; return 0; }
11539 EOF
11540 if { (eval echo configure:11541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11541   rm -rf conftest*
11542   ol_cv_errno_thread_specific=yes
11543 else
11544   echo "configure: failed program was:" >&5
11545   cat conftest.$ac_ext >&5
11546   rm -rf conftest*
11547   ol_cv_errno_thread_specific=no
11548 fi
11549 rm -f conftest*
11550         
11551 fi
11552
11553 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11554
11555                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11556 echo "configure:11557: checking for thread specific h_errno" >&5
11557 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11558   echo $ac_n "(cached) $ac_c" 1>&6
11559 else
11560   
11561                 cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564 #include <netdb.h>
11565 int main() {
11566 h_errno = 0;
11567 ; return 0; }
11568 EOF
11569 if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11570   rm -rf conftest*
11571   ol_cv_h_errno_thread_specific=yes
11572 else
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -rf conftest*
11576   ol_cv_h_errno_thread_specific=no
11577 fi
11578 rm -f conftest*
11579         
11580 fi
11581
11582 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11583
11584         if test $ol_cv_errno_thread_specific != yes \
11585                 -o $ol_cv_h_errno_thread_specific != yes ; then
11586                 LIBS="$LTHREAD_LIBS $LIBS"
11587                 LTHREAD_LIBS=""
11588         fi
11589
11590 fi  
11591
11592 if test $ol_link_threads = no ; then
11593         if test $ol_with_threads = yes ; then
11594                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11595         fi
11596
11597         if test $ol_with_threads = auto ; then
11598                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11599                 ol_with_threads=no
11600         fi
11601
11602         cat >> confdefs.h <<\EOF
11603 #define NO_THREADS 1
11604 EOF
11605
11606         LTHREAD_LIBS=""
11607 fi
11608
11609 if test $ol_link_threads != no ; then
11610         cat >> confdefs.h <<\EOF
11611 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11612 EOF
11613
11614 fi
11615
11616 ol_link_ldbm=no 
11617
11618 if test $ol_with_ldbm_api = auto \
11619         -o $ol_with_ldbm_api = berkeley \
11620         -o $ol_with_ldbm_api = bcompat ; then
11621
11622         if test $ol_with_ldbm_api = bcompat; then \
11623                 ol_cv_berkeley_db=no
11624 for ac_hdr in db_185.h db.h
11625 do
11626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11628 echo "configure:11629: checking for $ac_hdr" >&5
11629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635 #include <$ac_hdr>
11636 EOF
11637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11638 { (eval echo configure:11639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11640 if test -z "$ac_err"; then
11641   rm -rf conftest*
11642   eval "ac_cv_header_$ac_safe=yes"
11643 else
11644   echo "$ac_err" >&5
11645   echo "configure: failed program was:" >&5
11646   cat conftest.$ac_ext >&5
11647   rm -rf conftest*
11648   eval "ac_cv_header_$ac_safe=no"
11649 fi
11650 rm -f conftest*
11651 fi
11652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11653   echo "$ac_t""yes" 1>&6
11654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11655   cat >> confdefs.h <<EOF
11656 #define $ac_tr_hdr 1
11657 EOF
11658  
11659 else
11660   echo "$ac_t""no" 1>&6
11661 fi
11662 done
11663
11664 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11665         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11666 echo "configure:11667: checking if Berkeley DB header compatibility" >&5
11667 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11668   echo $ac_n "(cached) $ac_c" 1>&6
11669 else
11670   
11671                 cat > conftest.$ac_ext <<EOF
11672 #line 11673 "configure"
11673 #include "confdefs.h"
11674
11675 #if HAVE_DB_185_H
11676 #       include <db_185.h>
11677 #else
11678 #       include <db.h>
11679 #endif
11680
11681  /* this check could be improved */
11682 #ifndef DB_VERSION_MAJOR
11683 #       define DB_VERSION_MAJOR 1
11684 #endif
11685
11686 #if DB_VERSION_MAJOR == 1 
11687         __db_version_1
11688 #endif
11689
11690 EOF
11691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11692   egrep "__db_version_1" >/dev/null 2>&1; then
11693   rm -rf conftest*
11694   ol_cv_header_db1=yes
11695 else
11696   rm -rf conftest*
11697   ol_cv_header_db1=no
11698 fi
11699 rm -f conftest*
11700
11701 fi
11702
11703 echo "$ac_t""$ol_cv_header_db1" 1>&6
11704
11705         if test ol_cv_header_db1=yes ; then
11706                 ol_cv_lib_db=no
11707 if test $ol_cv_lib_db = no ; then
11708         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11709 echo "configure:11710: checking for Berkeley DB link (default)" >&5
11710 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11711   echo $ac_n "(cached) $ac_c" 1>&6
11712 else
11713   
11714         ol_DB_LIB=
11715         ol_LIBS=$LIBS
11716         LIBS="$ol_DB_LIB $LIBS"
11717
11718         cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721
11722 #ifdef HAVE_DB_185_H
11723 # include <db_185.h>
11724 #else
11725 # include <db.h>
11726 #endif
11727
11728 #ifndef DB_VERSION_MAJOR
11729 # define DB_VERSION_MAJOR 1
11730 #endif
11731
11732 #ifndef NULL
11733 #define NULL ((void*)0)
11734 #endif
11735
11736 int main() {
11737
11738 #if DB_VERSION_MAJOR > 2
11739         db_env_create( NULL, 0 );
11740 #elif DB_VERSION_MAJOR > 1
11741         db_appexit( NULL );
11742 #else
11743         (void) dbopen( NULL, 0, 0, 0, NULL);
11744 #endif
11745
11746 ; return 0; }
11747 EOF
11748 if { (eval echo configure:11749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11749   rm -rf conftest*
11750   ol_cv_db_none=yes
11751 else
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   ol_cv_db_none=no
11756 fi
11757 rm -f conftest*
11758
11759         LIBS="$ol_LIBS"
11760
11761 fi
11762
11763 echo "$ac_t""$ol_cv_db_none" 1>&6
11764
11765         if test $ol_cv_db_none = yes ; then
11766                 ol_cv_lib_db=yes
11767         fi
11768 fi
11769
11770 if test $ol_cv_lib_db = no ; then
11771         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11772 echo "configure:11773: checking for Berkeley DB link (-ldb)" >&5
11773 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   
11777         ol_DB_LIB=-ldb
11778         ol_LIBS=$LIBS
11779         LIBS="$ol_DB_LIB $LIBS"
11780
11781         cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784
11785 #ifdef HAVE_DB_185_H
11786 # include <db_185.h>
11787 #else
11788 # include <db.h>
11789 #endif
11790
11791 #ifndef DB_VERSION_MAJOR
11792 # define DB_VERSION_MAJOR 1
11793 #endif
11794
11795 #ifndef NULL
11796 #define NULL ((void*)0)
11797 #endif
11798
11799 int main() {
11800
11801 #if DB_VERSION_MAJOR > 2
11802         db_env_create( NULL, 0 );
11803 #elif DB_VERSION_MAJOR > 1
11804         db_appexit( NULL );
11805 #else
11806         (void) dbopen( NULL, 0, 0, 0, NULL);
11807 #endif
11808
11809 ; return 0; }
11810 EOF
11811 if { (eval echo configure:11812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11812   rm -rf conftest*
11813   ol_cv_db_db=yes
11814 else
11815   echo "configure: failed program was:" >&5
11816   cat conftest.$ac_ext >&5
11817   rm -rf conftest*
11818   ol_cv_db_db=no
11819 fi
11820 rm -f conftest*
11821
11822         LIBS="$ol_LIBS"
11823
11824 fi
11825
11826 echo "$ac_t""$ol_cv_db_db" 1>&6
11827
11828         if test $ol_cv_db_db = yes ; then
11829                 ol_cv_lib_db=-ldb
11830         fi
11831 fi
11832
11833 if test $ol_cv_lib_db = no ; then
11834         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11835 echo "configure:11836: checking for Berkeley DB link (-ldb3)" >&5
11836 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11837   echo $ac_n "(cached) $ac_c" 1>&6
11838 else
11839   
11840         ol_DB_LIB=-ldb3
11841         ol_LIBS=$LIBS
11842         LIBS="$ol_DB_LIB $LIBS"
11843
11844         cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847
11848 #ifdef HAVE_DB_185_H
11849 # include <db_185.h>
11850 #else
11851 # include <db.h>
11852 #endif
11853
11854 #ifndef DB_VERSION_MAJOR
11855 # define DB_VERSION_MAJOR 1
11856 #endif
11857
11858 #ifndef NULL
11859 #define NULL ((void*)0)
11860 #endif
11861
11862 int main() {
11863
11864 #if DB_VERSION_MAJOR > 2
11865         db_env_create( NULL, 0 );
11866 #elif DB_VERSION_MAJOR > 1
11867         db_appexit( NULL );
11868 #else
11869         (void) dbopen( NULL, 0, 0, 0, NULL);
11870 #endif
11871
11872 ; return 0; }
11873 EOF
11874 if { (eval echo configure:11875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11875   rm -rf conftest*
11876   ol_cv_db_db3=yes
11877 else
11878   echo "configure: failed program was:" >&5
11879   cat conftest.$ac_ext >&5
11880   rm -rf conftest*
11881   ol_cv_db_db3=no
11882 fi
11883 rm -f conftest*
11884
11885         LIBS="$ol_LIBS"
11886
11887 fi
11888
11889 echo "$ac_t""$ol_cv_db_db3" 1>&6
11890
11891         if test $ol_cv_db_db3 = yes ; then
11892                 ol_cv_lib_db=-ldb3
11893         fi
11894 fi
11895
11896 if test $ol_cv_lib_db = no ; then
11897         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11898 echo "configure:11899: checking for Berkeley DB link (-ldb2)" >&5
11899 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11900   echo $ac_n "(cached) $ac_c" 1>&6
11901 else
11902   
11903         ol_DB_LIB=-ldb2
11904         ol_LIBS=$LIBS
11905         LIBS="$ol_DB_LIB $LIBS"
11906
11907         cat > conftest.$ac_ext <<EOF
11908 #line 11909 "configure"
11909 #include "confdefs.h"
11910
11911 #ifdef HAVE_DB_185_H
11912 # include <db_185.h>
11913 #else
11914 # include <db.h>
11915 #endif
11916
11917 #ifndef DB_VERSION_MAJOR
11918 # define DB_VERSION_MAJOR 1
11919 #endif
11920
11921 #ifndef NULL
11922 #define NULL ((void*)0)
11923 #endif
11924
11925 int main() {
11926
11927 #if DB_VERSION_MAJOR > 2
11928         db_env_create( NULL, 0 );
11929 #elif DB_VERSION_MAJOR > 1
11930         db_appexit( NULL );
11931 #else
11932         (void) dbopen( NULL, 0, 0, 0, NULL);
11933 #endif
11934
11935 ; return 0; }
11936 EOF
11937 if { (eval echo configure:11938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11938   rm -rf conftest*
11939   ol_cv_db_db2=yes
11940 else
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -rf conftest*
11944   ol_cv_db_db2=no
11945 fi
11946 rm -f conftest*
11947
11948         LIBS="$ol_LIBS"
11949
11950 fi
11951
11952 echo "$ac_t""$ol_cv_db_db2" 1>&6
11953
11954         if test $ol_cv_db_db2 = yes ; then
11955                 ol_cv_lib_db=-ldb2
11956         fi
11957 fi
11958
11959 if test $ol_cv_lib_db = no ; then
11960         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11961 echo "configure:11962: checking for Berkeley DB link (-ldb1)" >&5
11962 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11963   echo $ac_n "(cached) $ac_c" 1>&6
11964 else
11965   
11966         ol_DB_LIB=-ldb1
11967         ol_LIBS=$LIBS
11968         LIBS="$ol_DB_LIB $LIBS"
11969
11970         cat > conftest.$ac_ext <<EOF
11971 #line 11972 "configure"
11972 #include "confdefs.h"
11973
11974 #ifdef HAVE_DB_185_H
11975 # include <db_185.h>
11976 #else
11977 # include <db.h>
11978 #endif
11979
11980 #ifndef DB_VERSION_MAJOR
11981 # define DB_VERSION_MAJOR 1
11982 #endif
11983
11984 #ifndef NULL
11985 #define NULL ((void*)0)
11986 #endif
11987
11988 int main() {
11989
11990 #if DB_VERSION_MAJOR > 2
11991         db_env_create( NULL, 0 );
11992 #elif DB_VERSION_MAJOR > 1
11993         db_appexit( NULL );
11994 #else
11995         (void) dbopen( NULL, 0, 0, 0, NULL);
11996 #endif
11997
11998 ; return 0; }
11999 EOF
12000 if { (eval echo configure:12001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12001   rm -rf conftest*
12002   ol_cv_db_db1=yes
12003 else
12004   echo "configure: failed program was:" >&5
12005   cat conftest.$ac_ext >&5
12006   rm -rf conftest*
12007   ol_cv_db_db1=no
12008 fi
12009 rm -f conftest*
12010
12011         LIBS="$ol_LIBS"
12012
12013 fi
12014
12015 echo "$ac_t""$ol_cv_db_db1" 1>&6
12016
12017         if test $ol_cv_db_db1 = yes ; then
12018                 ol_cv_lib_db=-ldb1
12019         fi
12020 fi
12021
12022
12023                 if test "$ol_cv_lib_db" != no ; then
12024                         ol_cv_berkeley_db=yes
12025                 fi
12026         fi
12027 fi
12028
12029         else
12030                 ol_cv_berkeley_db=no
12031 for ac_hdr in db.h
12032 do
12033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12035 echo "configure:12036: checking for $ac_hdr" >&5
12036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12037   echo $ac_n "(cached) $ac_c" 1>&6
12038 else
12039   cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 #include <$ac_hdr>
12043 EOF
12044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12045 { (eval echo configure:12046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12047 if test -z "$ac_err"; then
12048   rm -rf conftest*
12049   eval "ac_cv_header_$ac_safe=yes"
12050 else
12051   echo "$ac_err" >&5
12052   echo "configure: failed program was:" >&5
12053   cat conftest.$ac_ext >&5
12054   rm -rf conftest*
12055   eval "ac_cv_header_$ac_safe=no"
12056 fi
12057 rm -f conftest*
12058 fi
12059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12060   echo "$ac_t""yes" 1>&6
12061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12062   cat >> confdefs.h <<EOF
12063 #define $ac_tr_hdr 1
12064 EOF
12065  
12066 else
12067   echo "$ac_t""no" 1>&6
12068 fi
12069 done
12070
12071 if test $ac_cv_header_db_h = yes; then
12072         ol_cv_lib_db=no
12073 if test $ol_cv_lib_db = no ; then
12074         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12075 echo "configure:12076: checking for Berkeley DB link (default)" >&5
12076 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12077   echo $ac_n "(cached) $ac_c" 1>&6
12078 else
12079   
12080         ol_DB_LIB=
12081         ol_LIBS=$LIBS
12082         LIBS="$ol_DB_LIB $LIBS"
12083
12084         cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087
12088 #ifdef HAVE_DB_185_H
12089 # include <db_185.h>
12090 #else
12091 # include <db.h>
12092 #endif
12093
12094 #ifndef DB_VERSION_MAJOR
12095 # define DB_VERSION_MAJOR 1
12096 #endif
12097
12098 #ifndef NULL
12099 #define NULL ((void*)0)
12100 #endif
12101
12102 int main() {
12103
12104 #if DB_VERSION_MAJOR > 2
12105         db_env_create( NULL, 0 );
12106 #elif DB_VERSION_MAJOR > 1
12107         db_appexit( NULL );
12108 #else
12109         (void) dbopen( NULL, 0, 0, 0, NULL);
12110 #endif
12111
12112 ; return 0; }
12113 EOF
12114 if { (eval echo configure:12115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12115   rm -rf conftest*
12116   ol_cv_db_none=yes
12117 else
12118   echo "configure: failed program was:" >&5
12119   cat conftest.$ac_ext >&5
12120   rm -rf conftest*
12121   ol_cv_db_none=no
12122 fi
12123 rm -f conftest*
12124
12125         LIBS="$ol_LIBS"
12126
12127 fi
12128
12129 echo "$ac_t""$ol_cv_db_none" 1>&6
12130
12131         if test $ol_cv_db_none = yes ; then
12132                 ol_cv_lib_db=yes
12133         fi
12134 fi
12135
12136 if test $ol_cv_lib_db = no ; then
12137         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12138 echo "configure:12139: checking for Berkeley DB link (-ldb)" >&5
12139 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12140   echo $ac_n "(cached) $ac_c" 1>&6
12141 else
12142   
12143         ol_DB_LIB=-ldb
12144         ol_LIBS=$LIBS
12145         LIBS="$ol_DB_LIB $LIBS"
12146
12147         cat > conftest.$ac_ext <<EOF
12148 #line 12149 "configure"
12149 #include "confdefs.h"
12150
12151 #ifdef HAVE_DB_185_H
12152 # include <db_185.h>
12153 #else
12154 # include <db.h>
12155 #endif
12156
12157 #ifndef DB_VERSION_MAJOR
12158 # define DB_VERSION_MAJOR 1
12159 #endif
12160
12161 #ifndef NULL
12162 #define NULL ((void*)0)
12163 #endif
12164
12165 int main() {
12166
12167 #if DB_VERSION_MAJOR > 2
12168         db_env_create( NULL, 0 );
12169 #elif DB_VERSION_MAJOR > 1
12170         db_appexit( NULL );
12171 #else
12172         (void) dbopen( NULL, 0, 0, 0, NULL);
12173 #endif
12174
12175 ; return 0; }
12176 EOF
12177 if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12178   rm -rf conftest*
12179   ol_cv_db_db=yes
12180 else
12181   echo "configure: failed program was:" >&5
12182   cat conftest.$ac_ext >&5
12183   rm -rf conftest*
12184   ol_cv_db_db=no
12185 fi
12186 rm -f conftest*
12187
12188         LIBS="$ol_LIBS"
12189
12190 fi
12191
12192 echo "$ac_t""$ol_cv_db_db" 1>&6
12193
12194         if test $ol_cv_db_db = yes ; then
12195                 ol_cv_lib_db=-ldb
12196         fi
12197 fi
12198
12199 if test $ol_cv_lib_db = no ; then
12200         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12201 echo "configure:12202: checking for Berkeley DB link (-ldb3)" >&5
12202 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12203   echo $ac_n "(cached) $ac_c" 1>&6
12204 else
12205   
12206         ol_DB_LIB=-ldb3
12207         ol_LIBS=$LIBS
12208         LIBS="$ol_DB_LIB $LIBS"
12209
12210         cat > conftest.$ac_ext <<EOF
12211 #line 12212 "configure"
12212 #include "confdefs.h"
12213
12214 #ifdef HAVE_DB_185_H
12215 # include <db_185.h>
12216 #else
12217 # include <db.h>
12218 #endif
12219
12220 #ifndef DB_VERSION_MAJOR
12221 # define DB_VERSION_MAJOR 1
12222 #endif
12223
12224 #ifndef NULL
12225 #define NULL ((void*)0)
12226 #endif
12227
12228 int main() {
12229
12230 #if DB_VERSION_MAJOR > 2
12231         db_env_create( NULL, 0 );
12232 #elif DB_VERSION_MAJOR > 1
12233         db_appexit( NULL );
12234 #else
12235         (void) dbopen( NULL, 0, 0, 0, NULL);
12236 #endif
12237
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   ol_cv_db_db3=yes
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   ol_cv_db_db3=no
12248 fi
12249 rm -f conftest*
12250
12251         LIBS="$ol_LIBS"
12252
12253 fi
12254
12255 echo "$ac_t""$ol_cv_db_db3" 1>&6
12256
12257         if test $ol_cv_db_db3 = yes ; then
12258                 ol_cv_lib_db=-ldb3
12259         fi
12260 fi
12261
12262 if test $ol_cv_lib_db = no ; then
12263         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12264 echo "configure:12265: checking for Berkeley DB link (-ldb2)" >&5
12265 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12266   echo $ac_n "(cached) $ac_c" 1>&6
12267 else
12268   
12269         ol_DB_LIB=-ldb2
12270         ol_LIBS=$LIBS
12271         LIBS="$ol_DB_LIB $LIBS"
12272
12273         cat > conftest.$ac_ext <<EOF
12274 #line 12275 "configure"
12275 #include "confdefs.h"
12276
12277 #ifdef HAVE_DB_185_H
12278 # include <db_185.h>
12279 #else
12280 # include <db.h>
12281 #endif
12282
12283 #ifndef DB_VERSION_MAJOR
12284 # define DB_VERSION_MAJOR 1
12285 #endif
12286
12287 #ifndef NULL
12288 #define NULL ((void*)0)
12289 #endif
12290
12291 int main() {
12292
12293 #if DB_VERSION_MAJOR > 2
12294         db_env_create( NULL, 0 );
12295 #elif DB_VERSION_MAJOR > 1
12296         db_appexit( NULL );
12297 #else
12298         (void) dbopen( NULL, 0, 0, 0, NULL);
12299 #endif
12300
12301 ; return 0; }
12302 EOF
12303 if { (eval echo configure:12304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12304   rm -rf conftest*
12305   ol_cv_db_db2=yes
12306 else
12307   echo "configure: failed program was:" >&5
12308   cat conftest.$ac_ext >&5
12309   rm -rf conftest*
12310   ol_cv_db_db2=no
12311 fi
12312 rm -f conftest*
12313
12314         LIBS="$ol_LIBS"
12315
12316 fi
12317
12318 echo "$ac_t""$ol_cv_db_db2" 1>&6
12319
12320         if test $ol_cv_db_db2 = yes ; then
12321                 ol_cv_lib_db=-ldb2
12322         fi
12323 fi
12324
12325 if test $ol_cv_lib_db = no ; then
12326         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12327 echo "configure:12328: checking for Berkeley DB link (-ldb1)" >&5
12328 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12329   echo $ac_n "(cached) $ac_c" 1>&6
12330 else
12331   
12332         ol_DB_LIB=-ldb1
12333         ol_LIBS=$LIBS
12334         LIBS="$ol_DB_LIB $LIBS"
12335
12336         cat > conftest.$ac_ext <<EOF
12337 #line 12338 "configure"
12338 #include "confdefs.h"
12339
12340 #ifdef HAVE_DB_185_H
12341 # include <db_185.h>
12342 #else
12343 # include <db.h>
12344 #endif
12345
12346 #ifndef DB_VERSION_MAJOR
12347 # define DB_VERSION_MAJOR 1
12348 #endif
12349
12350 #ifndef NULL
12351 #define NULL ((void*)0)
12352 #endif
12353
12354 int main() {
12355
12356 #if DB_VERSION_MAJOR > 2
12357         db_env_create( NULL, 0 );
12358 #elif DB_VERSION_MAJOR > 1
12359         db_appexit( NULL );
12360 #else
12361         (void) dbopen( NULL, 0, 0, 0, NULL);
12362 #endif
12363
12364 ; return 0; }
12365 EOF
12366 if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12367   rm -rf conftest*
12368   ol_cv_db_db1=yes
12369 else
12370   echo "configure: failed program was:" >&5
12371   cat conftest.$ac_ext >&5
12372   rm -rf conftest*
12373   ol_cv_db_db1=no
12374 fi
12375 rm -f conftest*
12376
12377         LIBS="$ol_LIBS"
12378
12379 fi
12380
12381 echo "$ac_t""$ol_cv_db_db1" 1>&6
12382
12383         if test $ol_cv_db_db1 = yes ; then
12384                 ol_cv_lib_db=-ldb1
12385         fi
12386 fi
12387
12388
12389         if test "$ol_cv_lib_db" != no ; then
12390                 ol_cv_berkeley_db=yes
12391                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12392 echo "configure:12393: checking for Berkeley DB thread support" >&5
12393 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12394   echo $ac_n "(cached) $ac_c" 1>&6
12395 else
12396   
12397         ol_LIBS="$LIBS"
12398         if test $ol_cv_lib_db != yes ; then
12399                 LIBS="$ol_cv_lib_db"
12400         fi
12401
12402         if test "$cross_compiling" = yes; then
12403   ol_cv_berkeley_db_thread=cross
12404 else
12405   cat > conftest.$ac_ext <<EOF
12406 #line 12407 "configure"
12407 #include "confdefs.h"
12408
12409 #ifdef HAVE_DB_185_H
12410         choke me;
12411 #else
12412 #include <db.h>
12413 #endif
12414 #ifndef NULL
12415 #define NULL ((void *)0)
12416 #endif
12417 main()
12418 {
12419         int rc;
12420         u_int32_t flags = DB_CREATE | DB_THREAD;
12421
12422 #if DB_VERSION_MAJOR > 2
12423         DB_ENV *env = NULL;
12424
12425         rc = db_env_create( &env, 0 );
12426
12427         if( rc == 0 ) {
12428 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12429                 rc = env->open( env, NULL, flags, 0 );
12430 #else
12431                 rc = env->open( env, NULL, NULL, flags, 0 );
12432 #endif
12433         }
12434
12435 #else
12436         DB_ENV env;
12437         memset( &env, '\0', sizeof(env) );
12438
12439         rc = db_appinit( NULL, NULL, &env, flags );
12440
12441         if( rc == 0 ) {
12442                 db_appexit( &env );
12443         }
12444 #endif
12445 #if DB_VERSION_MAJOR > 2
12446 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12447         env->remove( env, NULL, DB_FORCE);
12448 #else
12449         env->remove( env, NULL, NULL, DB_FORCE);
12450 #endif
12451 #endif
12452
12453         return rc;
12454 }
12455 EOF
12456 if { (eval echo configure:12457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12457 then
12458   ol_cv_berkeley_db_thread=yes
12459 else
12460   echo "configure: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   rm -fr conftest*
12463   ol_cv_berkeley_db_thread=no
12464 fi
12465 rm -fr conftest*
12466 fi
12467
12468
12469         LIBS="$ol_LIBS"
12470
12471         if test $ol_cv_berkeley_db_thread != no ; then
12472                 cat >> confdefs.h <<\EOF
12473 #define HAVE_BERKELEY_DB_THREAD 1
12474 EOF
12475
12476         fi
12477
12478 fi
12479
12480 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12481         fi
12482 fi
12483
12484         fi
12485
12486         if test $ol_cv_berkeley_db != no ; then
12487                 cat >> confdefs.h <<\EOF
12488 #define HAVE_BERKELEY_DB 1
12489 EOF
12490
12491
12492                 ol_link_ldbm=berkeley
12493                 ol_with_ldbm_api=db
12494
12495                 if test $ol_with_ldbm_type = hash ; then
12496                         cat >> confdefs.h <<\EOF
12497 #define LDBM_USE_DBHASH 1
12498 EOF
12499
12500                 else
12501                         cat >> confdefs.h <<\EOF
12502 #define LDBM_USE_DBBTREE 1
12503 EOF
12504
12505                 fi
12506
12507                                                 if test $ol_cv_lib_db != yes ; then
12508                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12509                 fi
12510         fi
12511 fi
12512
12513 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12514         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12515         ol_with_ldbm_api=none
12516 fi
12517
12518 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12519         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12520 echo "configure:12521: checking for MDBM library" >&5
12521 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12522   echo $ac_n "(cached) $ac_c" 1>&6
12523 else
12524         ol_LIBS="$LIBS"
12525         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12526 echo "configure:12527: checking for mdbm_set_chain" >&5
12527 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12528   echo $ac_n "(cached) $ac_c" 1>&6
12529 else
12530   cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 /* System header to define __stub macros and hopefully few prototypes,
12534     which can conflict with char mdbm_set_chain(); below.  */
12535 #include <assert.h>
12536 /* Override any gcc2 internal prototype to avoid an error.  */
12537 /* We use char because int might match the return type of a gcc2
12538     builtin and then its argument prototype would still apply.  */
12539 char mdbm_set_chain();
12540 char (*f)();
12541
12542 int main() {
12543
12544 /* The GNU C library defines this for functions which it implements
12545     to always fail with ENOSYS.  Some functions are actually named
12546     something starting with __ and the normal name is an alias.  */
12547 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12548 choke me
12549 #else
12550 f = mdbm_set_chain;
12551 #endif
12552
12553 ; return 0; }
12554 EOF
12555 if { (eval echo configure:12556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12556   rm -rf conftest*
12557   eval "ac_cv_func_mdbm_set_chain=yes"
12558 else
12559   echo "configure: failed program was:" >&5
12560   cat conftest.$ac_ext >&5
12561   rm -rf conftest*
12562   eval "ac_cv_func_mdbm_set_chain=no"
12563 fi
12564 rm -f conftest*
12565 fi
12566
12567 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12568   echo "$ac_t""yes" 1>&6
12569   ol_cv_lib_mdbm=yes
12570 else
12571   echo "$ac_t""no" 1>&6
12572
12573                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12574 echo "configure:12575: checking for mdbm_set_chain in -lmdbm" >&5
12575 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12577   echo $ac_n "(cached) $ac_c" 1>&6
12578 else
12579   ac_save_LIBS="$LIBS"
12580 LIBS="-lmdbm  $LIBS"
12581 cat > conftest.$ac_ext <<EOF
12582 #line 12583 "configure"
12583 #include "confdefs.h"
12584 /* Override any gcc2 internal prototype to avoid an error.  */
12585 /* We use char because int might match the return type of a gcc2
12586     builtin and then its argument prototype would still apply.  */
12587 char mdbm_set_chain();
12588
12589 int main() {
12590 mdbm_set_chain()
12591 ; return 0; }
12592 EOF
12593 if { (eval echo configure:12594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12594   rm -rf conftest*
12595   eval "ac_cv_lib_$ac_lib_var=yes"
12596 else
12597   echo "configure: failed program was:" >&5
12598   cat conftest.$ac_ext >&5
12599   rm -rf conftest*
12600   eval "ac_cv_lib_$ac_lib_var=no"
12601 fi
12602 rm -f conftest*
12603 LIBS="$ac_save_LIBS"
12604
12605 fi
12606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12607   echo "$ac_t""yes" 1>&6
12608   ol_cv_lib_mdbm=-lmdbm
12609 else
12610   echo "$ac_t""no" 1>&6
12611 ol_cv_lib_mdbm=no
12612 fi
12613
12614         
12615 fi
12616
12617         LIBS="$ol_LIBS"
12618
12619 fi
12620
12621 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12622
12623
12624  for ac_hdr in mdbm.h
12625 do
12626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12628 echo "configure:12629: checking for $ac_hdr" >&5
12629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12630   echo $ac_n "(cached) $ac_c" 1>&6
12631 else
12632   cat > conftest.$ac_ext <<EOF
12633 #line 12634 "configure"
12634 #include "confdefs.h"
12635 #include <$ac_hdr>
12636 EOF
12637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12638 { (eval echo configure:12639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12640 if test -z "$ac_err"; then
12641   rm -rf conftest*
12642   eval "ac_cv_header_$ac_safe=yes"
12643 else
12644   echo "$ac_err" >&5
12645   echo "configure: failed program was:" >&5
12646   cat conftest.$ac_ext >&5
12647   rm -rf conftest*
12648   eval "ac_cv_header_$ac_safe=no"
12649 fi
12650 rm -f conftest*
12651 fi
12652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12653   echo "$ac_t""yes" 1>&6
12654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12655   cat >> confdefs.h <<EOF
12656 #define $ac_tr_hdr 1
12657 EOF
12658  
12659 else
12660   echo "$ac_t""no" 1>&6
12661 fi
12662 done
12663
12664  echo $ac_n "checking for db""... $ac_c" 1>&6
12665 echo "configure:12666: checking for db" >&5
12666 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12667   echo $ac_n "(cached) $ac_c" 1>&6
12668 else
12669   
12670         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12671                 ol_cv_mdbm=no
12672         else
12673                 ol_cv_mdbm=yes
12674         fi
12675
12676 fi
12677
12678 echo "$ac_t""$ol_cv_mdbm" 1>&6
12679  if test $ol_cv_mdbm = yes ; then
12680         cat >> confdefs.h <<\EOF
12681 #define HAVE_MDBM 1
12682 EOF
12683
12684  fi
12685
12686
12687         if test $ol_cv_mdbm = yes ; then
12688                 ol_link_ldbm=mdbm
12689                 ol_with_ldbm_api=mdbm
12690                 if test $ol_cv_lib_mdbm != yes ; then
12691                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12692                 fi
12693         fi
12694 fi
12695
12696 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12697         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12698 echo "configure:12699: checking for GDBM library" >&5
12699 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12700   echo $ac_n "(cached) $ac_c" 1>&6
12701 else
12702         ol_LIBS="$LIBS"
12703         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12704 echo "configure:12705: checking for gdbm_open" >&5
12705 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12706   echo $ac_n "(cached) $ac_c" 1>&6
12707 else
12708   cat > conftest.$ac_ext <<EOF
12709 #line 12710 "configure"
12710 #include "confdefs.h"
12711 /* System header to define __stub macros and hopefully few prototypes,
12712     which can conflict with char gdbm_open(); below.  */
12713 #include <assert.h>
12714 /* Override any gcc2 internal prototype to avoid an error.  */
12715 /* We use char because int might match the return type of a gcc2
12716     builtin and then its argument prototype would still apply.  */
12717 char gdbm_open();
12718 char (*f)();
12719
12720 int main() {
12721
12722 /* The GNU C library defines this for functions which it implements
12723     to always fail with ENOSYS.  Some functions are actually named
12724     something starting with __ and the normal name is an alias.  */
12725 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12726 choke me
12727 #else
12728 f = gdbm_open;
12729 #endif
12730
12731 ; return 0; }
12732 EOF
12733 if { (eval echo configure:12734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12734   rm -rf conftest*
12735   eval "ac_cv_func_gdbm_open=yes"
12736 else
12737   echo "configure: failed program was:" >&5
12738   cat conftest.$ac_ext >&5
12739   rm -rf conftest*
12740   eval "ac_cv_func_gdbm_open=no"
12741 fi
12742 rm -f conftest*
12743 fi
12744
12745 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12746   echo "$ac_t""yes" 1>&6
12747   ol_cv_lib_gdbm=yes
12748 else
12749   echo "$ac_t""no" 1>&6
12750
12751                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12752 echo "configure:12753: checking for gdbm_open in -lgdbm" >&5
12753 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12755   echo $ac_n "(cached) $ac_c" 1>&6
12756 else
12757   ac_save_LIBS="$LIBS"
12758 LIBS="-lgdbm  $LIBS"
12759 cat > conftest.$ac_ext <<EOF
12760 #line 12761 "configure"
12761 #include "confdefs.h"
12762 /* Override any gcc2 internal prototype to avoid an error.  */
12763 /* We use char because int might match the return type of a gcc2
12764     builtin and then its argument prototype would still apply.  */
12765 char gdbm_open();
12766
12767 int main() {
12768 gdbm_open()
12769 ; return 0; }
12770 EOF
12771 if { (eval echo configure:12772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12772   rm -rf conftest*
12773   eval "ac_cv_lib_$ac_lib_var=yes"
12774 else
12775   echo "configure: failed program was:" >&5
12776   cat conftest.$ac_ext >&5
12777   rm -rf conftest*
12778   eval "ac_cv_lib_$ac_lib_var=no"
12779 fi
12780 rm -f conftest*
12781 LIBS="$ac_save_LIBS"
12782
12783 fi
12784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12785   echo "$ac_t""yes" 1>&6
12786   ol_cv_lib_gdbm=-lgdbm
12787 else
12788   echo "$ac_t""no" 1>&6
12789 ol_cv_lib_gdbm=no
12790 fi
12791
12792         
12793 fi
12794
12795         LIBS="$ol_LIBS"
12796
12797 fi
12798
12799 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12800
12801
12802  for ac_hdr in gdbm.h
12803 do
12804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12806 echo "configure:12807: checking for $ac_hdr" >&5
12807 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12808   echo $ac_n "(cached) $ac_c" 1>&6
12809 else
12810   cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 #include <$ac_hdr>
12814 EOF
12815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12816 { (eval echo configure:12817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12818 if test -z "$ac_err"; then
12819   rm -rf conftest*
12820   eval "ac_cv_header_$ac_safe=yes"
12821 else
12822   echo "$ac_err" >&5
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   eval "ac_cv_header_$ac_safe=no"
12827 fi
12828 rm -f conftest*
12829 fi
12830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12831   echo "$ac_t""yes" 1>&6
12832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12833   cat >> confdefs.h <<EOF
12834 #define $ac_tr_hdr 1
12835 EOF
12836  
12837 else
12838   echo "$ac_t""no" 1>&6
12839 fi
12840 done
12841
12842  echo $ac_n "checking for db""... $ac_c" 1>&6
12843 echo "configure:12844: checking for db" >&5
12844 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12845   echo $ac_n "(cached) $ac_c" 1>&6
12846 else
12847   
12848         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12849                 ol_cv_gdbm=no
12850         else
12851                 ol_cv_gdbm=yes
12852         fi
12853
12854 fi
12855
12856 echo "$ac_t""$ol_cv_gdbm" 1>&6
12857  if test $ol_cv_gdbm = yes ; then
12858         cat >> confdefs.h <<\EOF
12859 #define HAVE_GDBM 1
12860 EOF
12861
12862  fi
12863
12864
12865         if test $ol_cv_gdbm = yes ; then
12866                 ol_link_ldbm=gdbm
12867                 ol_with_ldbm_api=gdbm
12868
12869                 if test $ol_cv_lib_gdbm != yes ; then
12870                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12871                 fi
12872         fi
12873 fi
12874
12875 if test $ol_with_ldbm_api = ndbm ; then
12876         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12877 echo "configure:12878: checking for NDBM library" >&5
12878 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12879   echo $ac_n "(cached) $ac_c" 1>&6
12880 else
12881         ol_LIBS="$LIBS"
12882         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12883 echo "configure:12884: checking for dbm_open" >&5
12884 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12885   echo $ac_n "(cached) $ac_c" 1>&6
12886 else
12887   cat > conftest.$ac_ext <<EOF
12888 #line 12889 "configure"
12889 #include "confdefs.h"
12890 /* System header to define __stub macros and hopefully few prototypes,
12891     which can conflict with char dbm_open(); below.  */
12892 #include <assert.h>
12893 /* Override any gcc2 internal prototype to avoid an error.  */
12894 /* We use char because int might match the return type of a gcc2
12895     builtin and then its argument prototype would still apply.  */
12896 char dbm_open();
12897 char (*f)();
12898
12899 int main() {
12900
12901 /* The GNU C library defines this for functions which it implements
12902     to always fail with ENOSYS.  Some functions are actually named
12903     something starting with __ and the normal name is an alias.  */
12904 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12905 choke me
12906 #else
12907 f = dbm_open;
12908 #endif
12909
12910 ; return 0; }
12911 EOF
12912 if { (eval echo configure:12913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12913   rm -rf conftest*
12914   eval "ac_cv_func_dbm_open=yes"
12915 else
12916   echo "configure: failed program was:" >&5
12917   cat conftest.$ac_ext >&5
12918   rm -rf conftest*
12919   eval "ac_cv_func_dbm_open=no"
12920 fi
12921 rm -f conftest*
12922 fi
12923
12924 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12925   echo "$ac_t""yes" 1>&6
12926   ol_cv_lib_ndbm=yes
12927 else
12928   echo "$ac_t""no" 1>&6
12929
12930                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12931 echo "configure:12932: checking for dbm_open in -lndbm" >&5
12932 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12933 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12934   echo $ac_n "(cached) $ac_c" 1>&6
12935 else
12936   ac_save_LIBS="$LIBS"
12937 LIBS="-lndbm  $LIBS"
12938 cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 /* Override any gcc2 internal prototype to avoid an error.  */
12942 /* We use char because int might match the return type of a gcc2
12943     builtin and then its argument prototype would still apply.  */
12944 char dbm_open();
12945
12946 int main() {
12947 dbm_open()
12948 ; return 0; }
12949 EOF
12950 if { (eval echo configure:12951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12951   rm -rf conftest*
12952   eval "ac_cv_lib_$ac_lib_var=yes"
12953 else
12954   echo "configure: failed program was:" >&5
12955   cat conftest.$ac_ext >&5
12956   rm -rf conftest*
12957   eval "ac_cv_lib_$ac_lib_var=no"
12958 fi
12959 rm -f conftest*
12960 LIBS="$ac_save_LIBS"
12961
12962 fi
12963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12964   echo "$ac_t""yes" 1>&6
12965   ol_cv_lib_ndbm=-lndbm
12966 else
12967   echo "$ac_t""no" 1>&6
12968
12969                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12970 echo "configure:12971: checking for dbm_open in -ldbm" >&5
12971 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12972 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12973   echo $ac_n "(cached) $ac_c" 1>&6
12974 else
12975   ac_save_LIBS="$LIBS"
12976 LIBS="-ldbm  $LIBS"
12977 cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 /* Override any gcc2 internal prototype to avoid an error.  */
12981 /* We use char because int might match the return type of a gcc2
12982     builtin and then its argument prototype would still apply.  */
12983 char dbm_open();
12984
12985 int main() {
12986 dbm_open()
12987 ; return 0; }
12988 EOF
12989 if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12990   rm -rf conftest*
12991   eval "ac_cv_lib_$ac_lib_var=yes"
12992 else
12993   echo "configure: failed program was:" >&5
12994   cat conftest.$ac_ext >&5
12995   rm -rf conftest*
12996   eval "ac_cv_lib_$ac_lib_var=no"
12997 fi
12998 rm -f conftest*
12999 LIBS="$ac_save_LIBS"
13000
13001 fi
13002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13003   echo "$ac_t""yes" 1>&6
13004   ol_cv_lib_ndbm=-ldbm
13005 else
13006   echo "$ac_t""no" 1>&6
13007 ol_cv_lib_ndbm=no
13008 fi
13009                 
13010 fi
13011
13012         
13013 fi
13014
13015         LIBS="$ol_LIBS"
13016
13017 fi
13018
13019 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13020
13021
13022  for ac_hdr in ndbm.h
13023 do
13024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13026 echo "configure:13027: checking for $ac_hdr" >&5
13027 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13028   echo $ac_n "(cached) $ac_c" 1>&6
13029 else
13030   cat > conftest.$ac_ext <<EOF
13031 #line 13032 "configure"
13032 #include "confdefs.h"
13033 #include <$ac_hdr>
13034 EOF
13035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13036 { (eval echo configure:13037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13038 if test -z "$ac_err"; then
13039   rm -rf conftest*
13040   eval "ac_cv_header_$ac_safe=yes"
13041 else
13042   echo "$ac_err" >&5
13043   echo "configure: failed program was:" >&5
13044   cat conftest.$ac_ext >&5
13045   rm -rf conftest*
13046   eval "ac_cv_header_$ac_safe=no"
13047 fi
13048 rm -f conftest*
13049 fi
13050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13051   echo "$ac_t""yes" 1>&6
13052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13053   cat >> confdefs.h <<EOF
13054 #define $ac_tr_hdr 1
13055 EOF
13056  
13057 else
13058   echo "$ac_t""no" 1>&6
13059 fi
13060 done
13061
13062  echo $ac_n "checking for db""... $ac_c" 1>&6
13063 echo "configure:13064: checking for db" >&5
13064 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13065   echo $ac_n "(cached) $ac_c" 1>&6
13066 else
13067   
13068         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13069                 ol_cv_ndbm=no
13070         else
13071                 ol_cv_ndbm=yes
13072         fi
13073
13074 fi
13075
13076 echo "$ac_t""$ol_cv_ndbm" 1>&6
13077  if test $ol_cv_ndbm = yes ; then
13078         cat >> confdefs.h <<\EOF
13079 #define HAVE_NDBM 1
13080 EOF
13081
13082  fi
13083
13084
13085         if test $ol_cv_ndbm = yes ; then
13086                 ol_link_ldbm=ndbm
13087                 ol_with_ldbm_api=ndbm
13088
13089                 if test $ol_cv_lib_ndbm != yes ; then
13090                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13091                 fi
13092         fi
13093 fi
13094
13095 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13096         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13097         if test $ol_enable_ldbm = yes ; then
13098                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13099         fi
13100
13101         echo "configure: warning: disabling LDBM" 1>&2
13102         ol_enable_ldbm=no
13103 fi
13104
13105 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13106         LINK_BINS_DYNAMIC="yes"
13107 else
13108         LINK_BINS_DYNAMIC="no"
13109 fi
13110
13111 if test $ol_enable_wrappers != no ; then
13112         for ac_hdr in tcpd.h
13113 do
13114 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13115 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13116 echo "configure:13117: checking for $ac_hdr" >&5
13117 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13118   echo $ac_n "(cached) $ac_c" 1>&6
13119 else
13120   cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 #include <$ac_hdr>
13124 EOF
13125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13126 { (eval echo configure:13127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13128 if test -z "$ac_err"; then
13129   rm -rf conftest*
13130   eval "ac_cv_header_$ac_safe=yes"
13131 else
13132   echo "$ac_err" >&5
13133   echo "configure: failed program was:" >&5
13134   cat conftest.$ac_ext >&5
13135   rm -rf conftest*
13136   eval "ac_cv_header_$ac_safe=no"
13137 fi
13138 rm -f conftest*
13139 fi
13140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13141   echo "$ac_t""yes" 1>&6
13142     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13143   cat >> confdefs.h <<EOF
13144 #define $ac_tr_hdr 1
13145 EOF
13146  
13147 else
13148   echo "$ac_t""no" 1>&6
13149 fi
13150 done
13151
13152
13153         if test $ac_cv_header_tcpd_h != yes ; then
13154                 have_wrappers=no
13155         else
13156                 cat > conftest.$ac_ext <<EOF
13157 #line 13158 "configure"
13158 #include "confdefs.h"
13159
13160 int allow_severity = 0;
13161 int deny_severity  = 0;
13162                 
13163 int main() {
13164 hosts_access()
13165 ; return 0; }
13166 EOF
13167 if { (eval echo configure:13168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13168   rm -rf conftest*
13169   have_wrappers=yes
13170 else
13171   echo "configure: failed program was:" >&5
13172   cat conftest.$ac_ext >&5
13173   rm -rf conftest*
13174   have_wrappers=no
13175 fi
13176 rm -f conftest*
13177         fi
13178
13179         if test $have_wrappers = yes ; then
13180                 cat >> confdefs.h <<\EOF
13181 #define HAVE_TCPD 1
13182 EOF
13183
13184                 WRAP_LIBS="-lwrap"
13185
13186                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13187 echo "configure:13188: checking for main in -lnsl" >&5
13188 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13190   echo $ac_n "(cached) $ac_c" 1>&6
13191 else
13192   ac_save_LIBS="$LIBS"
13193 LIBS="-lnsl  $LIBS"
13194 cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197
13198 int main() {
13199 main()
13200 ; return 0; }
13201 EOF
13202 if { (eval echo configure:13203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13203   rm -rf conftest*
13204   eval "ac_cv_lib_$ac_lib_var=yes"
13205 else
13206   echo "configure: failed program was:" >&5
13207   cat conftest.$ac_ext >&5
13208   rm -rf conftest*
13209   eval "ac_cv_lib_$ac_lib_var=no"
13210 fi
13211 rm -f conftest*
13212 LIBS="$ac_save_LIBS"
13213
13214 fi
13215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13216   echo "$ac_t""yes" 1>&6
13217     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13219   cat >> confdefs.h <<EOF
13220 #define $ac_tr_lib 1
13221 EOF
13222
13223   LIBS="-lnsl $LIBS"
13224
13225 else
13226   echo "$ac_t""no" 1>&6
13227 fi
13228
13229         else
13230                 echo "configure: warning: could not find -lwrap" 1>&2
13231                 if test $ol_enable_wrappers = yes ; then
13232                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13233                 fi
13234
13235                 echo "configure: warning: disabling wrappers support" 1>&2
13236                 ol_enable_wrappers=no
13237                 WRAP_LIBS=""
13238         fi
13239 fi
13240
13241 if test $ol_enable_syslog != no ; then
13242         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13243 echo "configure:13244: checking for openlog" >&5
13244 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13245   echo $ac_n "(cached) $ac_c" 1>&6
13246 else
13247   cat > conftest.$ac_ext <<EOF
13248 #line 13249 "configure"
13249 #include "confdefs.h"
13250 /* System header to define __stub macros and hopefully few prototypes,
13251     which can conflict with char openlog(); below.  */
13252 #include <assert.h>
13253 /* Override any gcc2 internal prototype to avoid an error.  */
13254 /* We use char because int might match the return type of a gcc2
13255     builtin and then its argument prototype would still apply.  */
13256 char openlog();
13257 char (*f)();
13258
13259 int main() {
13260
13261 /* The GNU C library defines this for functions which it implements
13262     to always fail with ENOSYS.  Some functions are actually named
13263     something starting with __ and the normal name is an alias.  */
13264 #if defined (__stub_openlog) || defined (__stub___openlog)
13265 choke me
13266 #else
13267 f = openlog;
13268 #endif
13269
13270 ; return 0; }
13271 EOF
13272 if { (eval echo configure:13273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13273   rm -rf conftest*
13274   eval "ac_cv_func_openlog=yes"
13275 else
13276   echo "configure: failed program was:" >&5
13277   cat conftest.$ac_ext >&5
13278   rm -rf conftest*
13279   eval "ac_cv_func_openlog=no"
13280 fi
13281 rm -f conftest*
13282 fi
13283
13284 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13285   echo "$ac_t""yes" 1>&6
13286   :
13287 else
13288   echo "$ac_t""no" 1>&6
13289 fi
13290
13291         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13292                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13293         fi
13294         ol_enable_syslog=$ac_cv_func_openlog
13295 fi
13296
13297
13298 ol_link_sql=no
13299 if test $ol_enable_sql != no ; then
13300         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13301 echo "configure:13302: checking for SQLDriverConnect in -liodbc" >&5
13302 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13303 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13304   echo $ac_n "(cached) $ac_c" 1>&6
13305 else
13306   ac_save_LIBS="$LIBS"
13307 LIBS="-liodbc  $LIBS"
13308 cat > conftest.$ac_ext <<EOF
13309 #line 13310 "configure"
13310 #include "confdefs.h"
13311 /* Override any gcc2 internal prototype to avoid an error.  */
13312 /* We use char because int might match the return type of a gcc2
13313     builtin and then its argument prototype would still apply.  */
13314 char SQLDriverConnect();
13315
13316 int main() {
13317 SQLDriverConnect()
13318 ; return 0; }
13319 EOF
13320 if { (eval echo configure:13321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13321   rm -rf conftest*
13322   eval "ac_cv_lib_$ac_lib_var=yes"
13323 else
13324   echo "configure: failed program was:" >&5
13325   cat conftest.$ac_ext >&5
13326   rm -rf conftest*
13327   eval "ac_cv_lib_$ac_lib_var=no"
13328 fi
13329 rm -f conftest*
13330 LIBS="$ac_save_LIBS"
13331
13332 fi
13333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13334   echo "$ac_t""yes" 1>&6
13335   have_iodbc=yes
13336 else
13337   echo "$ac_t""no" 1>&6
13338 have_iodbc=no
13339 fi
13340
13341         if test $have_iodbc = yes ; then
13342                 ol_link_sql="-liodbc"
13343         else
13344                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13345 echo "configure:13346: checking for SQLDriverConnect in -lodbc" >&5
13346 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13347 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13348   echo $ac_n "(cached) $ac_c" 1>&6
13349 else
13350   ac_save_LIBS="$LIBS"
13351 LIBS="-lodbc  $LIBS"
13352 cat > conftest.$ac_ext <<EOF
13353 #line 13354 "configure"
13354 #include "confdefs.h"
13355 /* Override any gcc2 internal prototype to avoid an error.  */
13356 /* We use char because int might match the return type of a gcc2
13357     builtin and then its argument prototype would still apply.  */
13358 char SQLDriverConnect();
13359
13360 int main() {
13361 SQLDriverConnect()
13362 ; return 0; }
13363 EOF
13364 if { (eval echo configure:13365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13365   rm -rf conftest*
13366   eval "ac_cv_lib_$ac_lib_var=yes"
13367 else
13368   echo "configure: failed program was:" >&5
13369   cat conftest.$ac_ext >&5
13370   rm -rf conftest*
13371   eval "ac_cv_lib_$ac_lib_var=no"
13372 fi
13373 rm -f conftest*
13374 LIBS="$ac_save_LIBS"
13375
13376 fi
13377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13378   echo "$ac_t""yes" 1>&6
13379   have_odbc=yes
13380 else
13381   echo "$ac_t""no" 1>&6
13382 have_odbc=no
13383 fi
13384
13385                 if test $have_odbc = yes ; then
13386                         ol_link_sql="-lodbc"
13387                 fi
13388         fi
13389
13390         if test $ol_link_sql != no ; then
13391                 SLAPD_SQL_LIBS="$ol_link_sql"
13392
13393         elif test $ol_enable_sql != auto ; then
13394                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13395         fi
13396 fi
13397
13398 if test $ol_enable_tcl != no ; then
13399         for ac_hdr in tcl.h
13400 do
13401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13403 echo "configure:13404: checking for $ac_hdr" >&5
13404 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13405   echo $ac_n "(cached) $ac_c" 1>&6
13406 else
13407   cat > conftest.$ac_ext <<EOF
13408 #line 13409 "configure"
13409 #include "confdefs.h"
13410 #include <$ac_hdr>
13411 EOF
13412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13413 { (eval echo configure:13414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13415 if test -z "$ac_err"; then
13416   rm -rf conftest*
13417   eval "ac_cv_header_$ac_safe=yes"
13418 else
13419   echo "$ac_err" >&5
13420   echo "configure: failed program was:" >&5
13421   cat conftest.$ac_ext >&5
13422   rm -rf conftest*
13423   eval "ac_cv_header_$ac_safe=no"
13424 fi
13425 rm -f conftest*
13426 fi
13427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13428   echo "$ac_t""yes" 1>&6
13429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13430   cat >> confdefs.h <<EOF
13431 #define $ac_tr_hdr 1
13432 EOF
13433  
13434 else
13435   echo "$ac_t""no" 1>&6
13436 fi
13437 done
13438
13439
13440         if test $ac_cv_header_tcl_h != yes ; then
13441                 have_tcl=no
13442         else
13443                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13444                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13445 echo "configure:13446: checking for main in -l$lib" >&5
13446 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13447 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13448   echo $ac_n "(cached) $ac_c" 1>&6
13449 else
13450   ac_save_LIBS="$LIBS"
13451 LIBS="-l$lib  $LIBS"
13452 cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455
13456 int main() {
13457 main()
13458 ; return 0; }
13459 EOF
13460 if { (eval echo configure:13461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13461   rm -rf conftest*
13462   eval "ac_cv_lib_$ac_lib_var=yes"
13463 else
13464   echo "configure: failed program was:" >&5
13465   cat conftest.$ac_ext >&5
13466   rm -rf conftest*
13467   eval "ac_cv_lib_$ac_lib_var=no"
13468 fi
13469 rm -f conftest*
13470 LIBS="$ac_save_LIBS"
13471
13472 fi
13473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13474   echo "$ac_t""yes" 1>&6
13475   have_tcl=yes
13476                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13477                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13478                            else
13479                                MOD_TCL_LIB="-l${lib}"
13480                            fi;break
13481 else
13482   echo "$ac_t""no" 1>&6
13483 have_tcl=no
13484 fi
13485
13486                 done
13487         fi
13488
13489         if test $have_tcl != yes ; then
13490                 echo "configure: warning: could not find -ltcl" 1>&2
13491                 if test $ol_enable_tcl = yes ; then
13492                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13493                 fi
13494
13495                 ol_enable_tcl=no
13496         fi
13497 fi
13498
13499 ol_link_termcap=no
13500 for ac_hdr in termcap.h ncurses.h
13501 do
13502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13504 echo "configure:13505: checking for $ac_hdr" >&5
13505 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13506   echo $ac_n "(cached) $ac_c" 1>&6
13507 else
13508   cat > conftest.$ac_ext <<EOF
13509 #line 13510 "configure"
13510 #include "confdefs.h"
13511 #include <$ac_hdr>
13512 EOF
13513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13514 { (eval echo configure:13515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13516 if test -z "$ac_err"; then
13517   rm -rf conftest*
13518   eval "ac_cv_header_$ac_safe=yes"
13519 else
13520   echo "$ac_err" >&5
13521   echo "configure: failed program was:" >&5
13522   cat conftest.$ac_ext >&5
13523   rm -rf conftest*
13524   eval "ac_cv_header_$ac_safe=no"
13525 fi
13526 rm -f conftest*
13527 fi
13528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13529   echo "$ac_t""yes" 1>&6
13530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13531   cat >> confdefs.h <<EOF
13532 #define $ac_tr_hdr 1
13533 EOF
13534  
13535 else
13536   echo "$ac_t""no" 1>&6
13537 fi
13538 done
13539
13540
13541 if test $ol_link_termcap = no ; then
13542         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13543 echo "configure:13544: checking for tputs in -ltermcap" >&5
13544 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13546   echo $ac_n "(cached) $ac_c" 1>&6
13547 else
13548   ac_save_LIBS="$LIBS"
13549 LIBS="-ltermcap  $LIBS"
13550 cat > conftest.$ac_ext <<EOF
13551 #line 13552 "configure"
13552 #include "confdefs.h"
13553 /* Override any gcc2 internal prototype to avoid an error.  */
13554 /* We use char because int might match the return type of a gcc2
13555     builtin and then its argument prototype would still apply.  */
13556 char tputs();
13557
13558 int main() {
13559 tputs()
13560 ; return 0; }
13561 EOF
13562 if { (eval echo configure:13563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13563   rm -rf conftest*
13564   eval "ac_cv_lib_$ac_lib_var=yes"
13565 else
13566   echo "configure: failed program was:" >&5
13567   cat conftest.$ac_ext >&5
13568   rm -rf conftest*
13569   eval "ac_cv_lib_$ac_lib_var=no"
13570 fi
13571 rm -f conftest*
13572 LIBS="$ac_save_LIBS"
13573
13574 fi
13575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13576   echo "$ac_t""yes" 1>&6
13577   have_termcap=yes
13578 else
13579   echo "$ac_t""no" 1>&6
13580 have_termcap=no
13581 fi
13582
13583         if test $have_termcap = yes ; then
13584                 cat >> confdefs.h <<\EOF
13585 #define HAVE_TERMCAP 1
13586 EOF
13587
13588                 ol_link_termcap=yes
13589                 TERMCAP_LIBS=-ltermcap
13590         fi
13591 fi
13592
13593 if test $ol_link_termcap = no ; then
13594         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13595 echo "configure:13596: checking for initscr in -lncurses" >&5
13596 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13598   echo $ac_n "(cached) $ac_c" 1>&6
13599 else
13600   ac_save_LIBS="$LIBS"
13601 LIBS="-lncurses  $LIBS"
13602 cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 /* Override any gcc2 internal prototype to avoid an error.  */
13606 /* We use char because int might match the return type of a gcc2
13607     builtin and then its argument prototype would still apply.  */
13608 char initscr();
13609
13610 int main() {
13611 initscr()
13612 ; return 0; }
13613 EOF
13614 if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13615   rm -rf conftest*
13616   eval "ac_cv_lib_$ac_lib_var=yes"
13617 else
13618   echo "configure: failed program was:" >&5
13619   cat conftest.$ac_ext >&5
13620   rm -rf conftest*
13621   eval "ac_cv_lib_$ac_lib_var=no"
13622 fi
13623 rm -f conftest*
13624 LIBS="$ac_save_LIBS"
13625
13626 fi
13627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13628   echo "$ac_t""yes" 1>&6
13629   have_ncurses=yes
13630 else
13631   echo "$ac_t""no" 1>&6
13632 have_ncurses=no
13633 fi
13634
13635         if test $have_ncurses = yes ; then
13636                 cat >> confdefs.h <<\EOF
13637 #define HAVE_NCURSES 1
13638 EOF
13639
13640                 ol_link_termcap=yes
13641                 TERMCAP_LIBS=-lncurses
13642         fi
13643 fi
13644
13645 if test $ol_link_termcap = no ; then
13646         cat >> confdefs.h <<\EOF
13647 #define NO_TERMCAP 1
13648 EOF
13649
13650         TERMCAP_LIBS=
13651 fi
13652
13653 ol_link_sasl=no
13654 ol_link_spasswd=no
13655 if test $ol_with_cyrus_sasl != no ; then
13656         for ac_hdr in sasl.h
13657 do
13658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13660 echo "configure:13661: checking for $ac_hdr" >&5
13661 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13662   echo $ac_n "(cached) $ac_c" 1>&6
13663 else
13664   cat > conftest.$ac_ext <<EOF
13665 #line 13666 "configure"
13666 #include "confdefs.h"
13667 #include <$ac_hdr>
13668 EOF
13669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13670 { (eval echo configure:13671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13672 if test -z "$ac_err"; then
13673   rm -rf conftest*
13674   eval "ac_cv_header_$ac_safe=yes"
13675 else
13676   echo "$ac_err" >&5
13677   echo "configure: failed program was:" >&5
13678   cat conftest.$ac_ext >&5
13679   rm -rf conftest*
13680   eval "ac_cv_header_$ac_safe=no"
13681 fi
13682 rm -f conftest*
13683 fi
13684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13685   echo "$ac_t""yes" 1>&6
13686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13687   cat >> confdefs.h <<EOF
13688 #define $ac_tr_hdr 1
13689 EOF
13690  
13691 else
13692   echo "$ac_t""no" 1>&6
13693 fi
13694 done
13695
13696
13697         if test $ac_cv_header_sasl_h = yes ; then
13698                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13699 echo "configure:13700: checking for sasl_client_init in -lsasl" >&5
13700 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13702   echo $ac_n "(cached) $ac_c" 1>&6
13703 else
13704   ac_save_LIBS="$LIBS"
13705 LIBS="-lsasl  $LIBS"
13706 cat > conftest.$ac_ext <<EOF
13707 #line 13708 "configure"
13708 #include "confdefs.h"
13709 /* Override any gcc2 internal prototype to avoid an error.  */
13710 /* We use char because int might match the return type of a gcc2
13711     builtin and then its argument prototype would still apply.  */
13712 char sasl_client_init();
13713
13714 int main() {
13715 sasl_client_init()
13716 ; return 0; }
13717 EOF
13718 if { (eval echo configure:13719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13719   rm -rf conftest*
13720   eval "ac_cv_lib_$ac_lib_var=yes"
13721 else
13722   echo "configure: failed program was:" >&5
13723   cat conftest.$ac_ext >&5
13724   rm -rf conftest*
13725   eval "ac_cv_lib_$ac_lib_var=no"
13726 fi
13727 rm -f conftest*
13728 LIBS="$ac_save_LIBS"
13729
13730 fi
13731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13732   echo "$ac_t""yes" 1>&6
13733   have_cyrus_sasl=yes
13734 else
13735   echo "$ac_t""no" 1>&6
13736 have_cyrus_sasl=no
13737 fi
13738
13739
13740                 if test $have_cyrus_sasl != no ; then
13741                         SASL_LIBS="-lsasl"
13742                         cat >> confdefs.h <<\EOF
13743 #define HAVE_CYRUS_SASL 1
13744 EOF
13745
13746                         ol_link_sasl=yes
13747                 fi
13748         fi
13749
13750         if test $ol_link_sasl = no ; then
13751                 if test $ol_with_cyrus_sasl != auto ; then
13752                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13753                 else
13754                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13755                         echo "configure: warning: SASL authentication not supported!" 1>&2
13756                         if test $ol_link_tls = no ; then
13757                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13758                         fi
13759                 fi
13760
13761         elif test $ol_enable_spasswd != no ; then
13762                 ol_link_spasswd=yes
13763         fi
13764
13765 else
13766         echo "configure: warning: SASL authentication not supported!" 1>&2
13767         if test $ol_link_tls = no ; then
13768                 echo "configure: warning: Strong authentication not supported!" 1>&2
13769         fi
13770 fi
13771
13772 if test $cross_compiling != yes ; then
13773         dev=no
13774         if test -r /dev/urandom ; then
13775                 dev="/dev/urandom";
13776         elif test -r /idev/urandom ; then
13777                 dev="/idev/urandom";
13778         elif test -r /dev/srandom ; then
13779                 dev="/dev/srandom";
13780         elif test -r /dev/random ; then
13781                 dev="/dev/random";
13782         elif test -r /idev/random ; then
13783                 dev="/idev/random";
13784         fi
13785
13786         if test $dev != no ; then
13787                 cat >> confdefs.h <<EOF
13788 #define URANDOM_DEVICE "$dev"
13789 EOF
13790
13791         fi
13792 fi
13793
13794 ol_link_fetch=no
13795 if test $ol_with_fetch != no ; then
13796         ol_LIBS=$LIBS
13797 LIBS="-lfetch -lcom_err $LIBS"
13798 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13799 echo "configure:13800: checking fetch(3) library" >&5
13800 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13801   echo $ac_n "(cached) $ac_c" 1>&6
13802 else
13803   
13804         cat > conftest.$ac_ext <<EOF
13805 #line 13806 "configure"
13806 #include "confdefs.h"
13807
13808 #include <sys/param.h>
13809 #include <stdio.h>
13810 #include <fetch.h>
13811 int main() {
13812 struct url *u = fetchParseURL("file:///"); 
13813 ; return 0; }
13814 EOF
13815 if { (eval echo configure:13816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13816   rm -rf conftest*
13817   ol_cv_lib_fetch=yes
13818 else
13819   echo "configure: failed program was:" >&5
13820   cat conftest.$ac_ext >&5
13821   rm -rf conftest*
13822   ol_cv_lib_fetch=no
13823 fi
13824 rm -f conftest*
13825 fi
13826
13827 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13828 LIBS=$ol_LIBS
13829 if test $ol_cv_lib_fetch != no ; then
13830         ol_link_fetch="-lfetch -lcom_err"
13831         cat >> confdefs.h <<\EOF
13832 #define HAVE_FETCH 1
13833 EOF
13834
13835 fi
13836
13837
13838         if test $ol_cv_lib_fetch != no ; then
13839                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13840                 ol_link_fetch=freebsd
13841
13842         elif test $ol_with_fetch != auto ; then
13843                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13844         fi 
13845 fi
13846
13847 ol_link_readline=no
13848 if test $ol_with_readline != no ; then
13849         for ac_hdr in readline/readline.h readline/history.h
13850 do
13851 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13852 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13853 echo "configure:13854: checking for $ac_hdr" >&5
13854 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13855   echo $ac_n "(cached) $ac_c" 1>&6
13856 else
13857   cat > conftest.$ac_ext <<EOF
13858 #line 13859 "configure"
13859 #include "confdefs.h"
13860 #include <$ac_hdr>
13861 EOF
13862 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13863 { (eval echo configure:13864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13864 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13865 if test -z "$ac_err"; then
13866   rm -rf conftest*
13867   eval "ac_cv_header_$ac_safe=yes"
13868 else
13869   echo "$ac_err" >&5
13870   echo "configure: failed program was:" >&5
13871   cat conftest.$ac_ext >&5
13872   rm -rf conftest*
13873   eval "ac_cv_header_$ac_safe=no"
13874 fi
13875 rm -f conftest*
13876 fi
13877 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13878   echo "$ac_t""yes" 1>&6
13879     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13880   cat >> confdefs.h <<EOF
13881 #define $ac_tr_hdr 1
13882 EOF
13883  
13884 else
13885   echo "$ac_t""no" 1>&6
13886 fi
13887 done
13888
13889
13890         if test $ac_cv_header_readline_readline_h = yes ; then
13891                 save_LIBS="$LIBS"
13892                 LIBS="$TERMCAP_LIBS $LIBS"
13893                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13894 echo "configure:13895: checking for readline in -lreadline" >&5
13895 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13897   echo $ac_n "(cached) $ac_c" 1>&6
13898 else
13899   ac_save_LIBS="$LIBS"
13900 LIBS="-lreadline  $LIBS"
13901 cat > conftest.$ac_ext <<EOF
13902 #line 13903 "configure"
13903 #include "confdefs.h"
13904 /* Override any gcc2 internal prototype to avoid an error.  */
13905 /* We use char because int might match the return type of a gcc2
13906     builtin and then its argument prototype would still apply.  */
13907 char readline();
13908
13909 int main() {
13910 readline()
13911 ; return 0; }
13912 EOF
13913 if { (eval echo configure:13914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13914   rm -rf conftest*
13915   eval "ac_cv_lib_$ac_lib_var=yes"
13916 else
13917   echo "configure: failed program was:" >&5
13918   cat conftest.$ac_ext >&5
13919   rm -rf conftest*
13920   eval "ac_cv_lib_$ac_lib_var=no"
13921 fi
13922 rm -f conftest*
13923 LIBS="$ac_save_LIBS"
13924
13925 fi
13926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13927   echo "$ac_t""yes" 1>&6
13928   have_readline=yes
13929 else
13930   echo "$ac_t""no" 1>&6
13931 have_readline=no
13932 fi
13933
13934                 LIBS="$save_LIBS"
13935                         
13936                 if test $have_readline = yes ; then
13937                         ol_with_readline=found
13938                         ol_link_readline=yes
13939
13940                         READLINE_LIBS="-lreadline"
13941                 fi
13942         fi
13943 fi
13944
13945 if test $ol_link_readline = yes ; then
13946         cat >> confdefs.h <<\EOF
13947 #define HAVE_READLINE 1
13948 EOF
13949
13950 fi
13951
13952
13953 if test $ol_enable_crypt != no ; then
13954         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13955 echo "configure:13956: checking for crypt" >&5
13956 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13957   echo $ac_n "(cached) $ac_c" 1>&6
13958 else
13959   cat > conftest.$ac_ext <<EOF
13960 #line 13961 "configure"
13961 #include "confdefs.h"
13962 /* System header to define __stub macros and hopefully few prototypes,
13963     which can conflict with char crypt(); below.  */
13964 #include <assert.h>
13965 /* Override any gcc2 internal prototype to avoid an error.  */
13966 /* We use char because int might match the return type of a gcc2
13967     builtin and then its argument prototype would still apply.  */
13968 char crypt();
13969 char (*f)();
13970
13971 int main() {
13972
13973 /* The GNU C library defines this for functions which it implements
13974     to always fail with ENOSYS.  Some functions are actually named
13975     something starting with __ and the normal name is an alias.  */
13976 #if defined (__stub_crypt) || defined (__stub___crypt)
13977 choke me
13978 #else
13979 f = crypt;
13980 #endif
13981
13982 ; return 0; }
13983 EOF
13984 if { (eval echo configure:13985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13985   rm -rf conftest*
13986   eval "ac_cv_func_crypt=yes"
13987 else
13988   echo "configure: failed program was:" >&5
13989   cat conftest.$ac_ext >&5
13990   rm -rf conftest*
13991   eval "ac_cv_func_crypt=no"
13992 fi
13993 rm -f conftest*
13994 fi
13995
13996 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13997   echo "$ac_t""yes" 1>&6
13998   have_crypt=yes
13999 else
14000   echo "$ac_t""no" 1>&6
14001
14002                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14003 echo "configure:14004: checking for crypt in -lcrypt" >&5
14004 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14006   echo $ac_n "(cached) $ac_c" 1>&6
14007 else
14008   ac_save_LIBS="$LIBS"
14009 LIBS="-lcrypt  $LIBS"
14010 cat > conftest.$ac_ext <<EOF
14011 #line 14012 "configure"
14012 #include "confdefs.h"
14013 /* Override any gcc2 internal prototype to avoid an error.  */
14014 /* We use char because int might match the return type of a gcc2
14015     builtin and then its argument prototype would still apply.  */
14016 char crypt();
14017
14018 int main() {
14019 crypt()
14020 ; return 0; }
14021 EOF
14022 if { (eval echo configure:14023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14023   rm -rf conftest*
14024   eval "ac_cv_lib_$ac_lib_var=yes"
14025 else
14026   echo "configure: failed program was:" >&5
14027   cat conftest.$ac_ext >&5
14028   rm -rf conftest*
14029   eval "ac_cv_lib_$ac_lib_var=no"
14030 fi
14031 rm -f conftest*
14032 LIBS="$ac_save_LIBS"
14033
14034 fi
14035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14036   echo "$ac_t""yes" 1>&6
14037   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14038                         have_crypt=yes
14039 else
14040   echo "$ac_t""no" 1>&6
14041 have_crypt=no
14042 fi
14043
14044 fi
14045
14046
14047         if test $have_crypt = yes ; then
14048                 cat >> confdefs.h <<\EOF
14049 #define HAVE_CRYPT 1
14050 EOF
14051
14052         else
14053                 echo "configure: warning: could not find crypt" 1>&2
14054                 if test $ol_enable_crypt = yes ; then
14055                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14056                 fi
14057
14058                 echo "configure: warning: disabling crypt support" 1>&2
14059                 ol_enable_crypt=no
14060         fi
14061 fi
14062
14063 if test $ol_enable_proctitle != no ; then
14064         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14065 echo "configure:14066: checking for setproctitle" >&5
14066 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14067   echo $ac_n "(cached) $ac_c" 1>&6
14068 else
14069   cat > conftest.$ac_ext <<EOF
14070 #line 14071 "configure"
14071 #include "confdefs.h"
14072 /* System header to define __stub macros and hopefully few prototypes,
14073     which can conflict with char setproctitle(); below.  */
14074 #include <assert.h>
14075 /* Override any gcc2 internal prototype to avoid an error.  */
14076 /* We use char because int might match the return type of a gcc2
14077     builtin and then its argument prototype would still apply.  */
14078 char setproctitle();
14079 char (*f)();
14080
14081 int main() {
14082
14083 /* The GNU C library defines this for functions which it implements
14084     to always fail with ENOSYS.  Some functions are actually named
14085     something starting with __ and the normal name is an alias.  */
14086 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14087 choke me
14088 #else
14089 f = setproctitle;
14090 #endif
14091
14092 ; return 0; }
14093 EOF
14094 if { (eval echo configure:14095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14095   rm -rf conftest*
14096   eval "ac_cv_func_setproctitle=yes"
14097 else
14098   echo "configure: failed program was:" >&5
14099   cat conftest.$ac_ext >&5
14100   rm -rf conftest*
14101   eval "ac_cv_func_setproctitle=no"
14102 fi
14103 rm -f conftest*
14104 fi
14105
14106 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14107   echo "$ac_t""yes" 1>&6
14108   have_setproctitle=yes
14109 else
14110   echo "$ac_t""no" 1>&6
14111
14112                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14113 echo "configure:14114: checking for setproctitle in -lutil" >&5
14114 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14116   echo $ac_n "(cached) $ac_c" 1>&6
14117 else
14118   ac_save_LIBS="$LIBS"
14119 LIBS="-lutil  $LIBS"
14120 cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123 /* Override any gcc2 internal prototype to avoid an error.  */
14124 /* We use char because int might match the return type of a gcc2
14125     builtin and then its argument prototype would still apply.  */
14126 char setproctitle();
14127
14128 int main() {
14129 setproctitle()
14130 ; return 0; }
14131 EOF
14132 if { (eval echo configure:14133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14133   rm -rf conftest*
14134   eval "ac_cv_lib_$ac_lib_var=yes"
14135 else
14136   echo "configure: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   rm -rf conftest*
14139   eval "ac_cv_lib_$ac_lib_var=no"
14140 fi
14141 rm -f conftest*
14142 LIBS="$ac_save_LIBS"
14143
14144 fi
14145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14146   echo "$ac_t""yes" 1>&6
14147   have_setproctitle=yes
14148                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14149 else
14150   echo "$ac_t""no" 1>&6
14151 have_setproctitle=no
14152                         LIBOBJS="$LIBOBJS setproctitle.o"
14153                         LIBSRCS="$LIBSRCS setproctitle.c"
14154 fi
14155
14156 fi
14157
14158
14159         if test $have_setproctitle = yes ; then
14160                 cat >> confdefs.h <<\EOF
14161 #define HAVE_SETPROCTITLE 1
14162 EOF
14163
14164         fi
14165 fi
14166
14167 if test $ol_enable_slp != no ; then
14168         for ac_hdr in slp.h 
14169 do
14170 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14171 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14172 echo "configure:14173: checking for $ac_hdr" >&5
14173 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14174   echo $ac_n "(cached) $ac_c" 1>&6
14175 else
14176   cat > conftest.$ac_ext <<EOF
14177 #line 14178 "configure"
14178 #include "confdefs.h"
14179 #include <$ac_hdr>
14180 EOF
14181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14182 { (eval echo configure:14183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14184 if test -z "$ac_err"; then
14185   rm -rf conftest*
14186   eval "ac_cv_header_$ac_safe=yes"
14187 else
14188   echo "$ac_err" >&5
14189   echo "configure: failed program was:" >&5
14190   cat conftest.$ac_ext >&5
14191   rm -rf conftest*
14192   eval "ac_cv_header_$ac_safe=no"
14193 fi
14194 rm -f conftest*
14195 fi
14196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14197   echo "$ac_t""yes" 1>&6
14198     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14199   cat >> confdefs.h <<EOF
14200 #define $ac_tr_hdr 1
14201 EOF
14202  
14203 else
14204   echo "$ac_t""no" 1>&6
14205 fi
14206 done
14207
14208
14209         if test ac_cv_header_slp_h = yes ; then
14210                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
14211 echo "configure:14212: checking for SLPOpen in -lslp" >&5
14212 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
14213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14214   echo $ac_n "(cached) $ac_c" 1>&6
14215 else
14216   ac_save_LIBS="$LIBS"
14217 LIBS="-lslp  $LIBS"
14218 cat > conftest.$ac_ext <<EOF
14219 #line 14220 "configure"
14220 #include "confdefs.h"
14221 /* Override any gcc2 internal prototype to avoid an error.  */
14222 /* We use char because int might match the return type of a gcc2
14223     builtin and then its argument prototype would still apply.  */
14224 char SLPOpen();
14225
14226 int main() {
14227 SLPOpen()
14228 ; return 0; }
14229 EOF
14230 if { (eval echo configure:14231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14231   rm -rf conftest*
14232   eval "ac_cv_lib_$ac_lib_var=yes"
14233 else
14234   echo "configure: failed program was:" >&5
14235   cat conftest.$ac_ext >&5
14236   rm -rf conftest*
14237   eval "ac_cv_lib_$ac_lib_var=no"
14238 fi
14239 rm -f conftest*
14240 LIBS="$ac_save_LIBS"
14241
14242 fi
14243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14244   echo "$ac_t""yes" 1>&6
14245   have_slp=yes
14246 else
14247   echo "$ac_t""no" 1>&6
14248 have_slp=no
14249 fi
14250
14251                 if test $have_slp = yes ; then
14252                         cat >> confdefs.h <<\EOF
14253 #define HAVE_SLP 1
14254 EOF
14255
14256                         SLAPD_SLP_LIBS=-lslp
14257                 fi
14258
14259         elif test $ol_enable_slp = yes ; then
14260                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
14261         fi
14262 fi
14263
14264 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14265 echo "configure:14266: checking for ANSI C header files" >&5
14266 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14267   echo $ac_n "(cached) $ac_c" 1>&6
14268 else
14269   cat > conftest.$ac_ext <<EOF
14270 #line 14271 "configure"
14271 #include "confdefs.h"
14272 #include <stdlib.h>
14273 #include <stdarg.h>
14274 #include <string.h>
14275 #include <float.h>
14276 EOF
14277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14278 { (eval echo configure:14279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14280 if test -z "$ac_err"; then
14281   rm -rf conftest*
14282   ac_cv_header_stdc=yes
14283 else
14284   echo "$ac_err" >&5
14285   echo "configure: failed program was:" >&5
14286   cat conftest.$ac_ext >&5
14287   rm -rf conftest*
14288   ac_cv_header_stdc=no
14289 fi
14290 rm -f conftest*
14291
14292 if test $ac_cv_header_stdc = yes; then
14293   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14294 cat > conftest.$ac_ext <<EOF
14295 #line 14296 "configure"
14296 #include "confdefs.h"
14297 #include <string.h>
14298 EOF
14299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14300   egrep "memchr" >/dev/null 2>&1; then
14301   :
14302 else
14303   rm -rf conftest*
14304   ac_cv_header_stdc=no
14305 fi
14306 rm -f conftest*
14307
14308 fi
14309
14310 if test $ac_cv_header_stdc = yes; then
14311   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14312 cat > conftest.$ac_ext <<EOF
14313 #line 14314 "configure"
14314 #include "confdefs.h"
14315 #include <stdlib.h>
14316 EOF
14317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14318   egrep "free" >/dev/null 2>&1; then
14319   :
14320 else
14321   rm -rf conftest*
14322   ac_cv_header_stdc=no
14323 fi
14324 rm -f conftest*
14325
14326 fi
14327
14328 if test $ac_cv_header_stdc = yes; then
14329   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14330 if test "$cross_compiling" = yes; then
14331   :
14332 else
14333   cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336 #include <ctype.h>
14337 #if ((' ' & 0x0FF) == 0x020)
14338 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14339 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14340 #else
14341 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14342  || ('j' <= (c) && (c) <= 'r') \
14343  || ('s' <= (c) && (c) <= 'z'))
14344 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14345 #endif
14346 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14347 int main () { int i; for (i = 0; i < 256; i++)
14348 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14349 exit (0); }
14350
14351 EOF
14352 if { (eval echo configure:14353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14353 then
14354   :
14355 else
14356   echo "configure: failed program was:" >&5
14357   cat conftest.$ac_ext >&5
14358   rm -fr conftest*
14359   ac_cv_header_stdc=no
14360 fi
14361 rm -fr conftest*
14362 fi
14363
14364 fi
14365 fi
14366
14367 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14368 if test $ac_cv_header_stdc = yes; then
14369   cat >> confdefs.h <<\EOF
14370 #define STDC_HEADERS 1
14371 EOF
14372
14373 fi
14374
14375 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14376 echo "configure:14377: checking for mode_t" >&5
14377 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14378   echo $ac_n "(cached) $ac_c" 1>&6
14379 else
14380   cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383 #include <sys/types.h>
14384 #if STDC_HEADERS
14385 #include <stdlib.h>
14386 #include <stddef.h>
14387 #endif
14388
14389 EOF
14390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14391   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14392   rm -rf conftest*
14393   eval "ac_cv_type_mode_t=yes"
14394 else
14395   rm -rf conftest*
14396   eval "ac_cv_type_mode_t=no"
14397 fi
14398 rm -f conftest*
14399
14400 fi
14401 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14402   echo "$ac_t""yes" 1>&6
14403 else
14404   echo "$ac_t""no" 1>&6
14405   cat >> confdefs.h <<EOF
14406 #define mode_t int
14407 EOF
14408
14409 fi
14410
14411 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14412 echo "configure:14413: checking for off_t" >&5
14413 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14414   echo $ac_n "(cached) $ac_c" 1>&6
14415 else
14416   cat > conftest.$ac_ext <<EOF
14417 #line 14418 "configure"
14418 #include "confdefs.h"
14419 #include <sys/types.h>
14420 #if STDC_HEADERS
14421 #include <stdlib.h>
14422 #include <stddef.h>
14423 #endif
14424
14425 EOF
14426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14427   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14428   rm -rf conftest*
14429   eval "ac_cv_type_off_t=yes"
14430 else
14431   rm -rf conftest*
14432   eval "ac_cv_type_off_t=no"
14433 fi
14434 rm -f conftest*
14435
14436 fi
14437 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14438   echo "$ac_t""yes" 1>&6
14439 else
14440   echo "$ac_t""no" 1>&6
14441   cat >> confdefs.h <<EOF
14442 #define off_t long
14443 EOF
14444
14445 fi
14446
14447 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14448 echo "configure:14449: checking for pid_t" >&5
14449 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14450   echo $ac_n "(cached) $ac_c" 1>&6
14451 else
14452   cat > conftest.$ac_ext <<EOF
14453 #line 14454 "configure"
14454 #include "confdefs.h"
14455 #include <sys/types.h>
14456 #if STDC_HEADERS
14457 #include <stdlib.h>
14458 #include <stddef.h>
14459 #endif
14460
14461 EOF
14462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14463   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14464   rm -rf conftest*
14465   eval "ac_cv_type_pid_t=yes"
14466 else
14467   rm -rf conftest*
14468   eval "ac_cv_type_pid_t=no"
14469 fi
14470 rm -f conftest*
14471
14472 fi
14473 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14474   echo "$ac_t""yes" 1>&6
14475 else
14476   echo "$ac_t""no" 1>&6
14477   cat >> confdefs.h <<EOF
14478 #define pid_t int
14479 EOF
14480
14481 fi
14482
14483 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14484 echo "configure:14485: checking for ptrdiff_t" >&5
14485 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14486   echo $ac_n "(cached) $ac_c" 1>&6
14487 else
14488   cat > conftest.$ac_ext <<EOF
14489 #line 14490 "configure"
14490 #include "confdefs.h"
14491 #include <stddef.h>
14492 int main() {
14493 ptrdiff_t p
14494 ; return 0; }
14495 EOF
14496 if { (eval echo configure:14497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14497   rm -rf conftest*
14498   am_cv_type_ptrdiff_t=yes
14499 else
14500   echo "configure: failed program was:" >&5
14501   cat conftest.$ac_ext >&5
14502   rm -rf conftest*
14503   am_cv_type_ptrdiff_t=no
14504 fi
14505 rm -f conftest*
14506 fi
14507
14508 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14509    if test $am_cv_type_ptrdiff_t = yes; then
14510      cat >> confdefs.h <<\EOF
14511 #define HAVE_PTRDIFF_T 1
14512 EOF
14513
14514    fi
14515
14516 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14517 echo "configure:14518: checking return type of signal handlers" >&5
14518 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14519   echo $ac_n "(cached) $ac_c" 1>&6
14520 else
14521   cat > conftest.$ac_ext <<EOF
14522 #line 14523 "configure"
14523 #include "confdefs.h"
14524 #include <sys/types.h>
14525 #include <signal.h>
14526 #ifdef signal
14527 #undef signal
14528 #endif
14529 #ifdef __cplusplus
14530 extern "C" void (*signal (int, void (*)(int)))(int);
14531 #else
14532 void (*signal ()) ();
14533 #endif
14534
14535 int main() {
14536 int i;
14537 ; return 0; }
14538 EOF
14539 if { (eval echo configure:14540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14540   rm -rf conftest*
14541   ac_cv_type_signal=void
14542 else
14543   echo "configure: failed program was:" >&5
14544   cat conftest.$ac_ext >&5
14545   rm -rf conftest*
14546   ac_cv_type_signal=int
14547 fi
14548 rm -f conftest*
14549 fi
14550
14551 echo "$ac_t""$ac_cv_type_signal" 1>&6
14552 cat >> confdefs.h <<EOF
14553 #define RETSIGTYPE $ac_cv_type_signal
14554 EOF
14555
14556
14557 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14558 echo "configure:14559: checking for size_t" >&5
14559 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14560   echo $ac_n "(cached) $ac_c" 1>&6
14561 else
14562   cat > conftest.$ac_ext <<EOF
14563 #line 14564 "configure"
14564 #include "confdefs.h"
14565 #include <sys/types.h>
14566 #if STDC_HEADERS
14567 #include <stdlib.h>
14568 #include <stddef.h>
14569 #endif
14570
14571 EOF
14572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14573   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14574   rm -rf conftest*
14575   eval "ac_cv_type_size_t=yes"
14576 else
14577   rm -rf conftest*
14578   eval "ac_cv_type_size_t=no"
14579 fi
14580 rm -f conftest*
14581
14582 fi
14583 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14584   echo "$ac_t""yes" 1>&6
14585 else
14586   echo "$ac_t""no" 1>&6
14587   cat >> confdefs.h <<EOF
14588 #define size_t unsigned
14589 EOF
14590
14591 fi
14592
14593
14594 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14595 echo "configure:14596: checking for ssize_t" >&5
14596 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14597   echo $ac_n "(cached) $ac_c" 1>&6
14598 else
14599   cat > conftest.$ac_ext <<EOF
14600 #line 14601 "configure"
14601 #include "confdefs.h"
14602 #include <sys/types.h>
14603 #if STDC_HEADERS
14604 #include <stdlib.h>
14605 #include <stddef.h>
14606 #endif
14607
14608 EOF
14609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14610   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14611   rm -rf conftest*
14612   eval "ac_cv_type_ssize_t=yes"
14613 else
14614   rm -rf conftest*
14615   eval "ac_cv_type_ssize_t=no"
14616 fi
14617 rm -f conftest*
14618
14619 fi
14620 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14621   echo "$ac_t""yes" 1>&6
14622 else
14623   echo "$ac_t""no" 1>&6
14624   cat >> confdefs.h <<EOF
14625 #define ssize_t signed int
14626 EOF
14627
14628 fi
14629
14630 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14631 echo "configure:14632: checking for caddr_t" >&5
14632 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14633   echo $ac_n "(cached) $ac_c" 1>&6
14634 else
14635   cat > conftest.$ac_ext <<EOF
14636 #line 14637 "configure"
14637 #include "confdefs.h"
14638 #include <sys/types.h>
14639 #if STDC_HEADERS
14640 #include <stdlib.h>
14641 #include <stddef.h>
14642 #endif
14643
14644 EOF
14645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14646   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14647   rm -rf conftest*
14648   eval "ac_cv_type_caddr_t=yes"
14649 else
14650   rm -rf conftest*
14651   eval "ac_cv_type_caddr_t=no"
14652 fi
14653 rm -f conftest*
14654
14655 fi
14656 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14657   echo "$ac_t""yes" 1>&6
14658 else
14659   echo "$ac_t""no" 1>&6
14660   cat >> confdefs.h <<EOF
14661 #define caddr_t char *
14662 EOF
14663
14664 fi
14665
14666
14667 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14668 echo "configure:14669: checking for socklen_t" >&5
14669 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14670   echo $ac_n "(cached) $ac_c" 1>&6
14671 else
14672   cat > conftest.$ac_ext <<EOF
14673 #line 14674 "configure"
14674 #include "confdefs.h"
14675
14676 #ifdef HAVE_SYS_TYPES_H
14677 #include <sys/types.h>
14678 #endif
14679 #ifdef HAVE_SYS_SOCKET_H
14680 #include <sys/socket.h>
14681 #endif
14682
14683 int main() {
14684 socklen_t len;
14685 ; return 0; }
14686 EOF
14687 if { (eval echo configure:14688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14688   rm -rf conftest*
14689   ol_cv_type_socklen_t=yes
14690 else
14691   echo "configure: failed program was:" >&5
14692   cat conftest.$ac_ext >&5
14693   rm -rf conftest*
14694   ol_cv_type_socklen_t=no
14695 fi
14696 rm -f conftest*
14697 fi
14698
14699 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14700   if test $ol_cv_type_socklen_t = no; then
14701     cat >> confdefs.h <<\EOF
14702 #define socklen_t int
14703 EOF
14704
14705   fi
14706  
14707 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14708 echo "configure:14709: checking for member st_blksize in aggregate type struct stat" >&5
14709 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14710   echo $ac_n "(cached) $ac_c" 1>&6
14711 else
14712   cat > conftest.$ac_ext <<EOF
14713 #line 14714 "configure"
14714 #include "confdefs.h"
14715 #include <sys/types.h>
14716 #include <sys/stat.h>
14717 int main() {
14718 struct stat foo; foo.st_blksize;
14719 ; return 0; }
14720 EOF
14721 if { (eval echo configure:14722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14722   rm -rf conftest*
14723   ac_cv_c_struct_member_st_blksize=yes
14724 else
14725   echo "configure: failed program was:" >&5
14726   cat conftest.$ac_ext >&5
14727   rm -rf conftest*
14728   ac_cv_c_struct_member_st_blksize=no
14729 fi
14730 rm -f conftest*
14731 fi
14732
14733 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14734 st_blksize="$ac_cv_c_struct_member_st_blksize"
14735 if test $ac_cv_c_struct_member_st_blksize = yes; then
14736   cat >> confdefs.h <<\EOF
14737 #define HAVE_ST_BLKSIZE 1
14738 EOF
14739
14740 fi
14741
14742 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14743 echo "configure:14744: checking whether time.h and sys/time.h may both be included" >&5
14744 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   cat > conftest.$ac_ext <<EOF
14748 #line 14749 "configure"
14749 #include "confdefs.h"
14750 #include <sys/types.h>
14751 #include <sys/time.h>
14752 #include <time.h>
14753 int main() {
14754 struct tm *tp;
14755 ; return 0; }
14756 EOF
14757 if { (eval echo configure:14758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14758   rm -rf conftest*
14759   ac_cv_header_time=yes
14760 else
14761   echo "configure: failed program was:" >&5
14762   cat conftest.$ac_ext >&5
14763   rm -rf conftest*
14764   ac_cv_header_time=no
14765 fi
14766 rm -f conftest*
14767 fi
14768
14769 echo "$ac_t""$ac_cv_header_time" 1>&6
14770 if test $ac_cv_header_time = yes; then
14771   cat >> confdefs.h <<\EOF
14772 #define TIME_WITH_SYS_TIME 1
14773 EOF
14774
14775 fi
14776
14777 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14778 echo "configure:14779: checking whether struct tm is in sys/time.h or time.h" >&5
14779 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14780   echo $ac_n "(cached) $ac_c" 1>&6
14781 else
14782   cat > conftest.$ac_ext <<EOF
14783 #line 14784 "configure"
14784 #include "confdefs.h"
14785 #include <sys/types.h>
14786 #include <time.h>
14787 int main() {
14788 struct tm *tp; tp->tm_sec;
14789 ; return 0; }
14790 EOF
14791 if { (eval echo configure:14792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14792   rm -rf conftest*
14793   ac_cv_struct_tm=time.h
14794 else
14795   echo "configure: failed program was:" >&5
14796   cat conftest.$ac_ext >&5
14797   rm -rf conftest*
14798   ac_cv_struct_tm=sys/time.h
14799 fi
14800 rm -f conftest*
14801 fi
14802
14803 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14804 if test $ac_cv_struct_tm = sys/time.h; then
14805   cat >> confdefs.h <<\EOF
14806 #define TM_IN_SYS_TIME 1
14807 EOF
14808
14809 fi
14810
14811 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14812 echo "configure:14813: checking for uid_t in sys/types.h" >&5
14813 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14814   echo $ac_n "(cached) $ac_c" 1>&6
14815 else
14816   cat > conftest.$ac_ext <<EOF
14817 #line 14818 "configure"
14818 #include "confdefs.h"
14819 #include <sys/types.h>
14820 EOF
14821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14822   egrep "uid_t" >/dev/null 2>&1; then
14823   rm -rf conftest*
14824   ac_cv_type_uid_t=yes
14825 else
14826   rm -rf conftest*
14827   ac_cv_type_uid_t=no
14828 fi
14829 rm -f conftest*
14830
14831 fi
14832
14833 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14834 if test $ac_cv_type_uid_t = no; then
14835   cat >> confdefs.h <<\EOF
14836 #define uid_t int
14837 EOF
14838
14839   cat >> confdefs.h <<\EOF
14840 #define gid_t int
14841 EOF
14842
14843 fi
14844
14845 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14846 echo "configure:14847: checking for sig_atomic_t" >&5
14847 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14848   echo $ac_n "(cached) $ac_c" 1>&6
14849 else
14850   cat > conftest.$ac_ext <<EOF
14851 #line 14852 "configure"
14852 #include "confdefs.h"
14853 #include <signal.h>
14854 int main() {
14855 sig_atomic_t atomic;
14856 ; return 0; }
14857 EOF
14858 if { (eval echo configure:14859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14859   rm -rf conftest*
14860   ol_cv_type_sig_atomic_t=yes
14861 else
14862   echo "configure: failed program was:" >&5
14863   cat conftest.$ac_ext >&5
14864   rm -rf conftest*
14865   ol_cv_type_sig_atomic_t=no
14866 fi
14867 rm -f conftest*
14868 fi
14869
14870 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14871   if test $ol_cv_type_sig_atomic_t = no; then
14872     cat >> confdefs.h <<\EOF
14873 #define sig_atomic_t int
14874 EOF
14875
14876   fi
14877  
14878
14879
14880 # test for pw_gecos in struct passwd
14881 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14882 echo "configure:14883: checking struct passwd for pw_gecos" >&5
14883 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14884   echo $ac_n "(cached) $ac_c" 1>&6
14885 else
14886   
14887         cat > conftest.$ac_ext <<EOF
14888 #line 14889 "configure"
14889 #include "confdefs.h"
14890 #include <pwd.h>
14891 int main() {
14892
14893         struct passwd pwd;
14894         pwd.pw_gecos = pwd.pw_name;
14895
14896 ; return 0; }
14897 EOF
14898 if { (eval echo configure:14899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14899   rm -rf conftest*
14900   ol_cv_struct_passwd_pw_gecos=yes
14901 else
14902   echo "configure: failed program was:" >&5
14903   cat conftest.$ac_ext >&5
14904   rm -rf conftest*
14905   ol_cv_struct_passwd_pw_gecos=no
14906 fi
14907 rm -f conftest*
14908 fi
14909
14910 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14911 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14912         cat >> confdefs.h <<\EOF
14913 #define HAVE_PW_GECOS 1
14914 EOF
14915
14916 fi
14917
14918 # test for pw_passwd in struct passwd
14919 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14920 echo "configure:14921: checking struct passwd for pw_passwd" >&5
14921 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14922   echo $ac_n "(cached) $ac_c" 1>&6
14923 else
14924   
14925         cat > conftest.$ac_ext <<EOF
14926 #line 14927 "configure"
14927 #include "confdefs.h"
14928 #include <pwd.h>
14929 int main() {
14930
14931         struct passwd pwd;
14932         pwd.pw_passwd = pwd.pw_name;
14933
14934 ; return 0; }
14935 EOF
14936 if { (eval echo configure:14937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14937   rm -rf conftest*
14938   ol_cv_struct_passwd_pw_passwd=yes
14939 else
14940   echo "configure: failed program was:" >&5
14941   cat conftest.$ac_ext >&5
14942   rm -rf conftest*
14943   ol_cv_struct_passwd_pw_passwd=no
14944 fi
14945 rm -f conftest*
14946 fi
14947
14948 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14949 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14950         cat >> confdefs.h <<\EOF
14951 #define HAVE_PW_PASSWD 1
14952 EOF
14953
14954 fi
14955
14956
14957 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14958 echo "configure:14959: checking if toupper() requires islower()" >&5
14959 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14960   echo $ac_n "(cached) $ac_c" 1>&6
14961 else
14962   
14963         if test "$cross_compiling" = yes; then
14964   ol_cv_c_upper_lower=safe
14965 else
14966   cat > conftest.$ac_ext <<EOF
14967 #line 14968 "configure"
14968 #include "confdefs.h"
14969
14970 #include <ctype.h>
14971 main()
14972 {
14973         if ('C' == toupper('C'))
14974                 exit(0);
14975         else
14976                 exit(1);
14977 }
14978 EOF
14979 if { (eval echo configure:14980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14980 then
14981   ol_cv_c_upper_lower=no
14982 else
14983   echo "configure: failed program was:" >&5
14984   cat conftest.$ac_ext >&5
14985   rm -fr conftest*
14986   ol_cv_c_upper_lower=yes
14987 fi
14988 rm -fr conftest*
14989 fi
14990
14991 fi
14992
14993 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14994 if test $ol_cv_c_upper_lower != no ; then
14995         cat >> confdefs.h <<\EOF
14996 #define C_UPPER_LOWER 1
14997 EOF
14998
14999 fi
15000
15001 echo $ac_n "checking for working const""... $ac_c" 1>&6
15002 echo "configure:15003: checking for working const" >&5
15003 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15004   echo $ac_n "(cached) $ac_c" 1>&6
15005 else
15006   cat > conftest.$ac_ext <<EOF
15007 #line 15008 "configure"
15008 #include "confdefs.h"
15009
15010 int main() {
15011
15012 /* Ultrix mips cc rejects this.  */
15013 typedef int charset[2]; const charset x;
15014 /* SunOS 4.1.1 cc rejects this.  */
15015 char const *const *ccp;
15016 char **p;
15017 /* NEC SVR4.0.2 mips cc rejects this.  */
15018 struct point {int x, y;};
15019 static struct point const zero = {0,0};
15020 /* AIX XL C 1.02.0.0 rejects this.
15021    It does not let you subtract one const X* pointer from another in an arm
15022    of an if-expression whose if-part is not a constant expression */
15023 const char *g = "string";
15024 ccp = &g + (g ? g-g : 0);
15025 /* HPUX 7.0 cc rejects these. */
15026 ++ccp;
15027 p = (char**) ccp;
15028 ccp = (char const *const *) p;
15029 { /* SCO 3.2v4 cc rejects this.  */
15030   char *t;
15031   char const *s = 0 ? (char *) 0 : (char const *) 0;
15032
15033   *t++ = 0;
15034 }
15035 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15036   int x[] = {25, 17};
15037   const int *foo = &x[0];
15038   ++foo;
15039 }
15040 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15041   typedef const int *iptr;
15042   iptr p = 0;
15043   ++p;
15044 }
15045 { /* AIX XL C 1.02.0.0 rejects this saying
15046      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15047   struct s { int j; const int *ap[3]; };
15048   struct s *b; b->j = 5;
15049 }
15050 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15051   const int foo = 10;
15052 }
15053
15054 ; return 0; }
15055 EOF
15056 if { (eval echo configure:15057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15057   rm -rf conftest*
15058   ac_cv_c_const=yes
15059 else
15060   echo "configure: failed program was:" >&5
15061   cat conftest.$ac_ext >&5
15062   rm -rf conftest*
15063   ac_cv_c_const=no
15064 fi
15065 rm -f conftest*
15066 fi
15067
15068 echo "$ac_t""$ac_cv_c_const" 1>&6
15069 if test $ac_cv_c_const = no; then
15070   cat >> confdefs.h <<\EOF
15071 #define const 
15072 EOF
15073
15074 fi
15075
15076 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15077 echo "configure:15078: checking if compiler understands volatile" >&5
15078 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15079   echo $ac_n "(cached) $ac_c" 1>&6
15080 else
15081   cat > conftest.$ac_ext <<EOF
15082 #line 15083 "configure"
15083 #include "confdefs.h"
15084 int x, y, z;
15085 int main() {
15086 volatile int a; int * volatile b = x ? &y : &z;
15087       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15088       *b = 0;
15089 ; return 0; }
15090 EOF
15091 if { (eval echo configure:15092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15092   rm -rf conftest*
15093   ol_cv_c_volatile=yes
15094 else
15095   echo "configure: failed program was:" >&5
15096   cat conftest.$ac_ext >&5
15097   rm -rf conftest*
15098   ol_cv_c_volatile=no
15099 fi
15100 rm -f conftest*
15101 fi
15102
15103 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15104   if test $ol_cv_c_volatile = yes; then
15105     : 
15106   else
15107     cat >> confdefs.h <<\EOF
15108 #define volatile 
15109 EOF
15110
15111   fi
15112  
15113
15114 if test $cross_compiling = yes ; then
15115         cat >> confdefs.h <<\EOF
15116 #define CROSS_COMPILING 1
15117 EOF
15118
15119 else
15120         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15121 echo "configure:15122: checking whether byte ordering is bigendian" >&5
15122 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15123   echo $ac_n "(cached) $ac_c" 1>&6
15124 else
15125   ac_cv_c_bigendian=unknown
15126 # See if sys/param.h defines the BYTE_ORDER macro.
15127 cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 #include <sys/types.h>
15131 #include <sys/param.h>
15132 int main() {
15133
15134 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15135  bogus endian macros
15136 #endif
15137 ; return 0; }
15138 EOF
15139 if { (eval echo configure:15140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15140   rm -rf conftest*
15141   # It does; now see whether it defined to BIG_ENDIAN or not.
15142 cat > conftest.$ac_ext <<EOF
15143 #line 15144 "configure"
15144 #include "confdefs.h"
15145 #include <sys/types.h>
15146 #include <sys/param.h>
15147 int main() {
15148
15149 #if BYTE_ORDER != BIG_ENDIAN
15150  not big endian
15151 #endif
15152 ; return 0; }
15153 EOF
15154 if { (eval echo configure:15155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15155   rm -rf conftest*
15156   ac_cv_c_bigendian=yes
15157 else
15158   echo "configure: failed program was:" >&5
15159   cat conftest.$ac_ext >&5
15160   rm -rf conftest*
15161   ac_cv_c_bigendian=no
15162 fi
15163 rm -f conftest*
15164 else
15165   echo "configure: failed program was:" >&5
15166   cat conftest.$ac_ext >&5
15167 fi
15168 rm -f conftest*
15169 if test $ac_cv_c_bigendian = unknown; then
15170 if test "$cross_compiling" = yes; then
15171     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15172 else
15173   cat > conftest.$ac_ext <<EOF
15174 #line 15175 "configure"
15175 #include "confdefs.h"
15176 main () {
15177   /* Are we little or big endian?  From Harbison&Steele.  */
15178   union
15179   {
15180     long l;
15181     char c[sizeof (long)];
15182   } u;
15183   u.l = 1;
15184   exit (u.c[sizeof (long) - 1] == 1);
15185 }
15186 EOF
15187 if { (eval echo configure:15188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15188 then
15189   ac_cv_c_bigendian=no
15190 else
15191   echo "configure: failed program was:" >&5
15192   cat conftest.$ac_ext >&5
15193   rm -fr conftest*
15194   ac_cv_c_bigendian=yes
15195 fi
15196 rm -fr conftest*
15197 fi
15198
15199 fi
15200 fi
15201
15202 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15203 if test $ac_cv_c_bigendian = yes; then
15204   cat >> confdefs.h <<\EOF
15205 #define WORDS_BIGENDIAN 1
15206 EOF
15207
15208 fi
15209
15210 fi
15211
15212 echo $ac_n "checking size of short""... $ac_c" 1>&6
15213 echo "configure:15214: checking size of short" >&5 
15214 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15215   echo $ac_n "(cached) $ac_c" 1>&6
15216 else
15217   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15218   cat > conftest.$ac_ext <<EOF
15219 #line 15220 "configure"
15220 #include "confdefs.h"
15221 #include "confdefs.h" 
15222 #include <sys/types.h> 
15223  
15224
15225 int main() {
15226 switch (0) case 0: case (sizeof (short) == $ac_size):;
15227 ; return 0; }
15228 EOF
15229 if { (eval echo configure:15230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15230   rm -rf conftest*
15231   ac_cv_sizeof_short=$ac_size
15232 else
15233   echo "configure: failed program was:" >&5
15234   cat conftest.$ac_ext >&5
15235 fi
15236 rm -f conftest* 
15237   if test x$ac_cv_sizeof_short != x ; then break; fi 
15238 done 
15239
15240 fi
15241  
15242 if test x$ac_cv_sizeof_short = x ; then 
15243   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15244 fi 
15245 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15246 cat >> confdefs.h <<EOF
15247 #define SIZEOF_SHORT $ac_cv_sizeof_short
15248 EOF
15249  
15250  
15251 echo $ac_n "checking size of int""... $ac_c" 1>&6
15252 echo "configure:15253: checking size of int" >&5 
15253 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15254   echo $ac_n "(cached) $ac_c" 1>&6
15255 else
15256   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15257   cat > conftest.$ac_ext <<EOF
15258 #line 15259 "configure"
15259 #include "confdefs.h"
15260 #include "confdefs.h" 
15261 #include <sys/types.h> 
15262  
15263
15264 int main() {
15265 switch (0) case 0: case (sizeof (int) == $ac_size):;
15266 ; return 0; }
15267 EOF
15268 if { (eval echo configure:15269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15269   rm -rf conftest*
15270   ac_cv_sizeof_int=$ac_size
15271 else
15272   echo "configure: failed program was:" >&5
15273   cat conftest.$ac_ext >&5
15274 fi
15275 rm -f conftest* 
15276   if test x$ac_cv_sizeof_int != x ; then break; fi 
15277 done 
15278
15279 fi
15280  
15281 if test x$ac_cv_sizeof_int = x ; then 
15282   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15283 fi 
15284 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15285 cat >> confdefs.h <<EOF
15286 #define SIZEOF_INT $ac_cv_sizeof_int
15287 EOF
15288  
15289  
15290 echo $ac_n "checking size of long""... $ac_c" 1>&6
15291 echo "configure:15292: checking size of long" >&5 
15292 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15293   echo $ac_n "(cached) $ac_c" 1>&6
15294 else
15295   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15296   cat > conftest.$ac_ext <<EOF
15297 #line 15298 "configure"
15298 #include "confdefs.h"
15299 #include "confdefs.h" 
15300 #include <sys/types.h> 
15301  
15302
15303 int main() {
15304 switch (0) case 0: case (sizeof (long) == $ac_size):;
15305 ; return 0; }
15306 EOF
15307 if { (eval echo configure:15308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15308   rm -rf conftest*
15309   ac_cv_sizeof_long=$ac_size
15310 else
15311   echo "configure: failed program was:" >&5
15312   cat conftest.$ac_ext >&5
15313 fi
15314 rm -f conftest* 
15315   if test x$ac_cv_sizeof_long != x ; then break; fi 
15316 done 
15317
15318 fi
15319  
15320 if test x$ac_cv_sizeof_long = x ; then 
15321   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15322 fi 
15323 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15324 cat >> confdefs.h <<EOF
15325 #define SIZEOF_LONG $ac_cv_sizeof_long
15326 EOF
15327  
15328
15329
15330 if test "$ac_cv_sizeof_int" -lt 4 ; then
15331         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15332
15333         cat >> confdefs.h <<\EOF
15334 #define LBER_INT_T long
15335 EOF
15336
15337 else
15338         cat >> confdefs.h <<\EOF
15339 #define LBER_INT_T int
15340 EOF
15341
15342 fi
15343
15344 cat >> confdefs.h <<\EOF
15345 #define LBER_LEN_T long
15346 EOF
15347
15348 cat >> confdefs.h <<\EOF
15349 #define LBER_SOCKET_T int
15350 EOF
15351
15352 cat >> confdefs.h <<\EOF
15353 #define LBER_TAG_T long
15354 EOF
15355
15356
15357 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15358 echo "configure:15359: checking for 8-bit clean memcmp" >&5
15359 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15360   echo $ac_n "(cached) $ac_c" 1>&6
15361 else
15362   if test "$cross_compiling" = yes; then
15363   ac_cv_func_memcmp_clean=no
15364 else
15365   cat > conftest.$ac_ext <<EOF
15366 #line 15367 "configure"
15367 #include "confdefs.h"
15368
15369 main()
15370 {
15371   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15372   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15373 }
15374
15375 EOF
15376 if { (eval echo configure:15377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15377 then
15378   ac_cv_func_memcmp_clean=yes
15379 else
15380   echo "configure: failed program was:" >&5
15381   cat conftest.$ac_ext >&5
15382   rm -fr conftest*
15383   ac_cv_func_memcmp_clean=no
15384 fi
15385 rm -fr conftest*
15386 fi
15387
15388 fi
15389
15390 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15391 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15392
15393 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15394 echo "configure:15395: checking for strftime" >&5
15395 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15396   echo $ac_n "(cached) $ac_c" 1>&6
15397 else
15398   cat > conftest.$ac_ext <<EOF
15399 #line 15400 "configure"
15400 #include "confdefs.h"
15401 /* System header to define __stub macros and hopefully few prototypes,
15402     which can conflict with char strftime(); below.  */
15403 #include <assert.h>
15404 /* Override any gcc2 internal prototype to avoid an error.  */
15405 /* We use char because int might match the return type of a gcc2
15406     builtin and then its argument prototype would still apply.  */
15407 char strftime();
15408 char (*f)();
15409
15410 int main() {
15411
15412 /* The GNU C library defines this for functions which it implements
15413     to always fail with ENOSYS.  Some functions are actually named
15414     something starting with __ and the normal name is an alias.  */
15415 #if defined (__stub_strftime) || defined (__stub___strftime)
15416 choke me
15417 #else
15418 f = strftime;
15419 #endif
15420
15421 ; return 0; }
15422 EOF
15423 if { (eval echo configure:15424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15424   rm -rf conftest*
15425   eval "ac_cv_func_strftime=yes"
15426 else
15427   echo "configure: failed program was:" >&5
15428   cat conftest.$ac_ext >&5
15429   rm -rf conftest*
15430   eval "ac_cv_func_strftime=no"
15431 fi
15432 rm -f conftest*
15433 fi
15434
15435 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15436   echo "$ac_t""yes" 1>&6
15437   cat >> confdefs.h <<\EOF
15438 #define HAVE_STRFTIME 1
15439 EOF
15440
15441 else
15442   echo "$ac_t""no" 1>&6
15443 # strftime is in -lintl on SCO UNIX.
15444 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15445 echo "configure:15446: checking for strftime in -lintl" >&5
15446 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15447 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15448   echo $ac_n "(cached) $ac_c" 1>&6
15449 else
15450   ac_save_LIBS="$LIBS"
15451 LIBS="-lintl  $LIBS"
15452 cat > conftest.$ac_ext <<EOF
15453 #line 15454 "configure"
15454 #include "confdefs.h"
15455 /* Override any gcc2 internal prototype to avoid an error.  */
15456 /* We use char because int might match the return type of a gcc2
15457     builtin and then its argument prototype would still apply.  */
15458 char strftime();
15459
15460 int main() {
15461 strftime()
15462 ; return 0; }
15463 EOF
15464 if { (eval echo configure:15465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15465   rm -rf conftest*
15466   eval "ac_cv_lib_$ac_lib_var=yes"
15467 else
15468   echo "configure: failed program was:" >&5
15469   cat conftest.$ac_ext >&5
15470   rm -rf conftest*
15471   eval "ac_cv_lib_$ac_lib_var=no"
15472 fi
15473 rm -f conftest*
15474 LIBS="$ac_save_LIBS"
15475
15476 fi
15477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15478   echo "$ac_t""yes" 1>&6
15479   cat >> confdefs.h <<\EOF
15480 #define HAVE_STRFTIME 1
15481 EOF
15482
15483 LIBS="-lintl $LIBS"
15484 else
15485   echo "$ac_t""no" 1>&6
15486 fi
15487
15488 fi
15489
15490
15491 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15492 echo "configure:15493: checking for inet_aton()" >&5
15493 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15494   echo $ac_n "(cached) $ac_c" 1>&6
15495 else
15496   cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499
15500 #ifdef HAVE_SYS_TYPES_H
15501 #       include <sys/types.h>
15502 #endif
15503 #ifdef HAVE_SYS_SOCKET_H
15504 #       include <sys/socket.h>
15505 #       ifdef HAVE_SYS_SELECT_H
15506 #               include <sys/select.h>
15507 #       endif
15508 #       include <netinet/in.h>
15509 #       ifdef HAVE_ARPA_INET_H
15510 #               include <arpa/inet.h>
15511 #       endif
15512 #endif
15513
15514 int main() {
15515 struct in_addr in;
15516 int rc = inet_aton( "255.255.255.255", &in );
15517 ; return 0; }
15518 EOF
15519 if { (eval echo configure:15520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15520   rm -rf conftest*
15521   ol_cv_func_inet_aton=yes
15522 else
15523   echo "configure: failed program was:" >&5
15524   cat conftest.$ac_ext >&5
15525   rm -rf conftest*
15526   ol_cv_func_inet_aton=no
15527 fi
15528 rm -f conftest*
15529 fi
15530
15531 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15532   if test $ol_cv_func_inet_aton != no; then
15533     cat >> confdefs.h <<\EOF
15534 #define HAVE_INET_ATON 1
15535 EOF
15536
15537   fi
15538  
15539
15540 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15541 echo "configure:15542: checking for _spawnlp" >&5
15542 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15543   echo $ac_n "(cached) $ac_c" 1>&6
15544 else
15545   cat > conftest.$ac_ext <<EOF
15546 #line 15547 "configure"
15547 #include "confdefs.h"
15548 /* System header to define __stub macros and hopefully few prototypes,
15549     which can conflict with char _spawnlp(); below.  */
15550 #include <assert.h>
15551 /* Override any gcc2 internal prototype to avoid an error.  */
15552 /* We use char because int might match the return type of a gcc2
15553     builtin and then its argument prototype would still apply.  */
15554 char _spawnlp();
15555 char (*f)();
15556
15557 int main() {
15558
15559 /* The GNU C library defines this for functions which it implements
15560     to always fail with ENOSYS.  Some functions are actually named
15561     something starting with __ and the normal name is an alias.  */
15562 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15563 choke me
15564 #else
15565 f = _spawnlp;
15566 #endif
15567
15568 ; return 0; }
15569 EOF
15570 if { (eval echo configure:15571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15571   rm -rf conftest*
15572   eval "ac_cv_func__spawnlp=yes"
15573 else
15574   echo "configure: failed program was:" >&5
15575   cat conftest.$ac_ext >&5
15576   rm -rf conftest*
15577   eval "ac_cv_func__spawnlp=no"
15578 fi
15579 rm -f conftest*
15580 fi
15581
15582 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15583   echo "$ac_t""yes" 1>&6
15584   cat >> confdefs.h <<\EOF
15585 #define HAVE_SPAWNLP 1
15586 EOF
15587
15588 else
15589   echo "$ac_t""no" 1>&6
15590 fi
15591
15592
15593 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15594 echo "configure:15595: checking for _snprintf" >&5
15595 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15596   echo $ac_n "(cached) $ac_c" 1>&6
15597 else
15598   cat > conftest.$ac_ext <<EOF
15599 #line 15600 "configure"
15600 #include "confdefs.h"
15601 /* System header to define __stub macros and hopefully few prototypes,
15602     which can conflict with char _snprintf(); below.  */
15603 #include <assert.h>
15604 /* Override any gcc2 internal prototype to avoid an error.  */
15605 /* We use char because int might match the return type of a gcc2
15606     builtin and then its argument prototype would still apply.  */
15607 char _snprintf();
15608 char (*f)();
15609
15610 int main() {
15611
15612 /* The GNU C library defines this for functions which it implements
15613     to always fail with ENOSYS.  Some functions are actually named
15614     something starting with __ and the normal name is an alias.  */
15615 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15616 choke me
15617 #else
15618 f = _snprintf;
15619 #endif
15620
15621 ; return 0; }
15622 EOF
15623 if { (eval echo configure:15624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15624   rm -rf conftest*
15625   eval "ac_cv_func__snprintf=yes"
15626 else
15627   echo "configure: failed program was:" >&5
15628   cat conftest.$ac_ext >&5
15629   rm -rf conftest*
15630   eval "ac_cv_func__snprintf=no"
15631 fi
15632 rm -f conftest*
15633 fi
15634
15635 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15636   echo "$ac_t""yes" 1>&6
15637   ac_cv_func_snprintf=yes
15638         cat >> confdefs.h <<\EOF
15639 #define snprintf _snprintf
15640 EOF
15641
15642
15643 else
15644   echo "$ac_t""no" 1>&6
15645 fi
15646
15647
15648 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15649 echo "configure:15650: checking for _vsnprintf" >&5
15650 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15651   echo $ac_n "(cached) $ac_c" 1>&6
15652 else
15653   cat > conftest.$ac_ext <<EOF
15654 #line 15655 "configure"
15655 #include "confdefs.h"
15656 /* System header to define __stub macros and hopefully few prototypes,
15657     which can conflict with char _vsnprintf(); below.  */
15658 #include <assert.h>
15659 /* Override any gcc2 internal prototype to avoid an error.  */
15660 /* We use char because int might match the return type of a gcc2
15661     builtin and then its argument prototype would still apply.  */
15662 char _vsnprintf();
15663 char (*f)();
15664
15665 int main() {
15666
15667 /* The GNU C library defines this for functions which it implements
15668     to always fail with ENOSYS.  Some functions are actually named
15669     something starting with __ and the normal name is an alias.  */
15670 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15671 choke me
15672 #else
15673 f = _vsnprintf;
15674 #endif
15675
15676 ; return 0; }
15677 EOF
15678 if { (eval echo configure:15679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15679   rm -rf conftest*
15680   eval "ac_cv_func__vsnprintf=yes"
15681 else
15682   echo "configure: failed program was:" >&5
15683   cat conftest.$ac_ext >&5
15684   rm -rf conftest*
15685   eval "ac_cv_func__vsnprintf=no"
15686 fi
15687 rm -f conftest*
15688 fi
15689
15690 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15691   echo "$ac_t""yes" 1>&6
15692   ac_cv_func_vsnprintf=yes
15693         cat >> confdefs.h <<\EOF
15694 #define vsnprintf _vsnprintf
15695 EOF
15696
15697
15698 else
15699   echo "$ac_t""no" 1>&6
15700 fi
15701
15702
15703 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15704 echo "configure:15705: checking for vprintf" >&5
15705 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15706   echo $ac_n "(cached) $ac_c" 1>&6
15707 else
15708   cat > conftest.$ac_ext <<EOF
15709 #line 15710 "configure"
15710 #include "confdefs.h"
15711 /* System header to define __stub macros and hopefully few prototypes,
15712     which can conflict with char vprintf(); below.  */
15713 #include <assert.h>
15714 /* Override any gcc2 internal prototype to avoid an error.  */
15715 /* We use char because int might match the return type of a gcc2
15716     builtin and then its argument prototype would still apply.  */
15717 char vprintf();
15718 char (*f)();
15719
15720 int main() {
15721
15722 /* The GNU C library defines this for functions which it implements
15723     to always fail with ENOSYS.  Some functions are actually named
15724     something starting with __ and the normal name is an alias.  */
15725 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15726 choke me
15727 #else
15728 f = vprintf;
15729 #endif
15730
15731 ; return 0; }
15732 EOF
15733 if { (eval echo configure:15734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15734   rm -rf conftest*
15735   eval "ac_cv_func_vprintf=yes"
15736 else
15737   echo "configure: failed program was:" >&5
15738   cat conftest.$ac_ext >&5
15739   rm -rf conftest*
15740   eval "ac_cv_func_vprintf=no"
15741 fi
15742 rm -f conftest*
15743 fi
15744
15745 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15746   echo "$ac_t""yes" 1>&6
15747   cat >> confdefs.h <<\EOF
15748 #define HAVE_VPRINTF 1
15749 EOF
15750
15751 else
15752   echo "$ac_t""no" 1>&6
15753 fi
15754
15755 if test "$ac_cv_func_vprintf" != yes; then
15756 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15757 echo "configure:15758: checking for _doprnt" >&5
15758 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15759   echo $ac_n "(cached) $ac_c" 1>&6
15760 else
15761   cat > conftest.$ac_ext <<EOF
15762 #line 15763 "configure"
15763 #include "confdefs.h"
15764 /* System header to define __stub macros and hopefully few prototypes,
15765     which can conflict with char _doprnt(); below.  */
15766 #include <assert.h>
15767 /* Override any gcc2 internal prototype to avoid an error.  */
15768 /* We use char because int might match the return type of a gcc2
15769     builtin and then its argument prototype would still apply.  */
15770 char _doprnt();
15771 char (*f)();
15772
15773 int main() {
15774
15775 /* The GNU C library defines this for functions which it implements
15776     to always fail with ENOSYS.  Some functions are actually named
15777     something starting with __ and the normal name is an alias.  */
15778 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15779 choke me
15780 #else
15781 f = _doprnt;
15782 #endif
15783
15784 ; return 0; }
15785 EOF
15786 if { (eval echo configure:15787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15787   rm -rf conftest*
15788   eval "ac_cv_func__doprnt=yes"
15789 else
15790   echo "configure: failed program was:" >&5
15791   cat conftest.$ac_ext >&5
15792   rm -rf conftest*
15793   eval "ac_cv_func__doprnt=no"
15794 fi
15795 rm -f conftest*
15796 fi
15797
15798 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15799   echo "$ac_t""yes" 1>&6
15800   cat >> confdefs.h <<\EOF
15801 #define HAVE_DOPRNT 1
15802 EOF
15803
15804 else
15805   echo "$ac_t""no" 1>&6
15806 fi
15807
15808 fi
15809
15810
15811 if test $ac_cv_func_vprintf = yes ; then
15812                 for ac_func in vsnprintf vsprintf
15813 do
15814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15815 echo "configure:15816: checking for $ac_func" >&5
15816 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15817   echo $ac_n "(cached) $ac_c" 1>&6
15818 else
15819   cat > conftest.$ac_ext <<EOF
15820 #line 15821 "configure"
15821 #include "confdefs.h"
15822 /* System header to define __stub macros and hopefully few prototypes,
15823     which can conflict with char $ac_func(); below.  */
15824 #include <assert.h>
15825 /* Override any gcc2 internal prototype to avoid an error.  */
15826 /* We use char because int might match the return type of a gcc2
15827     builtin and then its argument prototype would still apply.  */
15828 char $ac_func();
15829 char (*f)();
15830
15831 int main() {
15832
15833 /* The GNU C library defines this for functions which it implements
15834     to always fail with ENOSYS.  Some functions are actually named
15835     something starting with __ and the normal name is an alias.  */
15836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15837 choke me
15838 #else
15839 f = $ac_func;
15840 #endif
15841
15842 ; return 0; }
15843 EOF
15844 if { (eval echo configure:15845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15845   rm -rf conftest*
15846   eval "ac_cv_func_$ac_func=yes"
15847 else
15848   echo "configure: failed program was:" >&5
15849   cat conftest.$ac_ext >&5
15850   rm -rf conftest*
15851   eval "ac_cv_func_$ac_func=no"
15852 fi
15853 rm -f conftest*
15854 fi
15855
15856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15857   echo "$ac_t""yes" 1>&6
15858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15859   cat >> confdefs.h <<EOF
15860 #define $ac_tr_func 1
15861 EOF
15862  
15863 else
15864   echo "$ac_t""no" 1>&6
15865 fi
15866 done
15867
15868 fi
15869
15870 for ac_func in \
15871         bcopy                   \
15872         closesocket             \
15873         chroot                  \
15874         endgrent                \
15875         endpwent                \
15876         flock                   \
15877         getdtablesize   \
15878         getgrgid                \
15879         gethostname             \
15880         getpass                 \
15881         getpassphrase   \
15882         getpwuid                \
15883         getpwnam                \
15884         getspnam                \
15885         gettimeofday    \
15886         initgroups              \
15887         lockf                   \
15888         memcpy                  \
15889         memmove                 \
15890         mkstemp                 \
15891         pipe                    \
15892         read                    \
15893         recv                    \
15894         recvfrom                \
15895         setpwfile               \
15896         setgid                  \
15897         setegid                 \
15898         setsid                  \
15899         setuid                  \
15900         seteuid                 \
15901         sigaction               \
15902         signal                  \
15903         sigset                  \
15904         snprintf                \
15905         strdup                  \
15906         strerror                \
15907         strpbrk                 \
15908         strrchr                 \
15909         strsep                  \
15910         strstr                  \
15911         strtol                  \
15912         strtoul                 \
15913         strspn                  \
15914         sysconf                 \
15915         waitpid                 \
15916         wait4                   \
15917         write                   \
15918         send                    \
15919         sendto                  \
15920
15921 do
15922 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15923 echo "configure:15924: checking for $ac_func" >&5
15924 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15925   echo $ac_n "(cached) $ac_c" 1>&6
15926 else
15927   cat > conftest.$ac_ext <<EOF
15928 #line 15929 "configure"
15929 #include "confdefs.h"
15930 /* System header to define __stub macros and hopefully few prototypes,
15931     which can conflict with char $ac_func(); below.  */
15932 #include <assert.h>
15933 /* Override any gcc2 internal prototype to avoid an error.  */
15934 /* We use char because int might match the return type of a gcc2
15935     builtin and then its argument prototype would still apply.  */
15936 char $ac_func();
15937 char (*f)();
15938
15939 int main() {
15940
15941 /* The GNU C library defines this for functions which it implements
15942     to always fail with ENOSYS.  Some functions are actually named
15943     something starting with __ and the normal name is an alias.  */
15944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15945 choke me
15946 #else
15947 f = $ac_func;
15948 #endif
15949
15950 ; return 0; }
15951 EOF
15952 if { (eval echo configure:15953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15953   rm -rf conftest*
15954   eval "ac_cv_func_$ac_func=yes"
15955 else
15956   echo "configure: failed program was:" >&5
15957   cat conftest.$ac_ext >&5
15958   rm -rf conftest*
15959   eval "ac_cv_func_$ac_func=no"
15960 fi
15961 rm -f conftest*
15962 fi
15963
15964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15965   echo "$ac_t""yes" 1>&6
15966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15967   cat >> confdefs.h <<EOF
15968 #define $ac_tr_func 1
15969 EOF
15970  
15971 else
15972   echo "$ac_t""no" 1>&6
15973 fi
15974 done
15975
15976
15977 for ac_func in getopt tempnam
15978 do
15979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15980 echo "configure:15981: checking for $ac_func" >&5
15981 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15982   echo $ac_n "(cached) $ac_c" 1>&6
15983 else
15984   cat > conftest.$ac_ext <<EOF
15985 #line 15986 "configure"
15986 #include "confdefs.h"
15987 /* System header to define __stub macros and hopefully few prototypes,
15988     which can conflict with char $ac_func(); below.  */
15989 #include <assert.h>
15990 /* Override any gcc2 internal prototype to avoid an error.  */
15991 /* We use char because int might match the return type of a gcc2
15992     builtin and then its argument prototype would still apply.  */
15993 char $ac_func();
15994 char (*f)();
15995
15996 int main() {
15997
15998 /* The GNU C library defines this for functions which it implements
15999     to always fail with ENOSYS.  Some functions are actually named
16000     something starting with __ and the normal name is an alias.  */
16001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16002 choke me
16003 #else
16004 f = $ac_func;
16005 #endif
16006
16007 ; return 0; }
16008 EOF
16009 if { (eval echo configure:16010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16010   rm -rf conftest*
16011   eval "ac_cv_func_$ac_func=yes"
16012 else
16013   echo "configure: failed program was:" >&5
16014   cat conftest.$ac_ext >&5
16015   rm -rf conftest*
16016   eval "ac_cv_func_$ac_func=no"
16017 fi
16018 rm -f conftest*
16019 fi
16020
16021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16022   echo "$ac_t""yes" 1>&6
16023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16024   cat >> confdefs.h <<EOF
16025 #define $ac_tr_func 1
16026 EOF
16027  
16028 else
16029   echo "$ac_t""no" 1>&6
16030 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16031 fi
16032 done
16033
16034
16035
16036 if test "$ac_cv_func_getopt" != yes; then
16037     LIBSRCS="$LIBSRCS getopt.c"
16038 fi
16039
16040 if test "$ac_cv_func_tempnam" != yes; then
16041     LIBSRCS="$LIBSRCS tempnam.c"
16042 fi
16043
16044 # Check Configuration
16045 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16046 echo "configure:16047: checking declaration of sys_errlist" >&5
16047 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16048   echo $ac_n "(cached) $ac_c" 1>&6
16049 else
16050   
16051         cat > conftest.$ac_ext <<EOF
16052 #line 16053 "configure"
16053 #include "confdefs.h"
16054
16055 #include <stdio.h>
16056 #include <sys/types.h>
16057 #include <errno.h>
16058 #ifdef WINNT
16059 #include <stdlib.h>
16060 #endif 
16061 int main() {
16062 char *c = (char *) *sys_errlist
16063 ; return 0; }
16064 EOF
16065 if { (eval echo configure:16066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16066   rm -rf conftest*
16067   ol_cv_dcl_sys_errlist=yes
16068         ol_cv_have_sys_errlist=yes
16069 else
16070   echo "configure: failed program was:" >&5
16071   cat conftest.$ac_ext >&5
16072   rm -rf conftest*
16073   ol_cv_dcl_sys_errlist=no
16074 fi
16075 rm -f conftest*
16076 fi
16077
16078 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16079 #
16080 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16081 if test $ol_cv_dcl_sys_errlist = no ; then
16082         cat >> confdefs.h <<\EOF
16083 #define DECL_SYS_ERRLIST 1
16084 EOF
16085
16086
16087         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16088 echo "configure:16089: checking existence of sys_errlist" >&5
16089 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16090   echo $ac_n "(cached) $ac_c" 1>&6
16091 else
16092   
16093                 cat > conftest.$ac_ext <<EOF
16094 #line 16095 "configure"
16095 #include "confdefs.h"
16096 #include <errno.h>
16097 int main() {
16098 char *c = (char *) *sys_errlist
16099 ; return 0; }
16100 EOF
16101 if { (eval echo configure:16102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16102   rm -rf conftest*
16103   ol_cv_have_sys_errlist=yes
16104 else
16105   echo "configure: failed program was:" >&5
16106   cat conftest.$ac_ext >&5
16107   rm -rf conftest*
16108   ol_cv_have_sys_errlist=no
16109 fi
16110 rm -f conftest*
16111 fi
16112
16113 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16114 fi
16115 if test $ol_cv_have_sys_errlist = yes ; then
16116         cat >> confdefs.h <<\EOF
16117 #define HAVE_SYS_ERRLIST 1
16118 EOF
16119
16120 fi
16121
16122
16123
16124 if test "$ol_enable_debug" != no ; then
16125         cat >> confdefs.h <<\EOF
16126 #define LDAP_DEBUG 1
16127 EOF
16128
16129 fi
16130 if test "$ol_enable_syslog" = yes ; then
16131         cat >> confdefs.h <<\EOF
16132 #define LDAP_SYSLOG 1
16133 EOF
16134
16135 fi
16136 if test "$ol_enable_cache" = no ; then
16137         cat >> confdefs.h <<\EOF
16138 #define LDAP_NOCACHE 1
16139 EOF
16140
16141 fi
16142 if test "$ol_link_kbind" != no ; then
16143         cat >> confdefs.h <<\EOF
16144 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16145 EOF
16146
16147 fi
16148 if test "$ol_enable_proctitle" != no ; then
16149         cat >> confdefs.h <<\EOF
16150 #define LDAP_PROCTITLE 1
16151 EOF
16152
16153 fi
16154 if test "$ol_enable_referrals" != no ; then
16155         cat >> confdefs.h <<\EOF
16156 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16157 EOF
16158
16159 fi
16160 if test "$ol_enable_local" != no; then
16161         cat >> confdefs.h <<\EOF
16162 #define LDAP_PF_LOCAL 1
16163 EOF
16164
16165 fi
16166 if test "$ol_link_ipv6" != no; then
16167         cat >> confdefs.h <<\EOF
16168 #define LDAP_PF_INET6 1
16169 EOF
16170
16171 fi
16172 if test "$ol_enable_cleartext" != no ; then
16173         cat >> confdefs.h <<\EOF
16174 #define SLAPD_CLEARTEXT 1
16175 EOF
16176
16177 fi
16178 if test "$ol_enable_crypt" != no ; then
16179         cat >> confdefs.h <<\EOF
16180 #define SLAPD_CRYPT 1
16181 EOF
16182
16183 fi
16184 if test "$ol_link_kpasswd" != no ; then
16185         cat >> confdefs.h <<\EOF
16186 #define SLAPD_KPASSWD 1
16187 EOF
16188
16189 fi
16190 if test "$ol_link_spasswd" != no ; then
16191         cat >> confdefs.h <<\EOF
16192 #define SLAPD_SPASSWD 1
16193 EOF
16194
16195 fi
16196 if test "$ol_enable_phonetic" != no ; then
16197         cat >> confdefs.h <<\EOF
16198 #define SLAPD_PHONETIC 1
16199 EOF
16200
16201 fi
16202 if test "$ol_enable_rlookups" != no ; then
16203         cat >> confdefs.h <<\EOF
16204 #define SLAPD_RLOOKUPS 1
16205 EOF
16206
16207 fi
16208 if test "$ol_enable_aci" != no ; then
16209         cat >> confdefs.h <<\EOF
16210 #define SLAPD_ACI_ENABLED 1
16211 EOF
16212
16213 fi
16214
16215 if test "$ol_link_modules" != no ; then
16216         cat >> confdefs.h <<\EOF
16217 #define SLAPD_MODULES 1
16218 EOF
16219
16220         BUILD_SLAPD=yes
16221         SLAPD_MODULES_LDFLAGS="-dlopen self"
16222 fi
16223
16224 if test "$ol_enable_bdb" != no ; then
16225         cat >> confdefs.h <<\EOF
16226 #define SLAPD_BDB 1
16227 EOF
16228
16229         BUILD_SLAPD=yes
16230         BUILD_BDB=yes
16231         if test "$ol_with_bdb_module" != static ; then
16232                 cat >> confdefs.h <<\EOF
16233 #define SLAPD_BDB_DYNAMIC 1
16234 EOF
16235
16236                 BUILD_BDB=mod
16237                 BUILD_BDB_DYNAMIC=shared
16238                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16239         fi
16240 fi
16241
16242 if test "$ol_link_dnssrv" != no ; then
16243         cat >> confdefs.h <<\EOF
16244 #define SLAPD_DNSSRV 1
16245 EOF
16246
16247         BUILD_SLAPD=yes
16248         BUILD_DNSSRV=yes
16249         if test "$ol_with_dnssrv_module" != static ; then
16250                 cat >> confdefs.h <<\EOF
16251 #define SLAPD_DNSSRV_DYNAMIC 1
16252 EOF
16253
16254                 BUILD_DNSSRV=mod
16255                 BUILD_DNSSRV_DYNAMIC=shared
16256                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16257         fi
16258 fi
16259
16260 if test "$ol_enable_ldap" != no ; then
16261         cat >> confdefs.h <<\EOF
16262 #define SLAPD_LDAP 1
16263 EOF
16264
16265         BUILD_SLAPD=yes
16266         BUILD_LDAP=yes
16267         if test "$ol_with_ldap_module" != static ; then
16268                 cat >> confdefs.h <<\EOF
16269 #define SLAPD_LDAP_DYNAMIC 1
16270 EOF
16271
16272                 BUILD_LDAP=mod
16273                 BUILD_LDAP_DYNAMIC=shared
16274                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16275         fi
16276 fi
16277
16278 if test "$ol_link_ldbm" != no ; then
16279         cat >> confdefs.h <<\EOF
16280 #define SLAPD_LDBM 1
16281 EOF
16282
16283         BUILD_SLAPD=yes
16284         BUILD_LDBM=yes
16285         if test "$ol_with_ldbm_module" != static ; then
16286                 cat >> confdefs.h <<\EOF
16287 #define SLAPD_LDBM_DYNAMIC 1
16288 EOF
16289
16290                 BUILD_LDBM=mod
16291                 BUILD_LDBM_DYNAMIC=shared
16292                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16293         fi
16294 fi
16295
16296 if test "$ol_enable_passwd" != no ; then
16297         cat >> confdefs.h <<\EOF
16298 #define SLAPD_PASSWD 1
16299 EOF
16300
16301         BUILD_SLAPD=yes
16302         BUILD_PASSWD=yes
16303         if test "$ol_with_passwd_module" != static ; then
16304                 cat >> confdefs.h <<\EOF
16305 #define SLAPD_PASSWD_DYNAMIC 1
16306 EOF
16307
16308                 BUILD_PASSWD=mod
16309                 BUILD_PASSWD_DYNAMIC=shared
16310                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16311         fi
16312 fi
16313
16314 if test "$ol_link_perl" != no ; then
16315         cat >> confdefs.h <<\EOF
16316 #define SLAPD_PERL 1
16317 EOF
16318
16319         BUILD_SLAPD=yes
16320         BUILD_PERL=yes
16321         if test "$ol_with_perl_module" != static ; then
16322                 cat >> confdefs.h <<\EOF
16323 #define SLAPD_PERL_DYNAMIC 1
16324 EOF
16325
16326                 BUILD_PERL=mod
16327                 BUILD_PERL_DYNAMIC=shared
16328                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16329         fi
16330 fi
16331
16332 if test "$ol_enable_shell" != no ; then
16333         cat >> confdefs.h <<\EOF
16334 #define SLAPD_SHELL 1
16335 EOF
16336
16337         BUILD_SLAPD=yes
16338         BUILD_SHELL=yes
16339         if test "$ol_with_shell_module" != static ; then
16340                 cat >> confdefs.h <<\EOF
16341 #define SLAPD_SHELL_DYNAMIC 1
16342 EOF
16343
16344                 BUILD_SHELL=mod
16345                 BUILD_SHELL_DYNAMIC=shared
16346                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16347         fi
16348 fi
16349
16350 if test "$ol_enable_tcl" != no ; then
16351         cat >> confdefs.h <<\EOF
16352 #define SLAPD_TCL 1
16353 EOF
16354
16355         BUILD_SLAPD=yes
16356         BUILD_TCL=yes
16357         if test "$ol_with_tcl_module" != static; then
16358                 cat >> confdefs.h <<\EOF
16359 #define SLAPD_TCL_DYNAMIC 1
16360 EOF
16361
16362                 BUILD_TCL=mod
16363                 BUILD_TCL_DYNAMIC=shared
16364                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16365         fi
16366 fi
16367
16368 if test "$ol_link_sql" != no ; then
16369         cat >> confdefs.h <<\EOF
16370 #define SLAPD_SQL 1
16371 EOF
16372
16373         BUILD_SLAPD=yes
16374         BUILD_SQL=yes
16375         if test "$ol_with_sql_module" != static; then
16376                 cat >> confdefs.h <<\EOF
16377 #define SLAPD_SQL_DYNAMIC 1
16378 EOF
16379
16380                 BUILD_SQL=mod
16381                 BUILD_SQL_DYNAMIC=shared
16382                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16383         fi
16384 fi
16385
16386 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16387         $BUILD_SLAPD = yes ; then
16388         BUILD_SLURPD=yes
16389 fi
16390
16391
16392 if test "$LINK_BINS_DYNAMIC" = yes; then
16393     LIB_LINKAGE=DYN
16394     LT_LIB_LINKAGE=shared
16395 else
16396     LIB_LINKAGE=STAT
16397     LT_LIB_LINKAGE=static
16398 fi
16399
16400 if test "$ac_cv_mingw32" = yes ; then
16401     PLAT=NT
16402     DYN_EXT=dll
16403 else
16404     PLAT=UNIX
16405     DYN_EXT=so
16406 fi
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416   
16417   
16418   
16419   
16420   
16421   
16422   
16423   
16424   
16425   
16426   
16427   
16428   
16429   
16430   
16431   
16432   
16433   
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471 trap '' 1 2 15
16472
16473 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16474
16475 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16476 # Let make expand exec_prefix.
16477 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16478
16479 # Any assignment to VPATH causes Sun make to only execute
16480 # the first set of double-colon rules, so remove it if not needed.
16481 # If there is a colon in the path, we need to keep it.
16482 if test "x$srcdir" = x.; then
16483   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16484 fi
16485
16486 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16487
16488 DEFS=-DHAVE_CONFIG_H
16489
16490 # Without the "./", some shells look in PATH for config.status.
16491 : ${CONFIG_STATUS=./config.status}
16492
16493 echo creating $CONFIG_STATUS
16494 rm -f $CONFIG_STATUS
16495 cat > $CONFIG_STATUS <<EOF
16496 #! /bin/sh
16497 # Generated automatically by configure.
16498 # Run this file to recreate the current configuration.
16499 # This directory was configured as follows,
16500 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16501 #
16502 # $0 $ac_configure_args
16503 #
16504 # Compiler output produced by configure, useful for debugging
16505 # configure, is in ./config.log if it exists.
16506
16507 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16508 for ac_option
16509 do
16510   case "\$ac_option" in
16511   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16512     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16513     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16514   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16515     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16516     exit 0 ;;
16517   -help | --help | --hel | --he | --h)
16518     echo "\$ac_cs_usage"; exit 0 ;;
16519   *) echo "\$ac_cs_usage"; exit 1 ;;
16520   esac
16521 done
16522
16523 ac_given_srcdir=$srcdir
16524 ac_given_INSTALL="$INSTALL"
16525
16526 trap 'rm -fr `echo "\
16527 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16528 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16529 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16530 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16531 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16532 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16533 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16534 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16535 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16536 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16537 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16538 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16539 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16540 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16541 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16542 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16543 include/Makefile:build/top.mk:include/Makefile.in \
16544 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16545 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16546 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16547 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16548 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16549 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16550 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16551 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16552 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16553 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16554 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16555 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16556 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16557 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16558 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16559 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16560 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16561 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16562 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16563 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16564 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16565 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16566 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16567 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16568 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16569 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16570 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16571 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16572  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16573 EOF
16574 cat >> $CONFIG_STATUS <<EOF
16575
16576 # Protect against being on the right side of a sed subst in config.status.
16577 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16578  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16579 $ac_vpsub
16580 $extrasub
16581 s%@SHELL@%$SHELL%g
16582 s%@CFLAGS@%$CFLAGS%g
16583 s%@CPPFLAGS@%$CPPFLAGS%g
16584 s%@CXXFLAGS@%$CXXFLAGS%g
16585 s%@FFLAGS@%$FFLAGS%g
16586 s%@DEFS@%$DEFS%g
16587 s%@LDFLAGS@%$LDFLAGS%g
16588 s%@LIBS@%$LIBS%g
16589 s%@exec_prefix@%$exec_prefix%g
16590 s%@prefix@%$prefix%g
16591 s%@program_transform_name@%$program_transform_name%g
16592 s%@bindir@%$bindir%g
16593 s%@sbindir@%$sbindir%g
16594 s%@libexecdir@%$libexecdir%g
16595 s%@datadir@%$datadir%g
16596 s%@sysconfdir@%$sysconfdir%g
16597 s%@sharedstatedir@%$sharedstatedir%g
16598 s%@localstatedir@%$localstatedir%g
16599 s%@libdir@%$libdir%g
16600 s%@includedir@%$includedir%g
16601 s%@oldincludedir@%$oldincludedir%g
16602 s%@infodir@%$infodir%g
16603 s%@mandir@%$mandir%g
16604 s%@host@%$host%g
16605 s%@host_alias@%$host_alias%g
16606 s%@host_cpu@%$host_cpu%g
16607 s%@host_vendor@%$host_vendor%g
16608 s%@host_os@%$host_os%g
16609 s%@target@%$target%g
16610 s%@target_alias@%$target_alias%g
16611 s%@target_cpu@%$target_cpu%g
16612 s%@target_vendor@%$target_vendor%g
16613 s%@target_os@%$target_os%g
16614 s%@build@%$build%g
16615 s%@build_alias@%$build_alias%g
16616 s%@build_cpu@%$build_cpu%g
16617 s%@build_vendor@%$build_vendor%g
16618 s%@build_os@%$build_os%g
16619 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16620 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16621 s%@INSTALL_DATA@%$INSTALL_DATA%g
16622 s%@PACKAGE@%$PACKAGE%g
16623 s%@VERSION@%$VERSION%g
16624 s%@ACLOCAL@%$ACLOCAL%g
16625 s%@AUTOCONF@%$AUTOCONF%g
16626 s%@AUTOMAKE@%$AUTOMAKE%g
16627 s%@AUTOHEADER@%$AUTOHEADER%g
16628 s%@MAKEINFO@%$MAKEINFO%g
16629 s%@install_sh@%$install_sh%g
16630 s%@AMTAR@%$AMTAR%g
16631 s%@AWK@%$AWK%g
16632 s%@AMTARFLAGS@%$AMTARFLAGS%g
16633 s%@SET_MAKE@%$SET_MAKE%g
16634 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16635 s%@top_builddir@%$top_builddir%g
16636 s%@ldap_subdir@%$ldap_subdir%g
16637 s%@CC@%$CC%g
16638 s%@RANLIB@%$RANLIB%g
16639 s%@LN_S@%$LN_S%g
16640 s%@DLLTOOL@%$DLLTOOL%g
16641 s%@AS@%$AS%g
16642 s%@OBJDUMP@%$OBJDUMP%g
16643 s%@LIBTOOL@%$LIBTOOL%g
16644 s%@LN_H@%$LN_H%g
16645 s%@SENDMAIL@%$SENDMAIL%g
16646 s%@EDITOR@%$EDITOR%g
16647 s%@FINGER@%$FINGER%g
16648 s%@PERLBIN@%$PERLBIN%g
16649 s%@CPP@%$CPP%g
16650 s%@EXEEXT@%$EXEEXT%g
16651 s%@OBJEXT@%$OBJEXT%g
16652 s%@OL_MKDEP@%$OL_MKDEP%g
16653 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16654 s%@LIBOBJS@%$LIBOBJS%g
16655 s%@LIBSRCS@%$LIBSRCS%g
16656 s%@PLAT@%$PLAT%g
16657 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16658 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16659 s%@DYN_EXT@%$DYN_EXT%g
16660 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16661 s%@BUILD_BDB@%$BUILD_BDB%g
16662 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16663 s%@BUILD_LDAP@%$BUILD_LDAP%g
16664 s%@BUILD_LDBM@%$BUILD_LDBM%g
16665 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16666 s%@BUILD_PERL@%$BUILD_PERL%g
16667 s%@BUILD_SHELL@%$BUILD_SHELL%g
16668 s%@BUILD_SQL@%$BUILD_SQL%g
16669 s%@BUILD_TCL@%$BUILD_TCL%g
16670 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16671 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16672 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16673 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16674 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16675 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16676 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16677 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16678 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16679 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16680 s%@LDAP_LIBS@%$LDAP_LIBS%g
16681 s%@LDIF_LIBS@%$LDIF_LIBS%g
16682 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16683 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16684 s%@LDBM_LIBS@%$LDBM_LIBS%g
16685 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16686 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16687 s%@WRAP_LIBS@%$WRAP_LIBS%g
16688 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16689 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16690 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16691 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16692 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16693 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16694 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16695 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16696 s%@KRB4_LIBS@%$KRB4_LIBS%g
16697 s%@KRB5_LIBS@%$KRB5_LIBS%g
16698 s%@READLINE_LIBS@%$READLINE_LIBS%g
16699 s%@SASL_LIBS@%$SASL_LIBS%g
16700 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16701 s%@TLS_LIBS@%$TLS_LIBS%g
16702 s%@MODULES_LIBS@%$MODULES_LIBS%g
16703 s%@AUTH_LIBS@%$AUTH_LIBS%g
16704 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
16705 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16706 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16707 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16708
16709 CEOF
16710 EOF
16711
16712 cat >> $CONFIG_STATUS <<\EOF
16713
16714 # Split the substitutions into bite-sized pieces for seds with
16715 # small command number limits, like on Digital OSF/1 and HP-UX.
16716 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16717 ac_file=1 # Number of current file.
16718 ac_beg=1 # First line for current file.
16719 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16720 ac_more_lines=:
16721 ac_sed_cmds=""
16722 while $ac_more_lines; do
16723   if test $ac_beg -gt 1; then
16724     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16725   else
16726     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16727   fi
16728   if test ! -s conftest.s$ac_file; then
16729     ac_more_lines=false
16730     rm -f conftest.s$ac_file
16731   else
16732     if test -z "$ac_sed_cmds"; then
16733       ac_sed_cmds="sed -f conftest.s$ac_file"
16734     else
16735       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16736     fi
16737     ac_file=`expr $ac_file + 1`
16738     ac_beg=$ac_end
16739     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16740   fi
16741 done
16742 if test -z "$ac_sed_cmds"; then
16743   ac_sed_cmds=cat
16744 fi
16745 EOF
16746
16747 cat >> $CONFIG_STATUS <<EOF
16748
16749 CONFIG_FILES=\${CONFIG_FILES-"\
16750 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16751 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16752 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16753 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16754 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16755 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16756 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16757 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16758 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16759 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16760 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16761 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16762 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16763 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16764 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16765 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16766 include/Makefile:build/top.mk:include/Makefile.in \
16767 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16768 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16769 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16770 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16771 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16772 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16773 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16774 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16775 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16776 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16777 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16778 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16779 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16780 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16781 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16782 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16783 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16784 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16785 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16786 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16787 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16788 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16789 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16790 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16791 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16792 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16793 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16794 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16795 "}
16796 EOF
16797 cat >> $CONFIG_STATUS <<\EOF
16798 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16799   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16800   case "$ac_file" in
16801   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16802        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16803   *) ac_file_in="${ac_file}.in" ;;
16804   esac
16805
16806   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16807
16808   # Remove last slash and all that follows it.  Not all systems have dirname.
16809   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16810   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16811     # The file is in a subdirectory.
16812     test ! -d "$ac_dir" && mkdir "$ac_dir"
16813     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16814     # A "../" for each directory in $ac_dir_suffix.
16815     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16816   else
16817     ac_dir_suffix= ac_dots=
16818   fi
16819
16820   case "$ac_given_srcdir" in
16821   .)  srcdir=.
16822       if test -z "$ac_dots"; then top_srcdir=.
16823       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16824   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16825   *) # Relative path.
16826     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16827     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16828   esac
16829
16830   case "$ac_given_INSTALL" in
16831   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16832   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16833   esac
16834
16835   echo creating "$ac_file"
16836   rm -f "$ac_file"
16837   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16838   case "$ac_file" in
16839   *[Mm]akefile*) ac_comsub="1i\\
16840 # $configure_input" ;;
16841   *) ac_comsub= ;;
16842   esac
16843
16844   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16845   sed -e "$ac_comsub
16846 s%@configure_input@%$configure_input%g
16847 s%@srcdir@%$srcdir%g
16848 s%@top_srcdir@%$top_srcdir%g
16849 s%@INSTALL@%$INSTALL%g
16850 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16851 fi; done
16852 rm -f conftest.s*
16853
16854 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16855 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16856 #
16857 # ac_d sets the value in "#define NAME VALUE" lines.
16858 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16859 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16860 ac_dC='\3'
16861 ac_dD='%g'
16862 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16863 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16864 ac_uB='\([      ]\)%\1#\2define\3'
16865 ac_uC=' '
16866 ac_uD='\4%g'
16867 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16868 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16869 ac_eB='$%\1#\2define\3'
16870 ac_eC=' '
16871 ac_eD='%g'
16872
16873 if test "${CONFIG_HEADERS+set}" != set; then
16874 EOF
16875 cat >> $CONFIG_STATUS <<EOF
16876   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16877 EOF
16878 cat >> $CONFIG_STATUS <<\EOF
16879 fi
16880 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16881   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16882   case "$ac_file" in
16883   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16884        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16885   *) ac_file_in="${ac_file}.in" ;;
16886   esac
16887
16888   echo creating $ac_file
16889
16890   rm -f conftest.frag conftest.in conftest.out
16891   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16892   cat $ac_file_inputs > conftest.in
16893
16894 EOF
16895
16896 # Transform confdefs.h into a sed script conftest.vals that substitutes
16897 # the proper values into config.h.in to produce config.h.  And first:
16898 # Protect against being on the right side of a sed subst in config.status.
16899 # Protect against being in an unquoted here document in config.status.
16900 rm -f conftest.vals
16901 cat > conftest.hdr <<\EOF
16902 s/[\\&%]/\\&/g
16903 s%[\\$`]%\\&%g
16904 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16905 s%ac_d%ac_u%gp
16906 s%ac_u%ac_e%gp
16907 EOF
16908 sed -n -f conftest.hdr confdefs.h > conftest.vals
16909 rm -f conftest.hdr
16910
16911 # This sed command replaces #undef with comments.  This is necessary, for
16912 # example, in the case of _POSIX_SOURCE, which is predefined and required
16913 # on some systems where configure will not decide to define it.
16914 cat >> conftest.vals <<\EOF
16915 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16916 EOF
16917
16918 # Break up conftest.vals because some shells have a limit on
16919 # the size of here documents, and old seds have small limits too.
16920
16921 rm -f conftest.tail
16922 while :
16923 do
16924   ac_lines=`grep -c . conftest.vals`
16925   # grep -c gives empty output for an empty file on some AIX systems.
16926   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16927   # Write a limited-size here document to conftest.frag.
16928   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16929   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16930   echo 'CEOF
16931   sed -f conftest.frag conftest.in > conftest.out
16932   rm -f conftest.in
16933   mv conftest.out conftest.in
16934 ' >> $CONFIG_STATUS
16935   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16936   rm -f conftest.vals
16937   mv conftest.tail conftest.vals
16938 done
16939 rm -f conftest.vals
16940
16941 cat >> $CONFIG_STATUS <<\EOF
16942   rm -f conftest.frag conftest.h
16943   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16944   cat conftest.in >> conftest.h
16945   rm -f conftest.in
16946   if cmp -s $ac_file conftest.h 2>/dev/null; then
16947     echo "$ac_file is unchanged"
16948     rm -f conftest.h
16949   else
16950     # Remove last slash and all that follows it.  Not all systems have dirname.
16951       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16952       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16953       # The file is in a subdirectory.
16954       test ! -d "$ac_dir" && mkdir "$ac_dir"
16955     fi
16956     rm -f $ac_file
16957     mv conftest.h $ac_file
16958   fi
16959 fi; done
16960
16961 EOF
16962 cat >> $CONFIG_STATUS <<EOF
16963
16964 EOF
16965 cat >> $CONFIG_STATUS <<\EOF
16966
16967 date > stamp-h
16968 echo Please \"make depend\" to build dependencies
16969
16970 exit 0
16971 EOF
16972 chmod +x $CONFIG_STATUS
16973 rm -fr confdefs* $ac_clean_files
16974 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16975