]> git.sur5r.net Git - openldap/blob - configure
Fix typo
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.355 2001/05/11 22:51:28 ando Exp  
4
5 # Copyright 1998-2001 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-2001 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 (experimental) [no]"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals (experimental) [no]"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (deprecated) [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-rewrite      enable rewrite [no]"
47 ac_help="$ac_help
48   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch URL support [auto]"
53 ac_help="$ac_help
54   --with-kerberos         with support [auto]"
55 ac_help="$ac_help
56   --with-readline         with readline support [auto]"
57 ac_help="$ac_help
58   --with-threads          with threads [auto]"
59 ac_help="$ac_help
60   --with-tls              with TLS/SSL support [auto]"
61 ac_help="$ac_help
62   --with-yielding-select  with implicitly yielding select [auto]"
63 ac_help="$ac_help
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd          enable building slapd [yes]"
67 ac_help="$ac_help
68     --enable-aci          enable per-object ACIs (experimental) [no]"
69 ac_help="$ac_help
70     --enable-cleartext    enable cleartext passwords [yes]"
71 ac_help="$ac_help
72     --enable-crypt        enable crypt(3) passwords [no]"
73 ac_help="$ac_help
74     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
75 ac_help="$ac_help
76     --enable-kpasswd      enable Kerberos password verification [no]"
77 ac_help="$ac_help
78     --enable-lmpasswd     enable LAN Manager passwords [no]"
79 ac_help="$ac_help
80     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
81 ac_help="$ac_help
82     --enable-modules      enable dynamic module support [no]"
83 ac_help="$ac_help
84     --enable-phonetic     enable phonetic/soundex [no]"
85 ac_help="$ac_help
86     --enable-rlookups     enable reverse lookups [no]"
87 ac_help="$ac_help
88     --enable-slp          enable SLPv2 support [no]"
89 ac_help="$ac_help
90     --enable-wrappers     enable tcp wrapper support [no]"
91 ac_help="$ac_help
92     --enable-bdb          enable Berkeley DB backend [no]"
93 ac_help="$ac_help
94     --with-bdb-module     module type [static]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend [no]"
97 ac_help="$ac_help
98     --with-dnssrv-module  module type [static]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend [no]"
101 ac_help="$ac_help
102     --with-ldap-module    module type [static]"
103 ac_help="$ac_help
104     --enable-ldbm         enable ldbm backend [yes]"
105 ac_help="$ac_help
106     --with-ldbm-api       with LDBM API [auto]"
107 ac_help="$ac_help
108     --with-ldbm-module    module type [static]"
109 ac_help="$ac_help
110     --with-ldbm-type      use LDBM type [auto]"
111 ac_help="$ac_help
112     --enable-meta         enable metadirectory backend [no]"
113 ac_help="$ac_help
114     --with-meta-module    module type [static]"
115 ac_help="$ac_help
116     --enable-passwd       enable passwd backend [no]"
117 ac_help="$ac_help
118     --with-passwd-module  module type [static]"
119 ac_help="$ac_help
120     --enable-perl         enable perl backend [no]"
121 ac_help="$ac_help
122     --with-perl-module    module type [static]"
123 ac_help="$ac_help
124     --enable-shell        enable shell backend [no]"
125 ac_help="$ac_help
126     --with-shell-module   module type [static]"
127 ac_help="$ac_help
128     --enable-sql          enable sql backend [no]"
129 ac_help="$ac_help
130     --with-sql-module     module type [static]"
131 ac_help="$ac_help
132     --enable-tcl          enable tcl backend [no]"
133 ac_help="$ac_help
134     --with-tcl-module     module type [static]"
135 ac_help="$ac_help
136 SLURPD (Replication Daemon) Options:"
137 ac_help="$ac_help
138   --enable-slurpd         enable building slurpd [auto]"
139 ac_help="$ac_help
140 Library Generation & Linking Options"
141 ac_help="$ac_help
142   --enable-static[=PKGS]  build static libraries [default=yes]"
143 ac_help="$ac_help
144   --enable-shared[=PKGS]  build shared libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
147 ac_help="$ac_help
148   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
149 ac_help="$ac_help
150   --disable-libtool-lock  avoid locking (might break parallel builds)"
151
152 # Initialize some variables set by options.
153 # The variables have the same names as the options, with
154 # dashes changed to underlines.
155 build=NONE
156 cache_file=./config.cache
157 exec_prefix=NONE
158 host=NONE
159 no_create=
160 nonopt=NONE
161 no_recursion=
162 prefix=NONE
163 program_prefix=NONE
164 program_suffix=NONE
165 program_transform_name=s,x,x,
166 silent=
167 site=
168 srcdir=
169 target=NONE
170 verbose=
171 x_includes=NONE
172 x_libraries=NONE
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datadir='${prefix}/share'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${prefix}/info'
184 mandir='${prefix}/man'
185
186 # Initialize some other variables.
187 subdirs=
188 MFLAGS= MAKEFLAGS=
189 SHELL=${CONFIG_SHELL-/bin/sh}
190 # Maximum number of lines to put in a shell here document.
191 ac_max_here_lines=12
192
193 ac_prev=
194 for ac_option
195 do
196
197   # If the previous option needs an argument, assign it.
198   if test -n "$ac_prev"; then
199     eval "$ac_prev=\$ac_option"
200     ac_prev=
201     continue
202   fi
203
204   case "$ac_option" in
205   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
206   *) ac_optarg= ;;
207   esac
208
209   # Accept the important Cygnus configure options, so we can diagnose typos.
210
211   case "$ac_option" in
212
213   -bindir | --bindir | --bindi | --bind | --bin | --bi)
214     ac_prev=bindir ;;
215   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216     bindir="$ac_optarg" ;;
217
218   -build | --build | --buil | --bui | --bu)
219     ac_prev=build ;;
220   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
221     build="$ac_optarg" ;;
222
223   -cache-file | --cache-file | --cache-fil | --cache-fi \
224   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
225     ac_prev=cache_file ;;
226   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
227   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
228     cache_file="$ac_optarg" ;;
229
230   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231     ac_prev=datadir ;;
232   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233   | --da=*)
234     datadir="$ac_optarg" ;;
235
236   -disable-* | --disable-*)
237     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
238     # Reject names that are not valid shell variable names.
239     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
240       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
241     fi
242     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
243     eval "enable_${ac_feature}=no" ;;
244
245   -enable-* | --enable-*)
246     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
247     # Reject names that are not valid shell variable names.
248     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
249       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
250     fi
251     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
252     case "$ac_option" in
253       *=*) ;;
254       *) ac_optarg=yes ;;
255     esac
256     eval "enable_${ac_feature}='$ac_optarg'" ;;
257
258   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
259   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
260   | --exec | --exe | --ex)
261     ac_prev=exec_prefix ;;
262   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
263   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
264   | --exec=* | --exe=* | --ex=*)
265     exec_prefix="$ac_optarg" ;;
266
267   -gas | --gas | --ga | --g)
268     # Obsolete; use --with-gas.
269     with_gas=yes ;;
270
271   -help | --help | --hel | --he)
272     # Omit some internal or obsolete options to make the list less imposing.
273     # This message is too long to be a string in the A/UX 3.1 sh.
274     cat << EOF
275 Usage: configure [options] [host]
276 Options: [defaults in brackets after descriptions]
277 Configuration:
278   --cache-file=FILE       cache test results in FILE
279   --help                  print this message
280   --no-create             do not create output files
281   --quiet, --silent       do not print \`checking...' messages
282   --version               print the version of autoconf that created configure
283 Directory and file names:
284   --prefix=PREFIX         install architecture-independent files in PREFIX
285                           [$ac_default_prefix]
286   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
287                           [same as prefix]
288   --bindir=DIR            user executables in DIR [EPREFIX/bin]
289   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
290   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
291   --datadir=DIR           read-only architecture-independent data in DIR
292                           [PREFIX/share]
293   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
294   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
295                           [PREFIX/com]
296   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
297   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
298   --includedir=DIR        C header files in DIR [PREFIX/include]
299   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
300   --infodir=DIR           info documentation in DIR [PREFIX/info]
301   --mandir=DIR            man documentation in DIR [PREFIX/man]
302   --srcdir=DIR            find the sources in DIR [configure dir or ..]
303   --program-prefix=PREFIX prepend PREFIX to installed program names
304   --program-suffix=SUFFIX append SUFFIX to installed program names
305   --program-transform-name=PROGRAM
306                           run sed PROGRAM on installed program names
307 EOF
308     cat << EOF
309 Host type:
310   --build=BUILD           configure for building on BUILD [BUILD=HOST]
311   --host=HOST             configure for HOST [guessed]
312   --target=TARGET         configure for TARGET [TARGET=HOST]
313 Features and packages:
314   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
315   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
316   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
317   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
318   --x-includes=DIR        X include files are in DIR
319   --x-libraries=DIR       X library files are in DIR
320 EOF
321     if test -n "$ac_help"; then
322       echo "--enable and --with options recognized:$ac_help"
323     fi
324     exit 0 ;;
325
326   -host | --host | --hos | --ho)
327     ac_prev=host ;;
328   -host=* | --host=* | --hos=* | --ho=*)
329     host="$ac_optarg" ;;
330
331   -includedir | --includedir | --includedi | --included | --include \
332   | --includ | --inclu | --incl | --inc)
333     ac_prev=includedir ;;
334   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
335   | --includ=* | --inclu=* | --incl=* | --inc=*)
336     includedir="$ac_optarg" ;;
337
338   -infodir | --infodir | --infodi | --infod | --info | --inf)
339     ac_prev=infodir ;;
340   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
341     infodir="$ac_optarg" ;;
342
343   -libdir | --libdir | --libdi | --libd)
344     ac_prev=libdir ;;
345   -libdir=* | --libdir=* | --libdi=* | --libd=*)
346     libdir="$ac_optarg" ;;
347
348   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
349   | --libexe | --libex | --libe)
350     ac_prev=libexecdir ;;
351   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
352   | --libexe=* | --libex=* | --libe=*)
353     libexecdir="$ac_optarg" ;;
354
355   -localstatedir | --localstatedir | --localstatedi | --localstated \
356   | --localstate | --localstat | --localsta | --localst \
357   | --locals | --local | --loca | --loc | --lo)
358     ac_prev=localstatedir ;;
359   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
360   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
361   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
362     localstatedir="$ac_optarg" ;;
363
364   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
365     ac_prev=mandir ;;
366   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
367     mandir="$ac_optarg" ;;
368
369   -nfp | --nfp | --nf)
370     # Obsolete; use --without-fp.
371     with_fp=no ;;
372
373   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
374   | --no-cr | --no-c)
375     no_create=yes ;;
376
377   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
378   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
379     no_recursion=yes ;;
380
381   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
382   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
383   | --oldin | --oldi | --old | --ol | --o)
384     ac_prev=oldincludedir ;;
385   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
386   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
387   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
388     oldincludedir="$ac_optarg" ;;
389
390   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
391     ac_prev=prefix ;;
392   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
393     prefix="$ac_optarg" ;;
394
395   -program-prefix | --program-prefix | --program-prefi | --program-pref \
396   | --program-pre | --program-pr | --program-p)
397     ac_prev=program_prefix ;;
398   -program-prefix=* | --program-prefix=* | --program-prefi=* \
399   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
400     program_prefix="$ac_optarg" ;;
401
402   -program-suffix | --program-suffix | --program-suffi | --program-suff \
403   | --program-suf | --program-su | --program-s)
404     ac_prev=program_suffix ;;
405   -program-suffix=* | --program-suffix=* | --program-suffi=* \
406   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
407     program_suffix="$ac_optarg" ;;
408
409   -program-transform-name | --program-transform-name \
410   | --program-transform-nam | --program-transform-na \
411   | --program-transform-n | --program-transform- \
412   | --program-transform | --program-transfor \
413   | --program-transfo | --program-transf \
414   | --program-trans | --program-tran \
415   | --progr-tra | --program-tr | --program-t)
416     ac_prev=program_transform_name ;;
417   -program-transform-name=* | --program-transform-name=* \
418   | --program-transform-nam=* | --program-transform-na=* \
419   | --program-transform-n=* | --program-transform-=* \
420   | --program-transform=* | --program-transfor=* \
421   | --program-transfo=* | --program-transf=* \
422   | --program-trans=* | --program-tran=* \
423   | --progr-tra=* | --program-tr=* | --program-t=*)
424     program_transform_name="$ac_optarg" ;;
425
426   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
427   | -silent | --silent | --silen | --sile | --sil)
428     silent=yes ;;
429
430   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
431     ac_prev=sbindir ;;
432   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
433   | --sbi=* | --sb=*)
434     sbindir="$ac_optarg" ;;
435
436   -sharedstatedir | --sharedstatedir | --sharedstatedi \
437   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
438   | --sharedst | --shareds | --shared | --share | --shar \
439   | --sha | --sh)
440     ac_prev=sharedstatedir ;;
441   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
442   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
443   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
444   | --sha=* | --sh=*)
445     sharedstatedir="$ac_optarg" ;;
446
447   -site | --site | --sit)
448     ac_prev=site ;;
449   -site=* | --site=* | --sit=*)
450     site="$ac_optarg" ;;
451
452   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
453     ac_prev=srcdir ;;
454   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
455     srcdir="$ac_optarg" ;;
456
457   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
458   | --syscon | --sysco | --sysc | --sys | --sy)
459     ac_prev=sysconfdir ;;
460   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
461   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
462     sysconfdir="$ac_optarg" ;;
463
464   -target | --target | --targe | --targ | --tar | --ta | --t)
465     ac_prev=target ;;
466   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
467     target="$ac_optarg" ;;
468
469   -v | -verbose | --verbose | --verbos | --verbo | --verb)
470     verbose=yes ;;
471
472   -version | --version | --versio | --versi | --vers)
473     echo "configure generated by autoconf version 2.13.1"
474     exit 0 ;;
475
476   -with-* | --with-*)
477     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
478     # Reject names that are not valid shell variable names.
479     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
480       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
481     fi
482     ac_package=`echo $ac_package| sed 's/-/_/g'`
483     case "$ac_option" in
484       *=*) ;;
485       *) ac_optarg=yes ;;
486     esac
487     eval "with_${ac_package}='$ac_optarg'" ;;
488
489   -without-* | --without-*)
490     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
491     # Reject names that are not valid shell variable names.
492     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
493       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
494     fi
495     ac_package=`echo $ac_package| sed 's/-/_/g'`
496     eval "with_${ac_package}=no" ;;
497
498   --x)
499     # Obsolete; use --with-x.
500     with_x=yes ;;
501
502   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
503   | --x-incl | --x-inc | --x-in | --x-i)
504     ac_prev=x_includes ;;
505   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
506   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
507     x_includes="$ac_optarg" ;;
508
509   -x-libraries | --x-libraries | --x-librarie | --x-librari \
510   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
511     ac_prev=x_libraries ;;
512   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
513   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
514     x_libraries="$ac_optarg" ;;
515
516   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
517     ;;
518
519   *)
520     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
521       echo "configure: warning: $ac_option: invalid host type" 1>&2
522     fi
523     if test "x$nonopt" != xNONE; then
524       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
525     fi
526     nonopt="$ac_option"
527     ;;
528
529   esac
530 done
531
532 if test -n "$ac_prev"; then
533   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
534 fi
535
536 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
537
538 # File descriptor usage:
539 # 0 standard input
540 # 1 file creation
541 # 2 errors and warnings
542 # 3 some systems may open it to /dev/tty
543 # 4 used on the Kubota Titan
544 # 6 checking for... messages and results
545 # 5 compiler messages saved in config.log
546 if test "$silent" = yes; then
547   exec 6>/dev/null
548 else
549   exec 6>&1
550 fi
551 exec 5>./config.log
552
553 echo "\
554 This file contains any messages produced by compilers while
555 running configure, to aid debugging if configure makes a mistake.
556 " 1>&5
557
558 # Strip out --no-create and --no-recursion so they do not pile up.
559 # Also quote any args containing shell metacharacters.
560 ac_configure_args=
561 for ac_arg
562 do
563   case "$ac_arg" in
564   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
565   | --no-cr | --no-c) ;;
566   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
567   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
568   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
569   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
570   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
571   esac
572 done
573
574 # NLS nuisances.
575 # Only set these to C if already set.  These must not be set unconditionally
576 # because not all systems understand e.g. LANG=C (notably SCO).
577 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
578 # Non-C LC_CTYPE values break the ctype check.
579 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
580 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
581 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
582 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
583
584 # confdefs.h avoids OS command line length limits that DEFS can exceed.
585 rm -rf conftest* confdefs.h
586 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
587 echo > confdefs.h
588
589 # A filename unique to this package, relative to the directory that
590 # configure is in, which we can look for to find out if srcdir is correct.
591 ac_unique_file=build/version.sh
592
593 # Find the source files, if location was not specified.
594 if test -z "$srcdir"; then
595   ac_srcdir_defaulted=yes
596   # Try the directory containing this script, then its parent.
597   ac_prog=$0
598   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
599   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
600   srcdir=$ac_confdir
601   if test ! -r $srcdir/$ac_unique_file; then
602     srcdir=..
603   fi
604 else
605   ac_srcdir_defaulted=no
606 fi
607 if test ! -r $srcdir/$ac_unique_file; then
608   if test "$ac_srcdir_defaulted" = yes; then
609     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
610   else
611     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
612   fi
613 fi
614 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
615
616 # Prefer explicitly selected file to automatically selected ones.
617 if test -z "$CONFIG_SITE"; then
618   if test "x$prefix" != xNONE; then
619     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
620   else
621     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
622   fi
623 fi
624 for ac_site_file in $CONFIG_SITE; do
625   if test -r "$ac_site_file"; then
626     echo "loading site script $ac_site_file"
627     . "$ac_site_file"
628   fi
629 done
630
631
632 ac_ext=c
633 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
634 ac_cpp='$CPP $CPPFLAGS'
635 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
636 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
637 cross_compiling=$ac_cv_prog_cc_cross
638
639 ac_exeext=
640 ac_objext=o
641 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
642   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
643   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
644     ac_n= ac_c='
645 ' ac_t='        '
646   else
647     ac_n=-n ac_c= ac_t=
648   fi
649 else
650   ac_n= ac_c='\c' ac_t=
651 fi
652
653
654 # set unset (borrowed from autoconf 2.49c)
655 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
656   ol_unset=unset
657 else
658   ol_unset=false
659 fi
660 # unset CDPATH
661 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
662
663 ac_aux_dir=
664 for ac_dir in build $srcdir/build; do
665   if test -f $ac_dir/install-sh; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/install-sh -c"
668     break
669   elif test -f $ac_dir/install.sh; then
670     ac_aux_dir=$ac_dir
671     ac_install_sh="$ac_aux_dir/install.sh -c"
672     break
673   elif test -f $ac_dir/shtool; then
674     ac_aux_dir=$ac_dir
675     ac_install_sh="$ac_aux_dir/shtool install -c"
676     break
677   fi
678 done
679 if test -z "$ac_aux_dir"; then
680   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
681 fi
682 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
683 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
684 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
685
686 eval `$ac_aux_dir/version.sh`
687 if test -z "$OL_STRING"; then
688         { echo "configure: error: could not determine version" 1>&2; exit 1; }
689 fi
690
691 echo "Configuring $OL_STRING ..."
692
693
694 echo $ac_n "checking host system type""... $ac_c" 1>&6
695 echo "configure:696: checking host system type" >&5
696 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
697
698 # Make sure we can run config.sub.
699   if $ac_config_sub sun4 >/dev/null 2>&1; then :
700     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
701   fi
702
703   ac_cv_host_alias=$host
704   case "$ac_cv_host_alias" in
705   NONE)
706     case $nonopt in
707     NONE)
708       if ac_cv_host_alias=`$ac_config_guess`; then :
709       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
710       fi ;;
711     *) ac_cv_host_alias=$nonopt ;;
712     esac ;;
713   esac
714
715   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
716   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
717   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
718   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
719 else
720   echo $ac_n "(cached) $ac_c" 1>&6
721 fi
722
723 echo "$ac_t""$ac_cv_host" 1>&6
724
725 host=$ac_cv_host
726 host_alias=$ac_cv_host_alias
727 host_cpu=$ac_cv_host_cpu
728 host_vendor=$ac_cv_host_vendor
729 host_os=$ac_cv_host_os
730
731
732
733
734
735 echo $ac_n "checking target system type""... $ac_c" 1>&6
736 echo "configure:737: checking target system type" >&5
737 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
738
739 # Make sure we can run config.sub.
740   if $ac_config_sub sun4 >/dev/null 2>&1; then :
741     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
742   fi
743
744   ac_cv_target_alias=$target
745   case "$ac_cv_target_alias" in
746   NONE)
747     case $nonopt in
748     NONE)
749       ac_cv_target_alias=$host_alias ;;
750
751     *) ac_cv_target_alias=$nonopt ;;
752     esac ;;
753   esac
754
755   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
756   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
757   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
758   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
759 else
760   echo $ac_n "(cached) $ac_c" 1>&6
761 fi
762
763 echo "$ac_t""$ac_cv_target" 1>&6
764
765 target=$ac_cv_target
766 target_alias=$ac_cv_target_alias
767 target_cpu=$ac_cv_target_cpu
768 target_vendor=$ac_cv_target_vendor
769 target_os=$ac_cv_target_os
770
771
772
773
774
775 echo $ac_n "checking build system type""... $ac_c" 1>&6
776 echo "configure:777: checking build system type" >&5
777 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
778
779 # Make sure we can run config.sub.
780   if $ac_config_sub sun4 >/dev/null 2>&1; then :
781     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
782   fi
783
784   ac_cv_build_alias=$build
785   case "$ac_cv_build_alias" in
786   NONE)
787     case $nonopt in
788     NONE)
789       ac_cv_build_alias=$host_alias ;;
790
791     *) ac_cv_build_alias=$nonopt ;;
792     esac ;;
793   esac
794
795   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
796   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
797   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
798   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
799 else
800   echo $ac_n "(cached) $ac_c" 1>&6
801 fi
802
803 echo "$ac_t""$ac_cv_build" 1>&6
804
805 build=$ac_cv_build
806 build_alias=$ac_cv_build_alias
807 build_cpu=$ac_cv_build_cpu
808 build_vendor=$ac_cv_build_vendor
809 build_os=$ac_cv_build_os
810
811
812
813
814
815 # Do some error checking and defaulting for the host and target type.
816 # The inputs are:
817 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
818 #
819 # The rules are:
820 # 1. You are not allowed to specify --host, --target, and nonopt at the
821 #    same time.
822 # 2. Host defaults to nonopt.
823 # 3. If nonopt is not specified, then host defaults to the current host,
824 #    as determined by config.guess.
825 # 4. Target and build default to nonopt.
826 # 5. If nonopt is not specified, then target and build default to host.
827
828 # The aliases save the names the user supplied, while $host etc.
829 # will get canonicalized.
830 case $host---$target---$nonopt in
831 NONE---*---* | *---NONE---* | *---*---NONE) ;;
832 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
833 esac
834
835 test "$host_alias" != "$target_alias" &&
836   test "$program_prefix$program_suffix$program_transform_name" = \
837     NONENONEs,x,x, &&
838   program_prefix=${target_alias}-
839
840
841 # Find a good install program.  We prefer a C program (faster),
842 # so one script is as good as another.  But avoid the broken or
843 # incompatible versions:
844 # SysV /etc/install, /usr/sbin/install
845 # SunOS /usr/etc/install
846 # IRIX /sbin/install
847 # AIX /bin/install
848 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
849 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
850 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
851 # ./install, which can be erroneously created by make from ./install.sh.
852 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
853 echo "configure:854: checking for a BSD compatible install" >&5
854 if test -z "$INSTALL"; then
855 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
856   echo $ac_n "(cached) $ac_c" 1>&6
857 else
858     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
859   for ac_dir in $PATH; do
860     # Account for people who put trailing slashes in PATH elements.
861     case "$ac_dir/" in
862     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
863     *)
864       # OSF1 and SCO ODT 3.0 have their own names for install.
865       # Don't use installbsd from OSF since it installs stuff as root
866       # by default.
867       for ac_prog in ginstall scoinst install; do
868         if test -f $ac_dir/$ac_prog; then
869           if test $ac_prog = install &&
870             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
871             # AIX install.  It has an incompatible calling convention.
872             :
873           elif test $ac_prog = install &&
874             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
875             # program-specific install script used by HP pwplus--don't use.
876             :
877           else
878             ac_cv_path_install="$ac_dir/$ac_prog -c"
879             break 2
880           fi
881         fi
882       done
883       ;;
884     esac
885   done
886   IFS="$ac_save_IFS"
887
888 fi
889   if test "${ac_cv_path_install+set}" = set; then
890     INSTALL="$ac_cv_path_install"
891   else
892     # As a last resort, use the slow shell script.  We don't cache a
893     # path for INSTALL within a source directory, because that will
894     # break other packages using the cache if that directory is
895     # removed, or if the path is relative.
896     INSTALL="$ac_install_sh"
897   fi
898 fi
899 echo "$ac_t""$INSTALL" 1>&6
900
901 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
902 # It thinks the first close brace ends the variable substitution.
903 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
904
905 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
906
907 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
908
909 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
910 echo "configure:911: checking whether build environment is sane" >&5
911 # Just in case
912 sleep 1
913 echo timestamp > conftestfile
914 # Do `set' in a subshell so we don't clobber the current shell's
915 # arguments.  Must try -L first in case configure is actually a
916 # symlink; some systems play weird games with the mod time of symlinks
917 # (eg FreeBSD returns the mod time of the symlink's containing
918 # directory).
919 if (
920    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
921    if test "$*" = "X"; then
922       # -L didn't work.
923       set X `ls -t $srcdir/configure conftestfile`
924    fi
925    if test "$*" != "X $srcdir/configure conftestfile" \
926       && test "$*" != "X conftestfile $srcdir/configure"; then
927
928       # If neither matched, then we have a broken ls.  This can happen
929       # if, for instance, CONFIG_SHELL is bash and it inherits a
930       # broken ls alias from the environment.  This has actually
931       # happened.  Such a system could not be considered "sane".
932       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
933 alias in your environment" 1>&2; exit 1; }
934    fi
935
936    test "$2" = conftestfile
937    )
938 then
939    # Ok.
940    :
941 else
942    { echo "configure: error: newly created file is older than distributed files!
943 Check your system clock" 1>&2; exit 1; }
944 fi
945 rm -f conftest*
946 echo "$ac_t""yes" 1>&6
947 if test "$program_transform_name" = s,x,x,; then
948   program_transform_name=
949 else
950   # Double any \ or $.  echo might interpret backslashes.
951   cat <<\EOF_SED > conftestsed
952 s,\\,\\\\,g; s,\$,$$,g
953 EOF_SED
954   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
955   rm -f conftestsed
956 fi
957 test "$program_prefix" != NONE &&
958   program_transform_name="s,^,${program_prefix},;$program_transform_name"
959 # Use a double $ so make ignores it.
960 test "$program_suffix" != NONE &&
961   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
962
963 # sed with no file args requires a program.
964 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
965
966 for ac_prog in mawk gawk nawk awk
967 do
968 # Extract the first word of "$ac_prog", so it can be a program name with args.
969 set dummy $ac_prog; ac_word=$2
970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
971 echo "configure:972: checking for $ac_word" >&5
972 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
973   echo $ac_n "(cached) $ac_c" 1>&6
974 else
975   if test -n "$AWK"; then
976   ac_cv_prog_AWK="$AWK" # Let the user override the test.
977 else
978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
979   ac_dummy="$PATH"
980   for ac_dir in $ac_dummy; do
981     test -z "$ac_dir" && ac_dir=.
982     if test -f $ac_dir/$ac_word; then
983       ac_cv_prog_AWK="$ac_prog"
984       break
985     fi
986   done
987   IFS="$ac_save_ifs"
988 fi
989 fi
990 AWK="$ac_cv_prog_AWK"
991 if test -n "$AWK"; then
992   echo "$ac_t""$AWK" 1>&6
993 else
994   echo "$ac_t""no" 1>&6
995 fi
996
997 test -n "$AWK" && break
998 done
999
1000 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1001 echo "configure:1002: checking whether ${MAKE-make} sets \${MAKE}" >&5
1002 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1003 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1004   echo $ac_n "(cached) $ac_c" 1>&6
1005 else
1006   cat > conftestmake <<\EOF
1007 all:
1008         @echo 'ac_maketemp="${MAKE}"'
1009 EOF
1010 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1011 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1012 if test -n "$ac_maketemp"; then
1013   eval ac_cv_prog_make_${ac_make}_set=yes
1014 else
1015   eval ac_cv_prog_make_${ac_make}_set=no
1016 fi
1017 rm -f conftestmake
1018 fi
1019 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1020   echo "$ac_t""yes" 1>&6
1021   SET_MAKE=
1022 else
1023   echo "$ac_t""no" 1>&6
1024   SET_MAKE="MAKE=${MAKE-make}"
1025 fi
1026
1027
1028
1029 PACKAGE=$OL_PACKAGE
1030
1031 VERSION=$OL_VERSION
1032
1033 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1034   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1035 fi
1036
1037
1038
1039 missing_dir=`cd $ac_aux_dir && pwd`
1040 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1041 echo "configure:1042: checking for working aclocal" >&5
1042 # Run test in a subshell; some versions of sh will print an error if
1043 # an executable is not found, even if stderr is redirected.
1044 # Redirect stdin to placate older versions of autoconf.  Sigh.
1045 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1046    ACLOCAL=aclocal
1047    echo "$ac_t""found" 1>&6
1048 else
1049    ACLOCAL="$missing_dir/missing aclocal"
1050    echo "$ac_t""missing" 1>&6
1051 fi
1052
1053 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1054 echo "configure:1055: checking for working autoconf" >&5
1055 # Run test in a subshell; some versions of sh will print an error if
1056 # an executable is not found, even if stderr is redirected.
1057 # Redirect stdin to placate older versions of autoconf.  Sigh.
1058 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1059    AUTOCONF=autoconf
1060    echo "$ac_t""found" 1>&6
1061 else
1062    AUTOCONF="$missing_dir/missing autoconf"
1063    echo "$ac_t""missing" 1>&6
1064 fi
1065
1066 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1067 echo "configure:1068: checking for working automake" >&5
1068 # Run test in a subshell; some versions of sh will print an error if
1069 # an executable is not found, even if stderr is redirected.
1070 # Redirect stdin to placate older versions of autoconf.  Sigh.
1071 if (automake --version) < /dev/null > /dev/null 2>&1; then
1072    AUTOMAKE=automake
1073    echo "$ac_t""found" 1>&6
1074 else
1075    AUTOMAKE="$missing_dir/missing automake"
1076    echo "$ac_t""missing" 1>&6
1077 fi
1078
1079 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1080 echo "configure:1081: checking for working autoheader" >&5
1081 # Run test in a subshell; some versions of sh will print an error if
1082 # an executable is not found, even if stderr is redirected.
1083 # Redirect stdin to placate older versions of autoconf.  Sigh.
1084 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1085    AUTOHEADER=autoheader
1086    echo "$ac_t""found" 1>&6
1087 else
1088    AUTOHEADER="$missing_dir/missing autoheader"
1089    echo "$ac_t""missing" 1>&6
1090 fi
1091
1092 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1093 echo "configure:1094: checking for working makeinfo" >&5
1094 # Run test in a subshell; some versions of sh will print an error if
1095 # an executable is not found, even if stderr is redirected.
1096 # Redirect stdin to placate older versions of autoconf.  Sigh.
1097 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1098    MAKEINFO=makeinfo
1099    echo "$ac_t""found" 1>&6
1100 else
1101    MAKEINFO="$missing_dir/missing makeinfo"
1102    echo "$ac_t""missing" 1>&6
1103 fi
1104
1105 install_sh="$missing_dir/install-sh"
1106 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1107
1108 for ac_prog in gnutar gtar tar
1109 do
1110 # Extract the first word of "$ac_prog", so it can be a program name with args.
1111 set dummy $ac_prog; ac_word=$2
1112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1113 echo "configure:1114: checking for $ac_word" >&5
1114 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1115   echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117   if test -n "$AMTAR"; then
1118   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1119 else
1120   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1121   ac_dummy="$PATH"
1122   for ac_dir in $ac_dummy; do
1123     test -z "$ac_dir" && ac_dir=.
1124     if test -f $ac_dir/$ac_word; then
1125       ac_cv_prog_AMTAR="$ac_prog"
1126       break
1127     fi
1128   done
1129   IFS="$ac_save_ifs"
1130 fi
1131 fi
1132 AMTAR="$ac_cv_prog_AMTAR"
1133 if test -n "$AMTAR"; then
1134   echo "$ac_t""$AMTAR" 1>&6
1135 else
1136   echo "$ac_t""no" 1>&6
1137 fi
1138
1139 test -n "$AMTAR" && break
1140 done
1141
1142
1143 AMTARFLAGS=
1144 if test -n "$AMTAR"; then
1145   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1146         AMTARFLAGS=o
1147   fi
1148 fi
1149
1150 cat >> confdefs.h <<EOF
1151 #define OPENLDAP_PACKAGE "$PACKAGE"
1152 EOF
1153
1154 cat >> confdefs.h <<EOF
1155 #define OPENLDAP_VERSION "$VERSION"
1156 EOF
1157
1158
1159 cat >> confdefs.h <<EOF
1160 #define LDAP_VENDOR_VERSION $OL_API_INC
1161 EOF
1162
1163 cat >> confdefs.h <<EOF
1164 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1165 EOF
1166
1167 cat >> confdefs.h <<EOF
1168 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1169 EOF
1170
1171 cat >> confdefs.h <<EOF
1172 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1173 EOF
1174
1175
1176 OPENLDAP_LIBVERSION=$OL_API_LIB
1177
1178
1179
1180 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1181 echo "configure:1182: checking configure arguments" >&5
1182
1183
1184 top_builddir=`pwd`
1185
1186 ldap_subdir="/openldap"
1187
1188 # Check whether --with-subdir or --without-subdir was given.
1189 if test "${with_subdir+set}" = set; then
1190   withval="$with_subdir"
1191   case "$withval" in
1192         no) ldap_subdir=""
1193                 ;;
1194         yes)
1195                 ;;
1196         /*|\\*)
1197                 ldap_subdir="$withval"
1198                 ;;
1199         *)
1200                 ldap_subdir="/$withval"
1201                 ;;
1202 esac
1203
1204 fi
1205
1206
1207 # OpenLDAP --enable-debug
1208         # Check whether --enable-debug or --disable-debug was given.
1209 if test "${enable_debug+set}" = set; then
1210   enableval="$enable_debug"
1211   
1212         ol_arg=invalid
1213         for ol_val in auto yes no ; do
1214                 if test "$enableval" = "$ol_val" ; then
1215                         ol_arg="$ol_val"
1216                 fi
1217         done
1218         if test "$ol_arg" = "invalid" ; then
1219                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1220         fi
1221         ol_enable_debug="$ol_arg"
1222
1223 else
1224         ol_enable_debug="yes"
1225 fi
1226 # end --enable-debug
1227 # OpenLDAP --enable-syslog
1228         # Check whether --enable-syslog or --disable-syslog was given.
1229 if test "${enable_syslog+set}" = set; then
1230   enableval="$enable_syslog"
1231   
1232         ol_arg=invalid
1233         for ol_val in auto yes no ; do
1234                 if test "$enableval" = "$ol_val" ; then
1235                         ol_arg="$ol_val"
1236                 fi
1237         done
1238         if test "$ol_arg" = "invalid" ; then
1239                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1240         fi
1241         ol_enable_syslog="$ol_arg"
1242
1243 else
1244         ol_enable_syslog="auto"
1245 fi
1246 # end --enable-syslog
1247 # OpenLDAP --enable-proctitle
1248         # Check whether --enable-proctitle or --disable-proctitle was given.
1249 if test "${enable_proctitle+set}" = set; then
1250   enableval="$enable_proctitle"
1251   
1252         ol_arg=invalid
1253         for ol_val in auto yes no ; do
1254                 if test "$enableval" = "$ol_val" ; then
1255                         ol_arg="$ol_val"
1256                 fi
1257         done
1258         if test "$ol_arg" = "invalid" ; then
1259                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1260         fi
1261         ol_enable_proctitle="$ol_arg"
1262
1263 else
1264         ol_enable_proctitle="yes"
1265 fi
1266 # end --enable-proctitle
1267 # OpenLDAP --enable-cache
1268         # Check whether --enable-cache or --disable-cache was given.
1269 if test "${enable_cache+set}" = set; then
1270   enableval="$enable_cache"
1271   
1272         ol_arg=invalid
1273         for ol_val in auto yes no ; do
1274                 if test "$enableval" = "$ol_val" ; then
1275                         ol_arg="$ol_val"
1276                 fi
1277         done
1278         if test "$ol_arg" = "invalid" ; then
1279                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1280         fi
1281         ol_enable_cache="$ol_arg"
1282
1283 else
1284         ol_enable_cache="no"
1285 fi
1286 # end --enable-cache
1287 # OpenLDAP --enable-referrals
1288         # Check whether --enable-referrals or --disable-referrals was given.
1289 if test "${enable_referrals+set}" = set; then
1290   enableval="$enable_referrals"
1291   
1292         ol_arg=invalid
1293         for ol_val in auto yes no ; do
1294                 if test "$enableval" = "$ol_val" ; then
1295                         ol_arg="$ol_val"
1296                 fi
1297         done
1298         if test "$ol_arg" = "invalid" ; then
1299                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1300         fi
1301         ol_enable_referrals="$ol_arg"
1302
1303 else
1304         ol_enable_referrals="no"
1305 fi
1306 # end --enable-referrals
1307 # OpenLDAP --enable-kbind
1308         # Check whether --enable-kbind or --disable-kbind was given.
1309 if test "${enable_kbind+set}" = set; then
1310   enableval="$enable_kbind"
1311   
1312         ol_arg=invalid
1313         for ol_val in auto yes no ; do
1314                 if test "$enableval" = "$ol_val" ; then
1315                         ol_arg="$ol_val"
1316                 fi
1317         done
1318         if test "$ol_arg" = "invalid" ; then
1319                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1320         fi
1321         ol_enable_kbind="$ol_arg"
1322
1323 else
1324         ol_enable_kbind="no"
1325 fi
1326 # end --enable-kbind
1327 # OpenLDAP --enable-ipv6
1328         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1329 if test "${enable_ipv6+set}" = set; then
1330   enableval="$enable_ipv6"
1331   
1332         ol_arg=invalid
1333         for ol_val in auto yes no ; do
1334                 if test "$enableval" = "$ol_val" ; then
1335                         ol_arg="$ol_val"
1336                 fi
1337         done
1338         if test "$ol_arg" = "invalid" ; then
1339                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1340         fi
1341         ol_enable_ipv6="$ol_arg"
1342
1343 else
1344         ol_enable_ipv6="auto"
1345 fi
1346 # end --enable-ipv6
1347 # OpenLDAP --enable-local
1348         # Check whether --enable-local or --disable-local was given.
1349 if test "${enable_local+set}" = set; then
1350   enableval="$enable_local"
1351   
1352         ol_arg=invalid
1353         for ol_val in auto yes no ; do
1354                 if test "$enableval" = "$ol_val" ; then
1355                         ol_arg="$ol_val"
1356                 fi
1357         done
1358         if test "$ol_arg" = "invalid" ; then
1359                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1360         fi
1361         ol_enable_local="$ol_arg"
1362
1363 else
1364         ol_enable_local="auto"
1365 fi
1366 # end --enable-local
1367 # OpenLDAP --enable-rewrite
1368         # Check whether --enable-rewrite or --disable-rewrite was given.
1369 if test "${enable_rewrite+set}" = set; then
1370   enableval="$enable_rewrite"
1371   
1372         ol_arg=invalid
1373         for ol_val in auto yes no ; do
1374                 if test "$enableval" = "$ol_val" ; then
1375                         ol_arg="$ol_val"
1376                 fi
1377         done
1378         if test "$ol_arg" = "invalid" ; then
1379                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1380         fi
1381         ol_enable_rewrite="$ol_arg"
1382
1383 else
1384         ol_enable_rewrite="no"
1385 fi
1386 # end --enable-rewrite
1387 # OpenLDAP --enable-x_compile
1388         # Check whether --enable-x_compile or --disable-x_compile was given.
1389 if test "${enable_x_compile+set}" = set; then
1390   enableval="$enable_x_compile"
1391   
1392         ol_arg=invalid
1393         for ol_val in yes no ; do
1394                 if test "$enableval" = "$ol_val" ; then
1395                         ol_arg="$ol_val"
1396                 fi
1397         done
1398         if test "$ol_arg" = "invalid" ; then
1399                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1400         fi
1401         ol_enable_x_compile="$ol_arg"
1402
1403 else
1404         ol_enable_x_compile="no"
1405 fi
1406 # end --enable-x_compile
1407
1408
1409 # OpenLDAP --with-cyrus_sasl
1410         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1411 if test "${with_cyrus_sasl+set}" = set; then
1412   withval="$with_cyrus_sasl"
1413   
1414         ol_arg=invalid
1415         for ol_val in auto yes no  ; do
1416                 if test "$withval" = "$ol_val" ; then
1417                         ol_arg="$ol_val"
1418                 fi
1419         done
1420         if test "$ol_arg" = "invalid" ; then
1421                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1422         fi
1423         ol_with_cyrus_sasl="$ol_arg"
1424
1425 else
1426         ol_with_cyrus_sasl="auto"
1427 fi
1428 # end --with-cyrus_sasl
1429
1430 # OpenLDAP --with-fetch
1431         # Check whether --with-fetch or --without-fetch was given.
1432 if test "${with_fetch+set}" = set; then
1433   withval="$with_fetch"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no  ; do
1437                 if test "$withval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1443         fi
1444         ol_with_fetch="$ol_arg"
1445
1446 else
1447         ol_with_fetch="auto"
1448 fi
1449 # end --with-fetch
1450
1451 # OpenLDAP --with-kerberos
1452         # Check whether --with-kerberos or --without-kerberos was given.
1453 if test "${with_kerberos+set}" = set; then
1454   withval="$with_kerberos"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1458                 if test "$withval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1464         fi
1465         ol_with_kerberos="$ol_arg"
1466
1467 else
1468         ol_with_kerberos="auto"
1469 fi
1470 # end --with-kerberos
1471
1472 # OpenLDAP --with-readline
1473         # Check whether --with-readline or --without-readline was given.
1474 if test "${with_readline+set}" = set; then
1475   withval="$with_readline"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no  ; do
1479                 if test "$withval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1485         fi
1486         ol_with_readline="$ol_arg"
1487
1488 else
1489         ol_with_readline="auto"
1490 fi
1491 # end --with-readline
1492
1493 # OpenLDAP --with-threads
1494         # Check whether --with-threads or --without-threads was given.
1495 if test "${with_threads+set}" = set; then
1496   withval="$with_threads"
1497   
1498         ol_arg=invalid
1499         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1500                 if test "$withval" = "$ol_val" ; then
1501                         ol_arg="$ol_val"
1502                 fi
1503         done
1504         if test "$ol_arg" = "invalid" ; then
1505                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1506         fi
1507         ol_with_threads="$ol_arg"
1508
1509 else
1510         ol_with_threads="auto"
1511 fi
1512 # end --with-threads
1513
1514 # OpenLDAP --with-tls
1515         # Check whether --with-tls or --without-tls was given.
1516 if test "${with_tls+set}" = set; then
1517   withval="$with_tls"
1518   
1519         ol_arg=invalid
1520         for ol_val in auto ssleay openssl yes no  ; do
1521                 if test "$withval" = "$ol_val" ; then
1522                         ol_arg="$ol_val"
1523                 fi
1524         done
1525         if test "$ol_arg" = "invalid" ; then
1526                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1527         fi
1528         ol_with_tls="$ol_arg"
1529
1530 else
1531         ol_with_tls="auto"
1532 fi
1533 # end --with-tls
1534
1535 # OpenLDAP --with-yielding_select
1536         # Check whether --with-yielding_select or --without-yielding_select was given.
1537 if test "${with_yielding_select+set}" = set; then
1538   withval="$with_yielding_select"
1539   
1540         ol_arg=invalid
1541         for ol_val in auto yes no manual  ; do
1542                 if test "$withval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1548         fi
1549         ol_with_yielding_select="$ol_arg"
1550
1551 else
1552         ol_with_yielding_select="auto"
1553 fi
1554 # end --with-yielding_select
1555
1556
1557
1558 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1559 if test "${with_xxslapdoptions+set}" = set; then
1560   withval="$with_xxslapdoptions"
1561   :
1562 fi
1563
1564 # OpenLDAP --enable-slapd
1565         # Check whether --enable-slapd or --disable-slapd was given.
1566 if test "${enable_slapd+set}" = set; then
1567   enableval="$enable_slapd"
1568   
1569         ol_arg=invalid
1570         for ol_val in auto yes no ; do
1571                 if test "$enableval" = "$ol_val" ; then
1572                         ol_arg="$ol_val"
1573                 fi
1574         done
1575         if test "$ol_arg" = "invalid" ; then
1576                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1577         fi
1578         ol_enable_slapd="$ol_arg"
1579
1580 else
1581         ol_enable_slapd="yes"
1582 fi
1583 # end --enable-slapd
1584 # OpenLDAP --enable-aci
1585         # Check whether --enable-aci or --disable-aci was given.
1586 if test "${enable_aci+set}" = set; then
1587   enableval="$enable_aci"
1588   
1589         ol_arg=invalid
1590         for ol_val in auto yes no ; do
1591                 if test "$enableval" = "$ol_val" ; then
1592                         ol_arg="$ol_val"
1593                 fi
1594         done
1595         if test "$ol_arg" = "invalid" ; then
1596                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1597         fi
1598         ol_enable_aci="$ol_arg"
1599
1600 else
1601         ol_enable_aci="no"
1602 fi
1603 # end --enable-aci
1604 # OpenLDAP --enable-cleartext
1605         # Check whether --enable-cleartext or --disable-cleartext was given.
1606 if test "${enable_cleartext+set}" = set; then
1607   enableval="$enable_cleartext"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto yes no ; do
1611                 if test "$enableval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1617         fi
1618         ol_enable_cleartext="$ol_arg"
1619
1620 else
1621         ol_enable_cleartext="yes"
1622 fi
1623 # end --enable-cleartext
1624 # OpenLDAP --enable-crypt
1625         # Check whether --enable-crypt or --disable-crypt was given.
1626 if test "${enable_crypt+set}" = set; then
1627   enableval="$enable_crypt"
1628   
1629         ol_arg=invalid
1630         for ol_val in auto yes no ; do
1631                 if test "$enableval" = "$ol_val" ; then
1632                         ol_arg="$ol_val"
1633                 fi
1634         done
1635         if test "$ol_arg" = "invalid" ; then
1636                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1637         fi
1638         ol_enable_crypt="$ol_arg"
1639
1640 else
1641         ol_enable_crypt="no"
1642 fi
1643 # end --enable-crypt
1644 # OpenLDAP --enable-dynamic
1645         # Check whether --enable-dynamic or --disable-dynamic was given.
1646 if test "${enable_dynamic+set}" = set; then
1647   enableval="$enable_dynamic"
1648   
1649         ol_arg=invalid
1650         for ol_val in auto yes no ; do
1651                 if test "$enableval" = "$ol_val" ; then
1652                         ol_arg="$ol_val"
1653                 fi
1654         done
1655         if test "$ol_arg" = "invalid" ; then
1656                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1657         fi
1658         ol_enable_dynamic="$ol_arg"
1659
1660 else
1661         ol_enable_dynamic="no"
1662 fi
1663 # end --enable-dynamic
1664 # OpenLDAP --enable-kpasswd
1665         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1666 if test "${enable_kpasswd+set}" = set; then
1667   enableval="$enable_kpasswd"
1668   
1669         ol_arg=invalid
1670         for ol_val in auto yes no ; do
1671                 if test "$enableval" = "$ol_val" ; then
1672                         ol_arg="$ol_val"
1673                 fi
1674         done
1675         if test "$ol_arg" = "invalid" ; then
1676                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1677         fi
1678         ol_enable_kpasswd="$ol_arg"
1679
1680 else
1681         ol_enable_kpasswd="no"
1682 fi
1683 # end --enable-kpasswd
1684 # OpenLDAP --enable-lmpasswd
1685         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1686 if test "${enable_lmpasswd+set}" = set; then
1687   enableval="$enable_lmpasswd"
1688   
1689         ol_arg=invalid
1690         for ol_val in auto yes no ; do
1691                 if test "$enableval" = "$ol_val" ; then
1692                         ol_arg="$ol_val"
1693                 fi
1694         done
1695         if test "$ol_arg" = "invalid" ; then
1696                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1697         fi
1698         ol_enable_lmpasswd="$ol_arg"
1699
1700 else
1701         ol_enable_lmpasswd="no"
1702 fi
1703 # end --enable-lmpasswd
1704 # OpenLDAP --enable-spasswd
1705         # Check whether --enable-spasswd or --disable-spasswd was given.
1706 if test "${enable_spasswd+set}" = set; then
1707   enableval="$enable_spasswd"
1708   
1709         ol_arg=invalid
1710         for ol_val in auto yes no ; do
1711                 if test "$enableval" = "$ol_val" ; then
1712                         ol_arg="$ol_val"
1713                 fi
1714         done
1715         if test "$ol_arg" = "invalid" ; then
1716                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1717         fi
1718         ol_enable_spasswd="$ol_arg"
1719
1720 else
1721         ol_enable_spasswd="no"
1722 fi
1723 # end --enable-spasswd
1724 # OpenLDAP --enable-modules
1725         # Check whether --enable-modules or --disable-modules was given.
1726 if test "${enable_modules+set}" = set; then
1727   enableval="$enable_modules"
1728   
1729         ol_arg=invalid
1730         for ol_val in auto yes no ; do
1731                 if test "$enableval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1737         fi
1738         ol_enable_modules="$ol_arg"
1739
1740 else
1741         ol_enable_modules="no"
1742 fi
1743 # end --enable-modules
1744 # OpenLDAP --enable-phonetic
1745         # Check whether --enable-phonetic or --disable-phonetic was given.
1746 if test "${enable_phonetic+set}" = set; then
1747   enableval="$enable_phonetic"
1748   
1749         ol_arg=invalid
1750         for ol_val in auto yes no ; do
1751                 if test "$enableval" = "$ol_val" ; then
1752                         ol_arg="$ol_val"
1753                 fi
1754         done
1755         if test "$ol_arg" = "invalid" ; then
1756                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1757         fi
1758         ol_enable_phonetic="$ol_arg"
1759
1760 else
1761         ol_enable_phonetic="no"
1762 fi
1763 # end --enable-phonetic
1764 # OpenLDAP --enable-rlookups
1765         # Check whether --enable-rlookups or --disable-rlookups was given.
1766 if test "${enable_rlookups+set}" = set; then
1767   enableval="$enable_rlookups"
1768   
1769         ol_arg=invalid
1770         for ol_val in auto yes no ; do
1771                 if test "$enableval" = "$ol_val" ; then
1772                         ol_arg="$ol_val"
1773                 fi
1774         done
1775         if test "$ol_arg" = "invalid" ; then
1776                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1777         fi
1778         ol_enable_rlookups="$ol_arg"
1779
1780 else
1781         ol_enable_rlookups="no"
1782 fi
1783 # end --enable-rlookups
1784 # OpenLDAP --enable-slp
1785         # Check whether --enable-slp or --disable-slp was given.
1786 if test "${enable_slp+set}" = set; then
1787   enableval="$enable_slp"
1788   
1789         ol_arg=invalid
1790         for ol_val in auto yes no ; do
1791                 if test "$enableval" = "$ol_val" ; then
1792                         ol_arg="$ol_val"
1793                 fi
1794         done
1795         if test "$ol_arg" = "invalid" ; then
1796                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1797         fi
1798         ol_enable_slp="$ol_arg"
1799
1800 else
1801         ol_enable_slp="no"
1802 fi
1803 # end --enable-slp
1804 # OpenLDAP --enable-wrappers
1805         # Check whether --enable-wrappers or --disable-wrappers was given.
1806 if test "${enable_wrappers+set}" = set; then
1807   enableval="$enable_wrappers"
1808   
1809         ol_arg=invalid
1810         for ol_val in auto yes no ; do
1811                 if test "$enableval" = "$ol_val" ; then
1812                         ol_arg="$ol_val"
1813                 fi
1814         done
1815         if test "$ol_arg" = "invalid" ; then
1816                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1817         fi
1818         ol_enable_wrappers="$ol_arg"
1819
1820 else
1821         ol_enable_wrappers="no"
1822 fi
1823 # end --enable-wrappers
1824
1825 # OpenLDAP --enable-bdb
1826         # Check whether --enable-bdb or --disable-bdb was given.
1827 if test "${enable_bdb+set}" = set; then
1828   enableval="$enable_bdb"
1829   
1830         ol_arg=invalid
1831         for ol_val in auto yes no ; do
1832                 if test "$enableval" = "$ol_val" ; then
1833                         ol_arg="$ol_val"
1834                 fi
1835         done
1836         if test "$ol_arg" = "invalid" ; then
1837                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1838         fi
1839         ol_enable_bdb="$ol_arg"
1840
1841 else
1842         ol_enable_bdb="no"
1843 fi
1844 # end --enable-bdb
1845 # OpenLDAP --with-bdb_module
1846         # Check whether --with-bdb_module or --without-bdb_module was given.
1847 if test "${with_bdb_module+set}" = set; then
1848   withval="$with_bdb_module"
1849   
1850         ol_arg=invalid
1851         for ol_val in static dynamic ; do
1852                 if test "$withval" = "$ol_val" ; then
1853                         ol_arg="$ol_val"
1854                 fi
1855         done
1856         if test "$ol_arg" = "invalid" ; then
1857                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1858         fi
1859         ol_with_bdb_module="$ol_arg"
1860
1861 else
1862         ol_with_bdb_module="static"
1863 fi
1864 # end --with-bdb_module
1865
1866 # OpenLDAP --enable-dnssrv
1867         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1868 if test "${enable_dnssrv+set}" = set; then
1869   enableval="$enable_dnssrv"
1870   
1871         ol_arg=invalid
1872         for ol_val in auto yes no ; do
1873                 if test "$enableval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1879         fi
1880         ol_enable_dnssrv="$ol_arg"
1881
1882 else
1883         ol_enable_dnssrv="no"
1884 fi
1885 # end --enable-dnssrv
1886 # OpenLDAP --with-dnssrv_module
1887         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1888 if test "${with_dnssrv_module+set}" = set; then
1889   withval="$with_dnssrv_module"
1890   
1891         ol_arg=invalid
1892         for ol_val in static dynamic ; do
1893                 if test "$withval" = "$ol_val" ; then
1894                         ol_arg="$ol_val"
1895                 fi
1896         done
1897         if test "$ol_arg" = "invalid" ; then
1898                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1899         fi
1900         ol_with_dnssrv_module="$ol_arg"
1901
1902 else
1903         ol_with_dnssrv_module="static"
1904 fi
1905 # end --with-dnssrv_module
1906
1907 # OpenLDAP --enable-ldap
1908         # Check whether --enable-ldap or --disable-ldap was given.
1909 if test "${enable_ldap+set}" = set; then
1910   enableval="$enable_ldap"
1911   
1912         ol_arg=invalid
1913         for ol_val in auto yes no ; do
1914                 if test "$enableval" = "$ol_val" ; then
1915                         ol_arg="$ol_val"
1916                 fi
1917         done
1918         if test "$ol_arg" = "invalid" ; then
1919                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1920         fi
1921         ol_enable_ldap="$ol_arg"
1922
1923 else
1924         ol_enable_ldap="no"
1925 fi
1926 # end --enable-ldap
1927 # OpenLDAP --with-ldap_module
1928         # Check whether --with-ldap_module or --without-ldap_module was given.
1929 if test "${with_ldap_module+set}" = set; then
1930   withval="$with_ldap_module"
1931   
1932         ol_arg=invalid
1933         for ol_val in static dynamic ; do
1934                 if test "$withval" = "$ol_val" ; then
1935                         ol_arg="$ol_val"
1936                 fi
1937         done
1938         if test "$ol_arg" = "invalid" ; then
1939                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1940         fi
1941         ol_with_ldap_module="$ol_arg"
1942
1943 else
1944         ol_with_ldap_module="static"
1945 fi
1946 # end --with-ldap_module
1947
1948 # OpenLDAP --enable-ldbm
1949         # Check whether --enable-ldbm or --disable-ldbm was given.
1950 if test "${enable_ldbm+set}" = set; then
1951   enableval="$enable_ldbm"
1952   
1953         ol_arg=invalid
1954         for ol_val in auto yes no ; do
1955                 if test "$enableval" = "$ol_val" ; then
1956                         ol_arg="$ol_val"
1957                 fi
1958         done
1959         if test "$ol_arg" = "invalid" ; then
1960                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1961         fi
1962         ol_enable_ldbm="$ol_arg"
1963
1964 else
1965         ol_enable_ldbm="yes"
1966 fi
1967 # end --enable-ldbm
1968 # OpenLDAP --with-ldbm_api
1969         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1970 if test "${with_ldbm_api+set}" = set; then
1971   withval="$with_ldbm_api"
1972   
1973         ol_arg=invalid
1974         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1975                 if test "$withval" = "$ol_val" ; then
1976                         ol_arg="$ol_val"
1977                 fi
1978         done
1979         if test "$ol_arg" = "invalid" ; then
1980                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1981         fi
1982         ol_with_ldbm_api="$ol_arg"
1983
1984 else
1985         ol_with_ldbm_api="auto"
1986 fi
1987 # end --with-ldbm_api
1988
1989 # OpenLDAP --with-ldbm_module
1990         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1991 if test "${with_ldbm_module+set}" = set; then
1992   withval="$with_ldbm_module"
1993   
1994         ol_arg=invalid
1995         for ol_val in static dynamic ; do
1996                 if test "$withval" = "$ol_val" ; then
1997                         ol_arg="$ol_val"
1998                 fi
1999         done
2000         if test "$ol_arg" = "invalid" ; then
2001                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2002         fi
2003         ol_with_ldbm_module="$ol_arg"
2004
2005 else
2006         ol_with_ldbm_module="static"
2007 fi
2008 # end --with-ldbm_module
2009
2010 # OpenLDAP --with-ldbm_type
2011         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2012 if test "${with_ldbm_type+set}" = set; then
2013   withval="$with_ldbm_type"
2014   
2015         ol_arg=invalid
2016         for ol_val in auto btree hash ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_type="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_type="auto"
2028 fi
2029 # end --with-ldbm_type
2030
2031 # OpenLDAP --enable-meta
2032         # Check whether --enable-meta or --disable-meta was given.
2033 if test "${enable_meta+set}" = set; then
2034   enableval="$enable_meta"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto yes no ; do
2038                 if test "$enableval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2044         fi
2045         ol_enable_meta="$ol_arg"
2046
2047 else
2048         ol_enable_meta="no"
2049 fi
2050 # end --enable-meta
2051 # OpenLDAP --with-meta_module
2052         # Check whether --with-meta_module or --without-meta_module was given.
2053 if test "${with_meta_module+set}" = set; then
2054   withval="$with_meta_module"
2055   
2056         ol_arg=invalid
2057         for ol_val in static dynamic ; do
2058                 if test "$withval" = "$ol_val" ; then
2059                         ol_arg="$ol_val"
2060                 fi
2061         done
2062         if test "$ol_arg" = "invalid" ; then
2063                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2064         fi
2065         ol_with_meta_module="$ol_arg"
2066
2067 else
2068         ol_with_meta_module="static"
2069 fi
2070 # end --with-meta_module
2071
2072 # OpenLDAP --enable-passwd
2073         # Check whether --enable-passwd or --disable-passwd was given.
2074 if test "${enable_passwd+set}" = set; then
2075   enableval="$enable_passwd"
2076   
2077         ol_arg=invalid
2078         for ol_val in auto yes no ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2085         fi
2086         ol_enable_passwd="$ol_arg"
2087
2088 else
2089         ol_enable_passwd="no"
2090 fi
2091 # end --enable-passwd
2092 # OpenLDAP --with-passwd_module
2093         # Check whether --with-passwd_module or --without-passwd_module was given.
2094 if test "${with_passwd_module+set}" = set; then
2095   withval="$with_passwd_module"
2096   
2097         ol_arg=invalid
2098         for ol_val in static dynamic ; do
2099                 if test "$withval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2105         fi
2106         ol_with_passwd_module="$ol_arg"
2107
2108 else
2109         ol_with_passwd_module="static"
2110 fi
2111 # end --with-passwd_module
2112
2113 # OpenLDAP --enable-perl
2114         # Check whether --enable-perl or --disable-perl was given.
2115 if test "${enable_perl+set}" = set; then
2116   enableval="$enable_perl"
2117   
2118         ol_arg=invalid
2119         for ol_val in auto yes no ; do
2120                 if test "$enableval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2126         fi
2127         ol_enable_perl="$ol_arg"
2128
2129 else
2130         ol_enable_perl="no"
2131 fi
2132 # end --enable-perl
2133 # OpenLDAP --with-perl_module
2134         # Check whether --with-perl_module or --without-perl_module was given.
2135 if test "${with_perl_module+set}" = set; then
2136   withval="$with_perl_module"
2137   
2138         ol_arg=invalid
2139         for ol_val in static dynamic ; do
2140                 if test "$withval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2146         fi
2147         ol_with_perl_module="$ol_arg"
2148
2149 else
2150         ol_with_perl_module="static"
2151 fi
2152 # end --with-perl_module
2153
2154 # OpenLDAP --enable-shell
2155         # Check whether --enable-shell or --disable-shell was given.
2156 if test "${enable_shell+set}" = set; then
2157   enableval="$enable_shell"
2158   
2159         ol_arg=invalid
2160         for ol_val in auto yes no ; do
2161                 if test "$enableval" = "$ol_val" ; then
2162                         ol_arg="$ol_val"
2163                 fi
2164         done
2165         if test "$ol_arg" = "invalid" ; then
2166                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2167         fi
2168         ol_enable_shell="$ol_arg"
2169
2170 else
2171         ol_enable_shell="no"
2172 fi
2173 # end --enable-shell
2174 # OpenLDAP --with-shell_module
2175         # Check whether --with-shell_module or --without-shell_module was given.
2176 if test "${with_shell_module+set}" = set; then
2177   withval="$with_shell_module"
2178   
2179         ol_arg=invalid
2180         for ol_val in static dynamic ; do
2181                 if test "$withval" = "$ol_val" ; then
2182                         ol_arg="$ol_val"
2183                 fi
2184         done
2185         if test "$ol_arg" = "invalid" ; then
2186                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2187         fi
2188         ol_with_shell_module="$ol_arg"
2189
2190 else
2191         ol_with_shell_module="static"
2192 fi
2193 # end --with-shell_module
2194
2195 # OpenLDAP --enable-sql
2196         # Check whether --enable-sql or --disable-sql was given.
2197 if test "${enable_sql+set}" = set; then
2198   enableval="$enable_sql"
2199   
2200         ol_arg=invalid
2201         for ol_val in auto yes no ; do
2202                 if test "$enableval" = "$ol_val" ; then
2203                         ol_arg="$ol_val"
2204                 fi
2205         done
2206         if test "$ol_arg" = "invalid" ; then
2207                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2208         fi
2209         ol_enable_sql="$ol_arg"
2210
2211 else
2212         ol_enable_sql="no"
2213 fi
2214 # end --enable-sql
2215 # OpenLDAP --with-sql_module
2216         # Check whether --with-sql_module or --without-sql_module was given.
2217 if test "${with_sql_module+set}" = set; then
2218   withval="$with_sql_module"
2219   
2220         ol_arg=invalid
2221         for ol_val in static dynamic ; do
2222                 if test "$withval" = "$ol_val" ; then
2223                         ol_arg="$ol_val"
2224                 fi
2225         done
2226         if test "$ol_arg" = "invalid" ; then
2227                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2228         fi
2229         ol_with_sql_module="$ol_arg"
2230
2231 else
2232         ol_with_sql_module="static"
2233 fi
2234 # end --with-sql_module
2235
2236 # OpenLDAP --enable-tcl
2237         # Check whether --enable-tcl or --disable-tcl was given.
2238 if test "${enable_tcl+set}" = set; then
2239   enableval="$enable_tcl"
2240   
2241         ol_arg=invalid
2242         for ol_val in auto yes no ; do
2243                 if test "$enableval" = "$ol_val" ; then
2244                         ol_arg="$ol_val"
2245                 fi
2246         done
2247         if test "$ol_arg" = "invalid" ; then
2248                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2249         fi
2250         ol_enable_tcl="$ol_arg"
2251
2252 else
2253         ol_enable_tcl="no"
2254 fi
2255 # end --enable-tcl
2256 # OpenLDAP --with-tcl_module
2257         # Check whether --with-tcl_module or --without-tcl_module was given.
2258 if test "${with_tcl_module+set}" = set; then
2259   withval="$with_tcl_module"
2260   
2261         ol_arg=invalid
2262         for ol_val in static dynamic ; do
2263                 if test "$withval" = "$ol_val" ; then
2264                         ol_arg="$ol_val"
2265                 fi
2266         done
2267         if test "$ol_arg" = "invalid" ; then
2268                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2269         fi
2270         ol_with_tcl_module="$ol_arg"
2271
2272 else
2273         ol_with_tcl_module="static"
2274 fi
2275 # end --with-tcl_module
2276
2277
2278 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2279 if test "${with_xxslurpdoptions+set}" = set; then
2280   withval="$with_xxslurpdoptions"
2281   :
2282 fi
2283
2284 # OpenLDAP --enable-slurpd
2285         # Check whether --enable-slurpd or --disable-slurpd was given.
2286 if test "${enable_slurpd+set}" = set; then
2287   enableval="$enable_slurpd"
2288   
2289         ol_arg=invalid
2290         for ol_val in auto yes no ; do
2291                 if test "$enableval" = "$ol_val" ; then
2292                         ol_arg="$ol_val"
2293                 fi
2294         done
2295         if test "$ol_arg" = "invalid" ; then
2296                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2297         fi
2298         ol_enable_slurpd="$ol_arg"
2299
2300 else
2301         ol_enable_slurpd="auto"
2302 fi
2303 # end --enable-slurpd
2304
2305 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2306 if test "${with_xxliboptions+set}" = set; then
2307   withval="$with_xxliboptions"
2308   :
2309 fi
2310
2311 # Check whether --enable-static or --disable-static was given.
2312 if test "${enable_static+set}" = set; then
2313   enableval="$enable_static"
2314   p=${PACKAGE-default}
2315 case "$enableval" in
2316 yes) enable_static=yes ;;
2317 no) enable_static=no ;;
2318 *)
2319   enable_static=no
2320   # Look at the argument we got.  We use all the common list separators.
2321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2322   for pkg in $enableval; do
2323     if test "X$pkg" = "X$p"; then
2324       enable_static=yes
2325     fi
2326   done
2327   IFS="$ac_save_ifs"
2328   ;;
2329 esac
2330 else
2331   enable_static=yes
2332 fi
2333
2334 # Check whether --enable-shared or --disable-shared was given.
2335 if test "${enable_shared+set}" = set; then
2336   enableval="$enable_shared"
2337   p=${PACKAGE-default}
2338 case "$enableval" in
2339 yes) enable_shared=yes ;;
2340 no) enable_shared=no ;;
2341 *)
2342   enable_shared=no
2343   # Look at the argument we got.  We use all the common list separators.
2344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2345   for pkg in $enableval; do
2346     if test "X$pkg" = "X$p"; then
2347       enable_shared=yes
2348     fi
2349   done
2350   IFS="$ac_save_ifs"
2351   ;;
2352 esac
2353 else
2354   enable_shared=yes
2355 fi
2356
2357
2358
2359 # validate options
2360 if test $ol_enable_slapd = no ; then
2361                 if test $ol_enable_bdb = yes ; then
2362                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2363         fi
2364         if test $ol_enable_dnssrv = yes ; then
2365                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2366         fi
2367         if test $ol_enable_ldap = yes ; then
2368                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2369         fi
2370         if test $ol_enable_ldbm = yes ; then
2371                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2372         fi
2373         if test $ol_enable_meta = yes ; then
2374                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2375         fi
2376         if test $ol_enable_passwd = yes ; then
2377                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2378         fi
2379         if test $ol_enable_perl = yes ; then
2380                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2381         fi
2382         if test $ol_enable_shell = yes ; then
2383                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2384         fi
2385         if test $ol_enable_tcl = yes ; then
2386                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2387         fi
2388         if test $ol_enable_sql = yes ; then
2389                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2390         fi
2391         if test $ol_enable_modules = yes ; then
2392                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2393         fi
2394         if test $ol_enable_wrappers = yes ; then
2395                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2396         fi
2397         if test $ol_enable_phonetic = yes ; then
2398                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2399         fi
2400         if test $ol_enable_rlookups = yes ; then
2401                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2402         fi
2403         if test $ol_enable_aci = yes ; then
2404                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2405         fi
2406         if test $ol_with_ldbm_api != auto ; then
2407                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2408         fi
2409         if test $ol_with_ldbm_type != auto ; then
2410                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2411         fi
2412         if test $ol_with_bdb_module != static ; then
2413                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2414         fi
2415         if test $ol_with_dnssrv_module != static ; then
2416                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2417         fi
2418         if test $ol_with_ldap_module != static ; then
2419                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2420         fi
2421         if test $ol_with_ldbm_module != static ; then
2422                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2423         fi
2424         if test $ol_with_meta_module != static ; then
2425                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2426         fi
2427         if test $ol_with_passwd_module != static ; then
2428                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2429         fi
2430         if test $ol_with_perl_module != static ; then
2431                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2432         fi
2433         if test $ol_with_shell_module != static ; then
2434                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2435         fi
2436         if test $ol_with_tcl_module != static ; then
2437                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2438         fi
2439         if test $ol_with_sql_module != static ; then
2440                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2441         fi
2442         if test $ol_enable_slurpd = yes ; then
2443                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2444         fi
2445         if test $ol_enable_rewrite = yes ; then
2446                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2447         fi
2448
2449         # force settings to no
2450         ol_enable_bdb=no
2451         ol_enable_dnssrv=no
2452         ol_enable_ldap=no
2453         ol_enable_ldbm=no
2454         ol_enable_meta=no
2455         ol_enable_passwd=no
2456         ol_enable_perl=no
2457         ol_enable_shell=no
2458         ol_enable_tcl=no
2459         ol_enable_sql=no
2460
2461         ol_enable_modules=no
2462         ol_enable_phonetic=no
2463         ol_enable_rlookups=no
2464         ol_enable_aci=no
2465         ol_enable_wrappers=no
2466         ol_enable_dynamic=no
2467
2468         ol_with_ldbm_api=no
2469         ol_with_ldbm_type=no
2470
2471         ol_with_bdb_module=static
2472         ol_with_dnssrv_module=static
2473         ol_with_ldap_module=static
2474         ol_with_ldbm_module=static
2475         ol_with_meta_module=static
2476         ol_with_passwd_module=static
2477         ol_with_perl_module=static
2478         ol_with_shell_module=static
2479         ol_with_tcl_module=static
2480         ol_with_sql_module=static
2481
2482         ol_enable_slurpd=no
2483
2484         ol_enable_rewrite=no
2485
2486 elif test $ol_enable_ldbm = no ; then
2487         
2488         if test $ol_with_ldbm_api != auto ; then
2489                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2490         fi
2491
2492         if test $ol_with_ldbm_type != auto ; then
2493                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2494         fi
2495
2496         if test $ol_with_ldbm_module != static ; then
2497                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2498         fi
2499
2500         if test $ol_enable_modules != yes -a \
2501                 $ol_enable_bdb = no -a \
2502                 $ol_enable_dnssrv = no -a \
2503                 $ol_enable_ldap = no -a \
2504                 $ol_enable_meta = no -a \
2505                 $ol_enable_passwd = no -a \
2506                 $ol_enable_perl = no -a \
2507                 $ol_enable_shell = no -a \
2508                 $ol_enable_sql = no -a \
2509                 $ol_enable_tcl = no ; then
2510                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2511         fi
2512
2513         ol_with_ldbm_api=no
2514         ol_with_ldbm_type=no
2515         ol_with_ldbm_module=static
2516
2517 else
2518                 if test $ol_with_ldbm_api = gdbm -a \
2519                 $ol_with_ldbm_type = btree ; then
2520                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2521         fi
2522         if test $ol_with_ldbm_api = mdbm -a \
2523                 $ol_with_ldbm_type = btree ; then
2524                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2525         fi
2526         if test $ol_with_ldbm_api = ndbm -a \
2527                 $ol_with_ldbm_type = btree ; then
2528                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2529         fi
2530 fi
2531
2532 if test $ol_enable_slurpd = yes ; then
2533                 if test $ol_with_threads = no ; then
2534                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2535         fi
2536 fi
2537
2538 if test $ol_enable_lmpasswd = yes ; then
2539         if test $ol_with_tls = no ; then
2540                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2541         fi
2542 fi
2543
2544 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2545         if test $ol_with_kerberos = no ; then
2546                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2547         fi
2548         ol_with_kerberos=yes
2549 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2550         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2551                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2552         fi
2553         ol_with_kerberos=no
2554 fi
2555
2556 if test $ol_enable_spasswd = yes ; then
2557         if test $ol_with_cyrus_sasl = no ; then
2558                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2559         fi
2560         ol_with_cyrus_sasl=yes
2561 fi
2562
2563 echo "$ac_t""done" 1>&6
2564
2565 LDAP_LIBS=
2566 LDIF_LIBS=
2567 LDBM_LIBS=
2568 LTHREAD_LIBS=
2569 LUTIL_LIBS=
2570
2571 SLAPD_LIBS=
2572 SLURPD_LIBS=
2573
2574 BUILD_SLAPD=no
2575 BUILD_SLURPD=no
2576
2577 BUILD_THREAD=no
2578
2579 BUILD_BDB=no
2580 BUILD_DNSSRV=no
2581 BUILD_LDAP=no
2582 BUILD_LDBM=no
2583 BUILD_META=no
2584 BUILD_PASSWD=no
2585 BUILD_PERL=no
2586 BUILD_SHELL=no
2587 BUILD_SQL=no
2588 BUILD_TCL=no
2589
2590 BUILD_BDB_DYNAMIC=static
2591 BUILD_DNSSRV_DYNAMIC=static
2592 BUILD_LDAP_DYNAMIC=static
2593 BUILD_LDBM_DYNAMIC=static
2594 BUILD_META_DYNAMIC=static
2595 BUILD_PASSWD_DYNAMIC=static
2596 BUILD_PERL_DYNAMIC=static
2597 BUILD_SHELL_DYNAMIC=static
2598 BUILD_TCL_DYNAMIC=static
2599 BUILD_SQL_DYNAMIC=static
2600
2601 SLAPD_MODULES_LDFLAGS=
2602 SLAPD_MODULES_CPPFLAGS=
2603 SLAPD_MODULES_LIST=
2604
2605 SLAPD_PERL_LDFLAGS=
2606 MOD_PERL_LDFLAGS=
2607 PERL_CPPFLAGS=
2608
2609 SLAPD_SQL_LDFLAGS=
2610 SLAPD_SQL_LIBS=
2611 SLAPD_SQL_INCLUDES=
2612
2613 MOD_TCL_LIB=
2614 KRB4_LIBS=
2615 KRB5_LIBS=
2616 READLINE_LIBS=
2617 SASL_LIBS=
2618 TERMCAP_LIBS=
2619 TLS_LIBS=
2620 MODULES_LIBS=
2621 AUTH_LIBS=
2622
2623 SLAPD_SLP_LIBS=
2624
2625
2626
2627 cat >> confdefs.h <<\EOF
2628 #define HAVE_MKVERSION 1
2629 EOF
2630
2631
2632
2633
2634 ol_aix_threads=no
2635 case "$target" in
2636 *-*-aix*)       if test -z "$CC" ; then
2637                 case "$ol_with_threads" in
2638                 auto | yes |  posix) ol_aix_threads=yes ;;
2639                 esac
2640         fi
2641 ;;
2642 esac
2643
2644 if test $ol_aix_threads = yes ; then
2645         if test -z "${CC}" ; then
2646                 for ac_prog in cc_r xlc_r cc
2647 do
2648 # Extract the first word of "$ac_prog", so it can be a program name with args.
2649 set dummy $ac_prog; ac_word=$2
2650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2651 echo "configure:2652: checking for $ac_word" >&5
2652 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2653   echo $ac_n "(cached) $ac_c" 1>&6
2654 else
2655   if test -n "$CC"; then
2656   ac_cv_prog_CC="$CC" # Let the user override the test.
2657 else
2658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2659   ac_dummy="$PATH"
2660   for ac_dir in $ac_dummy; do
2661     test -z "$ac_dir" && ac_dir=.
2662     if test -f $ac_dir/$ac_word; then
2663       ac_cv_prog_CC="$ac_prog"
2664       break
2665     fi
2666   done
2667   IFS="$ac_save_ifs"
2668 fi
2669 fi
2670 CC="$ac_cv_prog_CC"
2671 if test -n "$CC"; then
2672   echo "$ac_t""$CC" 1>&6
2673 else
2674   echo "$ac_t""no" 1>&6
2675 fi
2676
2677 test -n "$CC" && break
2678 done
2679
2680
2681                 if test "$CC" = cc ; then
2682                                                 if test $ol_with_threads != auto ; then
2683                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2684                         else
2685                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2686                         fi
2687                         ol_with_threads=no
2688                 fi
2689         fi
2690
2691         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2692                 ol_with_threads=posix
2693                 ol_cv_pthread_create=yes
2694         fi
2695 fi
2696
2697 if test -z "${CC}"; then
2698         for ac_prog in cc
2699 do
2700 # Extract the first word of "$ac_prog", so it can be a program name with args.
2701 set dummy $ac_prog; ac_word=$2
2702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2703 echo "configure:2704: checking for $ac_word" >&5
2704 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2705   echo $ac_n "(cached) $ac_c" 1>&6
2706 else
2707   if test -n "$CC"; then
2708   ac_cv_prog_CC="$CC" # Let the user override the test.
2709 else
2710   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2711   ac_dummy="$PATH"
2712   for ac_dir in $ac_dummy; do
2713     test -z "$ac_dir" && ac_dir=.
2714     if test -f $ac_dir/$ac_word; then
2715       ac_cv_prog_CC="$ac_prog"
2716       break
2717     fi
2718   done
2719   IFS="$ac_save_ifs"
2720 fi
2721 fi
2722 CC="$ac_cv_prog_CC"
2723 if test -n "$CC"; then
2724   echo "$ac_t""$CC" 1>&6
2725 else
2726   echo "$ac_t""no" 1>&6
2727 fi
2728
2729 test -n "$CC" && break
2730 done
2731
2732 fi
2733
2734
2735
2736
2737 # Check whether --enable-fast-install or --disable-fast-install was given.
2738 if test "${enable_fast_install+set}" = set; then
2739   enableval="$enable_fast_install"
2740   p=${PACKAGE-default}
2741 case "$enableval" in
2742 yes) enable_fast_install=yes ;;
2743 no) enable_fast_install=no ;;
2744 *)
2745   enable_fast_install=no
2746   # Look at the argument we got.  We use all the common list separators.
2747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2748   for pkg in $enableval; do
2749     if test "X$pkg" = "X$p"; then
2750       enable_fast_install=yes
2751     fi
2752   done
2753   IFS="$ac_save_ifs"
2754   ;;
2755 esac
2756 else
2757   enable_fast_install=yes
2758 fi
2759
2760 # Extract the first word of "ranlib", so it can be a program name with args.
2761 set dummy ranlib; ac_word=$2
2762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2763 echo "configure:2764: checking for $ac_word" >&5
2764 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2765   echo $ac_n "(cached) $ac_c" 1>&6
2766 else
2767   if test -n "$RANLIB"; then
2768   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2769 else
2770   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2771   ac_dummy="$PATH"
2772   for ac_dir in $ac_dummy; do
2773     test -z "$ac_dir" && ac_dir=.
2774     if test -f $ac_dir/$ac_word; then
2775       ac_cv_prog_RANLIB="ranlib"
2776       break
2777     fi
2778   done
2779   IFS="$ac_save_ifs"
2780   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2781 fi
2782 fi
2783 RANLIB="$ac_cv_prog_RANLIB"
2784 if test -n "$RANLIB"; then
2785   echo "$ac_t""$RANLIB" 1>&6
2786 else
2787   echo "$ac_t""no" 1>&6
2788 fi
2789
2790 # Extract the first word of "gcc", so it can be a program name with args.
2791 set dummy gcc; ac_word=$2
2792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2793 echo "configure:2794: checking for $ac_word" >&5
2794 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2795   echo $ac_n "(cached) $ac_c" 1>&6
2796 else
2797   if test -n "$CC"; then
2798   ac_cv_prog_CC="$CC" # Let the user override the test.
2799 else
2800   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2801   ac_dummy="$PATH"
2802   for ac_dir in $ac_dummy; do
2803     test -z "$ac_dir" && ac_dir=.
2804     if test -f $ac_dir/$ac_word; then
2805       ac_cv_prog_CC="gcc"
2806       break
2807     fi
2808   done
2809   IFS="$ac_save_ifs"
2810 fi
2811 fi
2812 CC="$ac_cv_prog_CC"
2813 if test -n "$CC"; then
2814   echo "$ac_t""$CC" 1>&6
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818
2819 if test -z "$CC"; then
2820   # Extract the first word of "cc", so it can be a program name with args.
2821 set dummy cc; ac_word=$2
2822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2823 echo "configure:2824: checking for $ac_word" >&5
2824 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2825   echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827   if test -n "$CC"; then
2828   ac_cv_prog_CC="$CC" # Let the user override the test.
2829 else
2830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2831   ac_prog_rejected=no
2832   ac_dummy="$PATH"
2833   for ac_dir in $ac_dummy; do
2834     test -z "$ac_dir" && ac_dir=.
2835     if test -f $ac_dir/$ac_word; then
2836       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2837         ac_prog_rejected=yes
2838         continue
2839       fi
2840       ac_cv_prog_CC="cc"
2841       break
2842     fi
2843   done
2844   IFS="$ac_save_ifs"
2845 if test $ac_prog_rejected = yes; then
2846   # We found a bogon in the path, so make sure we never use it.
2847   set dummy $ac_cv_prog_CC
2848   shift
2849   if test $# -gt 0; then
2850     # We chose a different compiler from the bogus one.
2851     # However, it has the same basename, so the bogon will be chosen
2852     # first if we set CC to just the basename; use the full file name.
2853     shift
2854     set dummy "$ac_dir/$ac_word" "$@"
2855     shift
2856     ac_cv_prog_CC="$@"
2857   fi
2858 fi
2859 fi
2860 fi
2861 CC="$ac_cv_prog_CC"
2862 if test -n "$CC"; then
2863   echo "$ac_t""$CC" 1>&6
2864 else
2865   echo "$ac_t""no" 1>&6
2866 fi
2867
2868   if test -z "$CC"; then
2869     case "`uname -s`" in
2870     *win32* | *WIN32* | *CYGWIN*)
2871       # Extract the first word of "cl", so it can be a program name with args.
2872 set dummy cl; ac_word=$2
2873 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2874 echo "configure:2875: checking for $ac_word" >&5
2875 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2876   echo $ac_n "(cached) $ac_c" 1>&6
2877 else
2878   if test -n "$CC"; then
2879   ac_cv_prog_CC="$CC" # Let the user override the test.
2880 else
2881   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2882   ac_dummy="$PATH"
2883   for ac_dir in $ac_dummy; do
2884     test -z "$ac_dir" && ac_dir=.
2885     if test -f $ac_dir/$ac_word; then
2886       ac_cv_prog_CC="cl"
2887       break
2888     fi
2889   done
2890   IFS="$ac_save_ifs"
2891 fi
2892 fi
2893 CC="$ac_cv_prog_CC"
2894 if test -n "$CC"; then
2895   echo "$ac_t""$CC" 1>&6
2896 else
2897   echo "$ac_t""no" 1>&6
2898 fi
2899  ;;
2900     esac
2901   fi
2902   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2903 fi
2904
2905 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2906 echo "configure:2907: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2907
2908 ac_ext=c
2909 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2910 ac_cpp='$CPP $CPPFLAGS'
2911 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2912 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2913 cross_compiling=$ac_cv_prog_cc_cross
2914
2915 cat > conftest.$ac_ext << EOF
2916
2917 #line 2918 "configure"
2918 #include "confdefs.h"
2919
2920 main(){return(0);}
2921 EOF
2922 if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2923   ac_cv_prog_cc_works=yes
2924   # If we can't run a trivial program, we are probably using a cross compiler.
2925   if (./conftest; exit) 2>/dev/null; then
2926     ac_cv_prog_cc_cross=no
2927   else
2928     ac_cv_prog_cc_cross=yes
2929   fi
2930 else
2931   echo "configure: failed program was:" >&5
2932   cat conftest.$ac_ext >&5
2933   ac_cv_prog_cc_works=no
2934 fi
2935 rm -fr conftest*
2936 ac_ext=c
2937 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2938 ac_cpp='$CPP $CPPFLAGS'
2939 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2940 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2941 cross_compiling=$ac_cv_prog_cc_cross
2942
2943 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2944 if test $ac_cv_prog_cc_works = no; then
2945   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2946 fi
2947 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2948 echo "configure:2949: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2949 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2950 cross_compiling=$ac_cv_prog_cc_cross
2951
2952 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2953 echo "configure:2954: checking whether we are using GNU C" >&5
2954 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2955   echo $ac_n "(cached) $ac_c" 1>&6
2956 else
2957   cat > conftest.c <<EOF
2958 #ifdef __GNUC__
2959   yes;
2960 #endif
2961 EOF
2962 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2963   ac_cv_prog_gcc=yes
2964 else
2965   ac_cv_prog_gcc=no
2966 fi
2967 fi
2968
2969 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2970
2971 if test $ac_cv_prog_gcc = yes; then
2972   GCC=yes
2973 else
2974   GCC=
2975 fi
2976
2977 ac_test_CFLAGS="${CFLAGS+set}"
2978 ac_save_CFLAGS="$CFLAGS"
2979 CFLAGS=
2980 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2981 echo "configure:2982: checking whether ${CC-cc} accepts -g" >&5
2982 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   echo 'void f(){}' > conftest.c
2986 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2987   ac_cv_prog_cc_g=yes
2988 else
2989   ac_cv_prog_cc_g=no
2990 fi
2991 rm -f conftest*
2992
2993 fi
2994
2995 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2996 if test "$ac_test_CFLAGS" = set; then
2997   CFLAGS="$ac_save_CFLAGS"
2998 elif test $ac_cv_prog_cc_g = yes; then
2999   if test "$GCC" = yes; then
3000     CFLAGS="-g -O2"
3001   else
3002     CFLAGS="-g"
3003   fi
3004 else
3005   if test "$GCC" = yes; then
3006     CFLAGS="-O2"
3007   else
3008     CFLAGS=
3009   fi
3010 fi
3011
3012 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3013 if test "${with_gnu_ld+set}" = set; then
3014   withval="$with_gnu_ld"
3015   test "$withval" = no || with_gnu_ld=yes
3016 else
3017   with_gnu_ld=no
3018 fi
3019
3020 ac_prog=ld
3021 if test "$ac_cv_prog_gcc" = yes; then
3022   # Check if gcc -print-prog-name=ld gives a path.
3023   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3024 echo "configure:3025: checking for ld used by GCC" >&5
3025   ac_prog=`($CC -print-prog-name=ld) 2>&5`
3026   case "$ac_prog" in
3027     # Accept absolute paths.
3028     [\\/]* | [A-Za-z]:[\\/]*)
3029       re_direlt='/[^/][^/]*/\.\./'
3030       # Canonicalize the path of ld
3031       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3032       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3033         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3034       done
3035       test -z "$LD" && LD="$ac_prog"
3036       ;;
3037   "")
3038     # If it fails, then pretend we aren't using GCC.
3039     ac_prog=ld
3040     ;;
3041   *)
3042     # If it is relative, then search for the first ld in PATH.
3043     with_gnu_ld=unknown
3044     ;;
3045   esac
3046 elif test "$with_gnu_ld" = yes; then
3047   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3048 echo "configure:3049: checking for GNU ld" >&5
3049 else
3050   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3051 echo "configure:3052: checking for non-GNU ld" >&5
3052 fi
3053 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   if test -z "$LD"; then
3057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3058   for ac_dir in $PATH; do
3059     test -z "$ac_dir" && ac_dir=.
3060     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3061       ac_cv_path_LD="$ac_dir/$ac_prog"
3062       # Check to see if the program is GNU ld.  I'd rather use --version,
3063       # but apparently some GNU ld's only accept -v.
3064       # Break only if it was the GNU/non-GNU ld that we prefer.
3065       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3066         test "$with_gnu_ld" != no && break
3067       else
3068         test "$with_gnu_ld" != yes && break
3069       fi
3070     fi
3071   done
3072   IFS="$ac_save_ifs"
3073 else
3074   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3075 fi
3076 fi
3077
3078 LD="$ac_cv_path_LD"
3079 if test -n "$LD"; then
3080   echo "$ac_t""$LD" 1>&6
3081 else
3082   echo "$ac_t""no" 1>&6
3083 fi
3084 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3085 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3086 echo "configure:3087: checking if the linker ($LD) is GNU ld" >&5
3087 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3091 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3092   ac_cv_prog_gnu_ld=yes
3093 else
3094   ac_cv_prog_gnu_ld=no
3095 fi
3096 fi
3097
3098 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3099
3100
3101 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3102 echo "configure:3103: checking for BSD-compatible nm" >&5
3103 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3104   echo $ac_n "(cached) $ac_c" 1>&6
3105 else
3106   if test -n "$NM"; then
3107   # Let the user override the test.
3108   ac_cv_path_NM="$NM"
3109 else
3110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3111   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3112     test -z "$ac_dir" && ac_dir=.
3113     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3114       # Check to see if the nm accepts a BSD-compat flag.
3115       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3116       #   nm: unknown option "B" ignored
3117       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3118         ac_cv_path_NM="$ac_dir/nm -B"
3119         break
3120       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3121         ac_cv_path_NM="$ac_dir/nm -p"
3122         break
3123       else
3124         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3125         continue # so that we can try to find one that supports BSD flags
3126       fi
3127     fi
3128   done
3129   IFS="$ac_save_ifs"
3130   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3131 fi
3132 fi
3133
3134 NM="$ac_cv_path_NM"
3135 echo "$ac_t""$NM" 1>&6
3136
3137 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3138 echo "configure:3139: checking whether ln -s works" >&5
3139 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3140   echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142   rm -f conftestdata
3143 if ln -s X conftestdata 2>/dev/null
3144 then
3145   rm -f conftestdata
3146   ac_cv_prog_LN_S="ln -s"
3147 else
3148   ac_cv_prog_LN_S=ln
3149 fi
3150 fi
3151 LN_S="$ac_cv_prog_LN_S"
3152 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3153   echo "$ac_t""yes" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 if test $host != $build; then
3159   ac_tool_prefix=${host_alias}-
3160 else
3161   ac_tool_prefix=
3162 fi
3163
3164
3165 case "$target" in
3166 NONE) lt_target="$host" ;;
3167 *) lt_target="$target" ;;
3168 esac
3169
3170 # Check for any special flags to pass to ltconfig.
3171 libtool_flags="--cache-file=$cache_file"
3172 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3173 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3174 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3175 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3176 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3177 libtool_flags="$libtool_flags --enable-dlopen"
3178 libtool_flags="$libtool_flags --enable-win32-dll"
3179 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3180 if test "${enable_libtool_lock+set}" = set; then
3181   enableval="$enable_libtool_lock"
3182   :
3183 fi
3184
3185 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3186 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3187
3188 # Some flags need to be propagated to the compiler or linker for good
3189 # libtool support.
3190 case "$lt_target" in
3191 *-*-irix6*)
3192   # Find out which ABI we are using.
3193   echo '#line 3194 "configure"' > conftest.$ac_ext
3194   if { (eval echo configure:3195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3195     case "`/usr/bin/file conftest.o`" in
3196     *32-bit*)
3197       LD="${LD-ld} -32"
3198       ;;
3199     *N32*)
3200       LD="${LD-ld} -n32"
3201       ;;
3202     *64-bit*)
3203       LD="${LD-ld} -64"
3204       ;;
3205     esac
3206   fi
3207   rm -rf conftest*
3208   ;;
3209
3210 *-*-sco3.2v5*)
3211   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3212   SAVE_CFLAGS="$CFLAGS"
3213   CFLAGS="$CFLAGS -belf"
3214   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3215 echo "configure:3216: checking whether the C compiler needs -belf" >&5
3216 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222
3223 int main() {
3224
3225 ; return 0; }
3226 EOF
3227 if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3228   rm -rf conftest*
3229   lt_cv_cc_needs_belf=yes
3230 else
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -rf conftest*
3234   lt_cv_cc_needs_belf=no
3235 fi
3236 rm -f conftest*
3237 fi
3238
3239 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3240   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3241     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3242     CFLAGS="$SAVE_CFLAGS"
3243   fi
3244   ;;
3245
3246 *-*-cygwin* | *-*-mingw*)
3247   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3248 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3249 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_word" >&5
3251 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   if test -n "$DLLTOOL"; then
3255   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3256 else
3257   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3258   ac_dummy="$PATH"
3259   for ac_dir in $ac_dummy; do
3260     test -z "$ac_dir" && ac_dir=.
3261     if test -f $ac_dir/$ac_word; then
3262       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3263       break
3264     fi
3265   done
3266   IFS="$ac_save_ifs"
3267 fi
3268 fi
3269 DLLTOOL="$ac_cv_prog_DLLTOOL"
3270 if test -n "$DLLTOOL"; then
3271   echo "$ac_t""$DLLTOOL" 1>&6
3272 else
3273   echo "$ac_t""no" 1>&6
3274 fi
3275
3276
3277 if test -z "$ac_cv_prog_DLLTOOL"; then
3278 if test -n "$ac_tool_prefix"; then
3279   # Extract the first word of "dlltool", so it can be a program name with args.
3280 set dummy dlltool; ac_word=$2
3281 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3282 echo "configure:3283: checking for $ac_word" >&5
3283 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3284   echo $ac_n "(cached) $ac_c" 1>&6
3285 else
3286   if test -n "$DLLTOOL"; then
3287   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3288 else
3289   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3290   ac_dummy="$PATH"
3291   for ac_dir in $ac_dummy; do
3292     test -z "$ac_dir" && ac_dir=.
3293     if test -f $ac_dir/$ac_word; then
3294       ac_cv_prog_DLLTOOL="dlltool"
3295       break
3296     fi
3297   done
3298   IFS="$ac_save_ifs"
3299   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3300 fi
3301 fi
3302 DLLTOOL="$ac_cv_prog_DLLTOOL"
3303 if test -n "$DLLTOOL"; then
3304   echo "$ac_t""$DLLTOOL" 1>&6
3305 else
3306   echo "$ac_t""no" 1>&6
3307 fi
3308
3309 else
3310   DLLTOOL="false"
3311 fi
3312 fi
3313
3314   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3315 set dummy ${ac_tool_prefix}as; ac_word=$2
3316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3317 echo "configure:3318: checking for $ac_word" >&5
3318 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3319   echo $ac_n "(cached) $ac_c" 1>&6
3320 else
3321   if test -n "$AS"; then
3322   ac_cv_prog_AS="$AS" # Let the user override the test.
3323 else
3324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3325   ac_dummy="$PATH"
3326   for ac_dir in $ac_dummy; do
3327     test -z "$ac_dir" && ac_dir=.
3328     if test -f $ac_dir/$ac_word; then
3329       ac_cv_prog_AS="${ac_tool_prefix}as"
3330       break
3331     fi
3332   done
3333   IFS="$ac_save_ifs"
3334 fi
3335 fi
3336 AS="$ac_cv_prog_AS"
3337 if test -n "$AS"; then
3338   echo "$ac_t""$AS" 1>&6
3339 else
3340   echo "$ac_t""no" 1>&6
3341 fi
3342
3343
3344 if test -z "$ac_cv_prog_AS"; then
3345 if test -n "$ac_tool_prefix"; then
3346   # Extract the first word of "as", so it can be a program name with args.
3347 set dummy as; ac_word=$2
3348 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3349 echo "configure:3350: checking for $ac_word" >&5
3350 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3351   echo $ac_n "(cached) $ac_c" 1>&6
3352 else
3353   if test -n "$AS"; then
3354   ac_cv_prog_AS="$AS" # Let the user override the test.
3355 else
3356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3357   ac_dummy="$PATH"
3358   for ac_dir in $ac_dummy; do
3359     test -z "$ac_dir" && ac_dir=.
3360     if test -f $ac_dir/$ac_word; then
3361       ac_cv_prog_AS="as"
3362       break
3363     fi
3364   done
3365   IFS="$ac_save_ifs"
3366   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3367 fi
3368 fi
3369 AS="$ac_cv_prog_AS"
3370 if test -n "$AS"; then
3371   echo "$ac_t""$AS" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375
3376 else
3377   AS="false"
3378 fi
3379 fi
3380
3381   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3382 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3384 echo "configure:3385: checking for $ac_word" >&5
3385 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   if test -n "$OBJDUMP"; then
3389   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3390 else
3391   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3392   ac_dummy="$PATH"
3393   for ac_dir in $ac_dummy; do
3394     test -z "$ac_dir" && ac_dir=.
3395     if test -f $ac_dir/$ac_word; then
3396       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3397       break
3398     fi
3399   done
3400   IFS="$ac_save_ifs"
3401 fi
3402 fi
3403 OBJDUMP="$ac_cv_prog_OBJDUMP"
3404 if test -n "$OBJDUMP"; then
3405   echo "$ac_t""$OBJDUMP" 1>&6
3406 else
3407   echo "$ac_t""no" 1>&6
3408 fi
3409
3410
3411 if test -z "$ac_cv_prog_OBJDUMP"; then
3412 if test -n "$ac_tool_prefix"; then
3413   # Extract the first word of "objdump", so it can be a program name with args.
3414 set dummy objdump; ac_word=$2
3415 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3416 echo "configure:3417: checking for $ac_word" >&5
3417 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3418   echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420   if test -n "$OBJDUMP"; then
3421   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3422 else
3423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3424   ac_dummy="$PATH"
3425   for ac_dir in $ac_dummy; do
3426     test -z "$ac_dir" && ac_dir=.
3427     if test -f $ac_dir/$ac_word; then
3428       ac_cv_prog_OBJDUMP="objdump"
3429       break
3430     fi
3431   done
3432   IFS="$ac_save_ifs"
3433   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3434 fi
3435 fi
3436 OBJDUMP="$ac_cv_prog_OBJDUMP"
3437 if test -n "$OBJDUMP"; then
3438   echo "$ac_t""$OBJDUMP" 1>&6
3439 else
3440   echo "$ac_t""no" 1>&6
3441 fi
3442
3443 else
3444   OBJDUMP="false"
3445 fi
3446 fi
3447
3448   ;;
3449
3450 esac
3451
3452
3453 # Save cache, so that ltconfig can load it
3454
3455
3456 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3457 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3458 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3459 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3460 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3461 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3462 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3463 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3464
3465 # Reload cache, that may have been modified by ltconfig
3466
3467
3468 # This can be used to rebuild libtool when needed
3469 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3470
3471 # Always use our own libtool.
3472 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3473
3474 # Redirect the config.log output again, so that the ltconfig log is not
3475 # clobbered by the next message.
3476 exec 5>>./config.log
3477
3478
3479 for ac_prog in mawk gawk nawk awk
3480 do
3481 # Extract the first word of "$ac_prog", so it can be a program name with args.
3482 set dummy $ac_prog; ac_word=$2
3483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3484 echo "configure:3485: checking for $ac_word" >&5
3485 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3486   echo $ac_n "(cached) $ac_c" 1>&6
3487 else
3488   if test -n "$AWK"; then
3489   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3490 else
3491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3492   ac_dummy="$PATH"
3493   for ac_dir in $ac_dummy; do
3494     test -z "$ac_dir" && ac_dir=.
3495     if test -f $ac_dir/$ac_word; then
3496       ac_cv_prog_AWK="$ac_prog"
3497       break
3498     fi
3499   done
3500   IFS="$ac_save_ifs"
3501 fi
3502 fi
3503 AWK="$ac_cv_prog_AWK"
3504 if test -n "$AWK"; then
3505   echo "$ac_t""$AWK" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509
3510 test -n "$AWK" && break
3511 done
3512
3513 # test for ln hardlink support
3514 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3515 echo "configure:3516: checking whether ln works" >&5
3516 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3517   echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519   rm -f conftest.src conftest.dst
3520 echo "conftest" > conftest.src
3521 if ln conftest.src conftest.dst 2>/dev/null
3522 then
3523   ol_cv_prog_LN_H="ln"
3524 else
3525   ol_cv_prog_LN_H="cp"
3526 fi
3527 rm -f conftest.src conftest.dst
3528
3529 fi
3530 LN_H="$ol_cv_prog_LN_H"
3531 if test "$ol_cv_prog_LN_H" = "ln"; then
3532         echo "$ac_t""yes" 1>&6
3533 else
3534         echo "$ac_t""no" 1>&6
3535 fi
3536
3537 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3538 echo "configure:3539: checking whether ln -s works" >&5
3539 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3540   echo $ac_n "(cached) $ac_c" 1>&6
3541 else
3542   rm -f conftestdata
3543 if ln -s X conftestdata 2>/dev/null
3544 then
3545   rm -f conftestdata
3546   ac_cv_prog_LN_S="ln -s"
3547 else
3548   ac_cv_prog_LN_S=ln
3549 fi
3550 fi
3551 LN_S="$ac_cv_prog_LN_S"
3552 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3553   echo "$ac_t""yes" 1>&6
3554 else
3555   echo "$ac_t""no" 1>&6
3556 fi
3557
3558
3559 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3560         LN_S="$LN_H"
3561 fi
3562
3563 # Extract the first word of "sendmail", so it can be a program name with args.
3564 set dummy sendmail; ac_word=$2
3565 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3566 echo "configure:3567: checking for $ac_word" >&5
3567 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   case "$SENDMAIL" in
3571   /*)
3572   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3573   ;;
3574   ?:/*)
3575   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3576   ;;
3577   *)
3578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3579   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3580   for ac_dir in $ac_dummy; do 
3581     test -z "$ac_dir" && ac_dir=.
3582     if test -f $ac_dir/$ac_word; then
3583       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3584       break
3585     fi
3586   done
3587   IFS="$ac_save_ifs"
3588   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3589   ;;
3590 esac
3591 fi
3592 SENDMAIL="$ac_cv_path_SENDMAIL"
3593 if test -n "$SENDMAIL"; then
3594   echo "$ac_t""$SENDMAIL" 1>&6
3595 else
3596   echo "$ac_t""no" 1>&6
3597 fi
3598
3599 # Extract the first word of "vi", so it can be a program name with args.
3600 set dummy vi; ac_word=$2
3601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3602 echo "configure:3603: checking for $ac_word" >&5
3603 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   case "$EDITOR" in
3607   /*)
3608   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3609   ;;
3610   ?:/*)
3611   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3612   ;;
3613   *)
3614   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3615   ac_dummy="$PATH:/usr/ucb"
3616   for ac_dir in $ac_dummy; do 
3617     test -z "$ac_dir" && ac_dir=.
3618     if test -f $ac_dir/$ac_word; then
3619       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3620       break
3621     fi
3622   done
3623   IFS="$ac_save_ifs"
3624   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3625   ;;
3626 esac
3627 fi
3628 EDITOR="$ac_cv_path_EDITOR"
3629 if test -n "$EDITOR"; then
3630   echo "$ac_t""$EDITOR" 1>&6
3631 else
3632   echo "$ac_t""no" 1>&6
3633 fi
3634
3635 # Extract the first word of "finger", so it can be a program name with args.
3636 set dummy finger; ac_word=$2
3637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3638 echo "configure:3639: checking for $ac_word" >&5
3639 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3640   echo $ac_n "(cached) $ac_c" 1>&6
3641 else
3642   case "$FINGER" in
3643   /*)
3644   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3645   ;;
3646   ?:/*)
3647   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3648   ;;
3649   *)
3650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3651   ac_dummy="$PATH:/usr/ucb"
3652   for ac_dir in $ac_dummy; do 
3653     test -z "$ac_dir" && ac_dir=.
3654     if test -f $ac_dir/$ac_word; then
3655       ac_cv_path_FINGER="$ac_dir/$ac_word"
3656       break
3657     fi
3658   done
3659   IFS="$ac_save_ifs"
3660   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3661   ;;
3662 esac
3663 fi
3664 FINGER="$ac_cv_path_FINGER"
3665 if test -n "$FINGER"; then
3666   echo "$ac_t""$FINGER" 1>&6
3667 else
3668   echo "$ac_t""no" 1>&6
3669 fi
3670
3671
3672 ol_link_perl=no
3673 if test $ol_enable_perl != no ; then
3674         # Extract the first word of "perl", so it can be a program name with args.
3675 set dummy perl; ac_word=$2
3676 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3677 echo "configure:3678: checking for $ac_word" >&5
3678 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   case "$PERLBIN" in
3682   /*)
3683   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3684   ;;
3685   ?:/*)
3686   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3687   ;;
3688   *)
3689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3690   ac_dummy="$PATH"
3691   for ac_dir in $ac_dummy; do 
3692     test -z "$ac_dir" && ac_dir=.
3693     if test -f $ac_dir/$ac_word; then
3694       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3695       break
3696     fi
3697   done
3698   IFS="$ac_save_ifs"
3699   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3700   ;;
3701 esac
3702 fi
3703 PERLBIN="$ac_cv_path_PERLBIN"
3704 if test -n "$PERLBIN"; then
3705   echo "$ac_t""$PERLBIN" 1>&6
3706 else
3707   echo "$ac_t""no" 1>&6
3708 fi
3709
3710
3711         if test "no$PERLBIN" = "no" ; then
3712                 if test $ol_enable_perl = yes ; then
3713                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3714                 fi
3715
3716         else
3717                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3718                 if test x"$ol_with_perl_module" = "xstatic" ; then
3719                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3720                 else
3721                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3722                 fi
3723                                 ol_link_perl=yes
3724         fi
3725 fi
3726
3727 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3728 echo "configure:3729: checking how to run the C preprocessor" >&5
3729 # On Suns, sometimes $CPP names a directory.
3730 if test -n "$CPP" && test -d "$CPP"; then
3731   CPP=
3732 fi
3733 if test -z "$CPP"; then
3734 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737     # This must be in double quotes, not single quotes, because CPP may get
3738   # substituted into the Makefile and "${CC-cc}" will confuse make.
3739   CPP="${CC-cc} -E"
3740   # On the NeXT, cc -E runs the code through the compiler's parser,
3741   # not just through cpp.
3742   cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 #include <assert.h>
3746 Syntax Error
3747 EOF
3748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3749 { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3751 if test -z "$ac_err"; then
3752   :
3753 else
3754   echo "$ac_err" >&5
3755   echo "configure: failed program was:" >&5
3756   cat conftest.$ac_ext >&5
3757   rm -rf conftest*
3758   CPP="${CC-cc} -E -traditional-cpp"
3759   cat > conftest.$ac_ext <<EOF
3760 #line 3761 "configure"
3761 #include "confdefs.h"
3762 #include <assert.h>
3763 Syntax Error
3764 EOF
3765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3766 { (eval echo configure:3767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3768 if test -z "$ac_err"; then
3769   :
3770 else
3771   echo "$ac_err" >&5
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   CPP="${CC-cc} -nologo -E"
3776   cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <assert.h>
3780 Syntax Error
3781 EOF
3782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3783 { (eval echo configure:3784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3785 if test -z "$ac_err"; then
3786   :
3787 else
3788   echo "$ac_err" >&5
3789   echo "configure: failed program was:" >&5
3790   cat conftest.$ac_ext >&5
3791   rm -rf conftest*
3792   CPP=/lib/cpp
3793 fi
3794 rm -f conftest*
3795 fi
3796 rm -f conftest*
3797 fi
3798 rm -f conftest*
3799   ac_cv_prog_CPP="$CPP"
3800 fi
3801   CPP="$ac_cv_prog_CPP"
3802 else
3803   ac_cv_prog_CPP="$CPP"
3804 fi
3805 echo "$ac_t""$CPP" 1>&6
3806
3807
3808 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3809         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3810
3811 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3812         echo "configure: warning: programs compiled here do run here..." 1>&2
3813         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3814
3815 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3816         echo "configure: warning: programs compiled here do not run here..." 1>&2
3817         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3818 fi
3819
3820 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3821 echo "configure:3822: checking for AIX" >&5
3822 cat > conftest.$ac_ext <<EOF
3823 #line 3824 "configure"
3824 #include "confdefs.h"
3825 #ifdef _AIX
3826   yes
3827 #endif
3828
3829 EOF
3830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3831   egrep "yes" >/dev/null 2>&1; then
3832   rm -rf conftest*
3833   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3834 #define _ALL_SOURCE 1
3835 EOF
3836
3837 else
3838   rm -rf conftest*
3839   echo "$ac_t""no" 1>&6
3840 fi
3841 rm -f conftest*
3842
3843
3844 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3845 echo "configure:3846: checking for POSIXized ISC" >&5
3846 if test -d /etc/conf/kconfig.d &&
3847   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3848 then
3849   echo "$ac_t""yes" 1>&6
3850   ISC=yes # If later tests want to check for ISC.
3851   cat >> confdefs.h <<\EOF
3852 #define _POSIX_SOURCE 1
3853 EOF
3854
3855   if test "$GCC" = yes; then
3856     CC="$CC -posix"
3857   else
3858     CC="$CC -Xp"
3859   fi
3860 else
3861   echo "$ac_t""no" 1>&6
3862   ISC=
3863 fi
3864
3865 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3866 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3867 echo "configure:3868: checking for minix/config.h" >&5
3868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3869   echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871   cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 #include <minix/config.h>
3875 EOF
3876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3877 { (eval echo configure:3878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3879 if test -z "$ac_err"; then
3880   rm -rf conftest*
3881   eval "ac_cv_header_$ac_safe=yes"
3882 else
3883   echo "$ac_err" >&5
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   eval "ac_cv_header_$ac_safe=no"
3888 fi
3889 rm -f conftest*
3890 fi
3891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3892   echo "$ac_t""yes" 1>&6
3893   MINIX=yes
3894 else
3895   echo "$ac_t""no" 1>&6
3896 MINIX=
3897 fi
3898
3899 if test "$MINIX" = yes; then
3900   cat >> confdefs.h <<\EOF
3901 #define _POSIX_SOURCE 1
3902 EOF
3903
3904   cat >> confdefs.h <<\EOF
3905 #define _POSIX_1_SOURCE 2
3906 EOF
3907
3908   cat >> confdefs.h <<\EOF
3909 #define _MINIX 1
3910 EOF
3911
3912 fi
3913
3914
3915 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3916 echo "configure:3917: checking for Cygwin environment" >&5
3917 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3918   echo $ac_n "(cached) $ac_c" 1>&6
3919 else
3920   cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923
3924 int main() {
3925
3926 #ifndef __CYGWIN__
3927 #define __CYGWIN__ __CYGWIN32__
3928 #endif
3929 return __CYGWIN__;
3930 ; return 0; }
3931 EOF
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933   rm -rf conftest*
3934   ac_cv_cygwin=yes
3935 else
3936   echo "configure: failed program was:" >&5
3937   cat conftest.$ac_ext >&5
3938   rm -rf conftest*
3939   ac_cv_cygwin=no
3940 fi
3941 rm -f conftest*
3942 fi
3943
3944 echo "$ac_t""$ac_cv_cygwin" 1>&6
3945 CYGWIN=
3946 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3947 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3948 echo "configure:3949: checking for mingw32 environment" >&5
3949 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3950   echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952   cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955
3956 int main() {
3957 return __MINGW32__;
3958 ; return 0; }
3959 EOF
3960 if { (eval echo configure:3961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3961   rm -rf conftest*
3962   ac_cv_mingw32=yes
3963 else
3964   echo "configure: failed program was:" >&5
3965   cat conftest.$ac_ext >&5
3966   rm -rf conftest*
3967   ac_cv_mingw32=no
3968 fi
3969 rm -f conftest*
3970 fi
3971
3972 echo "$ac_t""$ac_cv_mingw32" 1>&6
3973 MINGW32=
3974 test "$ac_cv_mingw32" = yes && MINGW32=yes
3975 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3976 echo "configure:3977: checking for EMX OS/2 environment" >&5
3977 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3978   echo $ac_n "(cached) $ac_c" 1>&6
3979 else
3980   cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983
3984 int main() {
3985 return __EMX__;
3986 ; return 0; }
3987 EOF
3988 if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3989   rm -rf conftest*
3990   ac_cv_emxos2=yes
3991 else
3992   echo "configure: failed program was:" >&5
3993   cat conftest.$ac_ext >&5
3994   rm -rf conftest*
3995   ac_cv_emxos2=no
3996 fi
3997 rm -f conftest*
3998 fi
3999
4000 echo "$ac_t""$ac_cv_emxos2" 1>&6
4001 EMXOS2=
4002 test "$ac_cv_emxos2" = yes && EMXOS2=yes
4003
4004
4005
4006 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4007 echo "configure:4008: checking for executable suffix" >&5
4008 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4012   ac_cv_exeext=.exe
4013 else
4014   rm -f conftest*
4015   echo 'int main () { return 0; }' > conftest.$ac_ext
4016   ac_cv_exeext=
4017   if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4018     for file in conftest.*; do
4019       case $file in
4020       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4021       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4022       esac
4023     done
4024   else
4025     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4026   fi
4027   rm -f conftest*
4028   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4029 fi
4030 fi
4031
4032 EXEEXT=""
4033 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4034 echo "$ac_t""${ac_cv_exeext}" 1>&6
4035 ac_exeext=$EXEEXT
4036
4037 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4038 echo "configure:4039: checking for object suffix" >&5
4039 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4040   echo $ac_n "(cached) $ac_c" 1>&6
4041 else
4042   rm -f conftest*
4043 echo 'int i = 1;' > conftest.$ac_ext
4044 if { (eval echo configure:4045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4045   for ac_file in conftest.*; do
4046     case $ac_file in
4047     *.c) ;;
4048     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4049     esac
4050   done
4051 else
4052   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4053 fi
4054 rm -f conftest*
4055 fi
4056
4057 echo "$ac_t""$ac_cv_objext" 1>&6
4058 OBJEXT=$ac_cv_objext
4059 ac_objext=$ac_cv_objext
4060
4061
4062 cat >> confdefs.h <<EOF
4063 #define EXEEXT "${EXEEXT}"
4064 EOF
4065
4066
4067 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4068 echo "configure:4069: checking for be_app in -lbe" >&5
4069 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4071   echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073   ac_save_LIBS="$LIBS"
4074 LIBS="-lbe -lroot -lnet $LIBS"
4075 cat > conftest.$ac_ext <<EOF
4076 #line 4077 "configure"
4077 #include "confdefs.h"
4078 /* Override any gcc2 internal prototype to avoid an error.  */
4079 /* We use char because int might match the return type of a gcc2
4080     builtin and then its argument prototype would still apply.  */
4081 char be_app();
4082
4083 int main() {
4084 be_app()
4085 ; return 0; }
4086 EOF
4087 if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4088   rm -rf conftest*
4089   eval "ac_cv_lib_$ac_lib_var=yes"
4090 else
4091   echo "configure: failed program was:" >&5
4092   cat conftest.$ac_ext >&5
4093   rm -rf conftest*
4094   eval "ac_cv_lib_$ac_lib_var=no"
4095 fi
4096 rm -f conftest*
4097 LIBS="$ac_save_LIBS"
4098
4099 fi
4100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4101   echo "$ac_t""yes" 1>&6
4102   LIBS="$LIBS -lbe -lroot -lnet"
4103 else
4104   echo "$ac_t""no" 1>&6
4105 :
4106 fi
4107
4108
4109
4110
4111
4112 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4113 echo "configure:4114: checking for ${CC-cc} option to accept ANSI C" >&5
4114 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   am_cv_prog_cc_stdc=no
4118 ac_save_CC="$CC"
4119 # Don't try gcc -ansi; that turns off useful extensions and
4120 # breaks some systems' header files.
4121 # AIX                   -qlanglvl=ansi
4122 # Ultrix and OSF/1      -std1
4123 # HP-UX 10.20 and later -Ae
4124 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4125 # SVR4                  -Xc -D__EXTENSIONS__
4126 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4127 do
4128   CC="$ac_save_CC $ac_arg"
4129   cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <stdarg.h>
4133 #include <stdio.h>
4134 #include <sys/types.h>
4135 #include <sys/stat.h>
4136 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4137 struct buf { int x; };
4138 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4139 static char *e (p, i)
4140      char **p;
4141      int i;
4142 {
4143   return p[i];
4144 }
4145 static char *f (char * (*g) (char **, int), char **p, ...)
4146 {
4147   char *s;
4148   va_list v;
4149   va_start (v,p);
4150   s = g (p, va_arg (v,int));
4151   va_end (v);
4152   return s;
4153 }
4154 int test (int i, double x);
4155 struct s1 {int (*f) (int a);};
4156 struct s2 {int (*f) (double a);};
4157 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4158 int argc;
4159 char **argv;
4160
4161 int main() {
4162
4163 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4164
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4168   rm -rf conftest*
4169   am_cv_prog_cc_stdc="$ac_arg"; break
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173 fi
4174 rm -f conftest*
4175 done
4176 CC="$ac_save_CC"
4177
4178 fi
4179
4180 if test -z "$am_cv_prog_cc_stdc"; then
4181   echo "$ac_t""none needed" 1>&6
4182 else
4183   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4184 fi
4185 case "x$am_cv_prog_cc_stdc" in
4186   x|xno) ;;
4187   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4188 esac
4189
4190 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4191         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4192 fi
4193
4194 # test for make depend flag
4195 OL_MKDEP=
4196 OL_MKDEP_FLAGS=
4197 if test -z "${MKDEP}"; then
4198         OL_MKDEP="${CC-cc}"
4199         if test -z "${MKDEP_FLAGS}"; then
4200                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4201 echo "configure:4202: checking for ${OL_MKDEP} depend flag" >&5
4202 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   
4206                         ol_cv_mkdep=no
4207                         for flag in "-M" "-xM"; do
4208                                 cat > conftest.c <<EOF
4209  noCode;
4210 EOF
4211                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4212                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4213                                 then
4214                                         if test ! -f conftest."${ac_object}" ; then
4215                                                 ol_cv_mkdep=$flag
4216                                                 OL_MKDEP_FLAGS="$flag"
4217                                                 break
4218                                         fi
4219                                 fi
4220                         done
4221                         rm -f conftest*
4222                 
4223 fi
4224
4225 echo "$ac_t""$ol_cv_mkdep" 1>&6
4226         else
4227                 cc_cv_mkdep=yes
4228                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4229         fi
4230 else
4231         cc_cv_mkdep=yes
4232         OL_MKDEP="${MKDEP}"
4233         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4234 fi
4235
4236
4237
4238 if test "${ol_cv_mkdep}" = no ; then
4239         # this will soon become an error
4240         echo "configure: warning: do not know how to generate dependencies" 1>&2
4241 fi
4242
4243 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4244 echo "configure:4245: checking for afopen in -ls" >&5
4245 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4246 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249   ac_save_LIBS="$LIBS"
4250 LIBS="-ls  $LIBS"
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 /* Override any gcc2 internal prototype to avoid an error.  */
4255 /* We use char because int might match the return type of a gcc2
4256     builtin and then its argument prototype would still apply.  */
4257 char afopen();
4258
4259 int main() {
4260 afopen()
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4264   rm -rf conftest*
4265   eval "ac_cv_lib_$ac_lib_var=yes"
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   eval "ac_cv_lib_$ac_lib_var=no"
4271 fi
4272 rm -f conftest*
4273 LIBS="$ac_save_LIBS"
4274
4275 fi
4276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4277   echo "$ac_t""yes" 1>&6
4278   
4279         AUTH_LIBS=-ls
4280         cat >> confdefs.h <<\EOF
4281 #define HAVE_AIX_SECURITY 1
4282 EOF
4283
4284
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288
4289
4290
4291 ol_link_modules=no
4292 if test $ol_enable_modules != no ; then
4293         for ac_hdr in ltdl.h
4294 do
4295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4297 echo "configure:4298: checking for $ac_hdr" >&5
4298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304 #include <$ac_hdr>
4305 EOF
4306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4307 { (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4309 if test -z "$ac_err"; then
4310   rm -rf conftest*
4311   eval "ac_cv_header_$ac_safe=yes"
4312 else
4313   echo "$ac_err" >&5
4314   echo "configure: failed program was:" >&5
4315   cat conftest.$ac_ext >&5
4316   rm -rf conftest*
4317   eval "ac_cv_header_$ac_safe=no"
4318 fi
4319 rm -f conftest*
4320 fi
4321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4322   echo "$ac_t""yes" 1>&6
4323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4324   cat >> confdefs.h <<EOF
4325 #define $ac_tr_hdr 1
4326 EOF
4327  
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331 done
4332
4333
4334         if test $ac_cv_header_ltdl_h = no ; then
4335                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4336         fi
4337
4338         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4339 echo "configure:4340: checking for lt_dlinit in -lltdl" >&5
4340 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4341 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   ac_save_LIBS="$LIBS"
4345 LIBS="-lltdl  $LIBS"
4346 cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349 /* Override any gcc2 internal prototype to avoid an error.  */
4350 /* We use char because int might match the return type of a gcc2
4351     builtin and then its argument prototype would still apply.  */
4352 char lt_dlinit();
4353
4354 int main() {
4355 lt_dlinit()
4356 ; return 0; }
4357 EOF
4358 if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4359   rm -rf conftest*
4360   eval "ac_cv_lib_$ac_lib_var=yes"
4361 else
4362   echo "configure: failed program was:" >&5
4363   cat conftest.$ac_ext >&5
4364   rm -rf conftest*
4365   eval "ac_cv_lib_$ac_lib_var=no"
4366 fi
4367 rm -f conftest*
4368 LIBS="$ac_save_LIBS"
4369
4370 fi
4371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4372   echo "$ac_t""yes" 1>&6
4373   
4374             MODULES_LIBS=-lltdl
4375             cat >> confdefs.h <<\EOF
4376 #define HAVE_LIBLTDL 1
4377 EOF
4378
4379         
4380 else
4381   echo "$ac_t""no" 1>&6
4382 fi
4383
4384
4385         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4386                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4387         fi
4388         ol_link_modules=yes
4389 else
4390         ol_with_bdb_module=static
4391         ol_with_dnssrv_module=static
4392         ol_with_ldap_module=static
4393         ol_with_ldbm_module=static
4394         ol_with_meta_module=static
4395         ol_with_passwd_module=static
4396         ol_with_perl_module=static
4397         ol_with_shell_module=static
4398         ol_with_tcl_module=static
4399         ol_with_sql_module=static
4400 fi
4401
4402 # test for EBCDIC
4403 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4404 echo "configure:4405: checking for EBCDIC" >&5
4405 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4406   echo $ac_n "(cached) $ac_c" 1>&6
4407 else
4408   
4409         cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412
4413 #if !('M' == 0xd4)
4414 #include <__ASCII__/generate_error.h>
4415 #endif
4416
4417 EOF
4418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4419 { (eval echo configure:4420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4421 if test -z "$ac_err"; then
4422   rm -rf conftest*
4423   ol_cv_cpp_ebcdic=yes
4424 else
4425   echo "$ac_err" >&5
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -rf conftest*
4429   ol_cv_cpp_ebcdic=no
4430 fi
4431 rm -f conftest*
4432 fi
4433
4434 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4435 if test $ol_cv_cpp_ebcdic = yes ; then
4436         cat >> confdefs.h <<\EOF
4437 #define HAVE_EBCDIC 1
4438 EOF
4439
4440 fi
4441
4442 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4443 echo "configure:4444: checking for ANSI C header files" >&5
4444 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4445   echo $ac_n "(cached) $ac_c" 1>&6
4446 else
4447   cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 #include <stdlib.h>
4451 #include <stdarg.h>
4452 #include <string.h>
4453 #include <float.h>
4454 EOF
4455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4456 { (eval echo configure:4457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4458 if test -z "$ac_err"; then
4459   rm -rf conftest*
4460   ol_cv_header_stdc=yes
4461 else
4462   echo "$ac_err" >&5
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -rf conftest*
4466   ol_cv_header_stdc=no
4467 fi
4468 rm -f conftest*
4469
4470 if test $ol_cv_header_stdc = yes; then
4471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4472 cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <string.h>
4476 EOF
4477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4478   egrep "memchr" >/dev/null 2>&1; then
4479   :
4480 else
4481   rm -rf conftest*
4482   ol_cv_header_stdc=no
4483 fi
4484 rm -f conftest*
4485
4486 fi
4487
4488 if test $ol_cv_header_stdc = yes; then
4489   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4490 cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 #include <stdlib.h>
4494 EOF
4495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4496   egrep "free" >/dev/null 2>&1; then
4497   :
4498 else
4499   rm -rf conftest*
4500   ol_cv_header_stdc=no
4501 fi
4502 rm -f conftest*
4503
4504 fi
4505
4506 if test $ol_cv_header_stdc = yes; then
4507   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4508 if test "$cross_compiling" = yes; then
4509   :
4510 else
4511   cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <ctype.h>
4515 #ifndef HAVE_EBCDIC
4516 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4517 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4518 #else
4519 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4520                 || ('j' <= (c) && (c) <= 'r') \
4521                 || ('s' <= (c) && (c) <= 'z'))
4522 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4523 #endif
4524 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4525 int main () { int i; for (i = 0; i < 256; i++)
4526 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4527 exit (0); }
4528
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4531 then
4532   :
4533 else
4534   echo "configure: failed program was:" >&5
4535   cat conftest.$ac_ext >&5
4536   rm -fr conftest*
4537   ol_cv_header_stdc=no
4538 fi
4539 rm -fr conftest*
4540 fi
4541
4542 fi
4543 fi
4544
4545 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4546 if test $ol_cv_header_stdc = yes; then
4547   cat >> confdefs.h <<\EOF
4548 #define STDC_HEADERS 1
4549 EOF
4550
4551 fi
4552 ac_cv_header_stdc=disable
4553
4554
4555 if test $ol_cv_header_stdc != yes; then
4556         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4557 fi
4558
4559 ac_header_dirent=no
4560 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4561 do
4562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4563 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4564 echo "configure:4565: checking for $ac_hdr that defines DIR" >&5
4565 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4566   echo $ac_n "(cached) $ac_c" 1>&6
4567 else
4568   cat > conftest.$ac_ext <<EOF
4569 #line 4570 "configure"
4570 #include "confdefs.h"
4571 #include <sys/types.h>
4572 #include <$ac_hdr>
4573 int main() {
4574 DIR *dirp = 0;
4575 ; return 0; }
4576 EOF
4577 if { (eval echo configure:4578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4578   rm -rf conftest*
4579   eval "ac_cv_header_dirent_$ac_safe=yes"
4580 else
4581   echo "configure: failed program was:" >&5
4582   cat conftest.$ac_ext >&5
4583   rm -rf conftest*
4584   eval "ac_cv_header_dirent_$ac_safe=no"
4585 fi
4586 rm -f conftest*
4587 fi
4588 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4589   echo "$ac_t""yes" 1>&6
4590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4591   cat >> confdefs.h <<EOF
4592 #define $ac_tr_hdr 1
4593 EOF
4594  ac_header_dirent=$ac_hdr; break
4595 else
4596   echo "$ac_t""no" 1>&6
4597 fi
4598 done
4599 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4600 if test $ac_header_dirent = dirent.h; then
4601 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4602 echo "configure:4603: checking for opendir in -ldir" >&5
4603 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   ac_save_LIBS="$LIBS"
4608 LIBS="-ldir  $LIBS"
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 /* Override any gcc2 internal prototype to avoid an error.  */
4613 /* We use char because int might match the return type of a gcc2
4614     builtin and then its argument prototype would still apply.  */
4615 char opendir();
4616
4617 int main() {
4618 opendir()
4619 ; return 0; }
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4622   rm -rf conftest*
4623   eval "ac_cv_lib_$ac_lib_var=yes"
4624 else
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -rf conftest*
4628   eval "ac_cv_lib_$ac_lib_var=no"
4629 fi
4630 rm -f conftest*
4631 LIBS="$ac_save_LIBS"
4632
4633 fi
4634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4635   echo "$ac_t""yes" 1>&6
4636   LIBS="$LIBS -ldir"
4637 else
4638   echo "$ac_t""no" 1>&6
4639 fi
4640
4641 else
4642 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4643 echo "configure:4644: checking for opendir in -lx" >&5
4644 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4646   echo $ac_n "(cached) $ac_c" 1>&6
4647 else
4648   ac_save_LIBS="$LIBS"
4649 LIBS="-lx  $LIBS"
4650 cat > conftest.$ac_ext <<EOF
4651 #line 4652 "configure"
4652 #include "confdefs.h"
4653 /* Override any gcc2 internal prototype to avoid an error.  */
4654 /* We use char because int might match the return type of a gcc2
4655     builtin and then its argument prototype would still apply.  */
4656 char opendir();
4657
4658 int main() {
4659 opendir()
4660 ; return 0; }
4661 EOF
4662 if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4663   rm -rf conftest*
4664   eval "ac_cv_lib_$ac_lib_var=yes"
4665 else
4666   echo "configure: failed program was:" >&5
4667   cat conftest.$ac_ext >&5
4668   rm -rf conftest*
4669   eval "ac_cv_lib_$ac_lib_var=no"
4670 fi
4671 rm -f conftest*
4672 LIBS="$ac_save_LIBS"
4673
4674 fi
4675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4676   echo "$ac_t""yes" 1>&6
4677   LIBS="$LIBS -lx"
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681
4682 fi
4683
4684 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4685 echo "configure:4686: checking for sys/wait.h that is POSIX.1 compatible" >&5
4686 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 #include <sys/types.h>
4693 #include <sys/wait.h>
4694 #ifndef WEXITSTATUS
4695 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4696 #endif
4697 #ifndef WIFEXITED
4698 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4699 #endif
4700 int main() {
4701 int s;
4702 wait (&s);
4703 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4707   rm -rf conftest*
4708   ac_cv_header_sys_wait_h=yes
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   ac_cv_header_sys_wait_h=no
4714 fi
4715 rm -f conftest*
4716 fi
4717
4718 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4719 if test $ac_cv_header_sys_wait_h = yes; then
4720   cat >> confdefs.h <<\EOF
4721 #define HAVE_SYS_WAIT_H 1
4722 EOF
4723
4724 fi
4725
4726 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4727 echo "configure:4728: checking POSIX termios" >&5
4728 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 #include <sys/types.h>
4735 #include <unistd.h>
4736 #include <termios.h>
4737 int main() {
4738 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4739    tcgetattr(0, 0);
4740 ; return 0; }
4741 EOF
4742 if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4743   rm -rf conftest*
4744   am_cv_sys_posix_termios=yes
4745 else
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   am_cv_sys_posix_termios=no
4750 fi
4751 rm -f conftest*
4752 fi
4753
4754 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4755
4756
4757  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4758 echo "configure:4759: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4759 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4763
4764   gwinsz_in_termios_h=no
4765   if test $am_cv_sys_posix_termios = yes; then
4766     cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769 #include <sys/types.h>
4770 #     include <termios.h>
4771 #     ifdef TIOCGWINSZ
4772         yes
4773 #     endif
4774     
4775 EOF
4776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4777   egrep "yes" >/dev/null 2>&1; then
4778   rm -rf conftest*
4779   gwinsz_in_termios_h=yes
4780 fi
4781 rm -f conftest*
4782
4783   fi
4784
4785   if test $gwinsz_in_termios_h = no; then
4786     cat > conftest.$ac_ext <<EOF
4787 #line 4788 "configure"
4788 #include "confdefs.h"
4789 #include <sys/types.h>
4790 #     include <sys/ioctl.h>
4791 #     ifdef TIOCGWINSZ
4792         yes
4793 #     endif
4794     
4795 EOF
4796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4797   egrep "yes" >/dev/null 2>&1; then
4798   rm -rf conftest*
4799   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4800 fi
4801 rm -f conftest*
4802
4803   fi
4804   
4805 fi
4806
4807 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4808   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4809     cat >> confdefs.h <<\EOF
4810 #define GWINSZ_IN_SYS_IOCTL 1
4811 EOF
4812
4813   fi
4814
4815 if test $am_cv_sys_posix_termios = yes ; then
4816         cat >> confdefs.h <<\EOF
4817 #define HAVE_POSIX_TERMIOS 1
4818 EOF
4819
4820 fi
4821
4822 for ac_hdr in \
4823         arpa/inet.h             \
4824         arpa/nameser.h  \
4825         assert.h                \
4826         conio.h                 \
4827         crypt.h                 \
4828         direct.h                \
4829         errno.h                 \
4830         fcntl.h                 \
4831         filio.h                 \
4832         getopt.h                \
4833         grp.h                   \
4834         io.h                    \
4835         libutil.h               \
4836         limits.h                \
4837         locale.h                \
4838         netinet/tcp.h   \
4839         malloc.h                \
4840         memory.h                \
4841         psap.h                  \
4842         pwd.h                   \
4843         process.h               \
4844         resolv.h                \
4845         sgtty.h                 \
4846         shadow.h                \
4847         stddef.h                \
4848         string.h                \
4849         strings.h               \
4850         sysexits.h              \
4851         sys/file.h              \
4852         sys/filio.h             \
4853         sys/errno.h             \
4854         sys/ioctl.h             \
4855         sys/param.h             \
4856         sys/resource.h  \
4857         sys/select.h    \
4858         sys/socket.h    \
4859         sys/syslog.h    \
4860         sys/time.h              \
4861         sys/types.h             \
4862         syslog.h                \
4863         termios.h               \
4864         unistd.h                \
4865         winsock.h               \
4866
4867 do
4868 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4869 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4870 echo "configure:4871: checking for $ac_hdr" >&5
4871 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4872   echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874   cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 #include <$ac_hdr>
4878 EOF
4879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4880 { (eval echo configure:4881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4881 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4882 if test -z "$ac_err"; then
4883   rm -rf conftest*
4884   eval "ac_cv_header_$ac_safe=yes"
4885 else
4886   echo "$ac_err" >&5
4887   echo "configure: failed program was:" >&5
4888   cat conftest.$ac_ext >&5
4889   rm -rf conftest*
4890   eval "ac_cv_header_$ac_safe=no"
4891 fi
4892 rm -f conftest*
4893 fi
4894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4895   echo "$ac_t""yes" 1>&6
4896     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4897   cat >> confdefs.h <<EOF
4898 #define $ac_tr_hdr 1
4899 EOF
4900  
4901 else
4902   echo "$ac_t""no" 1>&6
4903 fi
4904 done
4905
4906
4907
4908
4909 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4910 echo "configure:4911: checking for dlopen" >&5
4911 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 /* System header to define __stub macros and hopefully few prototypes,
4918     which can conflict with char dlopen(); below.  */
4919 #include <assert.h>
4920 /* Override any gcc2 internal prototype to avoid an error.  */
4921 /* We use char because int might match the return type of a gcc2
4922     builtin and then its argument prototype would still apply.  */
4923 char dlopen();
4924 char (*f)();
4925
4926 int main() {
4927
4928 /* The GNU C library defines this for functions which it implements
4929     to always fail with ENOSYS.  Some functions are actually named
4930     something starting with __ and the normal name is an alias.  */
4931 #if defined (__stub_dlopen) || defined (__stub___dlopen)
4932 choke me
4933 #else
4934 f = dlopen;
4935 #endif
4936
4937 ; return 0; }
4938 EOF
4939 if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4940   rm -rf conftest*
4941   eval "ac_cv_func_dlopen=yes"
4942 else
4943   echo "configure: failed program was:" >&5
4944   cat conftest.$ac_ext >&5
4945   rm -rf conftest*
4946   eval "ac_cv_func_dlopen=no"
4947 fi
4948 rm -f conftest*
4949 fi
4950
4951 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4952   echo "$ac_t""yes" 1>&6
4953   :
4954 else
4955   echo "$ac_t""no" 1>&6
4956 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4957 echo "configure:4958: checking for dlopen in -ldl" >&5
4958 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
4959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4960   echo $ac_n "(cached) $ac_c" 1>&6
4961 else
4962   ac_save_LIBS="$LIBS"
4963 LIBS="-ldl  $LIBS"
4964 cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* Override any gcc2 internal prototype to avoid an error.  */
4968 /* We use char because int might match the return type of a gcc2
4969     builtin and then its argument prototype would still apply.  */
4970 char dlopen();
4971
4972 int main() {
4973 dlopen()
4974 ; return 0; }
4975 EOF
4976 if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4977   rm -rf conftest*
4978   eval "ac_cv_lib_$ac_lib_var=yes"
4979 else
4980   echo "configure: failed program was:" >&5
4981   cat conftest.$ac_ext >&5
4982   rm -rf conftest*
4983   eval "ac_cv_lib_$ac_lib_var=no"
4984 fi
4985 rm -f conftest*
4986 LIBS="$ac_save_LIBS"
4987
4988 fi
4989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4990   echo "$ac_t""yes" 1>&6
4991     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4992     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4993   cat >> confdefs.h <<EOF
4994 #define $ac_tr_lib 1
4995 EOF
4996
4997   LIBS="-ldl $LIBS"
4998
4999 else
5000   echo "$ac_t""no" 1>&6
5001 fi
5002
5003 fi
5004
5005
5006 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5007 echo "configure:5008: checking for sigset in -lV3" >&5
5008 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5009 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012   ac_save_LIBS="$LIBS"
5013 LIBS="-lV3  $LIBS"
5014 cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 /* We use char because int might match the return type of a gcc2
5019     builtin and then its argument prototype would still apply.  */
5020 char sigset();
5021
5022 int main() {
5023 sigset()
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 V3 | 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="-lV3 $LIBS"
5048
5049 else
5050   echo "$ac_t""no" 1>&6
5051 fi
5052
5053
5054 if test $ac_cv_header_winsock_h = yes; then
5055         echo $ac_n "checking for winsock""... $ac_c" 1>&6
5056 echo "configure:5057: checking for winsock" >&5
5057 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
5058   echo $ac_n "(cached) $ac_c" 1>&6
5059 else
5060   cat > conftest.$ac_ext <<EOF
5061 #line 5062 "configure"
5062 #include "confdefs.h"
5063 #include <winsock.h>
5064 int main() {
5065
5066                         socket(0,0,0);
5067                         select(0,NULL,NULL,NULL,NULL);
5068                         closesocket(0);
5069                         gethostname(NULL,0);
5070         
5071 ; return 0; }
5072 EOF
5073 if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5074   rm -rf conftest*
5075   ol_cv_winsock=yes
5076 else
5077   echo "configure: failed program was:" >&5
5078   cat conftest.$ac_ext >&5
5079   rm -rf conftest*
5080   ol_cv_winsock=no
5081 fi
5082 rm -f conftest*]
5083 fi
5084
5085 echo "$ac_t""$ol_cv_winsock" 1>&6
5086
5087         if test $ol_cv_winsock = yes ; then
5088                 cat >> confdefs.h <<\EOF
5089 #define HAVE_WINSOCK 1
5090 EOF
5091
5092                 ac_cv_func_socket=yes
5093                 ac_cv_func_select=yes
5094                 ac_cv_func_closesocket=yes
5095                 ac_cv_func_gethostname=yes
5096         fi
5097 fi
5098
5099
5100 echo $ac_n "checking for socket""... $ac_c" 1>&6
5101 echo "configure:5102: checking for socket" >&5
5102 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
5103   echo $ac_n "(cached) $ac_c" 1>&6
5104 else
5105   cat > conftest.$ac_ext <<EOF
5106 #line 5107 "configure"
5107 #include "confdefs.h"
5108 /* System header to define __stub macros and hopefully few prototypes,
5109     which can conflict with char socket(); below.  */
5110 #include <assert.h>
5111 /* Override any gcc2 internal prototype to avoid an error.  */
5112 /* We use char because int might match the return type of a gcc2
5113     builtin and then its argument prototype would still apply.  */
5114 char socket();
5115 char (*f)();
5116
5117 int main() {
5118
5119 /* The GNU C library defines this for functions which it implements
5120     to always fail with ENOSYS.  Some functions are actually named
5121     something starting with __ and the normal name is an alias.  */
5122 #if defined (__stub_socket) || defined (__stub___socket)
5123 choke me
5124 #else
5125 f = socket;
5126 #endif
5127
5128 ; return 0; }
5129 EOF
5130 if { (eval echo configure:5131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5131   rm -rf conftest*
5132   eval "ac_cv_func_socket=yes"
5133 else
5134   echo "configure: failed program was:" >&5
5135   cat conftest.$ac_ext >&5
5136   rm -rf conftest*
5137   eval "ac_cv_func_socket=no"
5138 fi
5139 rm -f conftest*
5140 fi
5141
5142 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5143   echo "$ac_t""yes" 1>&6
5144   :
5145 else
5146   echo "$ac_t""no" 1>&6
5147         
5148         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5149 echo "configure:5150: checking for main in -lsocket" >&5
5150 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
5151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5152   echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154   ac_save_LIBS="$LIBS"
5155 LIBS="-lsocket  $LIBS"
5156 cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159
5160 int main() {
5161 main()
5162 ; return 0; }
5163 EOF
5164 if { (eval echo configure:5165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=yes"
5167 else
5168   echo "configure: failed program was:" >&5
5169   cat conftest.$ac_ext >&5
5170   rm -rf conftest*
5171   eval "ac_cv_lib_$ac_lib_var=no"
5172 fi
5173 rm -f conftest*
5174 LIBS="$ac_save_LIBS"
5175
5176 fi
5177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5178   echo "$ac_t""yes" 1>&6
5179     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5181   cat >> confdefs.h <<EOF
5182 #define $ac_tr_lib 1
5183 EOF
5184
5185   LIBS="-lsocket $LIBS"
5186
5187 else
5188   echo "$ac_t""no" 1>&6
5189 fi
5190
5191         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
5192 echo "configure:5193: checking for main in -lnet" >&5
5193 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
5194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5195   echo $ac_n "(cached) $ac_c" 1>&6
5196 else
5197   ac_save_LIBS="$LIBS"
5198 LIBS="-lnet  $LIBS"
5199 cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202
5203 int main() {
5204 main()
5205 ; return 0; }
5206 EOF
5207 if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5208   rm -rf conftest*
5209   eval "ac_cv_lib_$ac_lib_var=yes"
5210 else
5211   echo "configure: failed program was:" >&5
5212   cat conftest.$ac_ext >&5
5213   rm -rf conftest*
5214   eval "ac_cv_lib_$ac_lib_var=no"
5215 fi
5216 rm -f conftest*
5217 LIBS="$ac_save_LIBS"
5218
5219 fi
5220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5221   echo "$ac_t""yes" 1>&6
5222     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5223     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5224   cat >> confdefs.h <<EOF
5225 #define $ac_tr_lib 1
5226 EOF
5227
5228   LIBS="-lnet $LIBS"
5229
5230 else
5231   echo "$ac_t""no" 1>&6
5232 fi
5233
5234         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5235 echo "configure:5236: checking for main in -lnsl_s" >&5
5236 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240   ac_save_LIBS="$LIBS"
5241 LIBS="-lnsl_s  $LIBS"
5242 cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245
5246 int main() {
5247 main()
5248 ; return 0; }
5249 EOF
5250 if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5251   rm -rf conftest*
5252   eval "ac_cv_lib_$ac_lib_var=yes"
5253 else
5254   echo "configure: failed program was:" >&5
5255   cat conftest.$ac_ext >&5
5256   rm -rf conftest*
5257   eval "ac_cv_lib_$ac_lib_var=no"
5258 fi
5259 rm -f conftest*
5260 LIBS="$ac_save_LIBS"
5261
5262 fi
5263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5264   echo "$ac_t""yes" 1>&6
5265     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5266     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5267   cat >> confdefs.h <<EOF
5268 #define $ac_tr_lib 1
5269 EOF
5270
5271   LIBS="-lnsl_s $LIBS"
5272
5273 else
5274   echo "$ac_t""no" 1>&6
5275 fi
5276
5277         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5278 echo "configure:5279: checking for main in -lnsl" >&5
5279 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283   ac_save_LIBS="$LIBS"
5284 LIBS="-lnsl  $LIBS"
5285 cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288
5289 int main() {
5290 main()
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   eval "ac_cv_lib_$ac_lib_var=yes"
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   eval "ac_cv_lib_$ac_lib_var=no"
5301 fi
5302 rm -f conftest*
5303 LIBS="$ac_save_LIBS"
5304
5305 fi
5306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5309     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5310   cat >> confdefs.h <<EOF
5311 #define $ac_tr_lib 1
5312 EOF
5313
5314   LIBS="-lnsl $LIBS"
5315
5316 else
5317   echo "$ac_t""no" 1>&6
5318 fi
5319
5320         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5321 echo "configure:5322: checking for socket in -linet" >&5
5322 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5323 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5324   echo $ac_n "(cached) $ac_c" 1>&6
5325 else
5326   ac_save_LIBS="$LIBS"
5327 LIBS="-linet  $LIBS"
5328 cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331 /* Override any gcc2 internal prototype to avoid an error.  */
5332 /* We use char because int might match the return type of a gcc2
5333     builtin and then its argument prototype would still apply.  */
5334 char socket();
5335
5336 int main() {
5337 socket()
5338 ; return 0; }
5339 EOF
5340 if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5341   rm -rf conftest*
5342   eval "ac_cv_lib_$ac_lib_var=yes"
5343 else
5344   echo "configure: failed program was:" >&5
5345   cat conftest.$ac_ext >&5
5346   rm -rf conftest*
5347   eval "ac_cv_lib_$ac_lib_var=no"
5348 fi
5349 rm -f conftest*
5350 LIBS="$ac_save_LIBS"
5351
5352 fi
5353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5354   echo "$ac_t""yes" 1>&6
5355     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5356     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5357   cat >> confdefs.h <<EOF
5358 #define $ac_tr_lib 1
5359 EOF
5360
5361   LIBS="-linet $LIBS"
5362
5363 else
5364   echo "$ac_t""no" 1>&6
5365 fi
5366
5367         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5368 echo "configure:5369: checking for main in -lgen" >&5
5369 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373   ac_save_LIBS="$LIBS"
5374 LIBS="-lgen  $LIBS"
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378
5379 int main() {
5380 main()
5381 ; return 0; }
5382 EOF
5383 if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5384   rm -rf conftest*
5385   eval "ac_cv_lib_$ac_lib_var=yes"
5386 else
5387   echo "configure: failed program was:" >&5
5388   cat conftest.$ac_ext >&5
5389   rm -rf conftest*
5390   eval "ac_cv_lib_$ac_lib_var=no"
5391 fi
5392 rm -f conftest*
5393 LIBS="$ac_save_LIBS"
5394
5395 fi
5396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5397   echo "$ac_t""yes" 1>&6
5398     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5399     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5400   cat >> confdefs.h <<EOF
5401 #define $ac_tr_lib 1
5402 EOF
5403
5404   LIBS="-lgen $LIBS"
5405
5406 else
5407   echo "$ac_t""no" 1>&6
5408 fi
5409
5410
5411 fi
5412
5413
5414 echo $ac_n "checking for select""... $ac_c" 1>&6
5415 echo "configure:5416: checking for select" >&5
5416 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5417   echo $ac_n "(cached) $ac_c" 1>&6
5418 else
5419   cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 /* System header to define __stub macros and hopefully few prototypes,
5423     which can conflict with char select(); below.  */
5424 #include <assert.h>
5425 /* Override any gcc2 internal prototype to avoid an error.  */
5426 /* We use char because int might match the return type of a gcc2
5427     builtin and then its argument prototype would still apply.  */
5428 char select();
5429 char (*f)();
5430
5431 int main() {
5432
5433 /* The GNU C library defines this for functions which it implements
5434     to always fail with ENOSYS.  Some functions are actually named
5435     something starting with __ and the normal name is an alias.  */
5436 #if defined (__stub_select) || defined (__stub___select)
5437 choke me
5438 #else
5439 f = select;
5440 #endif
5441
5442 ; return 0; }
5443 EOF
5444 if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5445   rm -rf conftest*
5446   eval "ac_cv_func_select=yes"
5447 else
5448   echo "configure: failed program was:" >&5
5449   cat conftest.$ac_ext >&5
5450   rm -rf conftest*
5451   eval "ac_cv_func_select=no"
5452 fi
5453 rm -f conftest*
5454 fi
5455
5456 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5457   echo "$ac_t""yes" 1>&6
5458   :
5459 else
5460   echo "$ac_t""no" 1>&6
5461 { echo "configure: error: select() required." 1>&2; exit 1; }
5462 fi
5463
5464
5465 if test "${ac_cv_header_winsock_h}" != yes; then
5466                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5467 echo "configure:5468: checking types of arguments for select()" >&5
5468  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5472   echo $ac_n "(cached) $ac_c" 1>&6
5473 else
5474     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5475   echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5478      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5479       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5480        cat > conftest.$ac_ext <<EOF
5481 #line 5482 "configure"
5482 #include "confdefs.h"
5483 #ifdef HAVE_SYS_TYPES_H
5484 #include <sys/types.h>
5485 #endif
5486 #ifdef HAVE_SYS_TIME_H
5487 #include <sys/time.h>
5488 #endif
5489 #ifdef HAVE_SYS_SELECT_H
5490 #include <sys/select.h>
5491 #endif
5492 #ifdef HAVE_SYS_SOCKET_H
5493 #include <sys/socket.h>
5494 #endif
5495 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);
5496 int main() {
5497
5498 ; return 0; }
5499 EOF
5500 if { (eval echo configure:5501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5501   rm -rf conftest*
5502           ac_not_found=no ; break 3
5503 else
5504   echo "configure: failed program was:" >&5
5505   cat conftest.$ac_ext >&5
5506   rm -rf conftest*
5507   ac_not_found=yes
5508 fi
5509 rm -f conftest*
5510       done
5511      done
5512     done
5513    
5514 fi
5515   
5516 fi
5517  
5518 fi
5519  if test "$ac_not_found" = yes; then
5520   ac_cv_func_select_arg1=int 
5521   ac_cv_func_select_arg234='int *' 
5522   ac_cv_func_select_arg5='struct timeval *'
5523  fi
5524  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5525  cat >> confdefs.h <<EOF
5526 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5527 EOF
5528
5529  cat >> confdefs.h <<EOF
5530 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5531 EOF
5532
5533  cat >> confdefs.h <<EOF
5534 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5535 EOF
5536
5537
5538 fi
5539
5540
5541 for ac_hdr in regex.h 
5542 do
5543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5544 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5545 echo "configure:5546: checking for $ac_hdr" >&5
5546 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5547   echo $ac_n "(cached) $ac_c" 1>&6
5548 else
5549   cat > conftest.$ac_ext <<EOF
5550 #line 5551 "configure"
5551 #include "confdefs.h"
5552 #include <$ac_hdr>
5553 EOF
5554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5555 { (eval echo configure:5556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5557 if test -z "$ac_err"; then
5558   rm -rf conftest*
5559   eval "ac_cv_header_$ac_safe=yes"
5560 else
5561   echo "$ac_err" >&5
5562   echo "configure: failed program was:" >&5
5563   cat conftest.$ac_ext >&5
5564   rm -rf conftest*
5565   eval "ac_cv_header_$ac_safe=no"
5566 fi
5567 rm -f conftest*
5568 fi
5569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5570   echo "$ac_t""yes" 1>&6
5571     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5572   cat >> confdefs.h <<EOF
5573 #define $ac_tr_hdr 1
5574 EOF
5575  
5576 else
5577   echo "$ac_t""no" 1>&6
5578 fi
5579 done
5580
5581 if test "$ac_cv_header_regex_h" != yes ; then
5582         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5583 fi
5584 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5585 echo "configure:5586: checking for regfree" >&5
5586 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 /* System header to define __stub macros and hopefully few prototypes,
5593     which can conflict with char regfree(); below.  */
5594 #include <assert.h>
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 /* We use char because int might match the return type of a gcc2
5597     builtin and then its argument prototype would still apply.  */
5598 char regfree();
5599 char (*f)();
5600
5601 int main() {
5602
5603 /* The GNU C library defines this for functions which it implements
5604     to always fail with ENOSYS.  Some functions are actually named
5605     something starting with __ and the normal name is an alias.  */
5606 #if defined (__stub_regfree) || defined (__stub___regfree)
5607 choke me
5608 #else
5609 f = regfree;
5610 #endif
5611
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615   rm -rf conftest*
5616   eval "ac_cv_func_regfree=yes"
5617 else
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   eval "ac_cv_func_regfree=no"
5622 fi
5623 rm -f conftest*
5624 fi
5625
5626 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5627   echo "$ac_t""yes" 1>&6
5628   :
5629 else
5630   echo "$ac_t""no" 1>&6
5631 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5632 fi
5633
5634
5635
5636 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5637 echo "configure:5638: checking for compatible POSIX regex" >&5
5638 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   
5642         if test "$cross_compiling" = yes; then
5643   ol_cv_c_posix_regex=cross
5644 else
5645   cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648
5649 #include <sys/types.h>
5650 #include <regex.h>
5651 static char *pattern, *string;
5652 main()
5653 {
5654         int rc;
5655         regex_t re;
5656
5657         pattern = "^A";
5658
5659         if(regcomp(&re, pattern, 0)) {
5660                 return -1;
5661         }
5662         
5663         string = "ALL MATCH";
5664         
5665         rc = regexec(&re, string, 0, (void*)0, 0);
5666
5667         regfree(&re);
5668
5669         return rc;
5670 }
5671 EOF
5672 if { (eval echo configure:5673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5673 then
5674   ol_cv_c_posix_regex=yes
5675 else
5676   echo "configure: failed program was:" >&5
5677   cat conftest.$ac_ext >&5
5678   rm -fr conftest*
5679   ol_cv_c_posix_regex=no
5680 fi
5681 rm -fr conftest*
5682 fi
5683
5684 fi
5685
5686 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5687
5688 if test "$ol_cv_c_posix_regex" = no ; then
5689         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5690 fi
5691
5692 ol_link_dnssrv=no
5693 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5694 echo "configure:5695: checking for res_query" >&5
5695 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5696   echo $ac_n "(cached) $ac_c" 1>&6
5697 else
5698   cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 /* System header to define __stub macros and hopefully few prototypes,
5702     which can conflict with char res_query(); below.  */
5703 #include <assert.h>
5704 /* Override any gcc2 internal prototype to avoid an error.  */
5705 /* We use char because int might match the return type of a gcc2
5706     builtin and then its argument prototype would still apply.  */
5707 char res_query();
5708 char (*f)();
5709
5710 int main() {
5711
5712 /* The GNU C library defines this for functions which it implements
5713     to always fail with ENOSYS.  Some functions are actually named
5714     something starting with __ and the normal name is an alias.  */
5715 #if defined (__stub_res_query) || defined (__stub___res_query)
5716 choke me
5717 #else
5718 f = res_query;
5719 #endif
5720
5721 ; return 0; }
5722 EOF
5723 if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5724   rm -rf conftest*
5725   eval "ac_cv_func_res_query=yes"
5726 else
5727   echo "configure: failed program was:" >&5
5728   cat conftest.$ac_ext >&5
5729   rm -rf conftest*
5730   eval "ac_cv_func_res_query=no"
5731 fi
5732 rm -f conftest*
5733 fi
5734
5735 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5736   echo "$ac_t""yes" 1>&6
5737   :
5738 else
5739   echo "$ac_t""no" 1>&6
5740 fi
5741
5742 if test $ac_cv_func_res_query = no ; then 
5743         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5744 echo "configure:5745: checking for res_query in -lbind" >&5
5745 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5747   echo $ac_n "(cached) $ac_c" 1>&6
5748 else
5749   ac_save_LIBS="$LIBS"
5750 LIBS="-lbind  $LIBS"
5751 cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 /* We use char because int might match the return type of a gcc2
5756     builtin and then its argument prototype would still apply.  */
5757 char res_query();
5758
5759 int main() {
5760 res_query()
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_lib_$ac_lib_var=no"
5771 fi
5772 rm -f conftest*
5773 LIBS="$ac_save_LIBS"
5774
5775 fi
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5777   echo "$ac_t""yes" 1>&6
5778     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5779     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5780   cat >> confdefs.h <<EOF
5781 #define $ac_tr_lib 1
5782 EOF
5783
5784   LIBS="-lbind $LIBS"
5785
5786 else
5787   echo "$ac_t""no" 1>&6
5788 fi
5789
5790         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5791 fi
5792
5793 if test $ac_cv_func_res_query = no ; then 
5794         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5795 echo "configure:5796: checking for __res_query in -lbind" >&5
5796 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5797 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5798   echo $ac_n "(cached) $ac_c" 1>&6
5799 else
5800   ac_save_LIBS="$LIBS"
5801 LIBS="-lbind  $LIBS"
5802 cat > conftest.$ac_ext <<EOF
5803 #line 5804 "configure"
5804 #include "confdefs.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 __res_query();
5809
5810 int main() {
5811 __res_query()
5812 ; return 0; }
5813 EOF
5814 if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5815   rm -rf conftest*
5816   eval "ac_cv_lib_$ac_lib_var=yes"
5817 else
5818   echo "configure: failed program was:" >&5
5819   cat conftest.$ac_ext >&5
5820   rm -rf conftest*
5821   eval "ac_cv_lib_$ac_lib_var=no"
5822 fi
5823 rm -f conftest*
5824 LIBS="$ac_save_LIBS"
5825
5826 fi
5827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5828   echo "$ac_t""yes" 1>&6
5829     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5830     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5831   cat >> confdefs.h <<EOF
5832 #define $ac_tr_lib 1
5833 EOF
5834
5835   LIBS="-lbind $LIBS"
5836
5837 else
5838   echo "$ac_t""no" 1>&6
5839 fi
5840
5841         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5842 fi
5843
5844 if test $ac_cv_func_res_query = no ; then 
5845         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5846 echo "configure:5847: checking for res_query in -lresolv" >&5
5847 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5848 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5849   echo $ac_n "(cached) $ac_c" 1>&6
5850 else
5851   ac_save_LIBS="$LIBS"
5852 LIBS="-lresolv  $LIBS"
5853 cat > conftest.$ac_ext <<EOF
5854 #line 5855 "configure"
5855 #include "confdefs.h"
5856 /* Override any gcc2 internal prototype to avoid an error.  */
5857 /* We use char because int might match the return type of a gcc2
5858     builtin and then its argument prototype would still apply.  */
5859 char res_query();
5860
5861 int main() {
5862 res_query()
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=yes"
5868 else
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   eval "ac_cv_lib_$ac_lib_var=no"
5873 fi
5874 rm -f conftest*
5875 LIBS="$ac_save_LIBS"
5876
5877 fi
5878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5879   echo "$ac_t""yes" 1>&6
5880     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5882   cat >> confdefs.h <<EOF
5883 #define $ac_tr_lib 1
5884 EOF
5885
5886   LIBS="-lresolv $LIBS"
5887
5888 else
5889   echo "$ac_t""no" 1>&6
5890 fi
5891
5892         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5893 fi
5894
5895 if test "$ac_cv_func_res_query" = yes ; then
5896         cat >> confdefs.h <<\EOF
5897 #define HAVE_RES_QUERY 1
5898 EOF
5899
5900
5901         if test $ol_enable_dnssrv != no ; then
5902                 ol_link_dnssrv=yes
5903         fi
5904 fi
5905
5906 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5907         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5908 fi
5909
5910 for ac_func in getaddrinfo inet_ntop 
5911 do
5912 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5913 echo "configure:5914: checking for $ac_func" >&5
5914 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5915   echo $ac_n "(cached) $ac_c" 1>&6
5916 else
5917   cat > conftest.$ac_ext <<EOF
5918 #line 5919 "configure"
5919 #include "confdefs.h"
5920 /* System header to define __stub macros and hopefully few prototypes,
5921     which can conflict with char $ac_func(); below.  */
5922 #include <assert.h>
5923 /* Override any gcc2 internal prototype to avoid an error.  */
5924 /* We use char because int might match the return type of a gcc2
5925     builtin and then its argument prototype would still apply.  */
5926 char $ac_func();
5927 char (*f)();
5928
5929 int main() {
5930
5931 /* The GNU C library defines this for functions which it implements
5932     to always fail with ENOSYS.  Some functions are actually named
5933     something starting with __ and the normal name is an alias.  */
5934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5935 choke me
5936 #else
5937 f = $ac_func;
5938 #endif
5939
5940 ; return 0; }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5943   rm -rf conftest*
5944   eval "ac_cv_func_$ac_func=yes"
5945 else
5946   echo "configure: failed program was:" >&5
5947   cat conftest.$ac_ext >&5
5948   rm -rf conftest*
5949   eval "ac_cv_func_$ac_func=no"
5950 fi
5951 rm -f conftest*
5952 fi
5953
5954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5955   echo "$ac_t""yes" 1>&6
5956     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5957   cat >> confdefs.h <<EOF
5958 #define $ac_tr_func 1
5959 EOF
5960  
5961 else
5962   echo "$ac_t""no" 1>&6
5963 fi
5964 done
5965
5966
5967 ol_link_ipv6=no
5968 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
5969         if test $ol_enable_ipv6 = yes ; then
5970                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
5971         fi
5972 else
5973         for ac_func in gai_strerror 
5974 do
5975 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5976 echo "configure:5977: checking for $ac_func" >&5
5977 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5978   echo $ac_n "(cached) $ac_c" 1>&6
5979 else
5980   cat > conftest.$ac_ext <<EOF
5981 #line 5982 "configure"
5982 #include "confdefs.h"
5983 /* System header to define __stub macros and hopefully few prototypes,
5984     which can conflict with char $ac_func(); below.  */
5985 #include <assert.h>
5986 /* Override any gcc2 internal prototype to avoid an error.  */
5987 /* We use char because int might match the return type of a gcc2
5988     builtin and then its argument prototype would still apply.  */
5989 char $ac_func();
5990 char (*f)();
5991
5992 int main() {
5993
5994 /* The GNU C library defines this for functions which it implements
5995     to always fail with ENOSYS.  Some functions are actually named
5996     something starting with __ and the normal name is an alias.  */
5997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5998 choke me
5999 #else
6000 f = $ac_func;
6001 #endif
6002
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_func_$ac_func=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_func_$ac_func=no"
6013 fi
6014 rm -f conftest*
6015 fi
6016
6017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6018   echo "$ac_t""yes" 1>&6
6019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6020   cat >> confdefs.h <<EOF
6021 #define $ac_tr_func 1
6022 EOF
6023  
6024 else
6025   echo "$ac_t""no" 1>&6
6026 fi
6027 done
6028
6029
6030         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
6031 echo "configure:6032: checking INET6_ADDRSTRLEN" >&5
6032 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
6033   echo $ac_n "(cached) $ac_c" 1>&6
6034 else
6035   
6036                 cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039
6040 #                       include <netinet/in.h>
6041 #                       ifdef INET6_ADDRSTRLEN
6042                                 __has_inet6_addrstrlen__;
6043 #                       endif
6044                 
6045 EOF
6046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6047   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
6048   rm -rf conftest*
6049   ol_cv_inet6_addrstrlen=yes
6050 else
6051   rm -rf conftest*
6052   ol_cv_inet6_addrstrlen=no
6053 fi
6054 rm -f conftest*
6055
6056 fi
6057
6058 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
6059
6060         if test $ol_cv_inet6_addrstrlen = yes ; then
6061                 ol_link_ipv6=yes
6062         elif test $ol_enable_ipv6 = yes ; then
6063                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
6064         fi
6065 fi
6066
6067 if test $ol_enable_local != no ; then
6068         for ac_hdr in sys/un.h 
6069 do
6070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6072 echo "configure:6073: checking for $ac_hdr" >&5
6073 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6074   echo $ac_n "(cached) $ac_c" 1>&6
6075 else
6076   cat > conftest.$ac_ext <<EOF
6077 #line 6078 "configure"
6078 #include "confdefs.h"
6079 #include <$ac_hdr>
6080 EOF
6081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6082 { (eval echo configure:6083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6084 if test -z "$ac_err"; then
6085   rm -rf conftest*
6086   eval "ac_cv_header_$ac_safe=yes"
6087 else
6088   echo "$ac_err" >&5
6089   echo "configure: failed program was:" >&5
6090   cat conftest.$ac_ext >&5
6091   rm -rf conftest*
6092   eval "ac_cv_header_$ac_safe=no"
6093 fi
6094 rm -f conftest*
6095 fi
6096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6097   echo "$ac_t""yes" 1>&6
6098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6099   cat >> confdefs.h <<EOF
6100 #define $ac_tr_hdr 1
6101 EOF
6102  
6103 else
6104   echo "$ac_t""no" 1>&6
6105 fi
6106 done
6107
6108
6109         if test $ol_enable_local = auto ; then
6110                 ol_enable_local=$ac_cv_header_sys_un_h
6111         elif test $ac_cv_header_sys_un_h = no ; then
6112                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
6113         fi
6114 fi
6115
6116 ol_link_kbind=no
6117 ol_link_kpasswd=no
6118 ol_link_krb5=no
6119 ol_link_krb4=no
6120
6121 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6122         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
6123         -o $ol_with_kerberos = k425 ; then
6124
6125         for ac_hdr in krb5.h
6126 do
6127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6129 echo "configure:6130: checking for $ac_hdr" >&5
6130 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6131   echo $ac_n "(cached) $ac_c" 1>&6
6132 else
6133   cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 #include <$ac_hdr>
6137 EOF
6138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6139 { (eval echo configure:6140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6141 if test -z "$ac_err"; then
6142   rm -rf conftest*
6143   eval "ac_cv_header_$ac_safe=yes"
6144 else
6145   echo "$ac_err" >&5
6146   echo "configure: failed program was:" >&5
6147   cat conftest.$ac_ext >&5
6148   rm -rf conftest*
6149   eval "ac_cv_header_$ac_safe=no"
6150 fi
6151 rm -f conftest*
6152 fi
6153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6156   cat >> confdefs.h <<EOF
6157 #define $ac_tr_hdr 1
6158 EOF
6159  
6160 else
6161   echo "$ac_t""no" 1>&6
6162 fi
6163 done
6164
6165
6166         if test $ac_cv_header_krb5_h = yes ; then
6167                                 for ac_hdr in heim_err.h
6168 do
6169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6171 echo "configure:6172: checking for $ac_hdr" >&5
6172 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6173   echo $ac_n "(cached) $ac_c" 1>&6
6174 else
6175   cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178 #include <$ac_hdr>
6179 EOF
6180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6181 { (eval echo configure:6182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6183 if test -z "$ac_err"; then
6184   rm -rf conftest*
6185   eval "ac_cv_header_$ac_safe=yes"
6186 else
6187   echo "$ac_err" >&5
6188   echo "configure: failed program was:" >&5
6189   cat conftest.$ac_ext >&5
6190   rm -rf conftest*
6191   eval "ac_cv_header_$ac_safe=no"
6192 fi
6193 rm -f conftest*
6194 fi
6195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6196   echo "$ac_t""yes" 1>&6
6197     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6198   cat >> confdefs.h <<EOF
6199 #define $ac_tr_hdr 1
6200 EOF
6201  
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205 done
6206
6207                 if test $ac_cv_header_heim_err_h = yes ; then
6208                         krb5_impl=heimdal
6209                 else
6210                         krb5_impl=mit
6211                 fi
6212
6213                 if test $krb5_impl = mit; then
6214                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6215 echo "configure:6216: checking for main in -lkrb5" >&5
6216 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   ac_save_LIBS="$LIBS"
6221 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6222 cat > conftest.$ac_ext <<EOF
6223 #line 6224 "configure"
6224 #include "confdefs.h"
6225
6226 int main() {
6227 main()
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   eval "ac_cv_lib_$ac_lib_var=yes"
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   eval "ac_cv_lib_$ac_lib_var=no"
6238 fi
6239 rm -f conftest*
6240 LIBS="$ac_save_LIBS"
6241
6242 fi
6243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6244   echo "$ac_t""yes" 1>&6
6245   have_krb5=yes
6246                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6247 else
6248   echo "$ac_t""no" 1>&6
6249 have_krb5=no
6250 fi
6251
6252
6253                 elif test $krb5_impl = heimdal; then
6254                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6255 echo "configure:6256: checking for main in -lkrb5" >&5
6256 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6258   echo $ac_n "(cached) $ac_c" 1>&6
6259 else
6260   ac_save_LIBS="$LIBS"
6261 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265
6266 int main() {
6267 main()
6268 ; return 0; }
6269 EOF
6270 if { (eval echo configure:6271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6271   rm -rf conftest*
6272   eval "ac_cv_lib_$ac_lib_var=yes"
6273 else
6274   echo "configure: failed program was:" >&5
6275   cat conftest.$ac_ext >&5
6276   rm -rf conftest*
6277   eval "ac_cv_lib_$ac_lib_var=no"
6278 fi
6279 rm -f conftest*
6280 LIBS="$ac_save_LIBS"
6281
6282 fi
6283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6284   echo "$ac_t""yes" 1>&6
6285   have_krb5=yes
6286                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6287 else
6288   echo "$ac_t""no" 1>&6
6289 have_krb5=no
6290 fi
6291
6292
6293                         cat >> confdefs.h <<\EOF
6294 #define HAVE_HEIMDAL_KERBEROS 1
6295 EOF
6296
6297                 else
6298                         have_krb5=no
6299                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6300                 fi
6301
6302                 if test $have_krb5 = yes ; then
6303                         ol_link_krb5=yes
6304
6305                         cat >> confdefs.h <<\EOF
6306 #define HAVE_KRB5 1
6307 EOF
6308
6309
6310                         if test $ol_enable_kpasswd != no ; then
6311                                 ol_link_kpasswd=yes;
6312                         fi
6313
6314                         if test $ol_with_kerberos = k5only ; then
6315                                 ol_with_kerberos=found
6316                         fi
6317
6318                 elif test $ol_with_kerberos != auto ; then
6319                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6320                 fi
6321
6322         fi
6323 fi
6324
6325 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6326         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6327
6328         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6329 do
6330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6332 echo "configure:6333: checking for $ac_hdr" >&5
6333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6334   echo $ac_n "(cached) $ac_c" 1>&6
6335 else
6336   cat > conftest.$ac_ext <<EOF
6337 #line 6338 "configure"
6338 #include "confdefs.h"
6339 #include <$ac_hdr>
6340 EOF
6341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6342 { (eval echo configure:6343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6344 if test -z "$ac_err"; then
6345   rm -rf conftest*
6346   eval "ac_cv_header_$ac_safe=yes"
6347 else
6348   echo "$ac_err" >&5
6349   echo "configure: failed program was:" >&5
6350   cat conftest.$ac_ext >&5
6351   rm -rf conftest*
6352   eval "ac_cv_header_$ac_safe=no"
6353 fi
6354 rm -f conftest*
6355 fi
6356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6357   echo "$ac_t""yes" 1>&6
6358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6359   cat >> confdefs.h <<EOF
6360 #define $ac_tr_hdr 1
6361 EOF
6362  
6363 else
6364   echo "$ac_t""no" 1>&6
6365 fi
6366 done
6367
6368
6369         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6370                 if test $krb5_impl = mit; then
6371                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6372 echo "configure:6373: checking for main in -lkrb4" >&5
6373 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6375   echo $ac_n "(cached) $ac_c" 1>&6
6376 else
6377   ac_save_LIBS="$LIBS"
6378 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6379 cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6382
6383 int main() {
6384 main()
6385 ; return 0; }
6386 EOF
6387 if { (eval echo configure:6388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6388   rm -rf conftest*
6389   eval "ac_cv_lib_$ac_lib_var=yes"
6390 else
6391   echo "configure: failed program was:" >&5
6392   cat conftest.$ac_ext >&5
6393   rm -rf conftest*
6394   eval "ac_cv_lib_$ac_lib_var=no"
6395 fi
6396 rm -f conftest*
6397 LIBS="$ac_save_LIBS"
6398
6399 fi
6400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6401   echo "$ac_t""yes" 1>&6
6402   have_k425=yes
6403                                 KRB4_LIBS="-lkrb4 -ldes425"
6404 else
6405   echo "$ac_t""no" 1>&6
6406 have_k425=no
6407 fi
6408
6409
6410                 elif test $krb5_impl = heimdal; then
6411                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6412 echo "configure:6413: checking for main in -lkrb4" >&5
6413 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6415   echo $ac_n "(cached) $ac_c" 1>&6
6416 else
6417   ac_save_LIBS="$LIBS"
6418 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6419 cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422
6423 int main() {
6424 main()
6425 ; return 0; }
6426 EOF
6427 if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6428   rm -rf conftest*
6429   eval "ac_cv_lib_$ac_lib_var=yes"
6430 else
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433   rm -rf conftest*
6434   eval "ac_cv_lib_$ac_lib_var=no"
6435 fi
6436 rm -f conftest*
6437 LIBS="$ac_save_LIBS"
6438
6439 fi
6440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6441   echo "$ac_t""yes" 1>&6
6442   have_k425=yes
6443                                 KRB4_LIBS="-lkrb4"
6444 else
6445   echo "$ac_t""no" 1>&6
6446 have_k425=no
6447 fi
6448
6449
6450                 else
6451                         have_425=no
6452                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6453                 fi
6454
6455                 if test $have_k425 = yes ; then
6456                         ol_with_kerberos=found
6457                         ol_link_krb4=yes
6458
6459                         cat >> confdefs.h <<\EOF
6460 #define HAVE_KRB425 1
6461 EOF
6462
6463                         cat >> confdefs.h <<\EOF
6464 #define HAVE_KRB4 1
6465 EOF
6466
6467
6468                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6469 echo "configure:6470: checking for des_debug in Kerberos libraries" >&5
6470 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6471   echo $ac_n "(cached) $ac_c" 1>&6
6472 else
6473   
6474                                                                 save_LIBS="$LIBS"
6475                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6476                                 cat > conftest.$ac_ext <<EOF
6477 #line 6478 "configure"
6478 #include "confdefs.h"
6479
6480 #include <kerberosIV/krb.h>
6481 #include <kerberosIV/des.h>
6482 extern int des_debug;
6483
6484 int main() {
6485
6486 des_debug = 1;
6487
6488 ; return 0; }
6489 EOF
6490 if { (eval echo configure:6491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6491   rm -rf conftest*
6492   ol_cv_var_des_debug=yes
6493 else
6494   echo "configure: failed program was:" >&5
6495   cat conftest.$ac_ext >&5
6496   rm -rf conftest*
6497   ol_cv_var_des_debug=no
6498 fi
6499 rm -f conftest*
6500                                                                 LIBS="$save_LIBS"
6501                         
6502 fi
6503
6504 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6505
6506                         if test $ol_cv_var_des_debug = yes ; then
6507                                 cat >> confdefs.h <<\EOF
6508 #define HAVE_DES_DEBUG 1
6509 EOF
6510
6511                         fi
6512
6513                         LIBS="$save_LIBS"
6514                 fi
6515         fi
6516 fi
6517
6518 if test $ol_link_krb5 = yes ; then
6519         ol_with_kerberos=found
6520 fi
6521
6522 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6523         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6524
6525         for ac_hdr in krb.h des.h krb-archaeology.h 
6526 do
6527 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6528 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6529 echo "configure:6530: checking for $ac_hdr" >&5
6530 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6531   echo $ac_n "(cached) $ac_c" 1>&6
6532 else
6533   cat > conftest.$ac_ext <<EOF
6534 #line 6535 "configure"
6535 #include "confdefs.h"
6536 #include <$ac_hdr>
6537 EOF
6538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6539 { (eval echo configure:6540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6541 if test -z "$ac_err"; then
6542   rm -rf conftest*
6543   eval "ac_cv_header_$ac_safe=yes"
6544 else
6545   echo "$ac_err" >&5
6546   echo "configure: failed program was:" >&5
6547   cat conftest.$ac_ext >&5
6548   rm -rf conftest*
6549   eval "ac_cv_header_$ac_safe=no"
6550 fi
6551 rm -f conftest*
6552 fi
6553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6554   echo "$ac_t""yes" 1>&6
6555     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6556   cat >> confdefs.h <<EOF
6557 #define $ac_tr_hdr 1
6558 EOF
6559  
6560 else
6561   echo "$ac_t""no" 1>&6
6562 fi
6563 done
6564
6565
6566         if test $ac_cv_header_krb_h = yes ; then
6567                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6568 echo "configure:6569: checking for main in -lkrb" >&5
6569 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6570 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6571   echo $ac_n "(cached) $ac_c" 1>&6
6572 else
6573   ac_save_LIBS="$LIBS"
6574 LIBS="-lkrb -ldes $LIBS"
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578
6579 int main() {
6580 main()
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584   rm -rf conftest*
6585   eval "ac_cv_lib_$ac_lib_var=yes"
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -rf conftest*
6590   eval "ac_cv_lib_$ac_lib_var=no"
6591 fi
6592 rm -f conftest*
6593 LIBS="$ac_save_LIBS"
6594
6595 fi
6596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6597   echo "$ac_t""yes" 1>&6
6598   have_k4=yes
6599 else
6600   echo "$ac_t""no" 1>&6
6601 have_k4=no
6602 fi
6603
6604
6605                 if test $have_k4 = yes ; then
6606                         ol_with_kerberos=found
6607                         ol_link_krb4=yes
6608
6609                         cat >> confdefs.h <<\EOF
6610 #define HAVE_KRB4 1
6611 EOF
6612
6613
6614                         KRB4_LIBS="-lkrb -ldes"
6615
6616                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6617                                 cat >> confdefs.h <<\EOF
6618 #define HAVE_KTH_KERBEROS 1
6619 EOF
6620
6621                         fi
6622                 fi
6623         fi
6624 fi
6625
6626 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6627         ol_link_kpasswd=yes
6628 fi
6629
6630 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6631         ol_link_kbind=yes
6632
6633 elif test $ol_enable_kbind = yes ; then
6634         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6635 fi
6636
6637 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6638         cat >> confdefs.h <<\EOF
6639 #define HAVE_KERBEROS 1
6640 EOF
6641
6642
6643 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6644         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6645 fi
6646
6647 ol_link_tls=no
6648 if test $ol_with_tls != no ; then
6649         for ac_hdr in openssl/ssl.h ssl.h
6650 do
6651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6653 echo "configure:6654: checking for $ac_hdr" >&5
6654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6655   echo $ac_n "(cached) $ac_c" 1>&6
6656 else
6657   cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 #include <$ac_hdr>
6661 EOF
6662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6663 { (eval echo configure:6664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6665 if test -z "$ac_err"; then
6666   rm -rf conftest*
6667   eval "ac_cv_header_$ac_safe=yes"
6668 else
6669   echo "$ac_err" >&5
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -rf conftest*
6673   eval "ac_cv_header_$ac_safe=no"
6674 fi
6675 rm -f conftest*
6676 fi
6677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6678   echo "$ac_t""yes" 1>&6
6679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6680   cat >> confdefs.h <<EOF
6681 #define $ac_tr_hdr 1
6682 EOF
6683  
6684 else
6685   echo "$ac_t""no" 1>&6
6686 fi
6687 done
6688
6689         
6690         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6691                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6692 echo "configure:6693: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6693 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   ac_save_LIBS="$LIBS"
6698 LIBS="-lssl -lcrypto $LIBS"
6699 cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char SSLeay_add_ssl_algorithms();
6706
6707 int main() {
6708 SSLeay_add_ssl_algorithms()
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=no"
6719 fi
6720 rm -f conftest*
6721 LIBS="$ac_save_LIBS"
6722
6723 fi
6724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726   have_ssleay=yes
6727                         need_rsaref=no
6728 else
6729   echo "$ac_t""no" 1>&6
6730 have_ssleay=no
6731 fi
6732
6733                         
6734                 if test $have_ssleay = no ; then
6735                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6736 echo "configure:6737: checking for SSL_library_init in -lssl" >&5
6737 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   ac_save_LIBS="$LIBS"
6742 LIBS="-lssl -lcrypto $LIBS"
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* Override any gcc2 internal prototype to avoid an error.  */
6747 /* We use char because int might match the return type of a gcc2
6748     builtin and then its argument prototype would still apply.  */
6749 char SSL_library_init();
6750
6751 int main() {
6752 SSL_library_init()
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=no"
6763 fi
6764 rm -f conftest*
6765 LIBS="$ac_save_LIBS"
6766
6767 fi
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770   have_ssleay=yes
6771                                 need_rsaref=no
6772 else
6773   echo "$ac_t""no" 1>&6
6774 have_ssleay=no
6775 fi
6776
6777                 fi
6778
6779                 if test $have_ssleay = no ; then
6780                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6781 echo "configure:6782: checking for ssl3_accept in -lssl" >&5
6782 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6783 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6784   echo $ac_n "(cached) $ac_c" 1>&6
6785 else
6786   ac_save_LIBS="$LIBS"
6787 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6788 cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char ssl3_accept();
6795
6796 int main() {
6797 ssl3_accept()
6798 ; return 0; }
6799 EOF
6800 if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6801   rm -rf conftest*
6802   eval "ac_cv_lib_$ac_lib_var=yes"
6803 else
6804   echo "configure: failed program was:" >&5
6805   cat conftest.$ac_ext >&5
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=no"
6808 fi
6809 rm -f conftest*
6810 LIBS="$ac_save_LIBS"
6811
6812 fi
6813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6814   echo "$ac_t""yes" 1>&6
6815   have_ssleay=yes
6816                                 need_rsaref=yes
6817 else
6818   echo "$ac_t""no" 1>&6
6819 have_ssleay=no
6820 fi
6821
6822                 fi
6823
6824                 if test $have_ssleay = yes ; then
6825                         ol_with_tls=found
6826                         ol_link_tls=yes
6827
6828                         cat >> confdefs.h <<\EOF
6829 #define HAVE_SSLEAY 1
6830 EOF
6831
6832
6833                         if test $need_rsaref = yes; then
6834                                 cat >> confdefs.h <<\EOF
6835 #define HAVE_RSAREF 1
6836 EOF
6837
6838
6839                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6840                         else
6841                                 TLS_LIBS="-lssl -lcrypto"
6842                         fi
6843                 fi
6844         fi
6845
6846 else
6847         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6848 fi
6849
6850 if test $ol_link_tls = yes ; then
6851         cat >> confdefs.h <<\EOF
6852 #define HAVE_TLS 1
6853 EOF
6854
6855
6856 elif test $ol_with_tls = auto ; then
6857         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6858         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6859
6860 elif test $ol_with_tls != no ; then
6861         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6862 fi
6863
6864 if test $ol_enable_lmpasswd != no; then
6865         if test $ol_link_tls != yes ; then
6866                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
6867         fi
6868
6869         cat >> confdefs.h <<\EOF
6870 #define SLAPD_LMHASH 1
6871 EOF
6872
6873 fi
6874
6875 for ac_func in \
6876         ctime_r                 \
6877         gethostbyname_r gethostbyaddr_r \
6878
6879 do
6880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6881 echo "configure:6882: checking for $ac_func" >&5
6882 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6883   echo $ac_n "(cached) $ac_c" 1>&6
6884 else
6885   cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* System header to define __stub macros and hopefully few prototypes,
6889     which can conflict with char $ac_func(); below.  */
6890 #include <assert.h>
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 /* We use char because int might match the return type of a gcc2
6893     builtin and then its argument prototype would still apply.  */
6894 char $ac_func();
6895 char (*f)();
6896
6897 int main() {
6898
6899 /* The GNU C library defines this for functions which it implements
6900     to always fail with ENOSYS.  Some functions are actually named
6901     something starting with __ and the normal name is an alias.  */
6902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6903 choke me
6904 #else
6905 f = $ac_func;
6906 #endif
6907
6908 ; return 0; }
6909 EOF
6910 if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6911   rm -rf conftest*
6912   eval "ac_cv_func_$ac_func=yes"
6913 else
6914   echo "configure: failed program was:" >&5
6915   cat conftest.$ac_ext >&5
6916   rm -rf conftest*
6917   eval "ac_cv_func_$ac_func=no"
6918 fi
6919 rm -f conftest*
6920 fi
6921
6922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6923   echo "$ac_t""yes" 1>&6
6924     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6925   cat >> confdefs.h <<EOF
6926 #define $ac_tr_func 1
6927 EOF
6928  
6929 else
6930   echo "$ac_t""no" 1>&6
6931 fi
6932 done
6933
6934
6935 if test "$ac_cv_func_ctime_r" = no ; then
6936         ol_cv_func_ctime_r_nargs=0
6937 else
6938         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6939 echo "configure:6940: checking number of arguments of ctime_r" >&5
6940 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943   cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946 #include <time.h>
6947 int main() {
6948 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6949 ; return 0; }
6950 EOF
6951 if { (eval echo configure:6952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6952   rm -rf conftest*
6953   ol_cv_func_ctime_r_nargs3=yes
6954 else
6955   echo "configure: failed program was:" >&5
6956   cat conftest.$ac_ext >&5
6957   rm -rf conftest*
6958   ol_cv_func_ctime_r_nargs3=no
6959 fi
6960 rm -f conftest*
6961
6962         cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965 #include <time.h>
6966 int main() {
6967 time_t ti; char *buffer; ctime_r(&ti,buffer);
6968 ; return 0; }
6969 EOF
6970 if { (eval echo configure:6971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6971   rm -rf conftest*
6972   ol_cv_func_ctime_r_nargs2=yes
6973 else
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -rf conftest*
6977   ol_cv_func_ctime_r_nargs2=no
6978 fi
6979 rm -f conftest*
6980
6981         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6982                 $ol_cv_func_ctime_r_nargs2 = no ; then
6983
6984                 ol_cv_func_ctime_r_nargs=3
6985
6986         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6987                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6988
6989                 ol_cv_func_ctime_r_nargs=2
6990
6991         else
6992                 ol_cv_func_ctime_r_nargs=0
6993         fi
6994   
6995 fi
6996
6997 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6998
6999   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
7000         cat >> confdefs.h <<EOF
7001 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
7002 EOF
7003
7004   fi
7005
7006 fi
7007
7008 if test "$ac_cv_func_gethostbyname_r" = yes ; then
7009         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
7010 echo "configure:7011: checking number of arguments of gethostbyname_r" >&5
7011 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
7012   echo $ac_n "(cached) $ac_c" 1>&6
7013 else
7014   cat > conftest.$ac_ext <<EOF
7015 #line 7016 "configure"
7016 #include "confdefs.h"
7017 #include <sys/types.h>
7018 #include <sys/socket.h>
7019 #include <netinet/in.h>
7020 #include <netdb.h>
7021 #define BUFSIZE (sizeof(struct hostent)+10)
7022 int main() {
7023 struct hostent hent; char buffer[BUFSIZE];
7024                 int bufsize=BUFSIZE;int h_errno;
7025                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
7026                         buffer, bufsize, &h_errno);
7027 ; return 0; }
7028 EOF
7029 if { (eval echo configure:7030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7030   rm -rf conftest*
7031   ol_cv_func_gethostbyname_r_nargs5=yes
7032 else
7033   echo "configure: failed program was:" >&5
7034   cat conftest.$ac_ext >&5
7035   rm -rf conftest*
7036   ol_cv_func_gethostbyname_r_nargs5=no
7037 fi
7038 rm -f conftest*
7039
7040         cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043 #include <sys/types.h>
7044 #include <sys/socket.h>
7045 #include <netinet/in.h>
7046 #include <netdb.h>
7047 #define BUFSIZE (sizeof(struct hostent)+10)
7048 int main() {
7049 struct hostent hent;struct hostent *rhent;
7050                 char buffer[BUFSIZE];
7051                 int bufsize=BUFSIZE;int h_errno;
7052                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
7053                         &rhent, &h_errno);
7054 ; return 0; }
7055 EOF
7056 if { (eval echo configure:7057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7057   rm -rf conftest*
7058   ol_cv_func_gethostbyname_r_nargs6=yes
7059 else
7060   echo "configure: failed program was:" >&5
7061   cat conftest.$ac_ext >&5
7062   rm -rf conftest*
7063   ol_cv_func_gethostbyname_r_nargs6=no
7064 fi
7065 rm -f conftest*
7066
7067         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
7068                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
7069
7070                 ol_cv_func_gethostbyname_r_nargs=5
7071
7072         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
7073                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
7074
7075                 ol_cv_func_gethostbyname_r_nargs=6
7076
7077         else
7078                 ol_cv_func_gethostbyname_r_nargs=0
7079         fi
7080   
7081 fi
7082
7083 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
7084   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
7085         cat >> confdefs.h <<EOF
7086 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
7087 EOF
7088
7089   fi
7090
7091 else
7092         ol_cv_func_gethostbyname_r_nargs=0
7093 fi
7094  
7095 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
7096         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
7097 echo "configure:7098: checking number of arguments of gethostbyaddr_r" >&5
7098 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
7099   echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101   cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 #include <sys/types.h>
7105 #include <sys/socket.h>
7106 #include <netinet/in.h>
7107 #include <netdb.h>
7108 #define BUFSIZE (sizeof(struct hostent)+10)
7109 int main() {
7110 struct hostent hent; char buffer[BUFSIZE]; 
7111             struct in_addr add;
7112             size_t alen=sizeof(struct in_addr);
7113             int bufsize=BUFSIZE;int h_errno;
7114                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7115                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
7116 ; return 0; }
7117 EOF
7118 if { (eval echo configure:7119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7119   rm -rf conftest*
7120   ol_cv_func_gethostbyaddr_r_nargs7=yes
7121 else
7122   echo "configure: failed program was:" >&5
7123   cat conftest.$ac_ext >&5
7124   rm -rf conftest*
7125   ol_cv_func_gethostbyaddr_r_nargs7=no
7126 fi
7127 rm -f conftest*
7128
7129         cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132 #include <sys/types.h>
7133 #include <sys/socket.h>
7134 #include <netinet/in.h>
7135 #include <netdb.h>
7136 #define BUFSIZE (sizeof(struct hostent)+10)
7137 int main() {
7138 struct hostent hent;
7139                 struct hostent *rhent; char buffer[BUFSIZE]; 
7140                 struct in_addr add;
7141                 size_t alen=sizeof(struct in_addr);
7142                 int bufsize=BUFSIZE;int h_errno;
7143                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
7144                         alen, AF_INET, &hent, buffer, bufsize, 
7145                         &rhent, &h_errno);
7146 ; return 0; }
7147 EOF
7148 if { (eval echo configure:7149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7149   rm -rf conftest*
7150   ol_cv_func_gethostbyaddr_r_nargs8=yes
7151 else
7152   echo "configure: failed program was:" >&5
7153   cat conftest.$ac_ext >&5
7154   rm -rf conftest*
7155   ol_cv_func_gethostbyaddr_r_nargs8=no
7156 fi
7157 rm -f conftest*
7158
7159         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
7160                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
7161
7162                 ol_cv_func_gethostbyaddr_r_nargs=7
7163
7164         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
7165                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
7166
7167                 ol_cv_func_gethostbyaddr_r_nargs=8
7168
7169         else
7170                 ol_cv_func_gethostbyaddr_r_nargs=0
7171         fi
7172   
7173 fi
7174
7175 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7176   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7177     cat >> confdefs.h <<EOF
7178 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7179 EOF
7180
7181   fi
7182
7183 else
7184         ol_cv_func_gethostbyaddr_r_nargs=0
7185 fi
7186
7187 if test "$ac_cv_func_ctime_r" = yes \
7188         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7189         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7190         -a "$ac_cv_func_gethostbyname_r" = yes \
7191         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7192         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7193         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7194         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7195         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7196         ; then
7197  
7198         cat >> confdefs.h <<\EOF
7199 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7200 EOF
7201
7202 fi
7203
7204 ol_link_threads=no
7205
7206 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7207         -o $ol_with_threads = nt ; then
7208
7209         
7210         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7211 echo "configure:7212: checking for _beginthread" >&5
7212 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7213   echo $ac_n "(cached) $ac_c" 1>&6
7214 else
7215   cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218 /* System header to define __stub macros and hopefully few prototypes,
7219     which can conflict with char _beginthread(); below.  */
7220 #include <assert.h>
7221 /* Override any gcc2 internal prototype to avoid an error.  */
7222 /* We use char because int might match the return type of a gcc2
7223     builtin and then its argument prototype would still apply.  */
7224 char _beginthread();
7225 char (*f)();
7226
7227 int main() {
7228
7229 /* The GNU C library defines this for functions which it implements
7230     to always fail with ENOSYS.  Some functions are actually named
7231     something starting with __ and the normal name is an alias.  */
7232 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7233 choke me
7234 #else
7235 f = _beginthread;
7236 #endif
7237
7238 ; return 0; }
7239 EOF
7240 if { (eval echo configure:7241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7241   rm -rf conftest*
7242   eval "ac_cv_func__beginthread=yes"
7243 else
7244   echo "configure: failed program was:" >&5
7245   cat conftest.$ac_ext >&5
7246   rm -rf conftest*
7247   eval "ac_cv_func__beginthread=no"
7248 fi
7249 rm -f conftest*
7250 fi
7251
7252 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7253   echo "$ac_t""yes" 1>&6
7254   :
7255 else
7256   echo "$ac_t""no" 1>&6
7257 fi
7258
7259
7260         if test $ac_cv_func__beginthread = yes ; then
7261                 cat >> confdefs.h <<\EOF
7262 #define HAVE_NT_THREADS 1
7263 EOF
7264
7265         fi
7266
7267
7268         if test "$ol_cv_nt_threads" = yes ; then
7269         ol_link_threads=nt
7270         ol_with_threads=found
7271         ol_with_yielding_select=yes
7272
7273                 cat >> confdefs.h <<\EOF
7274 #define HAVE_NT_SERVICE_MANAGER 1
7275 EOF
7276
7277                 cat >> confdefs.h <<\EOF
7278 #define HAVE_NT_EVENT_LOG 1
7279 EOF
7280
7281         fi
7282
7283         if test $ol_with_threads = nt ; then
7284                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7285         fi
7286 fi
7287
7288 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7289         -o $ol_with_threads = posix ; then
7290
7291         for ac_hdr in pthread.h
7292 do
7293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7294 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7295 echo "configure:7296: checking for $ac_hdr" >&5
7296 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7297   echo $ac_n "(cached) $ac_c" 1>&6
7298 else
7299   cat > conftest.$ac_ext <<EOF
7300 #line 7301 "configure"
7301 #include "confdefs.h"
7302 #include <$ac_hdr>
7303 EOF
7304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7305 { (eval echo configure:7306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7307 if test -z "$ac_err"; then
7308   rm -rf conftest*
7309   eval "ac_cv_header_$ac_safe=yes"
7310 else
7311   echo "$ac_err" >&5
7312   echo "configure: failed program was:" >&5
7313   cat conftest.$ac_ext >&5
7314   rm -rf conftest*
7315   eval "ac_cv_header_$ac_safe=no"
7316 fi
7317 rm -f conftest*
7318 fi
7319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7320   echo "$ac_t""yes" 1>&6
7321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7322   cat >> confdefs.h <<EOF
7323 #define $ac_tr_hdr 1
7324 EOF
7325  
7326 else
7327   echo "$ac_t""no" 1>&6
7328 fi
7329 done
7330
7331
7332         if test $ac_cv_header_pthread_h = yes ; then
7333                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7334 echo "configure:7335: checking POSIX thread version" >&5
7335 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7336   echo $ac_n "(cached) $ac_c" 1>&6
7337 else
7338   
7339         cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342
7343 #               include <pthread.h>
7344                 /* this check could be improved */
7345 #               ifdef PTHREAD_ONCE_INIT
7346                         pthread_version_final;
7347 #               endif
7348         
7349 EOF
7350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7351   egrep "pthread_version_final" >/dev/null 2>&1; then
7352   rm -rf conftest*
7353   ol_pthread_final=yes
7354 else
7355   rm -rf conftest*
7356   ol_pthread_final=no
7357 fi
7358 rm -f conftest*
7359
7360
7361         cat > conftest.$ac_ext <<EOF
7362 #line 7363 "configure"
7363 #include "confdefs.h"
7364
7365 #               include <pthread.h>
7366                 /* this check could be improved */
7367 #               ifdef pthread_once_init
7368                         pthread_version_draft4;
7369 #               endif
7370         
7371 EOF
7372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7373   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7374   rm -rf conftest*
7375   ol_pthread_draft4=yes
7376 else
7377   rm -rf conftest*
7378   ol_pthread_draft4=no
7379 fi
7380 rm -f conftest*
7381
7382
7383         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7384                 ol_cv_pthread_version=final
7385         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7386                 ol_cv_pthread_version=draft4
7387         else
7388                 ol_cv_pthread_version=unknown
7389         fi
7390
7391 fi
7392
7393 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7394
7395
7396                 if test $ol_cv_pthread_version = final ; then
7397                         cat >> confdefs.h <<\EOF
7398 #define HAVE_PTHREADS_FINAL 1
7399 EOF
7400
7401                 elif test $ol_cv_pthread_version = draft4 ; then
7402                         cat >> confdefs.h <<\EOF
7403 #define HAVE_PTHREADS_D4 1
7404 EOF
7405
7406                 else
7407                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7408                 fi
7409
7410                 # consider threads found
7411                 ol_with_threads=found
7412
7413                 
7414         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7415 echo "configure:7416: checking for LinuxThreads pthread.h" >&5
7416 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7417   echo $ac_n "(cached) $ac_c" 1>&6
7418 else
7419   cat > conftest.$ac_ext <<EOF
7420 #line 7421 "configure"
7421 #include "confdefs.h"
7422 #include <pthread.h>
7423 EOF
7424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7425   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7426   rm -rf conftest*
7427   ol_cv_header_linux_threads=yes
7428 else
7429   rm -rf conftest*
7430   ol_cv_header_linux_threads=no
7431 fi
7432 rm -f conftest*
7433
7434                 
7435 fi
7436
7437 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7438         if test $ol_cv_header_linux_threads = yes; then
7439                 cat >> confdefs.h <<\EOF
7440 #define HAVE_LINUX_THREADS 1
7441 EOF
7442
7443         fi
7444
7445                 
7446         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7447 echo "configure:7448: checking for GNU Pth pthread.h" >&5
7448 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7449   echo $ac_n "(cached) $ac_c" 1>&6
7450 else
7451   cat > conftest.$ac_ext <<EOF
7452 #line 7453 "configure"
7453 #include "confdefs.h"
7454 #include <pthread.h>
7455 #ifdef _POSIX_THREAD_IS_GNU_PTH
7456         __gnu_pth__;
7457 #endif
7458
7459 EOF
7460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7461   egrep "__gnu_pth__" >/dev/null 2>&1; then
7462   rm -rf conftest*
7463   ol_cv_header_gnu_pth_pthread_h=yes
7464 else
7465   rm -rf conftest*
7466   ol_cv_header_gnu_pth_pthread_h=no
7467 fi
7468 rm -f conftest*
7469
7470                 
7471 fi
7472
7473 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7474
7475
7476                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7477                         for ac_hdr in sched.h
7478 do
7479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7481 echo "configure:7482: checking for $ac_hdr" >&5
7482 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7483   echo $ac_n "(cached) $ac_c" 1>&6
7484 else
7485   cat > conftest.$ac_ext <<EOF
7486 #line 7487 "configure"
7487 #include "confdefs.h"
7488 #include <$ac_hdr>
7489 EOF
7490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7491 { (eval echo configure:7492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7493 if test -z "$ac_err"; then
7494   rm -rf conftest*
7495   eval "ac_cv_header_$ac_safe=yes"
7496 else
7497   echo "$ac_err" >&5
7498   echo "configure: failed program was:" >&5
7499   cat conftest.$ac_ext >&5
7500   rm -rf conftest*
7501   eval "ac_cv_header_$ac_safe=no"
7502 fi
7503 rm -f conftest*
7504 fi
7505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7506   echo "$ac_t""yes" 1>&6
7507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7508   cat >> confdefs.h <<EOF
7509 #define $ac_tr_hdr 1
7510 EOF
7511  
7512 else
7513   echo "$ac_t""no" 1>&6
7514 fi
7515 done
7516
7517                 fi
7518
7519                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7520                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7521 echo "configure:7522: checking for pthread_create in default libraries" >&5
7522 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7523   echo $ac_n "(cached) $ac_c" 1>&6
7524 else
7525   
7526                 if test "$cross_compiling" = yes; then
7527   cat > conftest.$ac_ext <<EOF
7528 #line 7529 "configure"
7529 #include "confdefs.h"
7530 /* pthread test headers */
7531 #include <pthread.h>
7532 #ifndef NULL
7533 #define NULL (void*)0
7534 #endif
7535
7536 static void *task(p)
7537         void *p;
7538 {
7539         return (void *) (p == NULL);
7540 }
7541
7542 int main() {
7543
7544         /* pthread test function */
7545         pthread_t t;
7546         int status;
7547 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7548         /* This system (e.g. AIX) defaults detached; must override */
7549         pthread_attr_t attr;
7550
7551         status = pthread_attr_init(&attr);
7552         if( status ) exit( status );
7553
7554         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7555         if( status ) exit( status );
7556
7557 #       define  ATTR    &attr
7558 #elif defined( HAVE_PTHREADS_D4 )
7559 #       define  ATTR    pthread_attr_default
7560 #else
7561 #       define  ATTR    NULL
7562 #endif
7563
7564         /* make sure pthread_create() isn't just a stub */
7565         status = pthread_create(&t, ATTR, task, NULL);
7566         if( status ) exit( status );
7567
7568         /* give the thread a chance to complete...
7569      * it should remain joinable and hence detachable
7570          */
7571         sleep( 1 );
7572
7573         /* make sure pthread_detach() isn't just a stub */
7574 #if HAVE_PTHREADS_D4
7575         status = pthread_detach( &t );
7576 #else
7577         status = pthread_detach( t );
7578 #endif
7579
7580 #ifdef HAVE_LINUX_THREADS
7581         pthread_kill_other_threads_np();
7582 #endif
7583
7584         exit( status );
7585
7586 ; return 0; }
7587 EOF
7588 if { (eval echo configure:7589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7589   rm -rf conftest*
7590   ol_cv_pthread_create=yes
7591 else
7592   echo "configure: failed program was:" >&5
7593   cat conftest.$ac_ext >&5
7594   rm -rf conftest*
7595   ol_cv_pthread_create=no
7596 fi
7597 rm -f conftest*
7598 else
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 /* pthread test headers */
7603 #include <pthread.h>
7604 #ifndef NULL
7605 #define NULL (void*)0
7606 #endif
7607
7608 static void *task(p)
7609         void *p;
7610 {
7611         return (void *) (p == NULL);
7612 }
7613
7614
7615 int main(argc, argv)
7616         int argc;
7617         char **argv;
7618 {
7619
7620         /* pthread test function */
7621         pthread_t t;
7622         int status;
7623 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7624         /* This system (e.g. AIX) defaults detached; must override */
7625         pthread_attr_t attr;
7626
7627         status = pthread_attr_init(&attr);
7628         if( status ) exit( status );
7629
7630         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7631         if( status ) exit( status );
7632
7633 #       define  ATTR    &attr
7634 #elif defined( HAVE_PTHREADS_D4 )
7635 #       define  ATTR    pthread_attr_default
7636 #else
7637 #       define  ATTR    NULL
7638 #endif
7639
7640         /* make sure pthread_create() isn't just a stub */
7641         status = pthread_create(&t, ATTR, task, NULL);
7642         if( status ) exit( status );
7643
7644         /* give the thread a chance to complete...
7645      * it should remain joinable and hence detachable
7646          */
7647         sleep( 1 );
7648
7649         /* make sure pthread_detach() isn't just a stub */
7650 #if HAVE_PTHREADS_D4
7651         status = pthread_detach( &t );
7652 #else
7653         status = pthread_detach( t );
7654 #endif
7655
7656 #ifdef HAVE_LINUX_THREADS
7657         pthread_kill_other_threads_np();
7658 #endif
7659
7660         exit( status );
7661
7662 }
7663
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7666 then
7667   ol_cv_pthread_create=yes
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -fr conftest*
7672   ol_cv_pthread_create=no
7673 fi
7674 rm -fr conftest*
7675 fi
7676
7677 fi
7678
7679 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7680
7681                 if test $ol_cv_pthread_create != no ; then
7682                         ol_link_threads=posix
7683                         ol_link_pthreads=""
7684                 fi
7685                 
7686                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7687 if test "$ol_link_threads" = no ; then
7688         # try -kthread
7689         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7690 echo "configure:7691: checking for pthread link with -kthread" >&5
7691 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7692   echo $ac_n "(cached) $ac_c" 1>&6
7693 else
7694   
7695                 # save the flags
7696                 ol_LIBS="$LIBS"
7697                 LIBS="-kthread $LIBS"
7698
7699                 if test "$cross_compiling" = yes; then
7700   cat > conftest.$ac_ext <<EOF
7701 #line 7702 "configure"
7702 #include "confdefs.h"
7703 /* pthread test headers */
7704 #include <pthread.h>
7705 #ifndef NULL
7706 #define NULL (void*)0
7707 #endif
7708
7709 static void *task(p)
7710         void *p;
7711 {
7712         return (void *) (p == NULL);
7713 }
7714
7715 int main() {
7716
7717         /* pthread test function */
7718         pthread_t t;
7719         int status;
7720 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7721         /* This system (e.g. AIX) defaults detached; must override */
7722         pthread_attr_t attr;
7723
7724         status = pthread_attr_init(&attr);
7725         if( status ) exit( status );
7726
7727         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7728         if( status ) exit( status );
7729
7730 #       define  ATTR    &attr
7731 #elif defined( HAVE_PTHREADS_D4 )
7732 #       define  ATTR    pthread_attr_default
7733 #else
7734 #       define  ATTR    NULL
7735 #endif
7736
7737         /* make sure pthread_create() isn't just a stub */
7738         status = pthread_create(&t, ATTR, task, NULL);
7739         if( status ) exit( status );
7740
7741         /* give the thread a chance to complete...
7742      * it should remain joinable and hence detachable
7743          */
7744         sleep( 1 );
7745
7746         /* make sure pthread_detach() isn't just a stub */
7747 #if HAVE_PTHREADS_D4
7748         status = pthread_detach( &t );
7749 #else
7750         status = pthread_detach( t );
7751 #endif
7752
7753 #ifdef HAVE_LINUX_THREADS
7754         pthread_kill_other_threads_np();
7755 #endif
7756
7757         exit( status );
7758
7759 ; return 0; }
7760 EOF
7761 if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7762   rm -rf conftest*
7763   ol_cv_pthread_kthread=yes
7764 else
7765   echo "configure: failed program was:" >&5
7766   cat conftest.$ac_ext >&5
7767   rm -rf conftest*
7768   ol_cv_pthread_kthread=no
7769 fi
7770 rm -f conftest*
7771 else
7772   cat > conftest.$ac_ext <<EOF
7773 #line 7774 "configure"
7774 #include "confdefs.h"
7775 /* pthread test headers */
7776 #include <pthread.h>
7777 #ifndef NULL
7778 #define NULL (void*)0
7779 #endif
7780
7781 static void *task(p)
7782         void *p;
7783 {
7784         return (void *) (p == NULL);
7785 }
7786
7787
7788 int main(argc, argv)
7789         int argc;
7790         char **argv;
7791 {
7792
7793         /* pthread test function */
7794         pthread_t t;
7795         int status;
7796 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7797         /* This system (e.g. AIX) defaults detached; must override */
7798         pthread_attr_t attr;
7799
7800         status = pthread_attr_init(&attr);
7801         if( status ) exit( status );
7802
7803         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7804         if( status ) exit( status );
7805
7806 #       define  ATTR    &attr
7807 #elif defined( HAVE_PTHREADS_D4 )
7808 #       define  ATTR    pthread_attr_default
7809 #else
7810 #       define  ATTR    NULL
7811 #endif
7812
7813         /* make sure pthread_create() isn't just a stub */
7814         status = pthread_create(&t, ATTR, task, NULL);
7815         if( status ) exit( status );
7816
7817         /* give the thread a chance to complete...
7818      * it should remain joinable and hence detachable
7819          */
7820         sleep( 1 );
7821
7822         /* make sure pthread_detach() isn't just a stub */
7823 #if HAVE_PTHREADS_D4
7824         status = pthread_detach( &t );
7825 #else
7826         status = pthread_detach( t );
7827 #endif
7828
7829 #ifdef HAVE_LINUX_THREADS
7830         pthread_kill_other_threads_np();
7831 #endif
7832
7833         exit( status );
7834
7835 }
7836
7837 EOF
7838 if { (eval echo configure:7839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7839 then
7840   ol_cv_pthread_kthread=yes
7841 else
7842   echo "configure: failed program was:" >&5
7843   cat conftest.$ac_ext >&5
7844   rm -fr conftest*
7845   ol_cv_pthread_kthread=no
7846 fi
7847 rm -fr conftest*
7848 fi
7849
7850
7851                 # restore the LIBS
7852                 LIBS="$ol_LIBS"
7853         
7854 fi
7855
7856 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7857
7858         if test $ol_cv_pthread_kthread = yes ; then
7859                 ol_link_pthreads="-kthread"
7860                 ol_link_threads=posix
7861         fi
7862 fi
7863
7864                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7865 if test "$ol_link_threads" = no ; then
7866         # try -pthread
7867         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7868 echo "configure:7869: checking for pthread link with -pthread" >&5
7869 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7870   echo $ac_n "(cached) $ac_c" 1>&6
7871 else
7872   
7873                 # save the flags
7874                 ol_LIBS="$LIBS"
7875                 LIBS="-pthread $LIBS"
7876
7877                 if test "$cross_compiling" = yes; then
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 /* pthread test headers */
7882 #include <pthread.h>
7883 #ifndef NULL
7884 #define NULL (void*)0
7885 #endif
7886
7887 static void *task(p)
7888         void *p;
7889 {
7890         return (void *) (p == NULL);
7891 }
7892
7893 int main() {
7894
7895         /* pthread test function */
7896         pthread_t t;
7897         int status;
7898 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7899         /* This system (e.g. AIX) defaults detached; must override */
7900         pthread_attr_t attr;
7901
7902         status = pthread_attr_init(&attr);
7903         if( status ) exit( status );
7904
7905         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7906         if( status ) exit( status );
7907
7908 #       define  ATTR    &attr
7909 #elif defined( HAVE_PTHREADS_D4 )
7910 #       define  ATTR    pthread_attr_default
7911 #else
7912 #       define  ATTR    NULL
7913 #endif
7914
7915         /* make sure pthread_create() isn't just a stub */
7916         status = pthread_create(&t, ATTR, task, NULL);
7917         if( status ) exit( status );
7918
7919         /* give the thread a chance to complete...
7920      * it should remain joinable and hence detachable
7921          */
7922         sleep( 1 );
7923
7924         /* make sure pthread_detach() isn't just a stub */
7925 #if HAVE_PTHREADS_D4
7926         status = pthread_detach( &t );
7927 #else
7928         status = pthread_detach( t );
7929 #endif
7930
7931 #ifdef HAVE_LINUX_THREADS
7932         pthread_kill_other_threads_np();
7933 #endif
7934
7935         exit( status );
7936
7937 ; return 0; }
7938 EOF
7939 if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7940   rm -rf conftest*
7941   ol_cv_pthread_pthread=yes
7942 else
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   ol_cv_pthread_pthread=no
7947 fi
7948 rm -f conftest*
7949 else
7950   cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 /* pthread test headers */
7954 #include <pthread.h>
7955 #ifndef NULL
7956 #define NULL (void*)0
7957 #endif
7958
7959 static void *task(p)
7960         void *p;
7961 {
7962         return (void *) (p == NULL);
7963 }
7964
7965
7966 int main(argc, argv)
7967         int argc;
7968         char **argv;
7969 {
7970
7971         /* pthread test function */
7972         pthread_t t;
7973         int status;
7974 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7975         /* This system (e.g. AIX) defaults detached; must override */
7976         pthread_attr_t attr;
7977
7978         status = pthread_attr_init(&attr);
7979         if( status ) exit( status );
7980
7981         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7982         if( status ) exit( status );
7983
7984 #       define  ATTR    &attr
7985 #elif defined( HAVE_PTHREADS_D4 )
7986 #       define  ATTR    pthread_attr_default
7987 #else
7988 #       define  ATTR    NULL
7989 #endif
7990
7991         /* make sure pthread_create() isn't just a stub */
7992         status = pthread_create(&t, ATTR, task, NULL);
7993         if( status ) exit( status );
7994
7995         /* give the thread a chance to complete...
7996      * it should remain joinable and hence detachable
7997          */
7998         sleep( 1 );
7999
8000         /* make sure pthread_detach() isn't just a stub */
8001 #if HAVE_PTHREADS_D4
8002         status = pthread_detach( &t );
8003 #else
8004         status = pthread_detach( t );
8005 #endif
8006
8007 #ifdef HAVE_LINUX_THREADS
8008         pthread_kill_other_threads_np();
8009 #endif
8010
8011         exit( status );
8012
8013 }
8014
8015 EOF
8016 if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8017 then
8018   ol_cv_pthread_pthread=yes
8019 else
8020   echo "configure: failed program was:" >&5
8021   cat conftest.$ac_ext >&5
8022   rm -fr conftest*
8023   ol_cv_pthread_pthread=no
8024 fi
8025 rm -fr conftest*
8026 fi
8027
8028
8029                 # restore the LIBS
8030                 LIBS="$ol_LIBS"
8031         
8032 fi
8033
8034 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
8035
8036         if test $ol_cv_pthread_pthread = yes ; then
8037                 ol_link_pthreads="-pthread"
8038                 ol_link_threads=posix
8039         fi
8040 fi
8041
8042                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
8043 if test "$ol_link_threads" = no ; then
8044         # try -pthreads
8045         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
8046 echo "configure:8047: checking for pthread link with -pthreads" >&5
8047 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
8048   echo $ac_n "(cached) $ac_c" 1>&6
8049 else
8050   
8051                 # save the flags
8052                 ol_LIBS="$LIBS"
8053                 LIBS="-pthreads $LIBS"
8054
8055                 if test "$cross_compiling" = yes; then
8056   cat > conftest.$ac_ext <<EOF
8057 #line 8058 "configure"
8058 #include "confdefs.h"
8059 /* pthread test headers */
8060 #include <pthread.h>
8061 #ifndef NULL
8062 #define NULL (void*)0
8063 #endif
8064
8065 static void *task(p)
8066         void *p;
8067 {
8068         return (void *) (p == NULL);
8069 }
8070
8071 int main() {
8072
8073         /* pthread test function */
8074         pthread_t t;
8075         int status;
8076 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8077         /* This system (e.g. AIX) defaults detached; must override */
8078         pthread_attr_t attr;
8079
8080         status = pthread_attr_init(&attr);
8081         if( status ) exit( status );
8082
8083         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8084         if( status ) exit( status );
8085
8086 #       define  ATTR    &attr
8087 #elif defined( HAVE_PTHREADS_D4 )
8088 #       define  ATTR    pthread_attr_default
8089 #else
8090 #       define  ATTR    NULL
8091 #endif
8092
8093         /* make sure pthread_create() isn't just a stub */
8094         status = pthread_create(&t, ATTR, task, NULL);
8095         if( status ) exit( status );
8096
8097         /* give the thread a chance to complete...
8098      * it should remain joinable and hence detachable
8099          */
8100         sleep( 1 );
8101
8102         /* make sure pthread_detach() isn't just a stub */
8103 #if HAVE_PTHREADS_D4
8104         status = pthread_detach( &t );
8105 #else
8106         status = pthread_detach( t );
8107 #endif
8108
8109 #ifdef HAVE_LINUX_THREADS
8110         pthread_kill_other_threads_np();
8111 #endif
8112
8113         exit( status );
8114
8115 ; return 0; }
8116 EOF
8117 if { (eval echo configure:8118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8118   rm -rf conftest*
8119   ol_cv_pthread_pthreads=yes
8120 else
8121   echo "configure: failed program was:" >&5
8122   cat conftest.$ac_ext >&5
8123   rm -rf conftest*
8124   ol_cv_pthread_pthreads=no
8125 fi
8126 rm -f conftest*
8127 else
8128   cat > conftest.$ac_ext <<EOF
8129 #line 8130 "configure"
8130 #include "confdefs.h"
8131 /* pthread test headers */
8132 #include <pthread.h>
8133 #ifndef NULL
8134 #define NULL (void*)0
8135 #endif
8136
8137 static void *task(p)
8138         void *p;
8139 {
8140         return (void *) (p == NULL);
8141 }
8142
8143
8144 int main(argc, argv)
8145         int argc;
8146         char **argv;
8147 {
8148
8149         /* pthread test function */
8150         pthread_t t;
8151         int status;
8152 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8153         /* This system (e.g. AIX) defaults detached; must override */
8154         pthread_attr_t attr;
8155
8156         status = pthread_attr_init(&attr);
8157         if( status ) exit( status );
8158
8159         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8160         if( status ) exit( status );
8161
8162 #       define  ATTR    &attr
8163 #elif defined( HAVE_PTHREADS_D4 )
8164 #       define  ATTR    pthread_attr_default
8165 #else
8166 #       define  ATTR    NULL
8167 #endif
8168
8169         /* make sure pthread_create() isn't just a stub */
8170         status = pthread_create(&t, ATTR, task, NULL);
8171         if( status ) exit( status );
8172
8173         /* give the thread a chance to complete...
8174      * it should remain joinable and hence detachable
8175          */
8176         sleep( 1 );
8177
8178         /* make sure pthread_detach() isn't just a stub */
8179 #if HAVE_PTHREADS_D4
8180         status = pthread_detach( &t );
8181 #else
8182         status = pthread_detach( t );
8183 #endif
8184
8185 #ifdef HAVE_LINUX_THREADS
8186         pthread_kill_other_threads_np();
8187 #endif
8188
8189         exit( status );
8190
8191 }
8192
8193 EOF
8194 if { (eval echo configure:8195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8195 then
8196   ol_cv_pthread_pthreads=yes
8197 else
8198   echo "configure: failed program was:" >&5
8199   cat conftest.$ac_ext >&5
8200   rm -fr conftest*
8201   ol_cv_pthread_pthreads=no
8202 fi
8203 rm -fr conftest*
8204 fi
8205
8206
8207                 # restore the LIBS
8208                 LIBS="$ol_LIBS"
8209         
8210 fi
8211
8212 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
8213
8214         if test $ol_cv_pthread_pthreads = yes ; then
8215                 ol_link_pthreads="-pthreads"
8216                 ol_link_threads=posix
8217         fi
8218 fi
8219
8220                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
8221 if test "$ol_link_threads" = no ; then
8222         # try -mthreads
8223         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
8224 echo "configure:8225: checking for pthread link with -mthreads" >&5
8225 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   
8229                 # save the flags
8230                 ol_LIBS="$LIBS"
8231                 LIBS="-mthreads $LIBS"
8232
8233                 if test "$cross_compiling" = yes; then
8234   cat > conftest.$ac_ext <<EOF
8235 #line 8236 "configure"
8236 #include "confdefs.h"
8237 /* pthread test headers */
8238 #include <pthread.h>
8239 #ifndef NULL
8240 #define NULL (void*)0
8241 #endif
8242
8243 static void *task(p)
8244         void *p;
8245 {
8246         return (void *) (p == NULL);
8247 }
8248
8249 int main() {
8250
8251         /* pthread test function */
8252         pthread_t t;
8253         int status;
8254 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8255         /* This system (e.g. AIX) defaults detached; must override */
8256         pthread_attr_t attr;
8257
8258         status = pthread_attr_init(&attr);
8259         if( status ) exit( status );
8260
8261         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8262         if( status ) exit( status );
8263
8264 #       define  ATTR    &attr
8265 #elif defined( HAVE_PTHREADS_D4 )
8266 #       define  ATTR    pthread_attr_default
8267 #else
8268 #       define  ATTR    NULL
8269 #endif
8270
8271         /* make sure pthread_create() isn't just a stub */
8272         status = pthread_create(&t, ATTR, task, NULL);
8273         if( status ) exit( status );
8274
8275         /* give the thread a chance to complete...
8276      * it should remain joinable and hence detachable
8277          */
8278         sleep( 1 );
8279
8280         /* make sure pthread_detach() isn't just a stub */
8281 #if HAVE_PTHREADS_D4
8282         status = pthread_detach( &t );
8283 #else
8284         status = pthread_detach( t );
8285 #endif
8286
8287 #ifdef HAVE_LINUX_THREADS
8288         pthread_kill_other_threads_np();
8289 #endif
8290
8291         exit( status );
8292
8293 ; return 0; }
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296   rm -rf conftest*
8297   ol_cv_pthread_mthreads=yes
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -rf conftest*
8302   ol_cv_pthread_mthreads=no
8303 fi
8304 rm -f conftest*
8305 else
8306   cat > conftest.$ac_ext <<EOF
8307 #line 8308 "configure"
8308 #include "confdefs.h"
8309 /* pthread test headers */
8310 #include <pthread.h>
8311 #ifndef NULL
8312 #define NULL (void*)0
8313 #endif
8314
8315 static void *task(p)
8316         void *p;
8317 {
8318         return (void *) (p == NULL);
8319 }
8320
8321
8322 int main(argc, argv)
8323         int argc;
8324         char **argv;
8325 {
8326
8327         /* pthread test function */
8328         pthread_t t;
8329         int status;
8330 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8331         /* This system (e.g. AIX) defaults detached; must override */
8332         pthread_attr_t attr;
8333
8334         status = pthread_attr_init(&attr);
8335         if( status ) exit( status );
8336
8337         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8338         if( status ) exit( status );
8339
8340 #       define  ATTR    &attr
8341 #elif defined( HAVE_PTHREADS_D4 )
8342 #       define  ATTR    pthread_attr_default
8343 #else
8344 #       define  ATTR    NULL
8345 #endif
8346
8347         /* make sure pthread_create() isn't just a stub */
8348         status = pthread_create(&t, ATTR, task, NULL);
8349         if( status ) exit( status );
8350
8351         /* give the thread a chance to complete...
8352      * it should remain joinable and hence detachable
8353          */
8354         sleep( 1 );
8355
8356         /* make sure pthread_detach() isn't just a stub */
8357 #if HAVE_PTHREADS_D4
8358         status = pthread_detach( &t );
8359 #else
8360         status = pthread_detach( t );
8361 #endif
8362
8363 #ifdef HAVE_LINUX_THREADS
8364         pthread_kill_other_threads_np();
8365 #endif
8366
8367         exit( status );
8368
8369 }
8370
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8373 then
8374   ol_cv_pthread_mthreads=yes
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -fr conftest*
8379   ol_cv_pthread_mthreads=no
8380 fi
8381 rm -fr conftest*
8382 fi
8383
8384
8385                 # restore the LIBS
8386                 LIBS="$ol_LIBS"
8387         
8388 fi
8389
8390 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8391
8392         if test $ol_cv_pthread_mthreads = yes ; then
8393                 ol_link_pthreads="-mthreads"
8394                 ol_link_threads=posix
8395         fi
8396 fi
8397
8398                 # Pthread try link: -thread (ol_cv_pthread_thread)
8399 if test "$ol_link_threads" = no ; then
8400         # try -thread
8401         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8402 echo "configure:8403: checking for pthread link with -thread" >&5
8403 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8404   echo $ac_n "(cached) $ac_c" 1>&6
8405 else
8406   
8407                 # save the flags
8408                 ol_LIBS="$LIBS"
8409                 LIBS="-thread $LIBS"
8410
8411                 if test "$cross_compiling" = yes; then
8412   cat > conftest.$ac_ext <<EOF
8413 #line 8414 "configure"
8414 #include "confdefs.h"
8415 /* pthread test headers */
8416 #include <pthread.h>
8417 #ifndef NULL
8418 #define NULL (void*)0
8419 #endif
8420
8421 static void *task(p)
8422         void *p;
8423 {
8424         return (void *) (p == NULL);
8425 }
8426
8427 int main() {
8428
8429         /* pthread test function */
8430         pthread_t t;
8431         int status;
8432 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8433         /* This system (e.g. AIX) defaults detached; must override */
8434         pthread_attr_t attr;
8435
8436         status = pthread_attr_init(&attr);
8437         if( status ) exit( status );
8438
8439         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8440         if( status ) exit( status );
8441
8442 #       define  ATTR    &attr
8443 #elif defined( HAVE_PTHREADS_D4 )
8444 #       define  ATTR    pthread_attr_default
8445 #else
8446 #       define  ATTR    NULL
8447 #endif
8448
8449         /* make sure pthread_create() isn't just a stub */
8450         status = pthread_create(&t, ATTR, task, NULL);
8451         if( status ) exit( status );
8452
8453         /* give the thread a chance to complete...
8454      * it should remain joinable and hence detachable
8455          */
8456         sleep( 1 );
8457
8458         /* make sure pthread_detach() isn't just a stub */
8459 #if HAVE_PTHREADS_D4
8460         status = pthread_detach( &t );
8461 #else
8462         status = pthread_detach( t );
8463 #endif
8464
8465 #ifdef HAVE_LINUX_THREADS
8466         pthread_kill_other_threads_np();
8467 #endif
8468
8469         exit( status );
8470
8471 ; return 0; }
8472 EOF
8473 if { (eval echo configure:8474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8474   rm -rf conftest*
8475   ol_cv_pthread_thread=yes
8476 else
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   ol_cv_pthread_thread=no
8481 fi
8482 rm -f conftest*
8483 else
8484   cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487 /* pthread test headers */
8488 #include <pthread.h>
8489 #ifndef NULL
8490 #define NULL (void*)0
8491 #endif
8492
8493 static void *task(p)
8494         void *p;
8495 {
8496         return (void *) (p == NULL);
8497 }
8498
8499
8500 int main(argc, argv)
8501         int argc;
8502         char **argv;
8503 {
8504
8505         /* pthread test function */
8506         pthread_t t;
8507         int status;
8508 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8509         /* This system (e.g. AIX) defaults detached; must override */
8510         pthread_attr_t attr;
8511
8512         status = pthread_attr_init(&attr);
8513         if( status ) exit( status );
8514
8515         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8516         if( status ) exit( status );
8517
8518 #       define  ATTR    &attr
8519 #elif defined( HAVE_PTHREADS_D4 )
8520 #       define  ATTR    pthread_attr_default
8521 #else
8522 #       define  ATTR    NULL
8523 #endif
8524
8525         /* make sure pthread_create() isn't just a stub */
8526         status = pthread_create(&t, ATTR, task, NULL);
8527         if( status ) exit( status );
8528
8529         /* give the thread a chance to complete...
8530      * it should remain joinable and hence detachable
8531          */
8532         sleep( 1 );
8533
8534         /* make sure pthread_detach() isn't just a stub */
8535 #if HAVE_PTHREADS_D4
8536         status = pthread_detach( &t );
8537 #else
8538         status = pthread_detach( t );
8539 #endif
8540
8541 #ifdef HAVE_LINUX_THREADS
8542         pthread_kill_other_threads_np();
8543 #endif
8544
8545         exit( status );
8546
8547 }
8548
8549 EOF
8550 if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8551 then
8552   ol_cv_pthread_thread=yes
8553 else
8554   echo "configure: failed program was:" >&5
8555   cat conftest.$ac_ext >&5
8556   rm -fr conftest*
8557   ol_cv_pthread_thread=no
8558 fi
8559 rm -fr conftest*
8560 fi
8561
8562
8563                 # restore the LIBS
8564                 LIBS="$ol_LIBS"
8565         
8566 fi
8567
8568 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8569
8570         if test $ol_cv_pthread_thread = yes ; then
8571                 ol_link_pthreads="-thread"
8572                 ol_link_threads=posix
8573         fi
8574 fi
8575
8576
8577                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8578 if test "$ol_link_threads" = no ; then
8579         # try -lpthread -lmach -lexc -lc_r
8580         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8581 echo "configure:8582: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8582 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8583   echo $ac_n "(cached) $ac_c" 1>&6
8584 else
8585   
8586                 # save the flags
8587                 ol_LIBS="$LIBS"
8588                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8589
8590                 if test "$cross_compiling" = yes; then
8591   cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* pthread test headers */
8595 #include <pthread.h>
8596 #ifndef NULL
8597 #define NULL (void*)0
8598 #endif
8599
8600 static void *task(p)
8601         void *p;
8602 {
8603         return (void *) (p == NULL);
8604 }
8605
8606 int main() {
8607
8608         /* pthread test function */
8609         pthread_t t;
8610         int status;
8611 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8612         /* This system (e.g. AIX) defaults detached; must override */
8613         pthread_attr_t attr;
8614
8615         status = pthread_attr_init(&attr);
8616         if( status ) exit( status );
8617
8618         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8619         if( status ) exit( status );
8620
8621 #       define  ATTR    &attr
8622 #elif defined( HAVE_PTHREADS_D4 )
8623 #       define  ATTR    pthread_attr_default
8624 #else
8625 #       define  ATTR    NULL
8626 #endif
8627
8628         /* make sure pthread_create() isn't just a stub */
8629         status = pthread_create(&t, ATTR, task, NULL);
8630         if( status ) exit( status );
8631
8632         /* give the thread a chance to complete...
8633      * it should remain joinable and hence detachable
8634          */
8635         sleep( 1 );
8636
8637         /* make sure pthread_detach() isn't just a stub */
8638 #if HAVE_PTHREADS_D4
8639         status = pthread_detach( &t );
8640 #else
8641         status = pthread_detach( t );
8642 #endif
8643
8644 #ifdef HAVE_LINUX_THREADS
8645         pthread_kill_other_threads_np();
8646 #endif
8647
8648         exit( status );
8649
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8653   rm -rf conftest*
8654   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8660 fi
8661 rm -f conftest*
8662 else
8663   cat > conftest.$ac_ext <<EOF
8664 #line 8665 "configure"
8665 #include "confdefs.h"
8666 /* pthread test headers */
8667 #include <pthread.h>
8668 #ifndef NULL
8669 #define NULL (void*)0
8670 #endif
8671
8672 static void *task(p)
8673         void *p;
8674 {
8675         return (void *) (p == NULL);
8676 }
8677
8678
8679 int main(argc, argv)
8680         int argc;
8681         char **argv;
8682 {
8683
8684         /* pthread test function */
8685         pthread_t t;
8686         int status;
8687 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8688         /* This system (e.g. AIX) defaults detached; must override */
8689         pthread_attr_t attr;
8690
8691         status = pthread_attr_init(&attr);
8692         if( status ) exit( status );
8693
8694         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8695         if( status ) exit( status );
8696
8697 #       define  ATTR    &attr
8698 #elif defined( HAVE_PTHREADS_D4 )
8699 #       define  ATTR    pthread_attr_default
8700 #else
8701 #       define  ATTR    NULL
8702 #endif
8703
8704         /* make sure pthread_create() isn't just a stub */
8705         status = pthread_create(&t, ATTR, task, NULL);
8706         if( status ) exit( status );
8707
8708         /* give the thread a chance to complete...
8709      * it should remain joinable and hence detachable
8710          */
8711         sleep( 1 );
8712
8713         /* make sure pthread_detach() isn't just a stub */
8714 #if HAVE_PTHREADS_D4
8715         status = pthread_detach( &t );
8716 #else
8717         status = pthread_detach( t );
8718 #endif
8719
8720 #ifdef HAVE_LINUX_THREADS
8721         pthread_kill_other_threads_np();
8722 #endif
8723
8724         exit( status );
8725
8726 }
8727
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8730 then
8731   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -fr conftest*
8736   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8737 fi
8738 rm -fr conftest*
8739 fi
8740
8741
8742                 # restore the LIBS
8743                 LIBS="$ol_LIBS"
8744         
8745 fi
8746
8747 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8748
8749         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8750                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8751                 ol_link_threads=posix
8752         fi
8753 fi
8754
8755                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8756 if test "$ol_link_threads" = no ; then
8757         # try -lpthread -lmach -lexc
8758         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8759 echo "configure:8760: checking for pthread link with -lpthread -lmach -lexc" >&5
8760 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8761   echo $ac_n "(cached) $ac_c" 1>&6
8762 else
8763   
8764                 # save the flags
8765                 ol_LIBS="$LIBS"
8766                 LIBS="-lpthread -lmach -lexc $LIBS"
8767
8768                 if test "$cross_compiling" = yes; then
8769   cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772 /* pthread test headers */
8773 #include <pthread.h>
8774 #ifndef NULL
8775 #define NULL (void*)0
8776 #endif
8777
8778 static void *task(p)
8779         void *p;
8780 {
8781         return (void *) (p == NULL);
8782 }
8783
8784 int main() {
8785
8786         /* pthread test function */
8787         pthread_t t;
8788         int status;
8789 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8790         /* This system (e.g. AIX) defaults detached; must override */
8791         pthread_attr_t attr;
8792
8793         status = pthread_attr_init(&attr);
8794         if( status ) exit( status );
8795
8796         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8797         if( status ) exit( status );
8798
8799 #       define  ATTR    &attr
8800 #elif defined( HAVE_PTHREADS_D4 )
8801 #       define  ATTR    pthread_attr_default
8802 #else
8803 #       define  ATTR    NULL
8804 #endif
8805
8806         /* make sure pthread_create() isn't just a stub */
8807         status = pthread_create(&t, ATTR, task, NULL);
8808         if( status ) exit( status );
8809
8810         /* give the thread a chance to complete...
8811      * it should remain joinable and hence detachable
8812          */
8813         sleep( 1 );
8814
8815         /* make sure pthread_detach() isn't just a stub */
8816 #if HAVE_PTHREADS_D4
8817         status = pthread_detach( &t );
8818 #else
8819         status = pthread_detach( t );
8820 #endif
8821
8822 #ifdef HAVE_LINUX_THREADS
8823         pthread_kill_other_threads_np();
8824 #endif
8825
8826         exit( status );
8827
8828 ; return 0; }
8829 EOF
8830 if { (eval echo configure:8831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8831   rm -rf conftest*
8832   ol_cv_pthread_lpthread_lmach_lexc=yes
8833 else
8834   echo "configure: failed program was:" >&5
8835   cat conftest.$ac_ext >&5
8836   rm -rf conftest*
8837   ol_cv_pthread_lpthread_lmach_lexc=no
8838 fi
8839 rm -f conftest*
8840 else
8841   cat > conftest.$ac_ext <<EOF
8842 #line 8843 "configure"
8843 #include "confdefs.h"
8844 /* pthread test headers */
8845 #include <pthread.h>
8846 #ifndef NULL
8847 #define NULL (void*)0
8848 #endif
8849
8850 static void *task(p)
8851         void *p;
8852 {
8853         return (void *) (p == NULL);
8854 }
8855
8856
8857 int main(argc, argv)
8858         int argc;
8859         char **argv;
8860 {
8861
8862         /* pthread test function */
8863         pthread_t t;
8864         int status;
8865 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8866         /* This system (e.g. AIX) defaults detached; must override */
8867         pthread_attr_t attr;
8868
8869         status = pthread_attr_init(&attr);
8870         if( status ) exit( status );
8871
8872         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8873         if( status ) exit( status );
8874
8875 #       define  ATTR    &attr
8876 #elif defined( HAVE_PTHREADS_D4 )
8877 #       define  ATTR    pthread_attr_default
8878 #else
8879 #       define  ATTR    NULL
8880 #endif
8881
8882         /* make sure pthread_create() isn't just a stub */
8883         status = pthread_create(&t, ATTR, task, NULL);
8884         if( status ) exit( status );
8885
8886         /* give the thread a chance to complete...
8887      * it should remain joinable and hence detachable
8888          */
8889         sleep( 1 );
8890
8891         /* make sure pthread_detach() isn't just a stub */
8892 #if HAVE_PTHREADS_D4
8893         status = pthread_detach( &t );
8894 #else
8895         status = pthread_detach( t );
8896 #endif
8897
8898 #ifdef HAVE_LINUX_THREADS
8899         pthread_kill_other_threads_np();
8900 #endif
8901
8902         exit( status );
8903
8904 }
8905
8906 EOF
8907 if { (eval echo configure:8908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8908 then
8909   ol_cv_pthread_lpthread_lmach_lexc=yes
8910 else
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -fr conftest*
8914   ol_cv_pthread_lpthread_lmach_lexc=no
8915 fi
8916 rm -fr conftest*
8917 fi
8918
8919
8920                 # restore the LIBS
8921                 LIBS="$ol_LIBS"
8922         
8923 fi
8924
8925 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8926
8927         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8928                 ol_link_pthreads="-lpthread -lmach -lexc"
8929                 ol_link_threads=posix
8930         fi
8931 fi
8932
8933
8934                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8935 if test "$ol_link_threads" = no ; then
8936         # try -lpthread -Wl,-woff,85
8937         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8938 echo "configure:8939: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8939 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8940   echo $ac_n "(cached) $ac_c" 1>&6
8941 else
8942   
8943                 # save the flags
8944                 ol_LIBS="$LIBS"
8945                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8946
8947                 if test "$cross_compiling" = yes; then
8948   cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8951 /* pthread test headers */
8952 #include <pthread.h>
8953 #ifndef NULL
8954 #define NULL (void*)0
8955 #endif
8956
8957 static void *task(p)
8958         void *p;
8959 {
8960         return (void *) (p == NULL);
8961 }
8962
8963 int main() {
8964
8965         /* pthread test function */
8966         pthread_t t;
8967         int status;
8968 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8969         /* This system (e.g. AIX) defaults detached; must override */
8970         pthread_attr_t attr;
8971
8972         status = pthread_attr_init(&attr);
8973         if( status ) exit( status );
8974
8975         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8976         if( status ) exit( status );
8977
8978 #       define  ATTR    &attr
8979 #elif defined( HAVE_PTHREADS_D4 )
8980 #       define  ATTR    pthread_attr_default
8981 #else
8982 #       define  ATTR    NULL
8983 #endif
8984
8985         /* make sure pthread_create() isn't just a stub */
8986         status = pthread_create(&t, ATTR, task, NULL);
8987         if( status ) exit( status );
8988
8989         /* give the thread a chance to complete...
8990      * it should remain joinable and hence detachable
8991          */
8992         sleep( 1 );
8993
8994         /* make sure pthread_detach() isn't just a stub */
8995 #if HAVE_PTHREADS_D4
8996         status = pthread_detach( &t );
8997 #else
8998         status = pthread_detach( t );
8999 #endif
9000
9001 #ifdef HAVE_LINUX_THREADS
9002         pthread_kill_other_threads_np();
9003 #endif
9004
9005         exit( status );
9006
9007 ; return 0; }
9008 EOF
9009 if { (eval echo configure:9010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9010   rm -rf conftest*
9011   ol_cv_pthread_lib_lpthread_woff=yes
9012 else
9013   echo "configure: failed program was:" >&5
9014   cat conftest.$ac_ext >&5
9015   rm -rf conftest*
9016   ol_cv_pthread_lib_lpthread_woff=no
9017 fi
9018 rm -f conftest*
9019 else
9020   cat > conftest.$ac_ext <<EOF
9021 #line 9022 "configure"
9022 #include "confdefs.h"
9023 /* pthread test headers */
9024 #include <pthread.h>
9025 #ifndef NULL
9026 #define NULL (void*)0
9027 #endif
9028
9029 static void *task(p)
9030         void *p;
9031 {
9032         return (void *) (p == NULL);
9033 }
9034
9035
9036 int main(argc, argv)
9037         int argc;
9038         char **argv;
9039 {
9040
9041         /* pthread test function */
9042         pthread_t t;
9043         int status;
9044 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9045         /* This system (e.g. AIX) defaults detached; must override */
9046         pthread_attr_t attr;
9047
9048         status = pthread_attr_init(&attr);
9049         if( status ) exit( status );
9050
9051         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9052         if( status ) exit( status );
9053
9054 #       define  ATTR    &attr
9055 #elif defined( HAVE_PTHREADS_D4 )
9056 #       define  ATTR    pthread_attr_default
9057 #else
9058 #       define  ATTR    NULL
9059 #endif
9060
9061         /* make sure pthread_create() isn't just a stub */
9062         status = pthread_create(&t, ATTR, task, NULL);
9063         if( status ) exit( status );
9064
9065         /* give the thread a chance to complete...
9066      * it should remain joinable and hence detachable
9067          */
9068         sleep( 1 );
9069
9070         /* make sure pthread_detach() isn't just a stub */
9071 #if HAVE_PTHREADS_D4
9072         status = pthread_detach( &t );
9073 #else
9074         status = pthread_detach( t );
9075 #endif
9076
9077 #ifdef HAVE_LINUX_THREADS
9078         pthread_kill_other_threads_np();
9079 #endif
9080
9081         exit( status );
9082
9083 }
9084
9085 EOF
9086 if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9087 then
9088   ol_cv_pthread_lib_lpthread_woff=yes
9089 else
9090   echo "configure: failed program was:" >&5
9091   cat conftest.$ac_ext >&5
9092   rm -fr conftest*
9093   ol_cv_pthread_lib_lpthread_woff=no
9094 fi
9095 rm -fr conftest*
9096 fi
9097
9098
9099                 # restore the LIBS
9100                 LIBS="$ol_LIBS"
9101         
9102 fi
9103
9104 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
9105
9106         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
9107                 ol_link_pthreads="-lpthread -Wl,-woff,85"
9108                 ol_link_threads=posix
9109         fi
9110 fi
9111
9112
9113                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
9114 if test "$ol_link_threads" = no ; then
9115         # try -lpthread
9116         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
9117 echo "configure:9118: checking for pthread link with -lpthread" >&5
9118 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
9119   echo $ac_n "(cached) $ac_c" 1>&6
9120 else
9121   
9122                 # save the flags
9123                 ol_LIBS="$LIBS"
9124                 LIBS="-lpthread $LIBS"
9125
9126                 if test "$cross_compiling" = yes; then
9127   cat > conftest.$ac_ext <<EOF
9128 #line 9129 "configure"
9129 #include "confdefs.h"
9130 /* pthread test headers */
9131 #include <pthread.h>
9132 #ifndef NULL
9133 #define NULL (void*)0
9134 #endif
9135
9136 static void *task(p)
9137         void *p;
9138 {
9139         return (void *) (p == NULL);
9140 }
9141
9142 int main() {
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 #elif defined( HAVE_PTHREADS_D4 )
9159 #       define  ATTR    pthread_attr_default
9160 #else
9161 #       define  ATTR    NULL
9162 #endif
9163
9164         /* make sure pthread_create() isn't just a stub */
9165         status = pthread_create(&t, ATTR, task, NULL);
9166         if( status ) exit( status );
9167
9168         /* give the thread a chance to complete...
9169      * it should remain joinable and hence detachable
9170          */
9171         sleep( 1 );
9172
9173         /* make sure pthread_detach() isn't just a stub */
9174 #if HAVE_PTHREADS_D4
9175         status = pthread_detach( &t );
9176 #else
9177         status = pthread_detach( t );
9178 #endif
9179
9180 #ifdef HAVE_LINUX_THREADS
9181         pthread_kill_other_threads_np();
9182 #endif
9183
9184         exit( status );
9185
9186 ; return 0; }
9187 EOF
9188 if { (eval echo configure:9189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9189   rm -rf conftest*
9190   ol_cv_pthread_lpthread=yes
9191 else
9192   echo "configure: failed program was:" >&5
9193   cat conftest.$ac_ext >&5
9194   rm -rf conftest*
9195   ol_cv_pthread_lpthread=no
9196 fi
9197 rm -f conftest*
9198 else
9199   cat > conftest.$ac_ext <<EOF
9200 #line 9201 "configure"
9201 #include "confdefs.h"
9202 /* pthread test headers */
9203 #include <pthread.h>
9204 #ifndef NULL
9205 #define NULL (void*)0
9206 #endif
9207
9208 static void *task(p)
9209         void *p;
9210 {
9211         return (void *) (p == NULL);
9212 }
9213
9214
9215 int main(argc, argv)
9216         int argc;
9217         char **argv;
9218 {
9219
9220         /* pthread test function */
9221         pthread_t t;
9222         int status;
9223 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9224         /* This system (e.g. AIX) defaults detached; must override */
9225         pthread_attr_t attr;
9226
9227         status = pthread_attr_init(&attr);
9228         if( status ) exit( status );
9229
9230         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9231         if( status ) exit( status );
9232
9233 #       define  ATTR    &attr
9234 #elif defined( HAVE_PTHREADS_D4 )
9235 #       define  ATTR    pthread_attr_default
9236 #else
9237 #       define  ATTR    NULL
9238 #endif
9239
9240         /* make sure pthread_create() isn't just a stub */
9241         status = pthread_create(&t, ATTR, task, NULL);
9242         if( status ) exit( status );
9243
9244         /* give the thread a chance to complete...
9245      * it should remain joinable and hence detachable
9246          */
9247         sleep( 1 );
9248
9249         /* make sure pthread_detach() isn't just a stub */
9250 #if HAVE_PTHREADS_D4
9251         status = pthread_detach( &t );
9252 #else
9253         status = pthread_detach( t );
9254 #endif
9255
9256 #ifdef HAVE_LINUX_THREADS
9257         pthread_kill_other_threads_np();
9258 #endif
9259
9260         exit( status );
9261
9262 }
9263
9264 EOF
9265 if { (eval echo configure:9266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9266 then
9267   ol_cv_pthread_lpthread=yes
9268 else
9269   echo "configure: failed program was:" >&5
9270   cat conftest.$ac_ext >&5
9271   rm -fr conftest*
9272   ol_cv_pthread_lpthread=no
9273 fi
9274 rm -fr conftest*
9275 fi
9276
9277
9278                 # restore the LIBS
9279                 LIBS="$ol_LIBS"
9280         
9281 fi
9282
9283 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
9284
9285         if test $ol_cv_pthread_lpthread = yes ; then
9286                 ol_link_pthreads="-lpthread"
9287                 ol_link_threads=posix
9288         fi
9289 fi
9290
9291                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
9292 if test "$ol_link_threads" = no ; then
9293         # try -lc_r
9294         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
9295 echo "configure:9296: checking for pthread link with -lc_r" >&5
9296 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
9297   echo $ac_n "(cached) $ac_c" 1>&6
9298 else
9299   
9300                 # save the flags
9301                 ol_LIBS="$LIBS"
9302                 LIBS="-lc_r $LIBS"
9303
9304                 if test "$cross_compiling" = yes; then
9305   cat > conftest.$ac_ext <<EOF
9306 #line 9307 "configure"
9307 #include "confdefs.h"
9308 /* pthread test headers */
9309 #include <pthread.h>
9310 #ifndef NULL
9311 #define NULL (void*)0
9312 #endif
9313
9314 static void *task(p)
9315         void *p;
9316 {
9317         return (void *) (p == NULL);
9318 }
9319
9320 int main() {
9321
9322         /* pthread test function */
9323         pthread_t t;
9324         int status;
9325 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9326         /* This system (e.g. AIX) defaults detached; must override */
9327         pthread_attr_t attr;
9328
9329         status = pthread_attr_init(&attr);
9330         if( status ) exit( status );
9331
9332         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9333         if( status ) exit( status );
9334
9335 #       define  ATTR    &attr
9336 #elif defined( HAVE_PTHREADS_D4 )
9337 #       define  ATTR    pthread_attr_default
9338 #else
9339 #       define  ATTR    NULL
9340 #endif
9341
9342         /* make sure pthread_create() isn't just a stub */
9343         status = pthread_create(&t, ATTR, task, NULL);
9344         if( status ) exit( status );
9345
9346         /* give the thread a chance to complete...
9347      * it should remain joinable and hence detachable
9348          */
9349         sleep( 1 );
9350
9351         /* make sure pthread_detach() isn't just a stub */
9352 #if HAVE_PTHREADS_D4
9353         status = pthread_detach( &t );
9354 #else
9355         status = pthread_detach( t );
9356 #endif
9357
9358 #ifdef HAVE_LINUX_THREADS
9359         pthread_kill_other_threads_np();
9360 #endif
9361
9362         exit( status );
9363
9364 ; return 0; }
9365 EOF
9366 if { (eval echo configure:9367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9367   rm -rf conftest*
9368   ol_cv_pthread_lc_r=yes
9369 else
9370   echo "configure: failed program was:" >&5
9371   cat conftest.$ac_ext >&5
9372   rm -rf conftest*
9373   ol_cv_pthread_lc_r=no
9374 fi
9375 rm -f conftest*
9376 else
9377   cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380 /* pthread test headers */
9381 #include <pthread.h>
9382 #ifndef NULL
9383 #define NULL (void*)0
9384 #endif
9385
9386 static void *task(p)
9387         void *p;
9388 {
9389         return (void *) (p == NULL);
9390 }
9391
9392
9393 int main(argc, argv)
9394         int argc;
9395         char **argv;
9396 {
9397
9398         /* pthread test function */
9399         pthread_t t;
9400         int status;
9401 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9402         /* This system (e.g. AIX) defaults detached; must override */
9403         pthread_attr_t attr;
9404
9405         status = pthread_attr_init(&attr);
9406         if( status ) exit( status );
9407
9408         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9409         if( status ) exit( status );
9410
9411 #       define  ATTR    &attr
9412 #elif defined( HAVE_PTHREADS_D4 )
9413 #       define  ATTR    pthread_attr_default
9414 #else
9415 #       define  ATTR    NULL
9416 #endif
9417
9418         /* make sure pthread_create() isn't just a stub */
9419         status = pthread_create(&t, ATTR, task, NULL);
9420         if( status ) exit( status );
9421
9422         /* give the thread a chance to complete...
9423      * it should remain joinable and hence detachable
9424          */
9425         sleep( 1 );
9426
9427         /* make sure pthread_detach() isn't just a stub */
9428 #if HAVE_PTHREADS_D4
9429         status = pthread_detach( &t );
9430 #else
9431         status = pthread_detach( t );
9432 #endif
9433
9434 #ifdef HAVE_LINUX_THREADS
9435         pthread_kill_other_threads_np();
9436 #endif
9437
9438         exit( status );
9439
9440 }
9441
9442 EOF
9443 if { (eval echo configure:9444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9444 then
9445   ol_cv_pthread_lc_r=yes
9446 else
9447   echo "configure: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   rm -fr conftest*
9450   ol_cv_pthread_lc_r=no
9451 fi
9452 rm -fr conftest*
9453 fi
9454
9455
9456                 # restore the LIBS
9457                 LIBS="$ol_LIBS"
9458         
9459 fi
9460
9461 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9462
9463         if test $ol_cv_pthread_lc_r = yes ; then
9464                 ol_link_pthreads="-lc_r"
9465                 ol_link_threads=posix
9466         fi
9467 fi
9468
9469
9470                 # Pthread try link: -threads (ol_cv_pthread_threads)
9471 if test "$ol_link_threads" = no ; then
9472         # try -threads
9473         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9474 echo "configure:9475: checking for pthread link with -threads" >&5
9475 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478   
9479                 # save the flags
9480                 ol_LIBS="$LIBS"
9481                 LIBS="-threads $LIBS"
9482
9483                 if test "$cross_compiling" = yes; then
9484   cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 /* pthread test headers */
9488 #include <pthread.h>
9489 #ifndef NULL
9490 #define NULL (void*)0
9491 #endif
9492
9493 static void *task(p)
9494         void *p;
9495 {
9496         return (void *) (p == NULL);
9497 }
9498
9499 int main() {
9500
9501         /* pthread test function */
9502         pthread_t t;
9503         int status;
9504 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9505         /* This system (e.g. AIX) defaults detached; must override */
9506         pthread_attr_t attr;
9507
9508         status = pthread_attr_init(&attr);
9509         if( status ) exit( status );
9510
9511         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9512         if( status ) exit( status );
9513
9514 #       define  ATTR    &attr
9515 #elif defined( HAVE_PTHREADS_D4 )
9516 #       define  ATTR    pthread_attr_default
9517 #else
9518 #       define  ATTR    NULL
9519 #endif
9520
9521         /* make sure pthread_create() isn't just a stub */
9522         status = pthread_create(&t, ATTR, task, NULL);
9523         if( status ) exit( status );
9524
9525         /* give the thread a chance to complete...
9526      * it should remain joinable and hence detachable
9527          */
9528         sleep( 1 );
9529
9530         /* make sure pthread_detach() isn't just a stub */
9531 #if HAVE_PTHREADS_D4
9532         status = pthread_detach( &t );
9533 #else
9534         status = pthread_detach( t );
9535 #endif
9536
9537 #ifdef HAVE_LINUX_THREADS
9538         pthread_kill_other_threads_np();
9539 #endif
9540
9541         exit( status );
9542
9543 ; return 0; }
9544 EOF
9545 if { (eval echo configure:9546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9546   rm -rf conftest*
9547   ol_cv_pthread_threads=yes
9548 else
9549   echo "configure: failed program was:" >&5
9550   cat conftest.$ac_ext >&5
9551   rm -rf conftest*
9552   ol_cv_pthread_threads=no
9553 fi
9554 rm -f conftest*
9555 else
9556   cat > conftest.$ac_ext <<EOF
9557 #line 9558 "configure"
9558 #include "confdefs.h"
9559 /* pthread test headers */
9560 #include <pthread.h>
9561 #ifndef NULL
9562 #define NULL (void*)0
9563 #endif
9564
9565 static void *task(p)
9566         void *p;
9567 {
9568         return (void *) (p == NULL);
9569 }
9570
9571
9572 int main(argc, argv)
9573         int argc;
9574         char **argv;
9575 {
9576
9577         /* pthread test function */
9578         pthread_t t;
9579         int status;
9580 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9581         /* This system (e.g. AIX) defaults detached; must override */
9582         pthread_attr_t attr;
9583
9584         status = pthread_attr_init(&attr);
9585         if( status ) exit( status );
9586
9587         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9588         if( status ) exit( status );
9589
9590 #       define  ATTR    &attr
9591 #elif defined( HAVE_PTHREADS_D4 )
9592 #       define  ATTR    pthread_attr_default
9593 #else
9594 #       define  ATTR    NULL
9595 #endif
9596
9597         /* make sure pthread_create() isn't just a stub */
9598         status = pthread_create(&t, ATTR, task, NULL);
9599         if( status ) exit( status );
9600
9601         /* give the thread a chance to complete...
9602      * it should remain joinable and hence detachable
9603          */
9604         sleep( 1 );
9605
9606         /* make sure pthread_detach() isn't just a stub */
9607 #if HAVE_PTHREADS_D4
9608         status = pthread_detach( &t );
9609 #else
9610         status = pthread_detach( t );
9611 #endif
9612
9613 #ifdef HAVE_LINUX_THREADS
9614         pthread_kill_other_threads_np();
9615 #endif
9616
9617         exit( status );
9618
9619 }
9620
9621 EOF
9622 if { (eval echo configure:9623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9623 then
9624   ol_cv_pthread_threads=yes
9625 else
9626   echo "configure: failed program was:" >&5
9627   cat conftest.$ac_ext >&5
9628   rm -fr conftest*
9629   ol_cv_pthread_threads=no
9630 fi
9631 rm -fr conftest*
9632 fi
9633
9634
9635                 # restore the LIBS
9636                 LIBS="$ol_LIBS"
9637         
9638 fi
9639
9640 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9641
9642         if test $ol_cv_pthread_threads = yes ; then
9643                 ol_link_pthreads="-threads"
9644                 ol_link_threads=posix
9645         fi
9646 fi
9647
9648
9649                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9650 if test "$ol_link_threads" = no ; then
9651         # try -lpthreads -lmach -lexc -lc_r
9652         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9653 echo "configure:9654: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9654 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9655   echo $ac_n "(cached) $ac_c" 1>&6
9656 else
9657   
9658                 # save the flags
9659                 ol_LIBS="$LIBS"
9660                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9661
9662                 if test "$cross_compiling" = yes; then
9663   cat > conftest.$ac_ext <<EOF
9664 #line 9665 "configure"
9665 #include "confdefs.h"
9666 /* pthread test headers */
9667 #include <pthread.h>
9668 #ifndef NULL
9669 #define NULL (void*)0
9670 #endif
9671
9672 static void *task(p)
9673         void *p;
9674 {
9675         return (void *) (p == NULL);
9676 }
9677
9678 int main() {
9679
9680         /* pthread test function */
9681         pthread_t t;
9682         int status;
9683 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9684         /* This system (e.g. AIX) defaults detached; must override */
9685         pthread_attr_t attr;
9686
9687         status = pthread_attr_init(&attr);
9688         if( status ) exit( status );
9689
9690         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9691         if( status ) exit( status );
9692
9693 #       define  ATTR    &attr
9694 #elif defined( HAVE_PTHREADS_D4 )
9695 #       define  ATTR    pthread_attr_default
9696 #else
9697 #       define  ATTR    NULL
9698 #endif
9699
9700         /* make sure pthread_create() isn't just a stub */
9701         status = pthread_create(&t, ATTR, task, NULL);
9702         if( status ) exit( status );
9703
9704         /* give the thread a chance to complete...
9705      * it should remain joinable and hence detachable
9706          */
9707         sleep( 1 );
9708
9709         /* make sure pthread_detach() isn't just a stub */
9710 #if HAVE_PTHREADS_D4
9711         status = pthread_detach( &t );
9712 #else
9713         status = pthread_detach( t );
9714 #endif
9715
9716 #ifdef HAVE_LINUX_THREADS
9717         pthread_kill_other_threads_np();
9718 #endif
9719
9720         exit( status );
9721
9722 ; return 0; }
9723 EOF
9724 if { (eval echo configure:9725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9725   rm -rf conftest*
9726   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9727 else
9728   echo "configure: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   rm -rf conftest*
9731   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9732 fi
9733 rm -f conftest*
9734 else
9735   cat > conftest.$ac_ext <<EOF
9736 #line 9737 "configure"
9737 #include "confdefs.h"
9738 /* pthread test headers */
9739 #include <pthread.h>
9740 #ifndef NULL
9741 #define NULL (void*)0
9742 #endif
9743
9744 static void *task(p)
9745         void *p;
9746 {
9747         return (void *) (p == NULL);
9748 }
9749
9750
9751 int main(argc, argv)
9752         int argc;
9753         char **argv;
9754 {
9755
9756         /* pthread test function */
9757         pthread_t t;
9758         int status;
9759 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9760         /* This system (e.g. AIX) defaults detached; must override */
9761         pthread_attr_t attr;
9762
9763         status = pthread_attr_init(&attr);
9764         if( status ) exit( status );
9765
9766         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9767         if( status ) exit( status );
9768
9769 #       define  ATTR    &attr
9770 #elif defined( HAVE_PTHREADS_D4 )
9771 #       define  ATTR    pthread_attr_default
9772 #else
9773 #       define  ATTR    NULL
9774 #endif
9775
9776         /* make sure pthread_create() isn't just a stub */
9777         status = pthread_create(&t, ATTR, task, NULL);
9778         if( status ) exit( status );
9779
9780         /* give the thread a chance to complete...
9781      * it should remain joinable and hence detachable
9782          */
9783         sleep( 1 );
9784
9785         /* make sure pthread_detach() isn't just a stub */
9786 #if HAVE_PTHREADS_D4
9787         status = pthread_detach( &t );
9788 #else
9789         status = pthread_detach( t );
9790 #endif
9791
9792 #ifdef HAVE_LINUX_THREADS
9793         pthread_kill_other_threads_np();
9794 #endif
9795
9796         exit( status );
9797
9798 }
9799
9800 EOF
9801 if { (eval echo configure:9802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9802 then
9803   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9804 else
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807   rm -fr conftest*
9808   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9809 fi
9810 rm -fr conftest*
9811 fi
9812
9813
9814                 # restore the LIBS
9815                 LIBS="$ol_LIBS"
9816         
9817 fi
9818
9819 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9820
9821         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9822                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9823                 ol_link_threads=posix
9824         fi
9825 fi
9826
9827                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9828 if test "$ol_link_threads" = no ; then
9829         # try -lpthreads -lmach -lexc
9830         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9831 echo "configure:9832: checking for pthread link with -lpthreads -lmach -lexc" >&5
9832 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9833   echo $ac_n "(cached) $ac_c" 1>&6
9834 else
9835   
9836                 # save the flags
9837                 ol_LIBS="$LIBS"
9838                 LIBS="-lpthreads -lmach -lexc $LIBS"
9839
9840                 if test "$cross_compiling" = yes; then
9841   cat > conftest.$ac_ext <<EOF
9842 #line 9843 "configure"
9843 #include "confdefs.h"
9844 /* pthread test headers */
9845 #include <pthread.h>
9846 #ifndef NULL
9847 #define NULL (void*)0
9848 #endif
9849
9850 static void *task(p)
9851         void *p;
9852 {
9853         return (void *) (p == NULL);
9854 }
9855
9856 int main() {
9857
9858         /* pthread test function */
9859         pthread_t t;
9860         int status;
9861 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9862         /* This system (e.g. AIX) defaults detached; must override */
9863         pthread_attr_t attr;
9864
9865         status = pthread_attr_init(&attr);
9866         if( status ) exit( status );
9867
9868         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9869         if( status ) exit( status );
9870
9871 #       define  ATTR    &attr
9872 #elif defined( HAVE_PTHREADS_D4 )
9873 #       define  ATTR    pthread_attr_default
9874 #else
9875 #       define  ATTR    NULL
9876 #endif
9877
9878         /* make sure pthread_create() isn't just a stub */
9879         status = pthread_create(&t, ATTR, task, NULL);
9880         if( status ) exit( status );
9881
9882         /* give the thread a chance to complete...
9883      * it should remain joinable and hence detachable
9884          */
9885         sleep( 1 );
9886
9887         /* make sure pthread_detach() isn't just a stub */
9888 #if HAVE_PTHREADS_D4
9889         status = pthread_detach( &t );
9890 #else
9891         status = pthread_detach( t );
9892 #endif
9893
9894 #ifdef HAVE_LINUX_THREADS
9895         pthread_kill_other_threads_np();
9896 #endif
9897
9898         exit( status );
9899
9900 ; return 0; }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9903   rm -rf conftest*
9904   ol_cv_pthread_lpthreads_lmach_lexc=yes
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908   rm -rf conftest*
9909   ol_cv_pthread_lpthreads_lmach_lexc=no
9910 fi
9911 rm -f conftest*
9912 else
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 /* pthread test headers */
9917 #include <pthread.h>
9918 #ifndef NULL
9919 #define NULL (void*)0
9920 #endif
9921
9922 static void *task(p)
9923         void *p;
9924 {
9925         return (void *) (p == NULL);
9926 }
9927
9928
9929 int main(argc, argv)
9930         int argc;
9931         char **argv;
9932 {
9933
9934         /* pthread test function */
9935         pthread_t t;
9936         int status;
9937 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9938         /* This system (e.g. AIX) defaults detached; must override */
9939         pthread_attr_t attr;
9940
9941         status = pthread_attr_init(&attr);
9942         if( status ) exit( status );
9943
9944         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9945         if( status ) exit( status );
9946
9947 #       define  ATTR    &attr
9948 #elif defined( HAVE_PTHREADS_D4 )
9949 #       define  ATTR    pthread_attr_default
9950 #else
9951 #       define  ATTR    NULL
9952 #endif
9953
9954         /* make sure pthread_create() isn't just a stub */
9955         status = pthread_create(&t, ATTR, task, NULL);
9956         if( status ) exit( status );
9957
9958         /* give the thread a chance to complete...
9959      * it should remain joinable and hence detachable
9960          */
9961         sleep( 1 );
9962
9963         /* make sure pthread_detach() isn't just a stub */
9964 #if HAVE_PTHREADS_D4
9965         status = pthread_detach( &t );
9966 #else
9967         status = pthread_detach( t );
9968 #endif
9969
9970 #ifdef HAVE_LINUX_THREADS
9971         pthread_kill_other_threads_np();
9972 #endif
9973
9974         exit( status );
9975
9976 }
9977
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9980 then
9981   ol_cv_pthread_lpthreads_lmach_lexc=yes
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -fr conftest*
9986   ol_cv_pthread_lpthreads_lmach_lexc=no
9987 fi
9988 rm -fr conftest*
9989 fi
9990
9991
9992                 # restore the LIBS
9993                 LIBS="$ol_LIBS"
9994         
9995 fi
9996
9997 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9998
9999         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
10000                 ol_link_pthreads="-lpthreads -lmach -lexc"
10001                 ol_link_threads=posix
10002         fi
10003 fi
10004
10005                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
10006 if test "$ol_link_threads" = no ; then
10007         # try -lpthreads -lexc
10008         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
10009 echo "configure:10010: checking for pthread link with -lpthreads -lexc" >&5
10010 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
10011   echo $ac_n "(cached) $ac_c" 1>&6
10012 else
10013   
10014                 # save the flags
10015                 ol_LIBS="$LIBS"
10016                 LIBS="-lpthreads -lexc $LIBS"
10017
10018                 if test "$cross_compiling" = yes; then
10019   cat > conftest.$ac_ext <<EOF
10020 #line 10021 "configure"
10021 #include "confdefs.h"
10022 /* pthread test headers */
10023 #include <pthread.h>
10024 #ifndef NULL
10025 #define NULL (void*)0
10026 #endif
10027
10028 static void *task(p)
10029         void *p;
10030 {
10031         return (void *) (p == NULL);
10032 }
10033
10034 int main() {
10035
10036         /* pthread test function */
10037         pthread_t t;
10038         int status;
10039 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10040         /* This system (e.g. AIX) defaults detached; must override */
10041         pthread_attr_t attr;
10042
10043         status = pthread_attr_init(&attr);
10044         if( status ) exit( status );
10045
10046         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10047         if( status ) exit( status );
10048
10049 #       define  ATTR    &attr
10050 #elif defined( HAVE_PTHREADS_D4 )
10051 #       define  ATTR    pthread_attr_default
10052 #else
10053 #       define  ATTR    NULL
10054 #endif
10055
10056         /* make sure pthread_create() isn't just a stub */
10057         status = pthread_create(&t, ATTR, task, NULL);
10058         if( status ) exit( status );
10059
10060         /* give the thread a chance to complete...
10061      * it should remain joinable and hence detachable
10062          */
10063         sleep( 1 );
10064
10065         /* make sure pthread_detach() isn't just a stub */
10066 #if HAVE_PTHREADS_D4
10067         status = pthread_detach( &t );
10068 #else
10069         status = pthread_detach( t );
10070 #endif
10071
10072 #ifdef HAVE_LINUX_THREADS
10073         pthread_kill_other_threads_np();
10074 #endif
10075
10076         exit( status );
10077
10078 ; return 0; }
10079 EOF
10080 if { (eval echo configure:10081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10081   rm -rf conftest*
10082   ol_cv_pthread_lpthreads_lexc=yes
10083 else
10084   echo "configure: failed program was:" >&5
10085   cat conftest.$ac_ext >&5
10086   rm -rf conftest*
10087   ol_cv_pthread_lpthreads_lexc=no
10088 fi
10089 rm -f conftest*
10090 else
10091   cat > conftest.$ac_ext <<EOF
10092 #line 10093 "configure"
10093 #include "confdefs.h"
10094 /* pthread test headers */
10095 #include <pthread.h>
10096 #ifndef NULL
10097 #define NULL (void*)0
10098 #endif
10099
10100 static void *task(p)
10101         void *p;
10102 {
10103         return (void *) (p == NULL);
10104 }
10105
10106
10107 int main(argc, argv)
10108         int argc;
10109         char **argv;
10110 {
10111
10112         /* pthread test function */
10113         pthread_t t;
10114         int status;
10115 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10116         /* This system (e.g. AIX) defaults detached; must override */
10117         pthread_attr_t attr;
10118
10119         status = pthread_attr_init(&attr);
10120         if( status ) exit( status );
10121
10122         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10123         if( status ) exit( status );
10124
10125 #       define  ATTR    &attr
10126 #elif defined( HAVE_PTHREADS_D4 )
10127 #       define  ATTR    pthread_attr_default
10128 #else
10129 #       define  ATTR    NULL
10130 #endif
10131
10132         /* make sure pthread_create() isn't just a stub */
10133         status = pthread_create(&t, ATTR, task, NULL);
10134         if( status ) exit( status );
10135
10136         /* give the thread a chance to complete...
10137      * it should remain joinable and hence detachable
10138          */
10139         sleep( 1 );
10140
10141         /* make sure pthread_detach() isn't just a stub */
10142 #if HAVE_PTHREADS_D4
10143         status = pthread_detach( &t );
10144 #else
10145         status = pthread_detach( t );
10146 #endif
10147
10148 #ifdef HAVE_LINUX_THREADS
10149         pthread_kill_other_threads_np();
10150 #endif
10151
10152         exit( status );
10153
10154 }
10155
10156 EOF
10157 if { (eval echo configure:10158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10158 then
10159   ol_cv_pthread_lpthreads_lexc=yes
10160 else
10161   echo "configure: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   rm -fr conftest*
10164   ol_cv_pthread_lpthreads_lexc=no
10165 fi
10166 rm -fr conftest*
10167 fi
10168
10169
10170                 # restore the LIBS
10171                 LIBS="$ol_LIBS"
10172         
10173 fi
10174
10175 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
10176
10177         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
10178                 ol_link_pthreads="-lpthreads -lexc"
10179                 ol_link_threads=posix
10180         fi
10181 fi
10182
10183
10184                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
10185 if test "$ol_link_threads" = no ; then
10186         # try -lpthreads
10187         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
10188 echo "configure:10189: checking for pthread link with -lpthreads" >&5
10189 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
10190   echo $ac_n "(cached) $ac_c" 1>&6
10191 else
10192   
10193                 # save the flags
10194                 ol_LIBS="$LIBS"
10195                 LIBS="-lpthreads $LIBS"
10196
10197                 if test "$cross_compiling" = yes; then
10198   cat > conftest.$ac_ext <<EOF
10199 #line 10200 "configure"
10200 #include "confdefs.h"
10201 /* pthread test headers */
10202 #include <pthread.h>
10203 #ifndef NULL
10204 #define NULL (void*)0
10205 #endif
10206
10207 static void *task(p)
10208         void *p;
10209 {
10210         return (void *) (p == NULL);
10211 }
10212
10213 int main() {
10214
10215         /* pthread test function */
10216         pthread_t t;
10217         int status;
10218 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10219         /* This system (e.g. AIX) defaults detached; must override */
10220         pthread_attr_t attr;
10221
10222         status = pthread_attr_init(&attr);
10223         if( status ) exit( status );
10224
10225         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10226         if( status ) exit( status );
10227
10228 #       define  ATTR    &attr
10229 #elif defined( HAVE_PTHREADS_D4 )
10230 #       define  ATTR    pthread_attr_default
10231 #else
10232 #       define  ATTR    NULL
10233 #endif
10234
10235         /* make sure pthread_create() isn't just a stub */
10236         status = pthread_create(&t, ATTR, task, NULL);
10237         if( status ) exit( status );
10238
10239         /* give the thread a chance to complete...
10240      * it should remain joinable and hence detachable
10241          */
10242         sleep( 1 );
10243
10244         /* make sure pthread_detach() isn't just a stub */
10245 #if HAVE_PTHREADS_D4
10246         status = pthread_detach( &t );
10247 #else
10248         status = pthread_detach( t );
10249 #endif
10250
10251 #ifdef HAVE_LINUX_THREADS
10252         pthread_kill_other_threads_np();
10253 #endif
10254
10255         exit( status );
10256
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10260   rm -rf conftest*
10261   ol_cv_pthread_lib_lpthreads=yes
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   ol_cv_pthread_lib_lpthreads=no
10267 fi
10268 rm -f conftest*
10269 else
10270   cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 /* pthread test headers */
10274 #include <pthread.h>
10275 #ifndef NULL
10276 #define NULL (void*)0
10277 #endif
10278
10279 static void *task(p)
10280         void *p;
10281 {
10282         return (void *) (p == NULL);
10283 }
10284
10285
10286 int main(argc, argv)
10287         int argc;
10288         char **argv;
10289 {
10290
10291         /* pthread test function */
10292         pthread_t t;
10293         int status;
10294 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10295         /* This system (e.g. AIX) defaults detached; must override */
10296         pthread_attr_t attr;
10297
10298         status = pthread_attr_init(&attr);
10299         if( status ) exit( status );
10300
10301         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10302         if( status ) exit( status );
10303
10304 #       define  ATTR    &attr
10305 #elif defined( HAVE_PTHREADS_D4 )
10306 #       define  ATTR    pthread_attr_default
10307 #else
10308 #       define  ATTR    NULL
10309 #endif
10310
10311         /* make sure pthread_create() isn't just a stub */
10312         status = pthread_create(&t, ATTR, task, NULL);
10313         if( status ) exit( status );
10314
10315         /* give the thread a chance to complete...
10316      * it should remain joinable and hence detachable
10317          */
10318         sleep( 1 );
10319
10320         /* make sure pthread_detach() isn't just a stub */
10321 #if HAVE_PTHREADS_D4
10322         status = pthread_detach( &t );
10323 #else
10324         status = pthread_detach( t );
10325 #endif
10326
10327 #ifdef HAVE_LINUX_THREADS
10328         pthread_kill_other_threads_np();
10329 #endif
10330
10331         exit( status );
10332
10333 }
10334
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10337 then
10338   ol_cv_pthread_lib_lpthreads=yes
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -fr conftest*
10343   ol_cv_pthread_lib_lpthreads=no
10344 fi
10345 rm -fr conftest*
10346 fi
10347
10348
10349                 # restore the LIBS
10350                 LIBS="$ol_LIBS"
10351         
10352 fi
10353
10354 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
10355
10356         if test $ol_cv_pthread_lib_lpthreads = yes ; then
10357                 ol_link_pthreads="-lpthreads"
10358                 ol_link_threads=posix
10359         fi
10360 fi
10361
10362
10363                 if test $ol_link_threads != no ; then
10364                         cat >> confdefs.h <<\EOF
10365 #define HAVE_PTHREADS 1
10366 EOF
10367
10368
10369                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
10370
10371                                                 save_CPPFLAGS="$CPPFLAGS"
10372                         save_LIBS="$LIBS"
10373                         LIBS="$LTHREAD_LIBS $LIBS"
10374
10375                                                                                                 for ac_func in sched_yield pthread_yield
10376 do
10377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10378 echo "configure:10379: checking for $ac_func" >&5
10379 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10380   echo $ac_n "(cached) $ac_c" 1>&6
10381 else
10382   cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385 /* System header to define __stub macros and hopefully few prototypes,
10386     which can conflict with char $ac_func(); below.  */
10387 #include <assert.h>
10388 /* Override any gcc2 internal prototype to avoid an error.  */
10389 /* We use char because int might match the return type of a gcc2
10390     builtin and then its argument prototype would still apply.  */
10391 char $ac_func();
10392 char (*f)();
10393
10394 int main() {
10395
10396 /* The GNU C library defines this for functions which it implements
10397     to always fail with ENOSYS.  Some functions are actually named
10398     something starting with __ and the normal name is an alias.  */
10399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10400 choke me
10401 #else
10402 f = $ac_func;
10403 #endif
10404
10405 ; return 0; }
10406 EOF
10407 if { (eval echo configure:10408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10408   rm -rf conftest*
10409   eval "ac_cv_func_$ac_func=yes"
10410 else
10411   echo "configure: failed program was:" >&5
10412   cat conftest.$ac_ext >&5
10413   rm -rf conftest*
10414   eval "ac_cv_func_$ac_func=no"
10415 fi
10416 rm -f conftest*
10417 fi
10418
10419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10420   echo "$ac_t""yes" 1>&6
10421     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10422   cat >> confdefs.h <<EOF
10423 #define $ac_tr_func 1
10424 EOF
10425  
10426 else
10427   echo "$ac_t""no" 1>&6
10428 fi
10429 done
10430
10431
10432                         if test $ac_cv_func_sched_yield = no -a \
10433                                 $ac_cv_func_pthread_yield = no ; then
10434                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10435 echo "configure:10436: checking for sched_yield in -lrt" >&5
10436 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10437 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10438   echo $ac_n "(cached) $ac_c" 1>&6
10439 else
10440   ac_save_LIBS="$LIBS"
10441 LIBS="-lrt  $LIBS"
10442 cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445 /* Override any gcc2 internal prototype to avoid an error.  */
10446 /* We use char because int might match the return type of a gcc2
10447     builtin and then its argument prototype would still apply.  */
10448 char sched_yield();
10449
10450 int main() {
10451 sched_yield()
10452 ; return 0; }
10453 EOF
10454 if { (eval echo configure:10455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10455   rm -rf conftest*
10456   eval "ac_cv_lib_$ac_lib_var=yes"
10457 else
10458   echo "configure: failed program was:" >&5
10459   cat conftest.$ac_ext >&5
10460   rm -rf conftest*
10461   eval "ac_cv_lib_$ac_lib_var=no"
10462 fi
10463 rm -f conftest*
10464 LIBS="$ac_save_LIBS"
10465
10466 fi
10467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10468   echo "$ac_t""yes" 1>&6
10469   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10470                                         cat >> confdefs.h <<\EOF
10471 #define HAVE_SCHED_YIELD 1
10472 EOF
10473
10474                                         ac_cv_func_sched_yield=yes
10475 else
10476   echo "$ac_t""no" 1>&6
10477 ac_cv_func_sched_yield=no
10478 fi
10479
10480                         fi
10481                         if test $ac_cv_func_sched_yield = no -a \
10482                                 $ac_cv_func_pthread_yield = no ; then
10483                                                                                                 for ac_func in thr_yield
10484 do
10485 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10486 echo "configure:10487: checking for $ac_func" >&5
10487 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10488   echo $ac_n "(cached) $ac_c" 1>&6
10489 else
10490   cat > conftest.$ac_ext <<EOF
10491 #line 10492 "configure"
10492 #include "confdefs.h"
10493 /* System header to define __stub macros and hopefully few prototypes,
10494     which can conflict with char $ac_func(); below.  */
10495 #include <assert.h>
10496 /* Override any gcc2 internal prototype to avoid an error.  */
10497 /* We use char because int might match the return type of a gcc2
10498     builtin and then its argument prototype would still apply.  */
10499 char $ac_func();
10500 char (*f)();
10501
10502 int main() {
10503
10504 /* The GNU C library defines this for functions which it implements
10505     to always fail with ENOSYS.  Some functions are actually named
10506     something starting with __ and the normal name is an alias.  */
10507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10508 choke me
10509 #else
10510 f = $ac_func;
10511 #endif
10512
10513 ; return 0; }
10514 EOF
10515 if { (eval echo configure:10516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10516   rm -rf conftest*
10517   eval "ac_cv_func_$ac_func=yes"
10518 else
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -rf conftest*
10522   eval "ac_cv_func_$ac_func=no"
10523 fi
10524 rm -f conftest*
10525 fi
10526
10527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10528   echo "$ac_t""yes" 1>&6
10529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10530   cat >> confdefs.h <<EOF
10531 #define $ac_tr_func 1
10532 EOF
10533  
10534 else
10535   echo "$ac_t""no" 1>&6
10536 fi
10537 done
10538
10539                         fi
10540                         if test $ac_cv_func_sched_yield = no -a \
10541                                 $ac_cv_func_pthread_yield = no -a \
10542                                 "$ac_cv_func_thr_yield" = no ; then
10543                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10544                         fi
10545
10546                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10547 do
10548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10549 echo "configure:10550: checking for $ac_func" >&5
10550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10551   echo $ac_n "(cached) $ac_c" 1>&6
10552 else
10553   cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 /* System header to define __stub macros and hopefully few prototypes,
10557     which can conflict with char $ac_func(); below.  */
10558 #include <assert.h>
10559 /* Override any gcc2 internal prototype to avoid an error.  */
10560 /* We use char because int might match the return type of a gcc2
10561     builtin and then its argument prototype would still apply.  */
10562 char $ac_func();
10563 char (*f)();
10564
10565 int main() {
10566
10567 /* The GNU C library defines this for functions which it implements
10568     to always fail with ENOSYS.  Some functions are actually named
10569     something starting with __ and the normal name is an alias.  */
10570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10571 choke me
10572 #else
10573 f = $ac_func;
10574 #endif
10575
10576 ; return 0; }
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10579   rm -rf conftest*
10580   eval "ac_cv_func_$ac_func=yes"
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -rf conftest*
10585   eval "ac_cv_func_$ac_func=no"
10586 fi
10587 rm -f conftest*
10588 fi
10589
10590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10591   echo "$ac_t""yes" 1>&6
10592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10593   cat >> confdefs.h <<EOF
10594 #define $ac_tr_func 1
10595 EOF
10596  
10597 else
10598   echo "$ac_t""no" 1>&6
10599 fi
10600 done
10601
10602
10603                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10604 echo "configure:10605: checking for pthread_detach with <pthread.h>" >&5
10605 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   
10609                                                                 cat > conftest.$ac_ext <<EOF
10610 #line 10611 "configure"
10611 #include "confdefs.h"
10612
10613 #include <pthread.h>
10614 #ifndef NULL
10615 #define NULL (void*)0
10616 #endif
10617
10618 int main() {
10619 pthread_detach(NULL);
10620 ; return 0; }
10621 EOF
10622 if { (eval echo configure:10623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10623   rm -rf conftest*
10624   ol_cv_func_pthread_detach=yes
10625 else
10626   echo "configure: failed program was:" >&5
10627   cat conftest.$ac_ext >&5
10628   rm -rf conftest*
10629   ol_cv_func_pthread_detach=no
10630 fi
10631 rm -f conftest*
10632                         
10633 fi
10634
10635 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10636
10637                         if test $ol_cv_func_pthread_detach = no ; then
10638                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10639                         fi
10640
10641                         cat >> confdefs.h <<\EOF
10642 #define HAVE_PTHREAD_DETACH 1
10643 EOF
10644
10645
10646                                                 for ac_func in \
10647                                 pthread_setconcurrency \
10648                                 pthread_getconcurrency \
10649                                 thr_setconcurrency \
10650                                 thr_getconcurrency \
10651                         
10652 do
10653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10654 echo "configure:10655: checking for $ac_func" >&5
10655 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10656   echo $ac_n "(cached) $ac_c" 1>&6
10657 else
10658   cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661 /* System header to define __stub macros and hopefully few prototypes,
10662     which can conflict with char $ac_func(); below.  */
10663 #include <assert.h>
10664 /* Override any gcc2 internal prototype to avoid an error.  */
10665 /* We use char because int might match the return type of a gcc2
10666     builtin and then its argument prototype would still apply.  */
10667 char $ac_func();
10668 char (*f)();
10669
10670 int main() {
10671
10672 /* The GNU C library defines this for functions which it implements
10673     to always fail with ENOSYS.  Some functions are actually named
10674     something starting with __ and the normal name is an alias.  */
10675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10676 choke me
10677 #else
10678 f = $ac_func;
10679 #endif
10680
10681 ; return 0; }
10682 EOF
10683 if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10684   rm -rf conftest*
10685   eval "ac_cv_func_$ac_func=yes"
10686 else
10687   echo "configure: failed program was:" >&5
10688   cat conftest.$ac_ext >&5
10689   rm -rf conftest*
10690   eval "ac_cv_func_$ac_func=no"
10691 fi
10692 rm -f conftest*
10693 fi
10694
10695 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10696   echo "$ac_t""yes" 1>&6
10697     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10698   cat >> confdefs.h <<EOF
10699 #define $ac_tr_func 1
10700 EOF
10701  
10702 else
10703   echo "$ac_t""no" 1>&6
10704 fi
10705 done
10706
10707
10708                         
10709         for ac_func in pthread_kill_other_threads_np
10710 do
10711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10712 echo "configure:10713: checking for $ac_func" >&5
10713 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 /* System header to define __stub macros and hopefully few prototypes,
10720     which can conflict with char $ac_func(); below.  */
10721 #include <assert.h>
10722 /* Override any gcc2 internal prototype to avoid an error.  */
10723 /* We use char because int might match the return type of a gcc2
10724     builtin and then its argument prototype would still apply.  */
10725 char $ac_func();
10726 char (*f)();
10727
10728 int main() {
10729
10730 /* The GNU C library defines this for functions which it implements
10731     to always fail with ENOSYS.  Some functions are actually named
10732     something starting with __ and the normal name is an alias.  */
10733 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10734 choke me
10735 #else
10736 f = $ac_func;
10737 #endif
10738
10739 ; return 0; }
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10742   rm -rf conftest*
10743   eval "ac_cv_func_$ac_func=yes"
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   eval "ac_cv_func_$ac_func=no"
10749 fi
10750 rm -f conftest*
10751 fi
10752
10753 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10754   echo "$ac_t""yes" 1>&6
10755     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10756   cat >> confdefs.h <<EOF
10757 #define $ac_tr_func 1
10758 EOF
10759  
10760 else
10761   echo "$ac_t""no" 1>&6
10762 fi
10763 done
10764
10765         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10766 echo "configure:10767: checking for LinuxThreads implementation" >&5
10767 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10768   echo $ac_n "(cached) $ac_c" 1>&6
10769 else
10770   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10771 fi
10772
10773 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10774
10775                         
10776         
10777         
10778         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10779 echo "configure:10780: checking for LinuxThreads consistency" >&5
10780 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10781   echo $ac_n "(cached) $ac_c" 1>&6
10782 else
10783   
10784                 if test $ol_cv_header_linux_threads = yes -a \
10785                         $ol_cv_sys_linux_threads = yes; then
10786                         ol_cv_linux_threads=yes
10787                 elif test $ol_cv_header_linux_threads = no -a \
10788                         $ol_cv_sys_linux_threads = no; then
10789                         ol_cv_linux_threads=no
10790                 else
10791                         ol_cv_linux_threads=error
10792                 fi
10793         
10794 fi
10795
10796 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10797
10798
10799                         if test $ol_cv_linux_threads = error; then
10800                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10801                         fi
10802
10803                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10804 echo "configure:10805: checking if pthread_create() works" >&5
10805 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10806   echo $ac_n "(cached) $ac_c" 1>&6
10807 else
10808   
10809                         if test "$cross_compiling" = yes; then
10810                                 ol_cv_pthread_create_works=yes
10811 else
10812   cat > conftest.$ac_ext <<EOF
10813 #line 10814 "configure"
10814 #include "confdefs.h"
10815 /* pthread test headers */
10816 #include <pthread.h>
10817 #ifndef NULL
10818 #define NULL (void*)0
10819 #endif
10820
10821 static void *task(p)
10822         void *p;
10823 {
10824         return (void *) (p == NULL);
10825 }
10826
10827
10828 int main(argc, argv)
10829         int argc;
10830         char **argv;
10831 {
10832
10833         /* pthread test function */
10834         pthread_t t;
10835         int status;
10836 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10837         /* This system (e.g. AIX) defaults detached; must override */
10838         pthread_attr_t attr;
10839
10840         status = pthread_attr_init(&attr);
10841         if( status ) exit( status );
10842
10843         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10844         if( status ) exit( status );
10845
10846 #       define  ATTR    &attr
10847 #elif defined( HAVE_PTHREADS_D4 )
10848 #       define  ATTR    pthread_attr_default
10849 #else
10850 #       define  ATTR    NULL
10851 #endif
10852
10853         /* make sure pthread_create() isn't just a stub */
10854         status = pthread_create(&t, ATTR, task, NULL);
10855         if( status ) exit( status );
10856
10857         /* give the thread a chance to complete...
10858      * it should remain joinable and hence detachable
10859          */
10860         sleep( 1 );
10861
10862         /* make sure pthread_detach() isn't just a stub */
10863 #if HAVE_PTHREADS_D4
10864         status = pthread_detach( &t );
10865 #else
10866         status = pthread_detach( t );
10867 #endif
10868
10869 #ifdef HAVE_LINUX_THREADS
10870         pthread_kill_other_threads_np();
10871 #endif
10872
10873         exit( status );
10874
10875 }
10876
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10879 then
10880   ol_cv_pthread_create_works=yes
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -fr conftest*
10885   ol_cv_pthread_create_works=no
10886 fi
10887 rm -fr conftest*
10888 fi
10889
10890 fi
10891
10892 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10893
10894                         if test $ol_cv_pthread_create_works = no ; then
10895                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10896                         fi
10897
10898                                                 if test $ol_with_yielding_select = auto ; then
10899                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10900 echo "configure:10901: checking if select yields when using pthreads" >&5
10901 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   
10905                                 if test "$cross_compiling" = yes; then
10906   ol_cv_pthread_select_yields=cross
10907 else
10908   cat > conftest.$ac_ext <<EOF
10909 #line 10910 "configure"
10910 #include "confdefs.h"
10911
10912 #include <sys/types.h>
10913 #include <sys/time.h>
10914 #include <unistd.h>
10915 #include <pthread.h>
10916 #ifndef NULL
10917 #define NULL (void*) 0
10918 #endif
10919
10920 static int fildes[2];
10921
10922 static void *task(p)
10923         void *p;
10924 {
10925         int i;
10926         struct timeval tv;
10927
10928         fd_set rfds;
10929
10930         tv.tv_sec=10;
10931         tv.tv_usec=0;
10932
10933         FD_ZERO(&rfds);
10934         FD_SET(fildes[0], &rfds);
10935
10936         /* we're not interested in any fds */
10937         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10938
10939         if(i < 0) {
10940                 perror("select");
10941                 exit(10);
10942         }
10943
10944         exit(0); /* if we exit here, the select blocked the whole process */
10945 }
10946
10947 int main(argc, argv)
10948         int argc;
10949         char **argv;
10950 {
10951         pthread_t t;
10952
10953         /* create a pipe to select */
10954         if(pipe(&fildes[0])) {
10955                 perror("select");
10956                 exit(1);
10957         }
10958
10959 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10960         (void) pthread_setconcurrency(2);
10961 #else
10962 #ifdef HAVE_THR_SETCONCURRENCY
10963         /* Set Solaris LWP concurrency to 2 */
10964         thr_setconcurrency(2);
10965 #endif
10966 #endif
10967
10968 #if HAVE_PTHREADS_D4
10969         pthread_create(&t, pthread_attr_default, task, NULL);
10970 #else
10971         pthread_create(&t, NULL, task, NULL);
10972 #endif
10973
10974 #if HAVE_SCHED_YIELD
10975         sched_yield();  /* make sure task runs first */
10976 #else
10977 #ifdef HAVE_PTHREAD_YIELD
10978         pthread_yield();        /* make sure task runs first */
10979 #endif
10980 #endif
10981
10982         exit(2);
10983 }
10984 EOF
10985 if { (eval echo configure:10986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10986 then
10987   ol_cv_pthread_select_yields=no
10988 else
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -fr conftest*
10992   ol_cv_pthread_select_yields=yes
10993 fi
10994 rm -fr conftest*
10995 fi
10996
10997 fi
10998
10999 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
11000
11001                                 if test $ol_cv_pthread_select_yields = cross ; then
11002                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
11003                                 fi
11004
11005                                 if test $ol_cv_pthread_select_yields = yes ; then
11006                                         ol_with_yielding_select=yes
11007                                 fi
11008                         fi
11009
11010                                                 CPPFLAGS="$save_CPPFLAGS"
11011                         LIBS="$save_LIBS"
11012                 else
11013                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
11014                 fi
11015         fi
11016
11017         if test $ol_with_threads = posix ; then
11018                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
11019         fi
11020 fi
11021
11022 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11023         -o $ol_with_threads = mach ; then
11024
11025                 for ac_hdr in mach/cthreads.h
11026 do
11027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11029 echo "configure:11030: checking for $ac_hdr" >&5
11030 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11031   echo $ac_n "(cached) $ac_c" 1>&6
11032 else
11033   cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 #include <$ac_hdr>
11037 EOF
11038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11039 { (eval echo configure:11040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11041 if test -z "$ac_err"; then
11042   rm -rf conftest*
11043   eval "ac_cv_header_$ac_safe=yes"
11044 else
11045   echo "$ac_err" >&5
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   eval "ac_cv_header_$ac_safe=no"
11050 fi
11051 rm -f conftest*
11052 fi
11053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11056   cat >> confdefs.h <<EOF
11057 #define $ac_tr_hdr 1
11058 EOF
11059  
11060 else
11061   echo "$ac_t""no" 1>&6
11062 fi
11063 done
11064
11065         if test $ac_cv_header_mach_cthreads_h = yes ; then
11066                 ol_with_threads=found
11067
11068                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
11069 echo "configure:11070: checking for cthread_fork" >&5
11070 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 /* System header to define __stub macros and hopefully few prototypes,
11077     which can conflict with char cthread_fork(); below.  */
11078 #include <assert.h>
11079 /* Override any gcc2 internal prototype to avoid an error.  */
11080 /* We use char because int might match the return type of a gcc2
11081     builtin and then its argument prototype would still apply.  */
11082 char cthread_fork();
11083 char (*f)();
11084
11085 int main() {
11086
11087 /* The GNU C library defines this for functions which it implements
11088     to always fail with ENOSYS.  Some functions are actually named
11089     something starting with __ and the normal name is an alias.  */
11090 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
11091 choke me
11092 #else
11093 f = cthread_fork;
11094 #endif
11095
11096 ; return 0; }
11097 EOF
11098 if { (eval echo configure:11099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11099   rm -rf conftest*
11100   eval "ac_cv_func_cthread_fork=yes"
11101 else
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   eval "ac_cv_func_cthread_fork=no"
11106 fi
11107 rm -f conftest*
11108 fi
11109
11110 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
11111   echo "$ac_t""yes" 1>&6
11112   ol_link_threads=yes
11113 else
11114   echo "$ac_t""no" 1>&6
11115 fi
11116
11117
11118                 if test $ol_link_threads = no ; then
11119                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
11120 echo "configure:11121: checking for cthread_fork with -all_load" >&5
11121 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
11122   echo $ac_n "(cached) $ac_c" 1>&6
11123 else
11124   
11125                                                                 save_LIBS="$LIBS"
11126                                 LIBS="-all_load $LIBS"
11127                                 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 #include <mach/cthreads.h>
11131 int main() {
11132
11133                                         cthread_fork((void *)0, (void *)0);
11134                                         
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11138   rm -rf conftest*
11139   ol_cv_cthread_all_load=yes
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   ol_cv_cthread_all_load=no
11145 fi
11146 rm -f conftest*
11147                                                                 LIBS="$save_LIBS"
11148                         
11149 fi
11150
11151 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
11152
11153                         if test $ol_cv_cthread_all_load = yes ; then
11154                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
11155                                 ol_link_threads=mach
11156                         fi
11157                 fi
11158
11159                 if test $ol_link_threads != no ; then
11160                         : check for cthread specific functionality here
11161                         cat >> confdefs.h <<\EOF
11162 #define HAVE_MACH_CTHREADS 1
11163 EOF
11164
11165                 else
11166                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
11167                 fi
11168         fi
11169
11170         if test $ol_with_threads = mach ; then
11171                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
11172         fi
11173 fi
11174
11175 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11176         -o $ol_with_threads = pth ; then
11177
11178         for ac_hdr in pth.h
11179 do
11180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11182 echo "configure:11183: checking for $ac_hdr" >&5
11183 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11184   echo $ac_n "(cached) $ac_c" 1>&6
11185 else
11186   cat > conftest.$ac_ext <<EOF
11187 #line 11188 "configure"
11188 #include "confdefs.h"
11189 #include <$ac_hdr>
11190 EOF
11191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11192 { (eval echo configure:11193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11194 if test -z "$ac_err"; then
11195   rm -rf conftest*
11196   eval "ac_cv_header_$ac_safe=yes"
11197 else
11198   echo "$ac_err" >&5
11199   echo "configure: failed program was:" >&5
11200   cat conftest.$ac_ext >&5
11201   rm -rf conftest*
11202   eval "ac_cv_header_$ac_safe=no"
11203 fi
11204 rm -f conftest*
11205 fi
11206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11207   echo "$ac_t""yes" 1>&6
11208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11209   cat >> confdefs.h <<EOF
11210 #define $ac_tr_hdr 1
11211 EOF
11212  
11213 else
11214   echo "$ac_t""no" 1>&6
11215 fi
11216 done
11217
11218
11219         if test $ac_cv_header_pth_h = yes ; then
11220                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
11221 echo "configure:11222: checking for pth_version in -lpth" >&5
11222 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
11223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11224   echo $ac_n "(cached) $ac_c" 1>&6
11225 else
11226   ac_save_LIBS="$LIBS"
11227 LIBS="-lpth  $LIBS"
11228 cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 /* Override any gcc2 internal prototype to avoid an error.  */
11232 /* We use char because int might match the return type of a gcc2
11233     builtin and then its argument prototype would still apply.  */
11234 char pth_version();
11235
11236 int main() {
11237 pth_version()
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11241   rm -rf conftest*
11242   eval "ac_cv_lib_$ac_lib_var=yes"
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_lib_$ac_lib_var=no"
11248 fi
11249 rm -f conftest*
11250 LIBS="$ac_save_LIBS"
11251
11252 fi
11253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11254   echo "$ac_t""yes" 1>&6
11255   have_pth=yes
11256 else
11257   echo "$ac_t""no" 1>&6
11258 have_pth=no
11259 fi
11260
11261
11262                 if test $have_pth = yes ; then
11263                         cat >> confdefs.h <<\EOF
11264 #define HAVE_GNU_PTH 1
11265 EOF
11266
11267                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
11268                         ol_link_threads=pth
11269
11270                         if test $ol_with_yielding_select = auto ; then
11271                                 ol_with_yielding_select=yes
11272                         fi
11273                 fi
11274         fi
11275 fi
11276
11277 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11278         -o $ol_with_threads = lwp ; then
11279
11280                 for ac_hdr in thread.h synch.h
11281 do
11282 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11283 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11284 echo "configure:11285: checking for $ac_hdr" >&5
11285 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   cat > conftest.$ac_ext <<EOF
11289 #line 11290 "configure"
11290 #include "confdefs.h"
11291 #include <$ac_hdr>
11292 EOF
11293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11294 { (eval echo configure:11295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11296 if test -z "$ac_err"; then
11297   rm -rf conftest*
11298   eval "ac_cv_header_$ac_safe=yes"
11299 else
11300   echo "$ac_err" >&5
11301   echo "configure: failed program was:" >&5
11302   cat conftest.$ac_ext >&5
11303   rm -rf conftest*
11304   eval "ac_cv_header_$ac_safe=no"
11305 fi
11306 rm -f conftest*
11307 fi
11308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11309   echo "$ac_t""yes" 1>&6
11310     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11311   cat >> confdefs.h <<EOF
11312 #define $ac_tr_hdr 1
11313 EOF
11314  
11315 else
11316   echo "$ac_t""no" 1>&6
11317 fi
11318 done
11319
11320         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
11321                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
11322 echo "configure:11323: checking for thr_create in -lthread" >&5
11323 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
11324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   ac_save_LIBS="$LIBS"
11328 LIBS="-lthread  $LIBS"
11329 cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 /* Override any gcc2 internal prototype to avoid an error.  */
11333 /* We use char because int might match the return type of a gcc2
11334     builtin and then its argument prototype would still apply.  */
11335 char thr_create();
11336
11337 int main() {
11338 thr_create()
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11342   rm -rf conftest*
11343   eval "ac_cv_lib_$ac_lib_var=yes"
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   eval "ac_cv_lib_$ac_lib_var=no"
11349 fi
11350 rm -f conftest*
11351 LIBS="$ac_save_LIBS"
11352
11353 fi
11354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11355   echo "$ac_t""yes" 1>&6
11356   have_thr=yes
11357 else
11358   echo "$ac_t""no" 1>&6
11359 have_thr=no
11360 fi
11361
11362
11363                 if test $have_thr = yes ; then
11364                         cat >> confdefs.h <<\EOF
11365 #define HAVE_THR 1
11366 EOF
11367
11368                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
11369                         ol_link_threads=thr
11370
11371                         if test $ol_with_yielding_select = auto ; then
11372                                 ol_with_yielding_select=yes
11373                         fi
11374
11375                                                 for ac_func in \
11376                                 thr_setconcurrency \
11377                                 thr_getconcurrency \
11378                         
11379 do
11380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11381 echo "configure:11382: checking for $ac_func" >&5
11382 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 /* System header to define __stub macros and hopefully few prototypes,
11389     which can conflict with char $ac_func(); below.  */
11390 #include <assert.h>
11391 /* Override any gcc2 internal prototype to avoid an error.  */
11392 /* We use char because int might match the return type of a gcc2
11393     builtin and then its argument prototype would still apply.  */
11394 char $ac_func();
11395 char (*f)();
11396
11397 int main() {
11398
11399 /* The GNU C library defines this for functions which it implements
11400     to always fail with ENOSYS.  Some functions are actually named
11401     something starting with __ and the normal name is an alias.  */
11402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11403 choke me
11404 #else
11405 f = $ac_func;
11406 #endif
11407
11408 ; return 0; }
11409 EOF
11410 if { (eval echo configure:11411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11411   rm -rf conftest*
11412   eval "ac_cv_func_$ac_func=yes"
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   eval "ac_cv_func_$ac_func=no"
11418 fi
11419 rm -f conftest*
11420 fi
11421
11422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11423   echo "$ac_t""yes" 1>&6
11424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11425   cat >> confdefs.h <<EOF
11426 #define $ac_tr_func 1
11427 EOF
11428  
11429 else
11430   echo "$ac_t""no" 1>&6
11431 fi
11432 done
11433
11434                 fi
11435         fi
11436
11437                 for ac_hdr in lwp/lwp.h
11438 do
11439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11441 echo "configure:11442: checking for $ac_hdr" >&5
11442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11443   echo $ac_n "(cached) $ac_c" 1>&6
11444 else
11445   cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448 #include <$ac_hdr>
11449 EOF
11450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11451 { (eval echo configure:11452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11453 if test -z "$ac_err"; then
11454   rm -rf conftest*
11455   eval "ac_cv_header_$ac_safe=yes"
11456 else
11457   echo "$ac_err" >&5
11458   echo "configure: failed program was:" >&5
11459   cat conftest.$ac_ext >&5
11460   rm -rf conftest*
11461   eval "ac_cv_header_$ac_safe=no"
11462 fi
11463 rm -f conftest*
11464 fi
11465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11466   echo "$ac_t""yes" 1>&6
11467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11468   cat >> confdefs.h <<EOF
11469 #define $ac_tr_hdr 1
11470 EOF
11471  
11472 else
11473   echo "$ac_t""no" 1>&6
11474 fi
11475 done
11476
11477         if test $ac_cv_header_lwp_lwp_h = yes ; then
11478                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11479 echo "configure:11480: checking for lwp_create in -llwp" >&5
11480 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11481 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11482   echo $ac_n "(cached) $ac_c" 1>&6
11483 else
11484   ac_save_LIBS="$LIBS"
11485 LIBS="-llwp  $LIBS"
11486 cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 /* Override any gcc2 internal prototype to avoid an error.  */
11490 /* We use char because int might match the return type of a gcc2
11491     builtin and then its argument prototype would still apply.  */
11492 char lwp_create();
11493
11494 int main() {
11495 lwp_create()
11496 ; return 0; }
11497 EOF
11498 if { (eval echo configure:11499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11499   rm -rf conftest*
11500   eval "ac_cv_lib_$ac_lib_var=yes"
11501 else
11502   echo "configure: failed program was:" >&5
11503   cat conftest.$ac_ext >&5
11504   rm -rf conftest*
11505   eval "ac_cv_lib_$ac_lib_var=no"
11506 fi
11507 rm -f conftest*
11508 LIBS="$ac_save_LIBS"
11509
11510 fi
11511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11512   echo "$ac_t""yes" 1>&6
11513   have_lwp=yes
11514 else
11515   echo "$ac_t""no" 1>&6
11516 have_lwp=no
11517 fi
11518
11519
11520                 if test $have_lwp = yes ; then
11521                         cat >> confdefs.h <<\EOF
11522 #define HAVE_LWP 1
11523 EOF
11524
11525                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11526                         ol_link_threads=lwp
11527
11528                         if test $ol_with_yielding_select = auto ; then
11529                                 ol_with_yielding_select=no
11530                         fi
11531                 fi
11532         fi
11533 fi
11534
11535 if test $ol_with_yielding_select = yes ; then
11536         cat >> confdefs.h <<\EOF
11537 #define HAVE_YIELDING_SELECT 1
11538 EOF
11539
11540 fi
11541
11542 if test $ol_with_threads = manual ; then
11543                 ol_link_threads=yes
11544
11545         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11546
11547         for ac_hdr in pthread.h sched.h
11548 do
11549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11551 echo "configure:11552: checking for $ac_hdr" >&5
11552 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11553   echo $ac_n "(cached) $ac_c" 1>&6
11554 else
11555   cat > conftest.$ac_ext <<EOF
11556 #line 11557 "configure"
11557 #include "confdefs.h"
11558 #include <$ac_hdr>
11559 EOF
11560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11561 { (eval echo configure:11562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11563 if test -z "$ac_err"; then
11564   rm -rf conftest*
11565   eval "ac_cv_header_$ac_safe=yes"
11566 else
11567   echo "$ac_err" >&5
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   eval "ac_cv_header_$ac_safe=no"
11572 fi
11573 rm -f conftest*
11574 fi
11575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11576   echo "$ac_t""yes" 1>&6
11577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11578   cat >> confdefs.h <<EOF
11579 #define $ac_tr_hdr 1
11580 EOF
11581  
11582 else
11583   echo "$ac_t""no" 1>&6
11584 fi
11585 done
11586
11587         for ac_func in sched_yield pthread_yield
11588 do
11589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11590 echo "configure:11591: checking for $ac_func" >&5
11591 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 /* System header to define __stub macros and hopefully few prototypes,
11598     which can conflict with char $ac_func(); below.  */
11599 #include <assert.h>
11600 /* Override any gcc2 internal prototype to avoid an error.  */
11601 /* We use char because int might match the return type of a gcc2
11602     builtin and then its argument prototype would still apply.  */
11603 char $ac_func();
11604 char (*f)();
11605
11606 int main() {
11607
11608 /* The GNU C library defines this for functions which it implements
11609     to always fail with ENOSYS.  Some functions are actually named
11610     something starting with __ and the normal name is an alias.  */
11611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11612 choke me
11613 #else
11614 f = $ac_func;
11615 #endif
11616
11617 ; return 0; }
11618 EOF
11619 if { (eval echo configure:11620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11620   rm -rf conftest*
11621   eval "ac_cv_func_$ac_func=yes"
11622 else
11623   echo "configure: failed program was:" >&5
11624   cat conftest.$ac_ext >&5
11625   rm -rf conftest*
11626   eval "ac_cv_func_$ac_func=no"
11627 fi
11628 rm -f conftest*
11629 fi
11630
11631 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11632   echo "$ac_t""yes" 1>&6
11633     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11634   cat >> confdefs.h <<EOF
11635 #define $ac_tr_func 1
11636 EOF
11637  
11638 else
11639   echo "$ac_t""no" 1>&6
11640 fi
11641 done
11642
11643         
11644         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11645 echo "configure:11646: checking for LinuxThreads pthread.h" >&5
11646 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11647   echo $ac_n "(cached) $ac_c" 1>&6
11648 else
11649   cat > conftest.$ac_ext <<EOF
11650 #line 11651 "configure"
11651 #include "confdefs.h"
11652 #include <pthread.h>
11653 EOF
11654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11655   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11656   rm -rf conftest*
11657   ol_cv_header_linux_threads=yes
11658 else
11659   rm -rf conftest*
11660   ol_cv_header_linux_threads=no
11661 fi
11662 rm -f conftest*
11663
11664                 
11665 fi
11666
11667 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11668         if test $ol_cv_header_linux_threads = yes; then
11669                 cat >> confdefs.h <<\EOF
11670 #define HAVE_LINUX_THREADS 1
11671 EOF
11672
11673         fi
11674
11675
11676         for ac_hdr in mach/cthreads.h
11677 do
11678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11679 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11680 echo "configure:11681: checking for $ac_hdr" >&5
11681 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11682   echo $ac_n "(cached) $ac_c" 1>&6
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687 #include <$ac_hdr>
11688 EOF
11689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11690 { (eval echo configure:11691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11692 if test -z "$ac_err"; then
11693   rm -rf conftest*
11694   eval "ac_cv_header_$ac_safe=yes"
11695 else
11696   echo "$ac_err" >&5
11697   echo "configure: failed program was:" >&5
11698   cat conftest.$ac_ext >&5
11699   rm -rf conftest*
11700   eval "ac_cv_header_$ac_safe=no"
11701 fi
11702 rm -f conftest*
11703 fi
11704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11705   echo "$ac_t""yes" 1>&6
11706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11707   cat >> confdefs.h <<EOF
11708 #define $ac_tr_hdr 1
11709 EOF
11710  
11711 else
11712   echo "$ac_t""no" 1>&6
11713 fi
11714 done
11715
11716         for ac_hdr in lwp/lwp.h
11717 do
11718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11720 echo "configure:11721: checking for $ac_hdr" >&5
11721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11722   echo $ac_n "(cached) $ac_c" 1>&6
11723 else
11724   cat > conftest.$ac_ext <<EOF
11725 #line 11726 "configure"
11726 #include "confdefs.h"
11727 #include <$ac_hdr>
11728 EOF
11729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11730 { (eval echo configure:11731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11732 if test -z "$ac_err"; then
11733   rm -rf conftest*
11734   eval "ac_cv_header_$ac_safe=yes"
11735 else
11736   echo "$ac_err" >&5
11737   echo "configure: failed program was:" >&5
11738   cat conftest.$ac_ext >&5
11739   rm -rf conftest*
11740   eval "ac_cv_header_$ac_safe=no"
11741 fi
11742 rm -f conftest*
11743 fi
11744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11745   echo "$ac_t""yes" 1>&6
11746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11747   cat >> confdefs.h <<EOF
11748 #define $ac_tr_hdr 1
11749 EOF
11750  
11751 else
11752   echo "$ac_t""no" 1>&6
11753 fi
11754 done
11755
11756         for ac_hdr in thread.h synch.h
11757 do
11758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11760 echo "configure:11761: checking for $ac_hdr" >&5
11761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11762   echo $ac_n "(cached) $ac_c" 1>&6
11763 else
11764   cat > conftest.$ac_ext <<EOF
11765 #line 11766 "configure"
11766 #include "confdefs.h"
11767 #include <$ac_hdr>
11768 EOF
11769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11770 { (eval echo configure:11771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11772 if test -z "$ac_err"; then
11773   rm -rf conftest*
11774   eval "ac_cv_header_$ac_safe=yes"
11775 else
11776   echo "$ac_err" >&5
11777   echo "configure: failed program was:" >&5
11778   cat conftest.$ac_ext >&5
11779   rm -rf conftest*
11780   eval "ac_cv_header_$ac_safe=no"
11781 fi
11782 rm -f conftest*
11783 fi
11784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11785   echo "$ac_t""yes" 1>&6
11786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11787   cat >> confdefs.h <<EOF
11788 #define $ac_tr_hdr 1
11789 EOF
11790  
11791 else
11792   echo "$ac_t""no" 1>&6
11793 fi
11794 done
11795
11796 fi
11797
11798 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11799                         cat >> confdefs.h <<\EOF
11800 #define REENTRANT 1
11801 EOF
11802
11803         cat >> confdefs.h <<\EOF
11804 #define _REENTRANT 1
11805 EOF
11806
11807         cat >> confdefs.h <<\EOF
11808 #define THREAD_SAFE 1
11809 EOF
11810
11811         cat >> confdefs.h <<\EOF
11812 #define _THREAD_SAFE 1
11813 EOF
11814
11815         cat >> confdefs.h <<\EOF
11816 #define THREADSAFE 1
11817 EOF
11818
11819         cat >> confdefs.h <<\EOF
11820 #define _THREADSAFE 1
11821 EOF
11822
11823         cat >> confdefs.h <<\EOF
11824 #define _SGI_MP_SOURCE 1
11825 EOF
11826
11827
11828                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11829 echo "configure:11830: checking for thread specific errno" >&5
11830 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11831   echo $ac_n "(cached) $ac_c" 1>&6
11832 else
11833   
11834                 cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837 #include <errno.h>
11838 int main() {
11839 errno = 0;
11840 ; return 0; }
11841 EOF
11842 if { (eval echo configure:11843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11843   rm -rf conftest*
11844   ol_cv_errno_thread_specific=yes
11845 else
11846   echo "configure: failed program was:" >&5
11847   cat conftest.$ac_ext >&5
11848   rm -rf conftest*
11849   ol_cv_errno_thread_specific=no
11850 fi
11851 rm -f conftest*
11852         
11853 fi
11854
11855 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11856
11857                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11858 echo "configure:11859: checking for thread specific h_errno" >&5
11859 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11860   echo $ac_n "(cached) $ac_c" 1>&6
11861 else
11862   
11863                 cat > conftest.$ac_ext <<EOF
11864 #line 11865 "configure"
11865 #include "confdefs.h"
11866 #include <netdb.h>
11867 int main() {
11868 h_errno = 0;
11869 ; return 0; }
11870 EOF
11871 if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11872   rm -rf conftest*
11873   ol_cv_h_errno_thread_specific=yes
11874 else
11875   echo "configure: failed program was:" >&5
11876   cat conftest.$ac_ext >&5
11877   rm -rf conftest*
11878   ol_cv_h_errno_thread_specific=no
11879 fi
11880 rm -f conftest*
11881         
11882 fi
11883
11884 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11885
11886         if test $ol_cv_errno_thread_specific != yes \
11887                 -o $ol_cv_h_errno_thread_specific != yes ; then
11888                 LIBS="$LTHREAD_LIBS $LIBS"
11889                 LTHREAD_LIBS=""
11890         fi
11891
11892 fi  
11893
11894 if test $ol_link_threads = no ; then
11895         if test $ol_with_threads = yes ; then
11896                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11897         fi
11898
11899         if test $ol_with_threads = auto ; then
11900                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11901                 ol_with_threads=no
11902         fi
11903
11904         cat >> confdefs.h <<\EOF
11905 #define NO_THREADS 1
11906 EOF
11907
11908         LTHREAD_LIBS=""
11909 fi
11910
11911 if test $ol_link_threads != no ; then
11912         cat >> confdefs.h <<\EOF
11913 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11914 EOF
11915
11916 fi
11917
11918 ol_link_ldbm=no 
11919
11920 if test $ol_with_ldbm_api = auto \
11921         -o $ol_with_ldbm_api = berkeley \
11922         -o $ol_with_ldbm_api = bcompat ; then
11923
11924         if test $ol_with_ldbm_api = bcompat; then \
11925                 ol_cv_berkeley_db=no
11926 for ac_hdr in db_185.h db.h
11927 do
11928 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11929 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11930 echo "configure:11931: checking for $ac_hdr" >&5
11931 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11932   echo $ac_n "(cached) $ac_c" 1>&6
11933 else
11934   cat > conftest.$ac_ext <<EOF
11935 #line 11936 "configure"
11936 #include "confdefs.h"
11937 #include <$ac_hdr>
11938 EOF
11939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11940 { (eval echo configure:11941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11942 if test -z "$ac_err"; then
11943   rm -rf conftest*
11944   eval "ac_cv_header_$ac_safe=yes"
11945 else
11946   echo "$ac_err" >&5
11947   echo "configure: failed program was:" >&5
11948   cat conftest.$ac_ext >&5
11949   rm -rf conftest*
11950   eval "ac_cv_header_$ac_safe=no"
11951 fi
11952 rm -f conftest*
11953 fi
11954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11955   echo "$ac_t""yes" 1>&6
11956     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11957   cat >> confdefs.h <<EOF
11958 #define $ac_tr_hdr 1
11959 EOF
11960  
11961 else
11962   echo "$ac_t""no" 1>&6
11963 fi
11964 done
11965
11966 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11967         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11968 echo "configure:11969: checking if Berkeley DB header compatibility" >&5
11969 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11970   echo $ac_n "(cached) $ac_c" 1>&6
11971 else
11972   
11973                 cat > conftest.$ac_ext <<EOF
11974 #line 11975 "configure"
11975 #include "confdefs.h"
11976
11977 #if HAVE_DB_185_H
11978 #       include <db_185.h>
11979 #else
11980 #       include <db.h>
11981 #endif
11982
11983  /* this check could be improved */
11984 #ifndef DB_VERSION_MAJOR
11985 #       define DB_VERSION_MAJOR 1
11986 #endif
11987
11988 #if DB_VERSION_MAJOR == 1 
11989         __db_version_1
11990 #endif
11991
11992 EOF
11993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11994   egrep "__db_version_1" >/dev/null 2>&1; then
11995   rm -rf conftest*
11996   ol_cv_header_db1=yes
11997 else
11998   rm -rf conftest*
11999   ol_cv_header_db1=no
12000 fi
12001 rm -f conftest*
12002
12003 fi
12004
12005 echo "$ac_t""$ol_cv_header_db1" 1>&6
12006
12007         if test ol_cv_header_db1=yes ; then
12008                 ol_cv_lib_db=no
12009 if test $ol_cv_lib_db = no ; then
12010         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12011 echo "configure:12012: checking for Berkeley DB link (default)" >&5
12012 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   
12016         ol_DB_LIB=
12017         ol_LIBS=$LIBS
12018         LIBS="$ol_DB_LIB $LIBS"
12019
12020         cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023
12024 #ifdef HAVE_DB_185_H
12025 # include <db_185.h>
12026 #else
12027 # include <db.h>
12028 #endif
12029
12030 #ifndef DB_VERSION_MAJOR
12031 # define DB_VERSION_MAJOR 1
12032 #endif
12033
12034 #ifndef NULL
12035 #define NULL ((void*)0)
12036 #endif
12037
12038 int main() {
12039
12040 #if DB_VERSION_MAJOR > 2
12041         db_env_create( NULL, 0 );
12042 #elif DB_VERSION_MAJOR > 1
12043         db_appexit( NULL );
12044 #else
12045         (void) dbopen( NULL, 0, 0, 0, NULL);
12046 #endif
12047
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   ol_cv_db_none=yes
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   ol_cv_db_none=no
12058 fi
12059 rm -f conftest*
12060
12061         LIBS="$ol_LIBS"
12062
12063 fi
12064
12065 echo "$ac_t""$ol_cv_db_none" 1>&6
12066
12067         if test $ol_cv_db_none = yes ; then
12068                 ol_cv_lib_db=yes
12069         fi
12070 fi
12071
12072 if test $ol_cv_lib_db = no ; then
12073         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12074 echo "configure:12075: checking for Berkeley DB link (-ldb)" >&5
12075 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12076   echo $ac_n "(cached) $ac_c" 1>&6
12077 else
12078   
12079         ol_DB_LIB=-ldb
12080         ol_LIBS=$LIBS
12081         LIBS="$ol_DB_LIB $LIBS"
12082
12083         cat > conftest.$ac_ext <<EOF
12084 #line 12085 "configure"
12085 #include "confdefs.h"
12086
12087 #ifdef HAVE_DB_185_H
12088 # include <db_185.h>
12089 #else
12090 # include <db.h>
12091 #endif
12092
12093 #ifndef DB_VERSION_MAJOR
12094 # define DB_VERSION_MAJOR 1
12095 #endif
12096
12097 #ifndef NULL
12098 #define NULL ((void*)0)
12099 #endif
12100
12101 int main() {
12102
12103 #if DB_VERSION_MAJOR > 2
12104         db_env_create( NULL, 0 );
12105 #elif DB_VERSION_MAJOR > 1
12106         db_appexit( NULL );
12107 #else
12108         (void) dbopen( NULL, 0, 0, 0, NULL);
12109 #endif
12110
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   ol_cv_db_db=yes
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   ol_cv_db_db=no
12121 fi
12122 rm -f conftest*
12123
12124         LIBS="$ol_LIBS"
12125
12126 fi
12127
12128 echo "$ac_t""$ol_cv_db_db" 1>&6
12129
12130         if test $ol_cv_db_db = yes ; then
12131                 ol_cv_lib_db=-ldb
12132         fi
12133 fi
12134
12135 if test $ol_cv_lib_db = no ; then
12136         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12137 echo "configure:12138: checking for Berkeley DB link (-ldb3)" >&5
12138 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141   
12142         ol_DB_LIB=-ldb3
12143         ol_LIBS=$LIBS
12144         LIBS="$ol_DB_LIB $LIBS"
12145
12146         cat > conftest.$ac_ext <<EOF
12147 #line 12148 "configure"
12148 #include "confdefs.h"
12149
12150 #ifdef HAVE_DB_185_H
12151 # include <db_185.h>
12152 #else
12153 # include <db.h>
12154 #endif
12155
12156 #ifndef DB_VERSION_MAJOR
12157 # define DB_VERSION_MAJOR 1
12158 #endif
12159
12160 #ifndef NULL
12161 #define NULL ((void*)0)
12162 #endif
12163
12164 int main() {
12165
12166 #if DB_VERSION_MAJOR > 2
12167         db_env_create( NULL, 0 );
12168 #elif DB_VERSION_MAJOR > 1
12169         db_appexit( NULL );
12170 #else
12171         (void) dbopen( NULL, 0, 0, 0, NULL);
12172 #endif
12173
12174 ; return 0; }
12175 EOF
12176 if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12177   rm -rf conftest*
12178   ol_cv_db_db3=yes
12179 else
12180   echo "configure: failed program was:" >&5
12181   cat conftest.$ac_ext >&5
12182   rm -rf conftest*
12183   ol_cv_db_db3=no
12184 fi
12185 rm -f conftest*
12186
12187         LIBS="$ol_LIBS"
12188
12189 fi
12190
12191 echo "$ac_t""$ol_cv_db_db3" 1>&6
12192
12193         if test $ol_cv_db_db3 = yes ; then
12194                 ol_cv_lib_db=-ldb3
12195         fi
12196 fi
12197
12198 if test $ol_cv_lib_db = no ; then
12199         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12200 echo "configure:12201: checking for Berkeley DB link (-ldb2)" >&5
12201 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12202   echo $ac_n "(cached) $ac_c" 1>&6
12203 else
12204   
12205         ol_DB_LIB=-ldb2
12206         ol_LIBS=$LIBS
12207         LIBS="$ol_DB_LIB $LIBS"
12208
12209         cat > conftest.$ac_ext <<EOF
12210 #line 12211 "configure"
12211 #include "confdefs.h"
12212
12213 #ifdef HAVE_DB_185_H
12214 # include <db_185.h>
12215 #else
12216 # include <db.h>
12217 #endif
12218
12219 #ifndef DB_VERSION_MAJOR
12220 # define DB_VERSION_MAJOR 1
12221 #endif
12222
12223 #ifndef NULL
12224 #define NULL ((void*)0)
12225 #endif
12226
12227 int main() {
12228
12229 #if DB_VERSION_MAJOR > 2
12230         db_env_create( NULL, 0 );
12231 #elif DB_VERSION_MAJOR > 1
12232         db_appexit( NULL );
12233 #else
12234         (void) dbopen( NULL, 0, 0, 0, NULL);
12235 #endif
12236
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   ol_cv_db_db2=yes
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   ol_cv_db_db2=no
12247 fi
12248 rm -f conftest*
12249
12250         LIBS="$ol_LIBS"
12251
12252 fi
12253
12254 echo "$ac_t""$ol_cv_db_db2" 1>&6
12255
12256         if test $ol_cv_db_db2 = yes ; then
12257                 ol_cv_lib_db=-ldb2
12258         fi
12259 fi
12260
12261 if test $ol_cv_lib_db = no ; then
12262         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12263 echo "configure:12264: checking for Berkeley DB link (-ldb1)" >&5
12264 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12265   echo $ac_n "(cached) $ac_c" 1>&6
12266 else
12267   
12268         ol_DB_LIB=-ldb1
12269         ol_LIBS=$LIBS
12270         LIBS="$ol_DB_LIB $LIBS"
12271
12272         cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275
12276 #ifdef HAVE_DB_185_H
12277 # include <db_185.h>
12278 #else
12279 # include <db.h>
12280 #endif
12281
12282 #ifndef DB_VERSION_MAJOR
12283 # define DB_VERSION_MAJOR 1
12284 #endif
12285
12286 #ifndef NULL
12287 #define NULL ((void*)0)
12288 #endif
12289
12290 int main() {
12291
12292 #if DB_VERSION_MAJOR > 2
12293         db_env_create( NULL, 0 );
12294 #elif DB_VERSION_MAJOR > 1
12295         db_appexit( NULL );
12296 #else
12297         (void) dbopen( NULL, 0, 0, 0, NULL);
12298 #endif
12299
12300 ; return 0; }
12301 EOF
12302 if { (eval echo configure:12303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12303   rm -rf conftest*
12304   ol_cv_db_db1=yes
12305 else
12306   echo "configure: failed program was:" >&5
12307   cat conftest.$ac_ext >&5
12308   rm -rf conftest*
12309   ol_cv_db_db1=no
12310 fi
12311 rm -f conftest*
12312
12313         LIBS="$ol_LIBS"
12314
12315 fi
12316
12317 echo "$ac_t""$ol_cv_db_db1" 1>&6
12318
12319         if test $ol_cv_db_db1 = yes ; then
12320                 ol_cv_lib_db=-ldb1
12321         fi
12322 fi
12323
12324
12325                 if test "$ol_cv_lib_db" != no ; then
12326                         ol_cv_berkeley_db=yes
12327                 fi
12328         fi
12329 fi
12330
12331         else
12332                 ol_cv_berkeley_db=no
12333 for ac_hdr in db.h
12334 do
12335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12337 echo "configure:12338: checking for $ac_hdr" >&5
12338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12339   echo $ac_n "(cached) $ac_c" 1>&6
12340 else
12341   cat > conftest.$ac_ext <<EOF
12342 #line 12343 "configure"
12343 #include "confdefs.h"
12344 #include <$ac_hdr>
12345 EOF
12346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12347 { (eval echo configure:12348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12349 if test -z "$ac_err"; then
12350   rm -rf conftest*
12351   eval "ac_cv_header_$ac_safe=yes"
12352 else
12353   echo "$ac_err" >&5
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356   rm -rf conftest*
12357   eval "ac_cv_header_$ac_safe=no"
12358 fi
12359 rm -f conftest*
12360 fi
12361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12362   echo "$ac_t""yes" 1>&6
12363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12364   cat >> confdefs.h <<EOF
12365 #define $ac_tr_hdr 1
12366 EOF
12367  
12368 else
12369   echo "$ac_t""no" 1>&6
12370 fi
12371 done
12372
12373 if test $ac_cv_header_db_h = yes; then
12374         ol_cv_lib_db=no
12375 if test $ol_cv_lib_db = no ; then
12376         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
12377 echo "configure:12378: checking for Berkeley DB link (default)" >&5
12378 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
12379   echo $ac_n "(cached) $ac_c" 1>&6
12380 else
12381   
12382         ol_DB_LIB=
12383         ol_LIBS=$LIBS
12384         LIBS="$ol_DB_LIB $LIBS"
12385
12386         cat > conftest.$ac_ext <<EOF
12387 #line 12388 "configure"
12388 #include "confdefs.h"
12389
12390 #ifdef HAVE_DB_185_H
12391 # include <db_185.h>
12392 #else
12393 # include <db.h>
12394 #endif
12395
12396 #ifndef DB_VERSION_MAJOR
12397 # define DB_VERSION_MAJOR 1
12398 #endif
12399
12400 #ifndef NULL
12401 #define NULL ((void*)0)
12402 #endif
12403
12404 int main() {
12405
12406 #if DB_VERSION_MAJOR > 2
12407         db_env_create( NULL, 0 );
12408 #elif DB_VERSION_MAJOR > 1
12409         db_appexit( NULL );
12410 #else
12411         (void) dbopen( NULL, 0, 0, 0, NULL);
12412 #endif
12413
12414 ; return 0; }
12415 EOF
12416 if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12417   rm -rf conftest*
12418   ol_cv_db_none=yes
12419 else
12420   echo "configure: failed program was:" >&5
12421   cat conftest.$ac_ext >&5
12422   rm -rf conftest*
12423   ol_cv_db_none=no
12424 fi
12425 rm -f conftest*
12426
12427         LIBS="$ol_LIBS"
12428
12429 fi
12430
12431 echo "$ac_t""$ol_cv_db_none" 1>&6
12432
12433         if test $ol_cv_db_none = yes ; then
12434                 ol_cv_lib_db=yes
12435         fi
12436 fi
12437
12438 if test $ol_cv_lib_db = no ; then
12439         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12440 echo "configure:12441: checking for Berkeley DB link (-ldb)" >&5
12441 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12442   echo $ac_n "(cached) $ac_c" 1>&6
12443 else
12444   
12445         ol_DB_LIB=-ldb
12446         ol_LIBS=$LIBS
12447         LIBS="$ol_DB_LIB $LIBS"
12448
12449         cat > conftest.$ac_ext <<EOF
12450 #line 12451 "configure"
12451 #include "confdefs.h"
12452
12453 #ifdef HAVE_DB_185_H
12454 # include <db_185.h>
12455 #else
12456 # include <db.h>
12457 #endif
12458
12459 #ifndef DB_VERSION_MAJOR
12460 # define DB_VERSION_MAJOR 1
12461 #endif
12462
12463 #ifndef NULL
12464 #define NULL ((void*)0)
12465 #endif
12466
12467 int main() {
12468
12469 #if DB_VERSION_MAJOR > 2
12470         db_env_create( NULL, 0 );
12471 #elif DB_VERSION_MAJOR > 1
12472         db_appexit( NULL );
12473 #else
12474         (void) dbopen( NULL, 0, 0, 0, NULL);
12475 #endif
12476
12477 ; return 0; }
12478 EOF
12479 if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12480   rm -rf conftest*
12481   ol_cv_db_db=yes
12482 else
12483   echo "configure: failed program was:" >&5
12484   cat conftest.$ac_ext >&5
12485   rm -rf conftest*
12486   ol_cv_db_db=no
12487 fi
12488 rm -f conftest*
12489
12490         LIBS="$ol_LIBS"
12491
12492 fi
12493
12494 echo "$ac_t""$ol_cv_db_db" 1>&6
12495
12496         if test $ol_cv_db_db = yes ; then
12497                 ol_cv_lib_db=-ldb
12498         fi
12499 fi
12500
12501 if test $ol_cv_lib_db = no ; then
12502         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12503 echo "configure:12504: checking for Berkeley DB link (-ldb3)" >&5
12504 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12505   echo $ac_n "(cached) $ac_c" 1>&6
12506 else
12507   
12508         ol_DB_LIB=-ldb3
12509         ol_LIBS=$LIBS
12510         LIBS="$ol_DB_LIB $LIBS"
12511
12512         cat > conftest.$ac_ext <<EOF
12513 #line 12514 "configure"
12514 #include "confdefs.h"
12515
12516 #ifdef HAVE_DB_185_H
12517 # include <db_185.h>
12518 #else
12519 # include <db.h>
12520 #endif
12521
12522 #ifndef DB_VERSION_MAJOR
12523 # define DB_VERSION_MAJOR 1
12524 #endif
12525
12526 #ifndef NULL
12527 #define NULL ((void*)0)
12528 #endif
12529
12530 int main() {
12531
12532 #if DB_VERSION_MAJOR > 2
12533         db_env_create( NULL, 0 );
12534 #elif DB_VERSION_MAJOR > 1
12535         db_appexit( NULL );
12536 #else
12537         (void) dbopen( NULL, 0, 0, 0, NULL);
12538 #endif
12539
12540 ; return 0; }
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12543   rm -rf conftest*
12544   ol_cv_db_db3=yes
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   ol_cv_db_db3=no
12550 fi
12551 rm -f conftest*
12552
12553         LIBS="$ol_LIBS"
12554
12555 fi
12556
12557 echo "$ac_t""$ol_cv_db_db3" 1>&6
12558
12559         if test $ol_cv_db_db3 = yes ; then
12560                 ol_cv_lib_db=-ldb3
12561         fi
12562 fi
12563
12564 if test $ol_cv_lib_db = no ; then
12565         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12566 echo "configure:12567: checking for Berkeley DB link (-ldb2)" >&5
12567 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12568   echo $ac_n "(cached) $ac_c" 1>&6
12569 else
12570   
12571         ol_DB_LIB=-ldb2
12572         ol_LIBS=$LIBS
12573         LIBS="$ol_DB_LIB $LIBS"
12574
12575         cat > conftest.$ac_ext <<EOF
12576 #line 12577 "configure"
12577 #include "confdefs.h"
12578
12579 #ifdef HAVE_DB_185_H
12580 # include <db_185.h>
12581 #else
12582 # include <db.h>
12583 #endif
12584
12585 #ifndef DB_VERSION_MAJOR
12586 # define DB_VERSION_MAJOR 1
12587 #endif
12588
12589 #ifndef NULL
12590 #define NULL ((void*)0)
12591 #endif
12592
12593 int main() {
12594
12595 #if DB_VERSION_MAJOR > 2
12596         db_env_create( NULL, 0 );
12597 #elif DB_VERSION_MAJOR > 1
12598         db_appexit( NULL );
12599 #else
12600         (void) dbopen( NULL, 0, 0, 0, NULL);
12601 #endif
12602
12603 ; return 0; }
12604 EOF
12605 if { (eval echo configure:12606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12606   rm -rf conftest*
12607   ol_cv_db_db2=yes
12608 else
12609   echo "configure: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   rm -rf conftest*
12612   ol_cv_db_db2=no
12613 fi
12614 rm -f conftest*
12615
12616         LIBS="$ol_LIBS"
12617
12618 fi
12619
12620 echo "$ac_t""$ol_cv_db_db2" 1>&6
12621
12622         if test $ol_cv_db_db2 = yes ; then
12623                 ol_cv_lib_db=-ldb2
12624         fi
12625 fi
12626
12627 if test $ol_cv_lib_db = no ; then
12628         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12629 echo "configure:12630: checking for Berkeley DB link (-ldb1)" >&5
12630 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12631   echo $ac_n "(cached) $ac_c" 1>&6
12632 else
12633   
12634         ol_DB_LIB=-ldb1
12635         ol_LIBS=$LIBS
12636         LIBS="$ol_DB_LIB $LIBS"
12637
12638         cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641
12642 #ifdef HAVE_DB_185_H
12643 # include <db_185.h>
12644 #else
12645 # include <db.h>
12646 #endif
12647
12648 #ifndef DB_VERSION_MAJOR
12649 # define DB_VERSION_MAJOR 1
12650 #endif
12651
12652 #ifndef NULL
12653 #define NULL ((void*)0)
12654 #endif
12655
12656 int main() {
12657
12658 #if DB_VERSION_MAJOR > 2
12659         db_env_create( NULL, 0 );
12660 #elif DB_VERSION_MAJOR > 1
12661         db_appexit( NULL );
12662 #else
12663         (void) dbopen( NULL, 0, 0, 0, NULL);
12664 #endif
12665
12666 ; return 0; }
12667 EOF
12668 if { (eval echo configure:12669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12669   rm -rf conftest*
12670   ol_cv_db_db1=yes
12671 else
12672   echo "configure: failed program was:" >&5
12673   cat conftest.$ac_ext >&5
12674   rm -rf conftest*
12675   ol_cv_db_db1=no
12676 fi
12677 rm -f conftest*
12678
12679         LIBS="$ol_LIBS"
12680
12681 fi
12682
12683 echo "$ac_t""$ol_cv_db_db1" 1>&6
12684
12685         if test $ol_cv_db_db1 = yes ; then
12686                 ol_cv_lib_db=-ldb1
12687         fi
12688 fi
12689
12690
12691         if test "$ol_cv_lib_db" != no ; then
12692                 ol_cv_berkeley_db=yes
12693                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12694 echo "configure:12695: checking for Berkeley DB thread support" >&5
12695 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12696   echo $ac_n "(cached) $ac_c" 1>&6
12697 else
12698   
12699         ol_LIBS="$LIBS"
12700         if test $ol_cv_lib_db != yes ; then
12701                 LIBS="$ol_cv_lib_db"
12702         fi
12703
12704         if test "$cross_compiling" = yes; then
12705   ol_cv_berkeley_db_thread=cross
12706 else
12707   cat > conftest.$ac_ext <<EOF
12708 #line 12709 "configure"
12709 #include "confdefs.h"
12710
12711 #ifdef HAVE_DB_185_H
12712         choke me;
12713 #else
12714 #include <db.h>
12715 #endif
12716 #ifndef NULL
12717 #define NULL ((void *)0)
12718 #endif
12719 main()
12720 {
12721         int rc;
12722         u_int32_t flags = DB_CREATE | DB_THREAD | DB_INIT_CDB | DB_INIT_MPOOL;
12723
12724 #if DB_VERSION_MAJOR > 2
12725         DB_ENV *env = NULL;
12726
12727         rc = db_env_create( &env, 0 );
12728
12729         if( rc ) return rc;
12730
12731 #ifdef DB_CDB_ALLDB
12732         rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
12733         if( rc ) goto done;
12734 #endif
12735
12736 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12737         rc = env->open( env, NULL, flags, 0 );
12738 #else
12739         rc = env->open( env, NULL, NULL, flags, 0 );
12740 #endif
12741
12742 #ifdef DB_CDB_ALLDB
12743 done:
12744 #endif
12745 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12746         env->remove( env, NULL, DB_FORCE);
12747 #else
12748         env->remove( env, NULL, NULL, DB_FORCE);
12749 #endif
12750
12751 #else
12752         DB_ENV env;
12753         memset( &env, '\0', sizeof(env) );
12754
12755         rc = db_appinit( NULL, NULL, &env, flags );
12756
12757         if( rc == 0 ) {
12758                 db_appexit( &env );
12759         }
12760 #endif
12761
12762         return rc;
12763 }
12764 EOF
12765 if { (eval echo configure:12766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12766 then
12767   ol_cv_berkeley_db_thread=yes
12768 else
12769   echo "configure: failed program was:" >&5
12770   cat conftest.$ac_ext >&5
12771   rm -fr conftest*
12772   ol_cv_berkeley_db_thread=no
12773 fi
12774 rm -fr conftest*
12775 fi
12776
12777
12778         LIBS="$ol_LIBS"
12779
12780         if test $ol_cv_berkeley_db_thread != no ; then
12781                 cat >> confdefs.h <<\EOF
12782 #define HAVE_BERKELEY_DB_THREAD 1
12783 EOF
12784
12785         fi
12786
12787 fi
12788
12789 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12790         fi
12791 fi
12792
12793         fi
12794
12795         if test $ol_cv_berkeley_db != no ; then
12796                 cat >> confdefs.h <<\EOF
12797 #define HAVE_BERKELEY_DB 1
12798 EOF
12799
12800
12801                 ol_link_ldbm=berkeley
12802                 ol_with_ldbm_api=db
12803
12804                 if test $ol_with_ldbm_type = hash ; then
12805                         cat >> confdefs.h <<\EOF
12806 #define LDBM_USE_DBHASH 1
12807 EOF
12808
12809                 else
12810                         cat >> confdefs.h <<\EOF
12811 #define LDBM_USE_DBBTREE 1
12812 EOF
12813
12814                 fi
12815
12816                                                 if test $ol_cv_lib_db != yes ; then
12817                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12818                 fi
12819         fi
12820 fi
12821
12822 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12823         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12824         ol_with_ldbm_api=none
12825 fi
12826
12827 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12828         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12829 echo "configure:12830: checking for MDBM library" >&5
12830 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12831   echo $ac_n "(cached) $ac_c" 1>&6
12832 else
12833         ol_LIBS="$LIBS"
12834         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12835 echo "configure:12836: checking for mdbm_set_chain" >&5
12836 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12837   echo $ac_n "(cached) $ac_c" 1>&6
12838 else
12839   cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842 /* System header to define __stub macros and hopefully few prototypes,
12843     which can conflict with char mdbm_set_chain(); below.  */
12844 #include <assert.h>
12845 /* Override any gcc2 internal prototype to avoid an error.  */
12846 /* We use char because int might match the return type of a gcc2
12847     builtin and then its argument prototype would still apply.  */
12848 char mdbm_set_chain();
12849 char (*f)();
12850
12851 int main() {
12852
12853 /* The GNU C library defines this for functions which it implements
12854     to always fail with ENOSYS.  Some functions are actually named
12855     something starting with __ and the normal name is an alias.  */
12856 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12857 choke me
12858 #else
12859 f = mdbm_set_chain;
12860 #endif
12861
12862 ; return 0; }
12863 EOF
12864 if { (eval echo configure:12865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12865   rm -rf conftest*
12866   eval "ac_cv_func_mdbm_set_chain=yes"
12867 else
12868   echo "configure: failed program was:" >&5
12869   cat conftest.$ac_ext >&5
12870   rm -rf conftest*
12871   eval "ac_cv_func_mdbm_set_chain=no"
12872 fi
12873 rm -f conftest*
12874 fi
12875
12876 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12877   echo "$ac_t""yes" 1>&6
12878   ol_cv_lib_mdbm=yes
12879 else
12880   echo "$ac_t""no" 1>&6
12881
12882                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12883 echo "configure:12884: checking for mdbm_set_chain in -lmdbm" >&5
12884 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12885 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12886   echo $ac_n "(cached) $ac_c" 1>&6
12887 else
12888   ac_save_LIBS="$LIBS"
12889 LIBS="-lmdbm  $LIBS"
12890 cat > conftest.$ac_ext <<EOF
12891 #line 12892 "configure"
12892 #include "confdefs.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 mdbm_set_chain();
12897
12898 int main() {
12899 mdbm_set_chain()
12900 ; return 0; }
12901 EOF
12902 if { (eval echo configure:12903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12903   rm -rf conftest*
12904   eval "ac_cv_lib_$ac_lib_var=yes"
12905 else
12906   echo "configure: failed program was:" >&5
12907   cat conftest.$ac_ext >&5
12908   rm -rf conftest*
12909   eval "ac_cv_lib_$ac_lib_var=no"
12910 fi
12911 rm -f conftest*
12912 LIBS="$ac_save_LIBS"
12913
12914 fi
12915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12916   echo "$ac_t""yes" 1>&6
12917   ol_cv_lib_mdbm=-lmdbm
12918 else
12919   echo "$ac_t""no" 1>&6
12920 ol_cv_lib_mdbm=no
12921 fi
12922
12923         
12924 fi
12925
12926         LIBS="$ol_LIBS"
12927
12928 fi
12929
12930 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12931
12932
12933  for ac_hdr in mdbm.h
12934 do
12935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12937 echo "configure:12938: checking for $ac_hdr" >&5
12938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12939   echo $ac_n "(cached) $ac_c" 1>&6
12940 else
12941   cat > conftest.$ac_ext <<EOF
12942 #line 12943 "configure"
12943 #include "confdefs.h"
12944 #include <$ac_hdr>
12945 EOF
12946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12947 { (eval echo configure:12948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12949 if test -z "$ac_err"; then
12950   rm -rf conftest*
12951   eval "ac_cv_header_$ac_safe=yes"
12952 else
12953   echo "$ac_err" >&5
12954   echo "configure: failed program was:" >&5
12955   cat conftest.$ac_ext >&5
12956   rm -rf conftest*
12957   eval "ac_cv_header_$ac_safe=no"
12958 fi
12959 rm -f conftest*
12960 fi
12961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12962   echo "$ac_t""yes" 1>&6
12963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12964   cat >> confdefs.h <<EOF
12965 #define $ac_tr_hdr 1
12966 EOF
12967  
12968 else
12969   echo "$ac_t""no" 1>&6
12970 fi
12971 done
12972
12973  echo $ac_n "checking for db""... $ac_c" 1>&6
12974 echo "configure:12975: checking for db" >&5
12975 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12976   echo $ac_n "(cached) $ac_c" 1>&6
12977 else
12978   
12979         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12980                 ol_cv_mdbm=no
12981         else
12982                 ol_cv_mdbm=yes
12983         fi
12984
12985 fi
12986
12987 echo "$ac_t""$ol_cv_mdbm" 1>&6
12988  if test $ol_cv_mdbm = yes ; then
12989         cat >> confdefs.h <<\EOF
12990 #define HAVE_MDBM 1
12991 EOF
12992
12993  fi
12994
12995
12996         if test $ol_cv_mdbm = yes ; then
12997                 ol_link_ldbm=mdbm
12998                 ol_with_ldbm_api=mdbm
12999                 if test $ol_cv_lib_mdbm != yes ; then
13000                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
13001                 fi
13002         fi
13003 fi
13004
13005 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
13006         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
13007 echo "configure:13008: checking for GDBM library" >&5
13008 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
13009   echo $ac_n "(cached) $ac_c" 1>&6
13010 else
13011         ol_LIBS="$LIBS"
13012         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
13013 echo "configure:13014: checking for gdbm_open" >&5
13014 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
13015   echo $ac_n "(cached) $ac_c" 1>&6
13016 else
13017   cat > conftest.$ac_ext <<EOF
13018 #line 13019 "configure"
13019 #include "confdefs.h"
13020 /* System header to define __stub macros and hopefully few prototypes,
13021     which can conflict with char gdbm_open(); below.  */
13022 #include <assert.h>
13023 /* Override any gcc2 internal prototype to avoid an error.  */
13024 /* We use char because int might match the return type of a gcc2
13025     builtin and then its argument prototype would still apply.  */
13026 char gdbm_open();
13027 char (*f)();
13028
13029 int main() {
13030
13031 /* The GNU C library defines this for functions which it implements
13032     to always fail with ENOSYS.  Some functions are actually named
13033     something starting with __ and the normal name is an alias.  */
13034 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
13035 choke me
13036 #else
13037 f = gdbm_open;
13038 #endif
13039
13040 ; return 0; }
13041 EOF
13042 if { (eval echo configure:13043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13043   rm -rf conftest*
13044   eval "ac_cv_func_gdbm_open=yes"
13045 else
13046   echo "configure: failed program was:" >&5
13047   cat conftest.$ac_ext >&5
13048   rm -rf conftest*
13049   eval "ac_cv_func_gdbm_open=no"
13050 fi
13051 rm -f conftest*
13052 fi
13053
13054 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
13055   echo "$ac_t""yes" 1>&6
13056   ol_cv_lib_gdbm=yes
13057 else
13058   echo "$ac_t""no" 1>&6
13059
13060                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
13061 echo "configure:13062: checking for gdbm_open in -lgdbm" >&5
13062 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
13063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13064   echo $ac_n "(cached) $ac_c" 1>&6
13065 else
13066   ac_save_LIBS="$LIBS"
13067 LIBS="-lgdbm  $LIBS"
13068 cat > conftest.$ac_ext <<EOF
13069 #line 13070 "configure"
13070 #include "confdefs.h"
13071 /* Override any gcc2 internal prototype to avoid an error.  */
13072 /* We use char because int might match the return type of a gcc2
13073     builtin and then its argument prototype would still apply.  */
13074 char gdbm_open();
13075
13076 int main() {
13077 gdbm_open()
13078 ; return 0; }
13079 EOF
13080 if { (eval echo configure:13081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13081   rm -rf conftest*
13082   eval "ac_cv_lib_$ac_lib_var=yes"
13083 else
13084   echo "configure: failed program was:" >&5
13085   cat conftest.$ac_ext >&5
13086   rm -rf conftest*
13087   eval "ac_cv_lib_$ac_lib_var=no"
13088 fi
13089 rm -f conftest*
13090 LIBS="$ac_save_LIBS"
13091
13092 fi
13093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13094   echo "$ac_t""yes" 1>&6
13095   ol_cv_lib_gdbm=-lgdbm
13096 else
13097   echo "$ac_t""no" 1>&6
13098 ol_cv_lib_gdbm=no
13099 fi
13100
13101         
13102 fi
13103
13104         LIBS="$ol_LIBS"
13105
13106 fi
13107
13108 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
13109
13110
13111  for ac_hdr in gdbm.h
13112 do
13113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13115 echo "configure:13116: checking for $ac_hdr" >&5
13116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13117   echo $ac_n "(cached) $ac_c" 1>&6
13118 else
13119   cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 #include <$ac_hdr>
13123 EOF
13124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13125 { (eval echo configure:13126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13127 if test -z "$ac_err"; then
13128   rm -rf conftest*
13129   eval "ac_cv_header_$ac_safe=yes"
13130 else
13131   echo "$ac_err" >&5
13132   echo "configure: failed program was:" >&5
13133   cat conftest.$ac_ext >&5
13134   rm -rf conftest*
13135   eval "ac_cv_header_$ac_safe=no"
13136 fi
13137 rm -f conftest*
13138 fi
13139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13140   echo "$ac_t""yes" 1>&6
13141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13142   cat >> confdefs.h <<EOF
13143 #define $ac_tr_hdr 1
13144 EOF
13145  
13146 else
13147   echo "$ac_t""no" 1>&6
13148 fi
13149 done
13150
13151  echo $ac_n "checking for db""... $ac_c" 1>&6
13152 echo "configure:13153: checking for db" >&5
13153 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
13154   echo $ac_n "(cached) $ac_c" 1>&6
13155 else
13156   
13157         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
13158                 ol_cv_gdbm=no
13159         else
13160                 ol_cv_gdbm=yes
13161         fi
13162
13163 fi
13164
13165 echo "$ac_t""$ol_cv_gdbm" 1>&6
13166  if test $ol_cv_gdbm = yes ; then
13167         cat >> confdefs.h <<\EOF
13168 #define HAVE_GDBM 1
13169 EOF
13170
13171  fi
13172
13173
13174         if test $ol_cv_gdbm = yes ; then
13175                 ol_link_ldbm=gdbm
13176                 ol_with_ldbm_api=gdbm
13177
13178                 if test $ol_cv_lib_gdbm != yes ; then
13179                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
13180                 fi
13181         fi
13182 fi
13183
13184 if test $ol_with_ldbm_api = ndbm ; then
13185         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
13186 echo "configure:13187: checking for NDBM library" >&5
13187 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
13188   echo $ac_n "(cached) $ac_c" 1>&6
13189 else
13190         ol_LIBS="$LIBS"
13191         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13192 echo "configure:13193: checking for dbm_open" >&5
13193 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
13194   echo $ac_n "(cached) $ac_c" 1>&6
13195 else
13196   cat > conftest.$ac_ext <<EOF
13197 #line 13198 "configure"
13198 #include "confdefs.h"
13199 /* System header to define __stub macros and hopefully few prototypes,
13200     which can conflict with char dbm_open(); below.  */
13201 #include <assert.h>
13202 /* Override any gcc2 internal prototype to avoid an error.  */
13203 /* We use char because int might match the return type of a gcc2
13204     builtin and then its argument prototype would still apply.  */
13205 char dbm_open();
13206 char (*f)();
13207
13208 int main() {
13209
13210 /* The GNU C library defines this for functions which it implements
13211     to always fail with ENOSYS.  Some functions are actually named
13212     something starting with __ and the normal name is an alias.  */
13213 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13214 choke me
13215 #else
13216 f = dbm_open;
13217 #endif
13218
13219 ; return 0; }
13220 EOF
13221 if { (eval echo configure:13222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13222   rm -rf conftest*
13223   eval "ac_cv_func_dbm_open=yes"
13224 else
13225   echo "configure: failed program was:" >&5
13226   cat conftest.$ac_ext >&5
13227   rm -rf conftest*
13228   eval "ac_cv_func_dbm_open=no"
13229 fi
13230 rm -f conftest*
13231 fi
13232
13233 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13234   echo "$ac_t""yes" 1>&6
13235   ol_cv_lib_ndbm=yes
13236 else
13237   echo "$ac_t""no" 1>&6
13238
13239                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13240 echo "configure:13241: checking for dbm_open in -lndbm" >&5
13241 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13243   echo $ac_n "(cached) $ac_c" 1>&6
13244 else
13245   ac_save_LIBS="$LIBS"
13246 LIBS="-lndbm  $LIBS"
13247 cat > conftest.$ac_ext <<EOF
13248 #line 13249 "configure"
13249 #include "confdefs.h"
13250 /* Override any gcc2 internal prototype to avoid an error.  */
13251 /* We use char because int might match the return type of a gcc2
13252     builtin and then its argument prototype would still apply.  */
13253 char dbm_open();
13254
13255 int main() {
13256 dbm_open()
13257 ; return 0; }
13258 EOF
13259 if { (eval echo configure:13260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13260   rm -rf conftest*
13261   eval "ac_cv_lib_$ac_lib_var=yes"
13262 else
13263   echo "configure: failed program was:" >&5
13264   cat conftest.$ac_ext >&5
13265   rm -rf conftest*
13266   eval "ac_cv_lib_$ac_lib_var=no"
13267 fi
13268 rm -f conftest*
13269 LIBS="$ac_save_LIBS"
13270
13271 fi
13272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13273   echo "$ac_t""yes" 1>&6
13274   ol_cv_lib_ndbm=-lndbm
13275 else
13276   echo "$ac_t""no" 1>&6
13277
13278                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13279 echo "configure:13280: checking for dbm_open in -ldbm" >&5
13280 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13282   echo $ac_n "(cached) $ac_c" 1>&6
13283 else
13284   ac_save_LIBS="$LIBS"
13285 LIBS="-ldbm  $LIBS"
13286 cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 /* Override any gcc2 internal prototype to avoid an error.  */
13290 /* We use char because int might match the return type of a gcc2
13291     builtin and then its argument prototype would still apply.  */
13292 char dbm_open();
13293
13294 int main() {
13295 dbm_open()
13296 ; return 0; }
13297 EOF
13298 if { (eval echo configure:13299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13299   rm -rf conftest*
13300   eval "ac_cv_lib_$ac_lib_var=yes"
13301 else
13302   echo "configure: failed program was:" >&5
13303   cat conftest.$ac_ext >&5
13304   rm -rf conftest*
13305   eval "ac_cv_lib_$ac_lib_var=no"
13306 fi
13307 rm -f conftest*
13308 LIBS="$ac_save_LIBS"
13309
13310 fi
13311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13312   echo "$ac_t""yes" 1>&6
13313   ol_cv_lib_ndbm=-ldbm
13314 else
13315   echo "$ac_t""no" 1>&6
13316 ol_cv_lib_ndbm=no
13317 fi
13318                 
13319 fi
13320
13321         
13322 fi
13323
13324         LIBS="$ol_LIBS"
13325
13326 fi
13327
13328 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13329
13330
13331  for ac_hdr in ndbm.h
13332 do
13333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13335 echo "configure:13336: checking for $ac_hdr" >&5
13336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13337   echo $ac_n "(cached) $ac_c" 1>&6
13338 else
13339   cat > conftest.$ac_ext <<EOF
13340 #line 13341 "configure"
13341 #include "confdefs.h"
13342 #include <$ac_hdr>
13343 EOF
13344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13345 { (eval echo configure:13346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13347 if test -z "$ac_err"; then
13348   rm -rf conftest*
13349   eval "ac_cv_header_$ac_safe=yes"
13350 else
13351   echo "$ac_err" >&5
13352   echo "configure: failed program was:" >&5
13353   cat conftest.$ac_ext >&5
13354   rm -rf conftest*
13355   eval "ac_cv_header_$ac_safe=no"
13356 fi
13357 rm -f conftest*
13358 fi
13359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13360   echo "$ac_t""yes" 1>&6
13361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13362   cat >> confdefs.h <<EOF
13363 #define $ac_tr_hdr 1
13364 EOF
13365  
13366 else
13367   echo "$ac_t""no" 1>&6
13368 fi
13369 done
13370
13371  echo $ac_n "checking for db""... $ac_c" 1>&6
13372 echo "configure:13373: checking for db" >&5
13373 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13374   echo $ac_n "(cached) $ac_c" 1>&6
13375 else
13376   
13377         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13378                 ol_cv_ndbm=no
13379         else
13380                 ol_cv_ndbm=yes
13381         fi
13382
13383 fi
13384
13385 echo "$ac_t""$ol_cv_ndbm" 1>&6
13386  if test $ol_cv_ndbm = yes ; then
13387         cat >> confdefs.h <<\EOF
13388 #define HAVE_NDBM 1
13389 EOF
13390
13391  fi
13392
13393
13394         if test $ol_cv_ndbm = yes ; then
13395                 ol_link_ldbm=ndbm
13396                 ol_with_ldbm_api=ndbm
13397
13398                 if test $ol_cv_lib_ndbm != yes ; then
13399                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13400                 fi
13401         fi
13402 fi
13403
13404 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13405         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13406         if test $ol_enable_ldbm = yes ; then
13407                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13408         fi
13409
13410         echo "configure: warning: disabling LDBM" 1>&2
13411         ol_enable_ldbm=no
13412 fi
13413
13414 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13415         LINK_BINS_DYNAMIC="yes"
13416 else
13417         LINK_BINS_DYNAMIC="no"
13418 fi
13419
13420 if test $ol_enable_wrappers != no ; then
13421         for ac_hdr in tcpd.h
13422 do
13423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13425 echo "configure:13426: checking for $ac_hdr" >&5
13426 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13427   echo $ac_n "(cached) $ac_c" 1>&6
13428 else
13429   cat > conftest.$ac_ext <<EOF
13430 #line 13431 "configure"
13431 #include "confdefs.h"
13432 #include <$ac_hdr>
13433 EOF
13434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13435 { (eval echo configure:13436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13437 if test -z "$ac_err"; then
13438   rm -rf conftest*
13439   eval "ac_cv_header_$ac_safe=yes"
13440 else
13441   echo "$ac_err" >&5
13442   echo "configure: failed program was:" >&5
13443   cat conftest.$ac_ext >&5
13444   rm -rf conftest*
13445   eval "ac_cv_header_$ac_safe=no"
13446 fi
13447 rm -f conftest*
13448 fi
13449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13450   echo "$ac_t""yes" 1>&6
13451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13452   cat >> confdefs.h <<EOF
13453 #define $ac_tr_hdr 1
13454 EOF
13455  
13456 else
13457   echo "$ac_t""no" 1>&6
13458 fi
13459 done
13460
13461
13462         if test $ac_cv_header_tcpd_h != yes ; then
13463                 have_wrappers=no
13464         else
13465                 cat > conftest.$ac_ext <<EOF
13466 #line 13467 "configure"
13467 #include "confdefs.h"
13468
13469 int allow_severity = 0;
13470 int deny_severity  = 0;
13471                 
13472 int main() {
13473 hosts_access()
13474 ; return 0; }
13475 EOF
13476 if { (eval echo configure:13477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13477   rm -rf conftest*
13478   have_wrappers=yes
13479 else
13480   echo "configure: failed program was:" >&5
13481   cat conftest.$ac_ext >&5
13482   rm -rf conftest*
13483   have_wrappers=no
13484 fi
13485 rm -f conftest*
13486         fi
13487
13488         if test $have_wrappers = yes ; then
13489                 cat >> confdefs.h <<\EOF
13490 #define HAVE_TCPD 1
13491 EOF
13492
13493                 WRAP_LIBS="-lwrap"
13494
13495                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13496 echo "configure:13497: checking for main in -lnsl" >&5
13497 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13499   echo $ac_n "(cached) $ac_c" 1>&6
13500 else
13501   ac_save_LIBS="$LIBS"
13502 LIBS="-lnsl  $LIBS"
13503 cat > conftest.$ac_ext <<EOF
13504 #line 13505 "configure"
13505 #include "confdefs.h"
13506
13507 int main() {
13508 main()
13509 ; return 0; }
13510 EOF
13511 if { (eval echo configure:13512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13512   rm -rf conftest*
13513   eval "ac_cv_lib_$ac_lib_var=yes"
13514 else
13515   echo "configure: failed program was:" >&5
13516   cat conftest.$ac_ext >&5
13517   rm -rf conftest*
13518   eval "ac_cv_lib_$ac_lib_var=no"
13519 fi
13520 rm -f conftest*
13521 LIBS="$ac_save_LIBS"
13522
13523 fi
13524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13525   echo "$ac_t""yes" 1>&6
13526     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13527     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13528   cat >> confdefs.h <<EOF
13529 #define $ac_tr_lib 1
13530 EOF
13531
13532   LIBS="-lnsl $LIBS"
13533
13534 else
13535   echo "$ac_t""no" 1>&6
13536 fi
13537
13538         else
13539                 echo "configure: warning: could not find -lwrap" 1>&2
13540                 if test $ol_enable_wrappers = yes ; then
13541                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13542                 fi
13543
13544                 echo "configure: warning: disabling wrappers support" 1>&2
13545                 ol_enable_wrappers=no
13546                 WRAP_LIBS=""
13547         fi
13548 fi
13549
13550 if test $ol_enable_syslog != no ; then
13551         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13552 echo "configure:13553: checking for openlog" >&5
13553 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13554   echo $ac_n "(cached) $ac_c" 1>&6
13555 else
13556   cat > conftest.$ac_ext <<EOF
13557 #line 13558 "configure"
13558 #include "confdefs.h"
13559 /* System header to define __stub macros and hopefully few prototypes,
13560     which can conflict with char openlog(); below.  */
13561 #include <assert.h>
13562 /* Override any gcc2 internal prototype to avoid an error.  */
13563 /* We use char because int might match the return type of a gcc2
13564     builtin and then its argument prototype would still apply.  */
13565 char openlog();
13566 char (*f)();
13567
13568 int main() {
13569
13570 /* The GNU C library defines this for functions which it implements
13571     to always fail with ENOSYS.  Some functions are actually named
13572     something starting with __ and the normal name is an alias.  */
13573 #if defined (__stub_openlog) || defined (__stub___openlog)
13574 choke me
13575 #else
13576 f = openlog;
13577 #endif
13578
13579 ; return 0; }
13580 EOF
13581 if { (eval echo configure:13582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13582   rm -rf conftest*
13583   eval "ac_cv_func_openlog=yes"
13584 else
13585   echo "configure: failed program was:" >&5
13586   cat conftest.$ac_ext >&5
13587   rm -rf conftest*
13588   eval "ac_cv_func_openlog=no"
13589 fi
13590 rm -f conftest*
13591 fi
13592
13593 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13594   echo "$ac_t""yes" 1>&6
13595   :
13596 else
13597   echo "$ac_t""no" 1>&6
13598 fi
13599
13600         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13601                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13602         fi
13603         ol_enable_syslog=$ac_cv_func_openlog
13604 fi
13605
13606
13607 ol_link_sql=no
13608 if test $ol_enable_sql != no ; then
13609         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13610 echo "configure:13611: checking for SQLDriverConnect in -liodbc" >&5
13611 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13612 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13613   echo $ac_n "(cached) $ac_c" 1>&6
13614 else
13615   ac_save_LIBS="$LIBS"
13616 LIBS="-liodbc  $LIBS"
13617 cat > conftest.$ac_ext <<EOF
13618 #line 13619 "configure"
13619 #include "confdefs.h"
13620 /* Override any gcc2 internal prototype to avoid an error.  */
13621 /* We use char because int might match the return type of a gcc2
13622     builtin and then its argument prototype would still apply.  */
13623 char SQLDriverConnect();
13624
13625 int main() {
13626 SQLDriverConnect()
13627 ; return 0; }
13628 EOF
13629 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13630   rm -rf conftest*
13631   eval "ac_cv_lib_$ac_lib_var=yes"
13632 else
13633   echo "configure: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   rm -rf conftest*
13636   eval "ac_cv_lib_$ac_lib_var=no"
13637 fi
13638 rm -f conftest*
13639 LIBS="$ac_save_LIBS"
13640
13641 fi
13642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13643   echo "$ac_t""yes" 1>&6
13644   have_iodbc=yes
13645 else
13646   echo "$ac_t""no" 1>&6
13647 have_iodbc=no
13648 fi
13649
13650         if test $have_iodbc = yes ; then
13651                 ol_link_sql="-liodbc"
13652         else
13653                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13654 echo "configure:13655: checking for SQLDriverConnect in -lodbc" >&5
13655 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13656 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13657   echo $ac_n "(cached) $ac_c" 1>&6
13658 else
13659   ac_save_LIBS="$LIBS"
13660 LIBS="-lodbc  $LIBS"
13661 cat > conftest.$ac_ext <<EOF
13662 #line 13663 "configure"
13663 #include "confdefs.h"
13664 /* Override any gcc2 internal prototype to avoid an error.  */
13665 /* We use char because int might match the return type of a gcc2
13666     builtin and then its argument prototype would still apply.  */
13667 char SQLDriverConnect();
13668
13669 int main() {
13670 SQLDriverConnect()
13671 ; return 0; }
13672 EOF
13673 if { (eval echo configure:13674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13674   rm -rf conftest*
13675   eval "ac_cv_lib_$ac_lib_var=yes"
13676 else
13677   echo "configure: failed program was:" >&5
13678   cat conftest.$ac_ext >&5
13679   rm -rf conftest*
13680   eval "ac_cv_lib_$ac_lib_var=no"
13681 fi
13682 rm -f conftest*
13683 LIBS="$ac_save_LIBS"
13684
13685 fi
13686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13687   echo "$ac_t""yes" 1>&6
13688   have_odbc=yes
13689 else
13690   echo "$ac_t""no" 1>&6
13691 have_odbc=no
13692 fi
13693
13694                 if test $have_odbc = yes ; then
13695                         ol_link_sql="-lodbc"
13696                 fi
13697         fi
13698
13699         if test $ol_link_sql != no ; then
13700                 SLAPD_SQL_LIBS="$ol_link_sql"
13701
13702         elif test $ol_enable_sql != auto ; then
13703                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13704         fi
13705 fi
13706
13707 if test $ol_enable_tcl != no ; then
13708         for ac_hdr in tcl.h
13709 do
13710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13712 echo "configure:13713: checking for $ac_hdr" >&5
13713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13714   echo $ac_n "(cached) $ac_c" 1>&6
13715 else
13716   cat > conftest.$ac_ext <<EOF
13717 #line 13718 "configure"
13718 #include "confdefs.h"
13719 #include <$ac_hdr>
13720 EOF
13721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13722 { (eval echo configure:13723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13724 if test -z "$ac_err"; then
13725   rm -rf conftest*
13726   eval "ac_cv_header_$ac_safe=yes"
13727 else
13728   echo "$ac_err" >&5
13729   echo "configure: failed program was:" >&5
13730   cat conftest.$ac_ext >&5
13731   rm -rf conftest*
13732   eval "ac_cv_header_$ac_safe=no"
13733 fi
13734 rm -f conftest*
13735 fi
13736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13737   echo "$ac_t""yes" 1>&6
13738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13739   cat >> confdefs.h <<EOF
13740 #define $ac_tr_hdr 1
13741 EOF
13742  
13743 else
13744   echo "$ac_t""no" 1>&6
13745 fi
13746 done
13747
13748
13749         if test $ac_cv_header_tcl_h != yes ; then
13750                 have_tcl=no
13751         else
13752                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13753                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13754 echo "configure:13755: checking for main in -l$lib" >&5
13755 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13757   echo $ac_n "(cached) $ac_c" 1>&6
13758 else
13759   ac_save_LIBS="$LIBS"
13760 LIBS="-l$lib  $LIBS"
13761 cat > conftest.$ac_ext <<EOF
13762 #line 13763 "configure"
13763 #include "confdefs.h"
13764
13765 int main() {
13766 main()
13767 ; return 0; }
13768 EOF
13769 if { (eval echo configure:13770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13770   rm -rf conftest*
13771   eval "ac_cv_lib_$ac_lib_var=yes"
13772 else
13773   echo "configure: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   rm -rf conftest*
13776   eval "ac_cv_lib_$ac_lib_var=no"
13777 fi
13778 rm -f conftest*
13779 LIBS="$ac_save_LIBS"
13780
13781 fi
13782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13783   echo "$ac_t""yes" 1>&6
13784   have_tcl=yes
13785                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13786                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13787                            else
13788                                MOD_TCL_LIB="-l${lib}"
13789                            fi;break
13790 else
13791   echo "$ac_t""no" 1>&6
13792 have_tcl=no
13793 fi
13794
13795                 done
13796         fi
13797
13798         if test $have_tcl != yes ; then
13799                 echo "configure: warning: could not find -ltcl" 1>&2
13800                 if test $ol_enable_tcl = yes ; then
13801                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13802                 fi
13803
13804                 ol_enable_tcl=no
13805         fi
13806 fi
13807
13808 ol_link_termcap=no
13809 for ac_hdr in termcap.h ncurses.h
13810 do
13811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13813 echo "configure:13814: checking for $ac_hdr" >&5
13814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13815   echo $ac_n "(cached) $ac_c" 1>&6
13816 else
13817   cat > conftest.$ac_ext <<EOF
13818 #line 13819 "configure"
13819 #include "confdefs.h"
13820 #include <$ac_hdr>
13821 EOF
13822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13823 { (eval echo configure:13824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13825 if test -z "$ac_err"; then
13826   rm -rf conftest*
13827   eval "ac_cv_header_$ac_safe=yes"
13828 else
13829   echo "$ac_err" >&5
13830   echo "configure: failed program was:" >&5
13831   cat conftest.$ac_ext >&5
13832   rm -rf conftest*
13833   eval "ac_cv_header_$ac_safe=no"
13834 fi
13835 rm -f conftest*
13836 fi
13837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13838   echo "$ac_t""yes" 1>&6
13839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13840   cat >> confdefs.h <<EOF
13841 #define $ac_tr_hdr 1
13842 EOF
13843  
13844 else
13845   echo "$ac_t""no" 1>&6
13846 fi
13847 done
13848
13849
13850 if test $ol_link_termcap = no ; then
13851         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13852 echo "configure:13853: checking for tputs in -ltermcap" >&5
13853 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13854 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13855   echo $ac_n "(cached) $ac_c" 1>&6
13856 else
13857   ac_save_LIBS="$LIBS"
13858 LIBS="-ltermcap  $LIBS"
13859 cat > conftest.$ac_ext <<EOF
13860 #line 13861 "configure"
13861 #include "confdefs.h"
13862 /* Override any gcc2 internal prototype to avoid an error.  */
13863 /* We use char because int might match the return type of a gcc2
13864     builtin and then its argument prototype would still apply.  */
13865 char tputs();
13866
13867 int main() {
13868 tputs()
13869 ; return 0; }
13870 EOF
13871 if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13872   rm -rf conftest*
13873   eval "ac_cv_lib_$ac_lib_var=yes"
13874 else
13875   echo "configure: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   rm -rf conftest*
13878   eval "ac_cv_lib_$ac_lib_var=no"
13879 fi
13880 rm -f conftest*
13881 LIBS="$ac_save_LIBS"
13882
13883 fi
13884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13885   echo "$ac_t""yes" 1>&6
13886   have_termcap=yes
13887 else
13888   echo "$ac_t""no" 1>&6
13889 have_termcap=no
13890 fi
13891
13892         if test $have_termcap = yes ; then
13893                 cat >> confdefs.h <<\EOF
13894 #define HAVE_TERMCAP 1
13895 EOF
13896
13897                 ol_link_termcap=yes
13898                 TERMCAP_LIBS=-ltermcap
13899         fi
13900 fi
13901
13902 if test $ol_link_termcap = no ; then
13903         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13904 echo "configure:13905: checking for initscr in -lncurses" >&5
13905 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13907   echo $ac_n "(cached) $ac_c" 1>&6
13908 else
13909   ac_save_LIBS="$LIBS"
13910 LIBS="-lncurses  $LIBS"
13911 cat > conftest.$ac_ext <<EOF
13912 #line 13913 "configure"
13913 #include "confdefs.h"
13914 /* Override any gcc2 internal prototype to avoid an error.  */
13915 /* We use char because int might match the return type of a gcc2
13916     builtin and then its argument prototype would still apply.  */
13917 char initscr();
13918
13919 int main() {
13920 initscr()
13921 ; return 0; }
13922 EOF
13923 if { (eval echo configure:13924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13924   rm -rf conftest*
13925   eval "ac_cv_lib_$ac_lib_var=yes"
13926 else
13927   echo "configure: failed program was:" >&5
13928   cat conftest.$ac_ext >&5
13929   rm -rf conftest*
13930   eval "ac_cv_lib_$ac_lib_var=no"
13931 fi
13932 rm -f conftest*
13933 LIBS="$ac_save_LIBS"
13934
13935 fi
13936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13937   echo "$ac_t""yes" 1>&6
13938   have_ncurses=yes
13939 else
13940   echo "$ac_t""no" 1>&6
13941 have_ncurses=no
13942 fi
13943
13944         if test $have_ncurses = yes ; then
13945                 cat >> confdefs.h <<\EOF
13946 #define HAVE_NCURSES 1
13947 EOF
13948
13949                 ol_link_termcap=yes
13950                 TERMCAP_LIBS=-lncurses
13951         fi
13952 fi
13953
13954 if test $ol_link_termcap = no ; then
13955         cat >> confdefs.h <<\EOF
13956 #define NO_TERMCAP 1
13957 EOF
13958
13959         TERMCAP_LIBS=
13960 fi
13961
13962 ol_link_sasl=no
13963 ol_link_spasswd=no
13964 if test $ol_with_cyrus_sasl != no ; then
13965         for ac_hdr in sasl.h
13966 do
13967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13969 echo "configure:13970: checking for $ac_hdr" >&5
13970 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13971   echo $ac_n "(cached) $ac_c" 1>&6
13972 else
13973   cat > conftest.$ac_ext <<EOF
13974 #line 13975 "configure"
13975 #include "confdefs.h"
13976 #include <$ac_hdr>
13977 EOF
13978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13979 { (eval echo configure:13980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13981 if test -z "$ac_err"; then
13982   rm -rf conftest*
13983   eval "ac_cv_header_$ac_safe=yes"
13984 else
13985   echo "$ac_err" >&5
13986   echo "configure: failed program was:" >&5
13987   cat conftest.$ac_ext >&5
13988   rm -rf conftest*
13989   eval "ac_cv_header_$ac_safe=no"
13990 fi
13991 rm -f conftest*
13992 fi
13993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13994   echo "$ac_t""yes" 1>&6
13995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13996   cat >> confdefs.h <<EOF
13997 #define $ac_tr_hdr 1
13998 EOF
13999  
14000 else
14001   echo "$ac_t""no" 1>&6
14002 fi
14003 done
14004
14005
14006         if test $ac_cv_header_sasl_h = yes ; then
14007                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
14008 echo "configure:14009: checking for sasl_client_init in -lsasl" >&5
14009 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
14010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14011   echo $ac_n "(cached) $ac_c" 1>&6
14012 else
14013   ac_save_LIBS="$LIBS"
14014 LIBS="-lsasl  $LIBS"
14015 cat > conftest.$ac_ext <<EOF
14016 #line 14017 "configure"
14017 #include "confdefs.h"
14018 /* Override any gcc2 internal prototype to avoid an error.  */
14019 /* We use char because int might match the return type of a gcc2
14020     builtin and then its argument prototype would still apply.  */
14021 char sasl_client_init();
14022
14023 int main() {
14024 sasl_client_init()
14025 ; return 0; }
14026 EOF
14027 if { (eval echo configure:14028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14028   rm -rf conftest*
14029   eval "ac_cv_lib_$ac_lib_var=yes"
14030 else
14031   echo "configure: failed program was:" >&5
14032   cat conftest.$ac_ext >&5
14033   rm -rf conftest*
14034   eval "ac_cv_lib_$ac_lib_var=no"
14035 fi
14036 rm -f conftest*
14037 LIBS="$ac_save_LIBS"
14038
14039 fi
14040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14041   echo "$ac_t""yes" 1>&6
14042   have_cyrus_sasl=yes
14043 else
14044   echo "$ac_t""no" 1>&6
14045 have_cyrus_sasl=no
14046 fi
14047
14048
14049                 if test $have_cyrus_sasl != no ; then
14050                         SASL_LIBS="-lsasl"
14051                         cat >> confdefs.h <<\EOF
14052 #define HAVE_CYRUS_SASL 1
14053 EOF
14054
14055                         ol_link_sasl=yes
14056                 fi
14057         fi
14058
14059         if test $ol_link_sasl = no ; then
14060                 if test $ol_with_cyrus_sasl != auto ; then
14061                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
14062                 else
14063                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
14064                         echo "configure: warning: SASL authentication not supported!" 1>&2
14065                         if test $ol_link_tls = no ; then
14066                                 echo "configure: warning: Strong authentication not supported!" 1>&2
14067                         fi
14068                 fi
14069
14070         elif test $ol_enable_spasswd != no ; then
14071                 ol_link_spasswd=yes
14072         fi
14073
14074 else
14075         echo "configure: warning: SASL authentication not supported!" 1>&2
14076         if test $ol_link_tls = no ; then
14077                 echo "configure: warning: Strong authentication not supported!" 1>&2
14078         fi
14079 fi
14080
14081 if test $cross_compiling != yes ; then
14082         dev=no
14083         if test -r /dev/urandom ; then
14084                 dev="/dev/urandom";
14085         elif test -r /idev/urandom ; then
14086                 dev="/idev/urandom";
14087         elif test -r /dev/srandom ; then
14088                 dev="/dev/srandom";
14089         elif test -r /dev/random ; then
14090                 dev="/dev/random";
14091         elif test -r /idev/random ; then
14092                 dev="/idev/random";
14093         fi
14094
14095         if test $dev != no ; then
14096                 cat >> confdefs.h <<EOF
14097 #define URANDOM_DEVICE "$dev"
14098 EOF
14099
14100         fi
14101 fi
14102
14103 ol_link_fetch=no
14104 if test $ol_with_fetch != no ; then
14105         ol_LIBS=$LIBS
14106 LIBS="-lfetch -lcom_err $LIBS"
14107 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
14108 echo "configure:14109: checking fetch(3) library" >&5
14109 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
14110   echo $ac_n "(cached) $ac_c" 1>&6
14111 else
14112   
14113         cat > conftest.$ac_ext <<EOF
14114 #line 14115 "configure"
14115 #include "confdefs.h"
14116
14117 #include <sys/param.h>
14118 #include <stdio.h>
14119 #include <fetch.h>
14120 int main() {
14121 struct url *u = fetchParseURL("file:///"); 
14122 ; return 0; }
14123 EOF
14124 if { (eval echo configure:14125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14125   rm -rf conftest*
14126   ol_cv_lib_fetch=yes
14127 else
14128   echo "configure: failed program was:" >&5
14129   cat conftest.$ac_ext >&5
14130   rm -rf conftest*
14131   ol_cv_lib_fetch=no
14132 fi
14133 rm -f conftest*
14134 fi
14135
14136 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
14137 LIBS=$ol_LIBS
14138 if test $ol_cv_lib_fetch != no ; then
14139         ol_link_fetch="-lfetch -lcom_err"
14140         cat >> confdefs.h <<\EOF
14141 #define HAVE_FETCH 1
14142 EOF
14143
14144 fi
14145
14146
14147         if test $ol_cv_lib_fetch != no ; then
14148                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
14149                 ol_link_fetch=freebsd
14150
14151         elif test $ol_with_fetch != auto ; then
14152                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
14153         fi 
14154 fi
14155
14156 ol_link_readline=no
14157 if test $ol_with_readline != no ; then
14158         for ac_hdr in readline/readline.h readline/history.h
14159 do
14160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14162 echo "configure:14163: checking for $ac_hdr" >&5
14163 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14164   echo $ac_n "(cached) $ac_c" 1>&6
14165 else
14166   cat > conftest.$ac_ext <<EOF
14167 #line 14168 "configure"
14168 #include "confdefs.h"
14169 #include <$ac_hdr>
14170 EOF
14171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14172 { (eval echo configure:14173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14174 if test -z "$ac_err"; then
14175   rm -rf conftest*
14176   eval "ac_cv_header_$ac_safe=yes"
14177 else
14178   echo "$ac_err" >&5
14179   echo "configure: failed program was:" >&5
14180   cat conftest.$ac_ext >&5
14181   rm -rf conftest*
14182   eval "ac_cv_header_$ac_safe=no"
14183 fi
14184 rm -f conftest*
14185 fi
14186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14187   echo "$ac_t""yes" 1>&6
14188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14189   cat >> confdefs.h <<EOF
14190 #define $ac_tr_hdr 1
14191 EOF
14192  
14193 else
14194   echo "$ac_t""no" 1>&6
14195 fi
14196 done
14197
14198
14199         if test $ac_cv_header_readline_readline_h = yes ; then
14200                 save_LIBS="$LIBS"
14201                 LIBS="$TERMCAP_LIBS $LIBS"
14202                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14203 echo "configure:14204: checking for readline in -lreadline" >&5
14204 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
14205 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14206   echo $ac_n "(cached) $ac_c" 1>&6
14207 else
14208   ac_save_LIBS="$LIBS"
14209 LIBS="-lreadline  $LIBS"
14210 cat > conftest.$ac_ext <<EOF
14211 #line 14212 "configure"
14212 #include "confdefs.h"
14213 /* Override any gcc2 internal prototype to avoid an error.  */
14214 /* We use char because int might match the return type of a gcc2
14215     builtin and then its argument prototype would still apply.  */
14216 char readline();
14217
14218 int main() {
14219 readline()
14220 ; return 0; }
14221 EOF
14222 if { (eval echo configure:14223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14223   rm -rf conftest*
14224   eval "ac_cv_lib_$ac_lib_var=yes"
14225 else
14226   echo "configure: failed program was:" >&5
14227   cat conftest.$ac_ext >&5
14228   rm -rf conftest*
14229   eval "ac_cv_lib_$ac_lib_var=no"
14230 fi
14231 rm -f conftest*
14232 LIBS="$ac_save_LIBS"
14233
14234 fi
14235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14236   echo "$ac_t""yes" 1>&6
14237   have_readline=yes
14238 else
14239   echo "$ac_t""no" 1>&6
14240 have_readline=no
14241 fi
14242
14243                 LIBS="$save_LIBS"
14244                         
14245                 if test $have_readline = yes ; then
14246                         ol_with_readline=found
14247                         ol_link_readline=yes
14248
14249                         READLINE_LIBS="-lreadline"
14250                 fi
14251         fi
14252 fi
14253
14254 if test $ol_link_readline = yes ; then
14255         cat >> confdefs.h <<\EOF
14256 #define HAVE_READLINE 1
14257 EOF
14258
14259 fi
14260
14261
14262 if test $ol_enable_crypt != no ; then
14263         echo $ac_n "checking for crypt""... $ac_c" 1>&6
14264 echo "configure:14265: checking for crypt" >&5
14265 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14266   echo $ac_n "(cached) $ac_c" 1>&6
14267 else
14268   cat > conftest.$ac_ext <<EOF
14269 #line 14270 "configure"
14270 #include "confdefs.h"
14271 /* System header to define __stub macros and hopefully few prototypes,
14272     which can conflict with char crypt(); below.  */
14273 #include <assert.h>
14274 /* Override any gcc2 internal prototype to avoid an error.  */
14275 /* We use char because int might match the return type of a gcc2
14276     builtin and then its argument prototype would still apply.  */
14277 char crypt();
14278 char (*f)();
14279
14280 int main() {
14281
14282 /* The GNU C library defines this for functions which it implements
14283     to always fail with ENOSYS.  Some functions are actually named
14284     something starting with __ and the normal name is an alias.  */
14285 #if defined (__stub_crypt) || defined (__stub___crypt)
14286 choke me
14287 #else
14288 f = crypt;
14289 #endif
14290
14291 ; return 0; }
14292 EOF
14293 if { (eval echo configure:14294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14294   rm -rf conftest*
14295   eval "ac_cv_func_crypt=yes"
14296 else
14297   echo "configure: failed program was:" >&5
14298   cat conftest.$ac_ext >&5
14299   rm -rf conftest*
14300   eval "ac_cv_func_crypt=no"
14301 fi
14302 rm -f conftest*
14303 fi
14304
14305 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14306   echo "$ac_t""yes" 1>&6
14307   have_crypt=yes
14308 else
14309   echo "$ac_t""no" 1>&6
14310
14311                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14312 echo "configure:14313: checking for crypt in -lcrypt" >&5
14313 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14315   echo $ac_n "(cached) $ac_c" 1>&6
14316 else
14317   ac_save_LIBS="$LIBS"
14318 LIBS="-lcrypt  $LIBS"
14319 cat > conftest.$ac_ext <<EOF
14320 #line 14321 "configure"
14321 #include "confdefs.h"
14322 /* Override any gcc2 internal prototype to avoid an error.  */
14323 /* We use char because int might match the return type of a gcc2
14324     builtin and then its argument prototype would still apply.  */
14325 char crypt();
14326
14327 int main() {
14328 crypt()
14329 ; return 0; }
14330 EOF
14331 if { (eval echo configure:14332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14332   rm -rf conftest*
14333   eval "ac_cv_lib_$ac_lib_var=yes"
14334 else
14335   echo "configure: failed program was:" >&5
14336   cat conftest.$ac_ext >&5
14337   rm -rf conftest*
14338   eval "ac_cv_lib_$ac_lib_var=no"
14339 fi
14340 rm -f conftest*
14341 LIBS="$ac_save_LIBS"
14342
14343 fi
14344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14345   echo "$ac_t""yes" 1>&6
14346   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14347                         have_crypt=yes
14348 else
14349   echo "$ac_t""no" 1>&6
14350 have_crypt=no
14351 fi
14352
14353 fi
14354
14355
14356         if test $have_crypt = yes ; then
14357                 cat >> confdefs.h <<\EOF
14358 #define HAVE_CRYPT 1
14359 EOF
14360
14361         else
14362                 echo "configure: warning: could not find crypt" 1>&2
14363                 if test $ol_enable_crypt = yes ; then
14364                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14365                 fi
14366
14367                 echo "configure: warning: disabling crypt support" 1>&2
14368                 ol_enable_crypt=no
14369         fi
14370 fi
14371
14372 if test $ol_enable_proctitle != no ; then
14373         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14374 echo "configure:14375: checking for setproctitle" >&5
14375 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14376   echo $ac_n "(cached) $ac_c" 1>&6
14377 else
14378   cat > conftest.$ac_ext <<EOF
14379 #line 14380 "configure"
14380 #include "confdefs.h"
14381 /* System header to define __stub macros and hopefully few prototypes,
14382     which can conflict with char setproctitle(); below.  */
14383 #include <assert.h>
14384 /* Override any gcc2 internal prototype to avoid an error.  */
14385 /* We use char because int might match the return type of a gcc2
14386     builtin and then its argument prototype would still apply.  */
14387 char setproctitle();
14388 char (*f)();
14389
14390 int main() {
14391
14392 /* The GNU C library defines this for functions which it implements
14393     to always fail with ENOSYS.  Some functions are actually named
14394     something starting with __ and the normal name is an alias.  */
14395 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14396 choke me
14397 #else
14398 f = setproctitle;
14399 #endif
14400
14401 ; return 0; }
14402 EOF
14403 if { (eval echo configure:14404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14404   rm -rf conftest*
14405   eval "ac_cv_func_setproctitle=yes"
14406 else
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -rf conftest*
14410   eval "ac_cv_func_setproctitle=no"
14411 fi
14412 rm -f conftest*
14413 fi
14414
14415 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14416   echo "$ac_t""yes" 1>&6
14417   have_setproctitle=yes
14418 else
14419   echo "$ac_t""no" 1>&6
14420
14421                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14422 echo "configure:14423: checking for setproctitle in -lutil" >&5
14423 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14424 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14425   echo $ac_n "(cached) $ac_c" 1>&6
14426 else
14427   ac_save_LIBS="$LIBS"
14428 LIBS="-lutil  $LIBS"
14429 cat > conftest.$ac_ext <<EOF
14430 #line 14431 "configure"
14431 #include "confdefs.h"
14432 /* Override any gcc2 internal prototype to avoid an error.  */
14433 /* We use char because int might match the return type of a gcc2
14434     builtin and then its argument prototype would still apply.  */
14435 char setproctitle();
14436
14437 int main() {
14438 setproctitle()
14439 ; return 0; }
14440 EOF
14441 if { (eval echo configure:14442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14442   rm -rf conftest*
14443   eval "ac_cv_lib_$ac_lib_var=yes"
14444 else
14445   echo "configure: failed program was:" >&5
14446   cat conftest.$ac_ext >&5
14447   rm -rf conftest*
14448   eval "ac_cv_lib_$ac_lib_var=no"
14449 fi
14450 rm -f conftest*
14451 LIBS="$ac_save_LIBS"
14452
14453 fi
14454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14455   echo "$ac_t""yes" 1>&6
14456   have_setproctitle=yes
14457                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14458 else
14459   echo "$ac_t""no" 1>&6
14460 have_setproctitle=no
14461                         LIBOBJS="$LIBOBJS setproctitle.o"
14462                         LIBSRCS="$LIBSRCS setproctitle.c"
14463 fi
14464
14465 fi
14466
14467
14468         if test $have_setproctitle = yes ; then
14469                 cat >> confdefs.h <<\EOF
14470 #define HAVE_SETPROCTITLE 1
14471 EOF
14472
14473         fi
14474 fi
14475
14476 if test $ol_enable_slp != no ; then
14477         for ac_hdr in slp.h 
14478 do
14479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14481 echo "configure:14482: checking for $ac_hdr" >&5
14482 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14483   echo $ac_n "(cached) $ac_c" 1>&6
14484 else
14485   cat > conftest.$ac_ext <<EOF
14486 #line 14487 "configure"
14487 #include "confdefs.h"
14488 #include <$ac_hdr>
14489 EOF
14490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14491 { (eval echo configure:14492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14493 if test -z "$ac_err"; then
14494   rm -rf conftest*
14495   eval "ac_cv_header_$ac_safe=yes"
14496 else
14497   echo "$ac_err" >&5
14498   echo "configure: failed program was:" >&5
14499   cat conftest.$ac_ext >&5
14500   rm -rf conftest*
14501   eval "ac_cv_header_$ac_safe=no"
14502 fi
14503 rm -f conftest*
14504 fi
14505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14506   echo "$ac_t""yes" 1>&6
14507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14508   cat >> confdefs.h <<EOF
14509 #define $ac_tr_hdr 1
14510 EOF
14511  
14512 else
14513   echo "$ac_t""no" 1>&6
14514 fi
14515 done
14516
14517
14518         if test $ac_cv_header_slp_h = yes ; then
14519                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
14520 echo "configure:14521: checking for SLPOpen in -lslp" >&5
14521 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
14522 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14523   echo $ac_n "(cached) $ac_c" 1>&6
14524 else
14525   ac_save_LIBS="$LIBS"
14526 LIBS="-lslp  $LIBS"
14527 cat > conftest.$ac_ext <<EOF
14528 #line 14529 "configure"
14529 #include "confdefs.h"
14530 /* Override any gcc2 internal prototype to avoid an error.  */
14531 /* We use char because int might match the return type of a gcc2
14532     builtin and then its argument prototype would still apply.  */
14533 char SLPOpen();
14534
14535 int main() {
14536 SLPOpen()
14537 ; return 0; }
14538 EOF
14539 if { (eval echo configure:14540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14540   rm -rf conftest*
14541   eval "ac_cv_lib_$ac_lib_var=yes"
14542 else
14543   echo "configure: failed program was:" >&5
14544   cat conftest.$ac_ext >&5
14545   rm -rf conftest*
14546   eval "ac_cv_lib_$ac_lib_var=no"
14547 fi
14548 rm -f conftest*
14549 LIBS="$ac_save_LIBS"
14550
14551 fi
14552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14553   echo "$ac_t""yes" 1>&6
14554   have_slp=yes
14555 else
14556   echo "$ac_t""no" 1>&6
14557 have_slp=no
14558 fi
14559
14560                 if test $have_slp = yes ; then
14561                         cat >> confdefs.h <<\EOF
14562 #define HAVE_SLP 1
14563 EOF
14564
14565                         SLAPD_SLP_LIBS=-lslp
14566                 fi
14567
14568         elif test $ol_enable_slp = yes ; then
14569                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
14570         fi
14571 fi
14572
14573 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14574 echo "configure:14575: checking for ANSI C header files" >&5
14575 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14576   echo $ac_n "(cached) $ac_c" 1>&6
14577 else
14578   cat > conftest.$ac_ext <<EOF
14579 #line 14580 "configure"
14580 #include "confdefs.h"
14581 #include <stdlib.h>
14582 #include <stdarg.h>
14583 #include <string.h>
14584 #include <float.h>
14585 EOF
14586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14587 { (eval echo configure:14588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14589 if test -z "$ac_err"; then
14590   rm -rf conftest*
14591   ac_cv_header_stdc=yes
14592 else
14593   echo "$ac_err" >&5
14594   echo "configure: failed program was:" >&5
14595   cat conftest.$ac_ext >&5
14596   rm -rf conftest*
14597   ac_cv_header_stdc=no
14598 fi
14599 rm -f conftest*
14600
14601 if test $ac_cv_header_stdc = yes; then
14602   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14603 cat > conftest.$ac_ext <<EOF
14604 #line 14605 "configure"
14605 #include "confdefs.h"
14606 #include <string.h>
14607 EOF
14608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14609   egrep "memchr" >/dev/null 2>&1; then
14610   :
14611 else
14612   rm -rf conftest*
14613   ac_cv_header_stdc=no
14614 fi
14615 rm -f conftest*
14616
14617 fi
14618
14619 if test $ac_cv_header_stdc = yes; then
14620   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14621 cat > conftest.$ac_ext <<EOF
14622 #line 14623 "configure"
14623 #include "confdefs.h"
14624 #include <stdlib.h>
14625 EOF
14626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14627   egrep "free" >/dev/null 2>&1; then
14628   :
14629 else
14630   rm -rf conftest*
14631   ac_cv_header_stdc=no
14632 fi
14633 rm -f conftest*
14634
14635 fi
14636
14637 if test $ac_cv_header_stdc = yes; then
14638   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14639 if test "$cross_compiling" = yes; then
14640   :
14641 else
14642   cat > conftest.$ac_ext <<EOF
14643 #line 14644 "configure"
14644 #include "confdefs.h"
14645 #include <ctype.h>
14646 #if ((' ' & 0x0FF) == 0x020)
14647 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14648 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14649 #else
14650 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14651  || ('j' <= (c) && (c) <= 'r') \
14652  || ('s' <= (c) && (c) <= 'z'))
14653 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14654 #endif
14655 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14656 int main () { int i; for (i = 0; i < 256; i++)
14657 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14658 exit (0); }
14659
14660 EOF
14661 if { (eval echo configure:14662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14662 then
14663   :
14664 else
14665   echo "configure: failed program was:" >&5
14666   cat conftest.$ac_ext >&5
14667   rm -fr conftest*
14668   ac_cv_header_stdc=no
14669 fi
14670 rm -fr conftest*
14671 fi
14672
14673 fi
14674 fi
14675
14676 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14677 if test $ac_cv_header_stdc = yes; then
14678   cat >> confdefs.h <<\EOF
14679 #define STDC_HEADERS 1
14680 EOF
14681
14682 fi
14683
14684 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14685 echo "configure:14686: checking for mode_t" >&5
14686 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14687   echo $ac_n "(cached) $ac_c" 1>&6
14688 else
14689   cat > conftest.$ac_ext <<EOF
14690 #line 14691 "configure"
14691 #include "confdefs.h"
14692 #include <sys/types.h>
14693 #if STDC_HEADERS
14694 #include <stdlib.h>
14695 #include <stddef.h>
14696 #endif
14697
14698 EOF
14699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14700   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14701   rm -rf conftest*
14702   eval "ac_cv_type_mode_t=yes"
14703 else
14704   rm -rf conftest*
14705   eval "ac_cv_type_mode_t=no"
14706 fi
14707 rm -f conftest*
14708
14709 fi
14710 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14711   echo "$ac_t""yes" 1>&6
14712 else
14713   echo "$ac_t""no" 1>&6
14714   cat >> confdefs.h <<EOF
14715 #define mode_t int
14716 EOF
14717
14718 fi
14719
14720 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14721 echo "configure:14722: checking for off_t" >&5
14722 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14723   echo $ac_n "(cached) $ac_c" 1>&6
14724 else
14725   cat > conftest.$ac_ext <<EOF
14726 #line 14727 "configure"
14727 #include "confdefs.h"
14728 #include <sys/types.h>
14729 #if STDC_HEADERS
14730 #include <stdlib.h>
14731 #include <stddef.h>
14732 #endif
14733
14734 EOF
14735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14736   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14737   rm -rf conftest*
14738   eval "ac_cv_type_off_t=yes"
14739 else
14740   rm -rf conftest*
14741   eval "ac_cv_type_off_t=no"
14742 fi
14743 rm -f conftest*
14744
14745 fi
14746 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14747   echo "$ac_t""yes" 1>&6
14748 else
14749   echo "$ac_t""no" 1>&6
14750   cat >> confdefs.h <<EOF
14751 #define off_t long
14752 EOF
14753
14754 fi
14755
14756 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14757 echo "configure:14758: checking for pid_t" >&5
14758 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14759   echo $ac_n "(cached) $ac_c" 1>&6
14760 else
14761   cat > conftest.$ac_ext <<EOF
14762 #line 14763 "configure"
14763 #include "confdefs.h"
14764 #include <sys/types.h>
14765 #if STDC_HEADERS
14766 #include <stdlib.h>
14767 #include <stddef.h>
14768 #endif
14769
14770 EOF
14771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14772   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14773   rm -rf conftest*
14774   eval "ac_cv_type_pid_t=yes"
14775 else
14776   rm -rf conftest*
14777   eval "ac_cv_type_pid_t=no"
14778 fi
14779 rm -f conftest*
14780
14781 fi
14782 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14783   echo "$ac_t""yes" 1>&6
14784 else
14785   echo "$ac_t""no" 1>&6
14786   cat >> confdefs.h <<EOF
14787 #define pid_t int
14788 EOF
14789
14790 fi
14791
14792 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14793 echo "configure:14794: checking for ptrdiff_t" >&5
14794 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14795   echo $ac_n "(cached) $ac_c" 1>&6
14796 else
14797   cat > conftest.$ac_ext <<EOF
14798 #line 14799 "configure"
14799 #include "confdefs.h"
14800 #include <stddef.h>
14801 int main() {
14802 ptrdiff_t p
14803 ; return 0; }
14804 EOF
14805 if { (eval echo configure:14806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14806   rm -rf conftest*
14807   am_cv_type_ptrdiff_t=yes
14808 else
14809   echo "configure: failed program was:" >&5
14810   cat conftest.$ac_ext >&5
14811   rm -rf conftest*
14812   am_cv_type_ptrdiff_t=no
14813 fi
14814 rm -f conftest*
14815 fi
14816
14817 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14818    if test $am_cv_type_ptrdiff_t = yes; then
14819      cat >> confdefs.h <<\EOF
14820 #define HAVE_PTRDIFF_T 1
14821 EOF
14822
14823    fi
14824
14825 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14826 echo "configure:14827: checking return type of signal handlers" >&5
14827 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14828   echo $ac_n "(cached) $ac_c" 1>&6
14829 else
14830   cat > conftest.$ac_ext <<EOF
14831 #line 14832 "configure"
14832 #include "confdefs.h"
14833 #include <sys/types.h>
14834 #include <signal.h>
14835 #ifdef signal
14836 #undef signal
14837 #endif
14838 #ifdef __cplusplus
14839 extern "C" void (*signal (int, void (*)(int)))(int);
14840 #else
14841 void (*signal ()) ();
14842 #endif
14843
14844 int main() {
14845 int i;
14846 ; return 0; }
14847 EOF
14848 if { (eval echo configure:14849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14849   rm -rf conftest*
14850   ac_cv_type_signal=void
14851 else
14852   echo "configure: failed program was:" >&5
14853   cat conftest.$ac_ext >&5
14854   rm -rf conftest*
14855   ac_cv_type_signal=int
14856 fi
14857 rm -f conftest*
14858 fi
14859
14860 echo "$ac_t""$ac_cv_type_signal" 1>&6
14861 cat >> confdefs.h <<EOF
14862 #define RETSIGTYPE $ac_cv_type_signal
14863 EOF
14864
14865
14866 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14867 echo "configure:14868: checking for size_t" >&5
14868 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14869   echo $ac_n "(cached) $ac_c" 1>&6
14870 else
14871   cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874 #include <sys/types.h>
14875 #if STDC_HEADERS
14876 #include <stdlib.h>
14877 #include <stddef.h>
14878 #endif
14879
14880 EOF
14881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14882   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14883   rm -rf conftest*
14884   eval "ac_cv_type_size_t=yes"
14885 else
14886   rm -rf conftest*
14887   eval "ac_cv_type_size_t=no"
14888 fi
14889 rm -f conftest*
14890
14891 fi
14892 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14893   echo "$ac_t""yes" 1>&6
14894 else
14895   echo "$ac_t""no" 1>&6
14896   cat >> confdefs.h <<EOF
14897 #define size_t unsigned
14898 EOF
14899
14900 fi
14901
14902
14903 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14904 echo "configure:14905: checking for ssize_t" >&5
14905 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14906   echo $ac_n "(cached) $ac_c" 1>&6
14907 else
14908   cat > conftest.$ac_ext <<EOF
14909 #line 14910 "configure"
14910 #include "confdefs.h"
14911 #include <sys/types.h>
14912 #if STDC_HEADERS
14913 #include <stdlib.h>
14914 #include <stddef.h>
14915 #endif
14916
14917 EOF
14918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14919   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14920   rm -rf conftest*
14921   eval "ac_cv_type_ssize_t=yes"
14922 else
14923   rm -rf conftest*
14924   eval "ac_cv_type_ssize_t=no"
14925 fi
14926 rm -f conftest*
14927
14928 fi
14929 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14930   echo "$ac_t""yes" 1>&6
14931 else
14932   echo "$ac_t""no" 1>&6
14933   cat >> confdefs.h <<EOF
14934 #define ssize_t signed int
14935 EOF
14936
14937 fi
14938
14939 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14940 echo "configure:14941: checking for caddr_t" >&5
14941 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14942   echo $ac_n "(cached) $ac_c" 1>&6
14943 else
14944   cat > conftest.$ac_ext <<EOF
14945 #line 14946 "configure"
14946 #include "confdefs.h"
14947 #include <sys/types.h>
14948 #if STDC_HEADERS
14949 #include <stdlib.h>
14950 #include <stddef.h>
14951 #endif
14952
14953 EOF
14954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14955   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14956   rm -rf conftest*
14957   eval "ac_cv_type_caddr_t=yes"
14958 else
14959   rm -rf conftest*
14960   eval "ac_cv_type_caddr_t=no"
14961 fi
14962 rm -f conftest*
14963
14964 fi
14965 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14966   echo "$ac_t""yes" 1>&6
14967 else
14968   echo "$ac_t""no" 1>&6
14969   cat >> confdefs.h <<EOF
14970 #define caddr_t char *
14971 EOF
14972
14973 fi
14974
14975
14976 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14977 echo "configure:14978: checking for socklen_t" >&5
14978 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14979   echo $ac_n "(cached) $ac_c" 1>&6
14980 else
14981   cat > conftest.$ac_ext <<EOF
14982 #line 14983 "configure"
14983 #include "confdefs.h"
14984
14985 #ifdef HAVE_SYS_TYPES_H
14986 #include <sys/types.h>
14987 #endif
14988 #ifdef HAVE_SYS_SOCKET_H
14989 #include <sys/socket.h>
14990 #endif
14991
14992 int main() {
14993 socklen_t len;
14994 ; return 0; }
14995 EOF
14996 if { (eval echo configure:14997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14997   rm -rf conftest*
14998   ol_cv_type_socklen_t=yes
14999 else
15000   echo "configure: failed program was:" >&5
15001   cat conftest.$ac_ext >&5
15002   rm -rf conftest*
15003   ol_cv_type_socklen_t=no
15004 fi
15005 rm -f conftest*
15006 fi
15007
15008 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
15009   if test $ol_cv_type_socklen_t = no; then
15010     cat >> confdefs.h <<\EOF
15011 #define socklen_t int
15012 EOF
15013
15014   fi
15015  
15016 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
15017 echo "configure:15018: checking for member st_blksize in aggregate type struct stat" >&5
15018 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
15019   echo $ac_n "(cached) $ac_c" 1>&6
15020 else
15021   cat > conftest.$ac_ext <<EOF
15022 #line 15023 "configure"
15023 #include "confdefs.h"
15024 #include <sys/types.h>
15025 #include <sys/stat.h>
15026 int main() {
15027 struct stat foo; foo.st_blksize;
15028 ; return 0; }
15029 EOF
15030 if { (eval echo configure:15031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15031   rm -rf conftest*
15032   ac_cv_c_struct_member_st_blksize=yes
15033 else
15034   echo "configure: failed program was:" >&5
15035   cat conftest.$ac_ext >&5
15036   rm -rf conftest*
15037   ac_cv_c_struct_member_st_blksize=no
15038 fi
15039 rm -f conftest*
15040 fi
15041
15042 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
15043 st_blksize="$ac_cv_c_struct_member_st_blksize"
15044 if test $ac_cv_c_struct_member_st_blksize = yes; then
15045   cat >> confdefs.h <<\EOF
15046 #define HAVE_ST_BLKSIZE 1
15047 EOF
15048
15049 fi
15050
15051 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
15052 echo "configure:15053: checking whether time.h and sys/time.h may both be included" >&5
15053 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
15054   echo $ac_n "(cached) $ac_c" 1>&6
15055 else
15056   cat > conftest.$ac_ext <<EOF
15057 #line 15058 "configure"
15058 #include "confdefs.h"
15059 #include <sys/types.h>
15060 #include <sys/time.h>
15061 #include <time.h>
15062 int main() {
15063 struct tm *tp;
15064 ; return 0; }
15065 EOF
15066 if { (eval echo configure:15067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15067   rm -rf conftest*
15068   ac_cv_header_time=yes
15069 else
15070   echo "configure: failed program was:" >&5
15071   cat conftest.$ac_ext >&5
15072   rm -rf conftest*
15073   ac_cv_header_time=no
15074 fi
15075 rm -f conftest*
15076 fi
15077
15078 echo "$ac_t""$ac_cv_header_time" 1>&6
15079 if test $ac_cv_header_time = yes; then
15080   cat >> confdefs.h <<\EOF
15081 #define TIME_WITH_SYS_TIME 1
15082 EOF
15083
15084 fi
15085
15086 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
15087 echo "configure:15088: checking whether struct tm is in sys/time.h or time.h" >&5
15088 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
15089   echo $ac_n "(cached) $ac_c" 1>&6
15090 else
15091   cat > conftest.$ac_ext <<EOF
15092 #line 15093 "configure"
15093 #include "confdefs.h"
15094 #include <sys/types.h>
15095 #include <time.h>
15096 int main() {
15097 struct tm *tp; tp->tm_sec;
15098 ; return 0; }
15099 EOF
15100 if { (eval echo configure:15101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15101   rm -rf conftest*
15102   ac_cv_struct_tm=time.h
15103 else
15104   echo "configure: failed program was:" >&5
15105   cat conftest.$ac_ext >&5
15106   rm -rf conftest*
15107   ac_cv_struct_tm=sys/time.h
15108 fi
15109 rm -f conftest*
15110 fi
15111
15112 echo "$ac_t""$ac_cv_struct_tm" 1>&6
15113 if test $ac_cv_struct_tm = sys/time.h; then
15114   cat >> confdefs.h <<\EOF
15115 #define TM_IN_SYS_TIME 1
15116 EOF
15117
15118 fi
15119
15120 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15121 echo "configure:15122: checking for uid_t in sys/types.h" >&5
15122 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
15123   echo $ac_n "(cached) $ac_c" 1>&6
15124 else
15125   cat > conftest.$ac_ext <<EOF
15126 #line 15127 "configure"
15127 #include "confdefs.h"
15128 #include <sys/types.h>
15129 EOF
15130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15131   egrep "uid_t" >/dev/null 2>&1; then
15132   rm -rf conftest*
15133   ac_cv_type_uid_t=yes
15134 else
15135   rm -rf conftest*
15136   ac_cv_type_uid_t=no
15137 fi
15138 rm -f conftest*
15139
15140 fi
15141
15142 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
15143 if test $ac_cv_type_uid_t = no; then
15144   cat >> confdefs.h <<\EOF
15145 #define uid_t int
15146 EOF
15147
15148   cat >> confdefs.h <<\EOF
15149 #define gid_t int
15150 EOF
15151
15152 fi
15153
15154 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
15155 echo "configure:15156: checking for sig_atomic_t" >&5
15156 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
15157   echo $ac_n "(cached) $ac_c" 1>&6
15158 else
15159   cat > conftest.$ac_ext <<EOF
15160 #line 15161 "configure"
15161 #include "confdefs.h"
15162 #include <signal.h>
15163 int main() {
15164 sig_atomic_t atomic;
15165 ; return 0; }
15166 EOF
15167 if { (eval echo configure:15168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15168   rm -rf conftest*
15169   ol_cv_type_sig_atomic_t=yes
15170 else
15171   echo "configure: failed program was:" >&5
15172   cat conftest.$ac_ext >&5
15173   rm -rf conftest*
15174   ol_cv_type_sig_atomic_t=no
15175 fi
15176 rm -f conftest*
15177 fi
15178
15179 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
15180   if test $ol_cv_type_sig_atomic_t = no; then
15181     cat >> confdefs.h <<\EOF
15182 #define sig_atomic_t int
15183 EOF
15184
15185   fi
15186  
15187
15188
15189 # test for pw_gecos in struct passwd
15190 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
15191 echo "configure:15192: checking struct passwd for pw_gecos" >&5
15192 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
15193   echo $ac_n "(cached) $ac_c" 1>&6
15194 else
15195   
15196         cat > conftest.$ac_ext <<EOF
15197 #line 15198 "configure"
15198 #include "confdefs.h"
15199 #include <pwd.h>
15200 int main() {
15201
15202         struct passwd pwd;
15203         pwd.pw_gecos = pwd.pw_name;
15204
15205 ; return 0; }
15206 EOF
15207 if { (eval echo configure:15208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15208   rm -rf conftest*
15209   ol_cv_struct_passwd_pw_gecos=yes
15210 else
15211   echo "configure: failed program was:" >&5
15212   cat conftest.$ac_ext >&5
15213   rm -rf conftest*
15214   ol_cv_struct_passwd_pw_gecos=no
15215 fi
15216 rm -f conftest*
15217 fi
15218
15219 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
15220 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
15221         cat >> confdefs.h <<\EOF
15222 #define HAVE_PW_GECOS 1
15223 EOF
15224
15225 fi
15226
15227 # test for pw_passwd in struct passwd
15228 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
15229 echo "configure:15230: checking struct passwd for pw_passwd" >&5
15230 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
15231   echo $ac_n "(cached) $ac_c" 1>&6
15232 else
15233   
15234         cat > conftest.$ac_ext <<EOF
15235 #line 15236 "configure"
15236 #include "confdefs.h"
15237 #include <pwd.h>
15238 int main() {
15239
15240         struct passwd pwd;
15241         pwd.pw_passwd = pwd.pw_name;
15242
15243 ; return 0; }
15244 EOF
15245 if { (eval echo configure:15246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15246   rm -rf conftest*
15247   ol_cv_struct_passwd_pw_passwd=yes
15248 else
15249   echo "configure: failed program was:" >&5
15250   cat conftest.$ac_ext >&5
15251   rm -rf conftest*
15252   ol_cv_struct_passwd_pw_passwd=no
15253 fi
15254 rm -f conftest*
15255 fi
15256
15257 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
15258 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
15259         cat >> confdefs.h <<\EOF
15260 #define HAVE_PW_PASSWD 1
15261 EOF
15262
15263 fi
15264
15265
15266 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
15267 echo "configure:15268: checking if toupper() requires islower()" >&5
15268 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
15269   echo $ac_n "(cached) $ac_c" 1>&6
15270 else
15271   
15272         if test "$cross_compiling" = yes; then
15273   ol_cv_c_upper_lower=safe
15274 else
15275   cat > conftest.$ac_ext <<EOF
15276 #line 15277 "configure"
15277 #include "confdefs.h"
15278
15279 #include <ctype.h>
15280 main()
15281 {
15282         if ('C' == toupper('C'))
15283                 exit(0);
15284         else
15285                 exit(1);
15286 }
15287 EOF
15288 if { (eval echo configure:15289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15289 then
15290   ol_cv_c_upper_lower=no
15291 else
15292   echo "configure: failed program was:" >&5
15293   cat conftest.$ac_ext >&5
15294   rm -fr conftest*
15295   ol_cv_c_upper_lower=yes
15296 fi
15297 rm -fr conftest*
15298 fi
15299
15300 fi
15301
15302 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
15303 if test $ol_cv_c_upper_lower != no ; then
15304         cat >> confdefs.h <<\EOF
15305 #define C_UPPER_LOWER 1
15306 EOF
15307
15308 fi
15309
15310 echo $ac_n "checking for working const""... $ac_c" 1>&6
15311 echo "configure:15312: checking for working const" >&5
15312 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15313   echo $ac_n "(cached) $ac_c" 1>&6
15314 else
15315   cat > conftest.$ac_ext <<EOF
15316 #line 15317 "configure"
15317 #include "confdefs.h"
15318
15319 int main() {
15320
15321 /* Ultrix mips cc rejects this.  */
15322 typedef int charset[2]; const charset x;
15323 /* SunOS 4.1.1 cc rejects this.  */
15324 char const *const *ccp;
15325 char **p;
15326 /* NEC SVR4.0.2 mips cc rejects this.  */
15327 struct point {int x, y;};
15328 static struct point const zero = {0,0};
15329 /* AIX XL C 1.02.0.0 rejects this.
15330    It does not let you subtract one const X* pointer from another in an arm
15331    of an if-expression whose if-part is not a constant expression */
15332 const char *g = "string";
15333 ccp = &g + (g ? g-g : 0);
15334 /* HPUX 7.0 cc rejects these. */
15335 ++ccp;
15336 p = (char**) ccp;
15337 ccp = (char const *const *) p;
15338 { /* SCO 3.2v4 cc rejects this.  */
15339   char *t;
15340   char const *s = 0 ? (char *) 0 : (char const *) 0;
15341
15342   *t++ = 0;
15343 }
15344 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15345   int x[] = {25, 17};
15346   const int *foo = &x[0];
15347   ++foo;
15348 }
15349 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15350   typedef const int *iptr;
15351   iptr p = 0;
15352   ++p;
15353 }
15354 { /* AIX XL C 1.02.0.0 rejects this saying
15355      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15356   struct s { int j; const int *ap[3]; };
15357   struct s *b; b->j = 5;
15358 }
15359 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15360   const int foo = 10;
15361 }
15362
15363 ; return 0; }
15364 EOF
15365 if { (eval echo configure:15366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15366   rm -rf conftest*
15367   ac_cv_c_const=yes
15368 else
15369   echo "configure: failed program was:" >&5
15370   cat conftest.$ac_ext >&5
15371   rm -rf conftest*
15372   ac_cv_c_const=no
15373 fi
15374 rm -f conftest*
15375 fi
15376
15377 echo "$ac_t""$ac_cv_c_const" 1>&6
15378 if test $ac_cv_c_const = no; then
15379   cat >> confdefs.h <<\EOF
15380 #define const 
15381 EOF
15382
15383 fi
15384
15385 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15386 echo "configure:15387: checking if compiler understands volatile" >&5
15387 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15388   echo $ac_n "(cached) $ac_c" 1>&6
15389 else
15390   cat > conftest.$ac_ext <<EOF
15391 #line 15392 "configure"
15392 #include "confdefs.h"
15393 int x, y, z;
15394 int main() {
15395 volatile int a; int * volatile b = x ? &y : &z;
15396       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15397       *b = 0;
15398 ; return 0; }
15399 EOF
15400 if { (eval echo configure:15401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15401   rm -rf conftest*
15402   ol_cv_c_volatile=yes
15403 else
15404   echo "configure: failed program was:" >&5
15405   cat conftest.$ac_ext >&5
15406   rm -rf conftest*
15407   ol_cv_c_volatile=no
15408 fi
15409 rm -f conftest*
15410 fi
15411
15412 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15413   if test $ol_cv_c_volatile = yes; then
15414     : 
15415   else
15416     cat >> confdefs.h <<\EOF
15417 #define volatile 
15418 EOF
15419
15420   fi
15421  
15422
15423 if test $cross_compiling = yes ; then
15424         cat >> confdefs.h <<\EOF
15425 #define CROSS_COMPILING 1
15426 EOF
15427
15428 else
15429         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15430 echo "configure:15431: checking whether byte ordering is bigendian" >&5
15431 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15432   echo $ac_n "(cached) $ac_c" 1>&6
15433 else
15434   ac_cv_c_bigendian=unknown
15435 # See if sys/param.h defines the BYTE_ORDER macro.
15436 cat > conftest.$ac_ext <<EOF
15437 #line 15438 "configure"
15438 #include "confdefs.h"
15439 #include <sys/types.h>
15440 #include <sys/param.h>
15441 int main() {
15442
15443 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15444  bogus endian macros
15445 #endif
15446 ; return 0; }
15447 EOF
15448 if { (eval echo configure:15449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15449   rm -rf conftest*
15450   # It does; now see whether it defined to BIG_ENDIAN or not.
15451 cat > conftest.$ac_ext <<EOF
15452 #line 15453 "configure"
15453 #include "confdefs.h"
15454 #include <sys/types.h>
15455 #include <sys/param.h>
15456 int main() {
15457
15458 #if BYTE_ORDER != BIG_ENDIAN
15459  not big endian
15460 #endif
15461 ; return 0; }
15462 EOF
15463 if { (eval echo configure:15464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15464   rm -rf conftest*
15465   ac_cv_c_bigendian=yes
15466 else
15467   echo "configure: failed program was:" >&5
15468   cat conftest.$ac_ext >&5
15469   rm -rf conftest*
15470   ac_cv_c_bigendian=no
15471 fi
15472 rm -f conftest*
15473 else
15474   echo "configure: failed program was:" >&5
15475   cat conftest.$ac_ext >&5
15476 fi
15477 rm -f conftest*
15478 if test $ac_cv_c_bigendian = unknown; then
15479 if test "$cross_compiling" = yes; then
15480     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15481 else
15482   cat > conftest.$ac_ext <<EOF
15483 #line 15484 "configure"
15484 #include "confdefs.h"
15485 main () {
15486   /* Are we little or big endian?  From Harbison&Steele.  */
15487   union
15488   {
15489     long l;
15490     char c[sizeof (long)];
15491   } u;
15492   u.l = 1;
15493   exit (u.c[sizeof (long) - 1] == 1);
15494 }
15495 EOF
15496 if { (eval echo configure:15497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15497 then
15498   ac_cv_c_bigendian=no
15499 else
15500   echo "configure: failed program was:" >&5
15501   cat conftest.$ac_ext >&5
15502   rm -fr conftest*
15503   ac_cv_c_bigendian=yes
15504 fi
15505 rm -fr conftest*
15506 fi
15507
15508 fi
15509 fi
15510
15511 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15512 if test $ac_cv_c_bigendian = yes; then
15513   cat >> confdefs.h <<\EOF
15514 #define WORDS_BIGENDIAN 1
15515 EOF
15516
15517 fi
15518
15519 fi
15520
15521 echo $ac_n "checking size of short""... $ac_c" 1>&6
15522 echo "configure:15523: checking size of short" >&5 
15523 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15524   echo $ac_n "(cached) $ac_c" 1>&6
15525 else
15526   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15527   cat > conftest.$ac_ext <<EOF
15528 #line 15529 "configure"
15529 #include "confdefs.h"
15530 #include "confdefs.h" 
15531 #include <sys/types.h> 
15532  
15533
15534 int main() {
15535 switch (0) case 0: case (sizeof (short) == $ac_size):;
15536 ; return 0; }
15537 EOF
15538 if { (eval echo configure:15539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15539   rm -rf conftest*
15540   ac_cv_sizeof_short=$ac_size
15541 else
15542   echo "configure: failed program was:" >&5
15543   cat conftest.$ac_ext >&5
15544 fi
15545 rm -f conftest* 
15546   if test x$ac_cv_sizeof_short != x ; then break; fi 
15547 done 
15548
15549 fi
15550  
15551 if test x$ac_cv_sizeof_short = x ; then 
15552   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15553 fi 
15554 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15555 cat >> confdefs.h <<EOF
15556 #define SIZEOF_SHORT $ac_cv_sizeof_short
15557 EOF
15558  
15559  
15560 echo $ac_n "checking size of int""... $ac_c" 1>&6
15561 echo "configure:15562: checking size of int" >&5 
15562 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15563   echo $ac_n "(cached) $ac_c" 1>&6
15564 else
15565   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15566   cat > conftest.$ac_ext <<EOF
15567 #line 15568 "configure"
15568 #include "confdefs.h"
15569 #include "confdefs.h" 
15570 #include <sys/types.h> 
15571  
15572
15573 int main() {
15574 switch (0) case 0: case (sizeof (int) == $ac_size):;
15575 ; return 0; }
15576 EOF
15577 if { (eval echo configure:15578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15578   rm -rf conftest*
15579   ac_cv_sizeof_int=$ac_size
15580 else
15581   echo "configure: failed program was:" >&5
15582   cat conftest.$ac_ext >&5
15583 fi
15584 rm -f conftest* 
15585   if test x$ac_cv_sizeof_int != x ; then break; fi 
15586 done 
15587
15588 fi
15589  
15590 if test x$ac_cv_sizeof_int = x ; then 
15591   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15592 fi 
15593 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15594 cat >> confdefs.h <<EOF
15595 #define SIZEOF_INT $ac_cv_sizeof_int
15596 EOF
15597  
15598  
15599 echo $ac_n "checking size of long""... $ac_c" 1>&6
15600 echo "configure:15601: checking size of long" >&5 
15601 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15602   echo $ac_n "(cached) $ac_c" 1>&6
15603 else
15604   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15605   cat > conftest.$ac_ext <<EOF
15606 #line 15607 "configure"
15607 #include "confdefs.h"
15608 #include "confdefs.h" 
15609 #include <sys/types.h> 
15610  
15611
15612 int main() {
15613 switch (0) case 0: case (sizeof (long) == $ac_size):;
15614 ; return 0; }
15615 EOF
15616 if { (eval echo configure:15617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15617   rm -rf conftest*
15618   ac_cv_sizeof_long=$ac_size
15619 else
15620   echo "configure: failed program was:" >&5
15621   cat conftest.$ac_ext >&5
15622 fi
15623 rm -f conftest* 
15624   if test x$ac_cv_sizeof_long != x ; then break; fi 
15625 done 
15626
15627 fi
15628  
15629 if test x$ac_cv_sizeof_long = x ; then 
15630   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15631 fi 
15632 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15633 cat >> confdefs.h <<EOF
15634 #define SIZEOF_LONG $ac_cv_sizeof_long
15635 EOF
15636  
15637
15638
15639 if test "$ac_cv_sizeof_int" -lt 4 ; then
15640         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15641
15642         cat >> confdefs.h <<\EOF
15643 #define LBER_INT_T long
15644 EOF
15645
15646 else
15647         cat >> confdefs.h <<\EOF
15648 #define LBER_INT_T int
15649 EOF
15650
15651 fi
15652
15653 cat >> confdefs.h <<\EOF
15654 #define LBER_LEN_T long
15655 EOF
15656
15657 cat >> confdefs.h <<\EOF
15658 #define LBER_SOCKET_T int
15659 EOF
15660
15661 cat >> confdefs.h <<\EOF
15662 #define LBER_TAG_T long
15663 EOF
15664
15665
15666 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15667 echo "configure:15668: checking for 8-bit clean memcmp" >&5
15668 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15669   echo $ac_n "(cached) $ac_c" 1>&6
15670 else
15671   if test "$cross_compiling" = yes; then
15672   ac_cv_func_memcmp_clean=no
15673 else
15674   cat > conftest.$ac_ext <<EOF
15675 #line 15676 "configure"
15676 #include "confdefs.h"
15677
15678 main()
15679 {
15680   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15681   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15682 }
15683
15684 EOF
15685 if { (eval echo configure:15686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15686 then
15687   ac_cv_func_memcmp_clean=yes
15688 else
15689   echo "configure: failed program was:" >&5
15690   cat conftest.$ac_ext >&5
15691   rm -fr conftest*
15692   ac_cv_func_memcmp_clean=no
15693 fi
15694 rm -fr conftest*
15695 fi
15696
15697 fi
15698
15699 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15700 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15701
15702 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15703 echo "configure:15704: checking for strftime" >&5
15704 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15705   echo $ac_n "(cached) $ac_c" 1>&6
15706 else
15707   cat > conftest.$ac_ext <<EOF
15708 #line 15709 "configure"
15709 #include "confdefs.h"
15710 /* System header to define __stub macros and hopefully few prototypes,
15711     which can conflict with char strftime(); below.  */
15712 #include <assert.h>
15713 /* Override any gcc2 internal prototype to avoid an error.  */
15714 /* We use char because int might match the return type of a gcc2
15715     builtin and then its argument prototype would still apply.  */
15716 char strftime();
15717 char (*f)();
15718
15719 int main() {
15720
15721 /* The GNU C library defines this for functions which it implements
15722     to always fail with ENOSYS.  Some functions are actually named
15723     something starting with __ and the normal name is an alias.  */
15724 #if defined (__stub_strftime) || defined (__stub___strftime)
15725 choke me
15726 #else
15727 f = strftime;
15728 #endif
15729
15730 ; return 0; }
15731 EOF
15732 if { (eval echo configure:15733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15733   rm -rf conftest*
15734   eval "ac_cv_func_strftime=yes"
15735 else
15736   echo "configure: failed program was:" >&5
15737   cat conftest.$ac_ext >&5
15738   rm -rf conftest*
15739   eval "ac_cv_func_strftime=no"
15740 fi
15741 rm -f conftest*
15742 fi
15743
15744 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15745   echo "$ac_t""yes" 1>&6
15746   cat >> confdefs.h <<\EOF
15747 #define HAVE_STRFTIME 1
15748 EOF
15749
15750 else
15751   echo "$ac_t""no" 1>&6
15752 # strftime is in -lintl on SCO UNIX.
15753 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15754 echo "configure:15755: checking for strftime in -lintl" >&5
15755 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15757   echo $ac_n "(cached) $ac_c" 1>&6
15758 else
15759   ac_save_LIBS="$LIBS"
15760 LIBS="-lintl  $LIBS"
15761 cat > conftest.$ac_ext <<EOF
15762 #line 15763 "configure"
15763 #include "confdefs.h"
15764 /* Override any gcc2 internal prototype to avoid an error.  */
15765 /* We use char because int might match the return type of a gcc2
15766     builtin and then its argument prototype would still apply.  */
15767 char strftime();
15768
15769 int main() {
15770 strftime()
15771 ; return 0; }
15772 EOF
15773 if { (eval echo configure:15774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15774   rm -rf conftest*
15775   eval "ac_cv_lib_$ac_lib_var=yes"
15776 else
15777   echo "configure: failed program was:" >&5
15778   cat conftest.$ac_ext >&5
15779   rm -rf conftest*
15780   eval "ac_cv_lib_$ac_lib_var=no"
15781 fi
15782 rm -f conftest*
15783 LIBS="$ac_save_LIBS"
15784
15785 fi
15786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15787   echo "$ac_t""yes" 1>&6
15788   cat >> confdefs.h <<\EOF
15789 #define HAVE_STRFTIME 1
15790 EOF
15791
15792 LIBS="-lintl $LIBS"
15793 else
15794   echo "$ac_t""no" 1>&6
15795 fi
15796
15797 fi
15798
15799
15800 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15801 echo "configure:15802: checking for inet_aton()" >&5
15802 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15803   echo $ac_n "(cached) $ac_c" 1>&6
15804 else
15805   cat > conftest.$ac_ext <<EOF
15806 #line 15807 "configure"
15807 #include "confdefs.h"
15808
15809 #ifdef HAVE_SYS_TYPES_H
15810 #       include <sys/types.h>
15811 #endif
15812 #ifdef HAVE_SYS_SOCKET_H
15813 #       include <sys/socket.h>
15814 #       ifdef HAVE_SYS_SELECT_H
15815 #               include <sys/select.h>
15816 #       endif
15817 #       include <netinet/in.h>
15818 #       ifdef HAVE_ARPA_INET_H
15819 #               include <arpa/inet.h>
15820 #       endif
15821 #endif
15822
15823 int main() {
15824 struct in_addr in;
15825 int rc = inet_aton( "255.255.255.255", &in );
15826 ; return 0; }
15827 EOF
15828 if { (eval echo configure:15829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15829   rm -rf conftest*
15830   ol_cv_func_inet_aton=yes
15831 else
15832   echo "configure: failed program was:" >&5
15833   cat conftest.$ac_ext >&5
15834   rm -rf conftest*
15835   ol_cv_func_inet_aton=no
15836 fi
15837 rm -f conftest*
15838 fi
15839
15840 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15841   if test $ol_cv_func_inet_aton != no; then
15842     cat >> confdefs.h <<\EOF
15843 #define HAVE_INET_ATON 1
15844 EOF
15845
15846   fi
15847  
15848
15849 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15850 echo "configure:15851: checking for _spawnlp" >&5
15851 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15852   echo $ac_n "(cached) $ac_c" 1>&6
15853 else
15854   cat > conftest.$ac_ext <<EOF
15855 #line 15856 "configure"
15856 #include "confdefs.h"
15857 /* System header to define __stub macros and hopefully few prototypes,
15858     which can conflict with char _spawnlp(); below.  */
15859 #include <assert.h>
15860 /* Override any gcc2 internal prototype to avoid an error.  */
15861 /* We use char because int might match the return type of a gcc2
15862     builtin and then its argument prototype would still apply.  */
15863 char _spawnlp();
15864 char (*f)();
15865
15866 int main() {
15867
15868 /* The GNU C library defines this for functions which it implements
15869     to always fail with ENOSYS.  Some functions are actually named
15870     something starting with __ and the normal name is an alias.  */
15871 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15872 choke me
15873 #else
15874 f = _spawnlp;
15875 #endif
15876
15877 ; return 0; }
15878 EOF
15879 if { (eval echo configure:15880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15880   rm -rf conftest*
15881   eval "ac_cv_func__spawnlp=yes"
15882 else
15883   echo "configure: failed program was:" >&5
15884   cat conftest.$ac_ext >&5
15885   rm -rf conftest*
15886   eval "ac_cv_func__spawnlp=no"
15887 fi
15888 rm -f conftest*
15889 fi
15890
15891 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15892   echo "$ac_t""yes" 1>&6
15893   cat >> confdefs.h <<\EOF
15894 #define HAVE_SPAWNLP 1
15895 EOF
15896
15897 else
15898   echo "$ac_t""no" 1>&6
15899 fi
15900
15901
15902 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15903 echo "configure:15904: checking for _snprintf" >&5
15904 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15905   echo $ac_n "(cached) $ac_c" 1>&6
15906 else
15907   cat > conftest.$ac_ext <<EOF
15908 #line 15909 "configure"
15909 #include "confdefs.h"
15910 /* System header to define __stub macros and hopefully few prototypes,
15911     which can conflict with char _snprintf(); below.  */
15912 #include <assert.h>
15913 /* Override any gcc2 internal prototype to avoid an error.  */
15914 /* We use char because int might match the return type of a gcc2
15915     builtin and then its argument prototype would still apply.  */
15916 char _snprintf();
15917 char (*f)();
15918
15919 int main() {
15920
15921 /* The GNU C library defines this for functions which it implements
15922     to always fail with ENOSYS.  Some functions are actually named
15923     something starting with __ and the normal name is an alias.  */
15924 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15925 choke me
15926 #else
15927 f = _snprintf;
15928 #endif
15929
15930 ; return 0; }
15931 EOF
15932 if { (eval echo configure:15933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15933   rm -rf conftest*
15934   eval "ac_cv_func__snprintf=yes"
15935 else
15936   echo "configure: failed program was:" >&5
15937   cat conftest.$ac_ext >&5
15938   rm -rf conftest*
15939   eval "ac_cv_func__snprintf=no"
15940 fi
15941 rm -f conftest*
15942 fi
15943
15944 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15945   echo "$ac_t""yes" 1>&6
15946   ac_cv_func_snprintf=yes
15947         cat >> confdefs.h <<\EOF
15948 #define snprintf _snprintf
15949 EOF
15950
15951
15952 else
15953   echo "$ac_t""no" 1>&6
15954 fi
15955
15956
15957 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15958 echo "configure:15959: checking for _vsnprintf" >&5
15959 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15960   echo $ac_n "(cached) $ac_c" 1>&6
15961 else
15962   cat > conftest.$ac_ext <<EOF
15963 #line 15964 "configure"
15964 #include "confdefs.h"
15965 /* System header to define __stub macros and hopefully few prototypes,
15966     which can conflict with char _vsnprintf(); below.  */
15967 #include <assert.h>
15968 /* Override any gcc2 internal prototype to avoid an error.  */
15969 /* We use char because int might match the return type of a gcc2
15970     builtin and then its argument prototype would still apply.  */
15971 char _vsnprintf();
15972 char (*f)();
15973
15974 int main() {
15975
15976 /* The GNU C library defines this for functions which it implements
15977     to always fail with ENOSYS.  Some functions are actually named
15978     something starting with __ and the normal name is an alias.  */
15979 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15980 choke me
15981 #else
15982 f = _vsnprintf;
15983 #endif
15984
15985 ; return 0; }
15986 EOF
15987 if { (eval echo configure:15988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15988   rm -rf conftest*
15989   eval "ac_cv_func__vsnprintf=yes"
15990 else
15991   echo "configure: failed program was:" >&5
15992   cat conftest.$ac_ext >&5
15993   rm -rf conftest*
15994   eval "ac_cv_func__vsnprintf=no"
15995 fi
15996 rm -f conftest*
15997 fi
15998
15999 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
16000   echo "$ac_t""yes" 1>&6
16001   ac_cv_func_vsnprintf=yes
16002         cat >> confdefs.h <<\EOF
16003 #define vsnprintf _vsnprintf
16004 EOF
16005
16006
16007 else
16008   echo "$ac_t""no" 1>&6
16009 fi
16010
16011
16012 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16013 echo "configure:16014: checking for vprintf" >&5
16014 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
16015   echo $ac_n "(cached) $ac_c" 1>&6
16016 else
16017   cat > conftest.$ac_ext <<EOF
16018 #line 16019 "configure"
16019 #include "confdefs.h"
16020 /* System header to define __stub macros and hopefully few prototypes,
16021     which can conflict with char vprintf(); below.  */
16022 #include <assert.h>
16023 /* Override any gcc2 internal prototype to avoid an error.  */
16024 /* We use char because int might match the return type of a gcc2
16025     builtin and then its argument prototype would still apply.  */
16026 char vprintf();
16027 char (*f)();
16028
16029 int main() {
16030
16031 /* The GNU C library defines this for functions which it implements
16032     to always fail with ENOSYS.  Some functions are actually named
16033     something starting with __ and the normal name is an alias.  */
16034 #if defined (__stub_vprintf) || defined (__stub___vprintf)
16035 choke me
16036 #else
16037 f = vprintf;
16038 #endif
16039
16040 ; return 0; }
16041 EOF
16042 if { (eval echo configure:16043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16043   rm -rf conftest*
16044   eval "ac_cv_func_vprintf=yes"
16045 else
16046   echo "configure: failed program was:" >&5
16047   cat conftest.$ac_ext >&5
16048   rm -rf conftest*
16049   eval "ac_cv_func_vprintf=no"
16050 fi
16051 rm -f conftest*
16052 fi
16053
16054 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
16055   echo "$ac_t""yes" 1>&6
16056   cat >> confdefs.h <<\EOF
16057 #define HAVE_VPRINTF 1
16058 EOF
16059
16060 else
16061   echo "$ac_t""no" 1>&6
16062 fi
16063
16064 if test "$ac_cv_func_vprintf" != yes; then
16065 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
16066 echo "configure:16067: checking for _doprnt" >&5
16067 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
16068   echo $ac_n "(cached) $ac_c" 1>&6
16069 else
16070   cat > conftest.$ac_ext <<EOF
16071 #line 16072 "configure"
16072 #include "confdefs.h"
16073 /* System header to define __stub macros and hopefully few prototypes,
16074     which can conflict with char _doprnt(); below.  */
16075 #include <assert.h>
16076 /* Override any gcc2 internal prototype to avoid an error.  */
16077 /* We use char because int might match the return type of a gcc2
16078     builtin and then its argument prototype would still apply.  */
16079 char _doprnt();
16080 char (*f)();
16081
16082 int main() {
16083
16084 /* The GNU C library defines this for functions which it implements
16085     to always fail with ENOSYS.  Some functions are actually named
16086     something starting with __ and the normal name is an alias.  */
16087 #if defined (__stub__doprnt) || defined (__stub____doprnt)
16088 choke me
16089 #else
16090 f = _doprnt;
16091 #endif
16092
16093 ; return 0; }
16094 EOF
16095 if { (eval echo configure:16096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16096   rm -rf conftest*
16097   eval "ac_cv_func__doprnt=yes"
16098 else
16099   echo "configure: failed program was:" >&5
16100   cat conftest.$ac_ext >&5
16101   rm -rf conftest*
16102   eval "ac_cv_func__doprnt=no"
16103 fi
16104 rm -f conftest*
16105 fi
16106
16107 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
16108   echo "$ac_t""yes" 1>&6
16109   cat >> confdefs.h <<\EOF
16110 #define HAVE_DOPRNT 1
16111 EOF
16112
16113 else
16114   echo "$ac_t""no" 1>&6
16115 fi
16116
16117 fi
16118
16119
16120 if test $ac_cv_func_vprintf = yes ; then
16121                 for ac_func in vsnprintf vsprintf
16122 do
16123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16124 echo "configure:16125: checking for $ac_func" >&5
16125 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16126   echo $ac_n "(cached) $ac_c" 1>&6
16127 else
16128   cat > conftest.$ac_ext <<EOF
16129 #line 16130 "configure"
16130 #include "confdefs.h"
16131 /* System header to define __stub macros and hopefully few prototypes,
16132     which can conflict with char $ac_func(); below.  */
16133 #include <assert.h>
16134 /* Override any gcc2 internal prototype to avoid an error.  */
16135 /* We use char because int might match the return type of a gcc2
16136     builtin and then its argument prototype would still apply.  */
16137 char $ac_func();
16138 char (*f)();
16139
16140 int main() {
16141
16142 /* The GNU C library defines this for functions which it implements
16143     to always fail with ENOSYS.  Some functions are actually named
16144     something starting with __ and the normal name is an alias.  */
16145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16146 choke me
16147 #else
16148 f = $ac_func;
16149 #endif
16150
16151 ; return 0; }
16152 EOF
16153 if { (eval echo configure:16154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16154   rm -rf conftest*
16155   eval "ac_cv_func_$ac_func=yes"
16156 else
16157   echo "configure: failed program was:" >&5
16158   cat conftest.$ac_ext >&5
16159   rm -rf conftest*
16160   eval "ac_cv_func_$ac_func=no"
16161 fi
16162 rm -f conftest*
16163 fi
16164
16165 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16166   echo "$ac_t""yes" 1>&6
16167     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16168   cat >> confdefs.h <<EOF
16169 #define $ac_tr_func 1
16170 EOF
16171  
16172 else
16173   echo "$ac_t""no" 1>&6
16174 fi
16175 done
16176
16177 fi
16178
16179 for ac_func in \
16180         bcopy                   \
16181         closesocket             \
16182         chroot                  \
16183         endgrent                \
16184         endpwent                \
16185         fcntl                   \
16186         flock                   \
16187         getdtablesize   \
16188         getgrgid                \
16189         gethostname             \
16190         getpass                 \
16191         getpassphrase   \
16192         getpwuid                \
16193         getpwnam                \
16194         getspnam                \
16195         gettimeofday    \
16196         initgroups              \
16197         lockf                   \
16198         memcpy                  \
16199         memmove                 \
16200         mkstemp                 \
16201         pipe                    \
16202         read                    \
16203         recv                    \
16204         recvfrom                \
16205         setpwfile               \
16206         setgid                  \
16207         setegid                 \
16208         setsid                  \
16209         setuid                  \
16210         seteuid                 \
16211         sigaction               \
16212         signal                  \
16213         sigset                  \
16214         snprintf                \
16215         strdup                  \
16216         strerror                \
16217         strpbrk                 \
16218         strrchr                 \
16219         strsep                  \
16220         strstr                  \
16221         strtol                  \
16222         strtoul                 \
16223         strspn                  \
16224         sysconf                 \
16225         waitpid                 \
16226         wait4                   \
16227         write                   \
16228         send                    \
16229         sendto                  \
16230
16231 do
16232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16233 echo "configure:16234: checking for $ac_func" >&5
16234 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16235   echo $ac_n "(cached) $ac_c" 1>&6
16236 else
16237   cat > conftest.$ac_ext <<EOF
16238 #line 16239 "configure"
16239 #include "confdefs.h"
16240 /* System header to define __stub macros and hopefully few prototypes,
16241     which can conflict with char $ac_func(); below.  */
16242 #include <assert.h>
16243 /* Override any gcc2 internal prototype to avoid an error.  */
16244 /* We use char because int might match the return type of a gcc2
16245     builtin and then its argument prototype would still apply.  */
16246 char $ac_func();
16247 char (*f)();
16248
16249 int main() {
16250
16251 /* The GNU C library defines this for functions which it implements
16252     to always fail with ENOSYS.  Some functions are actually named
16253     something starting with __ and the normal name is an alias.  */
16254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16255 choke me
16256 #else
16257 f = $ac_func;
16258 #endif
16259
16260 ; return 0; }
16261 EOF
16262 if { (eval echo configure:16263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16263   rm -rf conftest*
16264   eval "ac_cv_func_$ac_func=yes"
16265 else
16266   echo "configure: failed program was:" >&5
16267   cat conftest.$ac_ext >&5
16268   rm -rf conftest*
16269   eval "ac_cv_func_$ac_func=no"
16270 fi
16271 rm -f conftest*
16272 fi
16273
16274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16275   echo "$ac_t""yes" 1>&6
16276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16277   cat >> confdefs.h <<EOF
16278 #define $ac_tr_func 1
16279 EOF
16280  
16281 else
16282   echo "$ac_t""no" 1>&6
16283 fi
16284 done
16285
16286
16287 for ac_func in getopt tempnam
16288 do
16289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16290 echo "configure:16291: checking for $ac_func" >&5
16291 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16292   echo $ac_n "(cached) $ac_c" 1>&6
16293 else
16294   cat > conftest.$ac_ext <<EOF
16295 #line 16296 "configure"
16296 #include "confdefs.h"
16297 /* System header to define __stub macros and hopefully few prototypes,
16298     which can conflict with char $ac_func(); below.  */
16299 #include <assert.h>
16300 /* Override any gcc2 internal prototype to avoid an error.  */
16301 /* We use char because int might match the return type of a gcc2
16302     builtin and then its argument prototype would still apply.  */
16303 char $ac_func();
16304 char (*f)();
16305
16306 int main() {
16307
16308 /* The GNU C library defines this for functions which it implements
16309     to always fail with ENOSYS.  Some functions are actually named
16310     something starting with __ and the normal name is an alias.  */
16311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16312 choke me
16313 #else
16314 f = $ac_func;
16315 #endif
16316
16317 ; return 0; }
16318 EOF
16319 if { (eval echo configure:16320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16320   rm -rf conftest*
16321   eval "ac_cv_func_$ac_func=yes"
16322 else
16323   echo "configure: failed program was:" >&5
16324   cat conftest.$ac_ext >&5
16325   rm -rf conftest*
16326   eval "ac_cv_func_$ac_func=no"
16327 fi
16328 rm -f conftest*
16329 fi
16330
16331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16332   echo "$ac_t""yes" 1>&6
16333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16334   cat >> confdefs.h <<EOF
16335 #define $ac_tr_func 1
16336 EOF
16337  
16338 else
16339   echo "$ac_t""no" 1>&6
16340 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16341 fi
16342 done
16343
16344
16345
16346 if test "$ac_cv_func_getopt" != yes; then
16347     LIBSRCS="$LIBSRCS getopt.c"
16348 fi
16349
16350 if test "$ac_cv_func_tempnam" != yes; then
16351     LIBSRCS="$LIBSRCS tempnam.c"
16352 fi
16353
16354 # Check Configuration
16355 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16356 echo "configure:16357: checking declaration of sys_errlist" >&5
16357 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16358   echo $ac_n "(cached) $ac_c" 1>&6
16359 else
16360   
16361         cat > conftest.$ac_ext <<EOF
16362 #line 16363 "configure"
16363 #include "confdefs.h"
16364
16365 #include <stdio.h>
16366 #include <sys/types.h>
16367 #include <errno.h>
16368 #ifdef WINNT
16369 #include <stdlib.h>
16370 #endif 
16371 int main() {
16372 char *c = (char *) *sys_errlist
16373 ; return 0; }
16374 EOF
16375 if { (eval echo configure:16376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16376   rm -rf conftest*
16377   ol_cv_dcl_sys_errlist=yes
16378         ol_cv_have_sys_errlist=yes
16379 else
16380   echo "configure: failed program was:" >&5
16381   cat conftest.$ac_ext >&5
16382   rm -rf conftest*
16383   ol_cv_dcl_sys_errlist=no
16384 fi
16385 rm -f conftest*
16386 fi
16387
16388 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16389 #
16390 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16391 if test $ol_cv_dcl_sys_errlist = no ; then
16392         cat >> confdefs.h <<\EOF
16393 #define DECL_SYS_ERRLIST 1
16394 EOF
16395
16396
16397         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16398 echo "configure:16399: checking existence of sys_errlist" >&5
16399 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16400   echo $ac_n "(cached) $ac_c" 1>&6
16401 else
16402   
16403                 cat > conftest.$ac_ext <<EOF
16404 #line 16405 "configure"
16405 #include "confdefs.h"
16406 #include <errno.h>
16407 int main() {
16408 char *c = (char *) *sys_errlist
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16412   rm -rf conftest*
16413   ol_cv_have_sys_errlist=yes
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   ol_cv_have_sys_errlist=no
16419 fi
16420 rm -f conftest*
16421 fi
16422
16423 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16424 fi
16425 if test $ol_cv_have_sys_errlist = yes ; then
16426         cat >> confdefs.h <<\EOF
16427 #define HAVE_SYS_ERRLIST 1
16428 EOF
16429
16430 fi
16431
16432
16433
16434 if test "$ol_enable_debug" != no ; then
16435         cat >> confdefs.h <<\EOF
16436 #define LDAP_DEBUG 1
16437 EOF
16438
16439 fi
16440 if test "$ol_enable_syslog" = yes ; then
16441         cat >> confdefs.h <<\EOF
16442 #define LDAP_SYSLOG 1
16443 EOF
16444
16445 fi
16446 if test "$ol_enable_cache" = no ; then
16447         cat >> confdefs.h <<\EOF
16448 #define LDAP_NOCACHE 1
16449 EOF
16450
16451 fi
16452 if test "$ol_link_kbind" != no ; then
16453         cat >> confdefs.h <<\EOF
16454 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16455 EOF
16456
16457 fi
16458 if test "$ol_enable_proctitle" != no ; then
16459         cat >> confdefs.h <<\EOF
16460 #define LDAP_PROCTITLE 1
16461 EOF
16462
16463 fi
16464 if test "$ol_enable_referrals" != no ; then
16465         cat >> confdefs.h <<\EOF
16466 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16467 EOF
16468
16469 fi
16470 if test "$ol_enable_local" != no; then
16471         cat >> confdefs.h <<\EOF
16472 #define LDAP_PF_LOCAL 1
16473 EOF
16474
16475 fi
16476 if test "$ol_link_ipv6" != no; then
16477         cat >> confdefs.h <<\EOF
16478 #define LDAP_PF_INET6 1
16479 EOF
16480
16481 fi
16482 if test "$ol_enable_cleartext" != no ; then
16483         cat >> confdefs.h <<\EOF
16484 #define SLAPD_CLEARTEXT 1
16485 EOF
16486
16487 fi
16488 if test "$ol_enable_crypt" != no ; then
16489         cat >> confdefs.h <<\EOF
16490 #define SLAPD_CRYPT 1
16491 EOF
16492
16493 fi
16494 if test "$ol_link_kpasswd" != no ; then
16495         cat >> confdefs.h <<\EOF
16496 #define SLAPD_KPASSWD 1
16497 EOF
16498
16499 fi
16500 if test "$ol_link_spasswd" != no ; then
16501         cat >> confdefs.h <<\EOF
16502 #define SLAPD_SPASSWD 1
16503 EOF
16504
16505 fi
16506 if test "$ol_enable_phonetic" != no ; then
16507         cat >> confdefs.h <<\EOF
16508 #define SLAPD_PHONETIC 1
16509 EOF
16510
16511 fi
16512 if test "$ol_enable_rlookups" != no ; then
16513         cat >> confdefs.h <<\EOF
16514 #define SLAPD_RLOOKUPS 1
16515 EOF
16516
16517 fi
16518 if test "$ol_enable_aci" != no ; then
16519         cat >> confdefs.h <<\EOF
16520 #define SLAPD_ACI_ENABLED 1
16521 EOF
16522
16523 fi
16524
16525 if test "$ol_link_modules" != no ; then
16526         cat >> confdefs.h <<\EOF
16527 #define SLAPD_MODULES 1
16528 EOF
16529
16530         BUILD_SLAPD=yes
16531         SLAPD_MODULES_LDFLAGS="-dlopen self"
16532 fi
16533
16534 if test "$ol_enable_bdb" != no ; then
16535         cat >> confdefs.h <<\EOF
16536 #define SLAPD_BDB 1
16537 EOF
16538
16539         BUILD_SLAPD=yes
16540         BUILD_BDB=yes
16541         if test "$ol_with_bdb_module" != static ; then
16542                 cat >> confdefs.h <<\EOF
16543 #define SLAPD_BDB_DYNAMIC 1
16544 EOF
16545
16546                 BUILD_BDB=mod
16547                 BUILD_BDB_DYNAMIC=shared
16548                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16549         fi
16550 fi
16551
16552 if test "$ol_link_dnssrv" != no ; then
16553         cat >> confdefs.h <<\EOF
16554 #define SLAPD_DNSSRV 1
16555 EOF
16556
16557         BUILD_SLAPD=yes
16558         BUILD_DNSSRV=yes
16559         if test "$ol_with_dnssrv_module" != static ; then
16560                 cat >> confdefs.h <<\EOF
16561 #define SLAPD_DNSSRV_DYNAMIC 1
16562 EOF
16563
16564                 BUILD_DNSSRV=mod
16565                 BUILD_DNSSRV_DYNAMIC=shared
16566                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16567         fi
16568 fi
16569
16570 if test "$ol_enable_ldap" != no ; then
16571         cat >> confdefs.h <<\EOF
16572 #define SLAPD_LDAP 1
16573 EOF
16574
16575         BUILD_SLAPD=yes
16576         BUILD_LDAP=yes
16577         if test "$ol_with_ldap_module" != static ; then
16578                 cat >> confdefs.h <<\EOF
16579 #define SLAPD_LDAP_DYNAMIC 1
16580 EOF
16581
16582                 BUILD_LDAP=mod
16583                 BUILD_LDAP_DYNAMIC=shared
16584                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16585         fi
16586 fi
16587
16588 if test "$ol_link_ldbm" != no ; then
16589         cat >> confdefs.h <<\EOF
16590 #define SLAPD_LDBM 1
16591 EOF
16592
16593         BUILD_SLAPD=yes
16594         BUILD_LDBM=yes
16595         if test "$ol_with_ldbm_module" != static ; then
16596                 cat >> confdefs.h <<\EOF
16597 #define SLAPD_LDBM_DYNAMIC 1
16598 EOF
16599
16600                 BUILD_LDBM=mod
16601                 BUILD_LDBM_DYNAMIC=shared
16602                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16603         fi
16604 fi
16605
16606 if test "$ol_enable_meta" != no ; then
16607         if test "$ol_enable_ldap" = no ; then
16608                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
16609         fi
16610         if test "$ol_enable_rewrite" = no ; then
16611                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
16612         fi
16613         cat >> confdefs.h <<\EOF
16614 #define SLAPD_META 1
16615 EOF
16616
16617         BUILD_SLAPD=yes
16618         BUILD_META=yes
16619         if test "$ol_with_meta_module" != static ; then
16620                 cat >> confdefs.h <<\EOF
16621 #define SLAPD_META_DYNAMIC 1
16622 EOF
16623
16624                 BUILD_META=mod
16625                 BUILD_META_DYNAMIC=shared
16626                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
16627         fi
16628 fi
16629
16630 if test "$ol_enable_passwd" != no ; then
16631         cat >> confdefs.h <<\EOF
16632 #define SLAPD_PASSWD 1
16633 EOF
16634
16635         BUILD_SLAPD=yes
16636         BUILD_PASSWD=yes
16637         if test "$ol_with_passwd_module" != static ; then
16638                 cat >> confdefs.h <<\EOF
16639 #define SLAPD_PASSWD_DYNAMIC 1
16640 EOF
16641
16642                 BUILD_PASSWD=mod
16643                 BUILD_PASSWD_DYNAMIC=shared
16644                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16645         fi
16646 fi
16647
16648 if test "$ol_link_perl" != no ; then
16649         cat >> confdefs.h <<\EOF
16650 #define SLAPD_PERL 1
16651 EOF
16652
16653         BUILD_SLAPD=yes
16654         BUILD_PERL=yes
16655         if test "$ol_with_perl_module" != static ; then
16656                 cat >> confdefs.h <<\EOF
16657 #define SLAPD_PERL_DYNAMIC 1
16658 EOF
16659
16660                 BUILD_PERL=mod
16661                 BUILD_PERL_DYNAMIC=shared
16662                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16663         fi
16664 fi
16665
16666 if test "$ol_enable_shell" != no ; then
16667         cat >> confdefs.h <<\EOF
16668 #define SLAPD_SHELL 1
16669 EOF
16670
16671         BUILD_SLAPD=yes
16672         BUILD_SHELL=yes
16673         if test "$ol_with_shell_module" != static ; then
16674                 cat >> confdefs.h <<\EOF
16675 #define SLAPD_SHELL_DYNAMIC 1
16676 EOF
16677
16678                 BUILD_SHELL=mod
16679                 BUILD_SHELL_DYNAMIC=shared
16680                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16681         fi
16682 fi
16683
16684 if test "$ol_enable_tcl" != no ; then
16685         cat >> confdefs.h <<\EOF
16686 #define SLAPD_TCL 1
16687 EOF
16688
16689         BUILD_SLAPD=yes
16690         BUILD_TCL=yes
16691         if test "$ol_with_tcl_module" != static; then
16692                 cat >> confdefs.h <<\EOF
16693 #define SLAPD_TCL_DYNAMIC 1
16694 EOF
16695
16696                 BUILD_TCL=mod
16697                 BUILD_TCL_DYNAMIC=shared
16698                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16699         fi
16700 fi
16701
16702 if test "$ol_link_sql" != no ; then
16703         cat >> confdefs.h <<\EOF
16704 #define SLAPD_SQL 1
16705 EOF
16706
16707         BUILD_SLAPD=yes
16708         BUILD_SQL=yes
16709         if test "$ol_with_sql_module" != static; then
16710                 cat >> confdefs.h <<\EOF
16711 #define SLAPD_SQL_DYNAMIC 1
16712 EOF
16713
16714                 BUILD_SQL=mod
16715                 BUILD_SQL_DYNAMIC=shared
16716                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16717         fi
16718 fi
16719
16720 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16721         $BUILD_SLAPD = yes ; then
16722         BUILD_SLURPD=yes
16723 fi
16724
16725 if test "$ol_enable_rewrite" != no ; then
16726         cat >> confdefs.h <<\EOF
16727 #define ENABLE_REWRITE 1
16728 EOF
16729
16730         BUILD_REWRITE=yes
16731         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
16732 fi
16733
16734
16735 if test "$LINK_BINS_DYNAMIC" = yes; then
16736     LIB_LINKAGE=DYN
16737     LT_LIB_LINKAGE=shared
16738 else
16739     LIB_LINKAGE=STAT
16740     LT_LIB_LINKAGE=static
16741 fi
16742
16743 if test "$ac_cv_mingw32" = yes ; then
16744     PLAT=NT
16745     DYN_EXT=dll
16746 else
16747     PLAT=UNIX
16748     DYN_EXT=so
16749 fi
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759   
16760   
16761   
16762   
16763   
16764   
16765   
16766   
16767   
16768   
16769   
16770   
16771   
16772   
16773   
16774   
16775   
16776   
16777   
16778   
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816 trap '' 1 2 15
16817
16818 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16819
16820 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16821 # Let make expand exec_prefix.
16822 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16823
16824 # Any assignment to VPATH causes Sun make to only execute
16825 # the first set of double-colon rules, so remove it if not needed.
16826 # If there is a colon in the path, we need to keep it.
16827 if test "x$srcdir" = x.; then
16828   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16829 fi
16830
16831 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16832
16833 DEFS=-DHAVE_CONFIG_H
16834
16835 # Without the "./", some shells look in PATH for config.status.
16836 : ${CONFIG_STATUS=./config.status}
16837
16838 echo creating $CONFIG_STATUS
16839 rm -f $CONFIG_STATUS
16840 cat > $CONFIG_STATUS <<EOF
16841 #! /bin/sh
16842 # Generated automatically by configure.
16843 # Run this file to recreate the current configuration.
16844 # This directory was configured as follows,
16845 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16846 #
16847 # $0 $ac_configure_args
16848 #
16849 # Compiler output produced by configure, useful for debugging
16850 # configure, is in ./config.log if it exists.
16851
16852 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16853 for ac_option
16854 do
16855   case "\$ac_option" in
16856   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16857     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16858     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16859   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16860     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16861     exit 0 ;;
16862   -help | --help | --hel | --he | --h)
16863     echo "\$ac_cs_usage"; exit 0 ;;
16864   *) echo "\$ac_cs_usage"; exit 1 ;;
16865   esac
16866 done
16867
16868 ac_given_srcdir=$srcdir
16869 ac_given_INSTALL="$INSTALL"
16870
16871 trap 'rm -fr `echo "\
16872 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16873 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16874 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16875 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16876 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16877 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16878 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16879 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16880 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16881 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16882 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16883 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16884 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16885 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16886 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16887 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16888 include/Makefile:build/top.mk:include/Makefile.in \
16889 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16890 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16891 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16892 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16893 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16894 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16895 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16896 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16897 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16898 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
16899 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16900 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16901 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16902 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16903 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16904 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16905 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
16906 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16907 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16908 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16909 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16910 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16911 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16912 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16913 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16914 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16915 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16916 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16917 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16918 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16919  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16920 EOF
16921 cat >> $CONFIG_STATUS <<EOF
16922
16923 # Protect against being on the right side of a sed subst in config.status.
16924 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16925  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16926 $ac_vpsub
16927 $extrasub
16928 s%@SHELL@%$SHELL%g
16929 s%@CFLAGS@%$CFLAGS%g
16930 s%@CPPFLAGS@%$CPPFLAGS%g
16931 s%@CXXFLAGS@%$CXXFLAGS%g
16932 s%@FFLAGS@%$FFLAGS%g
16933 s%@DEFS@%$DEFS%g
16934 s%@LDFLAGS@%$LDFLAGS%g
16935 s%@LIBS@%$LIBS%g
16936 s%@exec_prefix@%$exec_prefix%g
16937 s%@prefix@%$prefix%g
16938 s%@program_transform_name@%$program_transform_name%g
16939 s%@bindir@%$bindir%g
16940 s%@sbindir@%$sbindir%g
16941 s%@libexecdir@%$libexecdir%g
16942 s%@datadir@%$datadir%g
16943 s%@sysconfdir@%$sysconfdir%g
16944 s%@sharedstatedir@%$sharedstatedir%g
16945 s%@localstatedir@%$localstatedir%g
16946 s%@libdir@%$libdir%g
16947 s%@includedir@%$includedir%g
16948 s%@oldincludedir@%$oldincludedir%g
16949 s%@infodir@%$infodir%g
16950 s%@mandir@%$mandir%g
16951 s%@host@%$host%g
16952 s%@host_alias@%$host_alias%g
16953 s%@host_cpu@%$host_cpu%g
16954 s%@host_vendor@%$host_vendor%g
16955 s%@host_os@%$host_os%g
16956 s%@target@%$target%g
16957 s%@target_alias@%$target_alias%g
16958 s%@target_cpu@%$target_cpu%g
16959 s%@target_vendor@%$target_vendor%g
16960 s%@target_os@%$target_os%g
16961 s%@build@%$build%g
16962 s%@build_alias@%$build_alias%g
16963 s%@build_cpu@%$build_cpu%g
16964 s%@build_vendor@%$build_vendor%g
16965 s%@build_os@%$build_os%g
16966 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16967 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16968 s%@INSTALL_DATA@%$INSTALL_DATA%g
16969 s%@PACKAGE@%$PACKAGE%g
16970 s%@VERSION@%$VERSION%g
16971 s%@ACLOCAL@%$ACLOCAL%g
16972 s%@AUTOCONF@%$AUTOCONF%g
16973 s%@AUTOMAKE@%$AUTOMAKE%g
16974 s%@AUTOHEADER@%$AUTOHEADER%g
16975 s%@MAKEINFO@%$MAKEINFO%g
16976 s%@install_sh@%$install_sh%g
16977 s%@AMTAR@%$AMTAR%g
16978 s%@AWK@%$AWK%g
16979 s%@AMTARFLAGS@%$AMTARFLAGS%g
16980 s%@SET_MAKE@%$SET_MAKE%g
16981 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16982 s%@top_builddir@%$top_builddir%g
16983 s%@ldap_subdir@%$ldap_subdir%g
16984 s%@CC@%$CC%g
16985 s%@RANLIB@%$RANLIB%g
16986 s%@LN_S@%$LN_S%g
16987 s%@DLLTOOL@%$DLLTOOL%g
16988 s%@AS@%$AS%g
16989 s%@OBJDUMP@%$OBJDUMP%g
16990 s%@LIBTOOL@%$LIBTOOL%g
16991 s%@LN_H@%$LN_H%g
16992 s%@SENDMAIL@%$SENDMAIL%g
16993 s%@EDITOR@%$EDITOR%g
16994 s%@FINGER@%$FINGER%g
16995 s%@PERLBIN@%$PERLBIN%g
16996 s%@CPP@%$CPP%g
16997 s%@EXEEXT@%$EXEEXT%g
16998 s%@OBJEXT@%$OBJEXT%g
16999 s%@OL_MKDEP@%$OL_MKDEP%g
17000 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
17001 s%@LIBOBJS@%$LIBOBJS%g
17002 s%@LIBSRCS@%$LIBSRCS%g
17003 s%@PLAT@%$PLAT%g
17004 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
17005 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
17006 s%@DYN_EXT@%$DYN_EXT%g
17007 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
17008 s%@BUILD_BDB@%$BUILD_BDB%g
17009 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
17010 s%@BUILD_LDAP@%$BUILD_LDAP%g
17011 s%@BUILD_LDBM@%$BUILD_LDBM%g
17012 s%@BUILD_META@%$BUILD_META%g
17013 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
17014 s%@BUILD_PERL@%$BUILD_PERL%g
17015 s%@BUILD_SHELL@%$BUILD_SHELL%g
17016 s%@BUILD_SQL@%$BUILD_SQL%g
17017 s%@BUILD_TCL@%$BUILD_TCL%g
17018 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
17019 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
17020 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
17021 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
17022 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
17023 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
17024 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
17025 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
17026 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
17027 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
17028 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
17029 s%@LDAP_LIBS@%$LDAP_LIBS%g
17030 s%@LDIF_LIBS@%$LDIF_LIBS%g
17031 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
17032 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
17033 s%@LDBM_LIBS@%$LDBM_LIBS%g
17034 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
17035 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
17036 s%@WRAP_LIBS@%$WRAP_LIBS%g
17037 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
17038 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
17039 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
17040 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
17041 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
17042 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
17043 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
17044 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
17045 s%@KRB4_LIBS@%$KRB4_LIBS%g
17046 s%@KRB5_LIBS@%$KRB5_LIBS%g
17047 s%@READLINE_LIBS@%$READLINE_LIBS%g
17048 s%@SASL_LIBS@%$SASL_LIBS%g
17049 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
17050 s%@TLS_LIBS@%$TLS_LIBS%g
17051 s%@MODULES_LIBS@%$MODULES_LIBS%g
17052 s%@AUTH_LIBS@%$AUTH_LIBS%g
17053 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
17054 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
17055 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
17056 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
17057
17058 CEOF
17059 EOF
17060
17061 cat >> $CONFIG_STATUS <<\EOF
17062
17063 # Split the substitutions into bite-sized pieces for seds with
17064 # small command number limits, like on Digital OSF/1 and HP-UX.
17065 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17066 ac_file=1 # Number of current file.
17067 ac_beg=1 # First line for current file.
17068 ac_end=$ac_max_sed_cmds # Line after last line for current file.
17069 ac_more_lines=:
17070 ac_sed_cmds=""
17071 while $ac_more_lines; do
17072   if test $ac_beg -gt 1; then
17073     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
17074   else
17075     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
17076   fi
17077   if test ! -s conftest.s$ac_file; then
17078     ac_more_lines=false
17079     rm -f conftest.s$ac_file
17080   else
17081     if test -z "$ac_sed_cmds"; then
17082       ac_sed_cmds="sed -f conftest.s$ac_file"
17083     else
17084       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
17085     fi
17086     ac_file=`expr $ac_file + 1`
17087     ac_beg=$ac_end
17088     ac_end=`expr $ac_end + $ac_max_sed_cmds`
17089   fi
17090 done
17091 if test -z "$ac_sed_cmds"; then
17092   ac_sed_cmds=cat
17093 fi
17094 EOF
17095
17096 cat >> $CONFIG_STATUS <<EOF
17097
17098 CONFIG_FILES=\${CONFIG_FILES-"\
17099 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17100 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17101 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17102 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17103 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17104 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17105 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17106 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17107 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17108 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
17109 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
17110 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17111 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
17112 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17113 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17114 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17115 include/Makefile:build/top.mk:include/Makefile.in \
17116 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
17117 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
17118 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17119 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17120 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17121 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17122 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17123 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17124 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17125 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
17126 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17127 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17128 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17129 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17130 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17131 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17132 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
17133 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17134 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17135 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17136 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17137 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17138 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17139 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17140 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17141 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17142 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17143 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17144 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17145 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
17146 "}
17147 EOF
17148 cat >> $CONFIG_STATUS <<\EOF
17149 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17150   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17151   case "$ac_file" in
17152   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17153        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17154   *) ac_file_in="${ac_file}.in" ;;
17155   esac
17156
17157   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17158
17159   # Remove last slash and all that follows it.  Not all systems have dirname.
17160   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17161   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17162     # The file is in a subdirectory.
17163     test ! -d "$ac_dir" && mkdir "$ac_dir"
17164     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17165     # A "../" for each directory in $ac_dir_suffix.
17166     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17167   else
17168     ac_dir_suffix= ac_dots=
17169   fi
17170
17171   case "$ac_given_srcdir" in
17172   .)  srcdir=.
17173       if test -z "$ac_dots"; then top_srcdir=.
17174       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17175   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17176   *) # Relative path.
17177     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17178     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17179   esac
17180
17181   case "$ac_given_INSTALL" in
17182   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17183   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17184   esac
17185
17186   echo creating "$ac_file"
17187   rm -f "$ac_file"
17188   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17189   case "$ac_file" in
17190   *[Mm]akefile*) ac_comsub="1i\\
17191 # $configure_input" ;;
17192   *) ac_comsub= ;;
17193   esac
17194
17195   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17196   sed -e "$ac_comsub
17197 s%@configure_input@%$configure_input%g
17198 s%@srcdir@%$srcdir%g
17199 s%@top_srcdir@%$top_srcdir%g
17200 s%@INSTALL@%$INSTALL%g
17201 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17202 fi; done
17203 rm -f conftest.s*
17204
17205 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17206 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17207 #
17208 # ac_d sets the value in "#define NAME VALUE" lines.
17209 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17210 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17211 ac_dC='\3'
17212 ac_dD='%g'
17213 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17214 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17215 ac_uB='\([      ]\)%\1#\2define\3'
17216 ac_uC=' '
17217 ac_uD='\4%g'
17218 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17219 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17220 ac_eB='$%\1#\2define\3'
17221 ac_eC=' '
17222 ac_eD='%g'
17223
17224 if test "${CONFIG_HEADERS+set}" != set; then
17225 EOF
17226 cat >> $CONFIG_STATUS <<EOF
17227   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
17228 EOF
17229 cat >> $CONFIG_STATUS <<\EOF
17230 fi
17231 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17232   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17233   case "$ac_file" in
17234   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17235        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17236   *) ac_file_in="${ac_file}.in" ;;
17237   esac
17238
17239   echo creating $ac_file
17240
17241   rm -f conftest.frag conftest.in conftest.out
17242   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17243   cat $ac_file_inputs > conftest.in
17244
17245 EOF
17246
17247 # Transform confdefs.h into a sed script conftest.vals that substitutes
17248 # the proper values into config.h.in to produce config.h.  And first:
17249 # Protect against being on the right side of a sed subst in config.status.
17250 # Protect against being in an unquoted here document in config.status.
17251 rm -f conftest.vals
17252 cat > conftest.hdr <<\EOF
17253 s/[\\&%]/\\&/g
17254 s%[\\$`]%\\&%g
17255 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17256 s%ac_d%ac_u%gp
17257 s%ac_u%ac_e%gp
17258 EOF
17259 sed -n -f conftest.hdr confdefs.h > conftest.vals
17260 rm -f conftest.hdr
17261
17262 # This sed command replaces #undef with comments.  This is necessary, for
17263 # example, in the case of _POSIX_SOURCE, which is predefined and required
17264 # on some systems where configure will not decide to define it.
17265 cat >> conftest.vals <<\EOF
17266 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17267 EOF
17268
17269 # Break up conftest.vals because some shells have a limit on
17270 # the size of here documents, and old seds have small limits too.
17271
17272 rm -f conftest.tail
17273 while :
17274 do
17275   ac_lines=`grep -c . conftest.vals`
17276   # grep -c gives empty output for an empty file on some AIX systems.
17277   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17278   # Write a limited-size here document to conftest.frag.
17279   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17280   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17281   echo 'CEOF
17282   sed -f conftest.frag conftest.in > conftest.out
17283   rm -f conftest.in
17284   mv conftest.out conftest.in
17285 ' >> $CONFIG_STATUS
17286   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17287   rm -f conftest.vals
17288   mv conftest.tail conftest.vals
17289 done
17290 rm -f conftest.vals
17291
17292 cat >> $CONFIG_STATUS <<\EOF
17293   rm -f conftest.frag conftest.h
17294   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17295   cat conftest.in >> conftest.h
17296   rm -f conftest.in
17297   if cmp -s $ac_file conftest.h 2>/dev/null; then
17298     echo "$ac_file is unchanged"
17299     rm -f conftest.h
17300   else
17301     # Remove last slash and all that follows it.  Not all systems have dirname.
17302       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17303       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17304       # The file is in a subdirectory.
17305       test ! -d "$ac_dir" && mkdir "$ac_dir"
17306     fi
17307     rm -f $ac_file
17308     mv conftest.h $ac_file
17309   fi
17310 fi; done
17311
17312 EOF
17313 cat >> $CONFIG_STATUS <<EOF
17314
17315 EOF
17316 cat >> $CONFIG_STATUS <<\EOF
17317
17318 date > stamp-h
17319 echo Please \"make depend\" to build dependencies
17320
17321 exit 0
17322 EOF
17323 chmod +x $CONFIG_STATUS
17324 rm -fr confdefs* $ac_clean_files
17325 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
17326