]> git.sur5r.net Git - openldap/blob - configure
Misc adjustments to CBM tests
[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 #ifdef DB_PRIVATE
12725         flags |= DB_PRIVATE;
12726 #endif
12727 #ifdef DB_MPOOL_PRIVATE
12728         flags |= DB_MPOOL_PRIVATE;
12729 #endif
12730
12731 #if DB_VERSION_MAJOR > 2
12732         DB_ENV *env = NULL;
12733
12734         rc = db_env_create( &env, 0 );
12735
12736         if( rc ) return rc;
12737
12738 #ifdef DB_CDB_ALLDB
12739         rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
12740         if( rc ) goto done;
12741 #endif
12742
12743 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12744         rc = env->open( env, NULL, flags, 0 );
12745 #else
12746         rc = env->open( env, NULL, NULL, flags, 0 );
12747 #endif
12748
12749 #ifdef DB_CDB_ALLDB
12750 done:
12751 #endif
12752 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12753         env->remove( env, NULL, DB_FORCE);
12754 #else
12755         env->remove( env, NULL, NULL, DB_FORCE);
12756 #endif
12757
12758 #else
12759         DB_ENV env;
12760         memset( &env, '\0', sizeof(env) );
12761
12762         rc = db_appinit( NULL, NULL, &env, flags );
12763
12764         if( rc == 0 ) {
12765                 db_appexit( &env );
12766         }
12767 #endif
12768
12769         return rc;
12770 }
12771 EOF
12772 if { (eval echo configure:12773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12773 then
12774   ol_cv_berkeley_db_thread=yes
12775 else
12776   echo "configure: failed program was:" >&5
12777   cat conftest.$ac_ext >&5
12778   rm -fr conftest*
12779   ol_cv_berkeley_db_thread=no
12780 fi
12781 rm -fr conftest*
12782 fi
12783
12784
12785         LIBS="$ol_LIBS"
12786
12787         if test $ol_cv_berkeley_db_thread != no ; then
12788                 cat >> confdefs.h <<\EOF
12789 #define HAVE_BERKELEY_DB_THREAD 1
12790 EOF
12791
12792         fi
12793
12794 fi
12795
12796 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12797         fi
12798 fi
12799
12800         fi
12801
12802         if test $ol_cv_berkeley_db != no ; then
12803                 cat >> confdefs.h <<\EOF
12804 #define HAVE_BERKELEY_DB 1
12805 EOF
12806
12807
12808                 ol_link_ldbm=berkeley
12809                 ol_with_ldbm_api=db
12810
12811                 if test $ol_with_ldbm_type = hash ; then
12812                         cat >> confdefs.h <<\EOF
12813 #define LDBM_USE_DBHASH 1
12814 EOF
12815
12816                 else
12817                         cat >> confdefs.h <<\EOF
12818 #define LDBM_USE_DBBTREE 1
12819 EOF
12820
12821                 fi
12822
12823                                                 if test $ol_cv_lib_db != yes ; then
12824                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12825                 fi
12826         fi
12827 fi
12828
12829 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12830         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12831         ol_with_ldbm_api=none
12832 fi
12833
12834 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12835         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12836 echo "configure:12837: checking for MDBM library" >&5
12837 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12838   echo $ac_n "(cached) $ac_c" 1>&6
12839 else
12840         ol_LIBS="$LIBS"
12841         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12842 echo "configure:12843: checking for mdbm_set_chain" >&5
12843 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12844   echo $ac_n "(cached) $ac_c" 1>&6
12845 else
12846   cat > conftest.$ac_ext <<EOF
12847 #line 12848 "configure"
12848 #include "confdefs.h"
12849 /* System header to define __stub macros and hopefully few prototypes,
12850     which can conflict with char mdbm_set_chain(); below.  */
12851 #include <assert.h>
12852 /* Override any gcc2 internal prototype to avoid an error.  */
12853 /* We use char because int might match the return type of a gcc2
12854     builtin and then its argument prototype would still apply.  */
12855 char mdbm_set_chain();
12856 char (*f)();
12857
12858 int main() {
12859
12860 /* The GNU C library defines this for functions which it implements
12861     to always fail with ENOSYS.  Some functions are actually named
12862     something starting with __ and the normal name is an alias.  */
12863 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12864 choke me
12865 #else
12866 f = mdbm_set_chain;
12867 #endif
12868
12869 ; return 0; }
12870 EOF
12871 if { (eval echo configure:12872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12872   rm -rf conftest*
12873   eval "ac_cv_func_mdbm_set_chain=yes"
12874 else
12875   echo "configure: failed program was:" >&5
12876   cat conftest.$ac_ext >&5
12877   rm -rf conftest*
12878   eval "ac_cv_func_mdbm_set_chain=no"
12879 fi
12880 rm -f conftest*
12881 fi
12882
12883 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12884   echo "$ac_t""yes" 1>&6
12885   ol_cv_lib_mdbm=yes
12886 else
12887   echo "$ac_t""no" 1>&6
12888
12889                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12890 echo "configure:12891: checking for mdbm_set_chain in -lmdbm" >&5
12891 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12892 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12893   echo $ac_n "(cached) $ac_c" 1>&6
12894 else
12895   ac_save_LIBS="$LIBS"
12896 LIBS="-lmdbm  $LIBS"
12897 cat > conftest.$ac_ext <<EOF
12898 #line 12899 "configure"
12899 #include "confdefs.h"
12900 /* Override any gcc2 internal prototype to avoid an error.  */
12901 /* We use char because int might match the return type of a gcc2
12902     builtin and then its argument prototype would still apply.  */
12903 char mdbm_set_chain();
12904
12905 int main() {
12906 mdbm_set_chain()
12907 ; return 0; }
12908 EOF
12909 if { (eval echo configure:12910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12910   rm -rf conftest*
12911   eval "ac_cv_lib_$ac_lib_var=yes"
12912 else
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -rf conftest*
12916   eval "ac_cv_lib_$ac_lib_var=no"
12917 fi
12918 rm -f conftest*
12919 LIBS="$ac_save_LIBS"
12920
12921 fi
12922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12923   echo "$ac_t""yes" 1>&6
12924   ol_cv_lib_mdbm=-lmdbm
12925 else
12926   echo "$ac_t""no" 1>&6
12927 ol_cv_lib_mdbm=no
12928 fi
12929
12930         
12931 fi
12932
12933         LIBS="$ol_LIBS"
12934
12935 fi
12936
12937 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12938
12939
12940  for ac_hdr in mdbm.h
12941 do
12942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12944 echo "configure:12945: checking for $ac_hdr" >&5
12945 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12946   echo $ac_n "(cached) $ac_c" 1>&6
12947 else
12948   cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 #include <$ac_hdr>
12952 EOF
12953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12954 { (eval echo configure:12955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12956 if test -z "$ac_err"; then
12957   rm -rf conftest*
12958   eval "ac_cv_header_$ac_safe=yes"
12959 else
12960   echo "$ac_err" >&5
12961   echo "configure: failed program was:" >&5
12962   cat conftest.$ac_ext >&5
12963   rm -rf conftest*
12964   eval "ac_cv_header_$ac_safe=no"
12965 fi
12966 rm -f conftest*
12967 fi
12968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12969   echo "$ac_t""yes" 1>&6
12970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12971   cat >> confdefs.h <<EOF
12972 #define $ac_tr_hdr 1
12973 EOF
12974  
12975 else
12976   echo "$ac_t""no" 1>&6
12977 fi
12978 done
12979
12980  echo $ac_n "checking for db""... $ac_c" 1>&6
12981 echo "configure:12982: checking for db" >&5
12982 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12983   echo $ac_n "(cached) $ac_c" 1>&6
12984 else
12985   
12986         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12987                 ol_cv_mdbm=no
12988         else
12989                 ol_cv_mdbm=yes
12990         fi
12991
12992 fi
12993
12994 echo "$ac_t""$ol_cv_mdbm" 1>&6
12995  if test $ol_cv_mdbm = yes ; then
12996         cat >> confdefs.h <<\EOF
12997 #define HAVE_MDBM 1
12998 EOF
12999
13000  fi
13001
13002
13003         if test $ol_cv_mdbm = yes ; then
13004                 ol_link_ldbm=mdbm
13005                 ol_with_ldbm_api=mdbm
13006                 if test $ol_cv_lib_mdbm != yes ; then
13007                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
13008                 fi
13009         fi
13010 fi
13011
13012 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
13013         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
13014 echo "configure:13015: checking for GDBM library" >&5
13015 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
13016   echo $ac_n "(cached) $ac_c" 1>&6
13017 else
13018         ol_LIBS="$LIBS"
13019         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
13020 echo "configure:13021: checking for gdbm_open" >&5
13021 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
13022   echo $ac_n "(cached) $ac_c" 1>&6
13023 else
13024   cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027 /* System header to define __stub macros and hopefully few prototypes,
13028     which can conflict with char gdbm_open(); below.  */
13029 #include <assert.h>
13030 /* Override any gcc2 internal prototype to avoid an error.  */
13031 /* We use char because int might match the return type of a gcc2
13032     builtin and then its argument prototype would still apply.  */
13033 char gdbm_open();
13034 char (*f)();
13035
13036 int main() {
13037
13038 /* The GNU C library defines this for functions which it implements
13039     to always fail with ENOSYS.  Some functions are actually named
13040     something starting with __ and the normal name is an alias.  */
13041 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
13042 choke me
13043 #else
13044 f = gdbm_open;
13045 #endif
13046
13047 ; return 0; }
13048 EOF
13049 if { (eval echo configure:13050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13050   rm -rf conftest*
13051   eval "ac_cv_func_gdbm_open=yes"
13052 else
13053   echo "configure: failed program was:" >&5
13054   cat conftest.$ac_ext >&5
13055   rm -rf conftest*
13056   eval "ac_cv_func_gdbm_open=no"
13057 fi
13058 rm -f conftest*
13059 fi
13060
13061 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
13062   echo "$ac_t""yes" 1>&6
13063   ol_cv_lib_gdbm=yes
13064 else
13065   echo "$ac_t""no" 1>&6
13066
13067                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
13068 echo "configure:13069: checking for gdbm_open in -lgdbm" >&5
13069 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
13070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13071   echo $ac_n "(cached) $ac_c" 1>&6
13072 else
13073   ac_save_LIBS="$LIBS"
13074 LIBS="-lgdbm  $LIBS"
13075 cat > conftest.$ac_ext <<EOF
13076 #line 13077 "configure"
13077 #include "confdefs.h"
13078 /* Override any gcc2 internal prototype to avoid an error.  */
13079 /* We use char because int might match the return type of a gcc2
13080     builtin and then its argument prototype would still apply.  */
13081 char gdbm_open();
13082
13083 int main() {
13084 gdbm_open()
13085 ; return 0; }
13086 EOF
13087 if { (eval echo configure:13088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13088   rm -rf conftest*
13089   eval "ac_cv_lib_$ac_lib_var=yes"
13090 else
13091   echo "configure: failed program was:" >&5
13092   cat conftest.$ac_ext >&5
13093   rm -rf conftest*
13094   eval "ac_cv_lib_$ac_lib_var=no"
13095 fi
13096 rm -f conftest*
13097 LIBS="$ac_save_LIBS"
13098
13099 fi
13100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13101   echo "$ac_t""yes" 1>&6
13102   ol_cv_lib_gdbm=-lgdbm
13103 else
13104   echo "$ac_t""no" 1>&6
13105 ol_cv_lib_gdbm=no
13106 fi
13107
13108         
13109 fi
13110
13111         LIBS="$ol_LIBS"
13112
13113 fi
13114
13115 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
13116
13117
13118  for ac_hdr in gdbm.h
13119 do
13120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13122 echo "configure:13123: checking for $ac_hdr" >&5
13123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13124   echo $ac_n "(cached) $ac_c" 1>&6
13125 else
13126   cat > conftest.$ac_ext <<EOF
13127 #line 13128 "configure"
13128 #include "confdefs.h"
13129 #include <$ac_hdr>
13130 EOF
13131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13132 { (eval echo configure:13133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13134 if test -z "$ac_err"; then
13135   rm -rf conftest*
13136   eval "ac_cv_header_$ac_safe=yes"
13137 else
13138   echo "$ac_err" >&5
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_header_$ac_safe=no"
13143 fi
13144 rm -f conftest*
13145 fi
13146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13147   echo "$ac_t""yes" 1>&6
13148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13149   cat >> confdefs.h <<EOF
13150 #define $ac_tr_hdr 1
13151 EOF
13152  
13153 else
13154   echo "$ac_t""no" 1>&6
13155 fi
13156 done
13157
13158  echo $ac_n "checking for db""... $ac_c" 1>&6
13159 echo "configure:13160: checking for db" >&5
13160 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
13161   echo $ac_n "(cached) $ac_c" 1>&6
13162 else
13163   
13164         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
13165                 ol_cv_gdbm=no
13166         else
13167                 ol_cv_gdbm=yes
13168         fi
13169
13170 fi
13171
13172 echo "$ac_t""$ol_cv_gdbm" 1>&6
13173  if test $ol_cv_gdbm = yes ; then
13174         cat >> confdefs.h <<\EOF
13175 #define HAVE_GDBM 1
13176 EOF
13177
13178  fi
13179
13180
13181         if test $ol_cv_gdbm = yes ; then
13182                 ol_link_ldbm=gdbm
13183                 ol_with_ldbm_api=gdbm
13184
13185                 if test $ol_cv_lib_gdbm != yes ; then
13186                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
13187                 fi
13188         fi
13189 fi
13190
13191 if test $ol_with_ldbm_api = ndbm ; then
13192         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
13193 echo "configure:13194: checking for NDBM library" >&5
13194 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
13195   echo $ac_n "(cached) $ac_c" 1>&6
13196 else
13197         ol_LIBS="$LIBS"
13198         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13199 echo "configure:13200: checking for dbm_open" >&5
13200 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
13201   echo $ac_n "(cached) $ac_c" 1>&6
13202 else
13203   cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13206 /* System header to define __stub macros and hopefully few prototypes,
13207     which can conflict with char dbm_open(); below.  */
13208 #include <assert.h>
13209 /* Override any gcc2 internal prototype to avoid an error.  */
13210 /* We use char because int might match the return type of a gcc2
13211     builtin and then its argument prototype would still apply.  */
13212 char dbm_open();
13213 char (*f)();
13214
13215 int main() {
13216
13217 /* The GNU C library defines this for functions which it implements
13218     to always fail with ENOSYS.  Some functions are actually named
13219     something starting with __ and the normal name is an alias.  */
13220 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13221 choke me
13222 #else
13223 f = dbm_open;
13224 #endif
13225
13226 ; return 0; }
13227 EOF
13228 if { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13229   rm -rf conftest*
13230   eval "ac_cv_func_dbm_open=yes"
13231 else
13232   echo "configure: failed program was:" >&5
13233   cat conftest.$ac_ext >&5
13234   rm -rf conftest*
13235   eval "ac_cv_func_dbm_open=no"
13236 fi
13237 rm -f conftest*
13238 fi
13239
13240 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13241   echo "$ac_t""yes" 1>&6
13242   ol_cv_lib_ndbm=yes
13243 else
13244   echo "$ac_t""no" 1>&6
13245
13246                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
13247 echo "configure:13248: checking for dbm_open in -lndbm" >&5
13248 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13249 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13250   echo $ac_n "(cached) $ac_c" 1>&6
13251 else
13252   ac_save_LIBS="$LIBS"
13253 LIBS="-lndbm  $LIBS"
13254 cat > conftest.$ac_ext <<EOF
13255 #line 13256 "configure"
13256 #include "confdefs.h"
13257 /* Override any gcc2 internal prototype to avoid an error.  */
13258 /* We use char because int might match the return type of a gcc2
13259     builtin and then its argument prototype would still apply.  */
13260 char dbm_open();
13261
13262 int main() {
13263 dbm_open()
13264 ; return 0; }
13265 EOF
13266 if { (eval echo configure:13267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13267   rm -rf conftest*
13268   eval "ac_cv_lib_$ac_lib_var=yes"
13269 else
13270   echo "configure: failed program was:" >&5
13271   cat conftest.$ac_ext >&5
13272   rm -rf conftest*
13273   eval "ac_cv_lib_$ac_lib_var=no"
13274 fi
13275 rm -f conftest*
13276 LIBS="$ac_save_LIBS"
13277
13278 fi
13279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13280   echo "$ac_t""yes" 1>&6
13281   ol_cv_lib_ndbm=-lndbm
13282 else
13283   echo "$ac_t""no" 1>&6
13284
13285                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13286 echo "configure:13287: checking for dbm_open in -ldbm" >&5
13287 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
13288 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13289   echo $ac_n "(cached) $ac_c" 1>&6
13290 else
13291   ac_save_LIBS="$LIBS"
13292 LIBS="-ldbm  $LIBS"
13293 cat > conftest.$ac_ext <<EOF
13294 #line 13295 "configure"
13295 #include "confdefs.h"
13296 /* Override any gcc2 internal prototype to avoid an error.  */
13297 /* We use char because int might match the return type of a gcc2
13298     builtin and then its argument prototype would still apply.  */
13299 char dbm_open();
13300
13301 int main() {
13302 dbm_open()
13303 ; return 0; }
13304 EOF
13305 if { (eval echo configure:13306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13306   rm -rf conftest*
13307   eval "ac_cv_lib_$ac_lib_var=yes"
13308 else
13309   echo "configure: failed program was:" >&5
13310   cat conftest.$ac_ext >&5
13311   rm -rf conftest*
13312   eval "ac_cv_lib_$ac_lib_var=no"
13313 fi
13314 rm -f conftest*
13315 LIBS="$ac_save_LIBS"
13316
13317 fi
13318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13319   echo "$ac_t""yes" 1>&6
13320   ol_cv_lib_ndbm=-ldbm
13321 else
13322   echo "$ac_t""no" 1>&6
13323 ol_cv_lib_ndbm=no
13324 fi
13325                 
13326 fi
13327
13328         
13329 fi
13330
13331         LIBS="$ol_LIBS"
13332
13333 fi
13334
13335 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
13336
13337
13338  for ac_hdr in ndbm.h
13339 do
13340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13342 echo "configure:13343: checking for $ac_hdr" >&5
13343 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13344   echo $ac_n "(cached) $ac_c" 1>&6
13345 else
13346   cat > conftest.$ac_ext <<EOF
13347 #line 13348 "configure"
13348 #include "confdefs.h"
13349 #include <$ac_hdr>
13350 EOF
13351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13352 { (eval echo configure:13353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13354 if test -z "$ac_err"; then
13355   rm -rf conftest*
13356   eval "ac_cv_header_$ac_safe=yes"
13357 else
13358   echo "$ac_err" >&5
13359   echo "configure: failed program was:" >&5
13360   cat conftest.$ac_ext >&5
13361   rm -rf conftest*
13362   eval "ac_cv_header_$ac_safe=no"
13363 fi
13364 rm -f conftest*
13365 fi
13366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13367   echo "$ac_t""yes" 1>&6
13368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13369   cat >> confdefs.h <<EOF
13370 #define $ac_tr_hdr 1
13371 EOF
13372  
13373 else
13374   echo "$ac_t""no" 1>&6
13375 fi
13376 done
13377
13378  echo $ac_n "checking for db""... $ac_c" 1>&6
13379 echo "configure:13380: checking for db" >&5
13380 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
13381   echo $ac_n "(cached) $ac_c" 1>&6
13382 else
13383   
13384         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
13385                 ol_cv_ndbm=no
13386         else
13387                 ol_cv_ndbm=yes
13388         fi
13389
13390 fi
13391
13392 echo "$ac_t""$ol_cv_ndbm" 1>&6
13393  if test $ol_cv_ndbm = yes ; then
13394         cat >> confdefs.h <<\EOF
13395 #define HAVE_NDBM 1
13396 EOF
13397
13398  fi
13399
13400
13401         if test $ol_cv_ndbm = yes ; then
13402                 ol_link_ldbm=ndbm
13403                 ol_with_ldbm_api=ndbm
13404
13405                 if test $ol_cv_lib_ndbm != yes ; then
13406                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13407                 fi
13408         fi
13409 fi
13410
13411 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13412         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13413         if test $ol_enable_ldbm = yes ; then
13414                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13415         fi
13416
13417         echo "configure: warning: disabling LDBM" 1>&2
13418         ol_enable_ldbm=no
13419 fi
13420
13421 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13422         LINK_BINS_DYNAMIC="yes"
13423 else
13424         LINK_BINS_DYNAMIC="no"
13425 fi
13426
13427 if test $ol_enable_wrappers != no ; then
13428         for ac_hdr in tcpd.h
13429 do
13430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13432 echo "configure:13433: checking for $ac_hdr" >&5
13433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13434   echo $ac_n "(cached) $ac_c" 1>&6
13435 else
13436   cat > conftest.$ac_ext <<EOF
13437 #line 13438 "configure"
13438 #include "confdefs.h"
13439 #include <$ac_hdr>
13440 EOF
13441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13442 { (eval echo configure:13443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13444 if test -z "$ac_err"; then
13445   rm -rf conftest*
13446   eval "ac_cv_header_$ac_safe=yes"
13447 else
13448   echo "$ac_err" >&5
13449   echo "configure: failed program was:" >&5
13450   cat conftest.$ac_ext >&5
13451   rm -rf conftest*
13452   eval "ac_cv_header_$ac_safe=no"
13453 fi
13454 rm -f conftest*
13455 fi
13456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13457   echo "$ac_t""yes" 1>&6
13458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13459   cat >> confdefs.h <<EOF
13460 #define $ac_tr_hdr 1
13461 EOF
13462  
13463 else
13464   echo "$ac_t""no" 1>&6
13465 fi
13466 done
13467
13468
13469         if test $ac_cv_header_tcpd_h != yes ; then
13470                 have_wrappers=no
13471         else
13472                 cat > conftest.$ac_ext <<EOF
13473 #line 13474 "configure"
13474 #include "confdefs.h"
13475
13476 int allow_severity = 0;
13477 int deny_severity  = 0;
13478                 
13479 int main() {
13480 hosts_access()
13481 ; return 0; }
13482 EOF
13483 if { (eval echo configure:13484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13484   rm -rf conftest*
13485   have_wrappers=yes
13486 else
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -rf conftest*
13490   have_wrappers=no
13491 fi
13492 rm -f conftest*
13493         fi
13494
13495         if test $have_wrappers = yes ; then
13496                 cat >> confdefs.h <<\EOF
13497 #define HAVE_TCPD 1
13498 EOF
13499
13500                 WRAP_LIBS="-lwrap"
13501
13502                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13503 echo "configure:13504: checking for main in -lnsl" >&5
13504 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13505 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13506   echo $ac_n "(cached) $ac_c" 1>&6
13507 else
13508   ac_save_LIBS="$LIBS"
13509 LIBS="-lnsl  $LIBS"
13510 cat > conftest.$ac_ext <<EOF
13511 #line 13512 "configure"
13512 #include "confdefs.h"
13513
13514 int main() {
13515 main()
13516 ; return 0; }
13517 EOF
13518 if { (eval echo configure:13519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13519   rm -rf conftest*
13520   eval "ac_cv_lib_$ac_lib_var=yes"
13521 else
13522   echo "configure: failed program was:" >&5
13523   cat conftest.$ac_ext >&5
13524   rm -rf conftest*
13525   eval "ac_cv_lib_$ac_lib_var=no"
13526 fi
13527 rm -f conftest*
13528 LIBS="$ac_save_LIBS"
13529
13530 fi
13531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13532   echo "$ac_t""yes" 1>&6
13533     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13534     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13535   cat >> confdefs.h <<EOF
13536 #define $ac_tr_lib 1
13537 EOF
13538
13539   LIBS="-lnsl $LIBS"
13540
13541 else
13542   echo "$ac_t""no" 1>&6
13543 fi
13544
13545         else
13546                 echo "configure: warning: could not find -lwrap" 1>&2
13547                 if test $ol_enable_wrappers = yes ; then
13548                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13549                 fi
13550
13551                 echo "configure: warning: disabling wrappers support" 1>&2
13552                 ol_enable_wrappers=no
13553                 WRAP_LIBS=""
13554         fi
13555 fi
13556
13557 if test $ol_enable_syslog != no ; then
13558         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13559 echo "configure:13560: checking for openlog" >&5
13560 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13561   echo $ac_n "(cached) $ac_c" 1>&6
13562 else
13563   cat > conftest.$ac_ext <<EOF
13564 #line 13565 "configure"
13565 #include "confdefs.h"
13566 /* System header to define __stub macros and hopefully few prototypes,
13567     which can conflict with char openlog(); below.  */
13568 #include <assert.h>
13569 /* Override any gcc2 internal prototype to avoid an error.  */
13570 /* We use char because int might match the return type of a gcc2
13571     builtin and then its argument prototype would still apply.  */
13572 char openlog();
13573 char (*f)();
13574
13575 int main() {
13576
13577 /* The GNU C library defines this for functions which it implements
13578     to always fail with ENOSYS.  Some functions are actually named
13579     something starting with __ and the normal name is an alias.  */
13580 #if defined (__stub_openlog) || defined (__stub___openlog)
13581 choke me
13582 #else
13583 f = openlog;
13584 #endif
13585
13586 ; return 0; }
13587 EOF
13588 if { (eval echo configure:13589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13589   rm -rf conftest*
13590   eval "ac_cv_func_openlog=yes"
13591 else
13592   echo "configure: failed program was:" >&5
13593   cat conftest.$ac_ext >&5
13594   rm -rf conftest*
13595   eval "ac_cv_func_openlog=no"
13596 fi
13597 rm -f conftest*
13598 fi
13599
13600 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13601   echo "$ac_t""yes" 1>&6
13602   :
13603 else
13604   echo "$ac_t""no" 1>&6
13605 fi
13606
13607         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13608                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13609         fi
13610         ol_enable_syslog=$ac_cv_func_openlog
13611 fi
13612
13613
13614 ol_link_sql=no
13615 if test $ol_enable_sql != no ; then
13616         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13617 echo "configure:13618: checking for SQLDriverConnect in -liodbc" >&5
13618 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13619 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13620   echo $ac_n "(cached) $ac_c" 1>&6
13621 else
13622   ac_save_LIBS="$LIBS"
13623 LIBS="-liodbc  $LIBS"
13624 cat > conftest.$ac_ext <<EOF
13625 #line 13626 "configure"
13626 #include "confdefs.h"
13627 /* Override any gcc2 internal prototype to avoid an error.  */
13628 /* We use char because int might match the return type of a gcc2
13629     builtin and then its argument prototype would still apply.  */
13630 char SQLDriverConnect();
13631
13632 int main() {
13633 SQLDriverConnect()
13634 ; return 0; }
13635 EOF
13636 if { (eval echo configure:13637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13637   rm -rf conftest*
13638   eval "ac_cv_lib_$ac_lib_var=yes"
13639 else
13640   echo "configure: failed program was:" >&5
13641   cat conftest.$ac_ext >&5
13642   rm -rf conftest*
13643   eval "ac_cv_lib_$ac_lib_var=no"
13644 fi
13645 rm -f conftest*
13646 LIBS="$ac_save_LIBS"
13647
13648 fi
13649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13650   echo "$ac_t""yes" 1>&6
13651   have_iodbc=yes
13652 else
13653   echo "$ac_t""no" 1>&6
13654 have_iodbc=no
13655 fi
13656
13657         if test $have_iodbc = yes ; then
13658                 ol_link_sql="-liodbc"
13659         else
13660                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13661 echo "configure:13662: checking for SQLDriverConnect in -lodbc" >&5
13662 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13664   echo $ac_n "(cached) $ac_c" 1>&6
13665 else
13666   ac_save_LIBS="$LIBS"
13667 LIBS="-lodbc  $LIBS"
13668 cat > conftest.$ac_ext <<EOF
13669 #line 13670 "configure"
13670 #include "confdefs.h"
13671 /* Override any gcc2 internal prototype to avoid an error.  */
13672 /* We use char because int might match the return type of a gcc2
13673     builtin and then its argument prototype would still apply.  */
13674 char SQLDriverConnect();
13675
13676 int main() {
13677 SQLDriverConnect()
13678 ; return 0; }
13679 EOF
13680 if { (eval echo configure:13681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13681   rm -rf conftest*
13682   eval "ac_cv_lib_$ac_lib_var=yes"
13683 else
13684   echo "configure: failed program was:" >&5
13685   cat conftest.$ac_ext >&5
13686   rm -rf conftest*
13687   eval "ac_cv_lib_$ac_lib_var=no"
13688 fi
13689 rm -f conftest*
13690 LIBS="$ac_save_LIBS"
13691
13692 fi
13693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13694   echo "$ac_t""yes" 1>&6
13695   have_odbc=yes
13696 else
13697   echo "$ac_t""no" 1>&6
13698 have_odbc=no
13699 fi
13700
13701                 if test $have_odbc = yes ; then
13702                         ol_link_sql="-lodbc"
13703                 fi
13704         fi
13705
13706         if test $ol_link_sql != no ; then
13707                 SLAPD_SQL_LIBS="$ol_link_sql"
13708
13709         elif test $ol_enable_sql != auto ; then
13710                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13711         fi
13712 fi
13713
13714 if test $ol_enable_tcl != no ; then
13715         for ac_hdr in tcl.h
13716 do
13717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13719 echo "configure:13720: checking for $ac_hdr" >&5
13720 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13721   echo $ac_n "(cached) $ac_c" 1>&6
13722 else
13723   cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726 #include <$ac_hdr>
13727 EOF
13728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13729 { (eval echo configure:13730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13731 if test -z "$ac_err"; then
13732   rm -rf conftest*
13733   eval "ac_cv_header_$ac_safe=yes"
13734 else
13735   echo "$ac_err" >&5
13736   echo "configure: failed program was:" >&5
13737   cat conftest.$ac_ext >&5
13738   rm -rf conftest*
13739   eval "ac_cv_header_$ac_safe=no"
13740 fi
13741 rm -f conftest*
13742 fi
13743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13744   echo "$ac_t""yes" 1>&6
13745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13746   cat >> confdefs.h <<EOF
13747 #define $ac_tr_hdr 1
13748 EOF
13749  
13750 else
13751   echo "$ac_t""no" 1>&6
13752 fi
13753 done
13754
13755
13756         if test $ac_cv_header_tcl_h != yes ; then
13757                 have_tcl=no
13758         else
13759                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13760                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13761 echo "configure:13762: checking for main in -l$lib" >&5
13762 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13764   echo $ac_n "(cached) $ac_c" 1>&6
13765 else
13766   ac_save_LIBS="$LIBS"
13767 LIBS="-l$lib  $LIBS"
13768 cat > conftest.$ac_ext <<EOF
13769 #line 13770 "configure"
13770 #include "confdefs.h"
13771
13772 int main() {
13773 main()
13774 ; return 0; }
13775 EOF
13776 if { (eval echo configure:13777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13777   rm -rf conftest*
13778   eval "ac_cv_lib_$ac_lib_var=yes"
13779 else
13780   echo "configure: failed program was:" >&5
13781   cat conftest.$ac_ext >&5
13782   rm -rf conftest*
13783   eval "ac_cv_lib_$ac_lib_var=no"
13784 fi
13785 rm -f conftest*
13786 LIBS="$ac_save_LIBS"
13787
13788 fi
13789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13790   echo "$ac_t""yes" 1>&6
13791   have_tcl=yes
13792                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13793                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13794                            else
13795                                MOD_TCL_LIB="-l${lib}"
13796                            fi;break
13797 else
13798   echo "$ac_t""no" 1>&6
13799 have_tcl=no
13800 fi
13801
13802                 done
13803         fi
13804
13805         if test $have_tcl != yes ; then
13806                 echo "configure: warning: could not find -ltcl" 1>&2
13807                 if test $ol_enable_tcl = yes ; then
13808                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13809                 fi
13810
13811                 ol_enable_tcl=no
13812         fi
13813 fi
13814
13815 ol_link_termcap=no
13816 for ac_hdr in termcap.h ncurses.h
13817 do
13818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13820 echo "configure:13821: checking for $ac_hdr" >&5
13821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13822   echo $ac_n "(cached) $ac_c" 1>&6
13823 else
13824   cat > conftest.$ac_ext <<EOF
13825 #line 13826 "configure"
13826 #include "confdefs.h"
13827 #include <$ac_hdr>
13828 EOF
13829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13830 { (eval echo configure:13831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13832 if test -z "$ac_err"; then
13833   rm -rf conftest*
13834   eval "ac_cv_header_$ac_safe=yes"
13835 else
13836   echo "$ac_err" >&5
13837   echo "configure: failed program was:" >&5
13838   cat conftest.$ac_ext >&5
13839   rm -rf conftest*
13840   eval "ac_cv_header_$ac_safe=no"
13841 fi
13842 rm -f conftest*
13843 fi
13844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13845   echo "$ac_t""yes" 1>&6
13846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13847   cat >> confdefs.h <<EOF
13848 #define $ac_tr_hdr 1
13849 EOF
13850  
13851 else
13852   echo "$ac_t""no" 1>&6
13853 fi
13854 done
13855
13856
13857 if test $ol_link_termcap = no ; then
13858         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13859 echo "configure:13860: checking for tputs in -ltermcap" >&5
13860 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13862   echo $ac_n "(cached) $ac_c" 1>&6
13863 else
13864   ac_save_LIBS="$LIBS"
13865 LIBS="-ltermcap  $LIBS"
13866 cat > conftest.$ac_ext <<EOF
13867 #line 13868 "configure"
13868 #include "confdefs.h"
13869 /* Override any gcc2 internal prototype to avoid an error.  */
13870 /* We use char because int might match the return type of a gcc2
13871     builtin and then its argument prototype would still apply.  */
13872 char tputs();
13873
13874 int main() {
13875 tputs()
13876 ; return 0; }
13877 EOF
13878 if { (eval echo configure:13879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13879   rm -rf conftest*
13880   eval "ac_cv_lib_$ac_lib_var=yes"
13881 else
13882   echo "configure: failed program was:" >&5
13883   cat conftest.$ac_ext >&5
13884   rm -rf conftest*
13885   eval "ac_cv_lib_$ac_lib_var=no"
13886 fi
13887 rm -f conftest*
13888 LIBS="$ac_save_LIBS"
13889
13890 fi
13891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13892   echo "$ac_t""yes" 1>&6
13893   have_termcap=yes
13894 else
13895   echo "$ac_t""no" 1>&6
13896 have_termcap=no
13897 fi
13898
13899         if test $have_termcap = yes ; then
13900                 cat >> confdefs.h <<\EOF
13901 #define HAVE_TERMCAP 1
13902 EOF
13903
13904                 ol_link_termcap=yes
13905                 TERMCAP_LIBS=-ltermcap
13906         fi
13907 fi
13908
13909 if test $ol_link_termcap = no ; then
13910         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13911 echo "configure:13912: checking for initscr in -lncurses" >&5
13912 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13914   echo $ac_n "(cached) $ac_c" 1>&6
13915 else
13916   ac_save_LIBS="$LIBS"
13917 LIBS="-lncurses  $LIBS"
13918 cat > conftest.$ac_ext <<EOF
13919 #line 13920 "configure"
13920 #include "confdefs.h"
13921 /* Override any gcc2 internal prototype to avoid an error.  */
13922 /* We use char because int might match the return type of a gcc2
13923     builtin and then its argument prototype would still apply.  */
13924 char initscr();
13925
13926 int main() {
13927 initscr()
13928 ; return 0; }
13929 EOF
13930 if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13931   rm -rf conftest*
13932   eval "ac_cv_lib_$ac_lib_var=yes"
13933 else
13934   echo "configure: failed program was:" >&5
13935   cat conftest.$ac_ext >&5
13936   rm -rf conftest*
13937   eval "ac_cv_lib_$ac_lib_var=no"
13938 fi
13939 rm -f conftest*
13940 LIBS="$ac_save_LIBS"
13941
13942 fi
13943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13944   echo "$ac_t""yes" 1>&6
13945   have_ncurses=yes
13946 else
13947   echo "$ac_t""no" 1>&6
13948 have_ncurses=no
13949 fi
13950
13951         if test $have_ncurses = yes ; then
13952                 cat >> confdefs.h <<\EOF
13953 #define HAVE_NCURSES 1
13954 EOF
13955
13956                 ol_link_termcap=yes
13957                 TERMCAP_LIBS=-lncurses
13958         fi
13959 fi
13960
13961 if test $ol_link_termcap = no ; then
13962         cat >> confdefs.h <<\EOF
13963 #define NO_TERMCAP 1
13964 EOF
13965
13966         TERMCAP_LIBS=
13967 fi
13968
13969 ol_link_sasl=no
13970 ol_link_spasswd=no
13971 if test $ol_with_cyrus_sasl != no ; then
13972         for ac_hdr in sasl.h
13973 do
13974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13976 echo "configure:13977: checking for $ac_hdr" >&5
13977 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13978   echo $ac_n "(cached) $ac_c" 1>&6
13979 else
13980   cat > conftest.$ac_ext <<EOF
13981 #line 13982 "configure"
13982 #include "confdefs.h"
13983 #include <$ac_hdr>
13984 EOF
13985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13986 { (eval echo configure:13987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13988 if test -z "$ac_err"; then
13989   rm -rf conftest*
13990   eval "ac_cv_header_$ac_safe=yes"
13991 else
13992   echo "$ac_err" >&5
13993   echo "configure: failed program was:" >&5
13994   cat conftest.$ac_ext >&5
13995   rm -rf conftest*
13996   eval "ac_cv_header_$ac_safe=no"
13997 fi
13998 rm -f conftest*
13999 fi
14000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14001   echo "$ac_t""yes" 1>&6
14002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14003   cat >> confdefs.h <<EOF
14004 #define $ac_tr_hdr 1
14005 EOF
14006  
14007 else
14008   echo "$ac_t""no" 1>&6
14009 fi
14010 done
14011
14012
14013         if test $ac_cv_header_sasl_h = yes ; then
14014                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
14015 echo "configure:14016: checking for sasl_client_init in -lsasl" >&5
14016 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
14017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14018   echo $ac_n "(cached) $ac_c" 1>&6
14019 else
14020   ac_save_LIBS="$LIBS"
14021 LIBS="-lsasl  $LIBS"
14022 cat > conftest.$ac_ext <<EOF
14023 #line 14024 "configure"
14024 #include "confdefs.h"
14025 /* Override any gcc2 internal prototype to avoid an error.  */
14026 /* We use char because int might match the return type of a gcc2
14027     builtin and then its argument prototype would still apply.  */
14028 char sasl_client_init();
14029
14030 int main() {
14031 sasl_client_init()
14032 ; return 0; }
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14035   rm -rf conftest*
14036   eval "ac_cv_lib_$ac_lib_var=yes"
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -rf conftest*
14041   eval "ac_cv_lib_$ac_lib_var=no"
14042 fi
14043 rm -f conftest*
14044 LIBS="$ac_save_LIBS"
14045
14046 fi
14047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14048   echo "$ac_t""yes" 1>&6
14049   have_cyrus_sasl=yes
14050 else
14051   echo "$ac_t""no" 1>&6
14052 have_cyrus_sasl=no
14053 fi
14054
14055
14056                 if test $have_cyrus_sasl != no ; then
14057                         SASL_LIBS="-lsasl"
14058                         cat >> confdefs.h <<\EOF
14059 #define HAVE_CYRUS_SASL 1
14060 EOF
14061
14062                         ol_link_sasl=yes
14063                 fi
14064         fi
14065
14066         if test $ol_link_sasl = no ; then
14067                 if test $ol_with_cyrus_sasl != auto ; then
14068                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
14069                 else
14070                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
14071                         echo "configure: warning: SASL authentication not supported!" 1>&2
14072                         if test $ol_link_tls = no ; then
14073                                 echo "configure: warning: Strong authentication not supported!" 1>&2
14074                         fi
14075                 fi
14076
14077         elif test $ol_enable_spasswd != no ; then
14078                 ol_link_spasswd=yes
14079         fi
14080
14081 else
14082         echo "configure: warning: SASL authentication not supported!" 1>&2
14083         if test $ol_link_tls = no ; then
14084                 echo "configure: warning: Strong authentication not supported!" 1>&2
14085         fi
14086 fi
14087
14088 if test $cross_compiling != yes ; then
14089         dev=no
14090         if test -r /dev/urandom ; then
14091                 dev="/dev/urandom";
14092         elif test -r /idev/urandom ; then
14093                 dev="/idev/urandom";
14094         elif test -r /dev/srandom ; then
14095                 dev="/dev/srandom";
14096         elif test -r /dev/random ; then
14097                 dev="/dev/random";
14098         elif test -r /idev/random ; then
14099                 dev="/idev/random";
14100         fi
14101
14102         if test $dev != no ; then
14103                 cat >> confdefs.h <<EOF
14104 #define URANDOM_DEVICE "$dev"
14105 EOF
14106
14107         fi
14108 fi
14109
14110 ol_link_fetch=no
14111 if test $ol_with_fetch != no ; then
14112         ol_LIBS=$LIBS
14113 LIBS="-lfetch -lcom_err $LIBS"
14114 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
14115 echo "configure:14116: checking fetch(3) library" >&5
14116 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
14117   echo $ac_n "(cached) $ac_c" 1>&6
14118 else
14119   
14120         cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123
14124 #include <sys/param.h>
14125 #include <stdio.h>
14126 #include <fetch.h>
14127 int main() {
14128 struct url *u = fetchParseURL("file:///"); 
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14132   rm -rf conftest*
14133   ol_cv_lib_fetch=yes
14134 else
14135   echo "configure: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   rm -rf conftest*
14138   ol_cv_lib_fetch=no
14139 fi
14140 rm -f conftest*
14141 fi
14142
14143 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
14144 LIBS=$ol_LIBS
14145 if test $ol_cv_lib_fetch != no ; then
14146         ol_link_fetch="-lfetch -lcom_err"
14147         cat >> confdefs.h <<\EOF
14148 #define HAVE_FETCH 1
14149 EOF
14150
14151 fi
14152
14153
14154         if test $ol_cv_lib_fetch != no ; then
14155                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
14156                 ol_link_fetch=freebsd
14157
14158         elif test $ol_with_fetch != auto ; then
14159                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
14160         fi 
14161 fi
14162
14163 ol_link_readline=no
14164 if test $ol_with_readline != no ; then
14165         for ac_hdr in readline/readline.h readline/history.h
14166 do
14167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14169 echo "configure:14170: checking for $ac_hdr" >&5
14170 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14171   echo $ac_n "(cached) $ac_c" 1>&6
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 #include <$ac_hdr>
14177 EOF
14178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14179 { (eval echo configure:14180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14181 if test -z "$ac_err"; then
14182   rm -rf conftest*
14183   eval "ac_cv_header_$ac_safe=yes"
14184 else
14185   echo "$ac_err" >&5
14186   echo "configure: failed program was:" >&5
14187   cat conftest.$ac_ext >&5
14188   rm -rf conftest*
14189   eval "ac_cv_header_$ac_safe=no"
14190 fi
14191 rm -f conftest*
14192 fi
14193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14194   echo "$ac_t""yes" 1>&6
14195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14196   cat >> confdefs.h <<EOF
14197 #define $ac_tr_hdr 1
14198 EOF
14199  
14200 else
14201   echo "$ac_t""no" 1>&6
14202 fi
14203 done
14204
14205
14206         if test $ac_cv_header_readline_readline_h = yes ; then
14207                 save_LIBS="$LIBS"
14208                 LIBS="$TERMCAP_LIBS $LIBS"
14209                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
14210 echo "configure:14211: checking for readline in -lreadline" >&5
14211 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
14212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14213   echo $ac_n "(cached) $ac_c" 1>&6
14214 else
14215   ac_save_LIBS="$LIBS"
14216 LIBS="-lreadline  $LIBS"
14217 cat > conftest.$ac_ext <<EOF
14218 #line 14219 "configure"
14219 #include "confdefs.h"
14220 /* Override any gcc2 internal prototype to avoid an error.  */
14221 /* We use char because int might match the return type of a gcc2
14222     builtin and then its argument prototype would still apply.  */
14223 char readline();
14224
14225 int main() {
14226 readline()
14227 ; return 0; }
14228 EOF
14229 if { (eval echo configure:14230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14230   rm -rf conftest*
14231   eval "ac_cv_lib_$ac_lib_var=yes"
14232 else
14233   echo "configure: failed program was:" >&5
14234   cat conftest.$ac_ext >&5
14235   rm -rf conftest*
14236   eval "ac_cv_lib_$ac_lib_var=no"
14237 fi
14238 rm -f conftest*
14239 LIBS="$ac_save_LIBS"
14240
14241 fi
14242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14243   echo "$ac_t""yes" 1>&6
14244   have_readline=yes
14245 else
14246   echo "$ac_t""no" 1>&6
14247 have_readline=no
14248 fi
14249
14250                 LIBS="$save_LIBS"
14251                         
14252                 if test $have_readline = yes ; then
14253                         ol_with_readline=found
14254                         ol_link_readline=yes
14255
14256                         READLINE_LIBS="-lreadline"
14257                 fi
14258         fi
14259 fi
14260
14261 if test $ol_link_readline = yes ; then
14262         cat >> confdefs.h <<\EOF
14263 #define HAVE_READLINE 1
14264 EOF
14265
14266 fi
14267
14268
14269 if test $ol_enable_crypt != no ; then
14270         echo $ac_n "checking for crypt""... $ac_c" 1>&6
14271 echo "configure:14272: checking for crypt" >&5
14272 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
14273   echo $ac_n "(cached) $ac_c" 1>&6
14274 else
14275   cat > conftest.$ac_ext <<EOF
14276 #line 14277 "configure"
14277 #include "confdefs.h"
14278 /* System header to define __stub macros and hopefully few prototypes,
14279     which can conflict with char crypt(); below.  */
14280 #include <assert.h>
14281 /* Override any gcc2 internal prototype to avoid an error.  */
14282 /* We use char because int might match the return type of a gcc2
14283     builtin and then its argument prototype would still apply.  */
14284 char crypt();
14285 char (*f)();
14286
14287 int main() {
14288
14289 /* The GNU C library defines this for functions which it implements
14290     to always fail with ENOSYS.  Some functions are actually named
14291     something starting with __ and the normal name is an alias.  */
14292 #if defined (__stub_crypt) || defined (__stub___crypt)
14293 choke me
14294 #else
14295 f = crypt;
14296 #endif
14297
14298 ; return 0; }
14299 EOF
14300 if { (eval echo configure:14301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14301   rm -rf conftest*
14302   eval "ac_cv_func_crypt=yes"
14303 else
14304   echo "configure: failed program was:" >&5
14305   cat conftest.$ac_ext >&5
14306   rm -rf conftest*
14307   eval "ac_cv_func_crypt=no"
14308 fi
14309 rm -f conftest*
14310 fi
14311
14312 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
14313   echo "$ac_t""yes" 1>&6
14314   have_crypt=yes
14315 else
14316   echo "$ac_t""no" 1>&6
14317
14318                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
14319 echo "configure:14320: checking for crypt in -lcrypt" >&5
14320 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
14321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14322   echo $ac_n "(cached) $ac_c" 1>&6
14323 else
14324   ac_save_LIBS="$LIBS"
14325 LIBS="-lcrypt  $LIBS"
14326 cat > conftest.$ac_ext <<EOF
14327 #line 14328 "configure"
14328 #include "confdefs.h"
14329 /* Override any gcc2 internal prototype to avoid an error.  */
14330 /* We use char because int might match the return type of a gcc2
14331     builtin and then its argument prototype would still apply.  */
14332 char crypt();
14333
14334 int main() {
14335 crypt()
14336 ; return 0; }
14337 EOF
14338 if { (eval echo configure:14339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14339   rm -rf conftest*
14340   eval "ac_cv_lib_$ac_lib_var=yes"
14341 else
14342   echo "configure: failed program was:" >&5
14343   cat conftest.$ac_ext >&5
14344   rm -rf conftest*
14345   eval "ac_cv_lib_$ac_lib_var=no"
14346 fi
14347 rm -f conftest*
14348 LIBS="$ac_save_LIBS"
14349
14350 fi
14351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14352   echo "$ac_t""yes" 1>&6
14353   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
14354                         have_crypt=yes
14355 else
14356   echo "$ac_t""no" 1>&6
14357 have_crypt=no
14358 fi
14359
14360 fi
14361
14362
14363         if test $have_crypt = yes ; then
14364                 cat >> confdefs.h <<\EOF
14365 #define HAVE_CRYPT 1
14366 EOF
14367
14368         else
14369                 echo "configure: warning: could not find crypt" 1>&2
14370                 if test $ol_enable_crypt = yes ; then
14371                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
14372                 fi
14373
14374                 echo "configure: warning: disabling crypt support" 1>&2
14375                 ol_enable_crypt=no
14376         fi
14377 fi
14378
14379 if test $ol_enable_proctitle != no ; then
14380         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
14381 echo "configure:14382: checking for setproctitle" >&5
14382 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
14383   echo $ac_n "(cached) $ac_c" 1>&6
14384 else
14385   cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388 /* System header to define __stub macros and hopefully few prototypes,
14389     which can conflict with char setproctitle(); below.  */
14390 #include <assert.h>
14391 /* Override any gcc2 internal prototype to avoid an error.  */
14392 /* We use char because int might match the return type of a gcc2
14393     builtin and then its argument prototype would still apply.  */
14394 char setproctitle();
14395 char (*f)();
14396
14397 int main() {
14398
14399 /* The GNU C library defines this for functions which it implements
14400     to always fail with ENOSYS.  Some functions are actually named
14401     something starting with __ and the normal name is an alias.  */
14402 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
14403 choke me
14404 #else
14405 f = setproctitle;
14406 #endif
14407
14408 ; return 0; }
14409 EOF
14410 if { (eval echo configure:14411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14411   rm -rf conftest*
14412   eval "ac_cv_func_setproctitle=yes"
14413 else
14414   echo "configure: failed program was:" >&5
14415   cat conftest.$ac_ext >&5
14416   rm -rf conftest*
14417   eval "ac_cv_func_setproctitle=no"
14418 fi
14419 rm -f conftest*
14420 fi
14421
14422 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14423   echo "$ac_t""yes" 1>&6
14424   have_setproctitle=yes
14425 else
14426   echo "$ac_t""no" 1>&6
14427
14428                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14429 echo "configure:14430: checking for setproctitle in -lutil" >&5
14430 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14432   echo $ac_n "(cached) $ac_c" 1>&6
14433 else
14434   ac_save_LIBS="$LIBS"
14435 LIBS="-lutil  $LIBS"
14436 cat > conftest.$ac_ext <<EOF
14437 #line 14438 "configure"
14438 #include "confdefs.h"
14439 /* Override any gcc2 internal prototype to avoid an error.  */
14440 /* We use char because int might match the return type of a gcc2
14441     builtin and then its argument prototype would still apply.  */
14442 char setproctitle();
14443
14444 int main() {
14445 setproctitle()
14446 ; return 0; }
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14449   rm -rf conftest*
14450   eval "ac_cv_lib_$ac_lib_var=yes"
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -rf conftest*
14455   eval "ac_cv_lib_$ac_lib_var=no"
14456 fi
14457 rm -f conftest*
14458 LIBS="$ac_save_LIBS"
14459
14460 fi
14461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14462   echo "$ac_t""yes" 1>&6
14463   have_setproctitle=yes
14464                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14465 else
14466   echo "$ac_t""no" 1>&6
14467 have_setproctitle=no
14468                         LIBOBJS="$LIBOBJS setproctitle.o"
14469                         LIBSRCS="$LIBSRCS setproctitle.c"
14470 fi
14471
14472 fi
14473
14474
14475         if test $have_setproctitle = yes ; then
14476                 cat >> confdefs.h <<\EOF
14477 #define HAVE_SETPROCTITLE 1
14478 EOF
14479
14480         fi
14481 fi
14482
14483 if test $ol_enable_slp != no ; then
14484         for ac_hdr in slp.h 
14485 do
14486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14488 echo "configure:14489: checking for $ac_hdr" >&5
14489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14490   echo $ac_n "(cached) $ac_c" 1>&6
14491 else
14492   cat > conftest.$ac_ext <<EOF
14493 #line 14494 "configure"
14494 #include "confdefs.h"
14495 #include <$ac_hdr>
14496 EOF
14497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14498 { (eval echo configure:14499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14500 if test -z "$ac_err"; then
14501   rm -rf conftest*
14502   eval "ac_cv_header_$ac_safe=yes"
14503 else
14504   echo "$ac_err" >&5
14505   echo "configure: failed program was:" >&5
14506   cat conftest.$ac_ext >&5
14507   rm -rf conftest*
14508   eval "ac_cv_header_$ac_safe=no"
14509 fi
14510 rm -f conftest*
14511 fi
14512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14513   echo "$ac_t""yes" 1>&6
14514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14515   cat >> confdefs.h <<EOF
14516 #define $ac_tr_hdr 1
14517 EOF
14518  
14519 else
14520   echo "$ac_t""no" 1>&6
14521 fi
14522 done
14523
14524
14525         if test $ac_cv_header_slp_h = yes ; then
14526                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
14527 echo "configure:14528: checking for SLPOpen in -lslp" >&5
14528 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
14529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14530   echo $ac_n "(cached) $ac_c" 1>&6
14531 else
14532   ac_save_LIBS="$LIBS"
14533 LIBS="-lslp  $LIBS"
14534 cat > conftest.$ac_ext <<EOF
14535 #line 14536 "configure"
14536 #include "confdefs.h"
14537 /* Override any gcc2 internal prototype to avoid an error.  */
14538 /* We use char because int might match the return type of a gcc2
14539     builtin and then its argument prototype would still apply.  */
14540 char SLPOpen();
14541
14542 int main() {
14543 SLPOpen()
14544 ; return 0; }
14545 EOF
14546 if { (eval echo configure:14547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14547   rm -rf conftest*
14548   eval "ac_cv_lib_$ac_lib_var=yes"
14549 else
14550   echo "configure: failed program was:" >&5
14551   cat conftest.$ac_ext >&5
14552   rm -rf conftest*
14553   eval "ac_cv_lib_$ac_lib_var=no"
14554 fi
14555 rm -f conftest*
14556 LIBS="$ac_save_LIBS"
14557
14558 fi
14559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14560   echo "$ac_t""yes" 1>&6
14561   have_slp=yes
14562 else
14563   echo "$ac_t""no" 1>&6
14564 have_slp=no
14565 fi
14566
14567                 if test $have_slp = yes ; then
14568                         cat >> confdefs.h <<\EOF
14569 #define HAVE_SLP 1
14570 EOF
14571
14572                         SLAPD_SLP_LIBS=-lslp
14573                 fi
14574
14575         elif test $ol_enable_slp = yes ; then
14576                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
14577         fi
14578 fi
14579
14580 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14581 echo "configure:14582: checking for ANSI C header files" >&5
14582 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14583   echo $ac_n "(cached) $ac_c" 1>&6
14584 else
14585   cat > conftest.$ac_ext <<EOF
14586 #line 14587 "configure"
14587 #include "confdefs.h"
14588 #include <stdlib.h>
14589 #include <stdarg.h>
14590 #include <string.h>
14591 #include <float.h>
14592 EOF
14593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14594 { (eval echo configure:14595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14596 if test -z "$ac_err"; then
14597   rm -rf conftest*
14598   ac_cv_header_stdc=yes
14599 else
14600   echo "$ac_err" >&5
14601   echo "configure: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   rm -rf conftest*
14604   ac_cv_header_stdc=no
14605 fi
14606 rm -f conftest*
14607
14608 if test $ac_cv_header_stdc = yes; then
14609   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14610 cat > conftest.$ac_ext <<EOF
14611 #line 14612 "configure"
14612 #include "confdefs.h"
14613 #include <string.h>
14614 EOF
14615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14616   egrep "memchr" >/dev/null 2>&1; then
14617   :
14618 else
14619   rm -rf conftest*
14620   ac_cv_header_stdc=no
14621 fi
14622 rm -f conftest*
14623
14624 fi
14625
14626 if test $ac_cv_header_stdc = yes; then
14627   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14628 cat > conftest.$ac_ext <<EOF
14629 #line 14630 "configure"
14630 #include "confdefs.h"
14631 #include <stdlib.h>
14632 EOF
14633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14634   egrep "free" >/dev/null 2>&1; then
14635   :
14636 else
14637   rm -rf conftest*
14638   ac_cv_header_stdc=no
14639 fi
14640 rm -f conftest*
14641
14642 fi
14643
14644 if test $ac_cv_header_stdc = yes; then
14645   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14646 if test "$cross_compiling" = yes; then
14647   :
14648 else
14649   cat > conftest.$ac_ext <<EOF
14650 #line 14651 "configure"
14651 #include "confdefs.h"
14652 #include <ctype.h>
14653 #if ((' ' & 0x0FF) == 0x020)
14654 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14655 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14656 #else
14657 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14658  || ('j' <= (c) && (c) <= 'r') \
14659  || ('s' <= (c) && (c) <= 'z'))
14660 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14661 #endif
14662 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14663 int main () { int i; for (i = 0; i < 256; i++)
14664 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14665 exit (0); }
14666
14667 EOF
14668 if { (eval echo configure:14669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14669 then
14670   :
14671 else
14672   echo "configure: failed program was:" >&5
14673   cat conftest.$ac_ext >&5
14674   rm -fr conftest*
14675   ac_cv_header_stdc=no
14676 fi
14677 rm -fr conftest*
14678 fi
14679
14680 fi
14681 fi
14682
14683 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14684 if test $ac_cv_header_stdc = yes; then
14685   cat >> confdefs.h <<\EOF
14686 #define STDC_HEADERS 1
14687 EOF
14688
14689 fi
14690
14691 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14692 echo "configure:14693: checking for mode_t" >&5
14693 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14694   echo $ac_n "(cached) $ac_c" 1>&6
14695 else
14696   cat > conftest.$ac_ext <<EOF
14697 #line 14698 "configure"
14698 #include "confdefs.h"
14699 #include <sys/types.h>
14700 #if STDC_HEADERS
14701 #include <stdlib.h>
14702 #include <stddef.h>
14703 #endif
14704
14705 EOF
14706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14707   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14708   rm -rf conftest*
14709   eval "ac_cv_type_mode_t=yes"
14710 else
14711   rm -rf conftest*
14712   eval "ac_cv_type_mode_t=no"
14713 fi
14714 rm -f conftest*
14715
14716 fi
14717 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14718   echo "$ac_t""yes" 1>&6
14719 else
14720   echo "$ac_t""no" 1>&6
14721   cat >> confdefs.h <<EOF
14722 #define mode_t int
14723 EOF
14724
14725 fi
14726
14727 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14728 echo "configure:14729: checking for off_t" >&5
14729 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14730   echo $ac_n "(cached) $ac_c" 1>&6
14731 else
14732   cat > conftest.$ac_ext <<EOF
14733 #line 14734 "configure"
14734 #include "confdefs.h"
14735 #include <sys/types.h>
14736 #if STDC_HEADERS
14737 #include <stdlib.h>
14738 #include <stddef.h>
14739 #endif
14740
14741 EOF
14742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14743   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14744   rm -rf conftest*
14745   eval "ac_cv_type_off_t=yes"
14746 else
14747   rm -rf conftest*
14748   eval "ac_cv_type_off_t=no"
14749 fi
14750 rm -f conftest*
14751
14752 fi
14753 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14754   echo "$ac_t""yes" 1>&6
14755 else
14756   echo "$ac_t""no" 1>&6
14757   cat >> confdefs.h <<EOF
14758 #define off_t long
14759 EOF
14760
14761 fi
14762
14763 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14764 echo "configure:14765: checking for pid_t" >&5
14765 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14766   echo $ac_n "(cached) $ac_c" 1>&6
14767 else
14768   cat > conftest.$ac_ext <<EOF
14769 #line 14770 "configure"
14770 #include "confdefs.h"
14771 #include <sys/types.h>
14772 #if STDC_HEADERS
14773 #include <stdlib.h>
14774 #include <stddef.h>
14775 #endif
14776
14777 EOF
14778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14779   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14780   rm -rf conftest*
14781   eval "ac_cv_type_pid_t=yes"
14782 else
14783   rm -rf conftest*
14784   eval "ac_cv_type_pid_t=no"
14785 fi
14786 rm -f conftest*
14787
14788 fi
14789 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14790   echo "$ac_t""yes" 1>&6
14791 else
14792   echo "$ac_t""no" 1>&6
14793   cat >> confdefs.h <<EOF
14794 #define pid_t int
14795 EOF
14796
14797 fi
14798
14799 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14800 echo "configure:14801: checking for ptrdiff_t" >&5
14801 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14802   echo $ac_n "(cached) $ac_c" 1>&6
14803 else
14804   cat > conftest.$ac_ext <<EOF
14805 #line 14806 "configure"
14806 #include "confdefs.h"
14807 #include <stddef.h>
14808 int main() {
14809 ptrdiff_t p
14810 ; return 0; }
14811 EOF
14812 if { (eval echo configure:14813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14813   rm -rf conftest*
14814   am_cv_type_ptrdiff_t=yes
14815 else
14816   echo "configure: failed program was:" >&5
14817   cat conftest.$ac_ext >&5
14818   rm -rf conftest*
14819   am_cv_type_ptrdiff_t=no
14820 fi
14821 rm -f conftest*
14822 fi
14823
14824 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14825    if test $am_cv_type_ptrdiff_t = yes; then
14826      cat >> confdefs.h <<\EOF
14827 #define HAVE_PTRDIFF_T 1
14828 EOF
14829
14830    fi
14831
14832 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14833 echo "configure:14834: checking return type of signal handlers" >&5
14834 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14835   echo $ac_n "(cached) $ac_c" 1>&6
14836 else
14837   cat > conftest.$ac_ext <<EOF
14838 #line 14839 "configure"
14839 #include "confdefs.h"
14840 #include <sys/types.h>
14841 #include <signal.h>
14842 #ifdef signal
14843 #undef signal
14844 #endif
14845 #ifdef __cplusplus
14846 extern "C" void (*signal (int, void (*)(int)))(int);
14847 #else
14848 void (*signal ()) ();
14849 #endif
14850
14851 int main() {
14852 int i;
14853 ; return 0; }
14854 EOF
14855 if { (eval echo configure:14856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14856   rm -rf conftest*
14857   ac_cv_type_signal=void
14858 else
14859   echo "configure: failed program was:" >&5
14860   cat conftest.$ac_ext >&5
14861   rm -rf conftest*
14862   ac_cv_type_signal=int
14863 fi
14864 rm -f conftest*
14865 fi
14866
14867 echo "$ac_t""$ac_cv_type_signal" 1>&6
14868 cat >> confdefs.h <<EOF
14869 #define RETSIGTYPE $ac_cv_type_signal
14870 EOF
14871
14872
14873 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14874 echo "configure:14875: checking for size_t" >&5
14875 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14876   echo $ac_n "(cached) $ac_c" 1>&6
14877 else
14878   cat > conftest.$ac_ext <<EOF
14879 #line 14880 "configure"
14880 #include "confdefs.h"
14881 #include <sys/types.h>
14882 #if STDC_HEADERS
14883 #include <stdlib.h>
14884 #include <stddef.h>
14885 #endif
14886
14887 EOF
14888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14889   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14890   rm -rf conftest*
14891   eval "ac_cv_type_size_t=yes"
14892 else
14893   rm -rf conftest*
14894   eval "ac_cv_type_size_t=no"
14895 fi
14896 rm -f conftest*
14897
14898 fi
14899 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14900   echo "$ac_t""yes" 1>&6
14901 else
14902   echo "$ac_t""no" 1>&6
14903   cat >> confdefs.h <<EOF
14904 #define size_t unsigned
14905 EOF
14906
14907 fi
14908
14909
14910 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14911 echo "configure:14912: checking for ssize_t" >&5
14912 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14913   echo $ac_n "(cached) $ac_c" 1>&6
14914 else
14915   cat > conftest.$ac_ext <<EOF
14916 #line 14917 "configure"
14917 #include "confdefs.h"
14918 #include <sys/types.h>
14919 #if STDC_HEADERS
14920 #include <stdlib.h>
14921 #include <stddef.h>
14922 #endif
14923
14924 EOF
14925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14926   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14927   rm -rf conftest*
14928   eval "ac_cv_type_ssize_t=yes"
14929 else
14930   rm -rf conftest*
14931   eval "ac_cv_type_ssize_t=no"
14932 fi
14933 rm -f conftest*
14934
14935 fi
14936 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14937   echo "$ac_t""yes" 1>&6
14938 else
14939   echo "$ac_t""no" 1>&6
14940   cat >> confdefs.h <<EOF
14941 #define ssize_t signed int
14942 EOF
14943
14944 fi
14945
14946 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14947 echo "configure:14948: checking for caddr_t" >&5
14948 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14949   echo $ac_n "(cached) $ac_c" 1>&6
14950 else
14951   cat > conftest.$ac_ext <<EOF
14952 #line 14953 "configure"
14953 #include "confdefs.h"
14954 #include <sys/types.h>
14955 #if STDC_HEADERS
14956 #include <stdlib.h>
14957 #include <stddef.h>
14958 #endif
14959
14960 EOF
14961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14962   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14963   rm -rf conftest*
14964   eval "ac_cv_type_caddr_t=yes"
14965 else
14966   rm -rf conftest*
14967   eval "ac_cv_type_caddr_t=no"
14968 fi
14969 rm -f conftest*
14970
14971 fi
14972 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14973   echo "$ac_t""yes" 1>&6
14974 else
14975   echo "$ac_t""no" 1>&6
14976   cat >> confdefs.h <<EOF
14977 #define caddr_t char *
14978 EOF
14979
14980 fi
14981
14982
14983 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14984 echo "configure:14985: checking for socklen_t" >&5
14985 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14986   echo $ac_n "(cached) $ac_c" 1>&6
14987 else
14988   cat > conftest.$ac_ext <<EOF
14989 #line 14990 "configure"
14990 #include "confdefs.h"
14991
14992 #ifdef HAVE_SYS_TYPES_H
14993 #include <sys/types.h>
14994 #endif
14995 #ifdef HAVE_SYS_SOCKET_H
14996 #include <sys/socket.h>
14997 #endif
14998
14999 int main() {
15000 socklen_t len;
15001 ; return 0; }
15002 EOF
15003 if { (eval echo configure:15004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15004   rm -rf conftest*
15005   ol_cv_type_socklen_t=yes
15006 else
15007   echo "configure: failed program was:" >&5
15008   cat conftest.$ac_ext >&5
15009   rm -rf conftest*
15010   ol_cv_type_socklen_t=no
15011 fi
15012 rm -f conftest*
15013 fi
15014
15015 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
15016   if test $ol_cv_type_socklen_t = no; then
15017     cat >> confdefs.h <<\EOF
15018 #define socklen_t int
15019 EOF
15020
15021   fi
15022  
15023 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
15024 echo "configure:15025: checking for member st_blksize in aggregate type struct stat" >&5
15025 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
15026   echo $ac_n "(cached) $ac_c" 1>&6
15027 else
15028   cat > conftest.$ac_ext <<EOF
15029 #line 15030 "configure"
15030 #include "confdefs.h"
15031 #include <sys/types.h>
15032 #include <sys/stat.h>
15033 int main() {
15034 struct stat foo; foo.st_blksize;
15035 ; return 0; }
15036 EOF
15037 if { (eval echo configure:15038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15038   rm -rf conftest*
15039   ac_cv_c_struct_member_st_blksize=yes
15040 else
15041   echo "configure: failed program was:" >&5
15042   cat conftest.$ac_ext >&5
15043   rm -rf conftest*
15044   ac_cv_c_struct_member_st_blksize=no
15045 fi
15046 rm -f conftest*
15047 fi
15048
15049 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
15050 st_blksize="$ac_cv_c_struct_member_st_blksize"
15051 if test $ac_cv_c_struct_member_st_blksize = yes; then
15052   cat >> confdefs.h <<\EOF
15053 #define HAVE_ST_BLKSIZE 1
15054 EOF
15055
15056 fi
15057
15058 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
15059 echo "configure:15060: checking whether time.h and sys/time.h may both be included" >&5
15060 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
15061   echo $ac_n "(cached) $ac_c" 1>&6
15062 else
15063   cat > conftest.$ac_ext <<EOF
15064 #line 15065 "configure"
15065 #include "confdefs.h"
15066 #include <sys/types.h>
15067 #include <sys/time.h>
15068 #include <time.h>
15069 int main() {
15070 struct tm *tp;
15071 ; return 0; }
15072 EOF
15073 if { (eval echo configure:15074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15074   rm -rf conftest*
15075   ac_cv_header_time=yes
15076 else
15077   echo "configure: failed program was:" >&5
15078   cat conftest.$ac_ext >&5
15079   rm -rf conftest*
15080   ac_cv_header_time=no
15081 fi
15082 rm -f conftest*
15083 fi
15084
15085 echo "$ac_t""$ac_cv_header_time" 1>&6
15086 if test $ac_cv_header_time = yes; then
15087   cat >> confdefs.h <<\EOF
15088 #define TIME_WITH_SYS_TIME 1
15089 EOF
15090
15091 fi
15092
15093 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
15094 echo "configure:15095: checking whether struct tm is in sys/time.h or time.h" >&5
15095 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
15096   echo $ac_n "(cached) $ac_c" 1>&6
15097 else
15098   cat > conftest.$ac_ext <<EOF
15099 #line 15100 "configure"
15100 #include "confdefs.h"
15101 #include <sys/types.h>
15102 #include <time.h>
15103 int main() {
15104 struct tm *tp; tp->tm_sec;
15105 ; return 0; }
15106 EOF
15107 if { (eval echo configure:15108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15108   rm -rf conftest*
15109   ac_cv_struct_tm=time.h
15110 else
15111   echo "configure: failed program was:" >&5
15112   cat conftest.$ac_ext >&5
15113   rm -rf conftest*
15114   ac_cv_struct_tm=sys/time.h
15115 fi
15116 rm -f conftest*
15117 fi
15118
15119 echo "$ac_t""$ac_cv_struct_tm" 1>&6
15120 if test $ac_cv_struct_tm = sys/time.h; then
15121   cat >> confdefs.h <<\EOF
15122 #define TM_IN_SYS_TIME 1
15123 EOF
15124
15125 fi
15126
15127 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15128 echo "configure:15129: checking for uid_t in sys/types.h" >&5
15129 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
15130   echo $ac_n "(cached) $ac_c" 1>&6
15131 else
15132   cat > conftest.$ac_ext <<EOF
15133 #line 15134 "configure"
15134 #include "confdefs.h"
15135 #include <sys/types.h>
15136 EOF
15137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15138   egrep "uid_t" >/dev/null 2>&1; then
15139   rm -rf conftest*
15140   ac_cv_type_uid_t=yes
15141 else
15142   rm -rf conftest*
15143   ac_cv_type_uid_t=no
15144 fi
15145 rm -f conftest*
15146
15147 fi
15148
15149 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
15150 if test $ac_cv_type_uid_t = no; then
15151   cat >> confdefs.h <<\EOF
15152 #define uid_t int
15153 EOF
15154
15155   cat >> confdefs.h <<\EOF
15156 #define gid_t int
15157 EOF
15158
15159 fi
15160
15161 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
15162 echo "configure:15163: checking for sig_atomic_t" >&5
15163 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
15164   echo $ac_n "(cached) $ac_c" 1>&6
15165 else
15166   cat > conftest.$ac_ext <<EOF
15167 #line 15168 "configure"
15168 #include "confdefs.h"
15169 #include <signal.h>
15170 int main() {
15171 sig_atomic_t atomic;
15172 ; return 0; }
15173 EOF
15174 if { (eval echo configure:15175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15175   rm -rf conftest*
15176   ol_cv_type_sig_atomic_t=yes
15177 else
15178   echo "configure: failed program was:" >&5
15179   cat conftest.$ac_ext >&5
15180   rm -rf conftest*
15181   ol_cv_type_sig_atomic_t=no
15182 fi
15183 rm -f conftest*
15184 fi
15185
15186 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
15187   if test $ol_cv_type_sig_atomic_t = no; then
15188     cat >> confdefs.h <<\EOF
15189 #define sig_atomic_t int
15190 EOF
15191
15192   fi
15193  
15194
15195
15196 # test for pw_gecos in struct passwd
15197 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
15198 echo "configure:15199: checking struct passwd for pw_gecos" >&5
15199 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
15200   echo $ac_n "(cached) $ac_c" 1>&6
15201 else
15202   
15203         cat > conftest.$ac_ext <<EOF
15204 #line 15205 "configure"
15205 #include "confdefs.h"
15206 #include <pwd.h>
15207 int main() {
15208
15209         struct passwd pwd;
15210         pwd.pw_gecos = pwd.pw_name;
15211
15212 ; return 0; }
15213 EOF
15214 if { (eval echo configure:15215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15215   rm -rf conftest*
15216   ol_cv_struct_passwd_pw_gecos=yes
15217 else
15218   echo "configure: failed program was:" >&5
15219   cat conftest.$ac_ext >&5
15220   rm -rf conftest*
15221   ol_cv_struct_passwd_pw_gecos=no
15222 fi
15223 rm -f conftest*
15224 fi
15225
15226 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
15227 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
15228         cat >> confdefs.h <<\EOF
15229 #define HAVE_PW_GECOS 1
15230 EOF
15231
15232 fi
15233
15234 # test for pw_passwd in struct passwd
15235 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
15236 echo "configure:15237: checking struct passwd for pw_passwd" >&5
15237 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
15238   echo $ac_n "(cached) $ac_c" 1>&6
15239 else
15240   
15241         cat > conftest.$ac_ext <<EOF
15242 #line 15243 "configure"
15243 #include "confdefs.h"
15244 #include <pwd.h>
15245 int main() {
15246
15247         struct passwd pwd;
15248         pwd.pw_passwd = pwd.pw_name;
15249
15250 ; return 0; }
15251 EOF
15252 if { (eval echo configure:15253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15253   rm -rf conftest*
15254   ol_cv_struct_passwd_pw_passwd=yes
15255 else
15256   echo "configure: failed program was:" >&5
15257   cat conftest.$ac_ext >&5
15258   rm -rf conftest*
15259   ol_cv_struct_passwd_pw_passwd=no
15260 fi
15261 rm -f conftest*
15262 fi
15263
15264 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
15265 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
15266         cat >> confdefs.h <<\EOF
15267 #define HAVE_PW_PASSWD 1
15268 EOF
15269
15270 fi
15271
15272
15273 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
15274 echo "configure:15275: checking if toupper() requires islower()" >&5
15275 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
15276   echo $ac_n "(cached) $ac_c" 1>&6
15277 else
15278   
15279         if test "$cross_compiling" = yes; then
15280   ol_cv_c_upper_lower=safe
15281 else
15282   cat > conftest.$ac_ext <<EOF
15283 #line 15284 "configure"
15284 #include "confdefs.h"
15285
15286 #include <ctype.h>
15287 main()
15288 {
15289         if ('C' == toupper('C'))
15290                 exit(0);
15291         else
15292                 exit(1);
15293 }
15294 EOF
15295 if { (eval echo configure:15296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15296 then
15297   ol_cv_c_upper_lower=no
15298 else
15299   echo "configure: failed program was:" >&5
15300   cat conftest.$ac_ext >&5
15301   rm -fr conftest*
15302   ol_cv_c_upper_lower=yes
15303 fi
15304 rm -fr conftest*
15305 fi
15306
15307 fi
15308
15309 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
15310 if test $ol_cv_c_upper_lower != no ; then
15311         cat >> confdefs.h <<\EOF
15312 #define C_UPPER_LOWER 1
15313 EOF
15314
15315 fi
15316
15317 echo $ac_n "checking for working const""... $ac_c" 1>&6
15318 echo "configure:15319: checking for working const" >&5
15319 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
15320   echo $ac_n "(cached) $ac_c" 1>&6
15321 else
15322   cat > conftest.$ac_ext <<EOF
15323 #line 15324 "configure"
15324 #include "confdefs.h"
15325
15326 int main() {
15327
15328 /* Ultrix mips cc rejects this.  */
15329 typedef int charset[2]; const charset x;
15330 /* SunOS 4.1.1 cc rejects this.  */
15331 char const *const *ccp;
15332 char **p;
15333 /* NEC SVR4.0.2 mips cc rejects this.  */
15334 struct point {int x, y;};
15335 static struct point const zero = {0,0};
15336 /* AIX XL C 1.02.0.0 rejects this.
15337    It does not let you subtract one const X* pointer from another in an arm
15338    of an if-expression whose if-part is not a constant expression */
15339 const char *g = "string";
15340 ccp = &g + (g ? g-g : 0);
15341 /* HPUX 7.0 cc rejects these. */
15342 ++ccp;
15343 p = (char**) ccp;
15344 ccp = (char const *const *) p;
15345 { /* SCO 3.2v4 cc rejects this.  */
15346   char *t;
15347   char const *s = 0 ? (char *) 0 : (char const *) 0;
15348
15349   *t++ = 0;
15350 }
15351 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15352   int x[] = {25, 17};
15353   const int *foo = &x[0];
15354   ++foo;
15355 }
15356 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15357   typedef const int *iptr;
15358   iptr p = 0;
15359   ++p;
15360 }
15361 { /* AIX XL C 1.02.0.0 rejects this saying
15362      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15363   struct s { int j; const int *ap[3]; };
15364   struct s *b; b->j = 5;
15365 }
15366 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15367   const int foo = 10;
15368 }
15369
15370 ; return 0; }
15371 EOF
15372 if { (eval echo configure:15373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15373   rm -rf conftest*
15374   ac_cv_c_const=yes
15375 else
15376   echo "configure: failed program was:" >&5
15377   cat conftest.$ac_ext >&5
15378   rm -rf conftest*
15379   ac_cv_c_const=no
15380 fi
15381 rm -f conftest*
15382 fi
15383
15384 echo "$ac_t""$ac_cv_c_const" 1>&6
15385 if test $ac_cv_c_const = no; then
15386   cat >> confdefs.h <<\EOF
15387 #define const 
15388 EOF
15389
15390 fi
15391
15392 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
15393 echo "configure:15394: checking if compiler understands volatile" >&5
15394 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
15395   echo $ac_n "(cached) $ac_c" 1>&6
15396 else
15397   cat > conftest.$ac_ext <<EOF
15398 #line 15399 "configure"
15399 #include "confdefs.h"
15400 int x, y, z;
15401 int main() {
15402 volatile int a; int * volatile b = x ? &y : &z;
15403       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
15404       *b = 0;
15405 ; return 0; }
15406 EOF
15407 if { (eval echo configure:15408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15408   rm -rf conftest*
15409   ol_cv_c_volatile=yes
15410 else
15411   echo "configure: failed program was:" >&5
15412   cat conftest.$ac_ext >&5
15413   rm -rf conftest*
15414   ol_cv_c_volatile=no
15415 fi
15416 rm -f conftest*
15417 fi
15418
15419 echo "$ac_t""$ol_cv_c_volatile" 1>&6
15420   if test $ol_cv_c_volatile = yes; then
15421     : 
15422   else
15423     cat >> confdefs.h <<\EOF
15424 #define volatile 
15425 EOF
15426
15427   fi
15428  
15429
15430 if test $cross_compiling = yes ; then
15431         cat >> confdefs.h <<\EOF
15432 #define CROSS_COMPILING 1
15433 EOF
15434
15435 else
15436         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
15437 echo "configure:15438: checking whether byte ordering is bigendian" >&5
15438 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
15439   echo $ac_n "(cached) $ac_c" 1>&6
15440 else
15441   ac_cv_c_bigendian=unknown
15442 # See if sys/param.h defines the BYTE_ORDER macro.
15443 cat > conftest.$ac_ext <<EOF
15444 #line 15445 "configure"
15445 #include "confdefs.h"
15446 #include <sys/types.h>
15447 #include <sys/param.h>
15448 int main() {
15449
15450 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15451  bogus endian macros
15452 #endif
15453 ; return 0; }
15454 EOF
15455 if { (eval echo configure:15456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15456   rm -rf conftest*
15457   # It does; now see whether it defined to BIG_ENDIAN or not.
15458 cat > conftest.$ac_ext <<EOF
15459 #line 15460 "configure"
15460 #include "confdefs.h"
15461 #include <sys/types.h>
15462 #include <sys/param.h>
15463 int main() {
15464
15465 #if BYTE_ORDER != BIG_ENDIAN
15466  not big endian
15467 #endif
15468 ; return 0; }
15469 EOF
15470 if { (eval echo configure:15471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15471   rm -rf conftest*
15472   ac_cv_c_bigendian=yes
15473 else
15474   echo "configure: failed program was:" >&5
15475   cat conftest.$ac_ext >&5
15476   rm -rf conftest*
15477   ac_cv_c_bigendian=no
15478 fi
15479 rm -f conftest*
15480 else
15481   echo "configure: failed program was:" >&5
15482   cat conftest.$ac_ext >&5
15483 fi
15484 rm -f conftest*
15485 if test $ac_cv_c_bigendian = unknown; then
15486 if test "$cross_compiling" = yes; then
15487     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
15488 else
15489   cat > conftest.$ac_ext <<EOF
15490 #line 15491 "configure"
15491 #include "confdefs.h"
15492 main () {
15493   /* Are we little or big endian?  From Harbison&Steele.  */
15494   union
15495   {
15496     long l;
15497     char c[sizeof (long)];
15498   } u;
15499   u.l = 1;
15500   exit (u.c[sizeof (long) - 1] == 1);
15501 }
15502 EOF
15503 if { (eval echo configure:15504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15504 then
15505   ac_cv_c_bigendian=no
15506 else
15507   echo "configure: failed program was:" >&5
15508   cat conftest.$ac_ext >&5
15509   rm -fr conftest*
15510   ac_cv_c_bigendian=yes
15511 fi
15512 rm -fr conftest*
15513 fi
15514
15515 fi
15516 fi
15517
15518 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15519 if test $ac_cv_c_bigendian = yes; then
15520   cat >> confdefs.h <<\EOF
15521 #define WORDS_BIGENDIAN 1
15522 EOF
15523
15524 fi
15525
15526 fi
15527
15528 echo $ac_n "checking size of short""... $ac_c" 1>&6
15529 echo "configure:15530: checking size of short" >&5 
15530 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15531   echo $ac_n "(cached) $ac_c" 1>&6
15532 else
15533   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15534   cat > conftest.$ac_ext <<EOF
15535 #line 15536 "configure"
15536 #include "confdefs.h"
15537 #include "confdefs.h" 
15538 #include <sys/types.h> 
15539  
15540
15541 int main() {
15542 switch (0) case 0: case (sizeof (short) == $ac_size):;
15543 ; return 0; }
15544 EOF
15545 if { (eval echo configure:15546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15546   rm -rf conftest*
15547   ac_cv_sizeof_short=$ac_size
15548 else
15549   echo "configure: failed program was:" >&5
15550   cat conftest.$ac_ext >&5
15551 fi
15552 rm -f conftest* 
15553   if test x$ac_cv_sizeof_short != x ; then break; fi 
15554 done 
15555
15556 fi
15557  
15558 if test x$ac_cv_sizeof_short = x ; then 
15559   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15560 fi 
15561 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15562 cat >> confdefs.h <<EOF
15563 #define SIZEOF_SHORT $ac_cv_sizeof_short
15564 EOF
15565  
15566  
15567 echo $ac_n "checking size of int""... $ac_c" 1>&6
15568 echo "configure:15569: checking size of int" >&5 
15569 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15570   echo $ac_n "(cached) $ac_c" 1>&6
15571 else
15572   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15573   cat > conftest.$ac_ext <<EOF
15574 #line 15575 "configure"
15575 #include "confdefs.h"
15576 #include "confdefs.h" 
15577 #include <sys/types.h> 
15578  
15579
15580 int main() {
15581 switch (0) case 0: case (sizeof (int) == $ac_size):;
15582 ; return 0; }
15583 EOF
15584 if { (eval echo configure:15585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15585   rm -rf conftest*
15586   ac_cv_sizeof_int=$ac_size
15587 else
15588   echo "configure: failed program was:" >&5
15589   cat conftest.$ac_ext >&5
15590 fi
15591 rm -f conftest* 
15592   if test x$ac_cv_sizeof_int != x ; then break; fi 
15593 done 
15594
15595 fi
15596  
15597 if test x$ac_cv_sizeof_int = x ; then 
15598   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15599 fi 
15600 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15601 cat >> confdefs.h <<EOF
15602 #define SIZEOF_INT $ac_cv_sizeof_int
15603 EOF
15604  
15605  
15606 echo $ac_n "checking size of long""... $ac_c" 1>&6
15607 echo "configure:15608: checking size of long" >&5 
15608 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15609   echo $ac_n "(cached) $ac_c" 1>&6
15610 else
15611   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15612   cat > conftest.$ac_ext <<EOF
15613 #line 15614 "configure"
15614 #include "confdefs.h"
15615 #include "confdefs.h" 
15616 #include <sys/types.h> 
15617  
15618
15619 int main() {
15620 switch (0) case 0: case (sizeof (long) == $ac_size):;
15621 ; return 0; }
15622 EOF
15623 if { (eval echo configure:15624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15624   rm -rf conftest*
15625   ac_cv_sizeof_long=$ac_size
15626 else
15627   echo "configure: failed program was:" >&5
15628   cat conftest.$ac_ext >&5
15629 fi
15630 rm -f conftest* 
15631   if test x$ac_cv_sizeof_long != x ; then break; fi 
15632 done 
15633
15634 fi
15635  
15636 if test x$ac_cv_sizeof_long = x ; then 
15637   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15638 fi 
15639 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15640 cat >> confdefs.h <<EOF
15641 #define SIZEOF_LONG $ac_cv_sizeof_long
15642 EOF
15643  
15644
15645
15646 if test "$ac_cv_sizeof_int" -lt 4 ; then
15647         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15648
15649         cat >> confdefs.h <<\EOF
15650 #define LBER_INT_T long
15651 EOF
15652
15653 else
15654         cat >> confdefs.h <<\EOF
15655 #define LBER_INT_T int
15656 EOF
15657
15658 fi
15659
15660 cat >> confdefs.h <<\EOF
15661 #define LBER_LEN_T long
15662 EOF
15663
15664 cat >> confdefs.h <<\EOF
15665 #define LBER_SOCKET_T int
15666 EOF
15667
15668 cat >> confdefs.h <<\EOF
15669 #define LBER_TAG_T long
15670 EOF
15671
15672
15673 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15674 echo "configure:15675: checking for 8-bit clean memcmp" >&5
15675 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15676   echo $ac_n "(cached) $ac_c" 1>&6
15677 else
15678   if test "$cross_compiling" = yes; then
15679   ac_cv_func_memcmp_clean=no
15680 else
15681   cat > conftest.$ac_ext <<EOF
15682 #line 15683 "configure"
15683 #include "confdefs.h"
15684
15685 main()
15686 {
15687   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15688   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15689 }
15690
15691 EOF
15692 if { (eval echo configure:15693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15693 then
15694   ac_cv_func_memcmp_clean=yes
15695 else
15696   echo "configure: failed program was:" >&5
15697   cat conftest.$ac_ext >&5
15698   rm -fr conftest*
15699   ac_cv_func_memcmp_clean=no
15700 fi
15701 rm -fr conftest*
15702 fi
15703
15704 fi
15705
15706 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15707 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15708
15709 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15710 echo "configure:15711: checking for strftime" >&5
15711 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15712   echo $ac_n "(cached) $ac_c" 1>&6
15713 else
15714   cat > conftest.$ac_ext <<EOF
15715 #line 15716 "configure"
15716 #include "confdefs.h"
15717 /* System header to define __stub macros and hopefully few prototypes,
15718     which can conflict with char strftime(); below.  */
15719 #include <assert.h>
15720 /* Override any gcc2 internal prototype to avoid an error.  */
15721 /* We use char because int might match the return type of a gcc2
15722     builtin and then its argument prototype would still apply.  */
15723 char strftime();
15724 char (*f)();
15725
15726 int main() {
15727
15728 /* The GNU C library defines this for functions which it implements
15729     to always fail with ENOSYS.  Some functions are actually named
15730     something starting with __ and the normal name is an alias.  */
15731 #if defined (__stub_strftime) || defined (__stub___strftime)
15732 choke me
15733 #else
15734 f = strftime;
15735 #endif
15736
15737 ; return 0; }
15738 EOF
15739 if { (eval echo configure:15740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15740   rm -rf conftest*
15741   eval "ac_cv_func_strftime=yes"
15742 else
15743   echo "configure: failed program was:" >&5
15744   cat conftest.$ac_ext >&5
15745   rm -rf conftest*
15746   eval "ac_cv_func_strftime=no"
15747 fi
15748 rm -f conftest*
15749 fi
15750
15751 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15752   echo "$ac_t""yes" 1>&6
15753   cat >> confdefs.h <<\EOF
15754 #define HAVE_STRFTIME 1
15755 EOF
15756
15757 else
15758   echo "$ac_t""no" 1>&6
15759 # strftime is in -lintl on SCO UNIX.
15760 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15761 echo "configure:15762: checking for strftime in -lintl" >&5
15762 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15764   echo $ac_n "(cached) $ac_c" 1>&6
15765 else
15766   ac_save_LIBS="$LIBS"
15767 LIBS="-lintl  $LIBS"
15768 cat > conftest.$ac_ext <<EOF
15769 #line 15770 "configure"
15770 #include "confdefs.h"
15771 /* Override any gcc2 internal prototype to avoid an error.  */
15772 /* We use char because int might match the return type of a gcc2
15773     builtin and then its argument prototype would still apply.  */
15774 char strftime();
15775
15776 int main() {
15777 strftime()
15778 ; return 0; }
15779 EOF
15780 if { (eval echo configure:15781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15781   rm -rf conftest*
15782   eval "ac_cv_lib_$ac_lib_var=yes"
15783 else
15784   echo "configure: failed program was:" >&5
15785   cat conftest.$ac_ext >&5
15786   rm -rf conftest*
15787   eval "ac_cv_lib_$ac_lib_var=no"
15788 fi
15789 rm -f conftest*
15790 LIBS="$ac_save_LIBS"
15791
15792 fi
15793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15794   echo "$ac_t""yes" 1>&6
15795   cat >> confdefs.h <<\EOF
15796 #define HAVE_STRFTIME 1
15797 EOF
15798
15799 LIBS="-lintl $LIBS"
15800 else
15801   echo "$ac_t""no" 1>&6
15802 fi
15803
15804 fi
15805
15806
15807 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15808 echo "configure:15809: checking for inet_aton()" >&5
15809 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15810   echo $ac_n "(cached) $ac_c" 1>&6
15811 else
15812   cat > conftest.$ac_ext <<EOF
15813 #line 15814 "configure"
15814 #include "confdefs.h"
15815
15816 #ifdef HAVE_SYS_TYPES_H
15817 #       include <sys/types.h>
15818 #endif
15819 #ifdef HAVE_SYS_SOCKET_H
15820 #       include <sys/socket.h>
15821 #       ifdef HAVE_SYS_SELECT_H
15822 #               include <sys/select.h>
15823 #       endif
15824 #       include <netinet/in.h>
15825 #       ifdef HAVE_ARPA_INET_H
15826 #               include <arpa/inet.h>
15827 #       endif
15828 #endif
15829
15830 int main() {
15831 struct in_addr in;
15832 int rc = inet_aton( "255.255.255.255", &in );
15833 ; return 0; }
15834 EOF
15835 if { (eval echo configure:15836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15836   rm -rf conftest*
15837   ol_cv_func_inet_aton=yes
15838 else
15839   echo "configure: failed program was:" >&5
15840   cat conftest.$ac_ext >&5
15841   rm -rf conftest*
15842   ol_cv_func_inet_aton=no
15843 fi
15844 rm -f conftest*
15845 fi
15846
15847 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15848   if test $ol_cv_func_inet_aton != no; then
15849     cat >> confdefs.h <<\EOF
15850 #define HAVE_INET_ATON 1
15851 EOF
15852
15853   fi
15854  
15855
15856 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15857 echo "configure:15858: checking for _spawnlp" >&5
15858 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15859   echo $ac_n "(cached) $ac_c" 1>&6
15860 else
15861   cat > conftest.$ac_ext <<EOF
15862 #line 15863 "configure"
15863 #include "confdefs.h"
15864 /* System header to define __stub macros and hopefully few prototypes,
15865     which can conflict with char _spawnlp(); below.  */
15866 #include <assert.h>
15867 /* Override any gcc2 internal prototype to avoid an error.  */
15868 /* We use char because int might match the return type of a gcc2
15869     builtin and then its argument prototype would still apply.  */
15870 char _spawnlp();
15871 char (*f)();
15872
15873 int main() {
15874
15875 /* The GNU C library defines this for functions which it implements
15876     to always fail with ENOSYS.  Some functions are actually named
15877     something starting with __ and the normal name is an alias.  */
15878 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15879 choke me
15880 #else
15881 f = _spawnlp;
15882 #endif
15883
15884 ; return 0; }
15885 EOF
15886 if { (eval echo configure:15887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15887   rm -rf conftest*
15888   eval "ac_cv_func__spawnlp=yes"
15889 else
15890   echo "configure: failed program was:" >&5
15891   cat conftest.$ac_ext >&5
15892   rm -rf conftest*
15893   eval "ac_cv_func__spawnlp=no"
15894 fi
15895 rm -f conftest*
15896 fi
15897
15898 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15899   echo "$ac_t""yes" 1>&6
15900   cat >> confdefs.h <<\EOF
15901 #define HAVE_SPAWNLP 1
15902 EOF
15903
15904 else
15905   echo "$ac_t""no" 1>&6
15906 fi
15907
15908
15909 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15910 echo "configure:15911: checking for _snprintf" >&5
15911 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15912   echo $ac_n "(cached) $ac_c" 1>&6
15913 else
15914   cat > conftest.$ac_ext <<EOF
15915 #line 15916 "configure"
15916 #include "confdefs.h"
15917 /* System header to define __stub macros and hopefully few prototypes,
15918     which can conflict with char _snprintf(); below.  */
15919 #include <assert.h>
15920 /* Override any gcc2 internal prototype to avoid an error.  */
15921 /* We use char because int might match the return type of a gcc2
15922     builtin and then its argument prototype would still apply.  */
15923 char _snprintf();
15924 char (*f)();
15925
15926 int main() {
15927
15928 /* The GNU C library defines this for functions which it implements
15929     to always fail with ENOSYS.  Some functions are actually named
15930     something starting with __ and the normal name is an alias.  */
15931 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15932 choke me
15933 #else
15934 f = _snprintf;
15935 #endif
15936
15937 ; return 0; }
15938 EOF
15939 if { (eval echo configure:15940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15940   rm -rf conftest*
15941   eval "ac_cv_func__snprintf=yes"
15942 else
15943   echo "configure: failed program was:" >&5
15944   cat conftest.$ac_ext >&5
15945   rm -rf conftest*
15946   eval "ac_cv_func__snprintf=no"
15947 fi
15948 rm -f conftest*
15949 fi
15950
15951 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15952   echo "$ac_t""yes" 1>&6
15953   ac_cv_func_snprintf=yes
15954         cat >> confdefs.h <<\EOF
15955 #define snprintf _snprintf
15956 EOF
15957
15958
15959 else
15960   echo "$ac_t""no" 1>&6
15961 fi
15962
15963
15964 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15965 echo "configure:15966: checking for _vsnprintf" >&5
15966 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15967   echo $ac_n "(cached) $ac_c" 1>&6
15968 else
15969   cat > conftest.$ac_ext <<EOF
15970 #line 15971 "configure"
15971 #include "confdefs.h"
15972 /* System header to define __stub macros and hopefully few prototypes,
15973     which can conflict with char _vsnprintf(); below.  */
15974 #include <assert.h>
15975 /* Override any gcc2 internal prototype to avoid an error.  */
15976 /* We use char because int might match the return type of a gcc2
15977     builtin and then its argument prototype would still apply.  */
15978 char _vsnprintf();
15979 char (*f)();
15980
15981 int main() {
15982
15983 /* The GNU C library defines this for functions which it implements
15984     to always fail with ENOSYS.  Some functions are actually named
15985     something starting with __ and the normal name is an alias.  */
15986 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15987 choke me
15988 #else
15989 f = _vsnprintf;
15990 #endif
15991
15992 ; return 0; }
15993 EOF
15994 if { (eval echo configure:15995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15995   rm -rf conftest*
15996   eval "ac_cv_func__vsnprintf=yes"
15997 else
15998   echo "configure: failed program was:" >&5
15999   cat conftest.$ac_ext >&5
16000   rm -rf conftest*
16001   eval "ac_cv_func__vsnprintf=no"
16002 fi
16003 rm -f conftest*
16004 fi
16005
16006 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
16007   echo "$ac_t""yes" 1>&6
16008   ac_cv_func_vsnprintf=yes
16009         cat >> confdefs.h <<\EOF
16010 #define vsnprintf _vsnprintf
16011 EOF
16012
16013
16014 else
16015   echo "$ac_t""no" 1>&6
16016 fi
16017
16018
16019 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16020 echo "configure:16021: checking for vprintf" >&5
16021 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
16022   echo $ac_n "(cached) $ac_c" 1>&6
16023 else
16024   cat > conftest.$ac_ext <<EOF
16025 #line 16026 "configure"
16026 #include "confdefs.h"
16027 /* System header to define __stub macros and hopefully few prototypes,
16028     which can conflict with char vprintf(); below.  */
16029 #include <assert.h>
16030 /* Override any gcc2 internal prototype to avoid an error.  */
16031 /* We use char because int might match the return type of a gcc2
16032     builtin and then its argument prototype would still apply.  */
16033 char vprintf();
16034 char (*f)();
16035
16036 int main() {
16037
16038 /* The GNU C library defines this for functions which it implements
16039     to always fail with ENOSYS.  Some functions are actually named
16040     something starting with __ and the normal name is an alias.  */
16041 #if defined (__stub_vprintf) || defined (__stub___vprintf)
16042 choke me
16043 #else
16044 f = vprintf;
16045 #endif
16046
16047 ; return 0; }
16048 EOF
16049 if { (eval echo configure:16050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16050   rm -rf conftest*
16051   eval "ac_cv_func_vprintf=yes"
16052 else
16053   echo "configure: failed program was:" >&5
16054   cat conftest.$ac_ext >&5
16055   rm -rf conftest*
16056   eval "ac_cv_func_vprintf=no"
16057 fi
16058 rm -f conftest*
16059 fi
16060
16061 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
16062   echo "$ac_t""yes" 1>&6
16063   cat >> confdefs.h <<\EOF
16064 #define HAVE_VPRINTF 1
16065 EOF
16066
16067 else
16068   echo "$ac_t""no" 1>&6
16069 fi
16070
16071 if test "$ac_cv_func_vprintf" != yes; then
16072 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
16073 echo "configure:16074: checking for _doprnt" >&5
16074 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
16075   echo $ac_n "(cached) $ac_c" 1>&6
16076 else
16077   cat > conftest.$ac_ext <<EOF
16078 #line 16079 "configure"
16079 #include "confdefs.h"
16080 /* System header to define __stub macros and hopefully few prototypes,
16081     which can conflict with char _doprnt(); below.  */
16082 #include <assert.h>
16083 /* Override any gcc2 internal prototype to avoid an error.  */
16084 /* We use char because int might match the return type of a gcc2
16085     builtin and then its argument prototype would still apply.  */
16086 char _doprnt();
16087 char (*f)();
16088
16089 int main() {
16090
16091 /* The GNU C library defines this for functions which it implements
16092     to always fail with ENOSYS.  Some functions are actually named
16093     something starting with __ and the normal name is an alias.  */
16094 #if defined (__stub__doprnt) || defined (__stub____doprnt)
16095 choke me
16096 #else
16097 f = _doprnt;
16098 #endif
16099
16100 ; return 0; }
16101 EOF
16102 if { (eval echo configure:16103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16103   rm -rf conftest*
16104   eval "ac_cv_func__doprnt=yes"
16105 else
16106   echo "configure: failed program was:" >&5
16107   cat conftest.$ac_ext >&5
16108   rm -rf conftest*
16109   eval "ac_cv_func__doprnt=no"
16110 fi
16111 rm -f conftest*
16112 fi
16113
16114 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
16115   echo "$ac_t""yes" 1>&6
16116   cat >> confdefs.h <<\EOF
16117 #define HAVE_DOPRNT 1
16118 EOF
16119
16120 else
16121   echo "$ac_t""no" 1>&6
16122 fi
16123
16124 fi
16125
16126
16127 if test $ac_cv_func_vprintf = yes ; then
16128                 for ac_func in vsnprintf vsprintf
16129 do
16130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16131 echo "configure:16132: checking for $ac_func" >&5
16132 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16133   echo $ac_n "(cached) $ac_c" 1>&6
16134 else
16135   cat > conftest.$ac_ext <<EOF
16136 #line 16137 "configure"
16137 #include "confdefs.h"
16138 /* System header to define __stub macros and hopefully few prototypes,
16139     which can conflict with char $ac_func(); below.  */
16140 #include <assert.h>
16141 /* Override any gcc2 internal prototype to avoid an error.  */
16142 /* We use char because int might match the return type of a gcc2
16143     builtin and then its argument prototype would still apply.  */
16144 char $ac_func();
16145 char (*f)();
16146
16147 int main() {
16148
16149 /* The GNU C library defines this for functions which it implements
16150     to always fail with ENOSYS.  Some functions are actually named
16151     something starting with __ and the normal name is an alias.  */
16152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16153 choke me
16154 #else
16155 f = $ac_func;
16156 #endif
16157
16158 ; return 0; }
16159 EOF
16160 if { (eval echo configure:16161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16161   rm -rf conftest*
16162   eval "ac_cv_func_$ac_func=yes"
16163 else
16164   echo "configure: failed program was:" >&5
16165   cat conftest.$ac_ext >&5
16166   rm -rf conftest*
16167   eval "ac_cv_func_$ac_func=no"
16168 fi
16169 rm -f conftest*
16170 fi
16171
16172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16173   echo "$ac_t""yes" 1>&6
16174     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16175   cat >> confdefs.h <<EOF
16176 #define $ac_tr_func 1
16177 EOF
16178  
16179 else
16180   echo "$ac_t""no" 1>&6
16181 fi
16182 done
16183
16184 fi
16185
16186 for ac_func in \
16187         bcopy                   \
16188         closesocket             \
16189         chroot                  \
16190         endgrent                \
16191         endpwent                \
16192         fcntl                   \
16193         flock                   \
16194         getdtablesize   \
16195         getgrgid                \
16196         gethostname             \
16197         getpass                 \
16198         getpassphrase   \
16199         getpwuid                \
16200         getpwnam                \
16201         getspnam                \
16202         gettimeofday    \
16203         initgroups              \
16204         lockf                   \
16205         memcpy                  \
16206         memmove                 \
16207         mkstemp                 \
16208         pipe                    \
16209         read                    \
16210         recv                    \
16211         recvfrom                \
16212         setpwfile               \
16213         setgid                  \
16214         setegid                 \
16215         setsid                  \
16216         setuid                  \
16217         seteuid                 \
16218         sigaction               \
16219         signal                  \
16220         sigset                  \
16221         snprintf                \
16222         strdup                  \
16223         strerror                \
16224         strpbrk                 \
16225         strrchr                 \
16226         strsep                  \
16227         strstr                  \
16228         strtol                  \
16229         strtoul                 \
16230         strspn                  \
16231         sysconf                 \
16232         waitpid                 \
16233         wait4                   \
16234         write                   \
16235         send                    \
16236         sendto                  \
16237
16238 do
16239 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16240 echo "configure:16241: checking for $ac_func" >&5
16241 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16242   echo $ac_n "(cached) $ac_c" 1>&6
16243 else
16244   cat > conftest.$ac_ext <<EOF
16245 #line 16246 "configure"
16246 #include "confdefs.h"
16247 /* System header to define __stub macros and hopefully few prototypes,
16248     which can conflict with char $ac_func(); below.  */
16249 #include <assert.h>
16250 /* Override any gcc2 internal prototype to avoid an error.  */
16251 /* We use char because int might match the return type of a gcc2
16252     builtin and then its argument prototype would still apply.  */
16253 char $ac_func();
16254 char (*f)();
16255
16256 int main() {
16257
16258 /* The GNU C library defines this for functions which it implements
16259     to always fail with ENOSYS.  Some functions are actually named
16260     something starting with __ and the normal name is an alias.  */
16261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16262 choke me
16263 #else
16264 f = $ac_func;
16265 #endif
16266
16267 ; return 0; }
16268 EOF
16269 if { (eval echo configure:16270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16270   rm -rf conftest*
16271   eval "ac_cv_func_$ac_func=yes"
16272 else
16273   echo "configure: failed program was:" >&5
16274   cat conftest.$ac_ext >&5
16275   rm -rf conftest*
16276   eval "ac_cv_func_$ac_func=no"
16277 fi
16278 rm -f conftest*
16279 fi
16280
16281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16282   echo "$ac_t""yes" 1>&6
16283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16284   cat >> confdefs.h <<EOF
16285 #define $ac_tr_func 1
16286 EOF
16287  
16288 else
16289   echo "$ac_t""no" 1>&6
16290 fi
16291 done
16292
16293
16294 for ac_func in getopt tempnam
16295 do
16296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16297 echo "configure:16298: checking for $ac_func" >&5
16298 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16299   echo $ac_n "(cached) $ac_c" 1>&6
16300 else
16301   cat > conftest.$ac_ext <<EOF
16302 #line 16303 "configure"
16303 #include "confdefs.h"
16304 /* System header to define __stub macros and hopefully few prototypes,
16305     which can conflict with char $ac_func(); below.  */
16306 #include <assert.h>
16307 /* Override any gcc2 internal prototype to avoid an error.  */
16308 /* We use char because int might match the return type of a gcc2
16309     builtin and then its argument prototype would still apply.  */
16310 char $ac_func();
16311 char (*f)();
16312
16313 int main() {
16314
16315 /* The GNU C library defines this for functions which it implements
16316     to always fail with ENOSYS.  Some functions are actually named
16317     something starting with __ and the normal name is an alias.  */
16318 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16319 choke me
16320 #else
16321 f = $ac_func;
16322 #endif
16323
16324 ; return 0; }
16325 EOF
16326 if { (eval echo configure:16327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16327   rm -rf conftest*
16328   eval "ac_cv_func_$ac_func=yes"
16329 else
16330   echo "configure: failed program was:" >&5
16331   cat conftest.$ac_ext >&5
16332   rm -rf conftest*
16333   eval "ac_cv_func_$ac_func=no"
16334 fi
16335 rm -f conftest*
16336 fi
16337
16338 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16339   echo "$ac_t""yes" 1>&6
16340     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16341   cat >> confdefs.h <<EOF
16342 #define $ac_tr_func 1
16343 EOF
16344  
16345 else
16346   echo "$ac_t""no" 1>&6
16347 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16348 fi
16349 done
16350
16351
16352
16353 if test "$ac_cv_func_getopt" != yes; then
16354     LIBSRCS="$LIBSRCS getopt.c"
16355 fi
16356
16357 if test "$ac_cv_func_tempnam" != yes; then
16358     LIBSRCS="$LIBSRCS tempnam.c"
16359 fi
16360
16361 # Check Configuration
16362 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
16363 echo "configure:16364: checking declaration of sys_errlist" >&5
16364 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
16365   echo $ac_n "(cached) $ac_c" 1>&6
16366 else
16367   
16368         cat > conftest.$ac_ext <<EOF
16369 #line 16370 "configure"
16370 #include "confdefs.h"
16371
16372 #include <stdio.h>
16373 #include <sys/types.h>
16374 #include <errno.h>
16375 #ifdef WINNT
16376 #include <stdlib.h>
16377 #endif 
16378 int main() {
16379 char *c = (char *) *sys_errlist
16380 ; return 0; }
16381 EOF
16382 if { (eval echo configure:16383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16383   rm -rf conftest*
16384   ol_cv_dcl_sys_errlist=yes
16385         ol_cv_have_sys_errlist=yes
16386 else
16387   echo "configure: failed program was:" >&5
16388   cat conftest.$ac_ext >&5
16389   rm -rf conftest*
16390   ol_cv_dcl_sys_errlist=no
16391 fi
16392 rm -f conftest*
16393 fi
16394
16395 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
16396 #
16397 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16398 if test $ol_cv_dcl_sys_errlist = no ; then
16399         cat >> confdefs.h <<\EOF
16400 #define DECL_SYS_ERRLIST 1
16401 EOF
16402
16403
16404         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
16405 echo "configure:16406: checking existence of sys_errlist" >&5
16406 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
16407   echo $ac_n "(cached) $ac_c" 1>&6
16408 else
16409   
16410                 cat > conftest.$ac_ext <<EOF
16411 #line 16412 "configure"
16412 #include "confdefs.h"
16413 #include <errno.h>
16414 int main() {
16415 char *c = (char *) *sys_errlist
16416 ; return 0; }
16417 EOF
16418 if { (eval echo configure:16419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16419   rm -rf conftest*
16420   ol_cv_have_sys_errlist=yes
16421 else
16422   echo "configure: failed program was:" >&5
16423   cat conftest.$ac_ext >&5
16424   rm -rf conftest*
16425   ol_cv_have_sys_errlist=no
16426 fi
16427 rm -f conftest*
16428 fi
16429
16430 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
16431 fi
16432 if test $ol_cv_have_sys_errlist = yes ; then
16433         cat >> confdefs.h <<\EOF
16434 #define HAVE_SYS_ERRLIST 1
16435 EOF
16436
16437 fi
16438
16439
16440
16441 if test "$ol_enable_debug" != no ; then
16442         cat >> confdefs.h <<\EOF
16443 #define LDAP_DEBUG 1
16444 EOF
16445
16446 fi
16447 if test "$ol_enable_syslog" = yes ; then
16448         cat >> confdefs.h <<\EOF
16449 #define LDAP_SYSLOG 1
16450 EOF
16451
16452 fi
16453 if test "$ol_enable_cache" = no ; then
16454         cat >> confdefs.h <<\EOF
16455 #define LDAP_NOCACHE 1
16456 EOF
16457
16458 fi
16459 if test "$ol_link_kbind" != no ; then
16460         cat >> confdefs.h <<\EOF
16461 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
16462 EOF
16463
16464 fi
16465 if test "$ol_enable_proctitle" != no ; then
16466         cat >> confdefs.h <<\EOF
16467 #define LDAP_PROCTITLE 1
16468 EOF
16469
16470 fi
16471 if test "$ol_enable_referrals" != no ; then
16472         cat >> confdefs.h <<\EOF
16473 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
16474 EOF
16475
16476 fi
16477 if test "$ol_enable_local" != no; then
16478         cat >> confdefs.h <<\EOF
16479 #define LDAP_PF_LOCAL 1
16480 EOF
16481
16482 fi
16483 if test "$ol_link_ipv6" != no; then
16484         cat >> confdefs.h <<\EOF
16485 #define LDAP_PF_INET6 1
16486 EOF
16487
16488 fi
16489 if test "$ol_enable_cleartext" != no ; then
16490         cat >> confdefs.h <<\EOF
16491 #define SLAPD_CLEARTEXT 1
16492 EOF
16493
16494 fi
16495 if test "$ol_enable_crypt" != no ; then
16496         cat >> confdefs.h <<\EOF
16497 #define SLAPD_CRYPT 1
16498 EOF
16499
16500 fi
16501 if test "$ol_link_kpasswd" != no ; then
16502         cat >> confdefs.h <<\EOF
16503 #define SLAPD_KPASSWD 1
16504 EOF
16505
16506 fi
16507 if test "$ol_link_spasswd" != no ; then
16508         cat >> confdefs.h <<\EOF
16509 #define SLAPD_SPASSWD 1
16510 EOF
16511
16512 fi
16513 if test "$ol_enable_phonetic" != no ; then
16514         cat >> confdefs.h <<\EOF
16515 #define SLAPD_PHONETIC 1
16516 EOF
16517
16518 fi
16519 if test "$ol_enable_rlookups" != no ; then
16520         cat >> confdefs.h <<\EOF
16521 #define SLAPD_RLOOKUPS 1
16522 EOF
16523
16524 fi
16525 if test "$ol_enable_aci" != no ; then
16526         cat >> confdefs.h <<\EOF
16527 #define SLAPD_ACI_ENABLED 1
16528 EOF
16529
16530 fi
16531
16532 if test "$ol_link_modules" != no ; then
16533         cat >> confdefs.h <<\EOF
16534 #define SLAPD_MODULES 1
16535 EOF
16536
16537         BUILD_SLAPD=yes
16538         SLAPD_MODULES_LDFLAGS="-dlopen self"
16539 fi
16540
16541 if test "$ol_enable_bdb" != no ; then
16542         cat >> confdefs.h <<\EOF
16543 #define SLAPD_BDB 1
16544 EOF
16545
16546         BUILD_SLAPD=yes
16547         BUILD_BDB=yes
16548         if test "$ol_with_bdb_module" != static ; then
16549                 cat >> confdefs.h <<\EOF
16550 #define SLAPD_BDB_DYNAMIC 1
16551 EOF
16552
16553                 BUILD_BDB=mod
16554                 BUILD_BDB_DYNAMIC=shared
16555                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16556         fi
16557 fi
16558
16559 if test "$ol_link_dnssrv" != no ; then
16560         cat >> confdefs.h <<\EOF
16561 #define SLAPD_DNSSRV 1
16562 EOF
16563
16564         BUILD_SLAPD=yes
16565         BUILD_DNSSRV=yes
16566         if test "$ol_with_dnssrv_module" != static ; then
16567                 cat >> confdefs.h <<\EOF
16568 #define SLAPD_DNSSRV_DYNAMIC 1
16569 EOF
16570
16571                 BUILD_DNSSRV=mod
16572                 BUILD_DNSSRV_DYNAMIC=shared
16573                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16574         fi
16575 fi
16576
16577 if test "$ol_enable_ldap" != no ; then
16578         cat >> confdefs.h <<\EOF
16579 #define SLAPD_LDAP 1
16580 EOF
16581
16582         BUILD_SLAPD=yes
16583         BUILD_LDAP=yes
16584         if test "$ol_with_ldap_module" != static ; then
16585                 cat >> confdefs.h <<\EOF
16586 #define SLAPD_LDAP_DYNAMIC 1
16587 EOF
16588
16589                 BUILD_LDAP=mod
16590                 BUILD_LDAP_DYNAMIC=shared
16591                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16592         fi
16593 fi
16594
16595 if test "$ol_link_ldbm" != no ; then
16596         cat >> confdefs.h <<\EOF
16597 #define SLAPD_LDBM 1
16598 EOF
16599
16600         BUILD_SLAPD=yes
16601         BUILD_LDBM=yes
16602         if test "$ol_with_ldbm_module" != static ; then
16603                 cat >> confdefs.h <<\EOF
16604 #define SLAPD_LDBM_DYNAMIC 1
16605 EOF
16606
16607                 BUILD_LDBM=mod
16608                 BUILD_LDBM_DYNAMIC=shared
16609                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16610         fi
16611 fi
16612
16613 if test "$ol_enable_meta" != no ; then
16614         if test "$ol_enable_ldap" = no ; then
16615                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
16616         fi
16617         if test "$ol_enable_rewrite" = no ; then
16618                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
16619         fi
16620         cat >> confdefs.h <<\EOF
16621 #define SLAPD_META 1
16622 EOF
16623
16624         BUILD_SLAPD=yes
16625         BUILD_META=yes
16626         if test "$ol_with_meta_module" != static ; then
16627                 cat >> confdefs.h <<\EOF
16628 #define SLAPD_META_DYNAMIC 1
16629 EOF
16630
16631                 BUILD_META=mod
16632                 BUILD_META_DYNAMIC=shared
16633                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
16634         fi
16635 fi
16636
16637 if test "$ol_enable_passwd" != no ; then
16638         cat >> confdefs.h <<\EOF
16639 #define SLAPD_PASSWD 1
16640 EOF
16641
16642         BUILD_SLAPD=yes
16643         BUILD_PASSWD=yes
16644         if test "$ol_with_passwd_module" != static ; then
16645                 cat >> confdefs.h <<\EOF
16646 #define SLAPD_PASSWD_DYNAMIC 1
16647 EOF
16648
16649                 BUILD_PASSWD=mod
16650                 BUILD_PASSWD_DYNAMIC=shared
16651                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16652         fi
16653 fi
16654
16655 if test "$ol_link_perl" != no ; then
16656         cat >> confdefs.h <<\EOF
16657 #define SLAPD_PERL 1
16658 EOF
16659
16660         BUILD_SLAPD=yes
16661         BUILD_PERL=yes
16662         if test "$ol_with_perl_module" != static ; then
16663                 cat >> confdefs.h <<\EOF
16664 #define SLAPD_PERL_DYNAMIC 1
16665 EOF
16666
16667                 BUILD_PERL=mod
16668                 BUILD_PERL_DYNAMIC=shared
16669                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16670         fi
16671 fi
16672
16673 if test "$ol_enable_shell" != no ; then
16674         cat >> confdefs.h <<\EOF
16675 #define SLAPD_SHELL 1
16676 EOF
16677
16678         BUILD_SLAPD=yes
16679         BUILD_SHELL=yes
16680         if test "$ol_with_shell_module" != static ; then
16681                 cat >> confdefs.h <<\EOF
16682 #define SLAPD_SHELL_DYNAMIC 1
16683 EOF
16684
16685                 BUILD_SHELL=mod
16686                 BUILD_SHELL_DYNAMIC=shared
16687                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16688         fi
16689 fi
16690
16691 if test "$ol_enable_tcl" != no ; then
16692         cat >> confdefs.h <<\EOF
16693 #define SLAPD_TCL 1
16694 EOF
16695
16696         BUILD_SLAPD=yes
16697         BUILD_TCL=yes
16698         if test "$ol_with_tcl_module" != static; then
16699                 cat >> confdefs.h <<\EOF
16700 #define SLAPD_TCL_DYNAMIC 1
16701 EOF
16702
16703                 BUILD_TCL=mod
16704                 BUILD_TCL_DYNAMIC=shared
16705                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16706         fi
16707 fi
16708
16709 if test "$ol_link_sql" != no ; then
16710         cat >> confdefs.h <<\EOF
16711 #define SLAPD_SQL 1
16712 EOF
16713
16714         BUILD_SLAPD=yes
16715         BUILD_SQL=yes
16716         if test "$ol_with_sql_module" != static; then
16717                 cat >> confdefs.h <<\EOF
16718 #define SLAPD_SQL_DYNAMIC 1
16719 EOF
16720
16721                 BUILD_SQL=mod
16722                 BUILD_SQL_DYNAMIC=shared
16723                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16724         fi
16725 fi
16726
16727 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16728         $BUILD_SLAPD = yes ; then
16729         BUILD_SLURPD=yes
16730 fi
16731
16732 if test "$ol_enable_rewrite" != no ; then
16733         cat >> confdefs.h <<\EOF
16734 #define ENABLE_REWRITE 1
16735 EOF
16736
16737         BUILD_REWRITE=yes
16738         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
16739 fi
16740
16741
16742 if test "$LINK_BINS_DYNAMIC" = yes; then
16743     LIB_LINKAGE=DYN
16744     LT_LIB_LINKAGE=shared
16745 else
16746     LIB_LINKAGE=STAT
16747     LT_LIB_LINKAGE=static
16748 fi
16749
16750 if test "$ac_cv_mingw32" = yes ; then
16751     PLAT=NT
16752     DYN_EXT=dll
16753 else
16754     PLAT=UNIX
16755     DYN_EXT=so
16756 fi
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
16817
16818
16819
16820
16821
16822
16823 trap '' 1 2 15
16824
16825 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16826
16827 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16828 # Let make expand exec_prefix.
16829 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16830
16831 # Any assignment to VPATH causes Sun make to only execute
16832 # the first set of double-colon rules, so remove it if not needed.
16833 # If there is a colon in the path, we need to keep it.
16834 if test "x$srcdir" = x.; then
16835   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16836 fi
16837
16838 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16839
16840 DEFS=-DHAVE_CONFIG_H
16841
16842 # Without the "./", some shells look in PATH for config.status.
16843 : ${CONFIG_STATUS=./config.status}
16844
16845 echo creating $CONFIG_STATUS
16846 rm -f $CONFIG_STATUS
16847 cat > $CONFIG_STATUS <<EOF
16848 #! /bin/sh
16849 # Generated automatically by configure.
16850 # Run this file to recreate the current configuration.
16851 # This directory was configured as follows,
16852 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16853 #
16854 # $0 $ac_configure_args
16855 #
16856 # Compiler output produced by configure, useful for debugging
16857 # configure, is in ./config.log if it exists.
16858
16859 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16860 for ac_option
16861 do
16862   case "\$ac_option" in
16863   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16864     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16865     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16866   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16867     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16868     exit 0 ;;
16869   -help | --help | --hel | --he | --h)
16870     echo "\$ac_cs_usage"; exit 0 ;;
16871   *) echo "\$ac_cs_usage"; exit 1 ;;
16872   esac
16873 done
16874
16875 ac_given_srcdir=$srcdir
16876 ac_given_INSTALL="$INSTALL"
16877
16878 trap 'rm -fr `echo "\
16879 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16880 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16881 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16882 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16883 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16884 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16885 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16886 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16887 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16888 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16889 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16890 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16891 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16892 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16893 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16894 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16895 include/Makefile:build/top.mk:include/Makefile.in \
16896 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16897 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16898 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16899 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16900 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16901 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16902 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16903 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16904 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16905 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
16906 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16907 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16908 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16909 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16910 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16911 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16912 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
16913 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16914 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16915 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16916 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16917 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16918 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16919 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16920 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16921 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16922 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16923 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16924 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16925 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16926  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16927 EOF
16928 cat >> $CONFIG_STATUS <<EOF
16929
16930 # Protect against being on the right side of a sed subst in config.status.
16931 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16932  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16933 $ac_vpsub
16934 $extrasub
16935 s%@SHELL@%$SHELL%g
16936 s%@CFLAGS@%$CFLAGS%g
16937 s%@CPPFLAGS@%$CPPFLAGS%g
16938 s%@CXXFLAGS@%$CXXFLAGS%g
16939 s%@FFLAGS@%$FFLAGS%g
16940 s%@DEFS@%$DEFS%g
16941 s%@LDFLAGS@%$LDFLAGS%g
16942 s%@LIBS@%$LIBS%g
16943 s%@exec_prefix@%$exec_prefix%g
16944 s%@prefix@%$prefix%g
16945 s%@program_transform_name@%$program_transform_name%g
16946 s%@bindir@%$bindir%g
16947 s%@sbindir@%$sbindir%g
16948 s%@libexecdir@%$libexecdir%g
16949 s%@datadir@%$datadir%g
16950 s%@sysconfdir@%$sysconfdir%g
16951 s%@sharedstatedir@%$sharedstatedir%g
16952 s%@localstatedir@%$localstatedir%g
16953 s%@libdir@%$libdir%g
16954 s%@includedir@%$includedir%g
16955 s%@oldincludedir@%$oldincludedir%g
16956 s%@infodir@%$infodir%g
16957 s%@mandir@%$mandir%g
16958 s%@host@%$host%g
16959 s%@host_alias@%$host_alias%g
16960 s%@host_cpu@%$host_cpu%g
16961 s%@host_vendor@%$host_vendor%g
16962 s%@host_os@%$host_os%g
16963 s%@target@%$target%g
16964 s%@target_alias@%$target_alias%g
16965 s%@target_cpu@%$target_cpu%g
16966 s%@target_vendor@%$target_vendor%g
16967 s%@target_os@%$target_os%g
16968 s%@build@%$build%g
16969 s%@build_alias@%$build_alias%g
16970 s%@build_cpu@%$build_cpu%g
16971 s%@build_vendor@%$build_vendor%g
16972 s%@build_os@%$build_os%g
16973 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16974 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16975 s%@INSTALL_DATA@%$INSTALL_DATA%g
16976 s%@PACKAGE@%$PACKAGE%g
16977 s%@VERSION@%$VERSION%g
16978 s%@ACLOCAL@%$ACLOCAL%g
16979 s%@AUTOCONF@%$AUTOCONF%g
16980 s%@AUTOMAKE@%$AUTOMAKE%g
16981 s%@AUTOHEADER@%$AUTOHEADER%g
16982 s%@MAKEINFO@%$MAKEINFO%g
16983 s%@install_sh@%$install_sh%g
16984 s%@AMTAR@%$AMTAR%g
16985 s%@AWK@%$AWK%g
16986 s%@AMTARFLAGS@%$AMTARFLAGS%g
16987 s%@SET_MAKE@%$SET_MAKE%g
16988 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16989 s%@top_builddir@%$top_builddir%g
16990 s%@ldap_subdir@%$ldap_subdir%g
16991 s%@CC@%$CC%g
16992 s%@RANLIB@%$RANLIB%g
16993 s%@LN_S@%$LN_S%g
16994 s%@DLLTOOL@%$DLLTOOL%g
16995 s%@AS@%$AS%g
16996 s%@OBJDUMP@%$OBJDUMP%g
16997 s%@LIBTOOL@%$LIBTOOL%g
16998 s%@LN_H@%$LN_H%g
16999 s%@SENDMAIL@%$SENDMAIL%g
17000 s%@EDITOR@%$EDITOR%g
17001 s%@FINGER@%$FINGER%g
17002 s%@PERLBIN@%$PERLBIN%g
17003 s%@CPP@%$CPP%g
17004 s%@EXEEXT@%$EXEEXT%g
17005 s%@OBJEXT@%$OBJEXT%g
17006 s%@OL_MKDEP@%$OL_MKDEP%g
17007 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
17008 s%@LIBOBJS@%$LIBOBJS%g
17009 s%@LIBSRCS@%$LIBSRCS%g
17010 s%@PLAT@%$PLAT%g
17011 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
17012 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
17013 s%@DYN_EXT@%$DYN_EXT%g
17014 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
17015 s%@BUILD_BDB@%$BUILD_BDB%g
17016 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
17017 s%@BUILD_LDAP@%$BUILD_LDAP%g
17018 s%@BUILD_LDBM@%$BUILD_LDBM%g
17019 s%@BUILD_META@%$BUILD_META%g
17020 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
17021 s%@BUILD_PERL@%$BUILD_PERL%g
17022 s%@BUILD_SHELL@%$BUILD_SHELL%g
17023 s%@BUILD_SQL@%$BUILD_SQL%g
17024 s%@BUILD_TCL@%$BUILD_TCL%g
17025 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
17026 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
17027 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
17028 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
17029 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
17030 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
17031 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
17032 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
17033 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
17034 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
17035 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
17036 s%@LDAP_LIBS@%$LDAP_LIBS%g
17037 s%@LDIF_LIBS@%$LDIF_LIBS%g
17038 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
17039 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
17040 s%@LDBM_LIBS@%$LDBM_LIBS%g
17041 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
17042 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
17043 s%@WRAP_LIBS@%$WRAP_LIBS%g
17044 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
17045 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
17046 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
17047 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
17048 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
17049 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
17050 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
17051 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
17052 s%@KRB4_LIBS@%$KRB4_LIBS%g
17053 s%@KRB5_LIBS@%$KRB5_LIBS%g
17054 s%@READLINE_LIBS@%$READLINE_LIBS%g
17055 s%@SASL_LIBS@%$SASL_LIBS%g
17056 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
17057 s%@TLS_LIBS@%$TLS_LIBS%g
17058 s%@MODULES_LIBS@%$MODULES_LIBS%g
17059 s%@AUTH_LIBS@%$AUTH_LIBS%g
17060 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
17061 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
17062 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
17063 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
17064
17065 CEOF
17066 EOF
17067
17068 cat >> $CONFIG_STATUS <<\EOF
17069
17070 # Split the substitutions into bite-sized pieces for seds with
17071 # small command number limits, like on Digital OSF/1 and HP-UX.
17072 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17073 ac_file=1 # Number of current file.
17074 ac_beg=1 # First line for current file.
17075 ac_end=$ac_max_sed_cmds # Line after last line for current file.
17076 ac_more_lines=:
17077 ac_sed_cmds=""
17078 while $ac_more_lines; do
17079   if test $ac_beg -gt 1; then
17080     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
17081   else
17082     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
17083   fi
17084   if test ! -s conftest.s$ac_file; then
17085     ac_more_lines=false
17086     rm -f conftest.s$ac_file
17087   else
17088     if test -z "$ac_sed_cmds"; then
17089       ac_sed_cmds="sed -f conftest.s$ac_file"
17090     else
17091       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
17092     fi
17093     ac_file=`expr $ac_file + 1`
17094     ac_beg=$ac_end
17095     ac_end=`expr $ac_end + $ac_max_sed_cmds`
17096   fi
17097 done
17098 if test -z "$ac_sed_cmds"; then
17099   ac_sed_cmds=cat
17100 fi
17101 EOF
17102
17103 cat >> $CONFIG_STATUS <<EOF
17104
17105 CONFIG_FILES=\${CONFIG_FILES-"\
17106 Makefile:build/top.mk:Makefile.in:build/dir.mk \
17107 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
17108 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
17109 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
17110 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
17111 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
17112 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
17113 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
17114 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
17115 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
17116 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
17117 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
17118 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
17119 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
17120 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
17121 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
17122 include/Makefile:build/top.mk:include/Makefile.in \
17123 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
17124 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
17125 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17126 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
17127 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
17128 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
17129 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
17130 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
17131 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
17132 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk    \
17133 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
17134 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
17135 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
17136 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
17137 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
17138 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
17139 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
17140 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
17141 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
17142 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
17143 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
17144 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
17145 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
17146 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
17147 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
17148 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
17149 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
17150 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
17151 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
17152 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
17153 "}
17154 EOF
17155 cat >> $CONFIG_STATUS <<\EOF
17156 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
17157   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17158   case "$ac_file" in
17159   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17160        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17161   *) ac_file_in="${ac_file}.in" ;;
17162   esac
17163
17164   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
17165
17166   # Remove last slash and all that follows it.  Not all systems have dirname.
17167   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17168   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17169     # The file is in a subdirectory.
17170     test ! -d "$ac_dir" && mkdir "$ac_dir"
17171     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
17172     # A "../" for each directory in $ac_dir_suffix.
17173     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
17174   else
17175     ac_dir_suffix= ac_dots=
17176   fi
17177
17178   case "$ac_given_srcdir" in
17179   .)  srcdir=.
17180       if test -z "$ac_dots"; then top_srcdir=.
17181       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
17182   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
17183   *) # Relative path.
17184     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
17185     top_srcdir="$ac_dots$ac_given_srcdir" ;;
17186   esac
17187
17188   case "$ac_given_INSTALL" in
17189   [/$]*) INSTALL="$ac_given_INSTALL" ;;
17190   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
17191   esac
17192
17193   echo creating "$ac_file"
17194   rm -f "$ac_file"
17195   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
17196   case "$ac_file" in
17197   *[Mm]akefile*) ac_comsub="1i\\
17198 # $configure_input" ;;
17199   *) ac_comsub= ;;
17200   esac
17201
17202   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17203   sed -e "$ac_comsub
17204 s%@configure_input@%$configure_input%g
17205 s%@srcdir@%$srcdir%g
17206 s%@top_srcdir@%$top_srcdir%g
17207 s%@INSTALL@%$INSTALL%g
17208 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
17209 fi; done
17210 rm -f conftest.s*
17211
17212 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17213 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17214 #
17215 # ac_d sets the value in "#define NAME VALUE" lines.
17216 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17217 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
17218 ac_dC='\3'
17219 ac_dD='%g'
17220 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17221 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17222 ac_uB='\([      ]\)%\1#\2define\3'
17223 ac_uC=' '
17224 ac_uD='\4%g'
17225 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17226 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17227 ac_eB='$%\1#\2define\3'
17228 ac_eC=' '
17229 ac_eD='%g'
17230
17231 if test "${CONFIG_HEADERS+set}" != set; then
17232 EOF
17233 cat >> $CONFIG_STATUS <<EOF
17234   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
17235 EOF
17236 cat >> $CONFIG_STATUS <<\EOF
17237 fi
17238 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
17239   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17240   case "$ac_file" in
17241   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
17242        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17243   *) ac_file_in="${ac_file}.in" ;;
17244   esac
17245
17246   echo creating $ac_file
17247
17248   rm -f conftest.frag conftest.in conftest.out
17249   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
17250   cat $ac_file_inputs > conftest.in
17251
17252 EOF
17253
17254 # Transform confdefs.h into a sed script conftest.vals that substitutes
17255 # the proper values into config.h.in to produce config.h.  And first:
17256 # Protect against being on the right side of a sed subst in config.status.
17257 # Protect against being in an unquoted here document in config.status.
17258 rm -f conftest.vals
17259 cat > conftest.hdr <<\EOF
17260 s/[\\&%]/\\&/g
17261 s%[\\$`]%\\&%g
17262 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
17263 s%ac_d%ac_u%gp
17264 s%ac_u%ac_e%gp
17265 EOF
17266 sed -n -f conftest.hdr confdefs.h > conftest.vals
17267 rm -f conftest.hdr
17268
17269 # This sed command replaces #undef with comments.  This is necessary, for
17270 # example, in the case of _POSIX_SOURCE, which is predefined and required
17271 # on some systems where configure will not decide to define it.
17272 cat >> conftest.vals <<\EOF
17273 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
17274 EOF
17275
17276 # Break up conftest.vals because some shells have a limit on
17277 # the size of here documents, and old seds have small limits too.
17278
17279 rm -f conftest.tail
17280 while :
17281 do
17282   ac_lines=`grep -c . conftest.vals`
17283   # grep -c gives empty output for an empty file on some AIX systems.
17284   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
17285   # Write a limited-size here document to conftest.frag.
17286   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
17287   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
17288   echo 'CEOF
17289   sed -f conftest.frag conftest.in > conftest.out
17290   rm -f conftest.in
17291   mv conftest.out conftest.in
17292 ' >> $CONFIG_STATUS
17293   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17294   rm -f conftest.vals
17295   mv conftest.tail conftest.vals
17296 done
17297 rm -f conftest.vals
17298
17299 cat >> $CONFIG_STATUS <<\EOF
17300   rm -f conftest.frag conftest.h
17301   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
17302   cat conftest.in >> conftest.h
17303   rm -f conftest.in
17304   if cmp -s $ac_file conftest.h 2>/dev/null; then
17305     echo "$ac_file is unchanged"
17306     rm -f conftest.h
17307   else
17308     # Remove last slash and all that follows it.  Not all systems have dirname.
17309       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
17310       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17311       # The file is in a subdirectory.
17312       test ! -d "$ac_dir" && mkdir "$ac_dir"
17313     fi
17314     rm -f $ac_file
17315     mv conftest.h $ac_file
17316   fi
17317 fi; done
17318
17319 EOF
17320 cat >> $CONFIG_STATUS <<EOF
17321
17322 EOF
17323 cat >> $CONFIG_STATUS <<\EOF
17324
17325 date > stamp-h
17326 echo Please \"make depend\" to build dependencies
17327
17328 exit 0
17329 EOF
17330 chmod +x $CONFIG_STATUS
17331 rm -fr confdefs* $ac_clean_files
17332 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
17333