]> git.sur5r.net Git - openldap/blob - configure
Add bdb tests
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.337 2000/09/24 23:17:23 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Restrictions apply, see COPYRIGHT and LICENSE files."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug          enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog         enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle      enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache          enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals      enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind          enable V2 Kerberos IV bind (no)"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support (auto)"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support (auto)"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch            with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos         with support (auto)"
53 ac_help="$ac_help
54   --with-readline         with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads          with threads (auto)"
57 ac_help="$ac_help
58   --with-tls              with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select  with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster  enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-rlookups     enable reverse lookups (auto)"
81 ac_help="$ac_help
82     --enable-aci          enable per-object ACIs (no)"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support (no)"
85 ac_help="$ac_help
86     --enable-dynamic      enable linking built binaries with dynamic libs (no)"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend (no)"
89 ac_help="$ac_help
90     --with-bdb-module  module type (static)"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend (no)"
93 ac_help="$ac_help
94     --with-dnssrv-module  module type (static)"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend (no)"
97 ac_help="$ac_help
98     --with-ldap-module    module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend (yes)"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API (auto)"
103 ac_help="$ac_help
104     --with-ldbm-module    module type (static)"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd       enable passwd backend (no)"
109 ac_help="$ac_help
110     --with-passwd-module  module type (static)"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend (no)"
113 ac_help="$ac_help
114     --with-perl-module    module type (static)"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend (no)"
117 ac_help="$ac_help
118     --with-shell-module   module type (static)"
119 ac_help="$ac_help
120     --enable-sql          enable sql backend (no)"
121 ac_help="$ac_help
122     --with-sql-module     module type (static)"
123 ac_help="$ac_help
124     --enable-tcl          enable tcl backend (no)"
125 ac_help="$ac_help
126     --with-tcl-module     module type (static)"
127 ac_help="$ac_help
128 SLURPD (Replication Daemon) Options:"
129 ac_help="$ac_help
130   --enable-slurpd         enable building slurpd (auto)"
131 ac_help="$ac_help
132 Library Generation & Linking Options"
133 ac_help="$ac_help
134   --enable-static[=PKGS]  build static libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-shared[=PKGS]  build shared libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
139 ac_help="$ac_help
140   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
141 ac_help="$ac_help
142   --disable-libtool-lock  avoid locking (might break parallel builds)"
143
144 # Initialize some variables set by options.
145 # The variables have the same names as the options, with
146 # dashes changed to underlines.
147 build=NONE
148 cache_file=./config.cache
149 exec_prefix=NONE
150 host=NONE
151 no_create=
152 nonopt=NONE
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 target=NONE
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165 bindir='${exec_prefix}/bin'
166 sbindir='${exec_prefix}/sbin'
167 libexecdir='${exec_prefix}/libexec'
168 datadir='${prefix}/share'
169 sysconfdir='${prefix}/etc'
170 sharedstatedir='${prefix}/com'
171 localstatedir='${prefix}/var'
172 libdir='${exec_prefix}/lib'
173 includedir='${prefix}/include'
174 oldincludedir='/usr/include'
175 infodir='${prefix}/info'
176 mandir='${prefix}/man'
177
178 # Initialize some other variables.
179 subdirs=
180 MFLAGS= MAKEFLAGS=
181 SHELL=${CONFIG_SHELL-/bin/sh}
182 # Maximum number of lines to put in a shell here document.
183 ac_max_here_lines=12
184
185 ac_prev=
186 for ac_option
187 do
188
189   # If the previous option needs an argument, assign it.
190   if test -n "$ac_prev"; then
191     eval "$ac_prev=\$ac_option"
192     ac_prev=
193     continue
194   fi
195
196   case "$ac_option" in
197   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198   *) ac_optarg= ;;
199   esac
200
201   # Accept the important Cygnus configure options, so we can diagnose typos.
202
203   case "$ac_option" in
204
205   -bindir | --bindir | --bindi | --bind | --bin | --bi)
206     ac_prev=bindir ;;
207   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
208     bindir="$ac_optarg" ;;
209
210   -build | --build | --buil | --bui | --bu)
211     ac_prev=build ;;
212   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
213     build="$ac_optarg" ;;
214
215   -cache-file | --cache-file | --cache-fil | --cache-fi \
216   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
217     ac_prev=cache_file ;;
218   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
219   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
220     cache_file="$ac_optarg" ;;
221
222   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
223     ac_prev=datadir ;;
224   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
225   | --da=*)
226     datadir="$ac_optarg" ;;
227
228   -disable-* | --disable-*)
229     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
230     # Reject names that are not valid shell variable names.
231     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
232       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
233     fi
234     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
235     eval "enable_${ac_feature}=no" ;;
236
237   -enable-* | --enable-*)
238     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
239     # Reject names that are not valid shell variable names.
240     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
241       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242     fi
243     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244     case "$ac_option" in
245       *=*) ;;
246       *) ac_optarg=yes ;;
247     esac
248     eval "enable_${ac_feature}='$ac_optarg'" ;;
249
250   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
251   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
252   | --exec | --exe | --ex)
253     ac_prev=exec_prefix ;;
254   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
255   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
256   | --exec=* | --exe=* | --ex=*)
257     exec_prefix="$ac_optarg" ;;
258
259   -gas | --gas | --ga | --g)
260     # Obsolete; use --with-gas.
261     with_gas=yes ;;
262
263   -help | --help | --hel | --he)
264     # Omit some internal or obsolete options to make the list less imposing.
265     # This message is too long to be a string in the A/UX 3.1 sh.
266     cat << EOF
267 Usage: configure [options] [host]
268 Options: [defaults in brackets after descriptions]
269 Configuration:
270   --cache-file=FILE       cache test results in FILE
271   --help                  print this message
272   --no-create             do not create output files
273   --quiet, --silent       do not print \`checking...' messages
274   --version               print the version of autoconf that created configure
275 Directory and file names:
276   --prefix=PREFIX         install architecture-independent files in PREFIX
277                           [$ac_default_prefix]
278   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
279                           [same as prefix]
280   --bindir=DIR            user executables in DIR [EPREFIX/bin]
281   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
282   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
283   --datadir=DIR           read-only architecture-independent data in DIR
284                           [PREFIX/share]
285   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
286   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
287                           [PREFIX/com]
288   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
289   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
290   --includedir=DIR        C header files in DIR [PREFIX/include]
291   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
292   --infodir=DIR           info documentation in DIR [PREFIX/info]
293   --mandir=DIR            man documentation in DIR [PREFIX/man]
294   --srcdir=DIR            find the sources in DIR [configure dir or ..]
295   --program-prefix=PREFIX prepend PREFIX to installed program names
296   --program-suffix=SUFFIX append SUFFIX to installed program names
297   --program-transform-name=PROGRAM
298                           run sed PROGRAM on installed program names
299 EOF
300     cat << EOF
301 Host type:
302   --build=BUILD           configure for building on BUILD [BUILD=HOST]
303   --host=HOST             configure for HOST [guessed]
304   --target=TARGET         configure for TARGET [TARGET=HOST]
305 Features and packages:
306   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
307   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
308   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
309   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
310   --x-includes=DIR        X include files are in DIR
311   --x-libraries=DIR       X library files are in DIR
312 EOF
313     if test -n "$ac_help"; then
314       echo "--enable and --with options recognized:$ac_help"
315     fi
316     exit 0 ;;
317
318   -host | --host | --hos | --ho)
319     ac_prev=host ;;
320   -host=* | --host=* | --hos=* | --ho=*)
321     host="$ac_optarg" ;;
322
323   -includedir | --includedir | --includedi | --included | --include \
324   | --includ | --inclu | --incl | --inc)
325     ac_prev=includedir ;;
326   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
327   | --includ=* | --inclu=* | --incl=* | --inc=*)
328     includedir="$ac_optarg" ;;
329
330   -infodir | --infodir | --infodi | --infod | --info | --inf)
331     ac_prev=infodir ;;
332   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
333     infodir="$ac_optarg" ;;
334
335   -libdir | --libdir | --libdi | --libd)
336     ac_prev=libdir ;;
337   -libdir=* | --libdir=* | --libdi=* | --libd=*)
338     libdir="$ac_optarg" ;;
339
340   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
341   | --libexe | --libex | --libe)
342     ac_prev=libexecdir ;;
343   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
344   | --libexe=* | --libex=* | --libe=*)
345     libexecdir="$ac_optarg" ;;
346
347   -localstatedir | --localstatedir | --localstatedi | --localstated \
348   | --localstate | --localstat | --localsta | --localst \
349   | --locals | --local | --loca | --loc | --lo)
350     ac_prev=localstatedir ;;
351   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
352   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
353   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
354     localstatedir="$ac_optarg" ;;
355
356   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
357     ac_prev=mandir ;;
358   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
359     mandir="$ac_optarg" ;;
360
361   -nfp | --nfp | --nf)
362     # Obsolete; use --without-fp.
363     with_fp=no ;;
364
365   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
366   | --no-cr | --no-c)
367     no_create=yes ;;
368
369   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
370   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
371     no_recursion=yes ;;
372
373   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
374   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
375   | --oldin | --oldi | --old | --ol | --o)
376     ac_prev=oldincludedir ;;
377   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
378   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
379   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
380     oldincludedir="$ac_optarg" ;;
381
382   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
383     ac_prev=prefix ;;
384   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
385     prefix="$ac_optarg" ;;
386
387   -program-prefix | --program-prefix | --program-prefi | --program-pref \
388   | --program-pre | --program-pr | --program-p)
389     ac_prev=program_prefix ;;
390   -program-prefix=* | --program-prefix=* | --program-prefi=* \
391   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
392     program_prefix="$ac_optarg" ;;
393
394   -program-suffix | --program-suffix | --program-suffi | --program-suff \
395   | --program-suf | --program-su | --program-s)
396     ac_prev=program_suffix ;;
397   -program-suffix=* | --program-suffix=* | --program-suffi=* \
398   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
399     program_suffix="$ac_optarg" ;;
400
401   -program-transform-name | --program-transform-name \
402   | --program-transform-nam | --program-transform-na \
403   | --program-transform-n | --program-transform- \
404   | --program-transform | --program-transfor \
405   | --program-transfo | --program-transf \
406   | --program-trans | --program-tran \
407   | --progr-tra | --program-tr | --program-t)
408     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
417
418   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
419   | -silent | --silent | --silen | --sile | --sil)
420     silent=yes ;;
421
422   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
423     ac_prev=sbindir ;;
424   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
425   | --sbi=* | --sb=*)
426     sbindir="$ac_optarg" ;;
427
428   -sharedstatedir | --sharedstatedir | --sharedstatedi \
429   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
430   | --sharedst | --shareds | --shared | --share | --shar \
431   | --sha | --sh)
432     ac_prev=sharedstatedir ;;
433   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
434   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
435   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
436   | --sha=* | --sh=*)
437     sharedstatedir="$ac_optarg" ;;
438
439   -site | --site | --sit)
440     ac_prev=site ;;
441   -site=* | --site=* | --sit=*)
442     site="$ac_optarg" ;;
443
444   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
445     ac_prev=srcdir ;;
446   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
447     srcdir="$ac_optarg" ;;
448
449   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
450   | --syscon | --sysco | --sysc | --sys | --sy)
451     ac_prev=sysconfdir ;;
452   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
453   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
454     sysconfdir="$ac_optarg" ;;
455
456   -target | --target | --targe | --targ | --tar | --ta | --t)
457     ac_prev=target ;;
458   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
459     target="$ac_optarg" ;;
460
461   -v | -verbose | --verbose | --verbos | --verbo | --verb)
462     verbose=yes ;;
463
464   -version | --version | --versio | --versi | --vers)
465     echo "configure generated by autoconf version 2.13.1"
466     exit 0 ;;
467
468   -with-* | --with-*)
469     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     case "$ac_option" in
476       *=*) ;;
477       *) ac_optarg=yes ;;
478     esac
479     eval "with_${ac_package}='$ac_optarg'" ;;
480
481   -without-* | --without-*)
482     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
483     # Reject names that are not valid shell variable names.
484     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
485       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
486     fi
487     ac_package=`echo $ac_package| sed 's/-/_/g'`
488     eval "with_${ac_package}=no" ;;
489
490   --x)
491     # Obsolete; use --with-x.
492     with_x=yes ;;
493
494   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
495   | --x-incl | --x-inc | --x-in | --x-i)
496     ac_prev=x_includes ;;
497   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
498   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
499     x_includes="$ac_optarg" ;;
500
501   -x-libraries | --x-libraries | --x-librarie | --x-librari \
502   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
503     ac_prev=x_libraries ;;
504   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
505   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
506     x_libraries="$ac_optarg" ;;
507
508   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
509     ;;
510
511   *)
512     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
513       echo "configure: warning: $ac_option: invalid host type" 1>&2
514     fi
515     if test "x$nonopt" != xNONE; then
516       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
517     fi
518     nonopt="$ac_option"
519     ;;
520
521   esac
522 done
523
524 if test -n "$ac_prev"; then
525   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
526 fi
527
528 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
529
530 # File descriptor usage:
531 # 0 standard input
532 # 1 file creation
533 # 2 errors and warnings
534 # 3 some systems may open it to /dev/tty
535 # 4 used on the Kubota Titan
536 # 6 checking for... messages and results
537 # 5 compiler messages saved in config.log
538 if test "$silent" = yes; then
539   exec 6>/dev/null
540 else
541   exec 6>&1
542 fi
543 exec 5>./config.log
544
545 echo "\
546 This file contains any messages produced by compilers while
547 running configure, to aid debugging if configure makes a mistake.
548 " 1>&5
549
550 # Strip out --no-create and --no-recursion so they do not pile up.
551 # Also quote any args containing shell metacharacters.
552 ac_configure_args=
553 for ac_arg
554 do
555   case "$ac_arg" in
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c) ;;
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
560   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
561   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
562   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
563   esac
564 done
565
566 # NLS nuisances.
567 # Only set these to C if already set.  These must not be set unconditionally
568 # because not all systems understand e.g. LANG=C (notably SCO).
569 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
570 # Non-C LC_CTYPE values break the ctype check.
571 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
572 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
573 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
574 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
575
576 # confdefs.h avoids OS command line length limits that DEFS can exceed.
577 rm -rf conftest* confdefs.h
578 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
579 echo > confdefs.h
580
581 # A filename unique to this package, relative to the directory that
582 # configure is in, which we can look for to find out if srcdir is correct.
583 ac_unique_file=build/version.sh
584
585 # Find the source files, if location was not specified.
586 if test -z "$srcdir"; then
587   ac_srcdir_defaulted=yes
588   # Try the directory containing this script, then its parent.
589   ac_prog=$0
590   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
591   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
592   srcdir=$ac_confdir
593   if test ! -r $srcdir/$ac_unique_file; then
594     srcdir=..
595   fi
596 else
597   ac_srcdir_defaulted=no
598 fi
599 if test ! -r $srcdir/$ac_unique_file; then
600   if test "$ac_srcdir_defaulted" = yes; then
601     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
602   else
603     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
604   fi
605 fi
606 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
607
608 # Prefer explicitly selected file to automatically selected ones.
609 if test -z "$CONFIG_SITE"; then
610   if test "x$prefix" != xNONE; then
611     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
612   else
613     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
614   fi
615 fi
616 for ac_site_file in $CONFIG_SITE; do
617   if test -r "$ac_site_file"; then
618     echo "loading site script $ac_site_file"
619     . "$ac_site_file"
620   fi
621 done
622
623
624 ac_ext=c
625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
626 ac_cpp='$CPP $CPPFLAGS'
627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
629 cross_compiling=$ac_cv_prog_cc_cross
630
631 ac_exeext=
632 ac_objext=o
633 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
634   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
635   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
636     ac_n= ac_c='
637 ' ac_t='        '
638   else
639     ac_n=-n ac_c= ac_t=
640   fi
641 else
642   ac_n= ac_c='\c' ac_t=
643 fi
644
645
646 # set unset (borrowed from autoconf 2.14a)
647 if (unset FOO) >/dev/null 2>&1; then
648   ol_unset=unset
649 else
650   ol_unset=false
651 fi
652 # unset CDPATH
653 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
654
655 ac_aux_dir=
656 for ac_dir in build $srcdir/build; do
657   if test -f $ac_dir/install-sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install-sh -c"
660     break
661   elif test -f $ac_dir/install.sh; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/install.sh -c"
664     break
665   elif test -f $ac_dir/shtool; then
666     ac_aux_dir=$ac_dir
667     ac_install_sh="$ac_aux_dir/shtool install -c"
668     break
669   fi
670 done
671 if test -z "$ac_aux_dir"; then
672   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
673 fi
674 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
675 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
676 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
677
678 eval `$ac_aux_dir/version.sh`
679 if test -z "$OL_STRING"; then
680         { echo "configure: error: could not determine version" 1>&2; exit 1; }
681 fi
682
683 echo "Configuring $OL_STRING ..."
684
685
686 echo $ac_n "checking host system type""... $ac_c" 1>&6
687 echo "configure:688: checking host system type" >&5
688 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
689
690 # Make sure we can run config.sub.
691   if $ac_config_sub sun4 >/dev/null 2>&1; then :
692     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
693   fi
694
695   ac_cv_host_alias=$host
696   case "$ac_cv_host_alias" in
697   NONE)
698     case $nonopt in
699     NONE)
700       if ac_cv_host_alias=`$ac_config_guess`; then :
701       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702       fi ;;
703     *) ac_cv_host_alias=$nonopt ;;
704     esac ;;
705   esac
706
707   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
708   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 else
712   echo $ac_n "(cached) $ac_c" 1>&6
713 fi
714
715 echo "$ac_t""$ac_cv_host" 1>&6
716
717 host=$ac_cv_host
718 host_alias=$ac_cv_host_alias
719 host_cpu=$ac_cv_host_cpu
720 host_vendor=$ac_cv_host_vendor
721 host_os=$ac_cv_host_os
722
723
724
725
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
730
731 # Make sure we can run config.sub.
732   if $ac_config_sub sun4 >/dev/null 2>&1; then :
733     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
734   fi
735
736   ac_cv_target_alias=$target
737   case "$ac_cv_target_alias" in
738   NONE)
739     case $nonopt in
740     NONE)
741       ac_cv_target_alias=$host_alias ;;
742
743     *) ac_cv_target_alias=$nonopt ;;
744     esac ;;
745   esac
746
747   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
748   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
749   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
750   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
751 else
752   echo $ac_n "(cached) $ac_c" 1>&6
753 fi
754
755 echo "$ac_t""$ac_cv_target" 1>&6
756
757 target=$ac_cv_target
758 target_alias=$ac_cv_target_alias
759 target_cpu=$ac_cv_target_cpu
760 target_vendor=$ac_cv_target_vendor
761 target_os=$ac_cv_target_os
762
763
764
765
766
767 echo $ac_n "checking build system type""... $ac_c" 1>&6
768 echo "configure:769: checking build system type" >&5
769 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
770
771 # Make sure we can run config.sub.
772   if $ac_config_sub sun4 >/dev/null 2>&1; then :
773     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
774   fi
775
776   ac_cv_build_alias=$build
777   case "$ac_cv_build_alias" in
778   NONE)
779     case $nonopt in
780     NONE)
781       ac_cv_build_alias=$host_alias ;;
782
783     *) ac_cv_build_alias=$nonopt ;;
784     esac ;;
785   esac
786
787   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
788   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
789   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
790   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
791 else
792   echo $ac_n "(cached) $ac_c" 1>&6
793 fi
794
795 echo "$ac_t""$ac_cv_build" 1>&6
796
797 build=$ac_cv_build
798 build_alias=$ac_cv_build_alias
799 build_cpu=$ac_cv_build_cpu
800 build_vendor=$ac_cv_build_vendor
801 build_os=$ac_cv_build_os
802
803
804
805
806
807 # Do some error checking and defaulting for the host and target type.
808 # The inputs are:
809 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
810 #
811 # The rules are:
812 # 1. You are not allowed to specify --host, --target, and nonopt at the
813 #    same time.
814 # 2. Host defaults to nonopt.
815 # 3. If nonopt is not specified, then host defaults to the current host,
816 #    as determined by config.guess.
817 # 4. Target and build default to nonopt.
818 # 5. If nonopt is not specified, then target and build default to host.
819
820 # The aliases save the names the user supplied, while $host etc.
821 # will get canonicalized.
822 case $host---$target---$nonopt in
823 NONE---*---* | *---NONE---* | *---*---NONE) ;;
824 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
825 esac
826
827 test "$host_alias" != "$target_alias" &&
828   test "$program_prefix$program_suffix$program_transform_name" = \
829     NONENONEs,x,x, &&
830   program_prefix=${target_alias}-
831
832
833 # Find a good install program.  We prefer a C program (faster),
834 # so one script is as good as another.  But avoid the broken or
835 # incompatible versions:
836 # SysV /etc/install, /usr/sbin/install
837 # SunOS /usr/etc/install
838 # IRIX /sbin/install
839 # AIX /bin/install
840 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
841 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
842 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
843 # ./install, which can be erroneously created by make from ./install.sh.
844 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
845 echo "configure:846: checking for a BSD compatible install" >&5
846 if test -z "$INSTALL"; then
847 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
851   for ac_dir in $PATH; do
852     # Account for people who put trailing slashes in PATH elements.
853     case "$ac_dir/" in
854     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
855     *)
856       # OSF1 and SCO ODT 3.0 have their own names for install.
857       # Don't use installbsd from OSF since it installs stuff as root
858       # by default.
859       for ac_prog in ginstall scoinst install; do
860         if test -f $ac_dir/$ac_prog; then
861           if test $ac_prog = install &&
862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # AIX install.  It has an incompatible calling convention.
864             :
865           elif test $ac_prog = install &&
866             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
867             # program-specific install script used by HP pwplus--don't use.
868             :
869           else
870             ac_cv_path_install="$ac_dir/$ac_prog -c"
871             break 2
872           fi
873         fi
874       done
875       ;;
876     esac
877   done
878   IFS="$ac_save_IFS"
879
880 fi
881   if test "${ac_cv_path_install+set}" = set; then
882     INSTALL="$ac_cv_path_install"
883   else
884     # As a last resort, use the slow shell script.  We don't cache a
885     # path for INSTALL within a source directory, because that will
886     # break other packages using the cache if that directory is
887     # removed, or if the path is relative.
888     INSTALL="$ac_install_sh"
889   fi
890 fi
891 echo "$ac_t""$INSTALL" 1>&6
892
893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894 # It thinks the first close brace ends the variable substitution.
895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
898
899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
900
901 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
902 echo "configure:903: checking whether build environment is sane" >&5
903 # Just in case
904 sleep 1
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments.  Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
910 # directory).
911 if (
912    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913    if test "$*" = "X"; then
914       # -L didn't work.
915       set X `ls -t $srcdir/configure conftestfile`
916    fi
917    if test "$*" != "X $srcdir/configure conftestfile" \
918       && test "$*" != "X conftestfile $srcdir/configure"; then
919
920       # If neither matched, then we have a broken ls.  This can happen
921       # if, for instance, CONFIG_SHELL is bash and it inherits a
922       # broken ls alias from the environment.  This has actually
923       # happened.  Such a system could not be considered "sane".
924       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
925 alias in your environment" 1>&2; exit 1; }
926    fi
927
928    test "$2" = conftestfile
929    )
930 then
931    # Ok.
932    :
933 else
934    { echo "configure: error: newly created file is older than distributed files!
935 Check your system clock" 1>&2; exit 1; }
936 fi
937 rm -f conftest*
938 echo "$ac_t""yes" 1>&6
939 if test "$program_transform_name" = s,x,x,; then
940   program_transform_name=
941 else
942   # Double any \ or $.  echo might interpret backslashes.
943   cat <<\EOF_SED > conftestsed
944 s,\\,\\\\,g; s,\$,$$,g
945 EOF_SED
946   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
947   rm -f conftestsed
948 fi
949 test "$program_prefix" != NONE &&
950   program_transform_name="s,^,${program_prefix},;$program_transform_name"
951 # Use a double $ so make ignores it.
952 test "$program_suffix" != NONE &&
953   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
954
955 # sed with no file args requires a program.
956 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
957
958 for ac_prog in mawk gawk nawk awk
959 do
960 # Extract the first word of "$ac_prog", so it can be a program name with args.
961 set dummy $ac_prog; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   if test -n "$AWK"; then
968   ac_cv_prog_AWK="$AWK" # Let the user override the test.
969 else
970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
971   ac_dummy="$PATH"
972   for ac_dir in $ac_dummy; do
973     test -z "$ac_dir" && ac_dir=.
974     if test -f $ac_dir/$ac_word; then
975       ac_cv_prog_AWK="$ac_prog"
976       break
977     fi
978   done
979   IFS="$ac_save_ifs"
980 fi
981 fi
982 AWK="$ac_cv_prog_AWK"
983 if test -n "$AWK"; then
984   echo "$ac_t""$AWK" 1>&6
985 else
986   echo "$ac_t""no" 1>&6
987 fi
988
989 test -n "$AWK" && break
990 done
991
992 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
993 echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
994 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
996   echo $ac_n "(cached) $ac_c" 1>&6
997 else
998   cat > conftestmake <<\EOF
999 all:
1000         @echo 'ac_maketemp="${MAKE}"'
1001 EOF
1002 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004 if test -n "$ac_maketemp"; then
1005   eval ac_cv_prog_make_${ac_make}_set=yes
1006 else
1007   eval ac_cv_prog_make_${ac_make}_set=no
1008 fi
1009 rm -f conftestmake
1010 fi
1011 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012   echo "$ac_t""yes" 1>&6
1013   SET_MAKE=
1014 else
1015   echo "$ac_t""no" 1>&6
1016   SET_MAKE="MAKE=${MAKE-make}"
1017 fi
1018
1019
1020
1021 PACKAGE=$OL_PACKAGE
1022
1023 VERSION=$OL_VERSION
1024
1025 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1026   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1027 fi
1028
1029
1030
1031 missing_dir=`cd $ac_aux_dir && pwd`
1032 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1033 echo "configure:1034: checking for working aclocal" >&5
1034 # Run test in a subshell; some versions of sh will print an error if
1035 # an executable is not found, even if stderr is redirected.
1036 # Redirect stdin to placate older versions of autoconf.  Sigh.
1037 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1038    ACLOCAL=aclocal
1039    echo "$ac_t""found" 1>&6
1040 else
1041    ACLOCAL="$missing_dir/missing aclocal"
1042    echo "$ac_t""missing" 1>&6
1043 fi
1044
1045 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1046 echo "configure:1047: checking for working autoconf" >&5
1047 # Run test in a subshell; some versions of sh will print an error if
1048 # an executable is not found, even if stderr is redirected.
1049 # Redirect stdin to placate older versions of autoconf.  Sigh.
1050 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1051    AUTOCONF=autoconf
1052    echo "$ac_t""found" 1>&6
1053 else
1054    AUTOCONF="$missing_dir/missing autoconf"
1055    echo "$ac_t""missing" 1>&6
1056 fi
1057
1058 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1059 echo "configure:1060: checking for working automake" >&5
1060 # Run test in a subshell; some versions of sh will print an error if
1061 # an executable is not found, even if stderr is redirected.
1062 # Redirect stdin to placate older versions of autoconf.  Sigh.
1063 if (automake --version) < /dev/null > /dev/null 2>&1; then
1064    AUTOMAKE=automake
1065    echo "$ac_t""found" 1>&6
1066 else
1067    AUTOMAKE="$missing_dir/missing automake"
1068    echo "$ac_t""missing" 1>&6
1069 fi
1070
1071 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1072 echo "configure:1073: checking for working autoheader" >&5
1073 # Run test in a subshell; some versions of sh will print an error if
1074 # an executable is not found, even if stderr is redirected.
1075 # Redirect stdin to placate older versions of autoconf.  Sigh.
1076 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1077    AUTOHEADER=autoheader
1078    echo "$ac_t""found" 1>&6
1079 else
1080    AUTOHEADER="$missing_dir/missing autoheader"
1081    echo "$ac_t""missing" 1>&6
1082 fi
1083
1084 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1085 echo "configure:1086: checking for working makeinfo" >&5
1086 # Run test in a subshell; some versions of sh will print an error if
1087 # an executable is not found, even if stderr is redirected.
1088 # Redirect stdin to placate older versions of autoconf.  Sigh.
1089 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1090    MAKEINFO=makeinfo
1091    echo "$ac_t""found" 1>&6
1092 else
1093    MAKEINFO="$missing_dir/missing makeinfo"
1094    echo "$ac_t""missing" 1>&6
1095 fi
1096
1097 install_sh="$missing_dir/install-sh"
1098 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1099
1100 for ac_prog in gnutar gtar tar
1101 do
1102 # Extract the first word of "$ac_prog", so it can be a program name with args.
1103 set dummy $ac_prog; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   if test -n "$AMTAR"; then
1110   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1111 else
1112   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1113   ac_dummy="$PATH"
1114   for ac_dir in $ac_dummy; do
1115     test -z "$ac_dir" && ac_dir=.
1116     if test -f $ac_dir/$ac_word; then
1117       ac_cv_prog_AMTAR="$ac_prog"
1118       break
1119     fi
1120   done
1121   IFS="$ac_save_ifs"
1122 fi
1123 fi
1124 AMTAR="$ac_cv_prog_AMTAR"
1125 if test -n "$AMTAR"; then
1126   echo "$ac_t""$AMTAR" 1>&6
1127 else
1128   echo "$ac_t""no" 1>&6
1129 fi
1130
1131 test -n "$AMTAR" && break
1132 done
1133
1134
1135 AMTARFLAGS=
1136 if test -n "$AMTAR"; then
1137   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1138         AMTARFLAGS=o
1139   fi
1140 fi
1141
1142
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_PACKAGE "$PACKAGE"
1146 EOF
1147
1148 cat >> confdefs.h <<EOF
1149 #define OPENLDAP_VERSION "$VERSION"
1150 EOF
1151
1152
1153 cat >> confdefs.h <<EOF
1154 #define LDAP_VENDOR_VERSION $OL_API_INC
1155 EOF
1156
1157 cat >> confdefs.h <<EOF
1158 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1159 EOF
1160
1161 cat >> confdefs.h <<EOF
1162 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1163 EOF
1164
1165 cat >> confdefs.h <<EOF
1166 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1167 EOF
1168
1169
1170 OPENLDAP_LIBVERSION=$OL_API_LIB
1171
1172
1173
1174
1175 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1176 echo "configure:1177: checking configure arguments" >&5
1177
1178
1179 top_builddir=`pwd`
1180
1181 ldap_subdir="/openldap"
1182
1183 # Check whether --with-subdir or --without-subdir was given.
1184 if test "${with_subdir+set}" = set; then
1185   withval="$with_subdir"
1186   case "$withval" in
1187         no) ldap_subdir=""
1188                 ;;
1189         yes)
1190                 ;;
1191         /*|\\*)
1192                 ldap_subdir="$withval"
1193                 ;;
1194         *)
1195                 ldap_subdir="/$withval"
1196                 ;;
1197 esac
1198
1199 fi
1200
1201
1202 # OpenLDAP --enable-debug
1203         # Check whether --enable-debug or --disable-debug was given.
1204 if test "${enable_debug+set}" = set; then
1205   enableval="$enable_debug"
1206   
1207         ol_arg=invalid
1208         for ol_val in auto yes no ; do
1209                 if test "$enableval" = "$ol_val" ; then
1210                         ol_arg="$ol_val"
1211                 fi
1212         done
1213         if test "$ol_arg" = "invalid" ; then
1214                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1215         fi
1216         ol_enable_debug="$ol_arg"
1217
1218 else
1219         ol_enable_debug="yes"
1220 fi
1221 # end --enable-debug
1222 # OpenLDAP --enable-syslog
1223         # Check whether --enable-syslog or --disable-syslog was given.
1224 if test "${enable_syslog+set}" = set; then
1225   enableval="$enable_syslog"
1226   
1227         ol_arg=invalid
1228         for ol_val in auto yes no ; do
1229                 if test "$enableval" = "$ol_val" ; then
1230                         ol_arg="$ol_val"
1231                 fi
1232         done
1233         if test "$ol_arg" = "invalid" ; then
1234                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1235         fi
1236         ol_enable_syslog="$ol_arg"
1237
1238 else
1239         ol_enable_syslog="auto"
1240 fi
1241 # end --enable-syslog
1242 # OpenLDAP --enable-proctitle
1243         # Check whether --enable-proctitle or --disable-proctitle was given.
1244 if test "${enable_proctitle+set}" = set; then
1245   enableval="$enable_proctitle"
1246   
1247         ol_arg=invalid
1248         for ol_val in auto yes no ; do
1249                 if test "$enableval" = "$ol_val" ; then
1250                         ol_arg="$ol_val"
1251                 fi
1252         done
1253         if test "$ol_arg" = "invalid" ; then
1254                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1255         fi
1256         ol_enable_proctitle="$ol_arg"
1257
1258 else
1259         ol_enable_proctitle="yes"
1260 fi
1261 # end --enable-proctitle
1262 # OpenLDAP --enable-cache
1263         # Check whether --enable-cache or --disable-cache was given.
1264 if test "${enable_cache+set}" = set; then
1265   enableval="$enable_cache"
1266   
1267         ol_arg=invalid
1268         for ol_val in auto yes no ; do
1269                 if test "$enableval" = "$ol_val" ; then
1270                         ol_arg="$ol_val"
1271                 fi
1272         done
1273         if test "$ol_arg" = "invalid" ; then
1274                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1275         fi
1276         ol_enable_cache="$ol_arg"
1277
1278 else
1279         ol_enable_cache="yes"
1280 fi
1281 # end --enable-cache
1282 # OpenLDAP --enable-referrals
1283         # Check whether --enable-referrals or --disable-referrals was given.
1284 if test "${enable_referrals+set}" = set; then
1285   enableval="$enable_referrals"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no ; do
1289                 if test "$enableval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1295         fi
1296         ol_enable_referrals="$ol_arg"
1297
1298 else
1299         ol_enable_referrals="yes"
1300 fi
1301 # end --enable-referrals
1302 # OpenLDAP --enable-kbind
1303         # Check whether --enable-kbind or --disable-kbind was given.
1304 if test "${enable_kbind+set}" = set; then
1305   enableval="$enable_kbind"
1306   
1307         ol_arg=invalid
1308         for ol_val in auto yes no ; do
1309                 if test "$enableval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1315         fi
1316         ol_enable_kbind="$ol_arg"
1317
1318 else
1319         ol_enable_kbind="no"
1320 fi
1321 # end --enable-kbind
1322 # OpenLDAP --enable-ipv6
1323         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1324 if test "${enable_ipv6+set}" = set; then
1325   enableval="$enable_ipv6"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto yes no ; do
1329                 if test "$enableval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1335         fi
1336         ol_enable_ipv6="$ol_arg"
1337
1338 else
1339         ol_enable_ipv6="auto"
1340 fi
1341 # end --enable-ipv6
1342 # OpenLDAP --enable-local
1343         # Check whether --enable-local or --disable-local was given.
1344 if test "${enable_local+set}" = set; then
1345   enableval="$enable_local"
1346   
1347         ol_arg=invalid
1348         for ol_val in auto yes no ; do
1349                 if test "$enableval" = "$ol_val" ; then
1350                         ol_arg="$ol_val"
1351                 fi
1352         done
1353         if test "$ol_arg" = "invalid" ; then
1354                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1355         fi
1356         ol_enable_local="$ol_arg"
1357
1358 else
1359         ol_enable_local="auto"
1360 fi
1361 # end --enable-local
1362 # OpenLDAP --enable-x_compile
1363         # Check whether --enable-x_compile or --disable-x_compile was given.
1364 if test "${enable_x_compile+set}" = set; then
1365   enableval="$enable_x_compile"
1366   
1367         ol_arg=invalid
1368         for ol_val in yes no ; do
1369                 if test "$enableval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1375         fi
1376         ol_enable_x_compile="$ol_arg"
1377
1378 else
1379         ol_enable_x_compile="no"
1380 fi
1381 # end --enable-x_compile
1382
1383
1384 # OpenLDAP --with-cyrus_sasl
1385         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1386 if test "${with_cyrus_sasl+set}" = set; then
1387   withval="$with_cyrus_sasl"
1388   
1389         ol_arg=invalid
1390         for ol_val in auto yes no  ; do
1391                 if test "$withval" = "$ol_val" ; then
1392                         ol_arg="$ol_val"
1393                 fi
1394         done
1395         if test "$ol_arg" = "invalid" ; then
1396                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1397         fi
1398         ol_with_cyrus_sasl="$ol_arg"
1399
1400 else
1401         ol_with_cyrus_sasl="auto"
1402 fi
1403 # end --with-cyrus_sasl
1404
1405 # OpenLDAP --with-fetch
1406         # Check whether --with-fetch or --without-fetch was given.
1407 if test "${with_fetch+set}" = set; then
1408   withval="$with_fetch"
1409   
1410         ol_arg=invalid
1411         for ol_val in auto yes no  ; do
1412                 if test "$withval" = "$ol_val" ; then
1413                         ol_arg="$ol_val"
1414                 fi
1415         done
1416         if test "$ol_arg" = "invalid" ; then
1417                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1418         fi
1419         ol_with_fetch="$ol_arg"
1420
1421 else
1422         ol_with_fetch="auto"
1423 fi
1424 # end --with-fetch
1425
1426 # OpenLDAP --with-kerberos
1427         # Check whether --with-kerberos or --without-kerberos was given.
1428 if test "${with_kerberos+set}" = set; then
1429   withval="$with_kerberos"
1430   
1431         ol_arg=invalid
1432         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1433                 if test "$withval" = "$ol_val" ; then
1434                         ol_arg="$ol_val"
1435                 fi
1436         done
1437         if test "$ol_arg" = "invalid" ; then
1438                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1439         fi
1440         ol_with_kerberos="$ol_arg"
1441
1442 else
1443         ol_with_kerberos="auto"
1444 fi
1445 # end --with-kerberos
1446
1447 # OpenLDAP --with-readline
1448         # Check whether --with-readline or --without-readline was given.
1449 if test "${with_readline+set}" = set; then
1450   withval="$with_readline"
1451   
1452         ol_arg=invalid
1453         for ol_val in auto yes no  ; do
1454                 if test "$withval" = "$ol_val" ; then
1455                         ol_arg="$ol_val"
1456                 fi
1457         done
1458         if test "$ol_arg" = "invalid" ; then
1459                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1460         fi
1461         ol_with_readline="$ol_arg"
1462
1463 else
1464         ol_with_readline="auto"
1465 fi
1466 # end --with-readline
1467
1468 # OpenLDAP --with-threads
1469         # Check whether --with-threads or --without-threads was given.
1470 if test "${with_threads+set}" = set; then
1471   withval="$with_threads"
1472   
1473         ol_arg=invalid
1474         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1475                 if test "$withval" = "$ol_val" ; then
1476                         ol_arg="$ol_val"
1477                 fi
1478         done
1479         if test "$ol_arg" = "invalid" ; then
1480                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1481         fi
1482         ol_with_threads="$ol_arg"
1483
1484 else
1485         ol_with_threads="auto"
1486 fi
1487 # end --with-threads
1488
1489 # OpenLDAP --with-tls
1490         # Check whether --with-tls or --without-tls was given.
1491 if test "${with_tls+set}" = set; then
1492   withval="$with_tls"
1493   
1494         ol_arg=invalid
1495         for ol_val in auto ssleay openssl yes no  ; do
1496                 if test "$withval" = "$ol_val" ; then
1497                         ol_arg="$ol_val"
1498                 fi
1499         done
1500         if test "$ol_arg" = "invalid" ; then
1501                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1502         fi
1503         ol_with_tls="$ol_arg"
1504
1505 else
1506         ol_with_tls="auto"
1507 fi
1508 # end --with-tls
1509
1510 # OpenLDAP --with-yielding_select
1511         # Check whether --with-yielding_select or --without-yielding_select was given.
1512 if test "${with_yielding_select+set}" = set; then
1513   withval="$with_yielding_select"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no manual  ; do
1517                 if test "$withval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1523         fi
1524         ol_with_yielding_select="$ol_arg"
1525
1526 else
1527         ol_with_yielding_select="auto"
1528 fi
1529 # end --with-yielding_select
1530
1531
1532
1533 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1534 if test "${with_xxslapdoptions+set}" = set; then
1535   withval="$with_xxslapdoptions"
1536   :
1537 fi
1538
1539 # OpenLDAP --enable-slapd
1540         # Check whether --enable-slapd or --disable-slapd was given.
1541 if test "${enable_slapd+set}" = set; then
1542   enableval="$enable_slapd"
1543   
1544         ol_arg=invalid
1545         for ol_val in auto yes no ; do
1546                 if test "$enableval" = "$ol_val" ; then
1547                         ol_arg="$ol_val"
1548                 fi
1549         done
1550         if test "$ol_arg" = "invalid" ; then
1551                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1552         fi
1553         ol_enable_slapd="$ol_arg"
1554
1555 else
1556         ol_enable_slapd="yes"
1557 fi
1558 # end --enable-slapd
1559 # OpenLDAP --enable-cleartext
1560         # Check whether --enable-cleartext or --disable-cleartext was given.
1561 if test "${enable_cleartext+set}" = set; then
1562   enableval="$enable_cleartext"
1563   
1564         ol_arg=invalid
1565         for ol_val in auto yes no ; do
1566                 if test "$enableval" = "$ol_val" ; then
1567                         ol_arg="$ol_val"
1568                 fi
1569         done
1570         if test "$ol_arg" = "invalid" ; then
1571                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1572         fi
1573         ol_enable_cleartext="$ol_arg"
1574
1575 else
1576         ol_enable_cleartext="yes"
1577 fi
1578 # end --enable-cleartext
1579 # OpenLDAP --enable-crypt
1580         # Check whether --enable-crypt or --disable-crypt was given.
1581 if test "${enable_crypt+set}" = set; then
1582   enableval="$enable_crypt"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto yes no ; do
1586                 if test "$enableval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1592         fi
1593         ol_enable_crypt="$ol_arg"
1594
1595 else
1596         ol_enable_crypt="auto"
1597 fi
1598 # end --enable-crypt
1599 # OpenLDAP --enable-kpasswd
1600         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1601 if test "${enable_kpasswd+set}" = set; then
1602   enableval="$enable_kpasswd"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto yes no ; do
1606                 if test "$enableval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1612         fi
1613         ol_enable_kpasswd="$ol_arg"
1614
1615 else
1616         ol_enable_kpasswd="no"
1617 fi
1618 # end --enable-kpasswd
1619 # OpenLDAP --enable-spasswd
1620         # Check whether --enable-spasswd or --disable-spasswd was given.
1621 if test "${enable_spasswd+set}" = set; then
1622   enableval="$enable_spasswd"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto yes no ; do
1626                 if test "$enableval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1632         fi
1633         ol_enable_spasswd="$ol_arg"
1634
1635 else
1636         ol_enable_spasswd="no"
1637 fi
1638 # end --enable-spasswd
1639 # OpenLDAP --enable-modules
1640         # Check whether --enable-modules or --disable-modules was given.
1641 if test "${enable_modules+set}" = set; then
1642   enableval="$enable_modules"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1652         fi
1653         ol_enable_modules="$ol_arg"
1654
1655 else
1656         ol_enable_modules="no"
1657 fi
1658 # end --enable-modules
1659 # OpenLDAP --enable-multimaster
1660         # Check whether --enable-multimaster or --disable-multimaster was given.
1661 if test "${enable_multimaster+set}" = set; then
1662   enableval="$enable_multimaster"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no ; do
1666                 if test "$enableval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1672         fi
1673         ol_enable_multimaster="$ol_arg"
1674
1675 else
1676         ol_enable_multimaster="no"
1677 fi
1678 # end --enable-multimaster
1679 # OpenLDAP --enable-phonetic
1680         # Check whether --enable-phonetic or --disable-phonetic was given.
1681 if test "${enable_phonetic+set}" = set; then
1682   enableval="$enable_phonetic"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no ; do
1686                 if test "$enableval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1692         fi
1693         ol_enable_phonetic="$ol_arg"
1694
1695 else
1696         ol_enable_phonetic="no"
1697 fi
1698 # end --enable-phonetic
1699 # OpenLDAP --enable-rlookups
1700         # Check whether --enable-rlookups or --disable-rlookups was given.
1701 if test "${enable_rlookups+set}" = set; then
1702   enableval="$enable_rlookups"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1712         fi
1713         ol_enable_rlookups="$ol_arg"
1714
1715 else
1716         ol_enable_rlookups="auto"
1717 fi
1718 # end --enable-rlookups
1719 # OpenLDAP --enable-aci
1720         # Check whether --enable-aci or --disable-aci was given.
1721 if test "${enable_aci+set}" = set; then
1722   enableval="$enable_aci"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1732         fi
1733         ol_enable_aci="$ol_arg"
1734
1735 else
1736         ol_enable_aci="no"
1737 fi
1738 # end --enable-aci
1739 # OpenLDAP --enable-wrappers
1740         # Check whether --enable-wrappers or --disable-wrappers was given.
1741 if test "${enable_wrappers+set}" = set; then
1742   enableval="$enable_wrappers"
1743   
1744         ol_arg=invalid
1745         for ol_val in auto yes no ; do
1746                 if test "$enableval" = "$ol_val" ; then
1747                         ol_arg="$ol_val"
1748                 fi
1749         done
1750         if test "$ol_arg" = "invalid" ; then
1751                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1752         fi
1753         ol_enable_wrappers="$ol_arg"
1754
1755 else
1756         ol_enable_wrappers="no"
1757 fi
1758 # end --enable-wrappers
1759 # OpenLDAP --enable-dynamic
1760         # Check whether --enable-dynamic or --disable-dynamic was given.
1761 if test "${enable_dynamic+set}" = set; then
1762   enableval="$enable_dynamic"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1772         fi
1773         ol_enable_dynamic="$ol_arg"
1774
1775 else
1776         ol_enable_dynamic="no"
1777 fi
1778 # end --enable-dynamic
1779
1780 # OpenLDAP --enable-bdb
1781         # Check whether --enable-bdb or --disable-bdb was given.
1782 if test "${enable_bdb+set}" = set; then
1783   enableval="$enable_bdb"
1784   
1785         ol_arg=invalid
1786         for ol_val in auto yes no ; do
1787                 if test "$enableval" = "$ol_val" ; then
1788                         ol_arg="$ol_val"
1789                 fi
1790         done
1791         if test "$ol_arg" = "invalid" ; then
1792                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1793         fi
1794         ol_enable_bdb="$ol_arg"
1795
1796 else
1797         ol_enable_bdb="no"
1798 fi
1799 # end --enable-bdb
1800 # OpenLDAP --with-bdb_module
1801         # Check whether --with-bdb_module or --without-bdb_module was given.
1802 if test "${with_bdb_module+set}" = set; then
1803   withval="$with_bdb_module"
1804   
1805         ol_arg=invalid
1806         for ol_val in static dynamic ; do
1807                 if test "$withval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1813         fi
1814         ol_with_bdb_module="$ol_arg"
1815
1816 else
1817         ol_with_bdb_module="static"
1818 fi
1819 # end --with-bdb_module
1820
1821 # OpenLDAP --enable-dnssrv
1822         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1823 if test "${enable_dnssrv+set}" = set; then
1824   enableval="$enable_dnssrv"
1825   
1826         ol_arg=invalid
1827         for ol_val in auto yes no ; do
1828                 if test "$enableval" = "$ol_val" ; then
1829                         ol_arg="$ol_val"
1830                 fi
1831         done
1832         if test "$ol_arg" = "invalid" ; then
1833                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1834         fi
1835         ol_enable_dnssrv="$ol_arg"
1836
1837 else
1838         ol_enable_dnssrv="no"
1839 fi
1840 # end --enable-dnssrv
1841 # OpenLDAP --with-dnssrv_module
1842         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1843 if test "${with_dnssrv_module+set}" = set; then
1844   withval="$with_dnssrv_module"
1845   
1846         ol_arg=invalid
1847         for ol_val in static dynamic ; do
1848                 if test "$withval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1854         fi
1855         ol_with_dnssrv_module="$ol_arg"
1856
1857 else
1858         ol_with_dnssrv_module="static"
1859 fi
1860 # end --with-dnssrv_module
1861
1862 # OpenLDAP --enable-ldap
1863         # Check whether --enable-ldap or --disable-ldap was given.
1864 if test "${enable_ldap+set}" = set; then
1865   enableval="$enable_ldap"
1866   
1867         ol_arg=invalid
1868         for ol_val in auto yes no ; do
1869                 if test "$enableval" = "$ol_val" ; then
1870                         ol_arg="$ol_val"
1871                 fi
1872         done
1873         if test "$ol_arg" = "invalid" ; then
1874                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1875         fi
1876         ol_enable_ldap="$ol_arg"
1877
1878 else
1879         ol_enable_ldap="no"
1880 fi
1881 # end --enable-ldap
1882 # OpenLDAP --with-ldap_module
1883         # Check whether --with-ldap_module or --without-ldap_module was given.
1884 if test "${with_ldap_module+set}" = set; then
1885   withval="$with_ldap_module"
1886   
1887         ol_arg=invalid
1888         for ol_val in static dynamic ; do
1889                 if test "$withval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1895         fi
1896         ol_with_ldap_module="$ol_arg"
1897
1898 else
1899         ol_with_ldap_module="static"
1900 fi
1901 # end --with-ldap_module
1902
1903 # OpenLDAP --enable-ldbm
1904         # Check whether --enable-ldbm or --disable-ldbm was given.
1905 if test "${enable_ldbm+set}" = set; then
1906   enableval="$enable_ldbm"
1907   
1908         ol_arg=invalid
1909         for ol_val in auto yes no ; do
1910                 if test "$enableval" = "$ol_val" ; then
1911                         ol_arg="$ol_val"
1912                 fi
1913         done
1914         if test "$ol_arg" = "invalid" ; then
1915                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1916         fi
1917         ol_enable_ldbm="$ol_arg"
1918
1919 else
1920         ol_enable_ldbm="yes"
1921 fi
1922 # end --enable-ldbm
1923 # OpenLDAP --with-ldbm_api
1924         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1925 if test "${with_ldbm_api+set}" = set; then
1926   withval="$with_ldbm_api"
1927   
1928         ol_arg=invalid
1929         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1930                 if test "$withval" = "$ol_val" ; then
1931                         ol_arg="$ol_val"
1932                 fi
1933         done
1934         if test "$ol_arg" = "invalid" ; then
1935                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1936         fi
1937         ol_with_ldbm_api="$ol_arg"
1938
1939 else
1940         ol_with_ldbm_api="auto"
1941 fi
1942 # end --with-ldbm_api
1943
1944 # OpenLDAP --with-ldbm_module
1945         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1946 if test "${with_ldbm_module+set}" = set; then
1947   withval="$with_ldbm_module"
1948   
1949         ol_arg=invalid
1950         for ol_val in static dynamic ; do
1951                 if test "$withval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1957         fi
1958         ol_with_ldbm_module="$ol_arg"
1959
1960 else
1961         ol_with_ldbm_module="static"
1962 fi
1963 # end --with-ldbm_module
1964
1965 # OpenLDAP --with-ldbm_type
1966         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1967 if test "${with_ldbm_type+set}" = set; then
1968   withval="$with_ldbm_type"
1969   
1970         ol_arg=invalid
1971         for ol_val in auto btree hash ; do
1972                 if test "$withval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1978         fi
1979         ol_with_ldbm_type="$ol_arg"
1980
1981 else
1982         ol_with_ldbm_type="auto"
1983 fi
1984 # end --with-ldbm_type
1985
1986 # OpenLDAP --enable-passwd
1987         # Check whether --enable-passwd or --disable-passwd was given.
1988 if test "${enable_passwd+set}" = set; then
1989   enableval="$enable_passwd"
1990   
1991         ol_arg=invalid
1992         for ol_val in auto yes no ; do
1993                 if test "$enableval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1999         fi
2000         ol_enable_passwd="$ol_arg"
2001
2002 else
2003         ol_enable_passwd="no"
2004 fi
2005 # end --enable-passwd
2006 # OpenLDAP --with-passwd_module
2007         # Check whether --with-passwd_module or --without-passwd_module was given.
2008 if test "${with_passwd_module+set}" = set; then
2009   withval="$with_passwd_module"
2010   
2011         ol_arg=invalid
2012         for ol_val in static dynamic ; do
2013                 if test "$withval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2019         fi
2020         ol_with_passwd_module="$ol_arg"
2021
2022 else
2023         ol_with_passwd_module="static"
2024 fi
2025 # end --with-passwd_module
2026
2027 # OpenLDAP --enable-perl
2028         # Check whether --enable-perl or --disable-perl was given.
2029 if test "${enable_perl+set}" = set; then
2030   enableval="$enable_perl"
2031   
2032         ol_arg=invalid
2033         for ol_val in auto yes no ; do
2034                 if test "$enableval" = "$ol_val" ; then
2035                         ol_arg="$ol_val"
2036                 fi
2037         done
2038         if test "$ol_arg" = "invalid" ; then
2039                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2040         fi
2041         ol_enable_perl="$ol_arg"
2042
2043 else
2044         ol_enable_perl="no"
2045 fi
2046 # end --enable-perl
2047 # OpenLDAP --with-perl_module
2048         # Check whether --with-perl_module or --without-perl_module was given.
2049 if test "${with_perl_module+set}" = set; then
2050   withval="$with_perl_module"
2051   
2052         ol_arg=invalid
2053         for ol_val in static dynamic ; do
2054                 if test "$withval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2060         fi
2061         ol_with_perl_module="$ol_arg"
2062
2063 else
2064         ol_with_perl_module="static"
2065 fi
2066 # end --with-perl_module
2067
2068 # OpenLDAP --enable-shell
2069         # Check whether --enable-shell or --disable-shell was given.
2070 if test "${enable_shell+set}" = set; then
2071   enableval="$enable_shell"
2072   
2073         ol_arg=invalid
2074         for ol_val in auto yes no ; do
2075                 if test "$enableval" = "$ol_val" ; then
2076                         ol_arg="$ol_val"
2077                 fi
2078         done
2079         if test "$ol_arg" = "invalid" ; then
2080                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2081         fi
2082         ol_enable_shell="$ol_arg"
2083
2084 else
2085         ol_enable_shell="no"
2086 fi
2087 # end --enable-shell
2088 # OpenLDAP --with-shell_module
2089         # Check whether --with-shell_module or --without-shell_module was given.
2090 if test "${with_shell_module+set}" = set; then
2091   withval="$with_shell_module"
2092   
2093         ol_arg=invalid
2094         for ol_val in static dynamic ; do
2095                 if test "$withval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2101         fi
2102         ol_with_shell_module="$ol_arg"
2103
2104 else
2105         ol_with_shell_module="static"
2106 fi
2107 # end --with-shell_module
2108
2109 # OpenLDAP --enable-sql
2110         # Check whether --enable-sql or --disable-sql was given.
2111 if test "${enable_sql+set}" = set; then
2112   enableval="$enable_sql"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2122         fi
2123         ol_enable_sql="$ol_arg"
2124
2125 else
2126         ol_enable_sql="no"
2127 fi
2128 # end --enable-sql
2129 # OpenLDAP --with-sql_module
2130         # Check whether --with-sql_module or --without-sql_module was given.
2131 if test "${with_sql_module+set}" = set; then
2132   withval="$with_sql_module"
2133   
2134         ol_arg=invalid
2135         for ol_val in static dynamic ; do
2136                 if test "$withval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2142         fi
2143         ol_with_sql_module="$ol_arg"
2144
2145 else
2146         ol_with_sql_module="static"
2147 fi
2148 # end --with-sql_module
2149
2150 # OpenLDAP --enable-tcl
2151         # Check whether --enable-tcl or --disable-tcl was given.
2152 if test "${enable_tcl+set}" = set; then
2153   enableval="$enable_tcl"
2154   
2155         ol_arg=invalid
2156         for ol_val in auto yes no ; do
2157                 if test "$enableval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2163         fi
2164         ol_enable_tcl="$ol_arg"
2165
2166 else
2167         ol_enable_tcl="no"
2168 fi
2169 # end --enable-tcl
2170 # OpenLDAP --with-tcl_module
2171         # Check whether --with-tcl_module or --without-tcl_module was given.
2172 if test "${with_tcl_module+set}" = set; then
2173   withval="$with_tcl_module"
2174   
2175         ol_arg=invalid
2176         for ol_val in static dynamic ; do
2177                 if test "$withval" = "$ol_val" ; then
2178                         ol_arg="$ol_val"
2179                 fi
2180         done
2181         if test "$ol_arg" = "invalid" ; then
2182                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2183         fi
2184         ol_with_tcl_module="$ol_arg"
2185
2186 else
2187         ol_with_tcl_module="static"
2188 fi
2189 # end --with-tcl_module
2190
2191
2192 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2193 if test "${with_xxslurpdoptions+set}" = set; then
2194   withval="$with_xxslurpdoptions"
2195   :
2196 fi
2197
2198 # OpenLDAP --enable-slurpd
2199         # Check whether --enable-slurpd or --disable-slurpd was given.
2200 if test "${enable_slurpd+set}" = set; then
2201   enableval="$enable_slurpd"
2202   
2203         ol_arg=invalid
2204         for ol_val in auto yes no ; do
2205                 if test "$enableval" = "$ol_val" ; then
2206                         ol_arg="$ol_val"
2207                 fi
2208         done
2209         if test "$ol_arg" = "invalid" ; then
2210                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2211         fi
2212         ol_enable_slurpd="$ol_arg"
2213
2214 else
2215         ol_enable_slurpd="auto"
2216 fi
2217 # end --enable-slurpd
2218
2219 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2220 if test "${with_xxliboptions+set}" = set; then
2221   withval="$with_xxliboptions"
2222   :
2223 fi
2224
2225 # Check whether --enable-static or --disable-static was given.
2226 if test "${enable_static+set}" = set; then
2227   enableval="$enable_static"
2228   p=${PACKAGE-default}
2229 case "$enableval" in
2230 yes) enable_static=yes ;;
2231 no) enable_static=no ;;
2232 *)
2233   enable_static=no
2234   # Look at the argument we got.  We use all the common list separators.
2235   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2236   for pkg in $enableval; do
2237     if test "X$pkg" = "X$p"; then
2238       enable_static=yes
2239     fi
2240   done
2241   IFS="$ac_save_ifs"
2242   ;;
2243 esac
2244 else
2245   enable_static=yes
2246 fi
2247
2248 # Check whether --enable-shared or --disable-shared was given.
2249 if test "${enable_shared+set}" = set; then
2250   enableval="$enable_shared"
2251   p=${PACKAGE-default}
2252 case "$enableval" in
2253 yes) enable_shared=yes ;;
2254 no) enable_shared=no ;;
2255 *)
2256   enable_shared=no
2257   # Look at the argument we got.  We use all the common list separators.
2258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2259   for pkg in $enableval; do
2260     if test "X$pkg" = "X$p"; then
2261       enable_shared=yes
2262     fi
2263   done
2264   IFS="$ac_save_ifs"
2265   ;;
2266 esac
2267 else
2268   enable_shared=yes
2269 fi
2270
2271
2272
2273 # validate options
2274 if test $ol_enable_slapd = no ; then
2275                 if test $ol_enable_bdb = yes ; then
2276                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2277         fi
2278         if test $ol_enable_dnssrv = yes ; then
2279                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2280         fi
2281         if test $ol_enable_ldap = yes ; then
2282                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2283         fi
2284         if test $ol_enable_ldbm = yes ; then
2285                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2286         fi
2287         if test $ol_enable_passwd = yes ; then
2288                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2289         fi
2290         if test $ol_enable_perl = yes ; then
2291                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2292         fi
2293         if test $ol_enable_shell = yes ; then
2294                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2295         fi
2296         if test $ol_enable_tcl = yes ; then
2297                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2298         fi
2299         if test $ol_enable_sql = yes ; then
2300                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2301         fi
2302         if test $ol_enable_modules = yes ; then
2303                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2304         fi
2305         if test $ol_enable_multimaster = yes ; then
2306                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2307         fi
2308         if test $ol_enable_wrappers = yes ; then
2309                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2310         fi
2311         if test $ol_enable_phonetic = yes ; then
2312                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2313         fi
2314         if test $ol_enable_rlookups = yes ; then
2315                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2316         fi
2317         if test $ol_enable_aci = yes ; then
2318                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2319         fi
2320         if test $ol_with_ldbm_api != auto ; then
2321                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2322         fi
2323         if test $ol_with_ldbm_type != auto ; then
2324                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2325         fi
2326         if test $ol_with_bdb_module != static ; then
2327                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2328         fi
2329         if test $ol_with_dnssrv_module != static ; then
2330                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2331         fi
2332         if test $ol_with_ldap_module != static ; then
2333                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2334         fi
2335         if test $ol_with_ldbm_module != static ; then
2336                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2337         fi
2338         if test $ol_with_passwd_module != static ; then
2339                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2340         fi
2341         if test $ol_with_perl_module != static ; then
2342                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2343         fi
2344         if test $ol_with_shell_module != static ; then
2345                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2346         fi
2347         if test $ol_with_tcl_module != static ; then
2348                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2349         fi
2350         if test $ol_with_sql_module != static ; then
2351                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2352         fi
2353         if test $ol_enable_slurpd = yes ; then
2354                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2355         fi
2356
2357         # force settings to no
2358         ol_enable_bdb=no
2359         ol_enable_dnssrv=no
2360         ol_enable_ldap=no
2361         ol_enable_ldbm=no
2362         ol_enable_passwd=no
2363         ol_enable_perl=no
2364         ol_enable_shell=no
2365         ol_enable_tcl=no
2366         ol_enable_sql=no
2367
2368         ol_enable_modules=no
2369         ol_enable_multimaster=no
2370         ol_enable_phonetic=no
2371         ol_enable_rlookups=no
2372         ol_enable_aci=no
2373         ol_enable_wrappers=no
2374         ol_enable_dynamic=no
2375
2376         ol_with_ldbm_api=no
2377         ol_with_ldbm_type=no
2378
2379         ol_with_bdb_module=static
2380         ol_with_dnssrv_module=static
2381         ol_with_ldap_module=static
2382         ol_with_ldbm_module=static
2383         ol_with_passwd_module=static
2384         ol_with_perl_module=static
2385         ol_with_shell_module=static
2386         ol_with_tcl_module=static
2387         ol_with_sql_module=static
2388
2389         ol_enable_slurpd=no
2390
2391 elif test $ol_enable_ldbm = no ; then
2392         
2393         if test $ol_with_ldbm_api != auto ; then
2394                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2395         fi
2396
2397         if test $ol_with_ldbm_type != auto ; then
2398                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2399         fi
2400
2401         if test $ol_with_ldbm_module != static ; then
2402                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2403         fi
2404
2405         if test $ol_enable_modules != yes -a \
2406                 $ol_enable_bdb = no -a \
2407                 $ol_enable_dnssrv = no -a \
2408                 $ol_enable_ldap = no -a \
2409                 $ol_enable_passwd = no -a \
2410                 $ol_enable_perl = no -a \
2411                 $ol_enable_shell = no -a \
2412                 $ol_enable_sql = no -a \
2413                 $ol_enable_tcl = no ; then
2414                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2415         fi
2416
2417         ol_with_ldbm_api=no
2418         ol_with_ldbm_type=no
2419         ol_with_ldbm_module=static
2420
2421 else
2422                 if test $ol_with_ldbm_api = gdbm -a \
2423                 $ol_with_ldbm_type = btree ; then
2424                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2425         fi
2426         if test $ol_with_ldbm_api = mdbm -a \
2427                 $ol_with_ldbm_type = btree ; then
2428                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2429         fi
2430         if test $ol_with_ldbm_api = ndbm -a \
2431                 $ol_with_ldbm_type = btree ; then
2432                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2433         fi
2434 fi
2435
2436 if test $ol_enable_slurpd = yes ; then
2437                 if test $ol_with_threads = no ; then
2438                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2439         fi
2440 fi
2441
2442 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2443         if test $ol_with_kerberos = no ; then
2444                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2445         fi
2446         ol_with_kerberos=yes
2447 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2448         if test $ol_with_kerberos != no -a $ol_with_kerberos != auto ; then
2449                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2450         fi
2451         ol_with_kerberos=no
2452 fi
2453
2454 if test $ol_enable_spasswd = yes ; then
2455         if test $ol_with_cyrus_sasl = no ; then
2456                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2457         fi
2458         ol_with_cyrus_sasl=yes
2459 fi
2460
2461 echo "$ac_t""done" 1>&6
2462
2463 LDAP_LIBS=
2464 LDIF_LIBS=
2465 LDBM_LIBS=
2466 LTHREAD_LIBS=
2467 LUTIL_LIBS=
2468
2469 SLAPD_LIBS=
2470 SLURPD_LIBS=
2471
2472 BUILD_SLAPD=no
2473 BUILD_SLURPD=no
2474
2475 BUILD_THREAD=no
2476
2477 BUILD_BDB=no
2478 BUILD_DNSSRV=no
2479 BUILD_LDAP=no
2480 BUILD_LDBM=no
2481 BUILD_PASSWD=no
2482 BUILD_PERL=no
2483 BUILD_SHELL=no
2484 BUILD_SQL=no
2485 BUILD_TCL=no
2486
2487 BUILD_BDB_DYNAMIC=static
2488 BUILD_DNSSRV_DYNAMIC=static
2489 BUILD_LDAP_DYNAMIC=static
2490 BUILD_LDBM_DYNAMIC=static
2491 BUILD_PASSWD_DYNAMIC=static
2492 BUILD_PERL_DYNAMIC=static
2493 BUILD_SHELL_DYNAMIC=static
2494 BUILD_TCL_DYNAMIC=static
2495 BUILD_SQL_DYNAMIC=static
2496
2497 SLAPD_MODULES_LDFLAGS=
2498 SLAPD_MODULES_CPPFLAGS=
2499 SLAPD_MODULES_LIST=
2500
2501 SLAPD_PERL_LDFLAGS=
2502 MOD_PERL_LDFLAGS=
2503 PERL_CPPFLAGS=
2504
2505 SLAPD_SQL_LDFLAGS=
2506 SLAPD_SQL_LIBS=
2507 SLAPD_SQL_INCLUDES=
2508
2509 MOD_TCL_LIB=
2510 KRB4_LIBS=
2511 KRB5_LIBS=
2512 READLINE_LIBS=
2513 SASL_LIBS=
2514 TERMCAP_LIBS=
2515 TLS_LIBS=
2516 MODULES_LIBS=
2517 AUTH_LIBS=
2518
2519
2520
2521 cat >> confdefs.h <<\EOF
2522 #define HAVE_MKVERSION 1
2523 EOF
2524
2525
2526
2527
2528 ol_aix_threads=no
2529 case "$target" in
2530 *-*-aix*)       if test -z "$CC" ; then
2531                 case "$ol_with_threads" in
2532                 auto | yes |  posix) ol_aix_threads=yes ;;
2533                 esac
2534         fi
2535 ;;
2536 esac
2537
2538 if test $ol_aix_threads = yes ; then
2539         if test -z "${CC}" ; then
2540                 for ac_prog in cc_r xlc_r cc
2541 do
2542 # Extract the first word of "$ac_prog", so it can be a program name with args.
2543 set dummy $ac_prog; ac_word=$2
2544 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2545 echo "configure:2546: checking for $ac_word" >&5
2546 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2547   echo $ac_n "(cached) $ac_c" 1>&6
2548 else
2549   if test -n "$CC"; then
2550   ac_cv_prog_CC="$CC" # Let the user override the test.
2551 else
2552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2553   ac_dummy="$PATH"
2554   for ac_dir in $ac_dummy; do
2555     test -z "$ac_dir" && ac_dir=.
2556     if test -f $ac_dir/$ac_word; then
2557       ac_cv_prog_CC="$ac_prog"
2558       break
2559     fi
2560   done
2561   IFS="$ac_save_ifs"
2562 fi
2563 fi
2564 CC="$ac_cv_prog_CC"
2565 if test -n "$CC"; then
2566   echo "$ac_t""$CC" 1>&6
2567 else
2568   echo "$ac_t""no" 1>&6
2569 fi
2570
2571 test -n "$CC" && break
2572 done
2573
2574
2575                 if test "$CC" = cc ; then
2576                                                 if test $ol_with_threads != auto ; then
2577                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2578                         else
2579                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2580                         fi
2581                         ol_with_threads=no
2582                 fi
2583         fi
2584
2585         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2586                 ol_with_threads=posix
2587                 ol_cv_pthread_create=yes
2588         fi
2589 fi
2590
2591 if test -z "${CC}"; then
2592         for ac_prog in cc
2593 do
2594 # Extract the first word of "$ac_prog", so it can be a program name with args.
2595 set dummy $ac_prog; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test -n "$CC"; then
2602   ac_cv_prog_CC="$CC" # Let the user override the test.
2603 else
2604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2605   ac_dummy="$PATH"
2606   for ac_dir in $ac_dummy; do
2607     test -z "$ac_dir" && ac_dir=.
2608     if test -f $ac_dir/$ac_word; then
2609       ac_cv_prog_CC="$ac_prog"
2610       break
2611     fi
2612   done
2613   IFS="$ac_save_ifs"
2614 fi
2615 fi
2616 CC="$ac_cv_prog_CC"
2617 if test -n "$CC"; then
2618   echo "$ac_t""$CC" 1>&6
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622
2623 test -n "$CC" && break
2624 done
2625
2626 fi
2627
2628
2629
2630
2631 # Check whether --enable-fast-install or --disable-fast-install was given.
2632 if test "${enable_fast_install+set}" = set; then
2633   enableval="$enable_fast_install"
2634   p=${PACKAGE-default}
2635 case "$enableval" in
2636 yes) enable_fast_install=yes ;;
2637 no) enable_fast_install=no ;;
2638 *)
2639   enable_fast_install=no
2640   # Look at the argument we got.  We use all the common list separators.
2641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2642   for pkg in $enableval; do
2643     if test "X$pkg" = "X$p"; then
2644       enable_fast_install=yes
2645     fi
2646   done
2647   IFS="$ac_save_ifs"
2648   ;;
2649 esac
2650 else
2651   enable_fast_install=yes
2652 fi
2653
2654 # Extract the first word of "ranlib", so it can be a program name with args.
2655 set dummy ranlib; ac_word=$2
2656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2657 echo "configure:2658: checking for $ac_word" >&5
2658 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   if test -n "$RANLIB"; then
2662   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2663 else
2664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2665   ac_dummy="$PATH"
2666   for ac_dir in $ac_dummy; do
2667     test -z "$ac_dir" && ac_dir=.
2668     if test -f $ac_dir/$ac_word; then
2669       ac_cv_prog_RANLIB="ranlib"
2670       break
2671     fi
2672   done
2673   IFS="$ac_save_ifs"
2674   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2675 fi
2676 fi
2677 RANLIB="$ac_cv_prog_RANLIB"
2678 if test -n "$RANLIB"; then
2679   echo "$ac_t""$RANLIB" 1>&6
2680 else
2681   echo "$ac_t""no" 1>&6
2682 fi
2683
2684 # Extract the first word of "gcc", so it can be a program name with args.
2685 set dummy gcc; ac_word=$2
2686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2687 echo "configure:2688: checking for $ac_word" >&5
2688 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2689   echo $ac_n "(cached) $ac_c" 1>&6
2690 else
2691   if test -n "$CC"; then
2692   ac_cv_prog_CC="$CC" # Let the user override the test.
2693 else
2694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2695   ac_dummy="$PATH"
2696   for ac_dir in $ac_dummy; do
2697     test -z "$ac_dir" && ac_dir=.
2698     if test -f $ac_dir/$ac_word; then
2699       ac_cv_prog_CC="gcc"
2700       break
2701     fi
2702   done
2703   IFS="$ac_save_ifs"
2704 fi
2705 fi
2706 CC="$ac_cv_prog_CC"
2707 if test -n "$CC"; then
2708   echo "$ac_t""$CC" 1>&6
2709 else
2710   echo "$ac_t""no" 1>&6
2711 fi
2712
2713 if test -z "$CC"; then
2714   # Extract the first word of "cc", so it can be a program name with args.
2715 set dummy cc; ac_word=$2
2716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2717 echo "configure:2718: checking for $ac_word" >&5
2718 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2719   echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721   if test -n "$CC"; then
2722   ac_cv_prog_CC="$CC" # Let the user override the test.
2723 else
2724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2725   ac_prog_rejected=no
2726   ac_dummy="$PATH"
2727   for ac_dir in $ac_dummy; do
2728     test -z "$ac_dir" && ac_dir=.
2729     if test -f $ac_dir/$ac_word; then
2730       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2731         ac_prog_rejected=yes
2732         continue
2733       fi
2734       ac_cv_prog_CC="cc"
2735       break
2736     fi
2737   done
2738   IFS="$ac_save_ifs"
2739 if test $ac_prog_rejected = yes; then
2740   # We found a bogon in the path, so make sure we never use it.
2741   set dummy $ac_cv_prog_CC
2742   shift
2743   if test $# -gt 0; then
2744     # We chose a different compiler from the bogus one.
2745     # However, it has the same basename, so the bogon will be chosen
2746     # first if we set CC to just the basename; use the full file name.
2747     shift
2748     set dummy "$ac_dir/$ac_word" "$@"
2749     shift
2750     ac_cv_prog_CC="$@"
2751   fi
2752 fi
2753 fi
2754 fi
2755 CC="$ac_cv_prog_CC"
2756 if test -n "$CC"; then
2757   echo "$ac_t""$CC" 1>&6
2758 else
2759   echo "$ac_t""no" 1>&6
2760 fi
2761
2762   if test -z "$CC"; then
2763     case "`uname -s`" in
2764     *win32* | *WIN32* | *CYGWIN*)
2765       # Extract the first word of "cl", so it can be a program name with args.
2766 set dummy cl; ac_word=$2
2767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2768 echo "configure:2769: checking for $ac_word" >&5
2769 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   if test -n "$CC"; then
2773   ac_cv_prog_CC="$CC" # Let the user override the test.
2774 else
2775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2776   ac_dummy="$PATH"
2777   for ac_dir in $ac_dummy; do
2778     test -z "$ac_dir" && ac_dir=.
2779     if test -f $ac_dir/$ac_word; then
2780       ac_cv_prog_CC="cl"
2781       break
2782     fi
2783   done
2784   IFS="$ac_save_ifs"
2785 fi
2786 fi
2787 CC="$ac_cv_prog_CC"
2788 if test -n "$CC"; then
2789   echo "$ac_t""$CC" 1>&6
2790 else
2791   echo "$ac_t""no" 1>&6
2792 fi
2793  ;;
2794     esac
2795   fi
2796   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2797 fi
2798
2799 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2800 echo "configure:2801: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2801
2802 ac_ext=c
2803 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2806 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2807 cross_compiling=$ac_cv_prog_cc_cross
2808
2809 cat > conftest.$ac_ext << EOF
2810
2811 #line 2812 "configure"
2812 #include "confdefs.h"
2813
2814 main(){return(0);}
2815 EOF
2816 if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2817   ac_cv_prog_cc_works=yes
2818   # If we can't run a trivial program, we are probably using a cross compiler.
2819   if (./conftest; exit) 2>/dev/null; then
2820     ac_cv_prog_cc_cross=no
2821   else
2822     ac_cv_prog_cc_cross=yes
2823   fi
2824 else
2825   echo "configure: failed program was:" >&5
2826   cat conftest.$ac_ext >&5
2827   ac_cv_prog_cc_works=no
2828 fi
2829 rm -fr conftest*
2830 ac_ext=c
2831 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2832 ac_cpp='$CPP $CPPFLAGS'
2833 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2834 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2835 cross_compiling=$ac_cv_prog_cc_cross
2836
2837 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2838 if test $ac_cv_prog_cc_works = no; then
2839   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2840 fi
2841 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2842 echo "configure:2843: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2843 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2844 cross_compiling=$ac_cv_prog_cc_cross
2845
2846 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2847 echo "configure:2848: checking whether we are using GNU C" >&5
2848 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   cat > conftest.c <<EOF
2852 #ifdef __GNUC__
2853   yes;
2854 #endif
2855 EOF
2856 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2857   ac_cv_prog_gcc=yes
2858 else
2859   ac_cv_prog_gcc=no
2860 fi
2861 fi
2862
2863 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2864
2865 if test $ac_cv_prog_gcc = yes; then
2866   GCC=yes
2867 else
2868   GCC=
2869 fi
2870
2871 ac_test_CFLAGS="${CFLAGS+set}"
2872 ac_save_CFLAGS="$CFLAGS"
2873 CFLAGS=
2874 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2875 echo "configure:2876: checking whether ${CC-cc} accepts -g" >&5
2876 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   echo 'void f(){}' > conftest.c
2880 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2881   ac_cv_prog_cc_g=yes
2882 else
2883   ac_cv_prog_cc_g=no
2884 fi
2885 rm -f conftest*
2886
2887 fi
2888
2889 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2890 if test "$ac_test_CFLAGS" = set; then
2891   CFLAGS="$ac_save_CFLAGS"
2892 elif test $ac_cv_prog_cc_g = yes; then
2893   if test "$GCC" = yes; then
2894     CFLAGS="-g -O2"
2895   else
2896     CFLAGS="-g"
2897   fi
2898 else
2899   if test "$GCC" = yes; then
2900     CFLAGS="-O2"
2901   else
2902     CFLAGS=
2903   fi
2904 fi
2905
2906 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2907 if test "${with_gnu_ld+set}" = set; then
2908   withval="$with_gnu_ld"
2909   test "$withval" = no || with_gnu_ld=yes
2910 else
2911   with_gnu_ld=no
2912 fi
2913
2914 ac_prog=ld
2915 if test "$ac_cv_prog_gcc" = yes; then
2916   # Check if gcc -print-prog-name=ld gives a path.
2917   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2918 echo "configure:2919: checking for ld used by GCC" >&5
2919   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2920   case "$ac_prog" in
2921     # Accept absolute paths.
2922     [\\/]* | [A-Za-z]:[\\/]*)
2923       re_direlt='/[^/][^/]*/\.\./'
2924       # Canonicalize the path of ld
2925       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2926       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2927         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2928       done
2929       test -z "$LD" && LD="$ac_prog"
2930       ;;
2931   "")
2932     # If it fails, then pretend we aren't using GCC.
2933     ac_prog=ld
2934     ;;
2935   *)
2936     # If it is relative, then search for the first ld in PATH.
2937     with_gnu_ld=unknown
2938     ;;
2939   esac
2940 elif test "$with_gnu_ld" = yes; then
2941   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2942 echo "configure:2943: checking for GNU ld" >&5
2943 else
2944   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2945 echo "configure:2946: checking for non-GNU ld" >&5
2946 fi
2947 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2948   echo $ac_n "(cached) $ac_c" 1>&6
2949 else
2950   if test -z "$LD"; then
2951   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2952   for ac_dir in $PATH; do
2953     test -z "$ac_dir" && ac_dir=.
2954     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2955       ac_cv_path_LD="$ac_dir/$ac_prog"
2956       # Check to see if the program is GNU ld.  I'd rather use --version,
2957       # but apparently some GNU ld's only accept -v.
2958       # Break only if it was the GNU/non-GNU ld that we prefer.
2959       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2960         test "$with_gnu_ld" != no && break
2961       else
2962         test "$with_gnu_ld" != yes && break
2963       fi
2964     fi
2965   done
2966   IFS="$ac_save_ifs"
2967 else
2968   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2969 fi
2970 fi
2971
2972 LD="$ac_cv_path_LD"
2973 if test -n "$LD"; then
2974   echo "$ac_t""$LD" 1>&6
2975 else
2976   echo "$ac_t""no" 1>&6
2977 fi
2978 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2979 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2980 echo "configure:2981: checking if the linker ($LD) is GNU ld" >&5
2981 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2985 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2986   ac_cv_prog_gnu_ld=yes
2987 else
2988   ac_cv_prog_gnu_ld=no
2989 fi
2990 fi
2991
2992 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2993
2994
2995 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2996 echo "configure:2997: checking for BSD-compatible nm" >&5
2997 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   if test -n "$NM"; then
3001   # Let the user override the test.
3002   ac_cv_path_NM="$NM"
3003 else
3004   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3005   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3008       # Check to see if the nm accepts a BSD-compat flag.
3009       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3010       #   nm: unknown option "B" ignored
3011       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3012         ac_cv_path_NM="$ac_dir/nm -B"
3013         break
3014       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3015         ac_cv_path_NM="$ac_dir/nm -p"
3016         break
3017       else
3018         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3019         continue # so that we can try to find one that supports BSD flags
3020       fi
3021     fi
3022   done
3023   IFS="$ac_save_ifs"
3024   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3025 fi
3026 fi
3027
3028 NM="$ac_cv_path_NM"
3029 echo "$ac_t""$NM" 1>&6
3030
3031 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3032 echo "configure:3033: checking whether ln -s works" >&5
3033 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   rm -f conftestdata
3037 if ln -s X conftestdata 2>/dev/null
3038 then
3039   rm -f conftestdata
3040   ac_cv_prog_LN_S="ln -s"
3041 else
3042   ac_cv_prog_LN_S=ln
3043 fi
3044 fi
3045 LN_S="$ac_cv_prog_LN_S"
3046 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3047   echo "$ac_t""yes" 1>&6
3048 else
3049   echo "$ac_t""no" 1>&6
3050 fi
3051
3052 if test $host != $build; then
3053   ac_tool_prefix=${host_alias}-
3054 else
3055   ac_tool_prefix=
3056 fi
3057
3058
3059 case "$target" in
3060 NONE) lt_target="$host" ;;
3061 *) lt_target="$target" ;;
3062 esac
3063
3064 # Check for any special flags to pass to ltconfig.
3065 libtool_flags="--cache-file=$cache_file"
3066 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3067 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3068 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3069 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3070 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3071 libtool_flags="$libtool_flags --enable-dlopen"
3072 libtool_flags="$libtool_flags --enable-win32-dll"
3073 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3074 if test "${enable_libtool_lock+set}" = set; then
3075   enableval="$enable_libtool_lock"
3076   :
3077 fi
3078
3079 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3080 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3081
3082 # Some flags need to be propagated to the compiler or linker for good
3083 # libtool support.
3084 case "$lt_target" in
3085 *-*-irix6*)
3086   # Find out which ABI we are using.
3087   echo '#line 3088 "configure"' > conftest.$ac_ext
3088   if { (eval echo configure:3089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3089     case "`/usr/bin/file conftest.o`" in
3090     *32-bit*)
3091       LD="${LD-ld} -32"
3092       ;;
3093     *N32*)
3094       LD="${LD-ld} -n32"
3095       ;;
3096     *64-bit*)
3097       LD="${LD-ld} -64"
3098       ;;
3099     esac
3100   fi
3101   rm -rf conftest*
3102   ;;
3103
3104 *-*-sco3.2v5*)
3105   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3106   SAVE_CFLAGS="$CFLAGS"
3107   CFLAGS="$CFLAGS -belf"
3108   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3109 echo "configure:3110: checking whether the C compiler needs -belf" >&5
3110 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   cat > conftest.$ac_ext <<EOF
3114 #line 3115 "configure"
3115 #include "confdefs.h"
3116
3117 int main() {
3118
3119 ; return 0; }
3120 EOF
3121 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122   rm -rf conftest*
3123   lt_cv_cc_needs_belf=yes
3124 else
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127   rm -rf conftest*
3128   lt_cv_cc_needs_belf=no
3129 fi
3130 rm -f conftest*
3131 fi
3132
3133 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3134   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3135     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3136     CFLAGS="$SAVE_CFLAGS"
3137   fi
3138   ;;
3139
3140 *-*-cygwin* | *-*-mingw*)
3141   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3142 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3144 echo "configure:3145: checking for $ac_word" >&5
3145 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   if test -n "$DLLTOOL"; then
3149   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3150 else
3151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3152   ac_dummy="$PATH"
3153   for ac_dir in $ac_dummy; do
3154     test -z "$ac_dir" && ac_dir=.
3155     if test -f $ac_dir/$ac_word; then
3156       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3157       break
3158     fi
3159   done
3160   IFS="$ac_save_ifs"
3161 fi
3162 fi
3163 DLLTOOL="$ac_cv_prog_DLLTOOL"
3164 if test -n "$DLLTOOL"; then
3165   echo "$ac_t""$DLLTOOL" 1>&6
3166 else
3167   echo "$ac_t""no" 1>&6
3168 fi
3169
3170
3171 if test -z "$ac_cv_prog_DLLTOOL"; then
3172 if test -n "$ac_tool_prefix"; then
3173   # Extract the first word of "dlltool", so it can be a program name with args.
3174 set dummy dlltool; ac_word=$2
3175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $ac_word" >&5
3177 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   if test -n "$DLLTOOL"; then
3181   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3182 else
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3184   ac_dummy="$PATH"
3185   for ac_dir in $ac_dummy; do
3186     test -z "$ac_dir" && ac_dir=.
3187     if test -f $ac_dir/$ac_word; then
3188       ac_cv_prog_DLLTOOL="dlltool"
3189       break
3190     fi
3191   done
3192   IFS="$ac_save_ifs"
3193   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3194 fi
3195 fi
3196 DLLTOOL="$ac_cv_prog_DLLTOOL"
3197 if test -n "$DLLTOOL"; then
3198   echo "$ac_t""$DLLTOOL" 1>&6
3199 else
3200   echo "$ac_t""no" 1>&6
3201 fi
3202
3203 else
3204   DLLTOOL="false"
3205 fi
3206 fi
3207
3208   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3209 set dummy ${ac_tool_prefix}as; ac_word=$2
3210 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3211 echo "configure:3212: checking for $ac_word" >&5
3212 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3213   echo $ac_n "(cached) $ac_c" 1>&6
3214 else
3215   if test -n "$AS"; then
3216   ac_cv_prog_AS="$AS" # Let the user override the test.
3217 else
3218   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3219   ac_dummy="$PATH"
3220   for ac_dir in $ac_dummy; do
3221     test -z "$ac_dir" && ac_dir=.
3222     if test -f $ac_dir/$ac_word; then
3223       ac_cv_prog_AS="${ac_tool_prefix}as"
3224       break
3225     fi
3226   done
3227   IFS="$ac_save_ifs"
3228 fi
3229 fi
3230 AS="$ac_cv_prog_AS"
3231 if test -n "$AS"; then
3232   echo "$ac_t""$AS" 1>&6
3233 else
3234   echo "$ac_t""no" 1>&6
3235 fi
3236
3237
3238 if test -z "$ac_cv_prog_AS"; then
3239 if test -n "$ac_tool_prefix"; then
3240   # Extract the first word of "as", so it can be a program name with args.
3241 set dummy as; ac_word=$2
3242 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3243 echo "configure:3244: checking for $ac_word" >&5
3244 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   if test -n "$AS"; then
3248   ac_cv_prog_AS="$AS" # Let the user override the test.
3249 else
3250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3251   ac_dummy="$PATH"
3252   for ac_dir in $ac_dummy; do
3253     test -z "$ac_dir" && ac_dir=.
3254     if test -f $ac_dir/$ac_word; then
3255       ac_cv_prog_AS="as"
3256       break
3257     fi
3258   done
3259   IFS="$ac_save_ifs"
3260   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3261 fi
3262 fi
3263 AS="$ac_cv_prog_AS"
3264 if test -n "$AS"; then
3265   echo "$ac_t""$AS" 1>&6
3266 else
3267   echo "$ac_t""no" 1>&6
3268 fi
3269
3270 else
3271   AS="false"
3272 fi
3273 fi
3274
3275   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3276 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3277 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3278 echo "configure:3279: checking for $ac_word" >&5
3279 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3280   echo $ac_n "(cached) $ac_c" 1>&6
3281 else
3282   if test -n "$OBJDUMP"; then
3283   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3284 else
3285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3286   ac_dummy="$PATH"
3287   for ac_dir in $ac_dummy; do
3288     test -z "$ac_dir" && ac_dir=.
3289     if test -f $ac_dir/$ac_word; then
3290       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3291       break
3292     fi
3293   done
3294   IFS="$ac_save_ifs"
3295 fi
3296 fi
3297 OBJDUMP="$ac_cv_prog_OBJDUMP"
3298 if test -n "$OBJDUMP"; then
3299   echo "$ac_t""$OBJDUMP" 1>&6
3300 else
3301   echo "$ac_t""no" 1>&6
3302 fi
3303
3304
3305 if test -z "$ac_cv_prog_OBJDUMP"; then
3306 if test -n "$ac_tool_prefix"; then
3307   # Extract the first word of "objdump", so it can be a program name with args.
3308 set dummy objdump; ac_word=$2
3309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3310 echo "configure:3311: checking for $ac_word" >&5
3311 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3312   echo $ac_n "(cached) $ac_c" 1>&6
3313 else
3314   if test -n "$OBJDUMP"; then
3315   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3316 else
3317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3318   ac_dummy="$PATH"
3319   for ac_dir in $ac_dummy; do
3320     test -z "$ac_dir" && ac_dir=.
3321     if test -f $ac_dir/$ac_word; then
3322       ac_cv_prog_OBJDUMP="objdump"
3323       break
3324     fi
3325   done
3326   IFS="$ac_save_ifs"
3327   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3328 fi
3329 fi
3330 OBJDUMP="$ac_cv_prog_OBJDUMP"
3331 if test -n "$OBJDUMP"; then
3332   echo "$ac_t""$OBJDUMP" 1>&6
3333 else
3334   echo "$ac_t""no" 1>&6
3335 fi
3336
3337 else
3338   OBJDUMP="false"
3339 fi
3340 fi
3341
3342   ;;
3343
3344 esac
3345
3346
3347 # Save cache, so that ltconfig can load it
3348
3349
3350 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3351 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3352 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3353 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3354 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3355 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3356 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3357 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3358
3359 # Reload cache, that may have been modified by ltconfig
3360
3361
3362 # This can be used to rebuild libtool when needed
3363 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3364
3365 # Always use our own libtool.
3366 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3367
3368 # Redirect the config.log output again, so that the ltconfig log is not
3369 # clobbered by the next message.
3370 exec 5>>./config.log
3371
3372
3373 for ac_prog in mawk gawk nawk awk
3374 do
3375 # Extract the first word of "$ac_prog", so it can be a program name with args.
3376 set dummy $ac_prog; ac_word=$2
3377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3378 echo "configure:3379: checking for $ac_word" >&5
3379 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   if test -n "$AWK"; then
3383   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3384 else
3385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3386   ac_dummy="$PATH"
3387   for ac_dir in $ac_dummy; do
3388     test -z "$ac_dir" && ac_dir=.
3389     if test -f $ac_dir/$ac_word; then
3390       ac_cv_prog_AWK="$ac_prog"
3391       break
3392     fi
3393   done
3394   IFS="$ac_save_ifs"
3395 fi
3396 fi
3397 AWK="$ac_cv_prog_AWK"
3398 if test -n "$AWK"; then
3399   echo "$ac_t""$AWK" 1>&6
3400 else
3401   echo "$ac_t""no" 1>&6
3402 fi
3403
3404 test -n "$AWK" && break
3405 done
3406
3407 # test for ln hardlink support
3408 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3409 echo "configure:3410: checking whether ln works" >&5
3410 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   rm -f conftest.src conftest.dst
3414 echo "conftest" > conftest.src
3415 if ln conftest.src conftest.dst 2>/dev/null
3416 then
3417   ol_cv_prog_LN_H="ln"
3418 else
3419   ol_cv_prog_LN_H="cp"
3420 fi
3421 rm -f conftest.src conftest.dst
3422
3423 fi
3424 LN_H="$ol_cv_prog_LN_H"
3425 if test "$ol_cv_prog_LN_H" = "ln"; then
3426         echo "$ac_t""yes" 1>&6
3427 else
3428         echo "$ac_t""no" 1>&6
3429 fi
3430
3431 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3432 echo "configure:3433: checking whether ln -s works" >&5
3433 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   rm -f conftestdata
3437 if ln -s X conftestdata 2>/dev/null
3438 then
3439   rm -f conftestdata
3440   ac_cv_prog_LN_S="ln -s"
3441 else
3442   ac_cv_prog_LN_S=ln
3443 fi
3444 fi
3445 LN_S="$ac_cv_prog_LN_S"
3446 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3447   echo "$ac_t""yes" 1>&6
3448 else
3449   echo "$ac_t""no" 1>&6
3450 fi
3451
3452
3453 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3454         LN_S="$LN_H"
3455 fi
3456
3457 # Extract the first word of "sendmail", so it can be a program name with args.
3458 set dummy sendmail; ac_word=$2
3459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $ac_word" >&5
3461 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   case "$SENDMAIL" in
3465   /*)
3466   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3467   ;;
3468   ?:/*)
3469   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3470   ;;
3471   *)
3472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3473   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3474   for ac_dir in $ac_dummy; do 
3475     test -z "$ac_dir" && ac_dir=.
3476     if test -f $ac_dir/$ac_word; then
3477       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3478       break
3479     fi
3480   done
3481   IFS="$ac_save_ifs"
3482   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3483   ;;
3484 esac
3485 fi
3486 SENDMAIL="$ac_cv_path_SENDMAIL"
3487 if test -n "$SENDMAIL"; then
3488   echo "$ac_t""$SENDMAIL" 1>&6
3489 else
3490   echo "$ac_t""no" 1>&6
3491 fi
3492
3493 # Extract the first word of "vi", so it can be a program name with args.
3494 set dummy vi; ac_word=$2
3495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3496 echo "configure:3497: checking for $ac_word" >&5
3497 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   case "$EDITOR" in
3501   /*)
3502   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3503   ;;
3504   ?:/*)
3505   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3506   ;;
3507   *)
3508   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3509   ac_dummy="$PATH:/usr/ucb"
3510   for ac_dir in $ac_dummy; do 
3511     test -z "$ac_dir" && ac_dir=.
3512     if test -f $ac_dir/$ac_word; then
3513       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3514       break
3515     fi
3516   done
3517   IFS="$ac_save_ifs"
3518   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3519   ;;
3520 esac
3521 fi
3522 EDITOR="$ac_cv_path_EDITOR"
3523 if test -n "$EDITOR"; then
3524   echo "$ac_t""$EDITOR" 1>&6
3525 else
3526   echo "$ac_t""no" 1>&6
3527 fi
3528
3529 # Extract the first word of "finger", so it can be a program name with args.
3530 set dummy finger; ac_word=$2
3531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3532 echo "configure:3533: checking for $ac_word" >&5
3533 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   case "$FINGER" in
3537   /*)
3538   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3539   ;;
3540   ?:/*)
3541   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3542   ;;
3543   *)
3544   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3545   ac_dummy="$PATH:/usr/ucb"
3546   for ac_dir in $ac_dummy; do 
3547     test -z "$ac_dir" && ac_dir=.
3548     if test -f $ac_dir/$ac_word; then
3549       ac_cv_path_FINGER="$ac_dir/$ac_word"
3550       break
3551     fi
3552   done
3553   IFS="$ac_save_ifs"
3554   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3555   ;;
3556 esac
3557 fi
3558 FINGER="$ac_cv_path_FINGER"
3559 if test -n "$FINGER"; then
3560   echo "$ac_t""$FINGER" 1>&6
3561 else
3562   echo "$ac_t""no" 1>&6
3563 fi
3564
3565
3566 ol_link_perl=no
3567 if test $ol_enable_perl != no ; then
3568         # Extract the first word of "perl", so it can be a program name with args.
3569 set dummy perl; ac_word=$2
3570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3571 echo "configure:3572: checking for $ac_word" >&5
3572 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   case "$PERLBIN" in
3576   /*)
3577   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3578   ;;
3579   ?:/*)
3580   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3581   ;;
3582   *)
3583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3584   ac_dummy="$PATH"
3585   for ac_dir in $ac_dummy; do 
3586     test -z "$ac_dir" && ac_dir=.
3587     if test -f $ac_dir/$ac_word; then
3588       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3589       break
3590     fi
3591   done
3592   IFS="$ac_save_ifs"
3593   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3594   ;;
3595 esac
3596 fi
3597 PERLBIN="$ac_cv_path_PERLBIN"
3598 if test -n "$PERLBIN"; then
3599   echo "$ac_t""$PERLBIN" 1>&6
3600 else
3601   echo "$ac_t""no" 1>&6
3602 fi
3603
3604
3605         if test "no$PERLBIN" = "no" ; then
3606                 if test $ol_enable_perl = yes ; then
3607                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3608                 fi
3609
3610         else
3611                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3612                 if test x"$ol_with_perl_module" = "xstatic" ; then
3613                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3614                 else
3615                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3616                 fi
3617                                 ol_link_perl=yes
3618         fi
3619 fi
3620
3621 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3622 echo "configure:3623: checking how to run the C preprocessor" >&5
3623 # On Suns, sometimes $CPP names a directory.
3624 if test -n "$CPP" && test -d "$CPP"; then
3625   CPP=
3626 fi
3627 if test -z "$CPP"; then
3628 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3629   echo $ac_n "(cached) $ac_c" 1>&6
3630 else
3631     # This must be in double quotes, not single quotes, because CPP may get
3632   # substituted into the Makefile and "${CC-cc}" will confuse make.
3633   CPP="${CC-cc} -E"
3634   # On the NeXT, cc -E runs the code through the compiler's parser,
3635   # not just through cpp.
3636   cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #include <assert.h>
3640 Syntax Error
3641 EOF
3642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3643 { (eval echo configure:3644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3645 if test -z "$ac_err"; then
3646   :
3647 else
3648   echo "$ac_err" >&5
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -rf conftest*
3652   CPP="${CC-cc} -E -traditional-cpp"
3653   cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <assert.h>
3657 Syntax Error
3658 EOF
3659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3660 { (eval echo configure:3661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3662 if test -z "$ac_err"; then
3663   :
3664 else
3665   echo "$ac_err" >&5
3666   echo "configure: failed program was:" >&5
3667   cat conftest.$ac_ext >&5
3668   rm -rf conftest*
3669   CPP="${CC-cc} -nologo -E"
3670   cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 #include <assert.h>
3674 Syntax Error
3675 EOF
3676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3677 { (eval echo configure:3678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3679 if test -z "$ac_err"; then
3680   :
3681 else
3682   echo "$ac_err" >&5
3683   echo "configure: failed program was:" >&5
3684   cat conftest.$ac_ext >&5
3685   rm -rf conftest*
3686   CPP=/lib/cpp
3687 fi
3688 rm -f conftest*
3689 fi
3690 rm -f conftest*
3691 fi
3692 rm -f conftest*
3693   ac_cv_prog_CPP="$CPP"
3694 fi
3695   CPP="$ac_cv_prog_CPP"
3696 else
3697   ac_cv_prog_CPP="$CPP"
3698 fi
3699 echo "$ac_t""$CPP" 1>&6
3700
3701
3702 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3703         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3704
3705 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3706         echo "configure: warning: programs compiled here do run here..." 1>&2
3707         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3708
3709 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3710         echo "configure: warning: programs compiled here do not run here..." 1>&2
3711         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3712 fi
3713
3714 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3715 echo "configure:3716: checking for AIX" >&5
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 #ifdef _AIX
3720   yes
3721 #endif
3722
3723 EOF
3724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3725   egrep "yes" >/dev/null 2>&1; then
3726   rm -rf conftest*
3727   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3728 #define _ALL_SOURCE 1
3729 EOF
3730
3731 else
3732   rm -rf conftest*
3733   echo "$ac_t""no" 1>&6
3734 fi
3735 rm -f conftest*
3736
3737
3738 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3739 echo "configure:3740: checking for POSIXized ISC" >&5
3740 if test -d /etc/conf/kconfig.d &&
3741   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3742 then
3743   echo "$ac_t""yes" 1>&6
3744   ISC=yes # If later tests want to check for ISC.
3745   cat >> confdefs.h <<\EOF
3746 #define _POSIX_SOURCE 1
3747 EOF
3748
3749   if test "$GCC" = yes; then
3750     CC="$CC -posix"
3751   else
3752     CC="$CC -Xp"
3753   fi
3754 else
3755   echo "$ac_t""no" 1>&6
3756   ISC=
3757 fi
3758
3759 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3760 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3761 echo "configure:3762: checking for minix/config.h" >&5
3762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3763   echo $ac_n "(cached) $ac_c" 1>&6
3764 else
3765   cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768 #include <minix/config.h>
3769 EOF
3770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3771 { (eval echo configure:3772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3773 if test -z "$ac_err"; then
3774   rm -rf conftest*
3775   eval "ac_cv_header_$ac_safe=yes"
3776 else
3777   echo "$ac_err" >&5
3778   echo "configure: failed program was:" >&5
3779   cat conftest.$ac_ext >&5
3780   rm -rf conftest*
3781   eval "ac_cv_header_$ac_safe=no"
3782 fi
3783 rm -f conftest*
3784 fi
3785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3786   echo "$ac_t""yes" 1>&6
3787   MINIX=yes
3788 else
3789   echo "$ac_t""no" 1>&6
3790 MINIX=
3791 fi
3792
3793 if test "$MINIX" = yes; then
3794   cat >> confdefs.h <<\EOF
3795 #define _POSIX_SOURCE 1
3796 EOF
3797
3798   cat >> confdefs.h <<\EOF
3799 #define _POSIX_1_SOURCE 2
3800 EOF
3801
3802   cat >> confdefs.h <<\EOF
3803 #define _MINIX 1
3804 EOF
3805
3806 fi
3807
3808
3809 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3810 echo "configure:3811: checking for Cygwin environment" >&5
3811 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817
3818 int main() {
3819
3820 #ifndef __CYGWIN__
3821 #define __CYGWIN__ __CYGWIN32__
3822 #endif
3823 return __CYGWIN__;
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3827   rm -rf conftest*
3828   ac_cv_cygwin=yes
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   ac_cv_cygwin=no
3834 fi
3835 rm -f conftest*
3836 fi
3837
3838 echo "$ac_t""$ac_cv_cygwin" 1>&6
3839 CYGWIN=
3840 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3841 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3842 echo "configure:3843: checking for mingw32 environment" >&5
3843 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3844   echo $ac_n "(cached) $ac_c" 1>&6
3845 else
3846   cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849
3850 int main() {
3851 return __MINGW32__;
3852 ; return 0; }
3853 EOF
3854 if { (eval echo configure:3855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3855   rm -rf conftest*
3856   ac_cv_mingw32=yes
3857 else
3858   echo "configure: failed program was:" >&5
3859   cat conftest.$ac_ext >&5
3860   rm -rf conftest*
3861   ac_cv_mingw32=no
3862 fi
3863 rm -f conftest*
3864 fi
3865
3866 echo "$ac_t""$ac_cv_mingw32" 1>&6
3867 MINGW32=
3868 test "$ac_cv_mingw32" = yes && MINGW32=yes
3869 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3870 echo "configure:3871: checking for EMX OS/2 environment" >&5
3871 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3872   echo $ac_n "(cached) $ac_c" 1>&6
3873 else
3874   cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877
3878 int main() {
3879 return __EMX__;
3880 ; return 0; }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883   rm -rf conftest*
3884   ac_cv_emxos2=yes
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   ac_cv_emxos2=no
3890 fi
3891 rm -f conftest*
3892 fi
3893
3894 echo "$ac_t""$ac_cv_emxos2" 1>&6
3895 EMXOS2=
3896 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3897
3898
3899
3900 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3901 echo "configure:3902: checking for executable suffix" >&5
3902 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3903   echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3906   ac_cv_exeext=.exe
3907 else
3908   rm -f conftest*
3909   echo 'int main () { return 0; }' > conftest.$ac_ext
3910   ac_cv_exeext=
3911   if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3912     for file in conftest.*; do
3913       case $file in
3914       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3915       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3916       esac
3917     done
3918   else
3919     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3920   fi
3921   rm -f conftest*
3922   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3923 fi
3924 fi
3925
3926 EXEEXT=""
3927 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3928 echo "$ac_t""${ac_cv_exeext}" 1>&6
3929 ac_exeext=$EXEEXT
3930
3931 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3932 echo "configure:3933: checking for object suffix" >&5
3933 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3934   echo $ac_n "(cached) $ac_c" 1>&6
3935 else
3936   rm -f conftest*
3937 echo 'int i = 1;' > conftest.$ac_ext
3938 if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3939   for ac_file in conftest.*; do
3940     case $ac_file in
3941     *.c) ;;
3942     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3943     esac
3944   done
3945 else
3946   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3947 fi
3948 rm -f conftest*
3949 fi
3950
3951 echo "$ac_t""$ac_cv_objext" 1>&6
3952 OBJEXT=$ac_cv_objext
3953 ac_objext=$ac_cv_objext
3954
3955
3956 cat >> confdefs.h <<EOF
3957 #define EXEEXT "${EXEEXT}"
3958 EOF
3959
3960
3961 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3962 echo "configure:3963: checking for be_app in -lbe" >&5
3963 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   ac_save_LIBS="$LIBS"
3968 LIBS="-lbe -lroot -lnet $LIBS"
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 /* Override any gcc2 internal prototype to avoid an error.  */
3973 /* We use char because int might match the return type of a gcc2
3974     builtin and then its argument prototype would still apply.  */
3975 char be_app();
3976
3977 int main() {
3978 be_app()
3979 ; return 0; }
3980 EOF
3981 if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982   rm -rf conftest*
3983   eval "ac_cv_lib_$ac_lib_var=yes"
3984 else
3985   echo "configure: failed program was:" >&5
3986   cat conftest.$ac_ext >&5
3987   rm -rf conftest*
3988   eval "ac_cv_lib_$ac_lib_var=no"
3989 fi
3990 rm -f conftest*
3991 LIBS="$ac_save_LIBS"
3992
3993 fi
3994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3995   echo "$ac_t""yes" 1>&6
3996   LIBS="$LIBS -lbe -lroot -lnet"
3997 else
3998   echo "$ac_t""no" 1>&6
3999 :
4000 fi
4001
4002
4003
4004
4005
4006 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4007 echo "configure:4008: checking for ${CC-cc} option to accept ANSI C" >&5
4008 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   am_cv_prog_cc_stdc=no
4012 ac_save_CC="$CC"
4013 # Don't try gcc -ansi; that turns off useful extensions and
4014 # breaks some systems' header files.
4015 # AIX                   -qlanglvl=ansi
4016 # Ultrix and OSF/1      -std1
4017 # HP-UX 10.20 and later -Ae
4018 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4019 # SVR4                  -Xc -D__EXTENSIONS__
4020 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4021 do
4022   CC="$ac_save_CC $ac_arg"
4023   cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <stdarg.h>
4027 #include <stdio.h>
4028 #include <sys/types.h>
4029 #include <sys/stat.h>
4030 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4031 struct buf { int x; };
4032 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4033 static char *e (p, i)
4034      char **p;
4035      int i;
4036 {
4037   return p[i];
4038 }
4039 static char *f (char * (*g) (char **, int), char **p, ...)
4040 {
4041   char *s;
4042   va_list v;
4043   va_start (v,p);
4044   s = g (p, va_arg (v,int));
4045   va_end (v);
4046   return s;
4047 }
4048 int test (int i, double x);
4049 struct s1 {int (*f) (int a);};
4050 struct s2 {int (*f) (double a);};
4051 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4052 int argc;
4053 char **argv;
4054
4055 int main() {
4056
4057 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4058
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4062   rm -rf conftest*
4063   am_cv_prog_cc_stdc="$ac_arg"; break
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067 fi
4068 rm -f conftest*
4069 done
4070 CC="$ac_save_CC"
4071
4072 fi
4073
4074 if test -z "$am_cv_prog_cc_stdc"; then
4075   echo "$ac_t""none needed" 1>&6
4076 else
4077   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4078 fi
4079 case "x$am_cv_prog_cc_stdc" in
4080   x|xno) ;;
4081   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4082 esac
4083
4084 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4085         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4086 fi
4087
4088 # test for make depend flag
4089 OL_MKDEP=
4090 OL_MKDEP_FLAGS=
4091 if test -z "${MKDEP}"; then
4092         OL_MKDEP="${CC-cc}"
4093         if test -z "${MKDEP_FLAGS}"; then
4094                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4095 echo "configure:4096: checking for ${OL_MKDEP} depend flag" >&5
4096 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4097   echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099   
4100                         ol_cv_mkdep=no
4101                         for flag in "-M" "-xM"; do
4102                                 cat > conftest.c <<EOF
4103  noCode;
4104 EOF
4105                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4106                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4107                                 then
4108                                         if test ! -f conftest."${ac_object}" ; then
4109                                                 ol_cv_mkdep=$flag
4110                                                 OL_MKDEP_FLAGS="$flag"
4111                                                 break
4112                                         fi
4113                                 fi
4114                         done
4115                         rm -f conftest*
4116                 
4117 fi
4118
4119 echo "$ac_t""$ol_cv_mkdep" 1>&6
4120         else
4121                 cc_cv_mkdep=yes
4122                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4123         fi
4124 else
4125         cc_cv_mkdep=yes
4126         OL_MKDEP="${MKDEP}"
4127         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4128 fi
4129
4130
4131
4132 if test "${ol_cv_mkdep}" = no ; then
4133         # this will soon become an error
4134         echo "configure: warning: do not know how to generate dependencies" 1>&2
4135 fi
4136
4137 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4138 echo "configure:4139: checking for afopen in -ls" >&5
4139 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   ac_save_LIBS="$LIBS"
4144 LIBS="-ls  $LIBS"
4145 cat > conftest.$ac_ext <<EOF
4146 #line 4147 "configure"
4147 #include "confdefs.h"
4148 /* Override any gcc2 internal prototype to avoid an error.  */
4149 /* We use char because int might match the return type of a gcc2
4150     builtin and then its argument prototype would still apply.  */
4151 char afopen();
4152
4153 int main() {
4154 afopen()
4155 ; return 0; }
4156 EOF
4157 if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4158   rm -rf conftest*
4159   eval "ac_cv_lib_$ac_lib_var=yes"
4160 else
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163   rm -rf conftest*
4164   eval "ac_cv_lib_$ac_lib_var=no"
4165 fi
4166 rm -f conftest*
4167 LIBS="$ac_save_LIBS"
4168
4169 fi
4170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4171   echo "$ac_t""yes" 1>&6
4172   
4173         AUTH_LIBS=-ls
4174         cat >> confdefs.h <<\EOF
4175 #define HAVE_AIX_SECURITY 1
4176 EOF
4177
4178
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182
4183
4184
4185 ol_link_modules=no
4186 if test $ol_enable_modules != no ; then
4187         for ac_hdr in ltdl.h
4188 do
4189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_hdr" >&5
4192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <$ac_hdr>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=yes"
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218   cat >> confdefs.h <<EOF
4219 #define $ac_tr_hdr 1
4220 EOF
4221  
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225 done
4226
4227
4228         if test $ac_cv_header_ltdl_h = no ; then
4229                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4230         fi
4231
4232         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4233 echo "configure:4234: checking for lt_dlinit in -lltdl" >&5
4234 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   ac_save_LIBS="$LIBS"
4239 LIBS="-lltdl  $LIBS"
4240 cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 /* Override any gcc2 internal prototype to avoid an error.  */
4244 /* We use char because int might match the return type of a gcc2
4245     builtin and then its argument prototype would still apply.  */
4246 char lt_dlinit();
4247
4248 int main() {
4249 lt_dlinit()
4250 ; return 0; }
4251 EOF
4252 if { (eval echo configure:4253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4253   rm -rf conftest*
4254   eval "ac_cv_lib_$ac_lib_var=yes"
4255 else
4256   echo "configure: failed program was:" >&5
4257   cat conftest.$ac_ext >&5
4258   rm -rf conftest*
4259   eval "ac_cv_lib_$ac_lib_var=no"
4260 fi
4261 rm -f conftest*
4262 LIBS="$ac_save_LIBS"
4263
4264 fi
4265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4266   echo "$ac_t""yes" 1>&6
4267   
4268             MODULES_LIBS=-lltdl
4269             cat >> confdefs.h <<\EOF
4270 #define HAVE_LIBLTDL 1
4271 EOF
4272
4273         
4274 else
4275   echo "$ac_t""no" 1>&6
4276 fi
4277
4278
4279         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4280                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4281         fi
4282         ol_link_modules=yes
4283 else
4284         ol_with_bdb_module=static
4285         ol_with_dnssrv_module=static
4286         ol_with_ldap_module=static
4287         ol_with_ldbm_module=static
4288         ol_with_passwd_module=static
4289         ol_with_perl_module=static
4290         ol_with_shell_module=static
4291         ol_with_tcl_module=static
4292         ol_with_sql_module=static
4293 fi
4294
4295 # test for EBCDIC
4296 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4297 echo "configure:4298: checking for EBCDIC" >&5
4298 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   
4302         cat > conftest.$ac_ext <<EOF
4303 #line 4304 "configure"
4304 #include "confdefs.h"
4305
4306 #if !('M' == 0xd4)
4307 #include <__ASCII__/generate_error.h>
4308 #endif
4309
4310 EOF
4311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4312 { (eval echo configure:4313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4314 if test -z "$ac_err"; then
4315   rm -rf conftest*
4316   ol_cv_cpp_ebcdic=yes
4317 else
4318   echo "$ac_err" >&5
4319   echo "configure: failed program was:" >&5
4320   cat conftest.$ac_ext >&5
4321   rm -rf conftest*
4322   ol_cv_cpp_ebcdic=no
4323 fi
4324 rm -f conftest*
4325 fi
4326
4327 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4328 if test $ol_cv_cpp_ebcdic = yes ; then
4329         cat >> confdefs.h <<\EOF
4330 #define HAVE_EBCDIC 1
4331 EOF
4332
4333 fi
4334
4335 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4336 echo "configure:4337: checking for ANSI C header files" >&5
4337 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 #include <stdlib.h>
4344 #include <stdarg.h>
4345 #include <string.h>
4346 #include <float.h>
4347 EOF
4348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4349 { (eval echo configure:4350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4351 if test -z "$ac_err"; then
4352   rm -rf conftest*
4353   ol_cv_header_stdc=yes
4354 else
4355   echo "$ac_err" >&5
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   ol_cv_header_stdc=no
4360 fi
4361 rm -f conftest*
4362
4363 if test $ol_cv_header_stdc = yes; then
4364   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 #include <string.h>
4369 EOF
4370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4371   egrep "memchr" >/dev/null 2>&1; then
4372   :
4373 else
4374   rm -rf conftest*
4375   ol_cv_header_stdc=no
4376 fi
4377 rm -f conftest*
4378
4379 fi
4380
4381 if test $ol_cv_header_stdc = yes; then
4382   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 #include <stdlib.h>
4387 EOF
4388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4389   egrep "free" >/dev/null 2>&1; then
4390   :
4391 else
4392   rm -rf conftest*
4393   ol_cv_header_stdc=no
4394 fi
4395 rm -f conftest*
4396
4397 fi
4398
4399 if test $ol_cv_header_stdc = yes; then
4400   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4401 if test "$cross_compiling" = yes; then
4402   :
4403 else
4404   cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 #include <ctype.h>
4408 #ifndef HAVE_EBCDIC
4409 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4410 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4411 #else
4412 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4413                 || ('j' <= (c) && (c) <= 'r') \
4414                 || ('s' <= (c) && (c) <= 'z'))
4415 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4416 #endif
4417 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4418 int main () { int i; for (i = 0; i < 256; i++)
4419 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4420 exit (0); }
4421
4422 EOF
4423 if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4424 then
4425   :
4426 else
4427   echo "configure: failed program was:" >&5
4428   cat conftest.$ac_ext >&5
4429   rm -fr conftest*
4430   ol_cv_header_stdc=no
4431 fi
4432 rm -fr conftest*
4433 fi
4434
4435 fi
4436 fi
4437
4438 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4439 if test $ol_cv_header_stdc = yes; then
4440   cat >> confdefs.h <<\EOF
4441 #define STDC_HEADERS 1
4442 EOF
4443
4444 fi
4445 ac_cv_header_stdc=disable
4446
4447
4448 if test $ol_cv_header_stdc != yes; then
4449         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4450 fi
4451
4452 ac_header_dirent=no
4453 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4454 do
4455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4456 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4457 echo "configure:4458: checking for $ac_hdr that defines DIR" >&5
4458 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <sys/types.h>
4465 #include <$ac_hdr>
4466 int main() {
4467 DIR *dirp = 0;
4468 ; return 0; }
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4471   rm -rf conftest*
4472   eval "ac_cv_header_dirent_$ac_safe=yes"
4473 else
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   eval "ac_cv_header_dirent_$ac_safe=no"
4478 fi
4479 rm -f conftest*
4480 fi
4481 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4484   cat >> confdefs.h <<EOF
4485 #define $ac_tr_hdr 1
4486 EOF
4487  ac_header_dirent=$ac_hdr; break
4488 else
4489   echo "$ac_t""no" 1>&6
4490 fi
4491 done
4492 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4493 if test $ac_header_dirent = dirent.h; then
4494 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4495 echo "configure:4496: checking for opendir in -ldir" >&5
4496 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4498   echo $ac_n "(cached) $ac_c" 1>&6
4499 else
4500   ac_save_LIBS="$LIBS"
4501 LIBS="-ldir  $LIBS"
4502 cat > conftest.$ac_ext <<EOF
4503 #line 4504 "configure"
4504 #include "confdefs.h"
4505 /* Override any gcc2 internal prototype to avoid an error.  */
4506 /* We use char because int might match the return type of a gcc2
4507     builtin and then its argument prototype would still apply.  */
4508 char opendir();
4509
4510 int main() {
4511 opendir()
4512 ; return 0; }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=yes"
4517 else
4518   echo "configure: failed program was:" >&5
4519   cat conftest.$ac_ext >&5
4520   rm -rf conftest*
4521   eval "ac_cv_lib_$ac_lib_var=no"
4522 fi
4523 rm -f conftest*
4524 LIBS="$ac_save_LIBS"
4525
4526 fi
4527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4528   echo "$ac_t""yes" 1>&6
4529   LIBS="$LIBS -ldir"
4530 else
4531   echo "$ac_t""no" 1>&6
4532 fi
4533
4534 else
4535 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4536 echo "configure:4537: checking for opendir in -lx" >&5
4537 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4539   echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541   ac_save_LIBS="$LIBS"
4542 LIBS="-lx  $LIBS"
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 /* Override any gcc2 internal prototype to avoid an error.  */
4547 /* We use char because int might match the return type of a gcc2
4548     builtin and then its argument prototype would still apply.  */
4549 char opendir();
4550
4551 int main() {
4552 opendir()
4553 ; return 0; }
4554 EOF
4555 if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=yes"
4558 else
4559   echo "configure: failed program was:" >&5
4560   cat conftest.$ac_ext >&5
4561   rm -rf conftest*
4562   eval "ac_cv_lib_$ac_lib_var=no"
4563 fi
4564 rm -f conftest*
4565 LIBS="$ac_save_LIBS"
4566
4567 fi
4568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4569   echo "$ac_t""yes" 1>&6
4570   LIBS="$LIBS -lx"
4571 else
4572   echo "$ac_t""no" 1>&6
4573 fi
4574
4575 fi
4576
4577 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4578 echo "configure:4579: checking for sys/wait.h that is POSIX.1 compatible" >&5
4579 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   cat > conftest.$ac_ext <<EOF
4583 #line 4584 "configure"
4584 #include "confdefs.h"
4585 #include <sys/types.h>
4586 #include <sys/wait.h>
4587 #ifndef WEXITSTATUS
4588 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4589 #endif
4590 #ifndef WIFEXITED
4591 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4592 #endif
4593 int main() {
4594 int s;
4595 wait (&s);
4596 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4600   rm -rf conftest*
4601   ac_cv_header_sys_wait_h=yes
4602 else
4603   echo "configure: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   rm -rf conftest*
4606   ac_cv_header_sys_wait_h=no
4607 fi
4608 rm -f conftest*
4609 fi
4610
4611 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4612 if test $ac_cv_header_sys_wait_h = yes; then
4613   cat >> confdefs.h <<\EOF
4614 #define HAVE_SYS_WAIT_H 1
4615 EOF
4616
4617 fi
4618
4619 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4620 echo "configure:4621: checking POSIX termios" >&5
4621 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 #include <sys/types.h>
4628 #include <unistd.h>
4629 #include <termios.h>
4630 int main() {
4631 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4632    tcgetattr(0, 0);
4633 ; return 0; }
4634 EOF
4635 if { (eval echo configure:4636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4636   rm -rf conftest*
4637   am_cv_sys_posix_termios=yes
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641   rm -rf conftest*
4642   am_cv_sys_posix_termios=no
4643 fi
4644 rm -f conftest*
4645 fi
4646
4647 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4648
4649
4650  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4651 echo "configure:4652: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4652 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4656
4657   gwinsz_in_termios_h=no
4658   if test $am_cv_sys_posix_termios = yes; then
4659     cat > conftest.$ac_ext <<EOF
4660 #line 4661 "configure"
4661 #include "confdefs.h"
4662 #include <sys/types.h>
4663 #     include <termios.h>
4664 #     ifdef TIOCGWINSZ
4665         yes
4666 #     endif
4667     
4668 EOF
4669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4670   egrep "yes" >/dev/null 2>&1; then
4671   rm -rf conftest*
4672   gwinsz_in_termios_h=yes
4673 fi
4674 rm -f conftest*
4675
4676   fi
4677
4678   if test $gwinsz_in_termios_h = no; then
4679     cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 #include <sys/types.h>
4683 #     include <sys/ioctl.h>
4684 #     ifdef TIOCGWINSZ
4685         yes
4686 #     endif
4687     
4688 EOF
4689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4690   egrep "yes" >/dev/null 2>&1; then
4691   rm -rf conftest*
4692   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4693 fi
4694 rm -f conftest*
4695
4696   fi
4697   
4698 fi
4699
4700 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4701   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4702     cat >> confdefs.h <<\EOF
4703 #define GWINSZ_IN_SYS_IOCTL 1
4704 EOF
4705
4706   fi
4707
4708 if test $am_cv_sys_posix_termios = yes ; then
4709         cat >> confdefs.h <<\EOF
4710 #define HAVE_POSIX_TERMIOS 1
4711 EOF
4712
4713 fi
4714
4715 for ac_hdr in \
4716         arpa/inet.h             \
4717         arpa/nameser.h  \
4718         assert.h                \
4719         conio.h                 \
4720         crypt.h                 \
4721         direct.h                \
4722         errno.h                 \
4723         fcntl.h                 \
4724         filio.h                 \
4725         getopt.h                \
4726         grp.h                   \
4727         io.h                    \
4728         libutil.h               \
4729         limits.h                \
4730         locale.h                \
4731         netinet/tcp.h   \
4732         malloc.h                \
4733         memory.h                \
4734         psap.h                  \
4735         pwd.h                   \
4736         process.h               \
4737         resolv.h                \
4738         sgtty.h                 \
4739         shadow.h                \
4740         stddef.h                \
4741         string.h                \
4742         strings.h               \
4743         sysexits.h              \
4744         sys/file.h              \
4745         sys/filio.h             \
4746         sys/errno.h             \
4747         sys/ioctl.h             \
4748         sys/param.h             \
4749         sys/resource.h  \
4750         sys/select.h    \
4751         sys/socket.h    \
4752         sys/syslog.h    \
4753         sys/time.h              \
4754         sys/types.h             \
4755         syslog.h                \
4756         termios.h               \
4757         unistd.h                \
4758         winsock.h               \
4759
4760 do
4761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4763 echo "configure:4764: checking for $ac_hdr" >&5
4764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4765   echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767   cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770 #include <$ac_hdr>
4771 EOF
4772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4773 { (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4775 if test -z "$ac_err"; then
4776   rm -rf conftest*
4777   eval "ac_cv_header_$ac_safe=yes"
4778 else
4779   echo "$ac_err" >&5
4780   echo "configure: failed program was:" >&5
4781   cat conftest.$ac_ext >&5
4782   rm -rf conftest*
4783   eval "ac_cv_header_$ac_safe=no"
4784 fi
4785 rm -f conftest*
4786 fi
4787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4788   echo "$ac_t""yes" 1>&6
4789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4790   cat >> confdefs.h <<EOF
4791 #define $ac_tr_hdr 1
4792 EOF
4793  
4794 else
4795   echo "$ac_t""no" 1>&6
4796 fi
4797 done
4798
4799
4800
4801
4802 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4803 echo "configure:4804: checking for sigset in -lV3" >&5
4804 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808   ac_save_LIBS="$LIBS"
4809 LIBS="-lV3  $LIBS"
4810 cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813 /* Override any gcc2 internal prototype to avoid an error.  */
4814 /* We use char because int might match the return type of a gcc2
4815     builtin and then its argument prototype would still apply.  */
4816 char sigset();
4817
4818 int main() {
4819 sigset()
4820 ; return 0; }
4821 EOF
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=yes"
4825 else
4826   echo "configure: failed program was:" >&5
4827   cat conftest.$ac_ext >&5
4828   rm -rf conftest*
4829   eval "ac_cv_lib_$ac_lib_var=no"
4830 fi
4831 rm -f conftest*
4832 LIBS="$ac_save_LIBS"
4833
4834 fi
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836   echo "$ac_t""yes" 1>&6
4837     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4839   cat >> confdefs.h <<EOF
4840 #define $ac_tr_lib 1
4841 EOF
4842
4843   LIBS="-lV3 $LIBS"
4844
4845 else
4846   echo "$ac_t""no" 1>&6
4847 fi
4848
4849
4850 if test $ac_cv_header_winsock_h = yes; then
4851         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4852 echo "configure:4853: checking for winsock" >&5
4853 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4854   echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856   cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 #include <winsock.h>
4860 int main() {
4861
4862                         socket(0,0,0);
4863                         select(0,NULL,NULL,NULL,NULL);
4864                         closesocket(0);
4865                         gethostname(NULL,0);
4866         
4867 ; return 0; }
4868 EOF
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4870   rm -rf conftest*
4871   ol_cv_winsock=yes
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   ol_cv_winsock=no
4877 fi
4878 rm -f conftest*]
4879 fi
4880
4881 echo "$ac_t""$ol_cv_winsock" 1>&6
4882
4883         if test $ol_cv_winsock = yes ; then
4884                 cat >> confdefs.h <<\EOF
4885 #define HAVE_WINSOCK 1
4886 EOF
4887
4888                 ac_cv_func_socket=yes
4889                 ac_cv_func_select=yes
4890                 ac_cv_func_closesocket=yes
4891                 ac_cv_func_gethostname=yes
4892         fi
4893 fi
4894
4895
4896 echo $ac_n "checking for socket""... $ac_c" 1>&6
4897 echo "configure:4898: checking for socket" >&5
4898 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901   cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 /* System header to define __stub macros and hopefully few prototypes,
4905     which can conflict with char socket(); below.  */
4906 #include <assert.h>
4907 /* Override any gcc2 internal prototype to avoid an error.  */
4908 /* We use char because int might match the return type of a gcc2
4909     builtin and then its argument prototype would still apply.  */
4910 char socket();
4911 char (*f)();
4912
4913 int main() {
4914
4915 /* The GNU C library defines this for functions which it implements
4916     to always fail with ENOSYS.  Some functions are actually named
4917     something starting with __ and the normal name is an alias.  */
4918 #if defined (__stub_socket) || defined (__stub___socket)
4919 choke me
4920 #else
4921 f = socket;
4922 #endif
4923
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   eval "ac_cv_func_socket=yes"
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_func_socket=no"
4934 fi
4935 rm -f conftest*
4936 fi
4937
4938 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940   :
4941 else
4942   echo "$ac_t""no" 1>&6
4943         
4944         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4945 echo "configure:4946: checking for main in -lsocket" >&5
4946 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4948   echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950   ac_save_LIBS="$LIBS"
4951 LIBS="-lsocket  $LIBS"
4952 cat > conftest.$ac_ext <<EOF
4953 #line 4954 "configure"
4954 #include "confdefs.h"
4955
4956 int main() {
4957 main()
4958 ; return 0; }
4959 EOF
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964   echo "configure: failed program was:" >&5
4965   cat conftest.$ac_ext >&5
4966   rm -rf conftest*
4967   eval "ac_cv_lib_$ac_lib_var=no"
4968 fi
4969 rm -f conftest*
4970 LIBS="$ac_save_LIBS"
4971
4972 fi
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4974   echo "$ac_t""yes" 1>&6
4975     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4976     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4977   cat >> confdefs.h <<EOF
4978 #define $ac_tr_lib 1
4979 EOF
4980
4981   LIBS="-lsocket $LIBS"
4982
4983 else
4984   echo "$ac_t""no" 1>&6
4985 fi
4986
4987         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4988 echo "configure:4989: checking for main in -lnet" >&5
4989 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4990 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4991   echo $ac_n "(cached) $ac_c" 1>&6
4992 else
4993   ac_save_LIBS="$LIBS"
4994 LIBS="-lnet  $LIBS"
4995 cat > conftest.$ac_ext <<EOF
4996 #line 4997 "configure"
4997 #include "confdefs.h"
4998
4999 int main() {
5000 main()
5001 ; return 0; }
5002 EOF
5003 if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=yes"
5006 else
5007   echo "configure: failed program was:" >&5
5008   cat conftest.$ac_ext >&5
5009   rm -rf conftest*
5010   eval "ac_cv_lib_$ac_lib_var=no"
5011 fi
5012 rm -f conftest*
5013 LIBS="$ac_save_LIBS"
5014
5015 fi
5016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5017   echo "$ac_t""yes" 1>&6
5018     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_lib 1
5022 EOF
5023
5024   LIBS="-lnet $LIBS"
5025
5026 else
5027   echo "$ac_t""no" 1>&6
5028 fi
5029
5030         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5031 echo "configure:5032: checking for main in -lnsl_s" >&5
5032 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5034   echo $ac_n "(cached) $ac_c" 1>&6
5035 else
5036   ac_save_LIBS="$LIBS"
5037 LIBS="-lnsl_s  $LIBS"
5038 cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041
5042 int main() {
5043 main()
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=yes"
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   eval "ac_cv_lib_$ac_lib_var=no"
5054 fi
5055 rm -f conftest*
5056 LIBS="$ac_save_LIBS"
5057
5058 fi
5059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5060   echo "$ac_t""yes" 1>&6
5061     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5063   cat >> confdefs.h <<EOF
5064 #define $ac_tr_lib 1
5065 EOF
5066
5067   LIBS="-lnsl_s $LIBS"
5068
5069 else
5070   echo "$ac_t""no" 1>&6
5071 fi
5072
5073         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5074 echo "configure:5075: checking for main in -lnsl" >&5
5075 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5077   echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079   ac_save_LIBS="$LIBS"
5080 LIBS="-lnsl  $LIBS"
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084
5085 int main() {
5086 main()
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=yes"
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   eval "ac_cv_lib_$ac_lib_var=no"
5097 fi
5098 rm -f conftest*
5099 LIBS="$ac_save_LIBS"
5100
5101 fi
5102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5103   echo "$ac_t""yes" 1>&6
5104     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5106   cat >> confdefs.h <<EOF
5107 #define $ac_tr_lib 1
5108 EOF
5109
5110   LIBS="-lnsl $LIBS"
5111
5112 else
5113   echo "$ac_t""no" 1>&6
5114 fi
5115
5116         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5117 echo "configure:5118: checking for socket in -linet" >&5
5118 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122   ac_save_LIBS="$LIBS"
5123 LIBS="-linet  $LIBS"
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127 /* Override any gcc2 internal prototype to avoid an error.  */
5128 /* We use char because int might match the return type of a gcc2
5129     builtin and then its argument prototype would still apply.  */
5130 char socket();
5131
5132 int main() {
5133 socket()
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=yes"
5139 else
5140   echo "configure: failed program was:" >&5
5141   cat conftest.$ac_ext >&5
5142   rm -rf conftest*
5143   eval "ac_cv_lib_$ac_lib_var=no"
5144 fi
5145 rm -f conftest*
5146 LIBS="$ac_save_LIBS"
5147
5148 fi
5149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5150   echo "$ac_t""yes" 1>&6
5151     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5152     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5153   cat >> confdefs.h <<EOF
5154 #define $ac_tr_lib 1
5155 EOF
5156
5157   LIBS="-linet $LIBS"
5158
5159 else
5160   echo "$ac_t""no" 1>&6
5161 fi
5162
5163         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5164 echo "configure:5165: checking for main in -lgen" >&5
5165 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5166 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5167   echo $ac_n "(cached) $ac_c" 1>&6
5168 else
5169   ac_save_LIBS="$LIBS"
5170 LIBS="-lgen  $LIBS"
5171 cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174
5175 int main() {
5176 main()
5177 ; return 0; }
5178 EOF
5179 if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=yes"
5182 else
5183   echo "configure: failed program was:" >&5
5184   cat conftest.$ac_ext >&5
5185   rm -rf conftest*
5186   eval "ac_cv_lib_$ac_lib_var=no"
5187 fi
5188 rm -f conftest*
5189 LIBS="$ac_save_LIBS"
5190
5191 fi
5192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5193   echo "$ac_t""yes" 1>&6
5194     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5195     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5196   cat >> confdefs.h <<EOF
5197 #define $ac_tr_lib 1
5198 EOF
5199
5200   LIBS="-lgen $LIBS"
5201
5202 else
5203   echo "$ac_t""no" 1>&6
5204 fi
5205
5206
5207 fi
5208
5209
5210 echo $ac_n "checking for select""... $ac_c" 1>&6
5211 echo "configure:5212: checking for select" >&5
5212 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5213   echo $ac_n "(cached) $ac_c" 1>&6
5214 else
5215   cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 /* System header to define __stub macros and hopefully few prototypes,
5219     which can conflict with char select(); below.  */
5220 #include <assert.h>
5221 /* Override any gcc2 internal prototype to avoid an error.  */
5222 /* We use char because int might match the return type of a gcc2
5223     builtin and then its argument prototype would still apply.  */
5224 char select();
5225 char (*f)();
5226
5227 int main() {
5228
5229 /* The GNU C library defines this for functions which it implements
5230     to always fail with ENOSYS.  Some functions are actually named
5231     something starting with __ and the normal name is an alias.  */
5232 #if defined (__stub_select) || defined (__stub___select)
5233 choke me
5234 #else
5235 f = select;
5236 #endif
5237
5238 ; return 0; }
5239 EOF
5240 if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5241   rm -rf conftest*
5242   eval "ac_cv_func_select=yes"
5243 else
5244   echo "configure: failed program was:" >&5
5245   cat conftest.$ac_ext >&5
5246   rm -rf conftest*
5247   eval "ac_cv_func_select=no"
5248 fi
5249 rm -f conftest*
5250 fi
5251
5252 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254   :
5255 else
5256   echo "$ac_t""no" 1>&6
5257 { echo "configure: error: select() required." 1>&2; exit 1; }
5258 fi
5259
5260
5261 if test "${ac_cv_header_winsock_h}" != yes; then
5262                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5263 echo "configure:5264: checking types of arguments for select()" >&5
5264  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5268   echo $ac_n "(cached) $ac_c" 1>&6
5269 else
5270     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5274      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5275       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5276        cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 #ifdef HAVE_SYS_TYPES_H
5280 #include <sys/types.h>
5281 #endif
5282 #ifdef HAVE_SYS_TIME_H
5283 #include <sys/time.h>
5284 #endif
5285 #ifdef HAVE_SYS_SELECT_H
5286 #include <sys/select.h>
5287 #endif
5288 #ifdef HAVE_SYS_SOCKET_H
5289 #include <sys/socket.h>
5290 #endif
5291 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);
5292 int main() {
5293
5294 ; return 0; }
5295 EOF
5296 if { (eval echo configure:5297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5297   rm -rf conftest*
5298           ac_not_found=no ; break 3
5299 else
5300   echo "configure: failed program was:" >&5
5301   cat conftest.$ac_ext >&5
5302   rm -rf conftest*
5303   ac_not_found=yes
5304 fi
5305 rm -f conftest*
5306       done
5307      done
5308     done
5309    
5310 fi
5311   
5312 fi
5313  
5314 fi
5315  if test "$ac_not_found" = yes; then
5316   ac_cv_func_select_arg1=int 
5317   ac_cv_func_select_arg234='int *' 
5318   ac_cv_func_select_arg5='struct timeval *'
5319  fi
5320  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5321  cat >> confdefs.h <<EOF
5322 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5323 EOF
5324
5325  cat >> confdefs.h <<EOF
5326 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5327 EOF
5328
5329  cat >> confdefs.h <<EOF
5330 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5331 EOF
5332
5333
5334 fi
5335
5336
5337 for ac_hdr in regex.h 
5338 do
5339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5341 echo "configure:5342: checking for $ac_hdr" >&5
5342 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 #include <$ac_hdr>
5349 EOF
5350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5351 { (eval echo configure:5352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5353 if test -z "$ac_err"; then
5354   rm -rf conftest*
5355   eval "ac_cv_header_$ac_safe=yes"
5356 else
5357   echo "$ac_err" >&5
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_header_$ac_safe=no"
5362 fi
5363 rm -f conftest*
5364 fi
5365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5368   cat >> confdefs.h <<EOF
5369 #define $ac_tr_hdr 1
5370 EOF
5371  
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375 done
5376
5377 if test "$ac_cv_header_regex_h" != yes ; then
5378         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5379 fi
5380 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5381 echo "configure:5382: checking for regfree" >&5
5382 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char regfree(); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 /* We use char because int might match the return type of a gcc2
5393     builtin and then its argument prototype would still apply.  */
5394 char regfree();
5395 char (*f)();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_regfree) || defined (__stub___regfree)
5403 choke me
5404 #else
5405 f = regfree;
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_regfree=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_regfree=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   :
5425 else
5426   echo "$ac_t""no" 1>&6
5427 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5428 fi
5429
5430
5431
5432 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5433 echo "configure:5434: checking for compatible POSIX regex" >&5
5434 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   
5438         if test "$cross_compiling" = yes; then
5439   ol_cv_c_posix_regex=cross
5440 else
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 #include <sys/types.h>
5446 #include <regex.h>
5447 static char *pattern, *string;
5448 main()
5449 {
5450         int rc;
5451         regex_t re;
5452
5453         pattern = "^A";
5454
5455         if(regcomp(&re, pattern, 0)) {
5456                 return -1;
5457         }
5458         
5459         string = "ALL MATCH";
5460         
5461         rc = regexec(&re, string, 0, (void*)0, 0);
5462
5463         regfree(&re);
5464
5465         return rc;
5466 }
5467 EOF
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5469 then
5470   ol_cv_c_posix_regex=yes
5471 else
5472   echo "configure: failed program was:" >&5
5473   cat conftest.$ac_ext >&5
5474   rm -fr conftest*
5475   ol_cv_c_posix_regex=no
5476 fi
5477 rm -fr conftest*
5478 fi
5479
5480 fi
5481
5482 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5483
5484 if test "$ol_cv_c_posix_regex" = no ; then
5485         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5486 fi
5487
5488 ol_link_dnssrv=no
5489 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5490 echo "configure:5491: checking for res_query" >&5
5491 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5492   echo $ac_n "(cached) $ac_c" 1>&6
5493 else
5494   cat > conftest.$ac_ext <<EOF
5495 #line 5496 "configure"
5496 #include "confdefs.h"
5497 /* System header to define __stub macros and hopefully few prototypes,
5498     which can conflict with char res_query(); below.  */
5499 #include <assert.h>
5500 /* Override any gcc2 internal prototype to avoid an error.  */
5501 /* We use char because int might match the return type of a gcc2
5502     builtin and then its argument prototype would still apply.  */
5503 char res_query();
5504 char (*f)();
5505
5506 int main() {
5507
5508 /* The GNU C library defines this for functions which it implements
5509     to always fail with ENOSYS.  Some functions are actually named
5510     something starting with __ and the normal name is an alias.  */
5511 #if defined (__stub_res_query) || defined (__stub___res_query)
5512 choke me
5513 #else
5514 f = res_query;
5515 #endif
5516
5517 ; return 0; }
5518 EOF
5519 if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5520   rm -rf conftest*
5521   eval "ac_cv_func_res_query=yes"
5522 else
5523   echo "configure: failed program was:" >&5
5524   cat conftest.$ac_ext >&5
5525   rm -rf conftest*
5526   eval "ac_cv_func_res_query=no"
5527 fi
5528 rm -f conftest*
5529 fi
5530
5531 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5532   echo "$ac_t""yes" 1>&6
5533   :
5534 else
5535   echo "$ac_t""no" 1>&6
5536 fi
5537
5538 if test $ac_cv_func_res_query = no ; then 
5539         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5540 echo "configure:5541: checking for res_query in -lbind" >&5
5541 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5543   echo $ac_n "(cached) $ac_c" 1>&6
5544 else
5545   ac_save_LIBS="$LIBS"
5546 LIBS="-lbind  $LIBS"
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error.  */
5551 /* We use char because int might match the return type of a gcc2
5552     builtin and then its argument prototype would still apply.  */
5553 char res_query();
5554
5555 int main() {
5556 res_query()
5557 ; return 0; }
5558 EOF
5559 if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5560   rm -rf conftest*
5561   eval "ac_cv_lib_$ac_lib_var=yes"
5562 else
5563   echo "configure: failed program was:" >&5
5564   cat conftest.$ac_ext >&5
5565   rm -rf conftest*
5566   eval "ac_cv_lib_$ac_lib_var=no"
5567 fi
5568 rm -f conftest*
5569 LIBS="$ac_save_LIBS"
5570
5571 fi
5572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5573   echo "$ac_t""yes" 1>&6
5574     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5575     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5576   cat >> confdefs.h <<EOF
5577 #define $ac_tr_lib 1
5578 EOF
5579
5580   LIBS="-lbind $LIBS"
5581
5582 else
5583   echo "$ac_t""no" 1>&6
5584 fi
5585
5586         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5587 fi
5588
5589 if test $ac_cv_func_res_query = no ; then 
5590         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5591 echo "configure:5592: checking for __res_query in -lbind" >&5
5592 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5594   echo $ac_n "(cached) $ac_c" 1>&6
5595 else
5596   ac_save_LIBS="$LIBS"
5597 LIBS="-lbind  $LIBS"
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* Override any gcc2 internal prototype to avoid an error.  */
5602 /* We use char because int might match the return type of a gcc2
5603     builtin and then its argument prototype would still apply.  */
5604 char __res_query();
5605
5606 int main() {
5607 __res_query()
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5611   rm -rf conftest*
5612   eval "ac_cv_lib_$ac_lib_var=yes"
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   eval "ac_cv_lib_$ac_lib_var=no"
5618 fi
5619 rm -f conftest*
5620 LIBS="$ac_save_LIBS"
5621
5622 fi
5623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5624   echo "$ac_t""yes" 1>&6
5625     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5626     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5627   cat >> confdefs.h <<EOF
5628 #define $ac_tr_lib 1
5629 EOF
5630
5631   LIBS="-lbind $LIBS"
5632
5633 else
5634   echo "$ac_t""no" 1>&6
5635 fi
5636
5637         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5638 fi
5639
5640 if test $ac_cv_func_res_query = no ; then 
5641         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5642 echo "configure:5643: checking for res_query in -lresolv" >&5
5643 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   ac_save_LIBS="$LIBS"
5648 LIBS="-lresolv  $LIBS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 /* We use char because int might match the return type of a gcc2
5654     builtin and then its argument prototype would still apply.  */
5655 char res_query();
5656
5657 int main() {
5658 res_query()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5677     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5678   cat >> confdefs.h <<EOF
5679 #define $ac_tr_lib 1
5680 EOF
5681
5682   LIBS="-lresolv $LIBS"
5683
5684 else
5685   echo "$ac_t""no" 1>&6
5686 fi
5687
5688         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5689 fi
5690
5691 if test "$ac_cv_func_res_query" = yes ; then
5692         cat >> confdefs.h <<\EOF
5693 #define HAVE_RES_QUERY 1
5694 EOF
5695
5696
5697         if test $ol_enable_dnssrv != no ; then
5698                 ol_link_dnssrv=yes
5699         fi
5700 fi
5701
5702 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5703         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5704 fi
5705
5706 for ac_func in getaddrinfo 
5707 do
5708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5709 echo "configure:5710: checking for $ac_func" >&5
5710 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5711   echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713   cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5716 /* System header to define __stub macros and hopefully few prototypes,
5717     which can conflict with char $ac_func(); below.  */
5718 #include <assert.h>
5719 /* Override any gcc2 internal prototype to avoid an error.  */
5720 /* We use char because int might match the return type of a gcc2
5721     builtin and then its argument prototype would still apply.  */
5722 char $ac_func();
5723 char (*f)();
5724
5725 int main() {
5726
5727 /* The GNU C library defines this for functions which it implements
5728     to always fail with ENOSYS.  Some functions are actually named
5729     something starting with __ and the normal name is an alias.  */
5730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5731 choke me
5732 #else
5733 f = $ac_func;
5734 #endif
5735
5736 ; return 0; }
5737 EOF
5738 if { (eval echo configure:5739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5739   rm -rf conftest*
5740   eval "ac_cv_func_$ac_func=yes"
5741 else
5742   echo "configure: failed program was:" >&5
5743   cat conftest.$ac_ext >&5
5744   rm -rf conftest*
5745   eval "ac_cv_func_$ac_func=no"
5746 fi
5747 rm -f conftest*
5748 fi
5749
5750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5751   echo "$ac_t""yes" 1>&6
5752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5753   cat >> confdefs.h <<EOF
5754 #define $ac_tr_func 1
5755 EOF
5756  
5757 else
5758   echo "$ac_t""no" 1>&6
5759 fi
5760 done
5761
5762
5763 ol_link_ipv6=no
5764 if test $ac_cv_func_getaddrinfo = no ; then
5765         if test $ol_enable_ipv6 = yes ; then
5766                 { echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
5767         fi
5768 else
5769         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
5770 echo "configure:5771: checking INET6_ADDRSTRLEN" >&5
5771 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
5772   echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774   
5775                 cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5778
5779 #                       include <netinet/in.h>
5780 #                       ifdef INET6_ADDRSTRLEN
5781                                 __has_inet6_addrstrlen__;
5782 #                       endif
5783                 
5784 EOF
5785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5786   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
5787   rm -rf conftest*
5788   ol_cv_inet6_addrstrlen=yes
5789 else
5790   rm -rf conftest*
5791   ol_cv_inet6_addrstrlen=no
5792 fi
5793 rm -f conftest*
5794
5795 fi
5796
5797 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
5798
5799         if test $ol_cv_inet6_addrstrlen = yes ; then
5800                 ol_link_ipv6=yes
5801         elif test $ol_enable_ipv6 = yes ; then
5802                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
5803         fi
5804 fi
5805
5806 if test $ol_enable_local != no ; then
5807         for ac_hdr in sys/un.h 
5808 do
5809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5811 echo "configure:5812: checking for $ac_hdr" >&5
5812 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5813   echo $ac_n "(cached) $ac_c" 1>&6
5814 else
5815   cat > conftest.$ac_ext <<EOF
5816 #line 5817 "configure"
5817 #include "confdefs.h"
5818 #include <$ac_hdr>
5819 EOF
5820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5821 { (eval echo configure:5822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5823 if test -z "$ac_err"; then
5824   rm -rf conftest*
5825   eval "ac_cv_header_$ac_safe=yes"
5826 else
5827   echo "$ac_err" >&5
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -rf conftest*
5831   eval "ac_cv_header_$ac_safe=no"
5832 fi
5833 rm -f conftest*
5834 fi
5835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5838   cat >> confdefs.h <<EOF
5839 #define $ac_tr_hdr 1
5840 EOF
5841  
5842 else
5843   echo "$ac_t""no" 1>&6
5844 fi
5845 done
5846
5847
5848         if test $ol_enable_local = auto ; then
5849                 ol_enable_local=$ac_cv_header_sys_un_h
5850         elif test $ac_cv_header_sys_un_h = no ; then
5851                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
5852         fi
5853 fi
5854
5855 ol_link_kbind=no
5856 ol_link_kpasswd=no
5857 ol_link_krb5=no
5858 ol_link_krb4=no
5859
5860 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
5861         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
5862         -o $ol_with_kerberos = k425 ; then
5863
5864         for ac_hdr in krb5.h
5865 do
5866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5868 echo "configure:5869: checking for $ac_hdr" >&5
5869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5870   echo $ac_n "(cached) $ac_c" 1>&6
5871 else
5872   cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 #include <$ac_hdr>
5876 EOF
5877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5878 { (eval echo configure:5879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5880 if test -z "$ac_err"; then
5881   rm -rf conftest*
5882   eval "ac_cv_header_$ac_safe=yes"
5883 else
5884   echo "$ac_err" >&5
5885   echo "configure: failed program was:" >&5
5886   cat conftest.$ac_ext >&5
5887   rm -rf conftest*
5888   eval "ac_cv_header_$ac_safe=no"
5889 fi
5890 rm -f conftest*
5891 fi
5892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5893   echo "$ac_t""yes" 1>&6
5894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5895   cat >> confdefs.h <<EOF
5896 #define $ac_tr_hdr 1
5897 EOF
5898  
5899 else
5900   echo "$ac_t""no" 1>&6
5901 fi
5902 done
5903
5904
5905         if test $ac_cv_header_krb5_h = yes ; then
5906                                 for ac_hdr in heim_err.h
5907 do
5908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5910 echo "configure:5911: checking for $ac_hdr" >&5
5911 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5912   echo $ac_n "(cached) $ac_c" 1>&6
5913 else
5914   cat > conftest.$ac_ext <<EOF
5915 #line 5916 "configure"
5916 #include "confdefs.h"
5917 #include <$ac_hdr>
5918 EOF
5919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5920 { (eval echo configure:5921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5922 if test -z "$ac_err"; then
5923   rm -rf conftest*
5924   eval "ac_cv_header_$ac_safe=yes"
5925 else
5926   echo "$ac_err" >&5
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_header_$ac_safe=no"
5931 fi
5932 rm -f conftest*
5933 fi
5934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5935   echo "$ac_t""yes" 1>&6
5936     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5937   cat >> confdefs.h <<EOF
5938 #define $ac_tr_hdr 1
5939 EOF
5940  
5941 else
5942   echo "$ac_t""no" 1>&6
5943 fi
5944 done
5945
5946                 if test $ac_cv_header_heim_err_h = yes ; then
5947                         krb5_impl=heimdal
5948                 else
5949                         krb5_impl=mit
5950                 fi
5951
5952                 if test $krb5_impl = mit; then
5953                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5954 echo "configure:5955: checking for main in -lkrb5" >&5
5955 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5957   echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959   ac_save_LIBS="$LIBS"
5960 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964
5965 int main() {
5966 main()
5967 ; return 0; }
5968 EOF
5969 if { (eval echo configure:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5970   rm -rf conftest*
5971   eval "ac_cv_lib_$ac_lib_var=yes"
5972 else
5973   echo "configure: failed program was:" >&5
5974   cat conftest.$ac_ext >&5
5975   rm -rf conftest*
5976   eval "ac_cv_lib_$ac_lib_var=no"
5977 fi
5978 rm -f conftest*
5979 LIBS="$ac_save_LIBS"
5980
5981 fi
5982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5983   echo "$ac_t""yes" 1>&6
5984   have_krb5=yes
5985                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5986 else
5987   echo "$ac_t""no" 1>&6
5988 have_krb5=no
5989 fi
5990
5991
5992                 elif test $krb5_impl = heimdal; then
5993                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5994 echo "configure:5995: checking for main in -lkrb5" >&5
5995 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5997   echo $ac_n "(cached) $ac_c" 1>&6
5998 else
5999   ac_save_LIBS="$LIBS"
6000 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6001 cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004
6005 int main() {
6006 main()
6007 ; return 0; }
6008 EOF
6009 if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6010   rm -rf conftest*
6011   eval "ac_cv_lib_$ac_lib_var=yes"
6012 else
6013   echo "configure: failed program was:" >&5
6014   cat conftest.$ac_ext >&5
6015   rm -rf conftest*
6016   eval "ac_cv_lib_$ac_lib_var=no"
6017 fi
6018 rm -f conftest*
6019 LIBS="$ac_save_LIBS"
6020
6021 fi
6022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6023   echo "$ac_t""yes" 1>&6
6024   have_krb5=yes
6025                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6026 else
6027   echo "$ac_t""no" 1>&6
6028 have_krb5=no
6029 fi
6030
6031
6032                         cat >> confdefs.h <<\EOF
6033 #define HAVE_HEIMDAL_KERBEROS 1
6034 EOF
6035
6036                 else
6037                         have_krb5=no
6038                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6039                 fi
6040
6041                 if test $have_krb5 = yes ; then
6042                         ol_link_krb5=yes
6043
6044                         cat >> confdefs.h <<\EOF
6045 #define HAVE_KRB5 1
6046 EOF
6047
6048
6049                         if test $ol_enable_kpasswd != no ; then
6050                                 ol_link_kpasswd=yes;
6051                         fi
6052
6053                         if test $ol_with_kerberos = k5only ; then
6054                                 ol_with_kerberos=found
6055                         fi
6056
6057                 elif test $ol_with_kerberos != auto ; then
6058                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6059                 fi
6060
6061         fi
6062 fi
6063
6064 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
6065         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6066
6067         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6068 do
6069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6071 echo "configure:6072: checking for $ac_hdr" >&5
6072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6073   echo $ac_n "(cached) $ac_c" 1>&6
6074 else
6075   cat > conftest.$ac_ext <<EOF
6076 #line 6077 "configure"
6077 #include "confdefs.h"
6078 #include <$ac_hdr>
6079 EOF
6080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6081 { (eval echo configure:6082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6083 if test -z "$ac_err"; then
6084   rm -rf conftest*
6085   eval "ac_cv_header_$ac_safe=yes"
6086 else
6087   echo "$ac_err" >&5
6088   echo "configure: failed program was:" >&5
6089   cat conftest.$ac_ext >&5
6090   rm -rf conftest*
6091   eval "ac_cv_header_$ac_safe=no"
6092 fi
6093 rm -f conftest*
6094 fi
6095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6096   echo "$ac_t""yes" 1>&6
6097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6098   cat >> confdefs.h <<EOF
6099 #define $ac_tr_hdr 1
6100 EOF
6101  
6102 else
6103   echo "$ac_t""no" 1>&6
6104 fi
6105 done
6106
6107
6108         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6109                 if test $krb5_impl = mit; then
6110                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6111 echo "configure:6112: checking for main in -lkrb4" >&5
6112 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6114   echo $ac_n "(cached) $ac_c" 1>&6
6115 else
6116   ac_save_LIBS="$LIBS"
6117 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121
6122 int main() {
6123 main()
6124 ; return 0; }
6125 EOF
6126 if { (eval echo configure:6127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6127   rm -rf conftest*
6128   eval "ac_cv_lib_$ac_lib_var=yes"
6129 else
6130   echo "configure: failed program was:" >&5
6131   cat conftest.$ac_ext >&5
6132   rm -rf conftest*
6133   eval "ac_cv_lib_$ac_lib_var=no"
6134 fi
6135 rm -f conftest*
6136 LIBS="$ac_save_LIBS"
6137
6138 fi
6139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6140   echo "$ac_t""yes" 1>&6
6141   have_k425=yes
6142                                 KRB4_LIBS="-lkrb4 -ldes425"
6143 else
6144   echo "$ac_t""no" 1>&6
6145 have_k425=no
6146 fi
6147
6148
6149                 elif test $krb5_impl = heimdal; then
6150                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6151 echo "configure:6152: checking for main in -lkrb4" >&5
6152 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6154   echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156   ac_save_LIBS="$LIBS"
6157 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6158 cat > conftest.$ac_ext <<EOF
6159 #line 6160 "configure"
6160 #include "confdefs.h"
6161
6162 int main() {
6163 main()
6164 ; return 0; }
6165 EOF
6166 if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6167   rm -rf conftest*
6168   eval "ac_cv_lib_$ac_lib_var=yes"
6169 else
6170   echo "configure: failed program was:" >&5
6171   cat conftest.$ac_ext >&5
6172   rm -rf conftest*
6173   eval "ac_cv_lib_$ac_lib_var=no"
6174 fi
6175 rm -f conftest*
6176 LIBS="$ac_save_LIBS"
6177
6178 fi
6179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6180   echo "$ac_t""yes" 1>&6
6181   have_k425=yes
6182                                 KRB4_LIBS="-lkrb4"
6183 else
6184   echo "$ac_t""no" 1>&6
6185 have_k425=no
6186 fi
6187
6188
6189                 else
6190                         have_425=no
6191                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
6192                 fi
6193
6194                 if test $have_k425 = yes ; then
6195                         ol_with_kerberos=found
6196                         ol_link_krb4=yes
6197
6198                         cat >> confdefs.h <<\EOF
6199 #define HAVE_KRB425 1
6200 EOF
6201
6202                         cat >> confdefs.h <<\EOF
6203 #define HAVE_KRB4 1
6204 EOF
6205
6206
6207                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6208 echo "configure:6209: checking for des_debug in Kerberos libraries" >&5
6209 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6210   echo $ac_n "(cached) $ac_c" 1>&6
6211 else
6212   
6213                                                                 save_LIBS="$LIBS"
6214                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6215                                 cat > conftest.$ac_ext <<EOF
6216 #line 6217 "configure"
6217 #include "confdefs.h"
6218
6219 #include <kerberosIV/krb.h>
6220 #include <kerberosIV/des.h>
6221 extern int des_debug;
6222
6223 int main() {
6224
6225 des_debug = 1;
6226
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   ol_cv_var_des_debug=yes
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   ol_cv_var_des_debug=no
6237 fi
6238 rm -f conftest*
6239                                                                 LIBS="$save_LIBS"
6240                         
6241 fi
6242
6243 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6244
6245                         if test $ol_cv_var_des_debug = yes ; then
6246                                 cat >> confdefs.h <<\EOF
6247 #define HAVE_DES_DEBUG 1
6248 EOF
6249
6250                         fi
6251
6252                         LIBS="$save_LIBS"
6253                 fi
6254         fi
6255 fi
6256
6257 if test $ol_link_krb5 = yes ; then
6258         ol_with_kerberos=found
6259 fi
6260
6261 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
6262         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
6263
6264         for ac_hdr in krb.h des.h krb-archaeology.h 
6265 do
6266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6268 echo "configure:6269: checking for $ac_hdr" >&5
6269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6270   echo $ac_n "(cached) $ac_c" 1>&6
6271 else
6272   cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275 #include <$ac_hdr>
6276 EOF
6277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6278 { (eval echo configure:6279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6280 if test -z "$ac_err"; then
6281   rm -rf conftest*
6282   eval "ac_cv_header_$ac_safe=yes"
6283 else
6284   echo "$ac_err" >&5
6285   echo "configure: failed program was:" >&5
6286   cat conftest.$ac_ext >&5
6287   rm -rf conftest*
6288   eval "ac_cv_header_$ac_safe=no"
6289 fi
6290 rm -f conftest*
6291 fi
6292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6293   echo "$ac_t""yes" 1>&6
6294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6295   cat >> confdefs.h <<EOF
6296 #define $ac_tr_hdr 1
6297 EOF
6298  
6299 else
6300   echo "$ac_t""no" 1>&6
6301 fi
6302 done
6303
6304
6305         if test $ac_cv_header_krb_h = yes ; then
6306                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6307 echo "configure:6308: checking for main in -lkrb" >&5
6308 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6310   echo $ac_n "(cached) $ac_c" 1>&6
6311 else
6312   ac_save_LIBS="$LIBS"
6313 LIBS="-lkrb -ldes $LIBS"
6314 cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317
6318 int main() {
6319 main()
6320 ; return 0; }
6321 EOF
6322 if { (eval echo configure:6323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6323   rm -rf conftest*
6324   eval "ac_cv_lib_$ac_lib_var=yes"
6325 else
6326   echo "configure: failed program was:" >&5
6327   cat conftest.$ac_ext >&5
6328   rm -rf conftest*
6329   eval "ac_cv_lib_$ac_lib_var=no"
6330 fi
6331 rm -f conftest*
6332 LIBS="$ac_save_LIBS"
6333
6334 fi
6335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6336   echo "$ac_t""yes" 1>&6
6337   have_k4=yes
6338 else
6339   echo "$ac_t""no" 1>&6
6340 have_k4=no
6341 fi
6342
6343
6344                 if test $have_k4 = yes ; then
6345                         ol_with_kerberos=found
6346                         ol_link_krb4=yes
6347
6348                         cat >> confdefs.h <<\EOF
6349 #define HAVE_KRB4 1
6350 EOF
6351
6352
6353                         KRB4_LIBS="-lkrb -ldes"
6354
6355                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6356                                 cat >> confdefs.h <<\EOF
6357 #define HAVE_KTH_KERBEROS 1
6358 EOF
6359
6360                         fi
6361                 fi
6362         fi
6363 fi
6364
6365 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6366         ol_link_kpasswd=yes
6367 fi
6368
6369 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
6370         ol_link_kbind=yes
6371
6372 elif test $ol_enable_kbind = yes ; then
6373         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
6374 fi
6375
6376 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6377         cat >> confdefs.h <<\EOF
6378 #define HAVE_KERBEROS 1
6379 EOF
6380
6381
6382 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6383         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
6384 fi
6385
6386 ol_link_tls=no
6387 if test $ol_with_tls != no ; then
6388         for ac_hdr in openssl/ssl.h ssl.h
6389 do
6390 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6391 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6392 echo "configure:6393: checking for $ac_hdr" >&5
6393 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6394   echo $ac_n "(cached) $ac_c" 1>&6
6395 else
6396   cat > conftest.$ac_ext <<EOF
6397 #line 6398 "configure"
6398 #include "confdefs.h"
6399 #include <$ac_hdr>
6400 EOF
6401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6402 { (eval echo configure:6403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6404 if test -z "$ac_err"; then
6405   rm -rf conftest*
6406   eval "ac_cv_header_$ac_safe=yes"
6407 else
6408   echo "$ac_err" >&5
6409   echo "configure: failed program was:" >&5
6410   cat conftest.$ac_ext >&5
6411   rm -rf conftest*
6412   eval "ac_cv_header_$ac_safe=no"
6413 fi
6414 rm -f conftest*
6415 fi
6416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6417   echo "$ac_t""yes" 1>&6
6418     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6419   cat >> confdefs.h <<EOF
6420 #define $ac_tr_hdr 1
6421 EOF
6422  
6423 else
6424   echo "$ac_t""no" 1>&6
6425 fi
6426 done
6427
6428         
6429         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6430                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6431 echo "configure:6432: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6432 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6434   echo $ac_n "(cached) $ac_c" 1>&6
6435 else
6436   ac_save_LIBS="$LIBS"
6437 LIBS="-lssl -lcrypto $LIBS"
6438 cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 /* Override any gcc2 internal prototype to avoid an error.  */
6442 /* We use char because int might match the return type of a gcc2
6443     builtin and then its argument prototype would still apply.  */
6444 char SSLeay_add_ssl_algorithms();
6445
6446 int main() {
6447 SSLeay_add_ssl_algorithms()
6448 ; return 0; }
6449 EOF
6450 if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6451   rm -rf conftest*
6452   eval "ac_cv_lib_$ac_lib_var=yes"
6453 else
6454   echo "configure: failed program was:" >&5
6455   cat conftest.$ac_ext >&5
6456   rm -rf conftest*
6457   eval "ac_cv_lib_$ac_lib_var=no"
6458 fi
6459 rm -f conftest*
6460 LIBS="$ac_save_LIBS"
6461
6462 fi
6463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6464   echo "$ac_t""yes" 1>&6
6465   have_ssleay=yes
6466                         need_rsaref=no
6467 else
6468   echo "$ac_t""no" 1>&6
6469 have_ssleay=no
6470 fi
6471
6472                         
6473                 if test $have_ssleay = no ; then
6474                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6475 echo "configure:6476: checking for SSL_library_init in -lssl" >&5
6476 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6478   echo $ac_n "(cached) $ac_c" 1>&6
6479 else
6480   ac_save_LIBS="$LIBS"
6481 LIBS="-lssl -lcrypto $LIBS"
6482 cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* Override any gcc2 internal prototype to avoid an error.  */
6486 /* We use char because int might match the return type of a gcc2
6487     builtin and then its argument prototype would still apply.  */
6488 char SSL_library_init();
6489
6490 int main() {
6491 SSL_library_init()
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_lib_$ac_lib_var=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_lib_$ac_lib_var=no"
6502 fi
6503 rm -f conftest*
6504 LIBS="$ac_save_LIBS"
6505
6506 fi
6507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6508   echo "$ac_t""yes" 1>&6
6509   have_ssleay=yes
6510                                 need_rsaref=no
6511 else
6512   echo "$ac_t""no" 1>&6
6513 have_ssleay=no
6514 fi
6515
6516                 fi
6517
6518                 if test $have_ssleay = no ; then
6519                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6520 echo "configure:6521: checking for ssl3_accept in -lssl" >&5
6521 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6522 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6523   echo $ac_n "(cached) $ac_c" 1>&6
6524 else
6525   ac_save_LIBS="$LIBS"
6526 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6527 cat > conftest.$ac_ext <<EOF
6528 #line 6529 "configure"
6529 #include "confdefs.h"
6530 /* Override any gcc2 internal prototype to avoid an error.  */
6531 /* We use char because int might match the return type of a gcc2
6532     builtin and then its argument prototype would still apply.  */
6533 char ssl3_accept();
6534
6535 int main() {
6536 ssl3_accept()
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_lib_$ac_lib_var=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_lib_$ac_lib_var=no"
6547 fi
6548 rm -f conftest*
6549 LIBS="$ac_save_LIBS"
6550
6551 fi
6552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6553   echo "$ac_t""yes" 1>&6
6554   have_ssleay=yes
6555                                 need_rsaref=yes
6556 else
6557   echo "$ac_t""no" 1>&6
6558 have_ssleay=no
6559 fi
6560
6561                 fi
6562
6563                 if test $have_ssleay = yes ; then
6564                         ol_with_tls=found
6565                         ol_link_tls=yes
6566
6567                         cat >> confdefs.h <<\EOF
6568 #define HAVE_SSLEAY 1
6569 EOF
6570
6571
6572                         if test $need_rsaref = yes; then
6573                                 cat >> confdefs.h <<\EOF
6574 #define HAVE_RSAREF 1
6575 EOF
6576
6577
6578                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6579                         else
6580                                 TLS_LIBS="-lssl -lcrypto"
6581                         fi
6582                 fi
6583         fi
6584
6585 else
6586         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6587 fi
6588
6589 if test $ol_link_tls = yes ; then
6590         cat >> confdefs.h <<\EOF
6591 #define HAVE_TLS 1
6592 EOF
6593
6594
6595 elif test $ol_with_tls = auto ; then
6596         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
6597         echo "configure: warning: TLS privacy protection not supported!" 1>&2
6598
6599 elif test $ol_with_tls != no ; then
6600         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
6601 fi
6602
6603 for ac_func in \
6604         ctime_r                 \
6605         gethostbyname_r gethostbyaddr_r \
6606
6607 do
6608 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6609 echo "configure:6610: checking for $ac_func" >&5
6610 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6611   echo $ac_n "(cached) $ac_c" 1>&6
6612 else
6613   cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616 /* System header to define __stub macros and hopefully few prototypes,
6617     which can conflict with char $ac_func(); below.  */
6618 #include <assert.h>
6619 /* Override any gcc2 internal prototype to avoid an error.  */
6620 /* We use char because int might match the return type of a gcc2
6621     builtin and then its argument prototype would still apply.  */
6622 char $ac_func();
6623 char (*f)();
6624
6625 int main() {
6626
6627 /* The GNU C library defines this for functions which it implements
6628     to always fail with ENOSYS.  Some functions are actually named
6629     something starting with __ and the normal name is an alias.  */
6630 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6631 choke me
6632 #else
6633 f = $ac_func;
6634 #endif
6635
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   eval "ac_cv_func_$ac_func=yes"
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   eval "ac_cv_func_$ac_func=no"
6646 fi
6647 rm -f conftest*
6648 fi
6649
6650 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6651   echo "$ac_t""yes" 1>&6
6652     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6653   cat >> confdefs.h <<EOF
6654 #define $ac_tr_func 1
6655 EOF
6656  
6657 else
6658   echo "$ac_t""no" 1>&6
6659 fi
6660 done
6661
6662
6663 if test "$ac_cv_func_ctime_r" = no ; then
6664         ol_cv_func_ctime_r_nargs=0
6665 else
6666         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6667 echo "configure:6668: checking number of arguments of ctime_r" >&5
6668 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6669   echo $ac_n "(cached) $ac_c" 1>&6
6670 else
6671   cat > conftest.$ac_ext <<EOF
6672 #line 6673 "configure"
6673 #include "confdefs.h"
6674 #include <time.h>
6675 int main() {
6676 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6677 ; return 0; }
6678 EOF
6679 if { (eval echo configure:6680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6680   rm -rf conftest*
6681   ol_cv_func_ctime_r_nargs3=yes
6682 else
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -rf conftest*
6686   ol_cv_func_ctime_r_nargs3=no
6687 fi
6688 rm -f conftest*
6689
6690         cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 #include <time.h>
6694 int main() {
6695 time_t ti; char *buffer; ctime_r(&ti,buffer);
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6699   rm -rf conftest*
6700   ol_cv_func_ctime_r_nargs2=yes
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   ol_cv_func_ctime_r_nargs2=no
6706 fi
6707 rm -f conftest*
6708
6709         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6710                 $ol_cv_func_ctime_r_nargs2 = no ; then
6711
6712                 ol_cv_func_ctime_r_nargs=3
6713
6714         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6715                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6716
6717                 ol_cv_func_ctime_r_nargs=2
6718
6719         else
6720                 ol_cv_func_ctime_r_nargs=0
6721         fi
6722   
6723 fi
6724
6725 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6726
6727   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6728         cat >> confdefs.h <<EOF
6729 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6730 EOF
6731
6732   fi
6733
6734 fi
6735
6736 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6737         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6738 echo "configure:6739: checking number of arguments of gethostbyname_r" >&5
6739 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6740   echo $ac_n "(cached) $ac_c" 1>&6
6741 else
6742   cat > conftest.$ac_ext <<EOF
6743 #line 6744 "configure"
6744 #include "confdefs.h"
6745 #include <sys/types.h>
6746 #include <sys/socket.h>
6747 #include <netinet/in.h>
6748 #include <netdb.h>
6749 #define BUFSIZE (sizeof(struct hostent)+10)
6750 int main() {
6751 struct hostent hent; char buffer[BUFSIZE];
6752                 int bufsize=BUFSIZE;int h_errno;
6753                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6754                         buffer, bufsize, &h_errno);
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6758   rm -rf conftest*
6759   ol_cv_func_gethostbyname_r_nargs5=yes
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   ol_cv_func_gethostbyname_r_nargs5=no
6765 fi
6766 rm -f conftest*
6767
6768         cat > conftest.$ac_ext <<EOF
6769 #line 6770 "configure"
6770 #include "confdefs.h"
6771 #include <sys/types.h>
6772 #include <sys/socket.h>
6773 #include <netinet/in.h>
6774 #include <netdb.h>
6775 #define BUFSIZE (sizeof(struct hostent)+10)
6776 int main() {
6777 struct hostent hent;struct hostent *rhent;
6778                 char buffer[BUFSIZE];
6779                 int bufsize=BUFSIZE;int h_errno;
6780                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6781                         &rhent, &h_errno);
6782 ; return 0; }
6783 EOF
6784 if { (eval echo configure:6785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6785   rm -rf conftest*
6786   ol_cv_func_gethostbyname_r_nargs6=yes
6787 else
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -rf conftest*
6791   ol_cv_func_gethostbyname_r_nargs6=no
6792 fi
6793 rm -f conftest*
6794
6795         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6796                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6797
6798                 ol_cv_func_gethostbyname_r_nargs=5
6799
6800         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6801                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6802
6803                 ol_cv_func_gethostbyname_r_nargs=6
6804
6805         else
6806                 ol_cv_func_gethostbyname_r_nargs=0
6807         fi
6808   
6809 fi
6810
6811 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6812   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6813         cat >> confdefs.h <<EOF
6814 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6815 EOF
6816
6817   fi
6818
6819 else
6820         ol_cv_func_gethostbyname_r_nargs=0
6821 fi
6822  
6823 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6824         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6825 echo "configure:6826: checking number of arguments of gethostbyaddr_r" >&5
6826 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 #include <sys/types.h>
6833 #include <sys/socket.h>
6834 #include <netinet/in.h>
6835 #include <netdb.h>
6836 #define BUFSIZE (sizeof(struct hostent)+10)
6837 int main() {
6838 struct hostent hent; char buffer[BUFSIZE]; 
6839             struct in_addr add;
6840             size_t alen=sizeof(struct in_addr);
6841             int bufsize=BUFSIZE;int h_errno;
6842                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6843                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6844 ; return 0; }
6845 EOF
6846 if { (eval echo configure:6847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6847   rm -rf conftest*
6848   ol_cv_func_gethostbyaddr_r_nargs7=yes
6849 else
6850   echo "configure: failed program was:" >&5
6851   cat conftest.$ac_ext >&5
6852   rm -rf conftest*
6853   ol_cv_func_gethostbyaddr_r_nargs7=no
6854 fi
6855 rm -f conftest*
6856
6857         cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 #include <sys/types.h>
6861 #include <sys/socket.h>
6862 #include <netinet/in.h>
6863 #include <netdb.h>
6864 #define BUFSIZE (sizeof(struct hostent)+10)
6865 int main() {
6866 struct hostent hent;
6867                 struct hostent *rhent; char buffer[BUFSIZE]; 
6868                 struct in_addr add;
6869                 size_t alen=sizeof(struct in_addr);
6870                 int bufsize=BUFSIZE;int h_errno;
6871                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6872                         alen, AF_INET, &hent, buffer, bufsize, 
6873                         &rhent, &h_errno);
6874 ; return 0; }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6877   rm -rf conftest*
6878   ol_cv_func_gethostbyaddr_r_nargs8=yes
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -rf conftest*
6883   ol_cv_func_gethostbyaddr_r_nargs8=no
6884 fi
6885 rm -f conftest*
6886
6887         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6888                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6889
6890                 ol_cv_func_gethostbyaddr_r_nargs=7
6891
6892         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6893                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6894
6895                 ol_cv_func_gethostbyaddr_r_nargs=8
6896
6897         else
6898                 ol_cv_func_gethostbyaddr_r_nargs=0
6899         fi
6900   
6901 fi
6902
6903 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6904   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6905     cat >> confdefs.h <<EOF
6906 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6907 EOF
6908
6909   fi
6910
6911 else
6912         ol_cv_func_gethostbyaddr_r_nargs=0
6913 fi
6914
6915 if test "$ac_cv_func_ctime_r" = yes \
6916         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6917         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6918         -a "$ac_cv_func_gethostbyname_r" = yes \
6919         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6920         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6921         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6922         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6923         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6924         ; then
6925  
6926         cat >> confdefs.h <<\EOF
6927 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6928 EOF
6929
6930 fi
6931
6932 ol_link_threads=no
6933
6934 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6935         -o $ol_with_threads = nt ; then
6936
6937         
6938         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6939 echo "configure:6940: checking for NT Threads" >&5
6940 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943   
6944                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6945 echo "configure:6946: checking for _beginthread" >&5
6946 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6947   echo $ac_n "(cached) $ac_c" 1>&6
6948 else
6949   cat > conftest.$ac_ext <<EOF
6950 #line 6951 "configure"
6951 #include "confdefs.h"
6952 /* System header to define __stub macros and hopefully few prototypes,
6953     which can conflict with char _beginthread(); below.  */
6954 #include <assert.h>
6955 /* Override any gcc2 internal prototype to avoid an error.  */
6956 /* We use char because int might match the return type of a gcc2
6957     builtin and then its argument prototype would still apply.  */
6958 char _beginthread();
6959 char (*f)();
6960
6961 int main() {
6962
6963 /* The GNU C library defines this for functions which it implements
6964     to always fail with ENOSYS.  Some functions are actually named
6965     something starting with __ and the normal name is an alias.  */
6966 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6967 choke me
6968 #else
6969 f = _beginthread;
6970 #endif
6971
6972 ; return 0; }
6973 EOF
6974 if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6975   rm -rf conftest*
6976   eval "ac_cv_func__beginthread=yes"
6977 else
6978   echo "configure: failed program was:" >&5
6979   cat conftest.$ac_ext >&5
6980   rm -rf conftest*
6981   eval "ac_cv_func__beginthread=no"
6982 fi
6983 rm -f conftest*
6984 fi
6985
6986 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6987   echo "$ac_t""yes" 1>&6
6988   ol_cv_nt_threads=yes
6989 else
6990   echo "$ac_t""no" 1>&6
6991 ol_cv_nt_threads=no
6992 fi
6993
6994         
6995 fi
6996
6997 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6998
6999         if test $ol_cv_nt_threads = yes ; then
7000                 cat >> confdefs.h <<\EOF
7001 #define HAVE_NT_THREADS 1
7002 EOF
7003
7004         fi
7005
7006
7007         if test "$ol_cv_nt_threads" = yes ; then
7008         ol_link_threads=nt
7009         ol_with_threads=found
7010         ol_with_yielding_select=yes
7011
7012                 cat >> confdefs.h <<\EOF
7013 #define HAVE_NT_SERVICE_MANAGER 1
7014 EOF
7015
7016                 cat >> confdefs.h <<\EOF
7017 #define HAVE_NT_EVENT_LOG 1
7018 EOF
7019
7020         fi
7021
7022         if test $ol_with_threads = nt ; then
7023                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7024         fi
7025 fi
7026
7027 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7028         -o $ol_with_threads = posix ; then
7029
7030         for ac_hdr in pthread.h
7031 do
7032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7034 echo "configure:7035: checking for $ac_hdr" >&5
7035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7036   echo $ac_n "(cached) $ac_c" 1>&6
7037 else
7038   cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 #include <$ac_hdr>
7042 EOF
7043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7044 { (eval echo configure:7045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7046 if test -z "$ac_err"; then
7047   rm -rf conftest*
7048   eval "ac_cv_header_$ac_safe=yes"
7049 else
7050   echo "$ac_err" >&5
7051   echo "configure: failed program was:" >&5
7052   cat conftest.$ac_ext >&5
7053   rm -rf conftest*
7054   eval "ac_cv_header_$ac_safe=no"
7055 fi
7056 rm -f conftest*
7057 fi
7058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7059   echo "$ac_t""yes" 1>&6
7060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7061   cat >> confdefs.h <<EOF
7062 #define $ac_tr_hdr 1
7063 EOF
7064  
7065 else
7066   echo "$ac_t""no" 1>&6
7067 fi
7068 done
7069
7070
7071         if test $ac_cv_header_pthread_h = yes ; then
7072                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7073 echo "configure:7074: checking POSIX thread version" >&5
7074 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077   
7078         cat > conftest.$ac_ext <<EOF
7079 #line 7080 "configure"
7080 #include "confdefs.h"
7081
7082 #               include <pthread.h>
7083                 /* this check could be improved */
7084 #               ifdef PTHREAD_ONCE_INIT
7085                         pthread_version_final;
7086 #               endif
7087         
7088 EOF
7089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7090   egrep "pthread_version_final" >/dev/null 2>&1; then
7091   rm -rf conftest*
7092   ol_pthread_final=yes
7093 else
7094   rm -rf conftest*
7095   ol_pthread_final=no
7096 fi
7097 rm -f conftest*
7098
7099
7100         cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103
7104 #               include <pthread.h>
7105                 /* this check could be improved */
7106 #               ifdef pthread_once_init
7107                         pthread_version_draft4;
7108 #               endif
7109         
7110 EOF
7111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7112   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7113   rm -rf conftest*
7114   ol_pthread_draft4=yes
7115 else
7116   rm -rf conftest*
7117   ol_pthread_draft4=no
7118 fi
7119 rm -f conftest*
7120
7121
7122         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7123                 ol_cv_pthread_version=final
7124         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7125                 ol_cv_pthread_version=draft4
7126         else
7127                 ol_cv_pthread_version=unknown
7128         fi
7129
7130 fi
7131
7132 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7133
7134
7135                 if test $ol_cv_pthread_version = final ; then
7136                         cat >> confdefs.h <<\EOF
7137 #define HAVE_PTHREADS_FINAL 1
7138 EOF
7139
7140                 elif test $ol_cv_pthread_version = draft4 ; then
7141                         cat >> confdefs.h <<\EOF
7142 #define HAVE_PTHREADS_D4 1
7143 EOF
7144
7145                 else
7146                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7147                 fi
7148
7149                 # consider threads found
7150                 ol_with_threads=found
7151
7152                 
7153         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7154 echo "configure:7155: checking for LinuxThreads pthread.h" >&5
7155 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7156   echo $ac_n "(cached) $ac_c" 1>&6
7157 else
7158   cat > conftest.$ac_ext <<EOF
7159 #line 7160 "configure"
7160 #include "confdefs.h"
7161 #include <pthread.h>
7162 EOF
7163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7164   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7165   rm -rf conftest*
7166   ol_cv_header_linux_threads=yes
7167 else
7168   rm -rf conftest*
7169   ol_cv_header_linux_threads=no
7170 fi
7171 rm -f conftest*
7172
7173                 
7174 fi
7175
7176 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7177         if test $ol_cv_header_linux_threads = yes; then
7178                 cat >> confdefs.h <<\EOF
7179 #define HAVE_LINUX_THREADS 1
7180 EOF
7181
7182         fi
7183
7184                 
7185         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7186 echo "configure:7187: checking for GNU Pth pthread.h" >&5
7187 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7188   echo $ac_n "(cached) $ac_c" 1>&6
7189 else
7190   cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193 #include <pthread.h>
7194 #ifdef _POSIX_THREAD_IS_GNU_PTH
7195         __gnu_pth__;
7196 #endif
7197
7198 EOF
7199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7200   egrep "__gnu_pth__" >/dev/null 2>&1; then
7201   rm -rf conftest*
7202   ol_cv_header_gnu_pth_pthread_h=yes
7203 else
7204   rm -rf conftest*
7205   ol_cv_header_gnu_pth_pthread_h=no
7206 fi
7207 rm -f conftest*
7208
7209                 
7210 fi
7211
7212 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7213
7214
7215                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7216                         for ac_hdr in sched.h
7217 do
7218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7220 echo "configure:7221: checking for $ac_hdr" >&5
7221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7222   echo $ac_n "(cached) $ac_c" 1>&6
7223 else
7224   cat > conftest.$ac_ext <<EOF
7225 #line 7226 "configure"
7226 #include "confdefs.h"
7227 #include <$ac_hdr>
7228 EOF
7229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7230 { (eval echo configure:7231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7232 if test -z "$ac_err"; then
7233   rm -rf conftest*
7234   eval "ac_cv_header_$ac_safe=yes"
7235 else
7236   echo "$ac_err" >&5
7237   echo "configure: failed program was:" >&5
7238   cat conftest.$ac_ext >&5
7239   rm -rf conftest*
7240   eval "ac_cv_header_$ac_safe=no"
7241 fi
7242 rm -f conftest*
7243 fi
7244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7245   echo "$ac_t""yes" 1>&6
7246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7247   cat >> confdefs.h <<EOF
7248 #define $ac_tr_hdr 1
7249 EOF
7250  
7251 else
7252   echo "$ac_t""no" 1>&6
7253 fi
7254 done
7255
7256                 fi
7257
7258                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7259                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7260 echo "configure:7261: checking for pthread_create in default libraries" >&5
7261 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7262   echo $ac_n "(cached) $ac_c" 1>&6
7263 else
7264   
7265                 if test "$cross_compiling" = yes; then
7266   cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269 /* pthread test headers */
7270 #include <pthread.h>
7271 #ifndef NULL
7272 #define NULL (void*)0
7273 #endif
7274
7275 static void *task(p)
7276         void *p;
7277 {
7278         return (void *) (p == NULL);
7279 }
7280
7281 int main() {
7282
7283         /* pthread test function */
7284         pthread_t t;
7285         int status;
7286 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7287         /* This system (e.g. AIX) defaults detached; must override */
7288         pthread_attr_t attr;
7289
7290         status = pthread_attr_init(&attr);
7291         if( status ) exit( status );
7292
7293         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7294         if( status ) exit( status );
7295
7296 #define ATTR    &attr
7297 #else
7298 #if HAVE_PTHREADS_D4
7299 #define ATTR    pthread_attr_default
7300 #else
7301 #define ATTR    NULL
7302 #endif
7303 #endif
7304         /* make sure pthread_create() isn't just a stub */
7305         status = pthread_create(&t, ATTR, task, NULL);
7306         if( status ) exit( status );
7307
7308         /* make sure pthread_detach() isn't just a stub */
7309 #if HAVE_PTHREADS_D4
7310         status = pthread_detach( &t );
7311 #else
7312         status = pthread_detach( t );
7313 #endif
7314
7315 #ifdef HAVE_LINUX_THREADS
7316         pthread_kill_other_threads_np();
7317 #endif
7318
7319         exit( status );
7320
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   ol_cv_pthread_create=yes
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   ol_cv_pthread_create=no
7331 fi
7332 rm -f conftest*
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 /* pthread test headers */
7338 #include <pthread.h>
7339 #ifndef NULL
7340 #define NULL (void*)0
7341 #endif
7342
7343 static void *task(p)
7344         void *p;
7345 {
7346         return (void *) (p == NULL);
7347 }
7348
7349
7350 int main(argc, argv)
7351         int argc;
7352         char **argv;
7353 {
7354
7355         /* pthread test function */
7356         pthread_t t;
7357         int status;
7358 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7359         /* This system (e.g. AIX) defaults detached; must override */
7360         pthread_attr_t attr;
7361
7362         status = pthread_attr_init(&attr);
7363         if( status ) exit( status );
7364
7365         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7366         if( status ) exit( status );
7367
7368 #define ATTR    &attr
7369 #else
7370 #if HAVE_PTHREADS_D4
7371 #define ATTR    pthread_attr_default
7372 #else
7373 #define ATTR    NULL
7374 #endif
7375 #endif
7376         /* make sure pthread_create() isn't just a stub */
7377         status = pthread_create(&t, ATTR, task, NULL);
7378         if( status ) exit( status );
7379
7380         /* make sure pthread_detach() isn't just a stub */
7381 #if HAVE_PTHREADS_D4
7382         status = pthread_detach( &t );
7383 #else
7384         status = pthread_detach( t );
7385 #endif
7386
7387 #ifdef HAVE_LINUX_THREADS
7388         pthread_kill_other_threads_np();
7389 #endif
7390
7391         exit( status );
7392
7393 }
7394
7395 EOF
7396 if { (eval echo configure:7397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7397 then
7398   ol_cv_pthread_create=yes
7399 else
7400   echo "configure: failed program was:" >&5
7401   cat conftest.$ac_ext >&5
7402   rm -fr conftest*
7403   ol_cv_pthread_create=no
7404 fi
7405 rm -fr conftest*
7406 fi
7407
7408 fi
7409
7410 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7411
7412                 if test $ol_cv_pthread_create != no ; then
7413                         ol_link_threads=posix
7414                         ol_link_pthreads=""
7415                 fi
7416                 
7417                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7418 if test "$ol_link_threads" = no ; then
7419         # try -kthread
7420         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7421 echo "configure:7422: checking for pthread link with -kthread" >&5
7422 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7423   echo $ac_n "(cached) $ac_c" 1>&6
7424 else
7425   
7426                 # save the flags
7427                 ol_LIBS="$LIBS"
7428                 LIBS="-kthread $LIBS"
7429
7430                 if test "$cross_compiling" = yes; then
7431   cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 /* pthread test headers */
7435 #include <pthread.h>
7436 #ifndef NULL
7437 #define NULL (void*)0
7438 #endif
7439
7440 static void *task(p)
7441         void *p;
7442 {
7443         return (void *) (p == NULL);
7444 }
7445
7446 int main() {
7447
7448         /* pthread test function */
7449         pthread_t t;
7450         int status;
7451 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7452         /* This system (e.g. AIX) defaults detached; must override */
7453         pthread_attr_t attr;
7454
7455         status = pthread_attr_init(&attr);
7456         if( status ) exit( status );
7457
7458         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7459         if( status ) exit( status );
7460
7461 #define ATTR    &attr
7462 #else
7463 #if HAVE_PTHREADS_D4
7464 #define ATTR    pthread_attr_default
7465 #else
7466 #define ATTR    NULL
7467 #endif
7468 #endif
7469         /* make sure pthread_create() isn't just a stub */
7470         status = pthread_create(&t, ATTR, task, NULL);
7471         if( status ) exit( status );
7472
7473         /* make sure pthread_detach() isn't just a stub */
7474 #if HAVE_PTHREADS_D4
7475         status = pthread_detach( &t );
7476 #else
7477         status = pthread_detach( t );
7478 #endif
7479
7480 #ifdef HAVE_LINUX_THREADS
7481         pthread_kill_other_threads_np();
7482 #endif
7483
7484         exit( status );
7485
7486 ; return 0; }
7487 EOF
7488 if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7489   rm -rf conftest*
7490   ol_cv_pthread_kthread=yes
7491 else
7492   echo "configure: failed program was:" >&5
7493   cat conftest.$ac_ext >&5
7494   rm -rf conftest*
7495   ol_cv_pthread_kthread=no
7496 fi
7497 rm -f conftest*
7498 else
7499   cat > conftest.$ac_ext <<EOF
7500 #line 7501 "configure"
7501 #include "confdefs.h"
7502 /* pthread test headers */
7503 #include <pthread.h>
7504 #ifndef NULL
7505 #define NULL (void*)0
7506 #endif
7507
7508 static void *task(p)
7509         void *p;
7510 {
7511         return (void *) (p == NULL);
7512 }
7513
7514
7515 int main(argc, argv)
7516         int argc;
7517         char **argv;
7518 {
7519
7520         /* pthread test function */
7521         pthread_t t;
7522         int status;
7523 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7524         /* This system (e.g. AIX) defaults detached; must override */
7525         pthread_attr_t attr;
7526
7527         status = pthread_attr_init(&attr);
7528         if( status ) exit( status );
7529
7530         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7531         if( status ) exit( status );
7532
7533 #define ATTR    &attr
7534 #else
7535 #if HAVE_PTHREADS_D4
7536 #define ATTR    pthread_attr_default
7537 #else
7538 #define ATTR    NULL
7539 #endif
7540 #endif
7541         /* make sure pthread_create() isn't just a stub */
7542         status = pthread_create(&t, ATTR, task, NULL);
7543         if( status ) exit( status );
7544
7545         /* make sure pthread_detach() isn't just a stub */
7546 #if HAVE_PTHREADS_D4
7547         status = pthread_detach( &t );
7548 #else
7549         status = pthread_detach( t );
7550 #endif
7551
7552 #ifdef HAVE_LINUX_THREADS
7553         pthread_kill_other_threads_np();
7554 #endif
7555
7556         exit( status );
7557
7558 }
7559
7560 EOF
7561 if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7562 then
7563   ol_cv_pthread_kthread=yes
7564 else
7565   echo "configure: failed program was:" >&5
7566   cat conftest.$ac_ext >&5
7567   rm -fr conftest*
7568   ol_cv_pthread_kthread=no
7569 fi
7570 rm -fr conftest*
7571 fi
7572
7573
7574                 # restore the LIBS
7575                 LIBS="$ol_LIBS"
7576         
7577 fi
7578
7579 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7580
7581         if test $ol_cv_pthread_kthread = yes ; then
7582                 ol_link_pthreads="-kthread"
7583                 ol_link_threads=posix
7584         fi
7585 fi
7586
7587                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7588 if test "$ol_link_threads" = no ; then
7589         # try -pthread
7590         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7591 echo "configure:7592: checking for pthread link with -pthread" >&5
7592 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7593   echo $ac_n "(cached) $ac_c" 1>&6
7594 else
7595   
7596                 # save the flags
7597                 ol_LIBS="$LIBS"
7598                 LIBS="-pthread $LIBS"
7599
7600                 if test "$cross_compiling" = yes; then
7601   cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7604 /* pthread test headers */
7605 #include <pthread.h>
7606 #ifndef NULL
7607 #define NULL (void*)0
7608 #endif
7609
7610 static void *task(p)
7611         void *p;
7612 {
7613         return (void *) (p == NULL);
7614 }
7615
7616 int main() {
7617
7618         /* pthread test function */
7619         pthread_t t;
7620         int status;
7621 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7622         /* This system (e.g. AIX) defaults detached; must override */
7623         pthread_attr_t attr;
7624
7625         status = pthread_attr_init(&attr);
7626         if( status ) exit( status );
7627
7628         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7629         if( status ) exit( status );
7630
7631 #define ATTR    &attr
7632 #else
7633 #if HAVE_PTHREADS_D4
7634 #define ATTR    pthread_attr_default
7635 #else
7636 #define ATTR    NULL
7637 #endif
7638 #endif
7639         /* make sure pthread_create() isn't just a stub */
7640         status = pthread_create(&t, ATTR, task, NULL);
7641         if( status ) exit( status );
7642
7643         /* make sure pthread_detach() isn't just a stub */
7644 #if HAVE_PTHREADS_D4
7645         status = pthread_detach( &t );
7646 #else
7647         status = pthread_detach( t );
7648 #endif
7649
7650 #ifdef HAVE_LINUX_THREADS
7651         pthread_kill_other_threads_np();
7652 #endif
7653
7654         exit( status );
7655
7656 ; return 0; }
7657 EOF
7658 if { (eval echo configure:7659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7659   rm -rf conftest*
7660   ol_cv_pthread_pthread=yes
7661 else
7662   echo "configure: failed program was:" >&5
7663   cat conftest.$ac_ext >&5
7664   rm -rf conftest*
7665   ol_cv_pthread_pthread=no
7666 fi
7667 rm -f conftest*
7668 else
7669   cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 /* pthread test headers */
7673 #include <pthread.h>
7674 #ifndef NULL
7675 #define NULL (void*)0
7676 #endif
7677
7678 static void *task(p)
7679         void *p;
7680 {
7681         return (void *) (p == NULL);
7682 }
7683
7684
7685 int main(argc, argv)
7686         int argc;
7687         char **argv;
7688 {
7689
7690         /* pthread test function */
7691         pthread_t t;
7692         int status;
7693 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7694         /* This system (e.g. AIX) defaults detached; must override */
7695         pthread_attr_t attr;
7696
7697         status = pthread_attr_init(&attr);
7698         if( status ) exit( status );
7699
7700         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7701         if( status ) exit( status );
7702
7703 #define ATTR    &attr
7704 #else
7705 #if HAVE_PTHREADS_D4
7706 #define ATTR    pthread_attr_default
7707 #else
7708 #define ATTR    NULL
7709 #endif
7710 #endif
7711         /* make sure pthread_create() isn't just a stub */
7712         status = pthread_create(&t, ATTR, task, NULL);
7713         if( status ) exit( status );
7714
7715         /* make sure pthread_detach() isn't just a stub */
7716 #if HAVE_PTHREADS_D4
7717         status = pthread_detach( &t );
7718 #else
7719         status = pthread_detach( t );
7720 #endif
7721
7722 #ifdef HAVE_LINUX_THREADS
7723         pthread_kill_other_threads_np();
7724 #endif
7725
7726         exit( status );
7727
7728 }
7729
7730 EOF
7731 if { (eval echo configure:7732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7732 then
7733   ol_cv_pthread_pthread=yes
7734 else
7735   echo "configure: failed program was:" >&5
7736   cat conftest.$ac_ext >&5
7737   rm -fr conftest*
7738   ol_cv_pthread_pthread=no
7739 fi
7740 rm -fr conftest*
7741 fi
7742
7743
7744                 # restore the LIBS
7745                 LIBS="$ol_LIBS"
7746         
7747 fi
7748
7749 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7750
7751         if test $ol_cv_pthread_pthread = yes ; then
7752                 ol_link_pthreads="-pthread"
7753                 ol_link_threads=posix
7754         fi
7755 fi
7756
7757                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7758 if test "$ol_link_threads" = no ; then
7759         # try -pthreads
7760         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7761 echo "configure:7762: checking for pthread link with -pthreads" >&5
7762 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765   
7766                 # save the flags
7767                 ol_LIBS="$LIBS"
7768                 LIBS="-pthreads $LIBS"
7769
7770                 if test "$cross_compiling" = yes; then
7771   cat > conftest.$ac_ext <<EOF
7772 #line 7773 "configure"
7773 #include "confdefs.h"
7774 /* pthread test headers */
7775 #include <pthread.h>
7776 #ifndef NULL
7777 #define NULL (void*)0
7778 #endif
7779
7780 static void *task(p)
7781         void *p;
7782 {
7783         return (void *) (p == NULL);
7784 }
7785
7786 int main() {
7787
7788         /* pthread test function */
7789         pthread_t t;
7790         int status;
7791 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7792         /* This system (e.g. AIX) defaults detached; must override */
7793         pthread_attr_t attr;
7794
7795         status = pthread_attr_init(&attr);
7796         if( status ) exit( status );
7797
7798         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7799         if( status ) exit( status );
7800
7801 #define ATTR    &attr
7802 #else
7803 #if HAVE_PTHREADS_D4
7804 #define ATTR    pthread_attr_default
7805 #else
7806 #define ATTR    NULL
7807 #endif
7808 #endif
7809         /* make sure pthread_create() isn't just a stub */
7810         status = pthread_create(&t, ATTR, task, NULL);
7811         if( status ) exit( status );
7812
7813         /* make sure pthread_detach() isn't just a stub */
7814 #if HAVE_PTHREADS_D4
7815         status = pthread_detach( &t );
7816 #else
7817         status = pthread_detach( t );
7818 #endif
7819
7820 #ifdef HAVE_LINUX_THREADS
7821         pthread_kill_other_threads_np();
7822 #endif
7823
7824         exit( status );
7825
7826 ; return 0; }
7827 EOF
7828 if { (eval echo configure:7829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7829   rm -rf conftest*
7830   ol_cv_pthread_pthreads=yes
7831 else
7832   echo "configure: failed program was:" >&5
7833   cat conftest.$ac_ext >&5
7834   rm -rf conftest*
7835   ol_cv_pthread_pthreads=no
7836 fi
7837 rm -f conftest*
7838 else
7839   cat > conftest.$ac_ext <<EOF
7840 #line 7841 "configure"
7841 #include "confdefs.h"
7842 /* pthread test headers */
7843 #include <pthread.h>
7844 #ifndef NULL
7845 #define NULL (void*)0
7846 #endif
7847
7848 static void *task(p)
7849         void *p;
7850 {
7851         return (void *) (p == NULL);
7852 }
7853
7854
7855 int main(argc, argv)
7856         int argc;
7857         char **argv;
7858 {
7859
7860         /* pthread test function */
7861         pthread_t t;
7862         int status;
7863 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7864         /* This system (e.g. AIX) defaults detached; must override */
7865         pthread_attr_t attr;
7866
7867         status = pthread_attr_init(&attr);
7868         if( status ) exit( status );
7869
7870         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7871         if( status ) exit( status );
7872
7873 #define ATTR    &attr
7874 #else
7875 #if HAVE_PTHREADS_D4
7876 #define ATTR    pthread_attr_default
7877 #else
7878 #define ATTR    NULL
7879 #endif
7880 #endif
7881         /* make sure pthread_create() isn't just a stub */
7882         status = pthread_create(&t, ATTR, task, NULL);
7883         if( status ) exit( status );
7884
7885         /* make sure pthread_detach() isn't just a stub */
7886 #if HAVE_PTHREADS_D4
7887         status = pthread_detach( &t );
7888 #else
7889         status = pthread_detach( t );
7890 #endif
7891
7892 #ifdef HAVE_LINUX_THREADS
7893         pthread_kill_other_threads_np();
7894 #endif
7895
7896         exit( status );
7897
7898 }
7899
7900 EOF
7901 if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7902 then
7903   ol_cv_pthread_pthreads=yes
7904 else
7905   echo "configure: failed program was:" >&5
7906   cat conftest.$ac_ext >&5
7907   rm -fr conftest*
7908   ol_cv_pthread_pthreads=no
7909 fi
7910 rm -fr conftest*
7911 fi
7912
7913
7914                 # restore the LIBS
7915                 LIBS="$ol_LIBS"
7916         
7917 fi
7918
7919 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7920
7921         if test $ol_cv_pthread_pthreads = yes ; then
7922                 ol_link_pthreads="-pthreads"
7923                 ol_link_threads=posix
7924         fi
7925 fi
7926
7927                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7928 if test "$ol_link_threads" = no ; then
7929         # try -mthreads
7930         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7931 echo "configure:7932: checking for pthread link with -mthreads" >&5
7932 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7933   echo $ac_n "(cached) $ac_c" 1>&6
7934 else
7935   
7936                 # save the flags
7937                 ol_LIBS="$LIBS"
7938                 LIBS="-mthreads $LIBS"
7939
7940                 if test "$cross_compiling" = yes; then
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* pthread test headers */
7945 #include <pthread.h>
7946 #ifndef NULL
7947 #define NULL (void*)0
7948 #endif
7949
7950 static void *task(p)
7951         void *p;
7952 {
7953         return (void *) (p == NULL);
7954 }
7955
7956 int main() {
7957
7958         /* pthread test function */
7959         pthread_t t;
7960         int status;
7961 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7962         /* This system (e.g. AIX) defaults detached; must override */
7963         pthread_attr_t attr;
7964
7965         status = pthread_attr_init(&attr);
7966         if( status ) exit( status );
7967
7968         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7969         if( status ) exit( status );
7970
7971 #define ATTR    &attr
7972 #else
7973 #if HAVE_PTHREADS_D4
7974 #define ATTR    pthread_attr_default
7975 #else
7976 #define ATTR    NULL
7977 #endif
7978 #endif
7979         /* make sure pthread_create() isn't just a stub */
7980         status = pthread_create(&t, ATTR, task, NULL);
7981         if( status ) exit( status );
7982
7983         /* make sure pthread_detach() isn't just a stub */
7984 #if HAVE_PTHREADS_D4
7985         status = pthread_detach( &t );
7986 #else
7987         status = pthread_detach( t );
7988 #endif
7989
7990 #ifdef HAVE_LINUX_THREADS
7991         pthread_kill_other_threads_np();
7992 #endif
7993
7994         exit( status );
7995
7996 ; return 0; }
7997 EOF
7998 if { (eval echo configure:7999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7999   rm -rf conftest*
8000   ol_cv_pthread_mthreads=yes
8001 else
8002   echo "configure: failed program was:" >&5
8003   cat conftest.$ac_ext >&5
8004   rm -rf conftest*
8005   ol_cv_pthread_mthreads=no
8006 fi
8007 rm -f conftest*
8008 else
8009   cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 /* pthread test headers */
8013 #include <pthread.h>
8014 #ifndef NULL
8015 #define NULL (void*)0
8016 #endif
8017
8018 static void *task(p)
8019         void *p;
8020 {
8021         return (void *) (p == NULL);
8022 }
8023
8024
8025 int main(argc, argv)
8026         int argc;
8027         char **argv;
8028 {
8029
8030         /* pthread test function */
8031         pthread_t t;
8032         int status;
8033 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8034         /* This system (e.g. AIX) defaults detached; must override */
8035         pthread_attr_t attr;
8036
8037         status = pthread_attr_init(&attr);
8038         if( status ) exit( status );
8039
8040         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8041         if( status ) exit( status );
8042
8043 #define ATTR    &attr
8044 #else
8045 #if HAVE_PTHREADS_D4
8046 #define ATTR    pthread_attr_default
8047 #else
8048 #define ATTR    NULL
8049 #endif
8050 #endif
8051         /* make sure pthread_create() isn't just a stub */
8052         status = pthread_create(&t, ATTR, task, NULL);
8053         if( status ) exit( status );
8054
8055         /* make sure pthread_detach() isn't just a stub */
8056 #if HAVE_PTHREADS_D4
8057         status = pthread_detach( &t );
8058 #else
8059         status = pthread_detach( t );
8060 #endif
8061
8062 #ifdef HAVE_LINUX_THREADS
8063         pthread_kill_other_threads_np();
8064 #endif
8065
8066         exit( status );
8067
8068 }
8069
8070 EOF
8071 if { (eval echo configure:8072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8072 then
8073   ol_cv_pthread_mthreads=yes
8074 else
8075   echo "configure: failed program was:" >&5
8076   cat conftest.$ac_ext >&5
8077   rm -fr conftest*
8078   ol_cv_pthread_mthreads=no
8079 fi
8080 rm -fr conftest*
8081 fi
8082
8083
8084                 # restore the LIBS
8085                 LIBS="$ol_LIBS"
8086         
8087 fi
8088
8089 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8090
8091         if test $ol_cv_pthread_mthreads = yes ; then
8092                 ol_link_pthreads="-mthreads"
8093                 ol_link_threads=posix
8094         fi
8095 fi
8096
8097                 # Pthread try link: -thread (ol_cv_pthread_thread)
8098 if test "$ol_link_threads" = no ; then
8099         # try -thread
8100         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8101 echo "configure:8102: checking for pthread link with -thread" >&5
8102 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8103   echo $ac_n "(cached) $ac_c" 1>&6
8104 else
8105   
8106                 # save the flags
8107                 ol_LIBS="$LIBS"
8108                 LIBS="-thread $LIBS"
8109
8110                 if test "$cross_compiling" = yes; then
8111   cat > conftest.$ac_ext <<EOF
8112 #line 8113 "configure"
8113 #include "confdefs.h"
8114 /* pthread test headers */
8115 #include <pthread.h>
8116 #ifndef NULL
8117 #define NULL (void*)0
8118 #endif
8119
8120 static void *task(p)
8121         void *p;
8122 {
8123         return (void *) (p == NULL);
8124 }
8125
8126 int main() {
8127
8128         /* pthread test function */
8129         pthread_t t;
8130         int status;
8131 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8132         /* This system (e.g. AIX) defaults detached; must override */
8133         pthread_attr_t attr;
8134
8135         status = pthread_attr_init(&attr);
8136         if( status ) exit( status );
8137
8138         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8139         if( status ) exit( status );
8140
8141 #define ATTR    &attr
8142 #else
8143 #if HAVE_PTHREADS_D4
8144 #define ATTR    pthread_attr_default
8145 #else
8146 #define ATTR    NULL
8147 #endif
8148 #endif
8149         /* make sure pthread_create() isn't just a stub */
8150         status = pthread_create(&t, ATTR, task, NULL);
8151         if( status ) exit( status );
8152
8153         /* make sure pthread_detach() isn't just a stub */
8154 #if HAVE_PTHREADS_D4
8155         status = pthread_detach( &t );
8156 #else
8157         status = pthread_detach( t );
8158 #endif
8159
8160 #ifdef HAVE_LINUX_THREADS
8161         pthread_kill_other_threads_np();
8162 #endif
8163
8164         exit( status );
8165
8166 ; return 0; }
8167 EOF
8168 if { (eval echo configure:8169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8169   rm -rf conftest*
8170   ol_cv_pthread_thread=yes
8171 else
8172   echo "configure: failed program was:" >&5
8173   cat conftest.$ac_ext >&5
8174   rm -rf conftest*
8175   ol_cv_pthread_thread=no
8176 fi
8177 rm -f conftest*
8178 else
8179   cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 /* pthread test headers */
8183 #include <pthread.h>
8184 #ifndef NULL
8185 #define NULL (void*)0
8186 #endif
8187
8188 static void *task(p)
8189         void *p;
8190 {
8191         return (void *) (p == NULL);
8192 }
8193
8194
8195 int main(argc, argv)
8196         int argc;
8197         char **argv;
8198 {
8199
8200         /* pthread test function */
8201         pthread_t t;
8202         int status;
8203 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8204         /* This system (e.g. AIX) defaults detached; must override */
8205         pthread_attr_t attr;
8206
8207         status = pthread_attr_init(&attr);
8208         if( status ) exit( status );
8209
8210         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8211         if( status ) exit( status );
8212
8213 #define ATTR    &attr
8214 #else
8215 #if HAVE_PTHREADS_D4
8216 #define ATTR    pthread_attr_default
8217 #else
8218 #define ATTR    NULL
8219 #endif
8220 #endif
8221         /* make sure pthread_create() isn't just a stub */
8222         status = pthread_create(&t, ATTR, task, NULL);
8223         if( status ) exit( status );
8224
8225         /* make sure pthread_detach() isn't just a stub */
8226 #if HAVE_PTHREADS_D4
8227         status = pthread_detach( &t );
8228 #else
8229         status = pthread_detach( t );
8230 #endif
8231
8232 #ifdef HAVE_LINUX_THREADS
8233         pthread_kill_other_threads_np();
8234 #endif
8235
8236         exit( status );
8237
8238 }
8239
8240 EOF
8241 if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8242 then
8243   ol_cv_pthread_thread=yes
8244 else
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -fr conftest*
8248   ol_cv_pthread_thread=no
8249 fi
8250 rm -fr conftest*
8251 fi
8252
8253
8254                 # restore the LIBS
8255                 LIBS="$ol_LIBS"
8256         
8257 fi
8258
8259 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8260
8261         if test $ol_cv_pthread_thread = yes ; then
8262                 ol_link_pthreads="-thread"
8263                 ol_link_threads=posix
8264         fi
8265 fi
8266
8267
8268                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8269 if test "$ol_link_threads" = no ; then
8270         # try -lpthread -lmach -lexc -lc_r
8271         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8272 echo "configure:8273: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8273 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8274   echo $ac_n "(cached) $ac_c" 1>&6
8275 else
8276   
8277                 # save the flags
8278                 ol_LIBS="$LIBS"
8279                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8280
8281                 if test "$cross_compiling" = yes; then
8282   cat > conftest.$ac_ext <<EOF
8283 #line 8284 "configure"
8284 #include "confdefs.h"
8285 /* pthread test headers */
8286 #include <pthread.h>
8287 #ifndef NULL
8288 #define NULL (void*)0
8289 #endif
8290
8291 static void *task(p)
8292         void *p;
8293 {
8294         return (void *) (p == NULL);
8295 }
8296
8297 int main() {
8298
8299         /* pthread test function */
8300         pthread_t t;
8301         int status;
8302 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8303         /* This system (e.g. AIX) defaults detached; must override */
8304         pthread_attr_t attr;
8305
8306         status = pthread_attr_init(&attr);
8307         if( status ) exit( status );
8308
8309         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8310         if( status ) exit( status );
8311
8312 #define ATTR    &attr
8313 #else
8314 #if HAVE_PTHREADS_D4
8315 #define ATTR    pthread_attr_default
8316 #else
8317 #define ATTR    NULL
8318 #endif
8319 #endif
8320         /* make sure pthread_create() isn't just a stub */
8321         status = pthread_create(&t, ATTR, task, NULL);
8322         if( status ) exit( status );
8323
8324         /* make sure pthread_detach() isn't just a stub */
8325 #if HAVE_PTHREADS_D4
8326         status = pthread_detach( &t );
8327 #else
8328         status = pthread_detach( t );
8329 #endif
8330
8331 #ifdef HAVE_LINUX_THREADS
8332         pthread_kill_other_threads_np();
8333 #endif
8334
8335         exit( status );
8336
8337 ; return 0; }
8338 EOF
8339 if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8340   rm -rf conftest*
8341   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8342 else
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8347 fi
8348 rm -f conftest*
8349 else
8350   cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353 /* pthread test headers */
8354 #include <pthread.h>
8355 #ifndef NULL
8356 #define NULL (void*)0
8357 #endif
8358
8359 static void *task(p)
8360         void *p;
8361 {
8362         return (void *) (p == NULL);
8363 }
8364
8365
8366 int main(argc, argv)
8367         int argc;
8368         char **argv;
8369 {
8370
8371         /* pthread test function */
8372         pthread_t t;
8373         int status;
8374 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8375         /* This system (e.g. AIX) defaults detached; must override */
8376         pthread_attr_t attr;
8377
8378         status = pthread_attr_init(&attr);
8379         if( status ) exit( status );
8380
8381         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8382         if( status ) exit( status );
8383
8384 #define ATTR    &attr
8385 #else
8386 #if HAVE_PTHREADS_D4
8387 #define ATTR    pthread_attr_default
8388 #else
8389 #define ATTR    NULL
8390 #endif
8391 #endif
8392         /* make sure pthread_create() isn't just a stub */
8393         status = pthread_create(&t, ATTR, task, NULL);
8394         if( status ) exit( status );
8395
8396         /* make sure pthread_detach() isn't just a stub */
8397 #if HAVE_PTHREADS_D4
8398         status = pthread_detach( &t );
8399 #else
8400         status = pthread_detach( t );
8401 #endif
8402
8403 #ifdef HAVE_LINUX_THREADS
8404         pthread_kill_other_threads_np();
8405 #endif
8406
8407         exit( status );
8408
8409 }
8410
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8413 then
8414   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8415 else
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -fr conftest*
8419   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8420 fi
8421 rm -fr conftest*
8422 fi
8423
8424
8425                 # restore the LIBS
8426                 LIBS="$ol_LIBS"
8427         
8428 fi
8429
8430 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8431
8432         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8433                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8434                 ol_link_threads=posix
8435         fi
8436 fi
8437
8438                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8439 if test "$ol_link_threads" = no ; then
8440         # try -lpthread -lmach -lexc
8441         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8442 echo "configure:8443: checking for pthread link with -lpthread -lmach -lexc" >&5
8443 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8444   echo $ac_n "(cached) $ac_c" 1>&6
8445 else
8446   
8447                 # save the flags
8448                 ol_LIBS="$LIBS"
8449                 LIBS="-lpthread -lmach -lexc $LIBS"
8450
8451                 if test "$cross_compiling" = yes; then
8452   cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 /* pthread test headers */
8456 #include <pthread.h>
8457 #ifndef NULL
8458 #define NULL (void*)0
8459 #endif
8460
8461 static void *task(p)
8462         void *p;
8463 {
8464         return (void *) (p == NULL);
8465 }
8466
8467 int main() {
8468
8469         /* pthread test function */
8470         pthread_t t;
8471         int status;
8472 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8473         /* This system (e.g. AIX) defaults detached; must override */
8474         pthread_attr_t attr;
8475
8476         status = pthread_attr_init(&attr);
8477         if( status ) exit( status );
8478
8479         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8480         if( status ) exit( status );
8481
8482 #define ATTR    &attr
8483 #else
8484 #if HAVE_PTHREADS_D4
8485 #define ATTR    pthread_attr_default
8486 #else
8487 #define ATTR    NULL
8488 #endif
8489 #endif
8490         /* make sure pthread_create() isn't just a stub */
8491         status = pthread_create(&t, ATTR, task, NULL);
8492         if( status ) exit( status );
8493
8494         /* make sure pthread_detach() isn't just a stub */
8495 #if HAVE_PTHREADS_D4
8496         status = pthread_detach( &t );
8497 #else
8498         status = pthread_detach( t );
8499 #endif
8500
8501 #ifdef HAVE_LINUX_THREADS
8502         pthread_kill_other_threads_np();
8503 #endif
8504
8505         exit( status );
8506
8507 ; return 0; }
8508 EOF
8509 if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8510   rm -rf conftest*
8511   ol_cv_pthread_lpthread_lmach_lexc=yes
8512 else
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   ol_cv_pthread_lpthread_lmach_lexc=no
8517 fi
8518 rm -f conftest*
8519 else
8520   cat > conftest.$ac_ext <<EOF
8521 #line 8522 "configure"
8522 #include "confdefs.h"
8523 /* pthread test headers */
8524 #include <pthread.h>
8525 #ifndef NULL
8526 #define NULL (void*)0
8527 #endif
8528
8529 static void *task(p)
8530         void *p;
8531 {
8532         return (void *) (p == NULL);
8533 }
8534
8535
8536 int main(argc, argv)
8537         int argc;
8538         char **argv;
8539 {
8540
8541         /* pthread test function */
8542         pthread_t t;
8543         int status;
8544 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8545         /* This system (e.g. AIX) defaults detached; must override */
8546         pthread_attr_t attr;
8547
8548         status = pthread_attr_init(&attr);
8549         if( status ) exit( status );
8550
8551         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8552         if( status ) exit( status );
8553
8554 #define ATTR    &attr
8555 #else
8556 #if HAVE_PTHREADS_D4
8557 #define ATTR    pthread_attr_default
8558 #else
8559 #define ATTR    NULL
8560 #endif
8561 #endif
8562         /* make sure pthread_create() isn't just a stub */
8563         status = pthread_create(&t, ATTR, task, NULL);
8564         if( status ) exit( status );
8565
8566         /* make sure pthread_detach() isn't just a stub */
8567 #if HAVE_PTHREADS_D4
8568         status = pthread_detach( &t );
8569 #else
8570         status = pthread_detach( t );
8571 #endif
8572
8573 #ifdef HAVE_LINUX_THREADS
8574         pthread_kill_other_threads_np();
8575 #endif
8576
8577         exit( status );
8578
8579 }
8580
8581 EOF
8582 if { (eval echo configure:8583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8583 then
8584   ol_cv_pthread_lpthread_lmach_lexc=yes
8585 else
8586   echo "configure: failed program was:" >&5
8587   cat conftest.$ac_ext >&5
8588   rm -fr conftest*
8589   ol_cv_pthread_lpthread_lmach_lexc=no
8590 fi
8591 rm -fr conftest*
8592 fi
8593
8594
8595                 # restore the LIBS
8596                 LIBS="$ol_LIBS"
8597         
8598 fi
8599
8600 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8601
8602         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8603                 ol_link_pthreads="-lpthread -lmach -lexc"
8604                 ol_link_threads=posix
8605         fi
8606 fi
8607
8608
8609                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8610 if test "$ol_link_threads" = no ; then
8611         # try -lpthread -Wl,-woff,85
8612         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8613 echo "configure:8614: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8614 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8615   echo $ac_n "(cached) $ac_c" 1>&6
8616 else
8617   
8618                 # save the flags
8619                 ol_LIBS="$LIBS"
8620                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8621
8622                 if test "$cross_compiling" = yes; then
8623   cat > conftest.$ac_ext <<EOF
8624 #line 8625 "configure"
8625 #include "confdefs.h"
8626 /* pthread test headers */
8627 #include <pthread.h>
8628 #ifndef NULL
8629 #define NULL (void*)0
8630 #endif
8631
8632 static void *task(p)
8633         void *p;
8634 {
8635         return (void *) (p == NULL);
8636 }
8637
8638 int main() {
8639
8640         /* pthread test function */
8641         pthread_t t;
8642         int status;
8643 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8644         /* This system (e.g. AIX) defaults detached; must override */
8645         pthread_attr_t attr;
8646
8647         status = pthread_attr_init(&attr);
8648         if( status ) exit( status );
8649
8650         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8651         if( status ) exit( status );
8652
8653 #define ATTR    &attr
8654 #else
8655 #if HAVE_PTHREADS_D4
8656 #define ATTR    pthread_attr_default
8657 #else
8658 #define ATTR    NULL
8659 #endif
8660 #endif
8661         /* make sure pthread_create() isn't just a stub */
8662         status = pthread_create(&t, ATTR, task, NULL);
8663         if( status ) exit( status );
8664
8665         /* make sure pthread_detach() isn't just a stub */
8666 #if HAVE_PTHREADS_D4
8667         status = pthread_detach( &t );
8668 #else
8669         status = pthread_detach( t );
8670 #endif
8671
8672 #ifdef HAVE_LINUX_THREADS
8673         pthread_kill_other_threads_np();
8674 #endif
8675
8676         exit( status );
8677
8678 ; return 0; }
8679 EOF
8680 if { (eval echo configure:8681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8681   rm -rf conftest*
8682   ol_cv_pthread_lib_lpthread_woff=yes
8683 else
8684   echo "configure: failed program was:" >&5
8685   cat conftest.$ac_ext >&5
8686   rm -rf conftest*
8687   ol_cv_pthread_lib_lpthread_woff=no
8688 fi
8689 rm -f conftest*
8690 else
8691   cat > conftest.$ac_ext <<EOF
8692 #line 8693 "configure"
8693 #include "confdefs.h"
8694 /* pthread test headers */
8695 #include <pthread.h>
8696 #ifndef NULL
8697 #define NULL (void*)0
8698 #endif
8699
8700 static void *task(p)
8701         void *p;
8702 {
8703         return (void *) (p == NULL);
8704 }
8705
8706
8707 int main(argc, argv)
8708         int argc;
8709         char **argv;
8710 {
8711
8712         /* pthread test function */
8713         pthread_t t;
8714         int status;
8715 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8716         /* This system (e.g. AIX) defaults detached; must override */
8717         pthread_attr_t attr;
8718
8719         status = pthread_attr_init(&attr);
8720         if( status ) exit( status );
8721
8722         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8723         if( status ) exit( status );
8724
8725 #define ATTR    &attr
8726 #else
8727 #if HAVE_PTHREADS_D4
8728 #define ATTR    pthread_attr_default
8729 #else
8730 #define ATTR    NULL
8731 #endif
8732 #endif
8733         /* make sure pthread_create() isn't just a stub */
8734         status = pthread_create(&t, ATTR, task, NULL);
8735         if( status ) exit( status );
8736
8737         /* make sure pthread_detach() isn't just a stub */
8738 #if HAVE_PTHREADS_D4
8739         status = pthread_detach( &t );
8740 #else
8741         status = pthread_detach( t );
8742 #endif
8743
8744 #ifdef HAVE_LINUX_THREADS
8745         pthread_kill_other_threads_np();
8746 #endif
8747
8748         exit( status );
8749
8750 }
8751
8752 EOF
8753 if { (eval echo configure:8754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8754 then
8755   ol_cv_pthread_lib_lpthread_woff=yes
8756 else
8757   echo "configure: failed program was:" >&5
8758   cat conftest.$ac_ext >&5
8759   rm -fr conftest*
8760   ol_cv_pthread_lib_lpthread_woff=no
8761 fi
8762 rm -fr conftest*
8763 fi
8764
8765
8766                 # restore the LIBS
8767                 LIBS="$ol_LIBS"
8768         
8769 fi
8770
8771 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8772
8773         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8774                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8775                 ol_link_threads=posix
8776         fi
8777 fi
8778
8779
8780                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8781 if test "$ol_link_threads" = no ; then
8782         # try -lpthread
8783         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8784 echo "configure:8785: checking for pthread link with -lpthread" >&5
8785 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8786   echo $ac_n "(cached) $ac_c" 1>&6
8787 else
8788   
8789                 # save the flags
8790                 ol_LIBS="$LIBS"
8791                 LIBS="-lpthread $LIBS"
8792
8793                 if test "$cross_compiling" = yes; then
8794   cat > conftest.$ac_ext <<EOF
8795 #line 8796 "configure"
8796 #include "confdefs.h"
8797 /* pthread test headers */
8798 #include <pthread.h>
8799 #ifndef NULL
8800 #define NULL (void*)0
8801 #endif
8802
8803 static void *task(p)
8804         void *p;
8805 {
8806         return (void *) (p == NULL);
8807 }
8808
8809 int main() {
8810
8811         /* pthread test function */
8812         pthread_t t;
8813         int status;
8814 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8815         /* This system (e.g. AIX) defaults detached; must override */
8816         pthread_attr_t attr;
8817
8818         status = pthread_attr_init(&attr);
8819         if( status ) exit( status );
8820
8821         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8822         if( status ) exit( status );
8823
8824 #define ATTR    &attr
8825 #else
8826 #if HAVE_PTHREADS_D4
8827 #define ATTR    pthread_attr_default
8828 #else
8829 #define ATTR    NULL
8830 #endif
8831 #endif
8832         /* make sure pthread_create() isn't just a stub */
8833         status = pthread_create(&t, ATTR, task, NULL);
8834         if( status ) exit( status );
8835
8836         /* make sure pthread_detach() isn't just a stub */
8837 #if HAVE_PTHREADS_D4
8838         status = pthread_detach( &t );
8839 #else
8840         status = pthread_detach( t );
8841 #endif
8842
8843 #ifdef HAVE_LINUX_THREADS
8844         pthread_kill_other_threads_np();
8845 #endif
8846
8847         exit( status );
8848
8849 ; return 0; }
8850 EOF
8851 if { (eval echo configure:8852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8852   rm -rf conftest*
8853   ol_cv_pthread_lpthread=yes
8854 else
8855   echo "configure: failed program was:" >&5
8856   cat conftest.$ac_ext >&5
8857   rm -rf conftest*
8858   ol_cv_pthread_lpthread=no
8859 fi
8860 rm -f conftest*
8861 else
8862   cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8865 /* pthread test headers */
8866 #include <pthread.h>
8867 #ifndef NULL
8868 #define NULL (void*)0
8869 #endif
8870
8871 static void *task(p)
8872         void *p;
8873 {
8874         return (void *) (p == NULL);
8875 }
8876
8877
8878 int main(argc, argv)
8879         int argc;
8880         char **argv;
8881 {
8882
8883         /* pthread test function */
8884         pthread_t t;
8885         int status;
8886 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8887         /* This system (e.g. AIX) defaults detached; must override */
8888         pthread_attr_t attr;
8889
8890         status = pthread_attr_init(&attr);
8891         if( status ) exit( status );
8892
8893         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8894         if( status ) exit( status );
8895
8896 #define ATTR    &attr
8897 #else
8898 #if HAVE_PTHREADS_D4
8899 #define ATTR    pthread_attr_default
8900 #else
8901 #define ATTR    NULL
8902 #endif
8903 #endif
8904         /* make sure pthread_create() isn't just a stub */
8905         status = pthread_create(&t, ATTR, task, NULL);
8906         if( status ) exit( status );
8907
8908         /* make sure pthread_detach() isn't just a stub */
8909 #if HAVE_PTHREADS_D4
8910         status = pthread_detach( &t );
8911 #else
8912         status = pthread_detach( t );
8913 #endif
8914
8915 #ifdef HAVE_LINUX_THREADS
8916         pthread_kill_other_threads_np();
8917 #endif
8918
8919         exit( status );
8920
8921 }
8922
8923 EOF
8924 if { (eval echo configure:8925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8925 then
8926   ol_cv_pthread_lpthread=yes
8927 else
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -fr conftest*
8931   ol_cv_pthread_lpthread=no
8932 fi
8933 rm -fr conftest*
8934 fi
8935
8936
8937                 # restore the LIBS
8938                 LIBS="$ol_LIBS"
8939         
8940 fi
8941
8942 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8943
8944         if test $ol_cv_pthread_lpthread = yes ; then
8945                 ol_link_pthreads="-lpthread"
8946                 ol_link_threads=posix
8947         fi
8948 fi
8949
8950                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8951 if test "$ol_link_threads" = no ; then
8952         # try -lc_r
8953         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8954 echo "configure:8955: checking for pthread link with -lc_r" >&5
8955 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8956   echo $ac_n "(cached) $ac_c" 1>&6
8957 else
8958   
8959                 # save the flags
8960                 ol_LIBS="$LIBS"
8961                 LIBS="-lc_r $LIBS"
8962
8963                 if test "$cross_compiling" = yes; then
8964   cat > conftest.$ac_ext <<EOF
8965 #line 8966 "configure"
8966 #include "confdefs.h"
8967 /* pthread test headers */
8968 #include <pthread.h>
8969 #ifndef NULL
8970 #define NULL (void*)0
8971 #endif
8972
8973 static void *task(p)
8974         void *p;
8975 {
8976         return (void *) (p == NULL);
8977 }
8978
8979 int main() {
8980
8981         /* pthread test function */
8982         pthread_t t;
8983         int status;
8984 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8985         /* This system (e.g. AIX) defaults detached; must override */
8986         pthread_attr_t attr;
8987
8988         status = pthread_attr_init(&attr);
8989         if( status ) exit( status );
8990
8991         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8992         if( status ) exit( status );
8993
8994 #define ATTR    &attr
8995 #else
8996 #if HAVE_PTHREADS_D4
8997 #define ATTR    pthread_attr_default
8998 #else
8999 #define ATTR    NULL
9000 #endif
9001 #endif
9002         /* make sure pthread_create() isn't just a stub */
9003         status = pthread_create(&t, ATTR, task, NULL);
9004         if( status ) exit( status );
9005
9006         /* make sure pthread_detach() isn't just a stub */
9007 #if HAVE_PTHREADS_D4
9008         status = pthread_detach( &t );
9009 #else
9010         status = pthread_detach( t );
9011 #endif
9012
9013 #ifdef HAVE_LINUX_THREADS
9014         pthread_kill_other_threads_np();
9015 #endif
9016
9017         exit( status );
9018
9019 ; return 0; }
9020 EOF
9021 if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9022   rm -rf conftest*
9023   ol_cv_pthread_lc_r=yes
9024 else
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -rf conftest*
9028   ol_cv_pthread_lc_r=no
9029 fi
9030 rm -f conftest*
9031 else
9032   cat > conftest.$ac_ext <<EOF
9033 #line 9034 "configure"
9034 #include "confdefs.h"
9035 /* pthread test headers */
9036 #include <pthread.h>
9037 #ifndef NULL
9038 #define NULL (void*)0
9039 #endif
9040
9041 static void *task(p)
9042         void *p;
9043 {
9044         return (void *) (p == NULL);
9045 }
9046
9047
9048 int main(argc, argv)
9049         int argc;
9050         char **argv;
9051 {
9052
9053         /* pthread test function */
9054         pthread_t t;
9055         int status;
9056 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9057         /* This system (e.g. AIX) defaults detached; must override */
9058         pthread_attr_t attr;
9059
9060         status = pthread_attr_init(&attr);
9061         if( status ) exit( status );
9062
9063         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9064         if( status ) exit( status );
9065
9066 #define ATTR    &attr
9067 #else
9068 #if HAVE_PTHREADS_D4
9069 #define ATTR    pthread_attr_default
9070 #else
9071 #define ATTR    NULL
9072 #endif
9073 #endif
9074         /* make sure pthread_create() isn't just a stub */
9075         status = pthread_create(&t, ATTR, task, NULL);
9076         if( status ) exit( status );
9077
9078         /* make sure pthread_detach() isn't just a stub */
9079 #if HAVE_PTHREADS_D4
9080         status = pthread_detach( &t );
9081 #else
9082         status = pthread_detach( t );
9083 #endif
9084
9085 #ifdef HAVE_LINUX_THREADS
9086         pthread_kill_other_threads_np();
9087 #endif
9088
9089         exit( status );
9090
9091 }
9092
9093 EOF
9094 if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9095 then
9096   ol_cv_pthread_lc_r=yes
9097 else
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -fr conftest*
9101   ol_cv_pthread_lc_r=no
9102 fi
9103 rm -fr conftest*
9104 fi
9105
9106
9107                 # restore the LIBS
9108                 LIBS="$ol_LIBS"
9109         
9110 fi
9111
9112 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
9113
9114         if test $ol_cv_pthread_lc_r = yes ; then
9115                 ol_link_pthreads="-lc_r"
9116                 ol_link_threads=posix
9117         fi
9118 fi
9119
9120
9121                 # Pthread try link: -threads (ol_cv_pthread_threads)
9122 if test "$ol_link_threads" = no ; then
9123         # try -threads
9124         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
9125 echo "configure:9126: checking for pthread link with -threads" >&5
9126 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
9127   echo $ac_n "(cached) $ac_c" 1>&6
9128 else
9129   
9130                 # save the flags
9131                 ol_LIBS="$LIBS"
9132                 LIBS="-threads $LIBS"
9133
9134                 if test "$cross_compiling" = yes; then
9135   cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 /* pthread test headers */
9139 #include <pthread.h>
9140 #ifndef NULL
9141 #define NULL (void*)0
9142 #endif
9143
9144 static void *task(p)
9145         void *p;
9146 {
9147         return (void *) (p == NULL);
9148 }
9149
9150 int main() {
9151
9152         /* pthread test function */
9153         pthread_t t;
9154         int status;
9155 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9156         /* This system (e.g. AIX) defaults detached; must override */
9157         pthread_attr_t attr;
9158
9159         status = pthread_attr_init(&attr);
9160         if( status ) exit( status );
9161
9162         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9163         if( status ) exit( status );
9164
9165 #define ATTR    &attr
9166 #else
9167 #if HAVE_PTHREADS_D4
9168 #define ATTR    pthread_attr_default
9169 #else
9170 #define ATTR    NULL
9171 #endif
9172 #endif
9173         /* make sure pthread_create() isn't just a stub */
9174         status = pthread_create(&t, ATTR, task, NULL);
9175         if( status ) exit( status );
9176
9177         /* make sure pthread_detach() isn't just a stub */
9178 #if HAVE_PTHREADS_D4
9179         status = pthread_detach( &t );
9180 #else
9181         status = pthread_detach( t );
9182 #endif
9183
9184 #ifdef HAVE_LINUX_THREADS
9185         pthread_kill_other_threads_np();
9186 #endif
9187
9188         exit( status );
9189
9190 ; return 0; }
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9193   rm -rf conftest*
9194   ol_cv_pthread_threads=yes
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   ol_cv_pthread_threads=no
9200 fi
9201 rm -f conftest*
9202 else
9203   cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206 /* pthread test headers */
9207 #include <pthread.h>
9208 #ifndef NULL
9209 #define NULL (void*)0
9210 #endif
9211
9212 static void *task(p)
9213         void *p;
9214 {
9215         return (void *) (p == NULL);
9216 }
9217
9218
9219 int main(argc, argv)
9220         int argc;
9221         char **argv;
9222 {
9223
9224         /* pthread test function */
9225         pthread_t t;
9226         int status;
9227 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9228         /* This system (e.g. AIX) defaults detached; must override */
9229         pthread_attr_t attr;
9230
9231         status = pthread_attr_init(&attr);
9232         if( status ) exit( status );
9233
9234         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9235         if( status ) exit( status );
9236
9237 #define ATTR    &attr
9238 #else
9239 #if HAVE_PTHREADS_D4
9240 #define ATTR    pthread_attr_default
9241 #else
9242 #define ATTR    NULL
9243 #endif
9244 #endif
9245         /* make sure pthread_create() isn't just a stub */
9246         status = pthread_create(&t, ATTR, task, NULL);
9247         if( status ) exit( status );
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_threads=yes
9268 else
9269   echo "configure: failed program was:" >&5
9270   cat conftest.$ac_ext >&5
9271   rm -fr conftest*
9272   ol_cv_pthread_threads=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_threads" 1>&6
9284
9285         if test $ol_cv_pthread_threads = yes ; then
9286                 ol_link_pthreads="-threads"
9287                 ol_link_threads=posix
9288         fi
9289 fi
9290
9291
9292                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9293 if test "$ol_link_threads" = no ; then
9294         # try -lpthreads -lmach -lexc -lc_r
9295         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9296 echo "configure:9297: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9297 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9298   echo $ac_n "(cached) $ac_c" 1>&6
9299 else
9300   
9301                 # save the flags
9302                 ol_LIBS="$LIBS"
9303                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9304
9305                 if test "$cross_compiling" = yes; then
9306   cat > conftest.$ac_ext <<EOF
9307 #line 9308 "configure"
9308 #include "confdefs.h"
9309 /* pthread test headers */
9310 #include <pthread.h>
9311 #ifndef NULL
9312 #define NULL (void*)0
9313 #endif
9314
9315 static void *task(p)
9316         void *p;
9317 {
9318         return (void *) (p == NULL);
9319 }
9320
9321 int main() {
9322
9323         /* pthread test function */
9324         pthread_t t;
9325         int status;
9326 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9327         /* This system (e.g. AIX) defaults detached; must override */
9328         pthread_attr_t attr;
9329
9330         status = pthread_attr_init(&attr);
9331         if( status ) exit( status );
9332
9333         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9334         if( status ) exit( status );
9335
9336 #define ATTR    &attr
9337 #else
9338 #if HAVE_PTHREADS_D4
9339 #define ATTR    pthread_attr_default
9340 #else
9341 #define ATTR    NULL
9342 #endif
9343 #endif
9344         /* make sure pthread_create() isn't just a stub */
9345         status = pthread_create(&t, ATTR, task, NULL);
9346         if( status ) exit( status );
9347
9348         /* make sure pthread_detach() isn't just a stub */
9349 #if HAVE_PTHREADS_D4
9350         status = pthread_detach( &t );
9351 #else
9352         status = pthread_detach( t );
9353 #endif
9354
9355 #ifdef HAVE_LINUX_THREADS
9356         pthread_kill_other_threads_np();
9357 #endif
9358
9359         exit( status );
9360
9361 ; return 0; }
9362 EOF
9363 if { (eval echo configure:9364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9364   rm -rf conftest*
9365   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9366 else
9367   echo "configure: failed program was:" >&5
9368   cat conftest.$ac_ext >&5
9369   rm -rf conftest*
9370   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9371 fi
9372 rm -f conftest*
9373 else
9374   cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 /* pthread test headers */
9378 #include <pthread.h>
9379 #ifndef NULL
9380 #define NULL (void*)0
9381 #endif
9382
9383 static void *task(p)
9384         void *p;
9385 {
9386         return (void *) (p == NULL);
9387 }
9388
9389
9390 int main(argc, argv)
9391         int argc;
9392         char **argv;
9393 {
9394
9395         /* pthread test function */
9396         pthread_t t;
9397         int status;
9398 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9399         /* This system (e.g. AIX) defaults detached; must override */
9400         pthread_attr_t attr;
9401
9402         status = pthread_attr_init(&attr);
9403         if( status ) exit( status );
9404
9405         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9406         if( status ) exit( status );
9407
9408 #define ATTR    &attr
9409 #else
9410 #if HAVE_PTHREADS_D4
9411 #define ATTR    pthread_attr_default
9412 #else
9413 #define ATTR    NULL
9414 #endif
9415 #endif
9416         /* make sure pthread_create() isn't just a stub */
9417         status = pthread_create(&t, ATTR, task, NULL);
9418         if( status ) exit( status );
9419
9420         /* make sure pthread_detach() isn't just a stub */
9421 #if HAVE_PTHREADS_D4
9422         status = pthread_detach( &t );
9423 #else
9424         status = pthread_detach( t );
9425 #endif
9426
9427 #ifdef HAVE_LINUX_THREADS
9428         pthread_kill_other_threads_np();
9429 #endif
9430
9431         exit( status );
9432
9433 }
9434
9435 EOF
9436 if { (eval echo configure:9437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9437 then
9438   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9439 else
9440   echo "configure: failed program was:" >&5
9441   cat conftest.$ac_ext >&5
9442   rm -fr conftest*
9443   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9444 fi
9445 rm -fr conftest*
9446 fi
9447
9448
9449                 # restore the LIBS
9450                 LIBS="$ol_LIBS"
9451         
9452 fi
9453
9454 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9455
9456         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9457                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9458                 ol_link_threads=posix
9459         fi
9460 fi
9461
9462                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9463 if test "$ol_link_threads" = no ; then
9464         # try -lpthreads -lmach -lexc
9465         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9466 echo "configure:9467: checking for pthread link with -lpthreads -lmach -lexc" >&5
9467 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9468   echo $ac_n "(cached) $ac_c" 1>&6
9469 else
9470   
9471                 # save the flags
9472                 ol_LIBS="$LIBS"
9473                 LIBS="-lpthreads -lmach -lexc $LIBS"
9474
9475                 if test "$cross_compiling" = yes; then
9476   cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479 /* pthread test headers */
9480 #include <pthread.h>
9481 #ifndef NULL
9482 #define NULL (void*)0
9483 #endif
9484
9485 static void *task(p)
9486         void *p;
9487 {
9488         return (void *) (p == NULL);
9489 }
9490
9491 int main() {
9492
9493         /* pthread test function */
9494         pthread_t t;
9495         int status;
9496 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9497         /* This system (e.g. AIX) defaults detached; must override */
9498         pthread_attr_t attr;
9499
9500         status = pthread_attr_init(&attr);
9501         if( status ) exit( status );
9502
9503         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9504         if( status ) exit( status );
9505
9506 #define ATTR    &attr
9507 #else
9508 #if HAVE_PTHREADS_D4
9509 #define ATTR    pthread_attr_default
9510 #else
9511 #define ATTR    NULL
9512 #endif
9513 #endif
9514         /* make sure pthread_create() isn't just a stub */
9515         status = pthread_create(&t, ATTR, task, NULL);
9516         if( status ) exit( status );
9517
9518         /* make sure pthread_detach() isn't just a stub */
9519 #if HAVE_PTHREADS_D4
9520         status = pthread_detach( &t );
9521 #else
9522         status = pthread_detach( t );
9523 #endif
9524
9525 #ifdef HAVE_LINUX_THREADS
9526         pthread_kill_other_threads_np();
9527 #endif
9528
9529         exit( status );
9530
9531 ; return 0; }
9532 EOF
9533 if { (eval echo configure:9534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9534   rm -rf conftest*
9535   ol_cv_pthread_lpthreads_lmach_lexc=yes
9536 else
9537   echo "configure: failed program was:" >&5
9538   cat conftest.$ac_ext >&5
9539   rm -rf conftest*
9540   ol_cv_pthread_lpthreads_lmach_lexc=no
9541 fi
9542 rm -f conftest*
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 /* pthread test headers */
9548 #include <pthread.h>
9549 #ifndef NULL
9550 #define NULL (void*)0
9551 #endif
9552
9553 static void *task(p)
9554         void *p;
9555 {
9556         return (void *) (p == NULL);
9557 }
9558
9559
9560 int main(argc, argv)
9561         int argc;
9562         char **argv;
9563 {
9564
9565         /* pthread test function */
9566         pthread_t t;
9567         int status;
9568 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9569         /* This system (e.g. AIX) defaults detached; must override */
9570         pthread_attr_t attr;
9571
9572         status = pthread_attr_init(&attr);
9573         if( status ) exit( status );
9574
9575         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9576         if( status ) exit( status );
9577
9578 #define ATTR    &attr
9579 #else
9580 #if HAVE_PTHREADS_D4
9581 #define ATTR    pthread_attr_default
9582 #else
9583 #define ATTR    NULL
9584 #endif
9585 #endif
9586         /* make sure pthread_create() isn't just a stub */
9587         status = pthread_create(&t, ATTR, task, NULL);
9588         if( status ) exit( status );
9589
9590         /* make sure pthread_detach() isn't just a stub */
9591 #if HAVE_PTHREADS_D4
9592         status = pthread_detach( &t );
9593 #else
9594         status = pthread_detach( t );
9595 #endif
9596
9597 #ifdef HAVE_LINUX_THREADS
9598         pthread_kill_other_threads_np();
9599 #endif
9600
9601         exit( status );
9602
9603 }
9604
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9607 then
9608   ol_cv_pthread_lpthreads_lmach_lexc=yes
9609 else
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612   rm -fr conftest*
9613   ol_cv_pthread_lpthreads_lmach_lexc=no
9614 fi
9615 rm -fr conftest*
9616 fi
9617
9618
9619                 # restore the LIBS
9620                 LIBS="$ol_LIBS"
9621         
9622 fi
9623
9624 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9625
9626         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9627                 ol_link_pthreads="-lpthreads -lmach -lexc"
9628                 ol_link_threads=posix
9629         fi
9630 fi
9631
9632                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9633 if test "$ol_link_threads" = no ; then
9634         # try -lpthreads -lexc
9635         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9636 echo "configure:9637: checking for pthread link with -lpthreads -lexc" >&5
9637 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9638   echo $ac_n "(cached) $ac_c" 1>&6
9639 else
9640   
9641                 # save the flags
9642                 ol_LIBS="$LIBS"
9643                 LIBS="-lpthreads -lexc $LIBS"
9644
9645                 if test "$cross_compiling" = yes; then
9646   cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9649 /* pthread test headers */
9650 #include <pthread.h>
9651 #ifndef NULL
9652 #define NULL (void*)0
9653 #endif
9654
9655 static void *task(p)
9656         void *p;
9657 {
9658         return (void *) (p == NULL);
9659 }
9660
9661 int main() {
9662
9663         /* pthread test function */
9664         pthread_t t;
9665         int status;
9666 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9667         /* This system (e.g. AIX) defaults detached; must override */
9668         pthread_attr_t attr;
9669
9670         status = pthread_attr_init(&attr);
9671         if( status ) exit( status );
9672
9673         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9674         if( status ) exit( status );
9675
9676 #define ATTR    &attr
9677 #else
9678 #if HAVE_PTHREADS_D4
9679 #define ATTR    pthread_attr_default
9680 #else
9681 #define ATTR    NULL
9682 #endif
9683 #endif
9684         /* make sure pthread_create() isn't just a stub */
9685         status = pthread_create(&t, ATTR, task, NULL);
9686         if( status ) exit( status );
9687
9688         /* make sure pthread_detach() isn't just a stub */
9689 #if HAVE_PTHREADS_D4
9690         status = pthread_detach( &t );
9691 #else
9692         status = pthread_detach( t );
9693 #endif
9694
9695 #ifdef HAVE_LINUX_THREADS
9696         pthread_kill_other_threads_np();
9697 #endif
9698
9699         exit( status );
9700
9701 ; return 0; }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9704   rm -rf conftest*
9705   ol_cv_pthread_lpthreads_lexc=yes
9706 else
9707   echo "configure: failed program was:" >&5
9708   cat conftest.$ac_ext >&5
9709   rm -rf conftest*
9710   ol_cv_pthread_lpthreads_lexc=no
9711 fi
9712 rm -f conftest*
9713 else
9714   cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717 /* pthread test headers */
9718 #include <pthread.h>
9719 #ifndef NULL
9720 #define NULL (void*)0
9721 #endif
9722
9723 static void *task(p)
9724         void *p;
9725 {
9726         return (void *) (p == NULL);
9727 }
9728
9729
9730 int main(argc, argv)
9731         int argc;
9732         char **argv;
9733 {
9734
9735         /* pthread test function */
9736         pthread_t t;
9737         int status;
9738 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9739         /* This system (e.g. AIX) defaults detached; must override */
9740         pthread_attr_t attr;
9741
9742         status = pthread_attr_init(&attr);
9743         if( status ) exit( status );
9744
9745         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9746         if( status ) exit( status );
9747
9748 #define ATTR    &attr
9749 #else
9750 #if HAVE_PTHREADS_D4
9751 #define ATTR    pthread_attr_default
9752 #else
9753 #define ATTR    NULL
9754 #endif
9755 #endif
9756         /* make sure pthread_create() isn't just a stub */
9757         status = pthread_create(&t, ATTR, task, NULL);
9758         if( status ) exit( status );
9759
9760         /* make sure pthread_detach() isn't just a stub */
9761 #if HAVE_PTHREADS_D4
9762         status = pthread_detach( &t );
9763 #else
9764         status = pthread_detach( t );
9765 #endif
9766
9767 #ifdef HAVE_LINUX_THREADS
9768         pthread_kill_other_threads_np();
9769 #endif
9770
9771         exit( status );
9772
9773 }
9774
9775 EOF
9776 if { (eval echo configure:9777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9777 then
9778   ol_cv_pthread_lpthreads_lexc=yes
9779 else
9780   echo "configure: failed program was:" >&5
9781   cat conftest.$ac_ext >&5
9782   rm -fr conftest*
9783   ol_cv_pthread_lpthreads_lexc=no
9784 fi
9785 rm -fr conftest*
9786 fi
9787
9788
9789                 # restore the LIBS
9790                 LIBS="$ol_LIBS"
9791         
9792 fi
9793
9794 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9795
9796         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9797                 ol_link_pthreads="-lpthreads -lexc"
9798                 ol_link_threads=posix
9799         fi
9800 fi
9801
9802
9803                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9804 if test "$ol_link_threads" = no ; then
9805         # try -lpthreads
9806         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9807 echo "configure:9808: checking for pthread link with -lpthreads" >&5
9808 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9809   echo $ac_n "(cached) $ac_c" 1>&6
9810 else
9811   
9812                 # save the flags
9813                 ol_LIBS="$LIBS"
9814                 LIBS="-lpthreads $LIBS"
9815
9816                 if test "$cross_compiling" = yes; then
9817   cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* pthread test headers */
9821 #include <pthread.h>
9822 #ifndef NULL
9823 #define NULL (void*)0
9824 #endif
9825
9826 static void *task(p)
9827         void *p;
9828 {
9829         return (void *) (p == NULL);
9830 }
9831
9832 int main() {
9833
9834         /* pthread test function */
9835         pthread_t t;
9836         int status;
9837 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9838         /* This system (e.g. AIX) defaults detached; must override */
9839         pthread_attr_t attr;
9840
9841         status = pthread_attr_init(&attr);
9842         if( status ) exit( status );
9843
9844         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9845         if( status ) exit( status );
9846
9847 #define ATTR    &attr
9848 #else
9849 #if HAVE_PTHREADS_D4
9850 #define ATTR    pthread_attr_default
9851 #else
9852 #define ATTR    NULL
9853 #endif
9854 #endif
9855         /* make sure pthread_create() isn't just a stub */
9856         status = pthread_create(&t, ATTR, task, NULL);
9857         if( status ) exit( status );
9858
9859         /* make sure pthread_detach() isn't just a stub */
9860 #if HAVE_PTHREADS_D4
9861         status = pthread_detach( &t );
9862 #else
9863         status = pthread_detach( t );
9864 #endif
9865
9866 #ifdef HAVE_LINUX_THREADS
9867         pthread_kill_other_threads_np();
9868 #endif
9869
9870         exit( status );
9871
9872 ; return 0; }
9873 EOF
9874 if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9875   rm -rf conftest*
9876   ol_cv_pthread_lib_lpthreads=yes
9877 else
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   rm -rf conftest*
9881   ol_cv_pthread_lib_lpthreads=no
9882 fi
9883 rm -f conftest*
9884 else
9885   cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888 /* pthread test headers */
9889 #include <pthread.h>
9890 #ifndef NULL
9891 #define NULL (void*)0
9892 #endif
9893
9894 static void *task(p)
9895         void *p;
9896 {
9897         return (void *) (p == NULL);
9898 }
9899
9900
9901 int main(argc, argv)
9902         int argc;
9903         char **argv;
9904 {
9905
9906         /* pthread test function */
9907         pthread_t t;
9908         int status;
9909 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9910         /* This system (e.g. AIX) defaults detached; must override */
9911         pthread_attr_t attr;
9912
9913         status = pthread_attr_init(&attr);
9914         if( status ) exit( status );
9915
9916         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9917         if( status ) exit( status );
9918
9919 #define ATTR    &attr
9920 #else
9921 #if HAVE_PTHREADS_D4
9922 #define ATTR    pthread_attr_default
9923 #else
9924 #define ATTR    NULL
9925 #endif
9926 #endif
9927         /* make sure pthread_create() isn't just a stub */
9928         status = pthread_create(&t, ATTR, task, NULL);
9929         if( status ) exit( status );
9930
9931         /* make sure pthread_detach() isn't just a stub */
9932 #if HAVE_PTHREADS_D4
9933         status = pthread_detach( &t );
9934 #else
9935         status = pthread_detach( t );
9936 #endif
9937
9938 #ifdef HAVE_LINUX_THREADS
9939         pthread_kill_other_threads_np();
9940 #endif
9941
9942         exit( status );
9943
9944 }
9945
9946 EOF
9947 if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9948 then
9949   ol_cv_pthread_lib_lpthreads=yes
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -fr conftest*
9954   ol_cv_pthread_lib_lpthreads=no
9955 fi
9956 rm -fr conftest*
9957 fi
9958
9959
9960                 # restore the LIBS
9961                 LIBS="$ol_LIBS"
9962         
9963 fi
9964
9965 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9966
9967         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9968                 ol_link_pthreads="-lpthreads"
9969                 ol_link_threads=posix
9970         fi
9971 fi
9972
9973
9974                 if test $ol_link_threads != no ; then
9975                         cat >> confdefs.h <<\EOF
9976 #define HAVE_PTHREADS 1
9977 EOF
9978
9979
9980                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9981
9982                                                 save_CPPFLAGS="$CPPFLAGS"
9983                         save_LIBS="$LIBS"
9984                         LIBS="$LTHREAD_LIBS $LIBS"
9985
9986                                                                                                 for ac_func in sched_yield pthread_yield
9987 do
9988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9989 echo "configure:9990: checking for $ac_func" >&5
9990 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996 /* System header to define __stub macros and hopefully few prototypes,
9997     which can conflict with char $ac_func(); below.  */
9998 #include <assert.h>
9999 /* Override any gcc2 internal prototype to avoid an error.  */
10000 /* We use char because int might match the return type of a gcc2
10001     builtin and then its argument prototype would still apply.  */
10002 char $ac_func();
10003 char (*f)();
10004
10005 int main() {
10006
10007 /* The GNU C library defines this for functions which it implements
10008     to always fail with ENOSYS.  Some functions are actually named
10009     something starting with __ and the normal name is an alias.  */
10010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10011 choke me
10012 #else
10013 f = $ac_func;
10014 #endif
10015
10016 ; return 0; }
10017 EOF
10018 if { (eval echo configure:10019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10019   rm -rf conftest*
10020   eval "ac_cv_func_$ac_func=yes"
10021 else
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   eval "ac_cv_func_$ac_func=no"
10026 fi
10027 rm -f conftest*
10028 fi
10029
10030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10031   echo "$ac_t""yes" 1>&6
10032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10033   cat >> confdefs.h <<EOF
10034 #define $ac_tr_func 1
10035 EOF
10036  
10037 else
10038   echo "$ac_t""no" 1>&6
10039 fi
10040 done
10041
10042
10043                         if test $ac_cv_func_sched_yield = no -a \
10044                                 $ac_cv_func_pthread_yield = no ; then
10045                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
10046 echo "configure:10047: checking for sched_yield in -lrt" >&5
10047 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
10048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   ac_save_LIBS="$LIBS"
10052 LIBS="-lrt  $LIBS"
10053 cat > conftest.$ac_ext <<EOF
10054 #line 10055 "configure"
10055 #include "confdefs.h"
10056 /* Override any gcc2 internal prototype to avoid an error.  */
10057 /* We use char because int might match the return type of a gcc2
10058     builtin and then its argument prototype would still apply.  */
10059 char sched_yield();
10060
10061 int main() {
10062 sched_yield()
10063 ; return 0; }
10064 EOF
10065 if { (eval echo configure:10066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10066   rm -rf conftest*
10067   eval "ac_cv_lib_$ac_lib_var=yes"
10068 else
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -rf conftest*
10072   eval "ac_cv_lib_$ac_lib_var=no"
10073 fi
10074 rm -f conftest*
10075 LIBS="$ac_save_LIBS"
10076
10077 fi
10078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10079   echo "$ac_t""yes" 1>&6
10080   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
10081                                         cat >> confdefs.h <<\EOF
10082 #define HAVE_SCHED_YIELD 1
10083 EOF
10084
10085                                         ac_cv_func_sched_yield=yes
10086 else
10087   echo "$ac_t""no" 1>&6
10088 ac_cv_func_sched_yield=no
10089 fi
10090
10091                         fi
10092                         if test $ac_cv_func_sched_yield = no -a \
10093                                 $ac_cv_func_pthread_yield = no ; then
10094                                                                                                 for ac_func in thr_yield
10095 do
10096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10097 echo "configure:10098: checking for $ac_func" >&5
10098 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10099   echo $ac_n "(cached) $ac_c" 1>&6
10100 else
10101   cat > conftest.$ac_ext <<EOF
10102 #line 10103 "configure"
10103 #include "confdefs.h"
10104 /* System header to define __stub macros and hopefully few prototypes,
10105     which can conflict with char $ac_func(); below.  */
10106 #include <assert.h>
10107 /* Override any gcc2 internal prototype to avoid an error.  */
10108 /* We use char because int might match the return type of a gcc2
10109     builtin and then its argument prototype would still apply.  */
10110 char $ac_func();
10111 char (*f)();
10112
10113 int main() {
10114
10115 /* The GNU C library defines this for functions which it implements
10116     to always fail with ENOSYS.  Some functions are actually named
10117     something starting with __ and the normal name is an alias.  */
10118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10119 choke me
10120 #else
10121 f = $ac_func;
10122 #endif
10123
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10127   rm -rf conftest*
10128   eval "ac_cv_func_$ac_func=yes"
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   eval "ac_cv_func_$ac_func=no"
10134 fi
10135 rm -f conftest*
10136 fi
10137
10138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10139   echo "$ac_t""yes" 1>&6
10140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10141   cat >> confdefs.h <<EOF
10142 #define $ac_tr_func 1
10143 EOF
10144  
10145 else
10146   echo "$ac_t""no" 1>&6
10147 fi
10148 done
10149
10150                         fi
10151                         if test $ac_cv_func_sched_yield = no -a \
10152                                 $ac_cv_func_pthread_yield = no -a \
10153                                 "$ac_cv_func_thr_yield" = no ; then
10154                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
10155                         fi
10156
10157                                                 for ac_func in pthread_kill pthread_rwlock_destroy
10158 do
10159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10160 echo "configure:10161: checking for $ac_func" >&5
10161 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10162   echo $ac_n "(cached) $ac_c" 1>&6
10163 else
10164   cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167 /* System header to define __stub macros and hopefully few prototypes,
10168     which can conflict with char $ac_func(); below.  */
10169 #include <assert.h>
10170 /* Override any gcc2 internal prototype to avoid an error.  */
10171 /* We use char because int might match the return type of a gcc2
10172     builtin and then its argument prototype would still apply.  */
10173 char $ac_func();
10174 char (*f)();
10175
10176 int main() {
10177
10178 /* The GNU C library defines this for functions which it implements
10179     to always fail with ENOSYS.  Some functions are actually named
10180     something starting with __ and the normal name is an alias.  */
10181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10182 choke me
10183 #else
10184 f = $ac_func;
10185 #endif
10186
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10190   rm -rf conftest*
10191   eval "ac_cv_func_$ac_func=yes"
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   eval "ac_cv_func_$ac_func=no"
10197 fi
10198 rm -f conftest*
10199 fi
10200
10201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10202   echo "$ac_t""yes" 1>&6
10203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10204   cat >> confdefs.h <<EOF
10205 #define $ac_tr_func 1
10206 EOF
10207  
10208 else
10209   echo "$ac_t""no" 1>&6
10210 fi
10211 done
10212
10213
10214                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10215 echo "configure:10216: checking for pthread_detach with <pthread.h>" >&5
10216 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   
10220                                                                 cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223
10224 #include <pthread.h>
10225 #ifndef NULL
10226 #define NULL (void*)0
10227 #endif
10228
10229 int main() {
10230 pthread_detach(NULL);
10231 ; return 0; }
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10234   rm -rf conftest*
10235   ol_cv_func_pthread_detach=yes
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -rf conftest*
10240   ol_cv_func_pthread_detach=no
10241 fi
10242 rm -f conftest*
10243                         
10244 fi
10245
10246 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10247
10248                         if test $ol_cv_func_pthread_detach = no ; then
10249                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10250                         fi
10251
10252                         cat >> confdefs.h <<\EOF
10253 #define HAVE_PTHREAD_DETACH 1
10254 EOF
10255
10256
10257                                                 for ac_func in \
10258                                 pthread_setconcurrency \
10259                                 pthread_getconcurrency \
10260                                 thr_setconcurrency \
10261                                 thr_getconcurrency \
10262                         
10263 do
10264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10265 echo "configure:10266: checking for $ac_func" >&5
10266 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272 /* System header to define __stub macros and hopefully few prototypes,
10273     which can conflict with char $ac_func(); below.  */
10274 #include <assert.h>
10275 /* Override any gcc2 internal prototype to avoid an error.  */
10276 /* We use char because int might match the return type of a gcc2
10277     builtin and then its argument prototype would still apply.  */
10278 char $ac_func();
10279 char (*f)();
10280
10281 int main() {
10282
10283 /* The GNU C library defines this for functions which it implements
10284     to always fail with ENOSYS.  Some functions are actually named
10285     something starting with __ and the normal name is an alias.  */
10286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10287 choke me
10288 #else
10289 f = $ac_func;
10290 #endif
10291
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295   rm -rf conftest*
10296   eval "ac_cv_func_$ac_func=yes"
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   eval "ac_cv_func_$ac_func=no"
10302 fi
10303 rm -f conftest*
10304 fi
10305
10306 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10307   echo "$ac_t""yes" 1>&6
10308     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10309   cat >> confdefs.h <<EOF
10310 #define $ac_tr_func 1
10311 EOF
10312  
10313 else
10314   echo "$ac_t""no" 1>&6
10315 fi
10316 done
10317
10318
10319                         
10320         for ac_func in pthread_kill_other_threads_np
10321 do
10322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10323 echo "configure:10324: checking for $ac_func" >&5
10324 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10325   echo $ac_n "(cached) $ac_c" 1>&6
10326 else
10327   cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330 /* System header to define __stub macros and hopefully few prototypes,
10331     which can conflict with char $ac_func(); below.  */
10332 #include <assert.h>
10333 /* Override any gcc2 internal prototype to avoid an error.  */
10334 /* We use char because int might match the return type of a gcc2
10335     builtin and then its argument prototype would still apply.  */
10336 char $ac_func();
10337 char (*f)();
10338
10339 int main() {
10340
10341 /* The GNU C library defines this for functions which it implements
10342     to always fail with ENOSYS.  Some functions are actually named
10343     something starting with __ and the normal name is an alias.  */
10344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10345 choke me
10346 #else
10347 f = $ac_func;
10348 #endif
10349
10350 ; return 0; }
10351 EOF
10352 if { (eval echo configure:10353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10353   rm -rf conftest*
10354   eval "ac_cv_func_$ac_func=yes"
10355 else
10356   echo "configure: failed program was:" >&5
10357   cat conftest.$ac_ext >&5
10358   rm -rf conftest*
10359   eval "ac_cv_func_$ac_func=no"
10360 fi
10361 rm -f conftest*
10362 fi
10363
10364 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10365   echo "$ac_t""yes" 1>&6
10366     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10367   cat >> confdefs.h <<EOF
10368 #define $ac_tr_func 1
10369 EOF
10370  
10371 else
10372   echo "$ac_t""no" 1>&6
10373 fi
10374 done
10375
10376         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10377 echo "configure:10378: checking for LinuxThreads implementation" >&5
10378 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10382 fi
10383
10384 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10385
10386                         
10387         
10388         
10389         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10390 echo "configure:10391: checking for LinuxThreads consistency" >&5
10391 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10392   echo $ac_n "(cached) $ac_c" 1>&6
10393 else
10394   
10395                 if test $ol_cv_header_linux_threads = yes -a \
10396                         $ol_cv_sys_linux_threads = yes; then
10397                         ol_cv_linux_threads=yes
10398                 elif test $ol_cv_header_linux_threads = no -a \
10399                         $ol_cv_sys_linux_threads = no; then
10400                         ol_cv_linux_threads=no
10401                 else
10402                         ol_cv_linux_threads=error
10403                 fi
10404         
10405 fi
10406
10407 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10408
10409
10410                         if test $ol_cv_linux_threads = error; then
10411                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10412                         fi
10413
10414                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10415 echo "configure:10416: checking if pthread_create() works" >&5
10416 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10417   echo $ac_n "(cached) $ac_c" 1>&6
10418 else
10419   
10420                         if test "$cross_compiling" = yes; then
10421                                 ol_cv_pthread_create_works=yes
10422 else
10423   cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 /* pthread test headers */
10427 #include <pthread.h>
10428 #ifndef NULL
10429 #define NULL (void*)0
10430 #endif
10431
10432 static void *task(p)
10433         void *p;
10434 {
10435         return (void *) (p == NULL);
10436 }
10437
10438
10439 int main(argc, argv)
10440         int argc;
10441         char **argv;
10442 {
10443
10444         /* pthread test function */
10445         pthread_t t;
10446         int status;
10447 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10448         /* This system (e.g. AIX) defaults detached; must override */
10449         pthread_attr_t attr;
10450
10451         status = pthread_attr_init(&attr);
10452         if( status ) exit( status );
10453
10454         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10455         if( status ) exit( status );
10456
10457 #define ATTR    &attr
10458 #else
10459 #if HAVE_PTHREADS_D4
10460 #define ATTR    pthread_attr_default
10461 #else
10462 #define ATTR    NULL
10463 #endif
10464 #endif
10465         /* make sure pthread_create() isn't just a stub */
10466         status = pthread_create(&t, ATTR, task, NULL);
10467         if( status ) exit( status );
10468
10469         /* make sure pthread_detach() isn't just a stub */
10470 #if HAVE_PTHREADS_D4
10471         status = pthread_detach( &t );
10472 #else
10473         status = pthread_detach( t );
10474 #endif
10475
10476 #ifdef HAVE_LINUX_THREADS
10477         pthread_kill_other_threads_np();
10478 #endif
10479
10480         exit( status );
10481
10482 }
10483
10484 EOF
10485 if { (eval echo configure:10486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10486 then
10487   ol_cv_pthread_create_works=yes
10488 else
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -fr conftest*
10492   ol_cv_pthread_create_works=no
10493 fi
10494 rm -fr conftest*
10495 fi
10496
10497 fi
10498
10499 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10500
10501                         if test $ol_cv_pthread_create_works = no ; then
10502                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10503                         fi
10504
10505                                                 if test $ol_with_yielding_select = auto ; then
10506                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10507 echo "configure:10508: checking if select yields when using pthreads" >&5
10508 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10509   echo $ac_n "(cached) $ac_c" 1>&6
10510 else
10511   
10512                                 if test "$cross_compiling" = yes; then
10513   ol_cv_pthread_select_yields=cross
10514 else
10515   cat > conftest.$ac_ext <<EOF
10516 #line 10517 "configure"
10517 #include "confdefs.h"
10518
10519 #include <sys/types.h>
10520 #include <sys/time.h>
10521 #include <unistd.h>
10522 #include <pthread.h>
10523 #ifndef NULL
10524 #define NULL (void*) 0
10525 #endif
10526
10527 static int fildes[2];
10528
10529 static void *task(p)
10530         void *p;
10531 {
10532         int i;
10533         struct timeval tv;
10534
10535         fd_set rfds;
10536
10537         tv.tv_sec=10;
10538         tv.tv_usec=0;
10539
10540         FD_ZERO(&rfds);
10541         FD_SET(fildes[0], &rfds);
10542
10543         /* we're not interested in any fds */
10544         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10545
10546         if(i < 0) {
10547                 perror("select");
10548                 exit(10);
10549         }
10550
10551         exit(0); /* if we exit here, the select blocked the whole process */
10552 }
10553
10554 int main(argc, argv)
10555         int argc;
10556         char **argv;
10557 {
10558         pthread_t t;
10559
10560         /* create a pipe to select */
10561         if(pipe(&fildes[0])) {
10562                 perror("select");
10563                 exit(1);
10564         }
10565
10566 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10567         (void) pthread_setconcurrency(2);
10568 #else
10569 #ifdef HAVE_THR_SETCONCURRENCY
10570         /* Set Solaris LWP concurrency to 2 */
10571         thr_setconcurrency(2);
10572 #endif
10573 #endif
10574
10575 #if HAVE_PTHREADS_D4
10576         pthread_create(&t, pthread_attr_default, task, NULL);
10577 #else
10578         pthread_create(&t, NULL, task, NULL);
10579 #endif
10580
10581 #if HAVE_SCHED_YIELD
10582         sched_yield();  /* make sure task runs first */
10583 #else
10584 #ifdef HAVE_PTHREAD_YIELD
10585         pthread_yield();        /* make sure task runs first */
10586 #endif
10587 #endif
10588
10589         exit(2);
10590 }
10591 EOF
10592 if { (eval echo configure:10593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10593 then
10594   ol_cv_pthread_select_yields=no
10595 else
10596   echo "configure: failed program was:" >&5
10597   cat conftest.$ac_ext >&5
10598   rm -fr conftest*
10599   ol_cv_pthread_select_yields=yes
10600 fi
10601 rm -fr conftest*
10602 fi
10603
10604 fi
10605
10606 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10607
10608                                 if test $ol_cv_pthread_select_yields = cross ; then
10609                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10610                                 fi
10611
10612                                 if test $ol_cv_pthread_select_yields = yes ; then
10613                                         ol_with_yielding_select=yes
10614                                 fi
10615                         fi
10616
10617                                                 CPPFLAGS="$save_CPPFLAGS"
10618                         LIBS="$save_LIBS"
10619                 else
10620                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10621                 fi
10622         fi
10623
10624         if test $ol_with_threads = posix ; then
10625                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10626         fi
10627 fi
10628
10629 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10630         -o $ol_with_threads = mach ; then
10631
10632                 for ac_hdr in mach/cthreads.h
10633 do
10634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10636 echo "configure:10637: checking for $ac_hdr" >&5
10637 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10638   echo $ac_n "(cached) $ac_c" 1>&6
10639 else
10640   cat > conftest.$ac_ext <<EOF
10641 #line 10642 "configure"
10642 #include "confdefs.h"
10643 #include <$ac_hdr>
10644 EOF
10645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10646 { (eval echo configure:10647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10648 if test -z "$ac_err"; then
10649   rm -rf conftest*
10650   eval "ac_cv_header_$ac_safe=yes"
10651 else
10652   echo "$ac_err" >&5
10653   echo "configure: failed program was:" >&5
10654   cat conftest.$ac_ext >&5
10655   rm -rf conftest*
10656   eval "ac_cv_header_$ac_safe=no"
10657 fi
10658 rm -f conftest*
10659 fi
10660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10661   echo "$ac_t""yes" 1>&6
10662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10663   cat >> confdefs.h <<EOF
10664 #define $ac_tr_hdr 1
10665 EOF
10666  
10667 else
10668   echo "$ac_t""no" 1>&6
10669 fi
10670 done
10671
10672         if test $ac_cv_header_mach_cthreads_h = yes ; then
10673                 ol_with_threads=found
10674
10675                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10676 echo "configure:10677: checking for cthread_fork" >&5
10677 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10678   echo $ac_n "(cached) $ac_c" 1>&6
10679 else
10680   cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 /* System header to define __stub macros and hopefully few prototypes,
10684     which can conflict with char cthread_fork(); below.  */
10685 #include <assert.h>
10686 /* Override any gcc2 internal prototype to avoid an error.  */
10687 /* We use char because int might match the return type of a gcc2
10688     builtin and then its argument prototype would still apply.  */
10689 char cthread_fork();
10690 char (*f)();
10691
10692 int main() {
10693
10694 /* The GNU C library defines this for functions which it implements
10695     to always fail with ENOSYS.  Some functions are actually named
10696     something starting with __ and the normal name is an alias.  */
10697 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10698 choke me
10699 #else
10700 f = cthread_fork;
10701 #endif
10702
10703 ; return 0; }
10704 EOF
10705 if { (eval echo configure:10706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10706   rm -rf conftest*
10707   eval "ac_cv_func_cthread_fork=yes"
10708 else
10709   echo "configure: failed program was:" >&5
10710   cat conftest.$ac_ext >&5
10711   rm -rf conftest*
10712   eval "ac_cv_func_cthread_fork=no"
10713 fi
10714 rm -f conftest*
10715 fi
10716
10717 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10718   echo "$ac_t""yes" 1>&6
10719   ol_link_threads=yes
10720 else
10721   echo "$ac_t""no" 1>&6
10722 fi
10723
10724
10725                 if test $ol_link_threads = no ; then
10726                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10727 echo "configure:10728: checking for cthread_fork with -all_load" >&5
10728 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10729   echo $ac_n "(cached) $ac_c" 1>&6
10730 else
10731   
10732                                                                 save_LIBS="$LIBS"
10733                                 LIBS="-all_load $LIBS"
10734                                 cat > conftest.$ac_ext <<EOF
10735 #line 10736 "configure"
10736 #include "confdefs.h"
10737 #include <mach/cthreads.h>
10738 int main() {
10739
10740                                         cthread_fork((void *)0, (void *)0);
10741                                         
10742 ; return 0; }
10743 EOF
10744 if { (eval echo configure:10745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10745   rm -rf conftest*
10746   ol_cv_cthread_all_load=yes
10747 else
10748   echo "configure: failed program was:" >&5
10749   cat conftest.$ac_ext >&5
10750   rm -rf conftest*
10751   ol_cv_cthread_all_load=no
10752 fi
10753 rm -f conftest*
10754                                                                 LIBS="$save_LIBS"
10755                         
10756 fi
10757
10758 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10759
10760                         if test $ol_cv_cthread_all_load = yes ; then
10761                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10762                                 ol_link_threads=mach
10763                         fi
10764                 fi
10765
10766                 if test $ol_link_threads != no ; then
10767                         : check for cthread specific functionality here
10768                         cat >> confdefs.h <<\EOF
10769 #define HAVE_MACH_CTHREADS 1
10770 EOF
10771
10772                 else
10773                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10774                 fi
10775         fi
10776
10777         if test $ol_with_threads = mach ; then
10778                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10779         fi
10780 fi
10781
10782 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10783         -o $ol_with_threads = pth ; then
10784
10785         for ac_hdr in pth.h
10786 do
10787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10789 echo "configure:10790: checking for $ac_hdr" >&5
10790 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10791   echo $ac_n "(cached) $ac_c" 1>&6
10792 else
10793   cat > conftest.$ac_ext <<EOF
10794 #line 10795 "configure"
10795 #include "confdefs.h"
10796 #include <$ac_hdr>
10797 EOF
10798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10799 { (eval echo configure:10800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10801 if test -z "$ac_err"; then
10802   rm -rf conftest*
10803   eval "ac_cv_header_$ac_safe=yes"
10804 else
10805   echo "$ac_err" >&5
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -rf conftest*
10809   eval "ac_cv_header_$ac_safe=no"
10810 fi
10811 rm -f conftest*
10812 fi
10813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10814   echo "$ac_t""yes" 1>&6
10815     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10816   cat >> confdefs.h <<EOF
10817 #define $ac_tr_hdr 1
10818 EOF
10819  
10820 else
10821   echo "$ac_t""no" 1>&6
10822 fi
10823 done
10824
10825
10826         if test $ac_cv_header_pth_h = yes ; then
10827                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10828 echo "configure:10829: checking for pth_version in -lpth" >&5
10829 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10831   echo $ac_n "(cached) $ac_c" 1>&6
10832 else
10833   ac_save_LIBS="$LIBS"
10834 LIBS="-lpth  $LIBS"
10835 cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838 /* Override any gcc2 internal prototype to avoid an error.  */
10839 /* We use char because int might match the return type of a gcc2
10840     builtin and then its argument prototype would still apply.  */
10841 char pth_version();
10842
10843 int main() {
10844 pth_version()
10845 ; return 0; }
10846 EOF
10847 if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10848   rm -rf conftest*
10849   eval "ac_cv_lib_$ac_lib_var=yes"
10850 else
10851   echo "configure: failed program was:" >&5
10852   cat conftest.$ac_ext >&5
10853   rm -rf conftest*
10854   eval "ac_cv_lib_$ac_lib_var=no"
10855 fi
10856 rm -f conftest*
10857 LIBS="$ac_save_LIBS"
10858
10859 fi
10860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10861   echo "$ac_t""yes" 1>&6
10862   have_pth=yes
10863 else
10864   echo "$ac_t""no" 1>&6
10865 have_pth=no
10866 fi
10867
10868
10869                 if test $have_pth = yes ; then
10870                         cat >> confdefs.h <<\EOF
10871 #define HAVE_GNU_PTH 1
10872 EOF
10873
10874                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10875                         ol_link_threads=pth
10876
10877                         if test $ol_with_yielding_select = auto ; then
10878                                 ol_with_yielding_select=yes
10879                         fi
10880                 fi
10881         fi
10882 fi
10883
10884 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10885         -o $ol_with_threads = lwp ; then
10886
10887                 for ac_hdr in thread.h synch.h
10888 do
10889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10891 echo "configure:10892: checking for $ac_hdr" >&5
10892 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10893   echo $ac_n "(cached) $ac_c" 1>&6
10894 else
10895   cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 #include <$ac_hdr>
10899 EOF
10900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10901 { (eval echo configure:10902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10903 if test -z "$ac_err"; then
10904   rm -rf conftest*
10905   eval "ac_cv_header_$ac_safe=yes"
10906 else
10907   echo "$ac_err" >&5
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_header_$ac_safe=no"
10912 fi
10913 rm -f conftest*
10914 fi
10915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10916   echo "$ac_t""yes" 1>&6
10917     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10918   cat >> confdefs.h <<EOF
10919 #define $ac_tr_hdr 1
10920 EOF
10921  
10922 else
10923   echo "$ac_t""no" 1>&6
10924 fi
10925 done
10926
10927         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10928                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10929 echo "configure:10930: checking for thr_create in -lthread" >&5
10930 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   ac_save_LIBS="$LIBS"
10935 LIBS="-lthread  $LIBS"
10936 cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939 /* Override any gcc2 internal prototype to avoid an error.  */
10940 /* We use char because int might match the return type of a gcc2
10941     builtin and then its argument prototype would still apply.  */
10942 char thr_create();
10943
10944 int main() {
10945 thr_create()
10946 ; return 0; }
10947 EOF
10948 if { (eval echo configure:10949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=yes"
10951 else
10952   echo "configure: failed program was:" >&5
10953   cat conftest.$ac_ext >&5
10954   rm -rf conftest*
10955   eval "ac_cv_lib_$ac_lib_var=no"
10956 fi
10957 rm -f conftest*
10958 LIBS="$ac_save_LIBS"
10959
10960 fi
10961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10962   echo "$ac_t""yes" 1>&6
10963   have_thr=yes
10964 else
10965   echo "$ac_t""no" 1>&6
10966 have_thr=no
10967 fi
10968
10969
10970                 if test $have_thr = yes ; then
10971                         cat >> confdefs.h <<\EOF
10972 #define HAVE_THR 1
10973 EOF
10974
10975                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10976                         ol_link_threads=thr
10977
10978                         if test $ol_with_yielding_select = auto ; then
10979                                 ol_with_yielding_select=yes
10980                         fi
10981
10982                                                 for ac_func in \
10983                                 thr_setconcurrency \
10984                                 thr_getconcurrency \
10985                         
10986 do
10987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10988 echo "configure:10989: checking for $ac_func" >&5
10989 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992   cat > conftest.$ac_ext <<EOF
10993 #line 10994 "configure"
10994 #include "confdefs.h"
10995 /* System header to define __stub macros and hopefully few prototypes,
10996     which can conflict with char $ac_func(); below.  */
10997 #include <assert.h>
10998 /* Override any gcc2 internal prototype to avoid an error.  */
10999 /* We use char because int might match the return type of a gcc2
11000     builtin and then its argument prototype would still apply.  */
11001 char $ac_func();
11002 char (*f)();
11003
11004 int main() {
11005
11006 /* The GNU C library defines this for functions which it implements
11007     to always fail with ENOSYS.  Some functions are actually named
11008     something starting with __ and the normal name is an alias.  */
11009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11010 choke me
11011 #else
11012 f = $ac_func;
11013 #endif
11014
11015 ; return 0; }
11016 EOF
11017 if { (eval echo configure:11018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11018   rm -rf conftest*
11019   eval "ac_cv_func_$ac_func=yes"
11020 else
11021   echo "configure: failed program was:" >&5
11022   cat conftest.$ac_ext >&5
11023   rm -rf conftest*
11024   eval "ac_cv_func_$ac_func=no"
11025 fi
11026 rm -f conftest*
11027 fi
11028
11029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11030   echo "$ac_t""yes" 1>&6
11031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11032   cat >> confdefs.h <<EOF
11033 #define $ac_tr_func 1
11034 EOF
11035  
11036 else
11037   echo "$ac_t""no" 1>&6
11038 fi
11039 done
11040
11041                 fi
11042         fi
11043
11044                 for ac_hdr in lwp/lwp.h
11045 do
11046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11048 echo "configure:11049: checking for $ac_hdr" >&5
11049 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11050   echo $ac_n "(cached) $ac_c" 1>&6
11051 else
11052   cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055 #include <$ac_hdr>
11056 EOF
11057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11058 { (eval echo configure:11059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11060 if test -z "$ac_err"; then
11061   rm -rf conftest*
11062   eval "ac_cv_header_$ac_safe=yes"
11063 else
11064   echo "$ac_err" >&5
11065   echo "configure: failed program was:" >&5
11066   cat conftest.$ac_ext >&5
11067   rm -rf conftest*
11068   eval "ac_cv_header_$ac_safe=no"
11069 fi
11070 rm -f conftest*
11071 fi
11072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11075   cat >> confdefs.h <<EOF
11076 #define $ac_tr_hdr 1
11077 EOF
11078  
11079 else
11080   echo "$ac_t""no" 1>&6
11081 fi
11082 done
11083
11084         if test $ac_cv_header_lwp_lwp_h = yes ; then
11085                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
11086 echo "configure:11087: checking for lwp_create in -llwp" >&5
11087 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
11088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11089   echo $ac_n "(cached) $ac_c" 1>&6
11090 else
11091   ac_save_LIBS="$LIBS"
11092 LIBS="-llwp  $LIBS"
11093 cat > conftest.$ac_ext <<EOF
11094 #line 11095 "configure"
11095 #include "confdefs.h"
11096 /* Override any gcc2 internal prototype to avoid an error.  */
11097 /* We use char because int might match the return type of a gcc2
11098     builtin and then its argument prototype would still apply.  */
11099 char lwp_create();
11100
11101 int main() {
11102 lwp_create()
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=yes"
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   eval "ac_cv_lib_$ac_lib_var=no"
11113 fi
11114 rm -f conftest*
11115 LIBS="$ac_save_LIBS"
11116
11117 fi
11118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11119   echo "$ac_t""yes" 1>&6
11120   have_lwp=yes
11121 else
11122   echo "$ac_t""no" 1>&6
11123 have_lwp=no
11124 fi
11125
11126
11127                 if test $have_lwp = yes ; then
11128                         cat >> confdefs.h <<\EOF
11129 #define HAVE_LWP 1
11130 EOF
11131
11132                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
11133                         ol_link_threads=lwp
11134
11135                         if test $ol_with_yielding_select = auto ; then
11136                                 ol_with_yielding_select=no
11137                         fi
11138                 fi
11139         fi
11140 fi
11141
11142 if test $ol_with_yielding_select = yes ; then
11143         cat >> confdefs.h <<\EOF
11144 #define HAVE_YIELDING_SELECT 1
11145 EOF
11146
11147 fi
11148
11149 if test $ol_with_threads = manual ; then
11150                 ol_link_threads=yes
11151
11152         echo "configure: warning: thread defines and link options must be set manually" 1>&2
11153
11154         for ac_hdr in pthread.h sched.h
11155 do
11156 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11157 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11158 echo "configure:11159: checking for $ac_hdr" >&5
11159 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11160   echo $ac_n "(cached) $ac_c" 1>&6
11161 else
11162   cat > conftest.$ac_ext <<EOF
11163 #line 11164 "configure"
11164 #include "confdefs.h"
11165 #include <$ac_hdr>
11166 EOF
11167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11168 { (eval echo configure:11169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11170 if test -z "$ac_err"; then
11171   rm -rf conftest*
11172   eval "ac_cv_header_$ac_safe=yes"
11173 else
11174   echo "$ac_err" >&5
11175   echo "configure: failed program was:" >&5
11176   cat conftest.$ac_ext >&5
11177   rm -rf conftest*
11178   eval "ac_cv_header_$ac_safe=no"
11179 fi
11180 rm -f conftest*
11181 fi
11182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11183   echo "$ac_t""yes" 1>&6
11184     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11185   cat >> confdefs.h <<EOF
11186 #define $ac_tr_hdr 1
11187 EOF
11188  
11189 else
11190   echo "$ac_t""no" 1>&6
11191 fi
11192 done
11193
11194         for ac_func in sched_yield pthread_yield
11195 do
11196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11197 echo "configure:11198: checking for $ac_func" >&5
11198 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11199   echo $ac_n "(cached) $ac_c" 1>&6
11200 else
11201   cat > conftest.$ac_ext <<EOF
11202 #line 11203 "configure"
11203 #include "confdefs.h"
11204 /* System header to define __stub macros and hopefully few prototypes,
11205     which can conflict with char $ac_func(); below.  */
11206 #include <assert.h>
11207 /* Override any gcc2 internal prototype to avoid an error.  */
11208 /* We use char because int might match the return type of a gcc2
11209     builtin and then its argument prototype would still apply.  */
11210 char $ac_func();
11211 char (*f)();
11212
11213 int main() {
11214
11215 /* The GNU C library defines this for functions which it implements
11216     to always fail with ENOSYS.  Some functions are actually named
11217     something starting with __ and the normal name is an alias.  */
11218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11219 choke me
11220 #else
11221 f = $ac_func;
11222 #endif
11223
11224 ; return 0; }
11225 EOF
11226 if { (eval echo configure:11227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11227   rm -rf conftest*
11228   eval "ac_cv_func_$ac_func=yes"
11229 else
11230   echo "configure: failed program was:" >&5
11231   cat conftest.$ac_ext >&5
11232   rm -rf conftest*
11233   eval "ac_cv_func_$ac_func=no"
11234 fi
11235 rm -f conftest*
11236 fi
11237
11238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11241   cat >> confdefs.h <<EOF
11242 #define $ac_tr_func 1
11243 EOF
11244  
11245 else
11246   echo "$ac_t""no" 1>&6
11247 fi
11248 done
11249
11250         
11251         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11252 echo "configure:11253: checking for LinuxThreads pthread.h" >&5
11253 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11254   echo $ac_n "(cached) $ac_c" 1>&6
11255 else
11256   cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 #include <pthread.h>
11260 EOF
11261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11262   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11263   rm -rf conftest*
11264   ol_cv_header_linux_threads=yes
11265 else
11266   rm -rf conftest*
11267   ol_cv_header_linux_threads=no
11268 fi
11269 rm -f conftest*
11270
11271                 
11272 fi
11273
11274 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11275         if test $ol_cv_header_linux_threads = yes; then
11276                 cat >> confdefs.h <<\EOF
11277 #define HAVE_LINUX_THREADS 1
11278 EOF
11279
11280         fi
11281
11282
11283         for ac_hdr in mach/cthreads.h
11284 do
11285 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11286 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11287 echo "configure:11288: checking for $ac_hdr" >&5
11288 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 #include <$ac_hdr>
11295 EOF
11296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11297 { (eval echo configure:11298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11299 if test -z "$ac_err"; then
11300   rm -rf conftest*
11301   eval "ac_cv_header_$ac_safe=yes"
11302 else
11303   echo "$ac_err" >&5
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   eval "ac_cv_header_$ac_safe=no"
11308 fi
11309 rm -f conftest*
11310 fi
11311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11312   echo "$ac_t""yes" 1>&6
11313     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11314   cat >> confdefs.h <<EOF
11315 #define $ac_tr_hdr 1
11316 EOF
11317  
11318 else
11319   echo "$ac_t""no" 1>&6
11320 fi
11321 done
11322
11323         for ac_hdr in lwp/lwp.h
11324 do
11325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11327 echo "configure:11328: checking for $ac_hdr" >&5
11328 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11329   echo $ac_n "(cached) $ac_c" 1>&6
11330 else
11331   cat > conftest.$ac_ext <<EOF
11332 #line 11333 "configure"
11333 #include "confdefs.h"
11334 #include <$ac_hdr>
11335 EOF
11336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11337 { (eval echo configure:11338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11339 if test -z "$ac_err"; then
11340   rm -rf conftest*
11341   eval "ac_cv_header_$ac_safe=yes"
11342 else
11343   echo "$ac_err" >&5
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -rf conftest*
11347   eval "ac_cv_header_$ac_safe=no"
11348 fi
11349 rm -f conftest*
11350 fi
11351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11352   echo "$ac_t""yes" 1>&6
11353     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11354   cat >> confdefs.h <<EOF
11355 #define $ac_tr_hdr 1
11356 EOF
11357  
11358 else
11359   echo "$ac_t""no" 1>&6
11360 fi
11361 done
11362
11363         for ac_hdr in thread.h synch.h
11364 do
11365 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11366 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11367 echo "configure:11368: checking for $ac_hdr" >&5
11368 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11369   echo $ac_n "(cached) $ac_c" 1>&6
11370 else
11371   cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 #include <$ac_hdr>
11375 EOF
11376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11377 { (eval echo configure:11378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11379 if test -z "$ac_err"; then
11380   rm -rf conftest*
11381   eval "ac_cv_header_$ac_safe=yes"
11382 else
11383   echo "$ac_err" >&5
11384   echo "configure: failed program was:" >&5
11385   cat conftest.$ac_ext >&5
11386   rm -rf conftest*
11387   eval "ac_cv_header_$ac_safe=no"
11388 fi
11389 rm -f conftest*
11390 fi
11391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11392   echo "$ac_t""yes" 1>&6
11393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11394   cat >> confdefs.h <<EOF
11395 #define $ac_tr_hdr 1
11396 EOF
11397  
11398 else
11399   echo "$ac_t""no" 1>&6
11400 fi
11401 done
11402
11403 fi
11404
11405 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11406                         cat >> confdefs.h <<\EOF
11407 #define REENTRANT 1
11408 EOF
11409
11410         cat >> confdefs.h <<\EOF
11411 #define _REENTRANT 1
11412 EOF
11413
11414         cat >> confdefs.h <<\EOF
11415 #define THREAD_SAFE 1
11416 EOF
11417
11418         cat >> confdefs.h <<\EOF
11419 #define _THREAD_SAFE 1
11420 EOF
11421
11422         cat >> confdefs.h <<\EOF
11423 #define THREADSAFE 1
11424 EOF
11425
11426         cat >> confdefs.h <<\EOF
11427 #define _THREADSAFE 1
11428 EOF
11429
11430         cat >> confdefs.h <<\EOF
11431 #define _SGI_MP_SOURCE 1
11432 EOF
11433
11434
11435                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11436 echo "configure:11437: checking for thread specific errno" >&5
11437 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   
11441                 cat > conftest.$ac_ext <<EOF
11442 #line 11443 "configure"
11443 #include "confdefs.h"
11444 #include <errno.h>
11445 int main() {
11446 errno = 0;
11447 ; return 0; }
11448 EOF
11449 if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11450   rm -rf conftest*
11451   ol_cv_errno_thread_specific=yes
11452 else
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -rf conftest*
11456   ol_cv_errno_thread_specific=no
11457 fi
11458 rm -f conftest*
11459         
11460 fi
11461
11462 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11463
11464                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11465 echo "configure:11466: checking for thread specific h_errno" >&5
11466 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11467   echo $ac_n "(cached) $ac_c" 1>&6
11468 else
11469   
11470                 cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473 #include <netdb.h>
11474 int main() {
11475 h_errno = 0;
11476 ; return 0; }
11477 EOF
11478 if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11479   rm -rf conftest*
11480   ol_cv_h_errno_thread_specific=yes
11481 else
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   ol_cv_h_errno_thread_specific=no
11486 fi
11487 rm -f conftest*
11488         
11489 fi
11490
11491 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11492
11493         if test $ol_cv_errno_thread_specific != yes \
11494                 -o $ol_cv_h_errno_thread_specific != yes ; then
11495                 LIBS="$LTHREAD_LIBS $LIBS"
11496                 LTHREAD_LIBS=""
11497         fi
11498
11499 fi  
11500
11501 if test $ol_link_threads = no ; then
11502         if test $ol_with_threads = yes ; then
11503                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11504         fi
11505
11506         if test $ol_with_threads = auto ; then
11507                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11508                 ol_with_threads=no
11509         fi
11510
11511         cat >> confdefs.h <<\EOF
11512 #define NO_THREADS 1
11513 EOF
11514
11515         LTHREAD_LIBS=""
11516 fi
11517
11518 if test $ol_link_threads != no ; then
11519         cat >> confdefs.h <<\EOF
11520 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11521 EOF
11522
11523 fi
11524
11525 ol_link_ldbm=no 
11526
11527 if test $ol_with_ldbm_api = auto \
11528         -o $ol_with_ldbm_api = berkeley \
11529         -o $ol_with_ldbm_api = bcompat ; then
11530
11531         if test $ol_with_ldbm_api = bcompat; then \
11532                 ol_cv_berkeley_db=no
11533 for ac_hdr in db_185.h db.h
11534 do
11535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11537 echo "configure:11538: checking for $ac_hdr" >&5
11538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11539   echo $ac_n "(cached) $ac_c" 1>&6
11540 else
11541   cat > conftest.$ac_ext <<EOF
11542 #line 11543 "configure"
11543 #include "confdefs.h"
11544 #include <$ac_hdr>
11545 EOF
11546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11547 { (eval echo configure:11548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11549 if test -z "$ac_err"; then
11550   rm -rf conftest*
11551   eval "ac_cv_header_$ac_safe=yes"
11552 else
11553   echo "$ac_err" >&5
11554   echo "configure: failed program was:" >&5
11555   cat conftest.$ac_ext >&5
11556   rm -rf conftest*
11557   eval "ac_cv_header_$ac_safe=no"
11558 fi
11559 rm -f conftest*
11560 fi
11561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11562   echo "$ac_t""yes" 1>&6
11563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11564   cat >> confdefs.h <<EOF
11565 #define $ac_tr_hdr 1
11566 EOF
11567  
11568 else
11569   echo "$ac_t""no" 1>&6
11570 fi
11571 done
11572
11573 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11574         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11575 echo "configure:11576: checking if Berkeley DB header compatibility" >&5
11576 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11577   echo $ac_n "(cached) $ac_c" 1>&6
11578 else
11579   
11580                 cat > conftest.$ac_ext <<EOF
11581 #line 11582 "configure"
11582 #include "confdefs.h"
11583
11584 #if HAVE_DB_185_H
11585 #       include <db_185.h>
11586 #else
11587 #       include <db.h>
11588 #endif
11589
11590  /* this check could be improved */
11591 #ifndef DB_VERSION_MAJOR
11592 #       define DB_VERSION_MAJOR 1
11593 #endif
11594
11595 #if DB_VERSION_MAJOR == 1 
11596         __db_version_1
11597 #endif
11598
11599 EOF
11600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11601   egrep "__db_version_1" >/dev/null 2>&1; then
11602   rm -rf conftest*
11603   ol_cv_header_db1=yes
11604 else
11605   rm -rf conftest*
11606   ol_cv_header_db1=no
11607 fi
11608 rm -f conftest*
11609
11610 fi
11611
11612 echo "$ac_t""$ol_cv_header_db1" 1>&6
11613
11614         if test ol_cv_header_db1=yes ; then
11615                 ol_cv_lib_db=no
11616 if test $ol_cv_lib_db = no ; then
11617         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11618 echo "configure:11619: checking for Berkeley DB link (default)" >&5
11619 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11620   echo $ac_n "(cached) $ac_c" 1>&6
11621 else
11622   
11623         ol_DB_LIB=
11624         ol_LIBS=$LIBS
11625         LIBS="$ol_DB_LIB $LIBS"
11626
11627         cat > conftest.$ac_ext <<EOF
11628 #line 11629 "configure"
11629 #include "confdefs.h"
11630
11631 #ifdef HAVE_DB_185_H
11632 # include <db_185.h>
11633 #else
11634 # include <db.h>
11635 #endif
11636
11637 #ifndef DB_VERSION_MAJOR
11638 # define DB_VERSION_MAJOR 1
11639 #endif
11640
11641 #ifndef NULL
11642 #define NULL ((void*)0)
11643 #endif
11644
11645 int main() {
11646
11647 #if DB_VERSION_MAJOR > 2
11648         db_env_create( NULL, 0 );
11649 #elif DB_VERSION_MAJOR > 1
11650         db_appexit( NULL );
11651 #else
11652         (void) dbopen( NULL, 0, 0, 0, NULL);
11653 #endif
11654
11655 ; return 0; }
11656 EOF
11657 if { (eval echo configure:11658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11658   rm -rf conftest*
11659   ol_cv_db_none=yes
11660 else
11661   echo "configure: failed program was:" >&5
11662   cat conftest.$ac_ext >&5
11663   rm -rf conftest*
11664   ol_cv_db_none=no
11665 fi
11666 rm -f conftest*
11667
11668         LIBS="$ol_LIBS"
11669
11670 fi
11671
11672 echo "$ac_t""$ol_cv_db_none" 1>&6
11673
11674         if test $ol_cv_db_none = yes ; then
11675                 ol_cv_lib_db=yes
11676         fi
11677 fi
11678
11679 if test $ol_cv_lib_db = no ; then
11680         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11681 echo "configure:11682: checking for Berkeley DB link (-ldb)" >&5
11682 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11683   echo $ac_n "(cached) $ac_c" 1>&6
11684 else
11685   
11686         ol_DB_LIB=-ldb
11687         ol_LIBS=$LIBS
11688         LIBS="$ol_DB_LIB $LIBS"
11689
11690         cat > conftest.$ac_ext <<EOF
11691 #line 11692 "configure"
11692 #include "confdefs.h"
11693
11694 #ifdef HAVE_DB_185_H
11695 # include <db_185.h>
11696 #else
11697 # include <db.h>
11698 #endif
11699
11700 #ifndef DB_VERSION_MAJOR
11701 # define DB_VERSION_MAJOR 1
11702 #endif
11703
11704 #ifndef NULL
11705 #define NULL ((void*)0)
11706 #endif
11707
11708 int main() {
11709
11710 #if DB_VERSION_MAJOR > 2
11711         db_env_create( NULL, 0 );
11712 #elif DB_VERSION_MAJOR > 1
11713         db_appexit( NULL );
11714 #else
11715         (void) dbopen( NULL, 0, 0, 0, NULL);
11716 #endif
11717
11718 ; return 0; }
11719 EOF
11720 if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11721   rm -rf conftest*
11722   ol_cv_db_db=yes
11723 else
11724   echo "configure: failed program was:" >&5
11725   cat conftest.$ac_ext >&5
11726   rm -rf conftest*
11727   ol_cv_db_db=no
11728 fi
11729 rm -f conftest*
11730
11731         LIBS="$ol_LIBS"
11732
11733 fi
11734
11735 echo "$ac_t""$ol_cv_db_db" 1>&6
11736
11737         if test $ol_cv_db_db = yes ; then
11738                 ol_cv_lib_db=-ldb
11739         fi
11740 fi
11741
11742 if test $ol_cv_lib_db = no ; then
11743         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11744 echo "configure:11745: checking for Berkeley DB link (-ldb3)" >&5
11745 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11746   echo $ac_n "(cached) $ac_c" 1>&6
11747 else
11748   
11749         ol_DB_LIB=-ldb3
11750         ol_LIBS=$LIBS
11751         LIBS="$ol_DB_LIB $LIBS"
11752
11753         cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756
11757 #ifdef HAVE_DB_185_H
11758 # include <db_185.h>
11759 #else
11760 # include <db.h>
11761 #endif
11762
11763 #ifndef DB_VERSION_MAJOR
11764 # define DB_VERSION_MAJOR 1
11765 #endif
11766
11767 #ifndef NULL
11768 #define NULL ((void*)0)
11769 #endif
11770
11771 int main() {
11772
11773 #if DB_VERSION_MAJOR > 2
11774         db_env_create( NULL, 0 );
11775 #elif DB_VERSION_MAJOR > 1
11776         db_appexit( NULL );
11777 #else
11778         (void) dbopen( NULL, 0, 0, 0, NULL);
11779 #endif
11780
11781 ; return 0; }
11782 EOF
11783 if { (eval echo configure:11784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11784   rm -rf conftest*
11785   ol_cv_db_db3=yes
11786 else
11787   echo "configure: failed program was:" >&5
11788   cat conftest.$ac_ext >&5
11789   rm -rf conftest*
11790   ol_cv_db_db3=no
11791 fi
11792 rm -f conftest*
11793
11794         LIBS="$ol_LIBS"
11795
11796 fi
11797
11798 echo "$ac_t""$ol_cv_db_db3" 1>&6
11799
11800         if test $ol_cv_db_db3 = yes ; then
11801                 ol_cv_lib_db=-ldb3
11802         fi
11803 fi
11804
11805 if test $ol_cv_lib_db = no ; then
11806         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11807 echo "configure:11808: checking for Berkeley DB link (-ldb2)" >&5
11808 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11809   echo $ac_n "(cached) $ac_c" 1>&6
11810 else
11811   
11812         ol_DB_LIB=-ldb2
11813         ol_LIBS=$LIBS
11814         LIBS="$ol_DB_LIB $LIBS"
11815
11816         cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819
11820 #ifdef HAVE_DB_185_H
11821 # include <db_185.h>
11822 #else
11823 # include <db.h>
11824 #endif
11825
11826 #ifndef DB_VERSION_MAJOR
11827 # define DB_VERSION_MAJOR 1
11828 #endif
11829
11830 #ifndef NULL
11831 #define NULL ((void*)0)
11832 #endif
11833
11834 int main() {
11835
11836 #if DB_VERSION_MAJOR > 2
11837         db_env_create( NULL, 0 );
11838 #elif DB_VERSION_MAJOR > 1
11839         db_appexit( NULL );
11840 #else
11841         (void) dbopen( NULL, 0, 0, 0, NULL);
11842 #endif
11843
11844 ; return 0; }
11845 EOF
11846 if { (eval echo configure:11847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11847   rm -rf conftest*
11848   ol_cv_db_db2=yes
11849 else
11850   echo "configure: failed program was:" >&5
11851   cat conftest.$ac_ext >&5
11852   rm -rf conftest*
11853   ol_cv_db_db2=no
11854 fi
11855 rm -f conftest*
11856
11857         LIBS="$ol_LIBS"
11858
11859 fi
11860
11861 echo "$ac_t""$ol_cv_db_db2" 1>&6
11862
11863         if test $ol_cv_db_db2 = yes ; then
11864                 ol_cv_lib_db=-ldb2
11865         fi
11866 fi
11867
11868 if test $ol_cv_lib_db = no ; then
11869         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11870 echo "configure:11871: checking for Berkeley DB link (-ldb1)" >&5
11871 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   
11875         ol_DB_LIB=-ldb1
11876         ol_LIBS=$LIBS
11877         LIBS="$ol_DB_LIB $LIBS"
11878
11879         cat > conftest.$ac_ext <<EOF
11880 #line 11881 "configure"
11881 #include "confdefs.h"
11882
11883 #ifdef HAVE_DB_185_H
11884 # include <db_185.h>
11885 #else
11886 # include <db.h>
11887 #endif
11888
11889 #ifndef DB_VERSION_MAJOR
11890 # define DB_VERSION_MAJOR 1
11891 #endif
11892
11893 #ifndef NULL
11894 #define NULL ((void*)0)
11895 #endif
11896
11897 int main() {
11898
11899 #if DB_VERSION_MAJOR > 2
11900         db_env_create( NULL, 0 );
11901 #elif DB_VERSION_MAJOR > 1
11902         db_appexit( NULL );
11903 #else
11904         (void) dbopen( NULL, 0, 0, 0, NULL);
11905 #endif
11906
11907 ; return 0; }
11908 EOF
11909 if { (eval echo configure:11910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11910   rm -rf conftest*
11911   ol_cv_db_db1=yes
11912 else
11913   echo "configure: failed program was:" >&5
11914   cat conftest.$ac_ext >&5
11915   rm -rf conftest*
11916   ol_cv_db_db1=no
11917 fi
11918 rm -f conftest*
11919
11920         LIBS="$ol_LIBS"
11921
11922 fi
11923
11924 echo "$ac_t""$ol_cv_db_db1" 1>&6
11925
11926         if test $ol_cv_db_db1 = yes ; then
11927                 ol_cv_lib_db=-ldb1
11928         fi
11929 fi
11930
11931
11932                 if test "$ol_cv_lib_db" != no ; then
11933                         ol_cv_berkeley_db=yes
11934                 fi
11935         fi
11936 fi
11937
11938         else
11939                 ol_cv_berkeley_db=no
11940 for ac_hdr in db.h
11941 do
11942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11944 echo "configure:11945: checking for $ac_hdr" >&5
11945 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11946   echo $ac_n "(cached) $ac_c" 1>&6
11947 else
11948   cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 #include <$ac_hdr>
11952 EOF
11953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11954 { (eval echo configure:11955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11956 if test -z "$ac_err"; then
11957   rm -rf conftest*
11958   eval "ac_cv_header_$ac_safe=yes"
11959 else
11960   echo "$ac_err" >&5
11961   echo "configure: failed program was:" >&5
11962   cat conftest.$ac_ext >&5
11963   rm -rf conftest*
11964   eval "ac_cv_header_$ac_safe=no"
11965 fi
11966 rm -f conftest*
11967 fi
11968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11969   echo "$ac_t""yes" 1>&6
11970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11971   cat >> confdefs.h <<EOF
11972 #define $ac_tr_hdr 1
11973 EOF
11974  
11975 else
11976   echo "$ac_t""no" 1>&6
11977 fi
11978 done
11979
11980 if test $ac_cv_header_db_h = yes; then
11981         ol_cv_lib_db=no
11982 if test $ol_cv_lib_db = no ; then
11983         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11984 echo "configure:11985: checking for Berkeley DB link (default)" >&5
11985 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11986   echo $ac_n "(cached) $ac_c" 1>&6
11987 else
11988   
11989         ol_DB_LIB=
11990         ol_LIBS=$LIBS
11991         LIBS="$ol_DB_LIB $LIBS"
11992
11993         cat > conftest.$ac_ext <<EOF
11994 #line 11995 "configure"
11995 #include "confdefs.h"
11996
11997 #ifdef HAVE_DB_185_H
11998 # include <db_185.h>
11999 #else
12000 # include <db.h>
12001 #endif
12002
12003 #ifndef DB_VERSION_MAJOR
12004 # define DB_VERSION_MAJOR 1
12005 #endif
12006
12007 #ifndef NULL
12008 #define NULL ((void*)0)
12009 #endif
12010
12011 int main() {
12012
12013 #if DB_VERSION_MAJOR > 2
12014         db_env_create( NULL, 0 );
12015 #elif DB_VERSION_MAJOR > 1
12016         db_appexit( NULL );
12017 #else
12018         (void) dbopen( NULL, 0, 0, 0, NULL);
12019 #endif
12020
12021 ; return 0; }
12022 EOF
12023 if { (eval echo configure:12024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12024   rm -rf conftest*
12025   ol_cv_db_none=yes
12026 else
12027   echo "configure: failed program was:" >&5
12028   cat conftest.$ac_ext >&5
12029   rm -rf conftest*
12030   ol_cv_db_none=no
12031 fi
12032 rm -f conftest*
12033
12034         LIBS="$ol_LIBS"
12035
12036 fi
12037
12038 echo "$ac_t""$ol_cv_db_none" 1>&6
12039
12040         if test $ol_cv_db_none = yes ; then
12041                 ol_cv_lib_db=yes
12042         fi
12043 fi
12044
12045 if test $ol_cv_lib_db = no ; then
12046         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
12047 echo "configure:12048: checking for Berkeley DB link (-ldb)" >&5
12048 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
12049   echo $ac_n "(cached) $ac_c" 1>&6
12050 else
12051   
12052         ol_DB_LIB=-ldb
12053         ol_LIBS=$LIBS
12054         LIBS="$ol_DB_LIB $LIBS"
12055
12056         cat > conftest.$ac_ext <<EOF
12057 #line 12058 "configure"
12058 #include "confdefs.h"
12059
12060 #ifdef HAVE_DB_185_H
12061 # include <db_185.h>
12062 #else
12063 # include <db.h>
12064 #endif
12065
12066 #ifndef DB_VERSION_MAJOR
12067 # define DB_VERSION_MAJOR 1
12068 #endif
12069
12070 #ifndef NULL
12071 #define NULL ((void*)0)
12072 #endif
12073
12074 int main() {
12075
12076 #if DB_VERSION_MAJOR > 2
12077         db_env_create( NULL, 0 );
12078 #elif DB_VERSION_MAJOR > 1
12079         db_appexit( NULL );
12080 #else
12081         (void) dbopen( NULL, 0, 0, 0, NULL);
12082 #endif
12083
12084 ; return 0; }
12085 EOF
12086 if { (eval echo configure:12087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12087   rm -rf conftest*
12088   ol_cv_db_db=yes
12089 else
12090   echo "configure: failed program was:" >&5
12091   cat conftest.$ac_ext >&5
12092   rm -rf conftest*
12093   ol_cv_db_db=no
12094 fi
12095 rm -f conftest*
12096
12097         LIBS="$ol_LIBS"
12098
12099 fi
12100
12101 echo "$ac_t""$ol_cv_db_db" 1>&6
12102
12103         if test $ol_cv_db_db = yes ; then
12104                 ol_cv_lib_db=-ldb
12105         fi
12106 fi
12107
12108 if test $ol_cv_lib_db = no ; then
12109         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
12110 echo "configure:12111: checking for Berkeley DB link (-ldb3)" >&5
12111 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
12112   echo $ac_n "(cached) $ac_c" 1>&6
12113 else
12114   
12115         ol_DB_LIB=-ldb3
12116         ol_LIBS=$LIBS
12117         LIBS="$ol_DB_LIB $LIBS"
12118
12119         cat > conftest.$ac_ext <<EOF
12120 #line 12121 "configure"
12121 #include "confdefs.h"
12122
12123 #ifdef HAVE_DB_185_H
12124 # include <db_185.h>
12125 #else
12126 # include <db.h>
12127 #endif
12128
12129 #ifndef DB_VERSION_MAJOR
12130 # define DB_VERSION_MAJOR 1
12131 #endif
12132
12133 #ifndef NULL
12134 #define NULL ((void*)0)
12135 #endif
12136
12137 int main() {
12138
12139 #if DB_VERSION_MAJOR > 2
12140         db_env_create( NULL, 0 );
12141 #elif DB_VERSION_MAJOR > 1
12142         db_appexit( NULL );
12143 #else
12144         (void) dbopen( NULL, 0, 0, 0, NULL);
12145 #endif
12146
12147 ; return 0; }
12148 EOF
12149 if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12150   rm -rf conftest*
12151   ol_cv_db_db3=yes
12152 else
12153   echo "configure: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   rm -rf conftest*
12156   ol_cv_db_db3=no
12157 fi
12158 rm -f conftest*
12159
12160         LIBS="$ol_LIBS"
12161
12162 fi
12163
12164 echo "$ac_t""$ol_cv_db_db3" 1>&6
12165
12166         if test $ol_cv_db_db3 = yes ; then
12167                 ol_cv_lib_db=-ldb3
12168         fi
12169 fi
12170
12171 if test $ol_cv_lib_db = no ; then
12172         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12173 echo "configure:12174: checking for Berkeley DB link (-ldb2)" >&5
12174 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12175   echo $ac_n "(cached) $ac_c" 1>&6
12176 else
12177   
12178         ol_DB_LIB=-ldb2
12179         ol_LIBS=$LIBS
12180         LIBS="$ol_DB_LIB $LIBS"
12181
12182         cat > conftest.$ac_ext <<EOF
12183 #line 12184 "configure"
12184 #include "confdefs.h"
12185
12186 #ifdef HAVE_DB_185_H
12187 # include <db_185.h>
12188 #else
12189 # include <db.h>
12190 #endif
12191
12192 #ifndef DB_VERSION_MAJOR
12193 # define DB_VERSION_MAJOR 1
12194 #endif
12195
12196 #ifndef NULL
12197 #define NULL ((void*)0)
12198 #endif
12199
12200 int main() {
12201
12202 #if DB_VERSION_MAJOR > 2
12203         db_env_create( NULL, 0 );
12204 #elif DB_VERSION_MAJOR > 1
12205         db_appexit( NULL );
12206 #else
12207         (void) dbopen( NULL, 0, 0, 0, NULL);
12208 #endif
12209
12210 ; return 0; }
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12213   rm -rf conftest*
12214   ol_cv_db_db2=yes
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -rf conftest*
12219   ol_cv_db_db2=no
12220 fi
12221 rm -f conftest*
12222
12223         LIBS="$ol_LIBS"
12224
12225 fi
12226
12227 echo "$ac_t""$ol_cv_db_db2" 1>&6
12228
12229         if test $ol_cv_db_db2 = yes ; then
12230                 ol_cv_lib_db=-ldb2
12231         fi
12232 fi
12233
12234 if test $ol_cv_lib_db = no ; then
12235         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12236 echo "configure:12237: checking for Berkeley DB link (-ldb1)" >&5
12237 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12238   echo $ac_n "(cached) $ac_c" 1>&6
12239 else
12240   
12241         ol_DB_LIB=-ldb1
12242         ol_LIBS=$LIBS
12243         LIBS="$ol_DB_LIB $LIBS"
12244
12245         cat > conftest.$ac_ext <<EOF
12246 #line 12247 "configure"
12247 #include "confdefs.h"
12248
12249 #ifdef HAVE_DB_185_H
12250 # include <db_185.h>
12251 #else
12252 # include <db.h>
12253 #endif
12254
12255 #ifndef DB_VERSION_MAJOR
12256 # define DB_VERSION_MAJOR 1
12257 #endif
12258
12259 #ifndef NULL
12260 #define NULL ((void*)0)
12261 #endif
12262
12263 int main() {
12264
12265 #if DB_VERSION_MAJOR > 2
12266         db_env_create( NULL, 0 );
12267 #elif DB_VERSION_MAJOR > 1
12268         db_appexit( NULL );
12269 #else
12270         (void) dbopen( NULL, 0, 0, 0, NULL);
12271 #endif
12272
12273 ; return 0; }
12274 EOF
12275 if { (eval echo configure:12276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12276   rm -rf conftest*
12277   ol_cv_db_db1=yes
12278 else
12279   echo "configure: failed program was:" >&5
12280   cat conftest.$ac_ext >&5
12281   rm -rf conftest*
12282   ol_cv_db_db1=no
12283 fi
12284 rm -f conftest*
12285
12286         LIBS="$ol_LIBS"
12287
12288 fi
12289
12290 echo "$ac_t""$ol_cv_db_db1" 1>&6
12291
12292         if test $ol_cv_db_db1 = yes ; then
12293                 ol_cv_lib_db=-ldb1
12294         fi
12295 fi
12296
12297
12298         if test "$ol_cv_lib_db" != no ; then
12299                 ol_cv_berkeley_db=yes
12300                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12301 echo "configure:12302: checking for Berkeley DB thread support" >&5
12302 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12303   echo $ac_n "(cached) $ac_c" 1>&6
12304 else
12305   
12306         ol_LIBS="$LIBS"
12307         if test $ol_cv_lib_db != yes ; then
12308                 LIBS="$ol_cv_lib_db"
12309         fi
12310
12311         if test "$cross_compiling" = yes; then
12312   ol_cv_berkeley_db_thread=cross
12313 else
12314   cat > conftest.$ac_ext <<EOF
12315 #line 12316 "configure"
12316 #include "confdefs.h"
12317
12318 #ifdef HAVE_DB_185_H
12319         choke me;
12320 #else
12321 #include <db.h>
12322 #endif
12323 #ifndef NULL
12324 #define NULL ((void *)0)
12325 #endif
12326 main()
12327 {
12328         int rc;
12329         u_int32_t flags = DB_CREATE | DB_THREAD;
12330
12331 #if DB_VERSION_MAJOR > 2
12332         DB_ENV *env = NULL;
12333
12334         rc = db_env_create( &env, 0 );
12335
12336         if( rc == 0 ) {
12337 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12338                 rc = env->open( env, NULL, flags, 0 );
12339 #else
12340                 rc = env->open( env, NULL, NULL, flags, 0 );
12341 #endif
12342         }
12343
12344 #else
12345         DB_ENV env;
12346         memset( &env, '\0', sizeof(env) );
12347
12348         rc = db_appinit( NULL, NULL, &env, flags );
12349
12350         if( rc == 0 ) {
12351                 db_appexit( &env );
12352         }
12353 #endif
12354 #if DB_VERSION_MAJOR > 2
12355 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
12356         env->remove( env, NULL, DB_FORCE);
12357 #else
12358         env->remove( env, NULL, NULL, DB_FORCE);
12359 #endif
12360 #endif
12361
12362         return rc;
12363 }
12364 EOF
12365 if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12366 then
12367   ol_cv_berkeley_db_thread=yes
12368 else
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -fr conftest*
12372   ol_cv_berkeley_db_thread=no
12373 fi
12374 rm -fr conftest*
12375 fi
12376
12377
12378         LIBS="$ol_LIBS"
12379
12380         if test $ol_cv_berkeley_db_thread != no ; then
12381                 cat >> confdefs.h <<\EOF
12382 #define HAVE_BERKELEY_DB_THREAD 1
12383 EOF
12384
12385         fi
12386
12387 fi
12388
12389 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12390         fi
12391 fi
12392
12393         fi
12394
12395         if test $ol_cv_berkeley_db != no ; then
12396                 cat >> confdefs.h <<\EOF
12397 #define HAVE_BERKELEY_DB 1
12398 EOF
12399
12400
12401                 ol_link_ldbm=berkeley
12402                 ol_with_ldbm_api=db
12403
12404                 if test $ol_with_ldbm_type = hash ; then
12405                         cat >> confdefs.h <<\EOF
12406 #define LDBM_USE_DBHASH 1
12407 EOF
12408
12409                 else
12410                         cat >> confdefs.h <<\EOF
12411 #define LDBM_USE_DBBTREE 1
12412 EOF
12413
12414                 fi
12415
12416                                                 if test $ol_cv_lib_db != yes ; then
12417                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12418                 fi
12419         fi
12420 fi
12421
12422 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12423         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12424         ol_with_ldbm_api=none
12425 fi
12426
12427 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12428         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12429 echo "configure:12430: checking for MDBM library" >&5
12430 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12431   echo $ac_n "(cached) $ac_c" 1>&6
12432 else
12433         ol_LIBS="$LIBS"
12434         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12435 echo "configure:12436: checking for mdbm_set_chain" >&5
12436 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12437   echo $ac_n "(cached) $ac_c" 1>&6
12438 else
12439   cat > conftest.$ac_ext <<EOF
12440 #line 12441 "configure"
12441 #include "confdefs.h"
12442 /* System header to define __stub macros and hopefully few prototypes,
12443     which can conflict with char mdbm_set_chain(); below.  */
12444 #include <assert.h>
12445 /* Override any gcc2 internal prototype to avoid an error.  */
12446 /* We use char because int might match the return type of a gcc2
12447     builtin and then its argument prototype would still apply.  */
12448 char mdbm_set_chain();
12449 char (*f)();
12450
12451 int main() {
12452
12453 /* The GNU C library defines this for functions which it implements
12454     to always fail with ENOSYS.  Some functions are actually named
12455     something starting with __ and the normal name is an alias.  */
12456 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12457 choke me
12458 #else
12459 f = mdbm_set_chain;
12460 #endif
12461
12462 ; return 0; }
12463 EOF
12464 if { (eval echo configure:12465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12465   rm -rf conftest*
12466   eval "ac_cv_func_mdbm_set_chain=yes"
12467 else
12468   echo "configure: failed program was:" >&5
12469   cat conftest.$ac_ext >&5
12470   rm -rf conftest*
12471   eval "ac_cv_func_mdbm_set_chain=no"
12472 fi
12473 rm -f conftest*
12474 fi
12475
12476 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12477   echo "$ac_t""yes" 1>&6
12478   ol_cv_lib_mdbm=yes
12479 else
12480   echo "$ac_t""no" 1>&6
12481
12482                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12483 echo "configure:12484: checking for mdbm_set_chain in -lmdbm" >&5
12484 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12485 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12486   echo $ac_n "(cached) $ac_c" 1>&6
12487 else
12488   ac_save_LIBS="$LIBS"
12489 LIBS="-lmdbm  $LIBS"
12490 cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 /* Override any gcc2 internal prototype to avoid an error.  */
12494 /* We use char because int might match the return type of a gcc2
12495     builtin and then its argument prototype would still apply.  */
12496 char mdbm_set_chain();
12497
12498 int main() {
12499 mdbm_set_chain()
12500 ; return 0; }
12501 EOF
12502 if { (eval echo configure:12503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12503   rm -rf conftest*
12504   eval "ac_cv_lib_$ac_lib_var=yes"
12505 else
12506   echo "configure: failed program was:" >&5
12507   cat conftest.$ac_ext >&5
12508   rm -rf conftest*
12509   eval "ac_cv_lib_$ac_lib_var=no"
12510 fi
12511 rm -f conftest*
12512 LIBS="$ac_save_LIBS"
12513
12514 fi
12515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12516   echo "$ac_t""yes" 1>&6
12517   ol_cv_lib_mdbm=-lmdbm
12518 else
12519   echo "$ac_t""no" 1>&6
12520 ol_cv_lib_mdbm=no
12521 fi
12522
12523         
12524 fi
12525
12526         LIBS="$ol_LIBS"
12527
12528 fi
12529
12530 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12531
12532
12533  for ac_hdr in mdbm.h
12534 do
12535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12537 echo "configure:12538: checking for $ac_hdr" >&5
12538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12539   echo $ac_n "(cached) $ac_c" 1>&6
12540 else
12541   cat > conftest.$ac_ext <<EOF
12542 #line 12543 "configure"
12543 #include "confdefs.h"
12544 #include <$ac_hdr>
12545 EOF
12546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12547 { (eval echo configure:12548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12549 if test -z "$ac_err"; then
12550   rm -rf conftest*
12551   eval "ac_cv_header_$ac_safe=yes"
12552 else
12553   echo "$ac_err" >&5
12554   echo "configure: failed program was:" >&5
12555   cat conftest.$ac_ext >&5
12556   rm -rf conftest*
12557   eval "ac_cv_header_$ac_safe=no"
12558 fi
12559 rm -f conftest*
12560 fi
12561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12562   echo "$ac_t""yes" 1>&6
12563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12564   cat >> confdefs.h <<EOF
12565 #define $ac_tr_hdr 1
12566 EOF
12567  
12568 else
12569   echo "$ac_t""no" 1>&6
12570 fi
12571 done
12572
12573  echo $ac_n "checking for db""... $ac_c" 1>&6
12574 echo "configure:12575: checking for db" >&5
12575 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12576   echo $ac_n "(cached) $ac_c" 1>&6
12577 else
12578   
12579         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12580                 ol_cv_mdbm=no
12581         else
12582                 ol_cv_mdbm=yes
12583         fi
12584
12585 fi
12586
12587 echo "$ac_t""$ol_cv_mdbm" 1>&6
12588  if test $ol_cv_mdbm = yes ; then
12589         cat >> confdefs.h <<\EOF
12590 #define HAVE_MDBM 1
12591 EOF
12592
12593  fi
12594
12595
12596         if test $ol_cv_mdbm = yes ; then
12597                 ol_link_ldbm=mdbm
12598                 ol_with_ldbm_api=mdbm
12599                 if test $ol_cv_lib_mdbm != yes ; then
12600                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12601                 fi
12602         fi
12603 fi
12604
12605 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12606         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12607 echo "configure:12608: checking for GDBM library" >&5
12608 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12609   echo $ac_n "(cached) $ac_c" 1>&6
12610 else
12611         ol_LIBS="$LIBS"
12612         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12613 echo "configure:12614: checking for gdbm_open" >&5
12614 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12615   echo $ac_n "(cached) $ac_c" 1>&6
12616 else
12617   cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 /* System header to define __stub macros and hopefully few prototypes,
12621     which can conflict with char gdbm_open(); below.  */
12622 #include <assert.h>
12623 /* Override any gcc2 internal prototype to avoid an error.  */
12624 /* We use char because int might match the return type of a gcc2
12625     builtin and then its argument prototype would still apply.  */
12626 char gdbm_open();
12627 char (*f)();
12628
12629 int main() {
12630
12631 /* The GNU C library defines this for functions which it implements
12632     to always fail with ENOSYS.  Some functions are actually named
12633     something starting with __ and the normal name is an alias.  */
12634 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12635 choke me
12636 #else
12637 f = gdbm_open;
12638 #endif
12639
12640 ; return 0; }
12641 EOF
12642 if { (eval echo configure:12643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12643   rm -rf conftest*
12644   eval "ac_cv_func_gdbm_open=yes"
12645 else
12646   echo "configure: failed program was:" >&5
12647   cat conftest.$ac_ext >&5
12648   rm -rf conftest*
12649   eval "ac_cv_func_gdbm_open=no"
12650 fi
12651 rm -f conftest*
12652 fi
12653
12654 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12655   echo "$ac_t""yes" 1>&6
12656   ol_cv_lib_gdbm=yes
12657 else
12658   echo "$ac_t""no" 1>&6
12659
12660                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12661 echo "configure:12662: checking for gdbm_open in -lgdbm" >&5
12662 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12664   echo $ac_n "(cached) $ac_c" 1>&6
12665 else
12666   ac_save_LIBS="$LIBS"
12667 LIBS="-lgdbm  $LIBS"
12668 cat > conftest.$ac_ext <<EOF
12669 #line 12670 "configure"
12670 #include "confdefs.h"
12671 /* Override any gcc2 internal prototype to avoid an error.  */
12672 /* We use char because int might match the return type of a gcc2
12673     builtin and then its argument prototype would still apply.  */
12674 char gdbm_open();
12675
12676 int main() {
12677 gdbm_open()
12678 ; return 0; }
12679 EOF
12680 if { (eval echo configure:12681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12681   rm -rf conftest*
12682   eval "ac_cv_lib_$ac_lib_var=yes"
12683 else
12684   echo "configure: failed program was:" >&5
12685   cat conftest.$ac_ext >&5
12686   rm -rf conftest*
12687   eval "ac_cv_lib_$ac_lib_var=no"
12688 fi
12689 rm -f conftest*
12690 LIBS="$ac_save_LIBS"
12691
12692 fi
12693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12694   echo "$ac_t""yes" 1>&6
12695   ol_cv_lib_gdbm=-lgdbm
12696 else
12697   echo "$ac_t""no" 1>&6
12698 ol_cv_lib_gdbm=no
12699 fi
12700
12701         
12702 fi
12703
12704         LIBS="$ol_LIBS"
12705
12706 fi
12707
12708 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12709
12710
12711  for ac_hdr in gdbm.h
12712 do
12713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12715 echo "configure:12716: checking for $ac_hdr" >&5
12716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12717   echo $ac_n "(cached) $ac_c" 1>&6
12718 else
12719   cat > conftest.$ac_ext <<EOF
12720 #line 12721 "configure"
12721 #include "confdefs.h"
12722 #include <$ac_hdr>
12723 EOF
12724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12725 { (eval echo configure:12726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12727 if test -z "$ac_err"; then
12728   rm -rf conftest*
12729   eval "ac_cv_header_$ac_safe=yes"
12730 else
12731   echo "$ac_err" >&5
12732   echo "configure: failed program was:" >&5
12733   cat conftest.$ac_ext >&5
12734   rm -rf conftest*
12735   eval "ac_cv_header_$ac_safe=no"
12736 fi
12737 rm -f conftest*
12738 fi
12739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12740   echo "$ac_t""yes" 1>&6
12741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12742   cat >> confdefs.h <<EOF
12743 #define $ac_tr_hdr 1
12744 EOF
12745  
12746 else
12747   echo "$ac_t""no" 1>&6
12748 fi
12749 done
12750
12751  echo $ac_n "checking for db""... $ac_c" 1>&6
12752 echo "configure:12753: checking for db" >&5
12753 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12754   echo $ac_n "(cached) $ac_c" 1>&6
12755 else
12756   
12757         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12758                 ol_cv_gdbm=no
12759         else
12760                 ol_cv_gdbm=yes
12761         fi
12762
12763 fi
12764
12765 echo "$ac_t""$ol_cv_gdbm" 1>&6
12766  if test $ol_cv_gdbm = yes ; then
12767         cat >> confdefs.h <<\EOF
12768 #define HAVE_GDBM 1
12769 EOF
12770
12771  fi
12772
12773
12774         if test $ol_cv_gdbm = yes ; then
12775                 ol_link_ldbm=gdbm
12776                 ol_with_ldbm_api=gdbm
12777
12778                 if test $ol_cv_lib_gdbm != yes ; then
12779                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12780                 fi
12781         fi
12782 fi
12783
12784 if test $ol_with_ldbm_api = ndbm ; then
12785         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12786 echo "configure:12787: checking for NDBM library" >&5
12787 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12788   echo $ac_n "(cached) $ac_c" 1>&6
12789 else
12790         ol_LIBS="$LIBS"
12791         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12792 echo "configure:12793: checking for dbm_open" >&5
12793 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12794   echo $ac_n "(cached) $ac_c" 1>&6
12795 else
12796   cat > conftest.$ac_ext <<EOF
12797 #line 12798 "configure"
12798 #include "confdefs.h"
12799 /* System header to define __stub macros and hopefully few prototypes,
12800     which can conflict with char dbm_open(); below.  */
12801 #include <assert.h>
12802 /* Override any gcc2 internal prototype to avoid an error.  */
12803 /* We use char because int might match the return type of a gcc2
12804     builtin and then its argument prototype would still apply.  */
12805 char dbm_open();
12806 char (*f)();
12807
12808 int main() {
12809
12810 /* The GNU C library defines this for functions which it implements
12811     to always fail with ENOSYS.  Some functions are actually named
12812     something starting with __ and the normal name is an alias.  */
12813 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12814 choke me
12815 #else
12816 f = dbm_open;
12817 #endif
12818
12819 ; return 0; }
12820 EOF
12821 if { (eval echo configure:12822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12822   rm -rf conftest*
12823   eval "ac_cv_func_dbm_open=yes"
12824 else
12825   echo "configure: failed program was:" >&5
12826   cat conftest.$ac_ext >&5
12827   rm -rf conftest*
12828   eval "ac_cv_func_dbm_open=no"
12829 fi
12830 rm -f conftest*
12831 fi
12832
12833 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12834   echo "$ac_t""yes" 1>&6
12835   ol_cv_lib_ndbm=yes
12836 else
12837   echo "$ac_t""no" 1>&6
12838
12839                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12840 echo "configure:12841: checking for dbm_open in -lndbm" >&5
12841 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12843   echo $ac_n "(cached) $ac_c" 1>&6
12844 else
12845   ac_save_LIBS="$LIBS"
12846 LIBS="-lndbm  $LIBS"
12847 cat > conftest.$ac_ext <<EOF
12848 #line 12849 "configure"
12849 #include "confdefs.h"
12850 /* Override any gcc2 internal prototype to avoid an error.  */
12851 /* We use char because int might match the return type of a gcc2
12852     builtin and then its argument prototype would still apply.  */
12853 char dbm_open();
12854
12855 int main() {
12856 dbm_open()
12857 ; return 0; }
12858 EOF
12859 if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12860   rm -rf conftest*
12861   eval "ac_cv_lib_$ac_lib_var=yes"
12862 else
12863   echo "configure: failed program was:" >&5
12864   cat conftest.$ac_ext >&5
12865   rm -rf conftest*
12866   eval "ac_cv_lib_$ac_lib_var=no"
12867 fi
12868 rm -f conftest*
12869 LIBS="$ac_save_LIBS"
12870
12871 fi
12872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12873   echo "$ac_t""yes" 1>&6
12874   ol_cv_lib_ndbm=-lndbm
12875 else
12876   echo "$ac_t""no" 1>&6
12877
12878                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12879 echo "configure:12880: checking for dbm_open in -ldbm" >&5
12880 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12882   echo $ac_n "(cached) $ac_c" 1>&6
12883 else
12884   ac_save_LIBS="$LIBS"
12885 LIBS="-ldbm  $LIBS"
12886 cat > conftest.$ac_ext <<EOF
12887 #line 12888 "configure"
12888 #include "confdefs.h"
12889 /* Override any gcc2 internal prototype to avoid an error.  */
12890 /* We use char because int might match the return type of a gcc2
12891     builtin and then its argument prototype would still apply.  */
12892 char dbm_open();
12893
12894 int main() {
12895 dbm_open()
12896 ; return 0; }
12897 EOF
12898 if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12899   rm -rf conftest*
12900   eval "ac_cv_lib_$ac_lib_var=yes"
12901 else
12902   echo "configure: failed program was:" >&5
12903   cat conftest.$ac_ext >&5
12904   rm -rf conftest*
12905   eval "ac_cv_lib_$ac_lib_var=no"
12906 fi
12907 rm -f conftest*
12908 LIBS="$ac_save_LIBS"
12909
12910 fi
12911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12912   echo "$ac_t""yes" 1>&6
12913   ol_cv_lib_ndbm=-ldbm
12914 else
12915   echo "$ac_t""no" 1>&6
12916 ol_cv_lib_ndbm=no
12917 fi
12918                 
12919 fi
12920
12921         
12922 fi
12923
12924         LIBS="$ol_LIBS"
12925
12926 fi
12927
12928 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12929
12930
12931  for ac_hdr in ndbm.h
12932 do
12933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12935 echo "configure:12936: checking for $ac_hdr" >&5
12936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12937   echo $ac_n "(cached) $ac_c" 1>&6
12938 else
12939   cat > conftest.$ac_ext <<EOF
12940 #line 12941 "configure"
12941 #include "confdefs.h"
12942 #include <$ac_hdr>
12943 EOF
12944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12945 { (eval echo configure:12946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12947 if test -z "$ac_err"; then
12948   rm -rf conftest*
12949   eval "ac_cv_header_$ac_safe=yes"
12950 else
12951   echo "$ac_err" >&5
12952   echo "configure: failed program was:" >&5
12953   cat conftest.$ac_ext >&5
12954   rm -rf conftest*
12955   eval "ac_cv_header_$ac_safe=no"
12956 fi
12957 rm -f conftest*
12958 fi
12959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12960   echo "$ac_t""yes" 1>&6
12961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12962   cat >> confdefs.h <<EOF
12963 #define $ac_tr_hdr 1
12964 EOF
12965  
12966 else
12967   echo "$ac_t""no" 1>&6
12968 fi
12969 done
12970
12971  echo $ac_n "checking for db""... $ac_c" 1>&6
12972 echo "configure:12973: checking for db" >&5
12973 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12974   echo $ac_n "(cached) $ac_c" 1>&6
12975 else
12976   
12977         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12978                 ol_cv_ndbm=no
12979         else
12980                 ol_cv_ndbm=yes
12981         fi
12982
12983 fi
12984
12985 echo "$ac_t""$ol_cv_ndbm" 1>&6
12986  if test $ol_cv_ndbm = yes ; then
12987         cat >> confdefs.h <<\EOF
12988 #define HAVE_NDBM 1
12989 EOF
12990
12991  fi
12992
12993
12994         if test $ol_cv_ndbm = yes ; then
12995                 ol_link_ldbm=ndbm
12996                 ol_with_ldbm_api=ndbm
12997
12998                 if test $ol_cv_lib_ndbm != yes ; then
12999                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
13000                 fi
13001         fi
13002 fi
13003
13004 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
13005         echo "configure: warning: could not find suitable LDBM backend" 1>&2
13006         if test $ol_enable_ldbm = yes ; then
13007                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
13008         fi
13009
13010         echo "configure: warning: disabling LDBM" 1>&2
13011         ol_enable_ldbm=no
13012 fi
13013
13014 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
13015         LINK_BINS_DYNAMIC="yes"
13016 else
13017         LINK_BINS_DYNAMIC="no"
13018 fi
13019
13020 if test $ol_enable_wrappers != no ; then
13021         for ac_hdr in tcpd.h
13022 do
13023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13025 echo "configure:13026: checking for $ac_hdr" >&5
13026 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13027   echo $ac_n "(cached) $ac_c" 1>&6
13028 else
13029   cat > conftest.$ac_ext <<EOF
13030 #line 13031 "configure"
13031 #include "confdefs.h"
13032 #include <$ac_hdr>
13033 EOF
13034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13035 { (eval echo configure:13036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13037 if test -z "$ac_err"; then
13038   rm -rf conftest*
13039   eval "ac_cv_header_$ac_safe=yes"
13040 else
13041   echo "$ac_err" >&5
13042   echo "configure: failed program was:" >&5
13043   cat conftest.$ac_ext >&5
13044   rm -rf conftest*
13045   eval "ac_cv_header_$ac_safe=no"
13046 fi
13047 rm -f conftest*
13048 fi
13049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13050   echo "$ac_t""yes" 1>&6
13051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13052   cat >> confdefs.h <<EOF
13053 #define $ac_tr_hdr 1
13054 EOF
13055  
13056 else
13057   echo "$ac_t""no" 1>&6
13058 fi
13059 done
13060
13061
13062         if test $ac_cv_header_tcpd_h != yes ; then
13063                 have_wrappers=no
13064         else
13065                 cat > conftest.$ac_ext <<EOF
13066 #line 13067 "configure"
13067 #include "confdefs.h"
13068
13069 int allow_severity = 0;
13070 int deny_severity  = 0;
13071                 
13072 int main() {
13073 hosts_access()
13074 ; return 0; }
13075 EOF
13076 if { (eval echo configure:13077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13077   rm -rf conftest*
13078   have_wrappers=yes
13079 else
13080   echo "configure: failed program was:" >&5
13081   cat conftest.$ac_ext >&5
13082   rm -rf conftest*
13083   have_wrappers=no
13084 fi
13085 rm -f conftest*
13086         fi
13087
13088         if test $have_wrappers = yes ; then
13089                 cat >> confdefs.h <<\EOF
13090 #define HAVE_TCPD 1
13091 EOF
13092
13093                 WRAP_LIBS="-lwrap"
13094
13095                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
13096 echo "configure:13097: checking for main in -lnsl" >&5
13097 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
13098 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13099   echo $ac_n "(cached) $ac_c" 1>&6
13100 else
13101   ac_save_LIBS="$LIBS"
13102 LIBS="-lnsl  $LIBS"
13103 cat > conftest.$ac_ext <<EOF
13104 #line 13105 "configure"
13105 #include "confdefs.h"
13106
13107 int main() {
13108 main()
13109 ; return 0; }
13110 EOF
13111 if { (eval echo configure:13112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13112   rm -rf conftest*
13113   eval "ac_cv_lib_$ac_lib_var=yes"
13114 else
13115   echo "configure: failed program was:" >&5
13116   cat conftest.$ac_ext >&5
13117   rm -rf conftest*
13118   eval "ac_cv_lib_$ac_lib_var=no"
13119 fi
13120 rm -f conftest*
13121 LIBS="$ac_save_LIBS"
13122
13123 fi
13124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13125   echo "$ac_t""yes" 1>&6
13126     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13127     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13128   cat >> confdefs.h <<EOF
13129 #define $ac_tr_lib 1
13130 EOF
13131
13132   LIBS="-lnsl $LIBS"
13133
13134 else
13135   echo "$ac_t""no" 1>&6
13136 fi
13137
13138         else
13139                 echo "configure: warning: could not find -lwrap" 1>&2
13140                 if test $ol_enable_wrappers = yes ; then
13141                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
13142                 fi
13143
13144                 echo "configure: warning: disabling wrappers support" 1>&2
13145                 ol_enable_wrappers=no
13146                 WRAP_LIBS=""
13147         fi
13148 fi
13149
13150 if test $ol_enable_syslog != no ; then
13151         echo $ac_n "checking for openlog""... $ac_c" 1>&6
13152 echo "configure:13153: checking for openlog" >&5
13153 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
13154   echo $ac_n "(cached) $ac_c" 1>&6
13155 else
13156   cat > conftest.$ac_ext <<EOF
13157 #line 13158 "configure"
13158 #include "confdefs.h"
13159 /* System header to define __stub macros and hopefully few prototypes,
13160     which can conflict with char openlog(); below.  */
13161 #include <assert.h>
13162 /* Override any gcc2 internal prototype to avoid an error.  */
13163 /* We use char because int might match the return type of a gcc2
13164     builtin and then its argument prototype would still apply.  */
13165 char openlog();
13166 char (*f)();
13167
13168 int main() {
13169
13170 /* The GNU C library defines this for functions which it implements
13171     to always fail with ENOSYS.  Some functions are actually named
13172     something starting with __ and the normal name is an alias.  */
13173 #if defined (__stub_openlog) || defined (__stub___openlog)
13174 choke me
13175 #else
13176 f = openlog;
13177 #endif
13178
13179 ; return 0; }
13180 EOF
13181 if { (eval echo configure:13182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13182   rm -rf conftest*
13183   eval "ac_cv_func_openlog=yes"
13184 else
13185   echo "configure: failed program was:" >&5
13186   cat conftest.$ac_ext >&5
13187   rm -rf conftest*
13188   eval "ac_cv_func_openlog=no"
13189 fi
13190 rm -f conftest*
13191 fi
13192
13193 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13194   echo "$ac_t""yes" 1>&6
13195   :
13196 else
13197   echo "$ac_t""no" 1>&6
13198 fi
13199
13200         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13201                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13202         fi
13203         ol_enable_syslog=$ac_cv_func_openlog
13204 fi
13205
13206
13207 ol_link_sql=no
13208 if test $ol_enable_sql != no ; then
13209         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
13210 echo "configure:13211: checking for SQLDriverConnect in -liodbc" >&5
13211 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13213   echo $ac_n "(cached) $ac_c" 1>&6
13214 else
13215   ac_save_LIBS="$LIBS"
13216 LIBS="-liodbc  $LIBS"
13217 cat > conftest.$ac_ext <<EOF
13218 #line 13219 "configure"
13219 #include "confdefs.h"
13220 /* Override any gcc2 internal prototype to avoid an error.  */
13221 /* We use char because int might match the return type of a gcc2
13222     builtin and then its argument prototype would still apply.  */
13223 char SQLDriverConnect();
13224
13225 int main() {
13226 SQLDriverConnect()
13227 ; return 0; }
13228 EOF
13229 if { (eval echo configure:13230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13230   rm -rf conftest*
13231   eval "ac_cv_lib_$ac_lib_var=yes"
13232 else
13233   echo "configure: failed program was:" >&5
13234   cat conftest.$ac_ext >&5
13235   rm -rf conftest*
13236   eval "ac_cv_lib_$ac_lib_var=no"
13237 fi
13238 rm -f conftest*
13239 LIBS="$ac_save_LIBS"
13240
13241 fi
13242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13243   echo "$ac_t""yes" 1>&6
13244   have_iodbc=yes
13245 else
13246   echo "$ac_t""no" 1>&6
13247 have_iodbc=no
13248 fi
13249
13250         if test $have_iodbc = yes ; then
13251                 ol_link_sql="-liodbc"
13252         else
13253                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
13254 echo "configure:13255: checking for SQLDriverConnect in -lodbc" >&5
13255 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
13256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13257   echo $ac_n "(cached) $ac_c" 1>&6
13258 else
13259   ac_save_LIBS="$LIBS"
13260 LIBS="-lodbc  $LIBS"
13261 cat > conftest.$ac_ext <<EOF
13262 #line 13263 "configure"
13263 #include "confdefs.h"
13264 /* Override any gcc2 internal prototype to avoid an error.  */
13265 /* We use char because int might match the return type of a gcc2
13266     builtin and then its argument prototype would still apply.  */
13267 char SQLDriverConnect();
13268
13269 int main() {
13270 SQLDriverConnect()
13271 ; return 0; }
13272 EOF
13273 if { (eval echo configure:13274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13274   rm -rf conftest*
13275   eval "ac_cv_lib_$ac_lib_var=yes"
13276 else
13277   echo "configure: failed program was:" >&5
13278   cat conftest.$ac_ext >&5
13279   rm -rf conftest*
13280   eval "ac_cv_lib_$ac_lib_var=no"
13281 fi
13282 rm -f conftest*
13283 LIBS="$ac_save_LIBS"
13284
13285 fi
13286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13287   echo "$ac_t""yes" 1>&6
13288   have_odbc=yes
13289 else
13290   echo "$ac_t""no" 1>&6
13291 have_odbc=no
13292 fi
13293
13294                 if test $have_odbc = yes ; then
13295                         ol_link_sql="-lodbc"
13296                 fi
13297         fi
13298
13299         if test $ol_link_sql != no ; then
13300                 SLAPD_SQL_LIBS="$ol_link_sql"
13301
13302         elif test $ol_enable_sql != auto ; then
13303                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
13304         fi
13305 fi
13306
13307 if test $ol_enable_tcl != no ; then
13308         for ac_hdr in tcl.h
13309 do
13310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13312 echo "configure:13313: checking for $ac_hdr" >&5
13313 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13314   echo $ac_n "(cached) $ac_c" 1>&6
13315 else
13316   cat > conftest.$ac_ext <<EOF
13317 #line 13318 "configure"
13318 #include "confdefs.h"
13319 #include <$ac_hdr>
13320 EOF
13321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13322 { (eval echo configure:13323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13324 if test -z "$ac_err"; then
13325   rm -rf conftest*
13326   eval "ac_cv_header_$ac_safe=yes"
13327 else
13328   echo "$ac_err" >&5
13329   echo "configure: failed program was:" >&5
13330   cat conftest.$ac_ext >&5
13331   rm -rf conftest*
13332   eval "ac_cv_header_$ac_safe=no"
13333 fi
13334 rm -f conftest*
13335 fi
13336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13337   echo "$ac_t""yes" 1>&6
13338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13339   cat >> confdefs.h <<EOF
13340 #define $ac_tr_hdr 1
13341 EOF
13342  
13343 else
13344   echo "$ac_t""no" 1>&6
13345 fi
13346 done
13347
13348
13349         if test $ac_cv_header_tcl_h != yes ; then
13350                 have_tcl=no
13351         else
13352                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13353                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13354 echo "configure:13355: checking for main in -l$lib" >&5
13355 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13357   echo $ac_n "(cached) $ac_c" 1>&6
13358 else
13359   ac_save_LIBS="$LIBS"
13360 LIBS="-l$lib  $LIBS"
13361 cat > conftest.$ac_ext <<EOF
13362 #line 13363 "configure"
13363 #include "confdefs.h"
13364
13365 int main() {
13366 main()
13367 ; return 0; }
13368 EOF
13369 if { (eval echo configure:13370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13370   rm -rf conftest*
13371   eval "ac_cv_lib_$ac_lib_var=yes"
13372 else
13373   echo "configure: failed program was:" >&5
13374   cat conftest.$ac_ext >&5
13375   rm -rf conftest*
13376   eval "ac_cv_lib_$ac_lib_var=no"
13377 fi
13378 rm -f conftest*
13379 LIBS="$ac_save_LIBS"
13380
13381 fi
13382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13383   echo "$ac_t""yes" 1>&6
13384   have_tcl=yes
13385                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13386                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13387                            else
13388                                MOD_TCL_LIB="-l${lib}"
13389                            fi;break
13390 else
13391   echo "$ac_t""no" 1>&6
13392 have_tcl=no
13393 fi
13394
13395                 done
13396         fi
13397
13398         if test $have_tcl != yes ; then
13399                 echo "configure: warning: could not find -ltcl" 1>&2
13400                 if test $ol_enable_tcl = yes ; then
13401                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13402                 fi
13403
13404                 ol_enable_tcl=no
13405         fi
13406 fi
13407
13408 ol_link_termcap=no
13409 for ac_hdr in termcap.h ncurses.h
13410 do
13411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13413 echo "configure:13414: checking for $ac_hdr" >&5
13414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13415   echo $ac_n "(cached) $ac_c" 1>&6
13416 else
13417   cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 #include <$ac_hdr>
13421 EOF
13422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13423 { (eval echo configure:13424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13425 if test -z "$ac_err"; then
13426   rm -rf conftest*
13427   eval "ac_cv_header_$ac_safe=yes"
13428 else
13429   echo "$ac_err" >&5
13430   echo "configure: failed program was:" >&5
13431   cat conftest.$ac_ext >&5
13432   rm -rf conftest*
13433   eval "ac_cv_header_$ac_safe=no"
13434 fi
13435 rm -f conftest*
13436 fi
13437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13438   echo "$ac_t""yes" 1>&6
13439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13440   cat >> confdefs.h <<EOF
13441 #define $ac_tr_hdr 1
13442 EOF
13443  
13444 else
13445   echo "$ac_t""no" 1>&6
13446 fi
13447 done
13448
13449
13450 if test $ol_link_termcap = no ; then
13451         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13452 echo "configure:13453: checking for tputs in -ltermcap" >&5
13453 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13454 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13455   echo $ac_n "(cached) $ac_c" 1>&6
13456 else
13457   ac_save_LIBS="$LIBS"
13458 LIBS="-ltermcap  $LIBS"
13459 cat > conftest.$ac_ext <<EOF
13460 #line 13461 "configure"
13461 #include "confdefs.h"
13462 /* Override any gcc2 internal prototype to avoid an error.  */
13463 /* We use char because int might match the return type of a gcc2
13464     builtin and then its argument prototype would still apply.  */
13465 char tputs();
13466
13467 int main() {
13468 tputs()
13469 ; return 0; }
13470 EOF
13471 if { (eval echo configure:13472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13472   rm -rf conftest*
13473   eval "ac_cv_lib_$ac_lib_var=yes"
13474 else
13475   echo "configure: failed program was:" >&5
13476   cat conftest.$ac_ext >&5
13477   rm -rf conftest*
13478   eval "ac_cv_lib_$ac_lib_var=no"
13479 fi
13480 rm -f conftest*
13481 LIBS="$ac_save_LIBS"
13482
13483 fi
13484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13485   echo "$ac_t""yes" 1>&6
13486   have_termcap=yes
13487 else
13488   echo "$ac_t""no" 1>&6
13489 have_termcap=no
13490 fi
13491
13492         if test $have_termcap = yes ; then
13493                 cat >> confdefs.h <<\EOF
13494 #define HAVE_TERMCAP 1
13495 EOF
13496
13497                 ol_link_termcap=yes
13498                 TERMCAP_LIBS=-ltermcap
13499         fi
13500 fi
13501
13502 if test $ol_link_termcap = no ; then
13503         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13504 echo "configure:13505: checking for initscr in -lncurses" >&5
13505 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13507   echo $ac_n "(cached) $ac_c" 1>&6
13508 else
13509   ac_save_LIBS="$LIBS"
13510 LIBS="-lncurses  $LIBS"
13511 cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 /* Override any gcc2 internal prototype to avoid an error.  */
13515 /* We use char because int might match the return type of a gcc2
13516     builtin and then its argument prototype would still apply.  */
13517 char initscr();
13518
13519 int main() {
13520 initscr()
13521 ; return 0; }
13522 EOF
13523 if { (eval echo configure:13524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13524   rm -rf conftest*
13525   eval "ac_cv_lib_$ac_lib_var=yes"
13526 else
13527   echo "configure: failed program was:" >&5
13528   cat conftest.$ac_ext >&5
13529   rm -rf conftest*
13530   eval "ac_cv_lib_$ac_lib_var=no"
13531 fi
13532 rm -f conftest*
13533 LIBS="$ac_save_LIBS"
13534
13535 fi
13536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13537   echo "$ac_t""yes" 1>&6
13538   have_ncurses=yes
13539 else
13540   echo "$ac_t""no" 1>&6
13541 have_ncurses=no
13542 fi
13543
13544         if test $have_ncurses = yes ; then
13545                 cat >> confdefs.h <<\EOF
13546 #define HAVE_NCURSES 1
13547 EOF
13548
13549                 ol_link_termcap=yes
13550                 TERMCAP_LIBS=-lncurses
13551         fi
13552 fi
13553
13554 if test $ol_link_termcap = no ; then
13555         cat >> confdefs.h <<\EOF
13556 #define NO_TERMCAP 1
13557 EOF
13558
13559         TERMCAP_LIBS=
13560 fi
13561
13562 ol_link_sasl=no
13563 ol_link_spasswd=no
13564 if test $ol_with_cyrus_sasl != no ; then
13565         for ac_hdr in sasl.h
13566 do
13567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13568 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13569 echo "configure:13570: checking for $ac_hdr" >&5
13570 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13571   echo $ac_n "(cached) $ac_c" 1>&6
13572 else
13573   cat > conftest.$ac_ext <<EOF
13574 #line 13575 "configure"
13575 #include "confdefs.h"
13576 #include <$ac_hdr>
13577 EOF
13578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13579 { (eval echo configure:13580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13581 if test -z "$ac_err"; then
13582   rm -rf conftest*
13583   eval "ac_cv_header_$ac_safe=yes"
13584 else
13585   echo "$ac_err" >&5
13586   echo "configure: failed program was:" >&5
13587   cat conftest.$ac_ext >&5
13588   rm -rf conftest*
13589   eval "ac_cv_header_$ac_safe=no"
13590 fi
13591 rm -f conftest*
13592 fi
13593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13594   echo "$ac_t""yes" 1>&6
13595     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13596   cat >> confdefs.h <<EOF
13597 #define $ac_tr_hdr 1
13598 EOF
13599  
13600 else
13601   echo "$ac_t""no" 1>&6
13602 fi
13603 done
13604
13605
13606         if test $ac_cv_header_sasl_h = yes ; then
13607                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13608 echo "configure:13609: checking for sasl_client_init in -lsasl" >&5
13609 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13611   echo $ac_n "(cached) $ac_c" 1>&6
13612 else
13613   ac_save_LIBS="$LIBS"
13614 LIBS="-lsasl  $LIBS"
13615 cat > conftest.$ac_ext <<EOF
13616 #line 13617 "configure"
13617 #include "confdefs.h"
13618 /* Override any gcc2 internal prototype to avoid an error.  */
13619 /* We use char because int might match the return type of a gcc2
13620     builtin and then its argument prototype would still apply.  */
13621 char sasl_client_init();
13622
13623 int main() {
13624 sasl_client_init()
13625 ; return 0; }
13626 EOF
13627 if { (eval echo configure:13628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13628   rm -rf conftest*
13629   eval "ac_cv_lib_$ac_lib_var=yes"
13630 else
13631   echo "configure: failed program was:" >&5
13632   cat conftest.$ac_ext >&5
13633   rm -rf conftest*
13634   eval "ac_cv_lib_$ac_lib_var=no"
13635 fi
13636 rm -f conftest*
13637 LIBS="$ac_save_LIBS"
13638
13639 fi
13640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13641   echo "$ac_t""yes" 1>&6
13642   have_cyrus_sasl=yes
13643 else
13644   echo "$ac_t""no" 1>&6
13645 have_cyrus_sasl=no
13646 fi
13647
13648
13649                 if test $have_cyrus_sasl != no ; then
13650                         SASL_LIBS="-lsasl"
13651                         cat >> confdefs.h <<\EOF
13652 #define HAVE_CYRUS_SASL 1
13653 EOF
13654
13655                         ol_link_sasl=yes
13656                 fi
13657         fi
13658
13659         if test $ol_link_sasl = no ; then
13660                 if test $ol_with_cyrus_sasl != auto ; then
13661                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
13662                 else
13663                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
13664                         echo "configure: warning: SASL authentication not supported!" 1>&2
13665                         if test $ol_link_tls = no ; then
13666                                 echo "configure: warning: Strong authentication not supported!" 1>&2
13667                         fi
13668                 fi
13669
13670         elif test $ol_enable_spasswd != no ; then
13671                 ol_link_spasswd=yes
13672         fi
13673
13674 else
13675         echo "configure: warning: SASL authentication not supported!" 1>&2
13676         if test $ol_link_tls = no ; then
13677                 echo "configure: warning: Strong authentication not supported!" 1>&2
13678         fi
13679 fi
13680
13681 if test $cross_compiling != yes ; then
13682         dev=no
13683         if test -r /dev/urandom ; then
13684                 dev="/dev/urandom";
13685         elif test -r /idev/urandom ; then
13686                 dev="/idev/urandom";
13687         elif test -r /dev/srandom ; then
13688                 dev="/dev/srandom";
13689         elif test -r /dev/random ; then
13690                 dev="/dev/random";
13691         elif test -r /idev/random ; then
13692                 dev="/idev/random";
13693         fi
13694
13695         if test $dev != no ; then
13696                 cat >> confdefs.h <<EOF
13697 #define URANDOM_DEVICE "$dev"
13698 EOF
13699
13700         fi
13701 fi
13702
13703 ol_link_fetch=no
13704 if test $ol_with_fetch != no ; then
13705         ol_LIBS=$LIBS
13706 LIBS="-lfetch -lcom_err $LIBS"
13707 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13708 echo "configure:13709: checking fetch(3) library" >&5
13709 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13710   echo $ac_n "(cached) $ac_c" 1>&6
13711 else
13712   
13713         cat > conftest.$ac_ext <<EOF
13714 #line 13715 "configure"
13715 #include "confdefs.h"
13716
13717 #include <sys/param.h>
13718 #include <stdio.h>
13719 #include <fetch.h>
13720 int main() {
13721 struct url *u = fetchParseURL("file:///"); 
13722 ; return 0; }
13723 EOF
13724 if { (eval echo configure:13725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13725   rm -rf conftest*
13726   ol_cv_lib_fetch=yes
13727 else
13728   echo "configure: failed program was:" >&5
13729   cat conftest.$ac_ext >&5
13730   rm -rf conftest*
13731   ol_cv_lib_fetch=no
13732 fi
13733 rm -f conftest*
13734 fi
13735
13736 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13737 LIBS=$ol_LIBS
13738 if test $ol_cv_lib_fetch != no ; then
13739         ol_link_fetch="-lfetch -lcom_err"
13740         cat >> confdefs.h <<\EOF
13741 #define HAVE_FETCH 1
13742 EOF
13743
13744 fi
13745
13746
13747         if test $ol_cv_lib_fetch != no ; then
13748                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13749                 ol_link_fetch=freebsd
13750
13751         elif test $ol_with_fetch != auto ; then
13752                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13753         fi 
13754 fi
13755
13756 ol_link_readline=no
13757 if test $ol_with_readline != no ; then
13758         for ac_hdr in readline/readline.h readline/history.h
13759 do
13760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13762 echo "configure:13763: checking for $ac_hdr" >&5
13763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13764   echo $ac_n "(cached) $ac_c" 1>&6
13765 else
13766   cat > conftest.$ac_ext <<EOF
13767 #line 13768 "configure"
13768 #include "confdefs.h"
13769 #include <$ac_hdr>
13770 EOF
13771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13772 { (eval echo configure:13773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13774 if test -z "$ac_err"; then
13775   rm -rf conftest*
13776   eval "ac_cv_header_$ac_safe=yes"
13777 else
13778   echo "$ac_err" >&5
13779   echo "configure: failed program was:" >&5
13780   cat conftest.$ac_ext >&5
13781   rm -rf conftest*
13782   eval "ac_cv_header_$ac_safe=no"
13783 fi
13784 rm -f conftest*
13785 fi
13786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13787   echo "$ac_t""yes" 1>&6
13788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13789   cat >> confdefs.h <<EOF
13790 #define $ac_tr_hdr 1
13791 EOF
13792  
13793 else
13794   echo "$ac_t""no" 1>&6
13795 fi
13796 done
13797
13798
13799         if test $ac_cv_header_readline_readline_h = yes ; then
13800                 save_LIBS="$LIBS"
13801                 LIBS="$TERMCAP_LIBS $LIBS"
13802                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13803 echo "configure:13804: checking for readline in -lreadline" >&5
13804 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13806   echo $ac_n "(cached) $ac_c" 1>&6
13807 else
13808   ac_save_LIBS="$LIBS"
13809 LIBS="-lreadline  $LIBS"
13810 cat > conftest.$ac_ext <<EOF
13811 #line 13812 "configure"
13812 #include "confdefs.h"
13813 /* Override any gcc2 internal prototype to avoid an error.  */
13814 /* We use char because int might match the return type of a gcc2
13815     builtin and then its argument prototype would still apply.  */
13816 char readline();
13817
13818 int main() {
13819 readline()
13820 ; return 0; }
13821 EOF
13822 if { (eval echo configure:13823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13823   rm -rf conftest*
13824   eval "ac_cv_lib_$ac_lib_var=yes"
13825 else
13826   echo "configure: failed program was:" >&5
13827   cat conftest.$ac_ext >&5
13828   rm -rf conftest*
13829   eval "ac_cv_lib_$ac_lib_var=no"
13830 fi
13831 rm -f conftest*
13832 LIBS="$ac_save_LIBS"
13833
13834 fi
13835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13836   echo "$ac_t""yes" 1>&6
13837   have_readline=yes
13838 else
13839   echo "$ac_t""no" 1>&6
13840 have_readline=no
13841 fi
13842
13843                 LIBS="$save_LIBS"
13844                         
13845                 if test $have_readline = yes ; then
13846                         ol_with_readline=found
13847                         ol_link_readline=yes
13848
13849                         READLINE_LIBS="-lreadline"
13850                 fi
13851         fi
13852 fi
13853
13854 if test $ol_link_readline = yes ; then
13855         cat >> confdefs.h <<\EOF
13856 #define HAVE_READLINE 1
13857 EOF
13858
13859 fi
13860
13861
13862 if test $ol_enable_crypt != no ; then
13863         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13864 echo "configure:13865: checking for crypt" >&5
13865 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13866   echo $ac_n "(cached) $ac_c" 1>&6
13867 else
13868   cat > conftest.$ac_ext <<EOF
13869 #line 13870 "configure"
13870 #include "confdefs.h"
13871 /* System header to define __stub macros and hopefully few prototypes,
13872     which can conflict with char crypt(); below.  */
13873 #include <assert.h>
13874 /* Override any gcc2 internal prototype to avoid an error.  */
13875 /* We use char because int might match the return type of a gcc2
13876     builtin and then its argument prototype would still apply.  */
13877 char crypt();
13878 char (*f)();
13879
13880 int main() {
13881
13882 /* The GNU C library defines this for functions which it implements
13883     to always fail with ENOSYS.  Some functions are actually named
13884     something starting with __ and the normal name is an alias.  */
13885 #if defined (__stub_crypt) || defined (__stub___crypt)
13886 choke me
13887 #else
13888 f = crypt;
13889 #endif
13890
13891 ; return 0; }
13892 EOF
13893 if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13894   rm -rf conftest*
13895   eval "ac_cv_func_crypt=yes"
13896 else
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -rf conftest*
13900   eval "ac_cv_func_crypt=no"
13901 fi
13902 rm -f conftest*
13903 fi
13904
13905 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13906   echo "$ac_t""yes" 1>&6
13907   have_crypt=yes
13908 else
13909   echo "$ac_t""no" 1>&6
13910
13911                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13912 echo "configure:13913: checking for crypt in -lcrypt" >&5
13913 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13915   echo $ac_n "(cached) $ac_c" 1>&6
13916 else
13917   ac_save_LIBS="$LIBS"
13918 LIBS="-lcrypt  $LIBS"
13919 cat > conftest.$ac_ext <<EOF
13920 #line 13921 "configure"
13921 #include "confdefs.h"
13922 /* Override any gcc2 internal prototype to avoid an error.  */
13923 /* We use char because int might match the return type of a gcc2
13924     builtin and then its argument prototype would still apply.  */
13925 char crypt();
13926
13927 int main() {
13928 crypt()
13929 ; return 0; }
13930 EOF
13931 if { (eval echo configure:13932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13932   rm -rf conftest*
13933   eval "ac_cv_lib_$ac_lib_var=yes"
13934 else
13935   echo "configure: failed program was:" >&5
13936   cat conftest.$ac_ext >&5
13937   rm -rf conftest*
13938   eval "ac_cv_lib_$ac_lib_var=no"
13939 fi
13940 rm -f conftest*
13941 LIBS="$ac_save_LIBS"
13942
13943 fi
13944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13945   echo "$ac_t""yes" 1>&6
13946   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13947                         have_crypt=yes
13948 else
13949   echo "$ac_t""no" 1>&6
13950 have_crypt=no
13951 fi
13952
13953 fi
13954
13955
13956         if test $have_crypt = yes ; then
13957                 cat >> confdefs.h <<\EOF
13958 #define HAVE_CRYPT 1
13959 EOF
13960
13961         else
13962                 echo "configure: warning: could not find crypt" 1>&2
13963                 if test $ol_enable_crypt = yes ; then
13964                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13965                 fi
13966
13967                 echo "configure: warning: disabling crypt support" 1>&2
13968                 ol_enable_crypt=no
13969         fi
13970 fi
13971
13972 if test $ol_enable_proctitle != no ; then
13973         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13974 echo "configure:13975: checking for setproctitle" >&5
13975 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13976   echo $ac_n "(cached) $ac_c" 1>&6
13977 else
13978   cat > conftest.$ac_ext <<EOF
13979 #line 13980 "configure"
13980 #include "confdefs.h"
13981 /* System header to define __stub macros and hopefully few prototypes,
13982     which can conflict with char setproctitle(); below.  */
13983 #include <assert.h>
13984 /* Override any gcc2 internal prototype to avoid an error.  */
13985 /* We use char because int might match the return type of a gcc2
13986     builtin and then its argument prototype would still apply.  */
13987 char setproctitle();
13988 char (*f)();
13989
13990 int main() {
13991
13992 /* The GNU C library defines this for functions which it implements
13993     to always fail with ENOSYS.  Some functions are actually named
13994     something starting with __ and the normal name is an alias.  */
13995 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13996 choke me
13997 #else
13998 f = setproctitle;
13999 #endif
14000
14001 ; return 0; }
14002 EOF
14003 if { (eval echo configure:14004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14004   rm -rf conftest*
14005   eval "ac_cv_func_setproctitle=yes"
14006 else
14007   echo "configure: failed program was:" >&5
14008   cat conftest.$ac_ext >&5
14009   rm -rf conftest*
14010   eval "ac_cv_func_setproctitle=no"
14011 fi
14012 rm -f conftest*
14013 fi
14014
14015 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
14016   echo "$ac_t""yes" 1>&6
14017   have_setproctitle=yes
14018 else
14019   echo "$ac_t""no" 1>&6
14020
14021                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
14022 echo "configure:14023: checking for setproctitle in -lutil" >&5
14023 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
14024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14025   echo $ac_n "(cached) $ac_c" 1>&6
14026 else
14027   ac_save_LIBS="$LIBS"
14028 LIBS="-lutil  $LIBS"
14029 cat > conftest.$ac_ext <<EOF
14030 #line 14031 "configure"
14031 #include "confdefs.h"
14032 /* Override any gcc2 internal prototype to avoid an error.  */
14033 /* We use char because int might match the return type of a gcc2
14034     builtin and then its argument prototype would still apply.  */
14035 char setproctitle();
14036
14037 int main() {
14038 setproctitle()
14039 ; return 0; }
14040 EOF
14041 if { (eval echo configure:14042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14042   rm -rf conftest*
14043   eval "ac_cv_lib_$ac_lib_var=yes"
14044 else
14045   echo "configure: failed program was:" >&5
14046   cat conftest.$ac_ext >&5
14047   rm -rf conftest*
14048   eval "ac_cv_lib_$ac_lib_var=no"
14049 fi
14050 rm -f conftest*
14051 LIBS="$ac_save_LIBS"
14052
14053 fi
14054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14055   echo "$ac_t""yes" 1>&6
14056   have_setproctitle=yes
14057                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
14058 else
14059   echo "$ac_t""no" 1>&6
14060 have_setproctitle=no
14061                         LIBOBJS="$LIBOBJS setproctitle.o"
14062                         LIBSRCS="$LIBSRCS setproctitle.c"
14063 fi
14064
14065 fi
14066
14067
14068         if test $have_setproctitle = yes ; then
14069                 cat >> confdefs.h <<\EOF
14070 #define HAVE_SETPROCTITLE 1
14071 EOF
14072
14073         fi
14074 fi
14075
14076 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14077 echo "configure:14078: checking for ANSI C header files" >&5
14078 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
14079   echo $ac_n "(cached) $ac_c" 1>&6
14080 else
14081   cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 #include <stdlib.h>
14085 #include <stdarg.h>
14086 #include <string.h>
14087 #include <float.h>
14088 EOF
14089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14090 { (eval echo configure:14091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14092 if test -z "$ac_err"; then
14093   rm -rf conftest*
14094   ac_cv_header_stdc=yes
14095 else
14096   echo "$ac_err" >&5
14097   echo "configure: failed program was:" >&5
14098   cat conftest.$ac_ext >&5
14099   rm -rf conftest*
14100   ac_cv_header_stdc=no
14101 fi
14102 rm -f conftest*
14103
14104 if test $ac_cv_header_stdc = yes; then
14105   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14106 cat > conftest.$ac_ext <<EOF
14107 #line 14108 "configure"
14108 #include "confdefs.h"
14109 #include <string.h>
14110 EOF
14111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14112   egrep "memchr" >/dev/null 2>&1; then
14113   :
14114 else
14115   rm -rf conftest*
14116   ac_cv_header_stdc=no
14117 fi
14118 rm -f conftest*
14119
14120 fi
14121
14122 if test $ac_cv_header_stdc = yes; then
14123   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14124 cat > conftest.$ac_ext <<EOF
14125 #line 14126 "configure"
14126 #include "confdefs.h"
14127 #include <stdlib.h>
14128 EOF
14129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14130   egrep "free" >/dev/null 2>&1; then
14131   :
14132 else
14133   rm -rf conftest*
14134   ac_cv_header_stdc=no
14135 fi
14136 rm -f conftest*
14137
14138 fi
14139
14140 if test $ac_cv_header_stdc = yes; then
14141   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14142 if test "$cross_compiling" = yes; then
14143   :
14144 else
14145   cat > conftest.$ac_ext <<EOF
14146 #line 14147 "configure"
14147 #include "confdefs.h"
14148 #include <ctype.h>
14149 #if ((' ' & 0x0FF) == 0x020)
14150 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14151 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14152 #else
14153 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14154  || ('j' <= (c) && (c) <= 'r') \
14155  || ('s' <= (c) && (c) <= 'z'))
14156 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14157 #endif
14158 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14159 int main () { int i; for (i = 0; i < 256; i++)
14160 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14161 exit (0); }
14162
14163 EOF
14164 if { (eval echo configure:14165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14165 then
14166   :
14167 else
14168   echo "configure: failed program was:" >&5
14169   cat conftest.$ac_ext >&5
14170   rm -fr conftest*
14171   ac_cv_header_stdc=no
14172 fi
14173 rm -fr conftest*
14174 fi
14175
14176 fi
14177 fi
14178
14179 echo "$ac_t""$ac_cv_header_stdc" 1>&6
14180 if test $ac_cv_header_stdc = yes; then
14181   cat >> confdefs.h <<\EOF
14182 #define STDC_HEADERS 1
14183 EOF
14184
14185 fi
14186
14187 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
14188 echo "configure:14189: checking for mode_t" >&5
14189 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
14190   echo $ac_n "(cached) $ac_c" 1>&6
14191 else
14192   cat > conftest.$ac_ext <<EOF
14193 #line 14194 "configure"
14194 #include "confdefs.h"
14195 #include <sys/types.h>
14196 #if STDC_HEADERS
14197 #include <stdlib.h>
14198 #include <stddef.h>
14199 #endif
14200
14201 EOF
14202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14203   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14204   rm -rf conftest*
14205   eval "ac_cv_type_mode_t=yes"
14206 else
14207   rm -rf conftest*
14208   eval "ac_cv_type_mode_t=no"
14209 fi
14210 rm -f conftest*
14211
14212 fi
14213 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
14214   echo "$ac_t""yes" 1>&6
14215 else
14216   echo "$ac_t""no" 1>&6
14217   cat >> confdefs.h <<EOF
14218 #define mode_t int
14219 EOF
14220
14221 fi
14222
14223 echo $ac_n "checking for off_t""... $ac_c" 1>&6
14224 echo "configure:14225: checking for off_t" >&5
14225 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
14226   echo $ac_n "(cached) $ac_c" 1>&6
14227 else
14228   cat > conftest.$ac_ext <<EOF
14229 #line 14230 "configure"
14230 #include "confdefs.h"
14231 #include <sys/types.h>
14232 #if STDC_HEADERS
14233 #include <stdlib.h>
14234 #include <stddef.h>
14235 #endif
14236
14237 EOF
14238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14239   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14240   rm -rf conftest*
14241   eval "ac_cv_type_off_t=yes"
14242 else
14243   rm -rf conftest*
14244   eval "ac_cv_type_off_t=no"
14245 fi
14246 rm -f conftest*
14247
14248 fi
14249 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
14250   echo "$ac_t""yes" 1>&6
14251 else
14252   echo "$ac_t""no" 1>&6
14253   cat >> confdefs.h <<EOF
14254 #define off_t long
14255 EOF
14256
14257 fi
14258
14259 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14260 echo "configure:14261: checking for pid_t" >&5
14261 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
14262   echo $ac_n "(cached) $ac_c" 1>&6
14263 else
14264   cat > conftest.$ac_ext <<EOF
14265 #line 14266 "configure"
14266 #include "confdefs.h"
14267 #include <sys/types.h>
14268 #if STDC_HEADERS
14269 #include <stdlib.h>
14270 #include <stddef.h>
14271 #endif
14272
14273 EOF
14274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14275   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14276   rm -rf conftest*
14277   eval "ac_cv_type_pid_t=yes"
14278 else
14279   rm -rf conftest*
14280   eval "ac_cv_type_pid_t=no"
14281 fi
14282 rm -f conftest*
14283
14284 fi
14285 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
14286   echo "$ac_t""yes" 1>&6
14287 else
14288   echo "$ac_t""no" 1>&6
14289   cat >> confdefs.h <<EOF
14290 #define pid_t int
14291 EOF
14292
14293 fi
14294
14295 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
14296 echo "configure:14297: checking for ptrdiff_t" >&5
14297 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
14298   echo $ac_n "(cached) $ac_c" 1>&6
14299 else
14300   cat > conftest.$ac_ext <<EOF
14301 #line 14302 "configure"
14302 #include "confdefs.h"
14303 #include <stddef.h>
14304 int main() {
14305 ptrdiff_t p
14306 ; return 0; }
14307 EOF
14308 if { (eval echo configure:14309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14309   rm -rf conftest*
14310   am_cv_type_ptrdiff_t=yes
14311 else
14312   echo "configure: failed program was:" >&5
14313   cat conftest.$ac_ext >&5
14314   rm -rf conftest*
14315   am_cv_type_ptrdiff_t=no
14316 fi
14317 rm -f conftest*
14318 fi
14319
14320 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14321    if test $am_cv_type_ptrdiff_t = yes; then
14322      cat >> confdefs.h <<\EOF
14323 #define HAVE_PTRDIFF_T 1
14324 EOF
14325
14326    fi
14327
14328 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14329 echo "configure:14330: checking return type of signal handlers" >&5
14330 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14331   echo $ac_n "(cached) $ac_c" 1>&6
14332 else
14333   cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336 #include <sys/types.h>
14337 #include <signal.h>
14338 #ifdef signal
14339 #undef signal
14340 #endif
14341 #ifdef __cplusplus
14342 extern "C" void (*signal (int, void (*)(int)))(int);
14343 #else
14344 void (*signal ()) ();
14345 #endif
14346
14347 int main() {
14348 int i;
14349 ; return 0; }
14350 EOF
14351 if { (eval echo configure:14352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14352   rm -rf conftest*
14353   ac_cv_type_signal=void
14354 else
14355   echo "configure: failed program was:" >&5
14356   cat conftest.$ac_ext >&5
14357   rm -rf conftest*
14358   ac_cv_type_signal=int
14359 fi
14360 rm -f conftest*
14361 fi
14362
14363 echo "$ac_t""$ac_cv_type_signal" 1>&6
14364 cat >> confdefs.h <<EOF
14365 #define RETSIGTYPE $ac_cv_type_signal
14366 EOF
14367
14368
14369 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14370 echo "configure:14371: checking for size_t" >&5
14371 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14372   echo $ac_n "(cached) $ac_c" 1>&6
14373 else
14374   cat > conftest.$ac_ext <<EOF
14375 #line 14376 "configure"
14376 #include "confdefs.h"
14377 #include <sys/types.h>
14378 #if STDC_HEADERS
14379 #include <stdlib.h>
14380 #include <stddef.h>
14381 #endif
14382
14383 EOF
14384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14385   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14386   rm -rf conftest*
14387   eval "ac_cv_type_size_t=yes"
14388 else
14389   rm -rf conftest*
14390   eval "ac_cv_type_size_t=no"
14391 fi
14392 rm -f conftest*
14393
14394 fi
14395 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14396   echo "$ac_t""yes" 1>&6
14397 else
14398   echo "$ac_t""no" 1>&6
14399   cat >> confdefs.h <<EOF
14400 #define size_t unsigned
14401 EOF
14402
14403 fi
14404
14405
14406 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14407 echo "configure:14408: checking for ssize_t" >&5
14408 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14409   echo $ac_n "(cached) $ac_c" 1>&6
14410 else
14411   cat > conftest.$ac_ext <<EOF
14412 #line 14413 "configure"
14413 #include "confdefs.h"
14414 #include <sys/types.h>
14415 #if STDC_HEADERS
14416 #include <stdlib.h>
14417 #include <stddef.h>
14418 #endif
14419
14420 EOF
14421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14422   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14423   rm -rf conftest*
14424   eval "ac_cv_type_ssize_t=yes"
14425 else
14426   rm -rf conftest*
14427   eval "ac_cv_type_ssize_t=no"
14428 fi
14429 rm -f conftest*
14430
14431 fi
14432 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14433   echo "$ac_t""yes" 1>&6
14434 else
14435   echo "$ac_t""no" 1>&6
14436   cat >> confdefs.h <<EOF
14437 #define ssize_t signed int
14438 EOF
14439
14440 fi
14441
14442 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14443 echo "configure:14444: checking for caddr_t" >&5
14444 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14445   echo $ac_n "(cached) $ac_c" 1>&6
14446 else
14447   cat > conftest.$ac_ext <<EOF
14448 #line 14449 "configure"
14449 #include "confdefs.h"
14450 #include <sys/types.h>
14451 #if STDC_HEADERS
14452 #include <stdlib.h>
14453 #include <stddef.h>
14454 #endif
14455
14456 EOF
14457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14458   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14459   rm -rf conftest*
14460   eval "ac_cv_type_caddr_t=yes"
14461 else
14462   rm -rf conftest*
14463   eval "ac_cv_type_caddr_t=no"
14464 fi
14465 rm -f conftest*
14466
14467 fi
14468 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14469   echo "$ac_t""yes" 1>&6
14470 else
14471   echo "$ac_t""no" 1>&6
14472   cat >> confdefs.h <<EOF
14473 #define caddr_t char *
14474 EOF
14475
14476 fi
14477
14478
14479 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14480 echo "configure:14481: checking for socklen_t" >&5
14481 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14482   echo $ac_n "(cached) $ac_c" 1>&6
14483 else
14484   cat > conftest.$ac_ext <<EOF
14485 #line 14486 "configure"
14486 #include "confdefs.h"
14487
14488 #ifdef HAVE_SYS_TYPES_H
14489 #include <sys/types.h>
14490 #endif
14491 #ifdef HAVE_SYS_SOCKET_H
14492 #include <sys/socket.h>
14493 #endif
14494
14495 int main() {
14496 socklen_t len;
14497 ; return 0; }
14498 EOF
14499 if { (eval echo configure:14500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14500   rm -rf conftest*
14501   ol_cv_type_socklen_t=yes
14502 else
14503   echo "configure: failed program was:" >&5
14504   cat conftest.$ac_ext >&5
14505   rm -rf conftest*
14506   ol_cv_type_socklen_t=no
14507 fi
14508 rm -f conftest*
14509 fi
14510
14511 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14512   if test $ol_cv_type_socklen_t = no; then
14513     cat >> confdefs.h <<\EOF
14514 #define socklen_t int
14515 EOF
14516
14517   fi
14518  
14519 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14520 echo "configure:14521: checking for member st_blksize in aggregate type struct stat" >&5
14521 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14522   echo $ac_n "(cached) $ac_c" 1>&6
14523 else
14524   cat > conftest.$ac_ext <<EOF
14525 #line 14526 "configure"
14526 #include "confdefs.h"
14527 #include <sys/types.h>
14528 #include <sys/stat.h>
14529 int main() {
14530 struct stat foo; foo.st_blksize;
14531 ; return 0; }
14532 EOF
14533 if { (eval echo configure:14534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14534   rm -rf conftest*
14535   ac_cv_c_struct_member_st_blksize=yes
14536 else
14537   echo "configure: failed program was:" >&5
14538   cat conftest.$ac_ext >&5
14539   rm -rf conftest*
14540   ac_cv_c_struct_member_st_blksize=no
14541 fi
14542 rm -f conftest*
14543 fi
14544
14545 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14546 st_blksize="$ac_cv_c_struct_member_st_blksize"
14547 if test $ac_cv_c_struct_member_st_blksize = yes; then
14548   cat >> confdefs.h <<\EOF
14549 #define HAVE_ST_BLKSIZE 1
14550 EOF
14551
14552 fi
14553
14554 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14555 echo "configure:14556: checking whether time.h and sys/time.h may both be included" >&5
14556 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14557   echo $ac_n "(cached) $ac_c" 1>&6
14558 else
14559   cat > conftest.$ac_ext <<EOF
14560 #line 14561 "configure"
14561 #include "confdefs.h"
14562 #include <sys/types.h>
14563 #include <sys/time.h>
14564 #include <time.h>
14565 int main() {
14566 struct tm *tp;
14567 ; return 0; }
14568 EOF
14569 if { (eval echo configure:14570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14570   rm -rf conftest*
14571   ac_cv_header_time=yes
14572 else
14573   echo "configure: failed program was:" >&5
14574   cat conftest.$ac_ext >&5
14575   rm -rf conftest*
14576   ac_cv_header_time=no
14577 fi
14578 rm -f conftest*
14579 fi
14580
14581 echo "$ac_t""$ac_cv_header_time" 1>&6
14582 if test $ac_cv_header_time = yes; then
14583   cat >> confdefs.h <<\EOF
14584 #define TIME_WITH_SYS_TIME 1
14585 EOF
14586
14587 fi
14588
14589 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14590 echo "configure:14591: checking whether struct tm is in sys/time.h or time.h" >&5
14591 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14592   echo $ac_n "(cached) $ac_c" 1>&6
14593 else
14594   cat > conftest.$ac_ext <<EOF
14595 #line 14596 "configure"
14596 #include "confdefs.h"
14597 #include <sys/types.h>
14598 #include <time.h>
14599 int main() {
14600 struct tm *tp; tp->tm_sec;
14601 ; return 0; }
14602 EOF
14603 if { (eval echo configure:14604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14604   rm -rf conftest*
14605   ac_cv_struct_tm=time.h
14606 else
14607   echo "configure: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   rm -rf conftest*
14610   ac_cv_struct_tm=sys/time.h
14611 fi
14612 rm -f conftest*
14613 fi
14614
14615 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14616 if test $ac_cv_struct_tm = sys/time.h; then
14617   cat >> confdefs.h <<\EOF
14618 #define TM_IN_SYS_TIME 1
14619 EOF
14620
14621 fi
14622
14623 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14624 echo "configure:14625: checking for uid_t in sys/types.h" >&5
14625 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14626   echo $ac_n "(cached) $ac_c" 1>&6
14627 else
14628   cat > conftest.$ac_ext <<EOF
14629 #line 14630 "configure"
14630 #include "confdefs.h"
14631 #include <sys/types.h>
14632 EOF
14633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14634   egrep "uid_t" >/dev/null 2>&1; then
14635   rm -rf conftest*
14636   ac_cv_type_uid_t=yes
14637 else
14638   rm -rf conftest*
14639   ac_cv_type_uid_t=no
14640 fi
14641 rm -f conftest*
14642
14643 fi
14644
14645 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14646 if test $ac_cv_type_uid_t = no; then
14647   cat >> confdefs.h <<\EOF
14648 #define uid_t int
14649 EOF
14650
14651   cat >> confdefs.h <<\EOF
14652 #define gid_t int
14653 EOF
14654
14655 fi
14656
14657 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14658 echo "configure:14659: checking for sig_atomic_t" >&5
14659 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14660   echo $ac_n "(cached) $ac_c" 1>&6
14661 else
14662   cat > conftest.$ac_ext <<EOF
14663 #line 14664 "configure"
14664 #include "confdefs.h"
14665 #include <signal.h>
14666 int main() {
14667 sig_atomic_t atomic;
14668 ; return 0; }
14669 EOF
14670 if { (eval echo configure:14671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14671   rm -rf conftest*
14672   ol_cv_type_sig_atomic_t=yes
14673 else
14674   echo "configure: failed program was:" >&5
14675   cat conftest.$ac_ext >&5
14676   rm -rf conftest*
14677   ol_cv_type_sig_atomic_t=no
14678 fi
14679 rm -f conftest*
14680 fi
14681
14682 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14683   if test $ol_cv_type_sig_atomic_t = no; then
14684     cat >> confdefs.h <<\EOF
14685 #define sig_atomic_t int
14686 EOF
14687
14688   fi
14689  
14690
14691
14692 # test for pw_gecos in struct passwd
14693 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14694 echo "configure:14695: checking struct passwd for pw_gecos" >&5
14695 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14696   echo $ac_n "(cached) $ac_c" 1>&6
14697 else
14698   
14699         cat > conftest.$ac_ext <<EOF
14700 #line 14701 "configure"
14701 #include "confdefs.h"
14702 #include <pwd.h>
14703 int main() {
14704
14705         struct passwd pwd;
14706         pwd.pw_gecos = pwd.pw_name;
14707
14708 ; return 0; }
14709 EOF
14710 if { (eval echo configure:14711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14711   rm -rf conftest*
14712   ol_cv_struct_passwd_pw_gecos=yes
14713 else
14714   echo "configure: failed program was:" >&5
14715   cat conftest.$ac_ext >&5
14716   rm -rf conftest*
14717   ol_cv_struct_passwd_pw_gecos=no
14718 fi
14719 rm -f conftest*
14720 fi
14721
14722 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14723 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14724         cat >> confdefs.h <<\EOF
14725 #define HAVE_PW_GECOS 1
14726 EOF
14727
14728 fi
14729
14730 # test for pw_passwd in struct passwd
14731 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14732 echo "configure:14733: checking struct passwd for pw_passwd" >&5
14733 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14734   echo $ac_n "(cached) $ac_c" 1>&6
14735 else
14736   
14737         cat > conftest.$ac_ext <<EOF
14738 #line 14739 "configure"
14739 #include "confdefs.h"
14740 #include <pwd.h>
14741 int main() {
14742
14743         struct passwd pwd;
14744         pwd.pw_passwd = pwd.pw_name;
14745
14746 ; return 0; }
14747 EOF
14748 if { (eval echo configure:14749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14749   rm -rf conftest*
14750   ol_cv_struct_passwd_pw_passwd=yes
14751 else
14752   echo "configure: failed program was:" >&5
14753   cat conftest.$ac_ext >&5
14754   rm -rf conftest*
14755   ol_cv_struct_passwd_pw_passwd=no
14756 fi
14757 rm -f conftest*
14758 fi
14759
14760 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14761 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14762         cat >> confdefs.h <<\EOF
14763 #define HAVE_PW_PASSWD 1
14764 EOF
14765
14766 fi
14767
14768
14769 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14770 echo "configure:14771: checking if toupper() requires islower()" >&5
14771 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14772   echo $ac_n "(cached) $ac_c" 1>&6
14773 else
14774   
14775         if test "$cross_compiling" = yes; then
14776   ol_cv_c_upper_lower=safe
14777 else
14778   cat > conftest.$ac_ext <<EOF
14779 #line 14780 "configure"
14780 #include "confdefs.h"
14781
14782 #include <ctype.h>
14783 main()
14784 {
14785         if ('C' == toupper('C'))
14786                 exit(0);
14787         else
14788                 exit(1);
14789 }
14790 EOF
14791 if { (eval echo configure:14792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14792 then
14793   ol_cv_c_upper_lower=no
14794 else
14795   echo "configure: failed program was:" >&5
14796   cat conftest.$ac_ext >&5
14797   rm -fr conftest*
14798   ol_cv_c_upper_lower=yes
14799 fi
14800 rm -fr conftest*
14801 fi
14802
14803 fi
14804
14805 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14806 if test $ol_cv_c_upper_lower != no ; then
14807         cat >> confdefs.h <<\EOF
14808 #define C_UPPER_LOWER 1
14809 EOF
14810
14811 fi
14812
14813 echo $ac_n "checking for working const""... $ac_c" 1>&6
14814 echo "configure:14815: checking for working const" >&5
14815 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14816   echo $ac_n "(cached) $ac_c" 1>&6
14817 else
14818   cat > conftest.$ac_ext <<EOF
14819 #line 14820 "configure"
14820 #include "confdefs.h"
14821
14822 int main() {
14823
14824 /* Ultrix mips cc rejects this.  */
14825 typedef int charset[2]; const charset x;
14826 /* SunOS 4.1.1 cc rejects this.  */
14827 char const *const *ccp;
14828 char **p;
14829 /* NEC SVR4.0.2 mips cc rejects this.  */
14830 struct point {int x, y;};
14831 static struct point const zero = {0,0};
14832 /* AIX XL C 1.02.0.0 rejects this.
14833    It does not let you subtract one const X* pointer from another in an arm
14834    of an if-expression whose if-part is not a constant expression */
14835 const char *g = "string";
14836 ccp = &g + (g ? g-g : 0);
14837 /* HPUX 7.0 cc rejects these. */
14838 ++ccp;
14839 p = (char**) ccp;
14840 ccp = (char const *const *) p;
14841 { /* SCO 3.2v4 cc rejects this.  */
14842   char *t;
14843   char const *s = 0 ? (char *) 0 : (char const *) 0;
14844
14845   *t++ = 0;
14846 }
14847 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14848   int x[] = {25, 17};
14849   const int *foo = &x[0];
14850   ++foo;
14851 }
14852 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14853   typedef const int *iptr;
14854   iptr p = 0;
14855   ++p;
14856 }
14857 { /* AIX XL C 1.02.0.0 rejects this saying
14858      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14859   struct s { int j; const int *ap[3]; };
14860   struct s *b; b->j = 5;
14861 }
14862 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14863   const int foo = 10;
14864 }
14865
14866 ; return 0; }
14867 EOF
14868 if { (eval echo configure:14869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14869   rm -rf conftest*
14870   ac_cv_c_const=yes
14871 else
14872   echo "configure: failed program was:" >&5
14873   cat conftest.$ac_ext >&5
14874   rm -rf conftest*
14875   ac_cv_c_const=no
14876 fi
14877 rm -f conftest*
14878 fi
14879
14880 echo "$ac_t""$ac_cv_c_const" 1>&6
14881 if test $ac_cv_c_const = no; then
14882   cat >> confdefs.h <<\EOF
14883 #define const 
14884 EOF
14885
14886 fi
14887
14888 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14889 echo "configure:14890: checking if compiler understands volatile" >&5
14890 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14891   echo $ac_n "(cached) $ac_c" 1>&6
14892 else
14893   cat > conftest.$ac_ext <<EOF
14894 #line 14895 "configure"
14895 #include "confdefs.h"
14896 int x, y, z;
14897 int main() {
14898 volatile int a; int * volatile b = x ? &y : &z;
14899       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14900       *b = 0;
14901 ; return 0; }
14902 EOF
14903 if { (eval echo configure:14904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14904   rm -rf conftest*
14905   ol_cv_c_volatile=yes
14906 else
14907   echo "configure: failed program was:" >&5
14908   cat conftest.$ac_ext >&5
14909   rm -rf conftest*
14910   ol_cv_c_volatile=no
14911 fi
14912 rm -f conftest*
14913 fi
14914
14915 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14916   if test $ol_cv_c_volatile = yes; then
14917     : 
14918   else
14919     cat >> confdefs.h <<\EOF
14920 #define volatile 
14921 EOF
14922
14923   fi
14924  
14925
14926 if test $cross_compiling = yes ; then
14927         cat >> confdefs.h <<\EOF
14928 #define CROSS_COMPILING 1
14929 EOF
14930
14931 else
14932         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14933 echo "configure:14934: checking whether byte ordering is bigendian" >&5
14934 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14935   echo $ac_n "(cached) $ac_c" 1>&6
14936 else
14937   ac_cv_c_bigendian=unknown
14938 # See if sys/param.h defines the BYTE_ORDER macro.
14939 cat > conftest.$ac_ext <<EOF
14940 #line 14941 "configure"
14941 #include "confdefs.h"
14942 #include <sys/types.h>
14943 #include <sys/param.h>
14944 int main() {
14945
14946 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14947  bogus endian macros
14948 #endif
14949 ; return 0; }
14950 EOF
14951 if { (eval echo configure:14952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14952   rm -rf conftest*
14953   # It does; now see whether it defined to BIG_ENDIAN or not.
14954 cat > conftest.$ac_ext <<EOF
14955 #line 14956 "configure"
14956 #include "confdefs.h"
14957 #include <sys/types.h>
14958 #include <sys/param.h>
14959 int main() {
14960
14961 #if BYTE_ORDER != BIG_ENDIAN
14962  not big endian
14963 #endif
14964 ; return 0; }
14965 EOF
14966 if { (eval echo configure:14967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14967   rm -rf conftest*
14968   ac_cv_c_bigendian=yes
14969 else
14970   echo "configure: failed program was:" >&5
14971   cat conftest.$ac_ext >&5
14972   rm -rf conftest*
14973   ac_cv_c_bigendian=no
14974 fi
14975 rm -f conftest*
14976 else
14977   echo "configure: failed program was:" >&5
14978   cat conftest.$ac_ext >&5
14979 fi
14980 rm -f conftest*
14981 if test $ac_cv_c_bigendian = unknown; then
14982 if test "$cross_compiling" = yes; then
14983     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14984 else
14985   cat > conftest.$ac_ext <<EOF
14986 #line 14987 "configure"
14987 #include "confdefs.h"
14988 main () {
14989   /* Are we little or big endian?  From Harbison&Steele.  */
14990   union
14991   {
14992     long l;
14993     char c[sizeof (long)];
14994   } u;
14995   u.l = 1;
14996   exit (u.c[sizeof (long) - 1] == 1);
14997 }
14998 EOF
14999 if { (eval echo configure:15000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15000 then
15001   ac_cv_c_bigendian=no
15002 else
15003   echo "configure: failed program was:" >&5
15004   cat conftest.$ac_ext >&5
15005   rm -fr conftest*
15006   ac_cv_c_bigendian=yes
15007 fi
15008 rm -fr conftest*
15009 fi
15010
15011 fi
15012 fi
15013
15014 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
15015 if test $ac_cv_c_bigendian = yes; then
15016   cat >> confdefs.h <<\EOF
15017 #define WORDS_BIGENDIAN 1
15018 EOF
15019
15020 fi
15021
15022 fi
15023
15024 echo $ac_n "checking size of short""... $ac_c" 1>&6
15025 echo "configure:15026: checking size of short" >&5 
15026 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
15027   echo $ac_n "(cached) $ac_c" 1>&6
15028 else
15029   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15030   cat > conftest.$ac_ext <<EOF
15031 #line 15032 "configure"
15032 #include "confdefs.h"
15033 #include "confdefs.h" 
15034 #include <sys/types.h> 
15035  
15036
15037 int main() {
15038 switch (0) case 0: case (sizeof (short) == $ac_size):;
15039 ; return 0; }
15040 EOF
15041 if { (eval echo configure:15042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15042   rm -rf conftest*
15043   ac_cv_sizeof_short=$ac_size
15044 else
15045   echo "configure: failed program was:" >&5
15046   cat conftest.$ac_ext >&5
15047 fi
15048 rm -f conftest* 
15049   if test x$ac_cv_sizeof_short != x ; then break; fi 
15050 done 
15051
15052 fi
15053  
15054 if test x$ac_cv_sizeof_short = x ; then 
15055   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
15056 fi 
15057 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
15058 cat >> confdefs.h <<EOF
15059 #define SIZEOF_SHORT $ac_cv_sizeof_short
15060 EOF
15061  
15062  
15063 echo $ac_n "checking size of int""... $ac_c" 1>&6
15064 echo "configure:15065: checking size of int" >&5 
15065 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
15066   echo $ac_n "(cached) $ac_c" 1>&6
15067 else
15068   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15069   cat > conftest.$ac_ext <<EOF
15070 #line 15071 "configure"
15071 #include "confdefs.h"
15072 #include "confdefs.h" 
15073 #include <sys/types.h> 
15074  
15075
15076 int main() {
15077 switch (0) case 0: case (sizeof (int) == $ac_size):;
15078 ; return 0; }
15079 EOF
15080 if { (eval echo configure:15081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15081   rm -rf conftest*
15082   ac_cv_sizeof_int=$ac_size
15083 else
15084   echo "configure: failed program was:" >&5
15085   cat conftest.$ac_ext >&5
15086 fi
15087 rm -f conftest* 
15088   if test x$ac_cv_sizeof_int != x ; then break; fi 
15089 done 
15090
15091 fi
15092  
15093 if test x$ac_cv_sizeof_int = x ; then 
15094   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
15095 fi 
15096 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
15097 cat >> confdefs.h <<EOF
15098 #define SIZEOF_INT $ac_cv_sizeof_int
15099 EOF
15100  
15101  
15102 echo $ac_n "checking size of long""... $ac_c" 1>&6
15103 echo "configure:15104: checking size of long" >&5 
15104 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
15105   echo $ac_n "(cached) $ac_c" 1>&6
15106 else
15107   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
15108   cat > conftest.$ac_ext <<EOF
15109 #line 15110 "configure"
15110 #include "confdefs.h"
15111 #include "confdefs.h" 
15112 #include <sys/types.h> 
15113  
15114
15115 int main() {
15116 switch (0) case 0: case (sizeof (long) == $ac_size):;
15117 ; return 0; }
15118 EOF
15119 if { (eval echo configure:15120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15120   rm -rf conftest*
15121   ac_cv_sizeof_long=$ac_size
15122 else
15123   echo "configure: failed program was:" >&5
15124   cat conftest.$ac_ext >&5
15125 fi
15126 rm -f conftest* 
15127   if test x$ac_cv_sizeof_long != x ; then break; fi 
15128 done 
15129
15130 fi
15131  
15132 if test x$ac_cv_sizeof_long = x ; then 
15133   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
15134 fi 
15135 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
15136 cat >> confdefs.h <<EOF
15137 #define SIZEOF_LONG $ac_cv_sizeof_long
15138 EOF
15139  
15140
15141
15142 if test "$ac_cv_sizeof_int" -lt 4 ; then
15143         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
15144
15145         cat >> confdefs.h <<\EOF
15146 #define LBER_INT_T long
15147 EOF
15148
15149 else
15150         cat >> confdefs.h <<\EOF
15151 #define LBER_INT_T int
15152 EOF
15153
15154 fi
15155
15156 cat >> confdefs.h <<\EOF
15157 #define LBER_LEN_T long
15158 EOF
15159
15160 cat >> confdefs.h <<\EOF
15161 #define LBER_SOCKET_T int
15162 EOF
15163
15164 cat >> confdefs.h <<\EOF
15165 #define LBER_TAG_T long
15166 EOF
15167
15168
15169 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
15170 echo "configure:15171: checking for 8-bit clean memcmp" >&5
15171 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
15172   echo $ac_n "(cached) $ac_c" 1>&6
15173 else
15174   if test "$cross_compiling" = yes; then
15175   ac_cv_func_memcmp_clean=no
15176 else
15177   cat > conftest.$ac_ext <<EOF
15178 #line 15179 "configure"
15179 #include "confdefs.h"
15180
15181 main()
15182 {
15183   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
15184   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
15185 }
15186
15187 EOF
15188 if { (eval echo configure:15189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15189 then
15190   ac_cv_func_memcmp_clean=yes
15191 else
15192   echo "configure: failed program was:" >&5
15193   cat conftest.$ac_ext >&5
15194   rm -fr conftest*
15195   ac_cv_func_memcmp_clean=no
15196 fi
15197 rm -fr conftest*
15198 fi
15199
15200 fi
15201
15202 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
15203 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
15204
15205 echo $ac_n "checking for strftime""... $ac_c" 1>&6
15206 echo "configure:15207: checking for strftime" >&5
15207 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
15208   echo $ac_n "(cached) $ac_c" 1>&6
15209 else
15210   cat > conftest.$ac_ext <<EOF
15211 #line 15212 "configure"
15212 #include "confdefs.h"
15213 /* System header to define __stub macros and hopefully few prototypes,
15214     which can conflict with char strftime(); below.  */
15215 #include <assert.h>
15216 /* Override any gcc2 internal prototype to avoid an error.  */
15217 /* We use char because int might match the return type of a gcc2
15218     builtin and then its argument prototype would still apply.  */
15219 char strftime();
15220 char (*f)();
15221
15222 int main() {
15223
15224 /* The GNU C library defines this for functions which it implements
15225     to always fail with ENOSYS.  Some functions are actually named
15226     something starting with __ and the normal name is an alias.  */
15227 #if defined (__stub_strftime) || defined (__stub___strftime)
15228 choke me
15229 #else
15230 f = strftime;
15231 #endif
15232
15233 ; return 0; }
15234 EOF
15235 if { (eval echo configure:15236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15236   rm -rf conftest*
15237   eval "ac_cv_func_strftime=yes"
15238 else
15239   echo "configure: failed program was:" >&5
15240   cat conftest.$ac_ext >&5
15241   rm -rf conftest*
15242   eval "ac_cv_func_strftime=no"
15243 fi
15244 rm -f conftest*
15245 fi
15246
15247 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
15248   echo "$ac_t""yes" 1>&6
15249   cat >> confdefs.h <<\EOF
15250 #define HAVE_STRFTIME 1
15251 EOF
15252
15253 else
15254   echo "$ac_t""no" 1>&6
15255 # strftime is in -lintl on SCO UNIX.
15256 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
15257 echo "configure:15258: checking for strftime in -lintl" >&5
15258 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
15259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15260   echo $ac_n "(cached) $ac_c" 1>&6
15261 else
15262   ac_save_LIBS="$LIBS"
15263 LIBS="-lintl  $LIBS"
15264 cat > conftest.$ac_ext <<EOF
15265 #line 15266 "configure"
15266 #include "confdefs.h"
15267 /* Override any gcc2 internal prototype to avoid an error.  */
15268 /* We use char because int might match the return type of a gcc2
15269     builtin and then its argument prototype would still apply.  */
15270 char strftime();
15271
15272 int main() {
15273 strftime()
15274 ; return 0; }
15275 EOF
15276 if { (eval echo configure:15277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15277   rm -rf conftest*
15278   eval "ac_cv_lib_$ac_lib_var=yes"
15279 else
15280   echo "configure: failed program was:" >&5
15281   cat conftest.$ac_ext >&5
15282   rm -rf conftest*
15283   eval "ac_cv_lib_$ac_lib_var=no"
15284 fi
15285 rm -f conftest*
15286 LIBS="$ac_save_LIBS"
15287
15288 fi
15289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15290   echo "$ac_t""yes" 1>&6
15291   cat >> confdefs.h <<\EOF
15292 #define HAVE_STRFTIME 1
15293 EOF
15294
15295 LIBS="-lintl $LIBS"
15296 else
15297   echo "$ac_t""no" 1>&6
15298 fi
15299
15300 fi
15301
15302
15303 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
15304 echo "configure:15305: checking for inet_aton()" >&5
15305 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
15306   echo $ac_n "(cached) $ac_c" 1>&6
15307 else
15308   cat > conftest.$ac_ext <<EOF
15309 #line 15310 "configure"
15310 #include "confdefs.h"
15311
15312 #ifdef HAVE_SYS_TYPES_H
15313 #       include <sys/types.h>
15314 #endif
15315 #ifdef HAVE_SYS_SOCKET_H
15316 #       include <sys/socket.h>
15317 #       ifdef HAVE_SYS_SELECT_H
15318 #               include <sys/select.h>
15319 #       endif
15320 #       include <netinet/in.h>
15321 #       ifdef HAVE_ARPA_INET_H
15322 #               include <arpa/inet.h>
15323 #       endif
15324 #endif
15325
15326 int main() {
15327 struct in_addr in;
15328 int rc = inet_aton( "255.255.255.255", &in );
15329 ; return 0; }
15330 EOF
15331 if { (eval echo configure:15332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15332   rm -rf conftest*
15333   ol_cv_func_inet_aton=yes
15334 else
15335   echo "configure: failed program was:" >&5
15336   cat conftest.$ac_ext >&5
15337   rm -rf conftest*
15338   ol_cv_func_inet_aton=no
15339 fi
15340 rm -f conftest*
15341 fi
15342
15343 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15344   if test $ol_cv_func_inet_aton != no; then
15345     cat >> confdefs.h <<\EOF
15346 #define HAVE_INET_ATON 1
15347 EOF
15348
15349   fi
15350  
15351
15352 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15353 echo "configure:15354: checking for _spawnlp" >&5
15354 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15355   echo $ac_n "(cached) $ac_c" 1>&6
15356 else
15357   cat > conftest.$ac_ext <<EOF
15358 #line 15359 "configure"
15359 #include "confdefs.h"
15360 /* System header to define __stub macros and hopefully few prototypes,
15361     which can conflict with char _spawnlp(); below.  */
15362 #include <assert.h>
15363 /* Override any gcc2 internal prototype to avoid an error.  */
15364 /* We use char because int might match the return type of a gcc2
15365     builtin and then its argument prototype would still apply.  */
15366 char _spawnlp();
15367 char (*f)();
15368
15369 int main() {
15370
15371 /* The GNU C library defines this for functions which it implements
15372     to always fail with ENOSYS.  Some functions are actually named
15373     something starting with __ and the normal name is an alias.  */
15374 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15375 choke me
15376 #else
15377 f = _spawnlp;
15378 #endif
15379
15380 ; return 0; }
15381 EOF
15382 if { (eval echo configure:15383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15383   rm -rf conftest*
15384   eval "ac_cv_func__spawnlp=yes"
15385 else
15386   echo "configure: failed program was:" >&5
15387   cat conftest.$ac_ext >&5
15388   rm -rf conftest*
15389   eval "ac_cv_func__spawnlp=no"
15390 fi
15391 rm -f conftest*
15392 fi
15393
15394 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15395   echo "$ac_t""yes" 1>&6
15396   cat >> confdefs.h <<\EOF
15397 #define HAVE_SPAWNLP 1
15398 EOF
15399
15400 else
15401   echo "$ac_t""no" 1>&6
15402 fi
15403
15404
15405 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15406 echo "configure:15407: checking for _snprintf" >&5
15407 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15408   echo $ac_n "(cached) $ac_c" 1>&6
15409 else
15410   cat > conftest.$ac_ext <<EOF
15411 #line 15412 "configure"
15412 #include "confdefs.h"
15413 /* System header to define __stub macros and hopefully few prototypes,
15414     which can conflict with char _snprintf(); below.  */
15415 #include <assert.h>
15416 /* Override any gcc2 internal prototype to avoid an error.  */
15417 /* We use char because int might match the return type of a gcc2
15418     builtin and then its argument prototype would still apply.  */
15419 char _snprintf();
15420 char (*f)();
15421
15422 int main() {
15423
15424 /* The GNU C library defines this for functions which it implements
15425     to always fail with ENOSYS.  Some functions are actually named
15426     something starting with __ and the normal name is an alias.  */
15427 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15428 choke me
15429 #else
15430 f = _snprintf;
15431 #endif
15432
15433 ; return 0; }
15434 EOF
15435 if { (eval echo configure:15436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15436   rm -rf conftest*
15437   eval "ac_cv_func__snprintf=yes"
15438 else
15439   echo "configure: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   rm -rf conftest*
15442   eval "ac_cv_func__snprintf=no"
15443 fi
15444 rm -f conftest*
15445 fi
15446
15447 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15448   echo "$ac_t""yes" 1>&6
15449   ac_cv_func_snprintf=yes
15450         cat >> confdefs.h <<\EOF
15451 #define snprintf _snprintf
15452 EOF
15453
15454
15455 else
15456   echo "$ac_t""no" 1>&6
15457 fi
15458
15459
15460 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15461 echo "configure:15462: checking for _vsnprintf" >&5
15462 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15463   echo $ac_n "(cached) $ac_c" 1>&6
15464 else
15465   cat > conftest.$ac_ext <<EOF
15466 #line 15467 "configure"
15467 #include "confdefs.h"
15468 /* System header to define __stub macros and hopefully few prototypes,
15469     which can conflict with char _vsnprintf(); below.  */
15470 #include <assert.h>
15471 /* Override any gcc2 internal prototype to avoid an error.  */
15472 /* We use char because int might match the return type of a gcc2
15473     builtin and then its argument prototype would still apply.  */
15474 char _vsnprintf();
15475 char (*f)();
15476
15477 int main() {
15478
15479 /* The GNU C library defines this for functions which it implements
15480     to always fail with ENOSYS.  Some functions are actually named
15481     something starting with __ and the normal name is an alias.  */
15482 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15483 choke me
15484 #else
15485 f = _vsnprintf;
15486 #endif
15487
15488 ; return 0; }
15489 EOF
15490 if { (eval echo configure:15491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15491   rm -rf conftest*
15492   eval "ac_cv_func__vsnprintf=yes"
15493 else
15494   echo "configure: failed program was:" >&5
15495   cat conftest.$ac_ext >&5
15496   rm -rf conftest*
15497   eval "ac_cv_func__vsnprintf=no"
15498 fi
15499 rm -f conftest*
15500 fi
15501
15502 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15503   echo "$ac_t""yes" 1>&6
15504   ac_cv_func_vsnprintf=yes
15505         cat >> confdefs.h <<\EOF
15506 #define vsnprintf _vsnprintf
15507 EOF
15508
15509
15510 else
15511   echo "$ac_t""no" 1>&6
15512 fi
15513
15514
15515 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15516 echo "configure:15517: checking for vprintf" >&5
15517 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15518   echo $ac_n "(cached) $ac_c" 1>&6
15519 else
15520   cat > conftest.$ac_ext <<EOF
15521 #line 15522 "configure"
15522 #include "confdefs.h"
15523 /* System header to define __stub macros and hopefully few prototypes,
15524     which can conflict with char vprintf(); below.  */
15525 #include <assert.h>
15526 /* Override any gcc2 internal prototype to avoid an error.  */
15527 /* We use char because int might match the return type of a gcc2
15528     builtin and then its argument prototype would still apply.  */
15529 char vprintf();
15530 char (*f)();
15531
15532 int main() {
15533
15534 /* The GNU C library defines this for functions which it implements
15535     to always fail with ENOSYS.  Some functions are actually named
15536     something starting with __ and the normal name is an alias.  */
15537 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15538 choke me
15539 #else
15540 f = vprintf;
15541 #endif
15542
15543 ; return 0; }
15544 EOF
15545 if { (eval echo configure:15546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15546   rm -rf conftest*
15547   eval "ac_cv_func_vprintf=yes"
15548 else
15549   echo "configure: failed program was:" >&5
15550   cat conftest.$ac_ext >&5
15551   rm -rf conftest*
15552   eval "ac_cv_func_vprintf=no"
15553 fi
15554 rm -f conftest*
15555 fi
15556
15557 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15558   echo "$ac_t""yes" 1>&6
15559   cat >> confdefs.h <<\EOF
15560 #define HAVE_VPRINTF 1
15561 EOF
15562
15563 else
15564   echo "$ac_t""no" 1>&6
15565 fi
15566
15567 if test "$ac_cv_func_vprintf" != yes; then
15568 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15569 echo "configure:15570: checking for _doprnt" >&5
15570 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15571   echo $ac_n "(cached) $ac_c" 1>&6
15572 else
15573   cat > conftest.$ac_ext <<EOF
15574 #line 15575 "configure"
15575 #include "confdefs.h"
15576 /* System header to define __stub macros and hopefully few prototypes,
15577     which can conflict with char _doprnt(); below.  */
15578 #include <assert.h>
15579 /* Override any gcc2 internal prototype to avoid an error.  */
15580 /* We use char because int might match the return type of a gcc2
15581     builtin and then its argument prototype would still apply.  */
15582 char _doprnt();
15583 char (*f)();
15584
15585 int main() {
15586
15587 /* The GNU C library defines this for functions which it implements
15588     to always fail with ENOSYS.  Some functions are actually named
15589     something starting with __ and the normal name is an alias.  */
15590 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15591 choke me
15592 #else
15593 f = _doprnt;
15594 #endif
15595
15596 ; return 0; }
15597 EOF
15598 if { (eval echo configure:15599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15599   rm -rf conftest*
15600   eval "ac_cv_func__doprnt=yes"
15601 else
15602   echo "configure: failed program was:" >&5
15603   cat conftest.$ac_ext >&5
15604   rm -rf conftest*
15605   eval "ac_cv_func__doprnt=no"
15606 fi
15607 rm -f conftest*
15608 fi
15609
15610 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15611   echo "$ac_t""yes" 1>&6
15612   cat >> confdefs.h <<\EOF
15613 #define HAVE_DOPRNT 1
15614 EOF
15615
15616 else
15617   echo "$ac_t""no" 1>&6
15618 fi
15619
15620 fi
15621
15622
15623 if test $ac_cv_func_vprintf = yes ; then
15624                 for ac_func in vsnprintf vsprintf
15625 do
15626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15627 echo "configure:15628: checking for $ac_func" >&5
15628 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15629   echo $ac_n "(cached) $ac_c" 1>&6
15630 else
15631   cat > conftest.$ac_ext <<EOF
15632 #line 15633 "configure"
15633 #include "confdefs.h"
15634 /* System header to define __stub macros and hopefully few prototypes,
15635     which can conflict with char $ac_func(); below.  */
15636 #include <assert.h>
15637 /* Override any gcc2 internal prototype to avoid an error.  */
15638 /* We use char because int might match the return type of a gcc2
15639     builtin and then its argument prototype would still apply.  */
15640 char $ac_func();
15641 char (*f)();
15642
15643 int main() {
15644
15645 /* The GNU C library defines this for functions which it implements
15646     to always fail with ENOSYS.  Some functions are actually named
15647     something starting with __ and the normal name is an alias.  */
15648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15649 choke me
15650 #else
15651 f = $ac_func;
15652 #endif
15653
15654 ; return 0; }
15655 EOF
15656 if { (eval echo configure:15657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15657   rm -rf conftest*
15658   eval "ac_cv_func_$ac_func=yes"
15659 else
15660   echo "configure: failed program was:" >&5
15661   cat conftest.$ac_ext >&5
15662   rm -rf conftest*
15663   eval "ac_cv_func_$ac_func=no"
15664 fi
15665 rm -f conftest*
15666 fi
15667
15668 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15669   echo "$ac_t""yes" 1>&6
15670     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15671   cat >> confdefs.h <<EOF
15672 #define $ac_tr_func 1
15673 EOF
15674  
15675 else
15676   echo "$ac_t""no" 1>&6
15677 fi
15678 done
15679
15680 fi
15681
15682 for ac_func in \
15683         bcopy                   \
15684         closesocket             \
15685         chroot                  \
15686         endgrent                \
15687         endpwent                \
15688         flock                   \
15689         getdtablesize   \
15690         getgrgid                \
15691         gethostname             \
15692         getpass                 \
15693         getpassphrase   \
15694         getpwuid                \
15695         getpwnam                \
15696         getspnam                \
15697         gettimeofday    \
15698         initgroups              \
15699         lockf                   \
15700         memcpy                  \
15701         memmove                 \
15702         mkstemp                 \
15703         pipe                    \
15704         read                    \
15705         recv                    \
15706         recvfrom                \
15707         setpwfile               \
15708         setgid                  \
15709         setegid                 \
15710         setsid                  \
15711         setuid                  \
15712         seteuid                 \
15713         sigaction               \
15714         signal                  \
15715         sigset                  \
15716         snprintf                \
15717         strdup                  \
15718         strerror                \
15719         strpbrk                 \
15720         strrchr                 \
15721         strsep                  \
15722         strstr                  \
15723         strtol                  \
15724         strtoul                 \
15725         strspn                  \
15726         sysconf                 \
15727         waitpid                 \
15728         wait4                   \
15729         write                   \
15730         send                    \
15731         sendto                  \
15732
15733 do
15734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15735 echo "configure:15736: checking for $ac_func" >&5
15736 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15737   echo $ac_n "(cached) $ac_c" 1>&6
15738 else
15739   cat > conftest.$ac_ext <<EOF
15740 #line 15741 "configure"
15741 #include "confdefs.h"
15742 /* System header to define __stub macros and hopefully few prototypes,
15743     which can conflict with char $ac_func(); below.  */
15744 #include <assert.h>
15745 /* Override any gcc2 internal prototype to avoid an error.  */
15746 /* We use char because int might match the return type of a gcc2
15747     builtin and then its argument prototype would still apply.  */
15748 char $ac_func();
15749 char (*f)();
15750
15751 int main() {
15752
15753 /* The GNU C library defines this for functions which it implements
15754     to always fail with ENOSYS.  Some functions are actually named
15755     something starting with __ and the normal name is an alias.  */
15756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15757 choke me
15758 #else
15759 f = $ac_func;
15760 #endif
15761
15762 ; return 0; }
15763 EOF
15764 if { (eval echo configure:15765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15765   rm -rf conftest*
15766   eval "ac_cv_func_$ac_func=yes"
15767 else
15768   echo "configure: failed program was:" >&5
15769   cat conftest.$ac_ext >&5
15770   rm -rf conftest*
15771   eval "ac_cv_func_$ac_func=no"
15772 fi
15773 rm -f conftest*
15774 fi
15775
15776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15777   echo "$ac_t""yes" 1>&6
15778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15779   cat >> confdefs.h <<EOF
15780 #define $ac_tr_func 1
15781 EOF
15782  
15783 else
15784   echo "$ac_t""no" 1>&6
15785 fi
15786 done
15787
15788
15789 for ac_func in getopt tempnam
15790 do
15791 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15792 echo "configure:15793: checking for $ac_func" >&5
15793 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15794   echo $ac_n "(cached) $ac_c" 1>&6
15795 else
15796   cat > conftest.$ac_ext <<EOF
15797 #line 15798 "configure"
15798 #include "confdefs.h"
15799 /* System header to define __stub macros and hopefully few prototypes,
15800     which can conflict with char $ac_func(); below.  */
15801 #include <assert.h>
15802 /* Override any gcc2 internal prototype to avoid an error.  */
15803 /* We use char because int might match the return type of a gcc2
15804     builtin and then its argument prototype would still apply.  */
15805 char $ac_func();
15806 char (*f)();
15807
15808 int main() {
15809
15810 /* The GNU C library defines this for functions which it implements
15811     to always fail with ENOSYS.  Some functions are actually named
15812     something starting with __ and the normal name is an alias.  */
15813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15814 choke me
15815 #else
15816 f = $ac_func;
15817 #endif
15818
15819 ; return 0; }
15820 EOF
15821 if { (eval echo configure:15822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15822   rm -rf conftest*
15823   eval "ac_cv_func_$ac_func=yes"
15824 else
15825   echo "configure: failed program was:" >&5
15826   cat conftest.$ac_ext >&5
15827   rm -rf conftest*
15828   eval "ac_cv_func_$ac_func=no"
15829 fi
15830 rm -f conftest*
15831 fi
15832
15833 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15834   echo "$ac_t""yes" 1>&6
15835     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15836   cat >> confdefs.h <<EOF
15837 #define $ac_tr_func 1
15838 EOF
15839  
15840 else
15841   echo "$ac_t""no" 1>&6
15842 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15843 fi
15844 done
15845
15846
15847
15848 if test "$ac_cv_func_getopt" != yes; then
15849     LIBSRCS="$LIBSRCS getopt.c"
15850 fi
15851
15852 if test "$ac_cv_func_tempnam" != yes; then
15853     LIBSRCS="$LIBSRCS tempnam.c"
15854 fi
15855
15856 # Check Configuration
15857 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15858 echo "configure:15859: checking declaration of sys_errlist" >&5
15859 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15860   echo $ac_n "(cached) $ac_c" 1>&6
15861 else
15862   
15863         cat > conftest.$ac_ext <<EOF
15864 #line 15865 "configure"
15865 #include "confdefs.h"
15866
15867 #include <stdio.h>
15868 #include <sys/types.h>
15869 #include <errno.h>
15870 #ifdef WINNT
15871 #include <stdlib.h>
15872 #endif 
15873 int main() {
15874 char *c = (char *) *sys_errlist
15875 ; return 0; }
15876 EOF
15877 if { (eval echo configure:15878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15878   rm -rf conftest*
15879   ol_cv_dcl_sys_errlist=yes
15880         ol_cv_have_sys_errlist=yes
15881 else
15882   echo "configure: failed program was:" >&5
15883   cat conftest.$ac_ext >&5
15884   rm -rf conftest*
15885   ol_cv_dcl_sys_errlist=no
15886 fi
15887 rm -f conftest*
15888 fi
15889
15890 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15891 #
15892 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15893 if test $ol_cv_dcl_sys_errlist = no ; then
15894         cat >> confdefs.h <<\EOF
15895 #define DECL_SYS_ERRLIST 1
15896 EOF
15897
15898
15899         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15900 echo "configure:15901: checking existence of sys_errlist" >&5
15901 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15902   echo $ac_n "(cached) $ac_c" 1>&6
15903 else
15904   
15905                 cat > conftest.$ac_ext <<EOF
15906 #line 15907 "configure"
15907 #include "confdefs.h"
15908 #include <errno.h>
15909 int main() {
15910 char *c = (char *) *sys_errlist
15911 ; return 0; }
15912 EOF
15913 if { (eval echo configure:15914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15914   rm -rf conftest*
15915   ol_cv_have_sys_errlist=yes
15916 else
15917   echo "configure: failed program was:" >&5
15918   cat conftest.$ac_ext >&5
15919   rm -rf conftest*
15920   ol_cv_have_sys_errlist=no
15921 fi
15922 rm -f conftest*
15923 fi
15924
15925 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15926 fi
15927 if test $ol_cv_have_sys_errlist = yes ; then
15928         cat >> confdefs.h <<\EOF
15929 #define HAVE_SYS_ERRLIST 1
15930 EOF
15931
15932 fi
15933
15934
15935
15936 if test "$ol_enable_debug" != no ; then
15937         cat >> confdefs.h <<\EOF
15938 #define LDAP_DEBUG 1
15939 EOF
15940
15941 fi
15942 if test "$ol_enable_syslog" = yes ; then
15943         cat >> confdefs.h <<\EOF
15944 #define LDAP_SYSLOG 1
15945 EOF
15946
15947 fi
15948 if test "$ol_enable_cache" = no ; then
15949         cat >> confdefs.h <<\EOF
15950 #define LDAP_NOCACHE 1
15951 EOF
15952
15953 fi
15954 if test "$ol_link_kbind" != no ; then
15955         cat >> confdefs.h <<\EOF
15956 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15957 EOF
15958
15959 fi
15960 if test "$ol_enable_proctitle" != no ; then
15961         cat >> confdefs.h <<\EOF
15962 #define LDAP_PROCTITLE 1
15963 EOF
15964
15965 fi
15966 if test "$ol_enable_referrals" != no ; then
15967         cat >> confdefs.h <<\EOF
15968 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15969 EOF
15970
15971 fi
15972 if test "$ol_enable_local" != no; then
15973         cat >> confdefs.h <<\EOF
15974 #define LDAP_PF_LOCAL 1
15975 EOF
15976
15977 fi
15978 if test "$ol_link_ipv6" != no; then
15979         cat >> confdefs.h <<\EOF
15980 #define LDAP_PF_INET6 1
15981 EOF
15982
15983 fi
15984 if test "$ol_enable_cleartext" != no ; then
15985         cat >> confdefs.h <<\EOF
15986 #define SLAPD_CLEARTEXT 1
15987 EOF
15988
15989 fi
15990 if test "$ol_enable_crypt" != no ; then
15991         cat >> confdefs.h <<\EOF
15992 #define SLAPD_CRYPT 1
15993 EOF
15994
15995 fi
15996 if test "$ol_link_kpasswd" != no ; then
15997         cat >> confdefs.h <<\EOF
15998 #define SLAPD_KPASSWD 1
15999 EOF
16000
16001 fi
16002 if test "$ol_link_spasswd" != no ; then
16003         cat >> confdefs.h <<\EOF
16004 #define SLAPD_SPASSWD 1
16005 EOF
16006
16007 fi
16008 if test "$ol_enable_multimaster" != no ; then
16009         cat >> confdefs.h <<\EOF
16010 #define SLAPD_MULTIMASTER 1
16011 EOF
16012
16013 fi
16014 if test "$ol_enable_phonetic" != no ; then
16015         cat >> confdefs.h <<\EOF
16016 #define SLAPD_PHONETIC 1
16017 EOF
16018
16019 fi
16020 if test "$ol_enable_rlookups" != no ; then
16021         cat >> confdefs.h <<\EOF
16022 #define SLAPD_RLOOKUPS 1
16023 EOF
16024
16025 fi
16026 if test "$ol_enable_aci" != no ; then
16027         cat >> confdefs.h <<\EOF
16028 #define SLAPD_ACI_ENABLED 1
16029 EOF
16030
16031 fi
16032
16033 if test "$ol_link_modules" != no ; then
16034         cat >> confdefs.h <<\EOF
16035 #define SLAPD_MODULES 1
16036 EOF
16037
16038         BUILD_SLAPD=yes
16039         SLAPD_MODULES_LDFLAGS="-dlopen self"
16040 fi
16041
16042 if test "$ol_enable_bdb" != no ; then
16043         cat >> confdefs.h <<\EOF
16044 #define SLAPD_BDB 1
16045 EOF
16046
16047         BUILD_SLAPD=yes
16048         BUILD_BDB=yes
16049         if test "$ol_with_bdb_module" != static ; then
16050                 cat >> confdefs.h <<\EOF
16051 #define SLAPD_BDB_DYNAMIC 1
16052 EOF
16053
16054                 BUILD_BDB=mod
16055                 BUILD_BDB_DYNAMIC=shared
16056                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
16057         fi
16058 fi
16059
16060 if test "$ol_link_dnssrv" != no ; then
16061         cat >> confdefs.h <<\EOF
16062 #define SLAPD_DNSSRV 1
16063 EOF
16064
16065         BUILD_SLAPD=yes
16066         BUILD_DNSSRV=yes
16067         if test "$ol_with_dnssrv_module" != static ; then
16068                 cat >> confdefs.h <<\EOF
16069 #define SLAPD_DNSSRV_DYNAMIC 1
16070 EOF
16071
16072                 BUILD_DNSSRV=mod
16073                 BUILD_DNSSRV_DYNAMIC=shared
16074                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
16075         fi
16076 fi
16077
16078 if test "$ol_enable_ldap" != no ; then
16079         cat >> confdefs.h <<\EOF
16080 #define SLAPD_LDAP 1
16081 EOF
16082
16083         BUILD_SLAPD=yes
16084         BUILD_LDAP=yes
16085         if test "$ol_with_ldap_module" != static ; then
16086                 cat >> confdefs.h <<\EOF
16087 #define SLAPD_LDAP_DYNAMIC 1
16088 EOF
16089
16090                 BUILD_LDAP=mod
16091                 BUILD_LDAP_DYNAMIC=shared
16092                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
16093         fi
16094 fi
16095
16096 if test "$ol_link_ldbm" != no ; then
16097         cat >> confdefs.h <<\EOF
16098 #define SLAPD_LDBM 1
16099 EOF
16100
16101         BUILD_SLAPD=yes
16102         BUILD_LDBM=yes
16103         if test "$ol_with_ldbm_module" != static ; then
16104                 cat >> confdefs.h <<\EOF
16105 #define SLAPD_LDBM_DYNAMIC 1
16106 EOF
16107
16108                 BUILD_LDBM=mod
16109                 BUILD_LDBM_DYNAMIC=shared
16110                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
16111         fi
16112 fi
16113
16114 if test "$ol_enable_passwd" != no ; then
16115         cat >> confdefs.h <<\EOF
16116 #define SLAPD_PASSWD 1
16117 EOF
16118
16119         BUILD_SLAPD=yes
16120         BUILD_PASSWD=yes
16121         if test "$ol_with_passwd_module" != static ; then
16122                 cat >> confdefs.h <<\EOF
16123 #define SLAPD_PASSWD_DYNAMIC 1
16124 EOF
16125
16126                 BUILD_PASSWD=mod
16127                 BUILD_PASSWD_DYNAMIC=shared
16128                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
16129         fi
16130 fi
16131
16132 if test "$ol_link_perl" != no ; then
16133         cat >> confdefs.h <<\EOF
16134 #define SLAPD_PERL 1
16135 EOF
16136
16137         BUILD_SLAPD=yes
16138         BUILD_PERL=yes
16139         if test "$ol_with_perl_module" != static ; then
16140                 cat >> confdefs.h <<\EOF
16141 #define SLAPD_PERL_DYNAMIC 1
16142 EOF
16143
16144                 BUILD_PERL=mod
16145                 BUILD_PERL_DYNAMIC=shared
16146                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
16147         fi
16148 fi
16149
16150 if test "$ol_enable_shell" != no ; then
16151         cat >> confdefs.h <<\EOF
16152 #define SLAPD_SHELL 1
16153 EOF
16154
16155         BUILD_SLAPD=yes
16156         BUILD_SHELL=yes
16157         if test "$ol_with_shell_module" != static ; then
16158                 cat >> confdefs.h <<\EOF
16159 #define SLAPD_SHELL_DYNAMIC 1
16160 EOF
16161
16162                 BUILD_SHELL=mod
16163                 BUILD_SHELL_DYNAMIC=shared
16164                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
16165         fi
16166 fi
16167
16168 if test "$ol_enable_tcl" != no ; then
16169         cat >> confdefs.h <<\EOF
16170 #define SLAPD_TCL 1
16171 EOF
16172
16173         BUILD_SLAPD=yes
16174         BUILD_TCL=yes
16175         if test "$ol_with_tcl_module" != static; then
16176                 cat >> confdefs.h <<\EOF
16177 #define SLAPD_TCL_DYNAMIC 1
16178 EOF
16179
16180                 BUILD_TCL=mod
16181                 BUILD_TCL_DYNAMIC=shared
16182                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
16183         fi
16184 fi
16185
16186 if test "$ol_link_sql" != no ; then
16187         cat >> confdefs.h <<\EOF
16188 #define SLAPD_SQL 1
16189 EOF
16190
16191         BUILD_SLAPD=yes
16192         BUILD_SQL=yes
16193         if test "$ol_with_sql_module" != static; then
16194                 cat >> confdefs.h <<\EOF
16195 #define SLAPD_SQL_DYNAMIC 1
16196 EOF
16197
16198                 BUILD_SQL=mod
16199                 BUILD_SQL_DYNAMIC=shared
16200                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
16201         fi
16202 fi
16203
16204 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
16205         $BUILD_SLAPD = yes ; then
16206         BUILD_SLURPD=yes
16207 fi
16208
16209
16210 if test "$LINK_BINS_DYNAMIC" = yes; then
16211     LIB_LINKAGE=DYN
16212     LT_LIB_LINKAGE=shared
16213 else
16214     LIB_LINKAGE=STAT
16215     LT_LIB_LINKAGE=static
16216 fi
16217
16218 if test "$ac_cv_mingw32" = yes ; then
16219     PLAT=NT
16220     DYN_EXT=dll
16221 else
16222     PLAT=UNIX
16223     DYN_EXT=so
16224 fi
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234   
16235   
16236   
16237   
16238   
16239   
16240   
16241   
16242   
16243   
16244   
16245   
16246   
16247   
16248   
16249   
16250   
16251   
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287 trap '' 1 2 15
16288
16289 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
16290
16291 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16292 # Let make expand exec_prefix.
16293 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16294
16295 # Any assignment to VPATH causes Sun make to only execute
16296 # the first set of double-colon rules, so remove it if not needed.
16297 # If there is a colon in the path, we need to keep it.
16298 if test "x$srcdir" = x.; then
16299   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
16300 fi
16301
16302 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
16303
16304 DEFS=-DHAVE_CONFIG_H
16305
16306 # Without the "./", some shells look in PATH for config.status.
16307 : ${CONFIG_STATUS=./config.status}
16308
16309 echo creating $CONFIG_STATUS
16310 rm -f $CONFIG_STATUS
16311 cat > $CONFIG_STATUS <<EOF
16312 #! /bin/sh
16313 # Generated automatically by configure.
16314 # Run this file to recreate the current configuration.
16315 # This directory was configured as follows,
16316 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16317 #
16318 # $0 $ac_configure_args
16319 #
16320 # Compiler output produced by configure, useful for debugging
16321 # configure, is in ./config.log if it exists.
16322
16323 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16324 for ac_option
16325 do
16326   case "\$ac_option" in
16327   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16328     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16329     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16330   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16331     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16332     exit 0 ;;
16333   -help | --help | --hel | --he | --h)
16334     echo "\$ac_cs_usage"; exit 0 ;;
16335   *) echo "\$ac_cs_usage"; exit 1 ;;
16336   esac
16337 done
16338
16339 ac_given_srcdir=$srcdir
16340 ac_given_INSTALL="$INSTALL"
16341
16342 trap 'rm -fr `echo "\
16343 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16344 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16345 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16346 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16347 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16348 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16349 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16350 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16351 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16352 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16353 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16354 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16355 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16356 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16357 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16358 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16359 include/Makefile:build/top.mk:include/Makefile.in \
16360 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16361 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16362 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16363 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16364 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16365 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16366 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16367 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16368 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16369 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16370 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16371 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16372 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16373 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16374 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16375 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16376 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16377 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16378 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16379 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16380 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16381 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16382 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16383 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16384 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16385 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16386 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16387 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16388  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16389 EOF
16390 cat >> $CONFIG_STATUS <<EOF
16391
16392 # Protect against being on the right side of a sed subst in config.status.
16393 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16394  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16395 $ac_vpsub
16396 $extrasub
16397 s%@SHELL@%$SHELL%g
16398 s%@CFLAGS@%$CFLAGS%g
16399 s%@CPPFLAGS@%$CPPFLAGS%g
16400 s%@CXXFLAGS@%$CXXFLAGS%g
16401 s%@FFLAGS@%$FFLAGS%g
16402 s%@DEFS@%$DEFS%g
16403 s%@LDFLAGS@%$LDFLAGS%g
16404 s%@LIBS@%$LIBS%g
16405 s%@exec_prefix@%$exec_prefix%g
16406 s%@prefix@%$prefix%g
16407 s%@program_transform_name@%$program_transform_name%g
16408 s%@bindir@%$bindir%g
16409 s%@sbindir@%$sbindir%g
16410 s%@libexecdir@%$libexecdir%g
16411 s%@datadir@%$datadir%g
16412 s%@sysconfdir@%$sysconfdir%g
16413 s%@sharedstatedir@%$sharedstatedir%g
16414 s%@localstatedir@%$localstatedir%g
16415 s%@libdir@%$libdir%g
16416 s%@includedir@%$includedir%g
16417 s%@oldincludedir@%$oldincludedir%g
16418 s%@infodir@%$infodir%g
16419 s%@mandir@%$mandir%g
16420 s%@host@%$host%g
16421 s%@host_alias@%$host_alias%g
16422 s%@host_cpu@%$host_cpu%g
16423 s%@host_vendor@%$host_vendor%g
16424 s%@host_os@%$host_os%g
16425 s%@target@%$target%g
16426 s%@target_alias@%$target_alias%g
16427 s%@target_cpu@%$target_cpu%g
16428 s%@target_vendor@%$target_vendor%g
16429 s%@target_os@%$target_os%g
16430 s%@build@%$build%g
16431 s%@build_alias@%$build_alias%g
16432 s%@build_cpu@%$build_cpu%g
16433 s%@build_vendor@%$build_vendor%g
16434 s%@build_os@%$build_os%g
16435 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16436 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16437 s%@INSTALL_DATA@%$INSTALL_DATA%g
16438 s%@PACKAGE@%$PACKAGE%g
16439 s%@VERSION@%$VERSION%g
16440 s%@ACLOCAL@%$ACLOCAL%g
16441 s%@AUTOCONF@%$AUTOCONF%g
16442 s%@AUTOMAKE@%$AUTOMAKE%g
16443 s%@AUTOHEADER@%$AUTOHEADER%g
16444 s%@MAKEINFO@%$MAKEINFO%g
16445 s%@install_sh@%$install_sh%g
16446 s%@AMTAR@%$AMTAR%g
16447 s%@AWK@%$AWK%g
16448 s%@AMTARFLAGS@%$AMTARFLAGS%g
16449 s%@SET_MAKE@%$SET_MAKE%g
16450 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
16451 s%@top_builddir@%$top_builddir%g
16452 s%@ldap_subdir@%$ldap_subdir%g
16453 s%@CC@%$CC%g
16454 s%@RANLIB@%$RANLIB%g
16455 s%@LN_S@%$LN_S%g
16456 s%@DLLTOOL@%$DLLTOOL%g
16457 s%@AS@%$AS%g
16458 s%@OBJDUMP@%$OBJDUMP%g
16459 s%@LIBTOOL@%$LIBTOOL%g
16460 s%@LN_H@%$LN_H%g
16461 s%@SENDMAIL@%$SENDMAIL%g
16462 s%@EDITOR@%$EDITOR%g
16463 s%@FINGER@%$FINGER%g
16464 s%@PERLBIN@%$PERLBIN%g
16465 s%@CPP@%$CPP%g
16466 s%@EXEEXT@%$EXEEXT%g
16467 s%@OBJEXT@%$OBJEXT%g
16468 s%@OL_MKDEP@%$OL_MKDEP%g
16469 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16470 s%@LIBOBJS@%$LIBOBJS%g
16471 s%@LIBSRCS@%$LIBSRCS%g
16472 s%@PLAT@%$PLAT%g
16473 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16474 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16475 s%@DYN_EXT@%$DYN_EXT%g
16476 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16477 s%@BUILD_BDB@%$BUILD_BDB%g
16478 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16479 s%@BUILD_LDAP@%$BUILD_LDAP%g
16480 s%@BUILD_LDBM@%$BUILD_LDBM%g
16481 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16482 s%@BUILD_PERL@%$BUILD_PERL%g
16483 s%@BUILD_SHELL@%$BUILD_SHELL%g
16484 s%@BUILD_SQL@%$BUILD_SQL%g
16485 s%@BUILD_TCL@%$BUILD_TCL%g
16486 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
16487 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16488 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16489 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16490 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16491 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16492 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16493 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16494 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16495 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16496 s%@LDAP_LIBS@%$LDAP_LIBS%g
16497 s%@LDIF_LIBS@%$LDIF_LIBS%g
16498 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16499 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16500 s%@LDBM_LIBS@%$LDBM_LIBS%g
16501 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16502 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16503 s%@WRAP_LIBS@%$WRAP_LIBS%g
16504 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16505 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16506 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16507 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16508 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16509 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16510 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16511 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16512 s%@KRB4_LIBS@%$KRB4_LIBS%g
16513 s%@KRB5_LIBS@%$KRB5_LIBS%g
16514 s%@READLINE_LIBS@%$READLINE_LIBS%g
16515 s%@SASL_LIBS@%$SASL_LIBS%g
16516 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16517 s%@TLS_LIBS@%$TLS_LIBS%g
16518 s%@MODULES_LIBS@%$MODULES_LIBS%g
16519 s%@AUTH_LIBS@%$AUTH_LIBS%g
16520 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16521 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16522 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16523
16524 CEOF
16525 EOF
16526
16527 cat >> $CONFIG_STATUS <<\EOF
16528
16529 # Split the substitutions into bite-sized pieces for seds with
16530 # small command number limits, like on Digital OSF/1 and HP-UX.
16531 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16532 ac_file=1 # Number of current file.
16533 ac_beg=1 # First line for current file.
16534 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16535 ac_more_lines=:
16536 ac_sed_cmds=""
16537 while $ac_more_lines; do
16538   if test $ac_beg -gt 1; then
16539     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16540   else
16541     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16542   fi
16543   if test ! -s conftest.s$ac_file; then
16544     ac_more_lines=false
16545     rm -f conftest.s$ac_file
16546   else
16547     if test -z "$ac_sed_cmds"; then
16548       ac_sed_cmds="sed -f conftest.s$ac_file"
16549     else
16550       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16551     fi
16552     ac_file=`expr $ac_file + 1`
16553     ac_beg=$ac_end
16554     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16555   fi
16556 done
16557 if test -z "$ac_sed_cmds"; then
16558   ac_sed_cmds=cat
16559 fi
16560 EOF
16561
16562 cat >> $CONFIG_STATUS <<EOF
16563
16564 CONFIG_FILES=\${CONFIG_FILES-"\
16565 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16566 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16567 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16568 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16569 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16570 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16571 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16572 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16573 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16574 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16575 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16576 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16577 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16578 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16579 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16580 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16581 include/Makefile:build/top.mk:include/Makefile.in \
16582 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16583 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16584 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16585 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16586 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16587 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16588 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16589 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16590 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16591 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16592 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16593 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
16594 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16595 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16596 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16597 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16598 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16599 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16600 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16601 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16602 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16603 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16604 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16605 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16606 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16607 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16608 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16609 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16610 "}
16611 EOF
16612 cat >> $CONFIG_STATUS <<\EOF
16613 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16614   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16615   case "$ac_file" in
16616   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16617        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16618   *) ac_file_in="${ac_file}.in" ;;
16619   esac
16620
16621   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16622
16623   # Remove last slash and all that follows it.  Not all systems have dirname.
16624   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16625   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16626     # The file is in a subdirectory.
16627     test ! -d "$ac_dir" && mkdir "$ac_dir"
16628     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16629     # A "../" for each directory in $ac_dir_suffix.
16630     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16631   else
16632     ac_dir_suffix= ac_dots=
16633   fi
16634
16635   case "$ac_given_srcdir" in
16636   .)  srcdir=.
16637       if test -z "$ac_dots"; then top_srcdir=.
16638       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16639   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16640   *) # Relative path.
16641     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16642     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16643   esac
16644
16645   case "$ac_given_INSTALL" in
16646   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16647   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16648   esac
16649
16650   echo creating "$ac_file"
16651   rm -f "$ac_file"
16652   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16653   case "$ac_file" in
16654   *[Mm]akefile*) ac_comsub="1i\\
16655 # $configure_input" ;;
16656   *) ac_comsub= ;;
16657   esac
16658
16659   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16660   sed -e "$ac_comsub
16661 s%@configure_input@%$configure_input%g
16662 s%@srcdir@%$srcdir%g
16663 s%@top_srcdir@%$top_srcdir%g
16664 s%@INSTALL@%$INSTALL%g
16665 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16666 fi; done
16667 rm -f conftest.s*
16668
16669 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16670 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16671 #
16672 # ac_d sets the value in "#define NAME VALUE" lines.
16673 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16674 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16675 ac_dC='\3'
16676 ac_dD='%g'
16677 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16678 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16679 ac_uB='\([      ]\)%\1#\2define\3'
16680 ac_uC=' '
16681 ac_uD='\4%g'
16682 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16683 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16684 ac_eB='$%\1#\2define\3'
16685 ac_eC=' '
16686 ac_eD='%g'
16687
16688 if test "${CONFIG_HEADERS+set}" != set; then
16689 EOF
16690 cat >> $CONFIG_STATUS <<EOF
16691   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16692 EOF
16693 cat >> $CONFIG_STATUS <<\EOF
16694 fi
16695 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16696   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16697   case "$ac_file" in
16698   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16699        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16700   *) ac_file_in="${ac_file}.in" ;;
16701   esac
16702
16703   echo creating $ac_file
16704
16705   rm -f conftest.frag conftest.in conftest.out
16706   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16707   cat $ac_file_inputs > conftest.in
16708
16709 EOF
16710
16711 # Transform confdefs.h into a sed script conftest.vals that substitutes
16712 # the proper values into config.h.in to produce config.h.  And first:
16713 # Protect against being on the right side of a sed subst in config.status.
16714 # Protect against being in an unquoted here document in config.status.
16715 rm -f conftest.vals
16716 cat > conftest.hdr <<\EOF
16717 s/[\\&%]/\\&/g
16718 s%[\\$`]%\\&%g
16719 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16720 s%ac_d%ac_u%gp
16721 s%ac_u%ac_e%gp
16722 EOF
16723 sed -n -f conftest.hdr confdefs.h > conftest.vals
16724 rm -f conftest.hdr
16725
16726 # This sed command replaces #undef with comments.  This is necessary, for
16727 # example, in the case of _POSIX_SOURCE, which is predefined and required
16728 # on some systems where configure will not decide to define it.
16729 cat >> conftest.vals <<\EOF
16730 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16731 EOF
16732
16733 # Break up conftest.vals because some shells have a limit on
16734 # the size of here documents, and old seds have small limits too.
16735
16736 rm -f conftest.tail
16737 while :
16738 do
16739   ac_lines=`grep -c . conftest.vals`
16740   # grep -c gives empty output for an empty file on some AIX systems.
16741   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16742   # Write a limited-size here document to conftest.frag.
16743   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16744   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16745   echo 'CEOF
16746   sed -f conftest.frag conftest.in > conftest.out
16747   rm -f conftest.in
16748   mv conftest.out conftest.in
16749 ' >> $CONFIG_STATUS
16750   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16751   rm -f conftest.vals
16752   mv conftest.tail conftest.vals
16753 done
16754 rm -f conftest.vals
16755
16756 cat >> $CONFIG_STATUS <<\EOF
16757   rm -f conftest.frag conftest.h
16758   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16759   cat conftest.in >> conftest.h
16760   rm -f conftest.in
16761   if cmp -s $ac_file conftest.h 2>/dev/null; then
16762     echo "$ac_file is unchanged"
16763     rm -f conftest.h
16764   else
16765     # Remove last slash and all that follows it.  Not all systems have dirname.
16766       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16767       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16768       # The file is in a subdirectory.
16769       test ! -d "$ac_dir" && mkdir "$ac_dir"
16770     fi
16771     rm -f $ac_file
16772     mv conftest.h $ac_file
16773   fi
16774 fi; done
16775
16776 EOF
16777 cat >> $CONFIG_STATUS <<EOF
16778
16779 EOF
16780 cat >> $CONFIG_STATUS <<\EOF
16781
16782 date > stamp-h
16783 echo Please \"make depend\" to build dependencies
16784
16785 exit 0
16786 EOF
16787 chmod +x $CONFIG_STATUS
16788 rm -fr confdefs* $ac_clean_files
16789 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16790