]> git.sur5r.net Git - openldap/blob - configure
Clear CDPATH
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.309 2000/06/06 23:09:42 kurt Exp  
4
5 # Copyright 1998-2000 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms are permitted only
8 # as authorized by the OpenLDAP Public License.  A copy of this
9 # license is available at http://www.OpenLDAP.org/license.html or
10 # in file LICENSE in the top-level directory of the distribution.
11
12 echo "Copyright 1998-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # clear CDPATH
16 CDPATH=:
17
18 # Guess values for system-dependent variables and create Makefiles.
19 # Generated automatically using autoconf version 2.13.1 
20 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
21 #
22 # This configure script is free software; the Free Software Foundation
23 # gives unlimited permission to copy, distribute and modify it.
24
25 # Defaults:
26 ac_help=
27 ac_default_prefix=/usr/local
28 # Any additions from configure.in:
29 ac_default_prefix=/usr/local
30 ac_help="$ac_help
31   --with-subdir=DIR change default subdirectory used for installs"
32 ac_help="$ac_help
33   --enable-debug        enable debugging (yes)"
34 ac_help="$ac_help
35   --enable-syslog       enable syslog support (auto)"
36 ac_help="$ac_help
37   --enable-proctitle    enable proctitle support (yes)"
38 ac_help="$ac_help
39   --enable-cache        enable caching (yes)"
40 ac_help="$ac_help
41   --enable-referrals    enable V2 Referrals extension (yes)"
42 ac_help="$ac_help
43   --enable-kbind        enable V2 Kerberos IV bind (auto)"
44 ac_help="$ac_help
45   --enable-cldap        enable connectionless ldap (no)"
46 ac_help="$ac_help
47   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
48 ac_help="$ac_help
49   --enable-x-compile    enable cross compiling (no)"
50 ac_help="$ac_help
51   --with-cyrus-sasl     with Cyrus SASL support (auto)"
52 ac_help="$ac_help
53   --with-fetch          with fetch URL support (auto)"
54 ac_help="$ac_help
55   --with-kerberos       with support (auto)"
56 ac_help="$ac_help
57   --with-readline       with readline support (auto)"
58 ac_help="$ac_help
59   --with-threads        use threads (auto)"
60 ac_help="$ac_help
61   --with-tls            with TLS/SSL support (auto)"
62 ac_help="$ac_help
63   --with-yielding-select        with implicitly yielding select (auto)"
64 ac_help="$ac_help
65 SLAPD (Standalone LDAP Daemon) Options:"
66 ac_help="$ac_help
67   --enable-slapd        enable building slapd (yes)"
68 ac_help="$ac_help
69     --enable-cleartext  enable cleartext passwords (yes)"
70 ac_help="$ac_help
71     --enable-crypt      enable crypt(3) passwords (auto)"
72 ac_help="$ac_help
73     --enable-kpasswd    enable kerberos password verification (no)"
74 ac_help="$ac_help
75     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
76 ac_help="$ac_help
77     --enable-modules    enable dynamic module support (no)"
78 ac_help="$ac_help
79     --enable-multimaster        enable multimaster replication (no)"
80 ac_help="$ac_help
81     --enable-phonetic   enable phonetic/soundex (no)"
82 ac_help="$ac_help
83     --enable-quipu      build quipu migration tools (no)"
84 ac_help="$ac_help
85     --enable-rlookups   enable reverse lookups (auto)"
86 ac_help="$ac_help
87     --enable-aci        enable per-object ACIs (no)"
88 ac_help="$ac_help
89     --enable-wrappers   enable tcp wrapper support (no)"
90 ac_help="$ac_help
91     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
92 ac_help="$ac_help
93     --enable-dnssrv     enable dnssrv backend (no)"
94 ac_help="$ac_help
95       --with-dnssrv-module      module type (static)"
96 ac_help="$ac_help
97     --enable-ldap       enable ldap backend (no)"
98 ac_help="$ac_help
99       --with-ldap-module        module type (static)"
100 ac_help="$ac_help
101     --enable-ldbm       enable ldbm backend (yes)"
102 ac_help="$ac_help
103       --with-ldbm-api   use LDBM API (auto)"
104 ac_help="$ac_help
105       --with-ldbm-module        module type (static)"
106 ac_help="$ac_help
107       --with-ldbm-type  use LDBM type (auto)"
108 ac_help="$ac_help
109     --enable-passwd     enable passwd backend (no)"
110 ac_help="$ac_help
111       --with-passwd-module      module type (static)"
112 ac_help="$ac_help
113     --enable-perl       enable perl backend (no)"
114 ac_help="$ac_help
115       --with-perl-module        module type (static)"
116 ac_help="$ac_help
117     --enable-shell      enable shell backend (no)"
118 ac_help="$ac_help
119       --with-shell-module       module type (static)"
120 ac_help="$ac_help
121     --enable-sql        enable sql backend (no)"
122 ac_help="$ac_help
123       --with-sql-module module type (static)"
124 ac_help="$ac_help
125     --enable-tcl        enable tcl backend (no)"
126 ac_help="$ac_help
127       --with-tcl-module module type (static)"
128 ac_help="$ac_help
129 SLURPD (Replication Daemon) Options:"
130 ac_help="$ac_help
131   --enable-slurpd       enable building slurpd (auto)"
132 ac_help="$ac_help
133 Library Generation & Linking Options"
134 ac_help="$ac_help
135   --enable-static[=PKGS]  build static libraries [default=yes]"
136 ac_help="$ac_help
137   --enable-shared[=PKGS]  build shared libraries [default=yes]"
138 ac_help="$ac_help
139   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
140 ac_help="$ac_help
141   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
142 ac_help="$ac_help
143   --disable-libtool-lock  avoid locking (might break parallel builds)"
144
145 # Initialize some variables set by options.
146 # The variables have the same names as the options, with
147 # dashes changed to underlines.
148 build=NONE
149 cache_file=./config.cache
150 exec_prefix=NONE
151 host=NONE
152 no_create=
153 nonopt=NONE
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 target=NONE
163 verbose=
164 x_includes=NONE
165 x_libraries=NONE
166 bindir='${exec_prefix}/bin'
167 sbindir='${exec_prefix}/sbin'
168 libexecdir='${exec_prefix}/libexec'
169 datadir='${prefix}/share'
170 sysconfdir='${prefix}/etc'
171 sharedstatedir='${prefix}/com'
172 localstatedir='${prefix}/var'
173 libdir='${exec_prefix}/lib'
174 includedir='${prefix}/include'
175 oldincludedir='/usr/include'
176 infodir='${prefix}/info'
177 mandir='${prefix}/man'
178
179 # Initialize some other variables.
180 subdirs=
181 MFLAGS= MAKEFLAGS=
182 SHELL=${CONFIG_SHELL-/bin/sh}
183 # Maximum number of lines to put in a shell here document.
184 ac_max_here_lines=12
185
186 ac_prev=
187 for ac_option
188 do
189
190   # If the previous option needs an argument, assign it.
191   if test -n "$ac_prev"; then
192     eval "$ac_prev=\$ac_option"
193     ac_prev=
194     continue
195   fi
196
197   case "$ac_option" in
198   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
199   *) ac_optarg= ;;
200   esac
201
202   # Accept the important Cygnus configure options, so we can diagnose typos.
203
204   case "$ac_option" in
205
206   -bindir | --bindir | --bindi | --bind | --bin | --bi)
207     ac_prev=bindir ;;
208   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209     bindir="$ac_optarg" ;;
210
211   -build | --build | --buil | --bui | --bu)
212     ac_prev=build ;;
213   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214     build="$ac_optarg" ;;
215
216   -cache-file | --cache-file | --cache-fil | --cache-fi \
217   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218     ac_prev=cache_file ;;
219   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221     cache_file="$ac_optarg" ;;
222
223   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
224     ac_prev=datadir ;;
225   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
226   | --da=*)
227     datadir="$ac_optarg" ;;
228
229   -disable-* | --disable-*)
230     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
231     # Reject names that are not valid shell variable names.
232     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
233       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
234     fi
235     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
236     eval "enable_${ac_feature}=no" ;;
237
238   -enable-* | --enable-*)
239     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
240     # Reject names that are not valid shell variable names.
241     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
242       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
243     fi
244     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
245     case "$ac_option" in
246       *=*) ;;
247       *) ac_optarg=yes ;;
248     esac
249     eval "enable_${ac_feature}='$ac_optarg'" ;;
250
251   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
252   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
253   | --exec | --exe | --ex)
254     ac_prev=exec_prefix ;;
255   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
256   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
257   | --exec=* | --exe=* | --ex=*)
258     exec_prefix="$ac_optarg" ;;
259
260   -gas | --gas | --ga | --g)
261     # Obsolete; use --with-gas.
262     with_gas=yes ;;
263
264   -help | --help | --hel | --he)
265     # Omit some internal or obsolete options to make the list less imposing.
266     # This message is too long to be a string in the A/UX 3.1 sh.
267     cat << EOF
268 Usage: configure [options] [host]
269 Options: [defaults in brackets after descriptions]
270 Configuration:
271   --cache-file=FILE       cache test results in FILE
272   --help                  print this message
273   --no-create             do not create output files
274   --quiet, --silent       do not print \`checking...' messages
275   --version               print the version of autoconf that created configure
276 Directory and file names:
277   --prefix=PREFIX         install architecture-independent files in PREFIX
278                           [$ac_default_prefix]
279   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
280                           [same as prefix]
281   --bindir=DIR            user executables in DIR [EPREFIX/bin]
282   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
283   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
284   --datadir=DIR           read-only architecture-independent data in DIR
285                           [PREFIX/share]
286   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
287   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
288                           [PREFIX/com]
289   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
290   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
291   --includedir=DIR        C header files in DIR [PREFIX/include]
292   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
293   --infodir=DIR           info documentation in DIR [PREFIX/info]
294   --mandir=DIR            man documentation in DIR [PREFIX/man]
295   --srcdir=DIR            find the sources in DIR [configure dir or ..]
296   --program-prefix=PREFIX prepend PREFIX to installed program names
297   --program-suffix=SUFFIX append SUFFIX to installed program names
298   --program-transform-name=PROGRAM
299                           run sed PROGRAM on installed program names
300 EOF
301     cat << EOF
302 Host type:
303   --build=BUILD           configure for building on BUILD [BUILD=HOST]
304   --host=HOST             configure for HOST [guessed]
305   --target=TARGET         configure for TARGET [TARGET=HOST]
306 Features and packages:
307   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
308   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
309   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
310   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
311   --x-includes=DIR        X include files are in DIR
312   --x-libraries=DIR       X library files are in DIR
313 EOF
314     if test -n "$ac_help"; then
315       echo "--enable and --with options recognized:$ac_help"
316     fi
317     exit 0 ;;
318
319   -host | --host | --hos | --ho)
320     ac_prev=host ;;
321   -host=* | --host=* | --hos=* | --ho=*)
322     host="$ac_optarg" ;;
323
324   -includedir | --includedir | --includedi | --included | --include \
325   | --includ | --inclu | --incl | --inc)
326     ac_prev=includedir ;;
327   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
328   | --includ=* | --inclu=* | --incl=* | --inc=*)
329     includedir="$ac_optarg" ;;
330
331   -infodir | --infodir | --infodi | --infod | --info | --inf)
332     ac_prev=infodir ;;
333   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
334     infodir="$ac_optarg" ;;
335
336   -libdir | --libdir | --libdi | --libd)
337     ac_prev=libdir ;;
338   -libdir=* | --libdir=* | --libdi=* | --libd=*)
339     libdir="$ac_optarg" ;;
340
341   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
342   | --libexe | --libex | --libe)
343     ac_prev=libexecdir ;;
344   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
345   | --libexe=* | --libex=* | --libe=*)
346     libexecdir="$ac_optarg" ;;
347
348   -localstatedir | --localstatedir | --localstatedi | --localstated \
349   | --localstate | --localstat | --localsta | --localst \
350   | --locals | --local | --loca | --loc | --lo)
351     ac_prev=localstatedir ;;
352   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
353   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
354   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
355     localstatedir="$ac_optarg" ;;
356
357   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
358     ac_prev=mandir ;;
359   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
360     mandir="$ac_optarg" ;;
361
362   -nfp | --nfp | --nf)
363     # Obsolete; use --without-fp.
364     with_fp=no ;;
365
366   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
367   | --no-cr | --no-c)
368     no_create=yes ;;
369
370   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
371   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
372     no_recursion=yes ;;
373
374   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
375   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
376   | --oldin | --oldi | --old | --ol | --o)
377     ac_prev=oldincludedir ;;
378   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
379   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
380   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
381     oldincludedir="$ac_optarg" ;;
382
383   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
384     ac_prev=prefix ;;
385   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
386     prefix="$ac_optarg" ;;
387
388   -program-prefix | --program-prefix | --program-prefi | --program-pref \
389   | --program-pre | --program-pr | --program-p)
390     ac_prev=program_prefix ;;
391   -program-prefix=* | --program-prefix=* | --program-prefi=* \
392   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
393     program_prefix="$ac_optarg" ;;
394
395   -program-suffix | --program-suffix | --program-suffi | --program-suff \
396   | --program-suf | --program-su | --program-s)
397     ac_prev=program_suffix ;;
398   -program-suffix=* | --program-suffix=* | --program-suffi=* \
399   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
400     program_suffix="$ac_optarg" ;;
401
402   -program-transform-name | --program-transform-name \
403   | --program-transform-nam | --program-transform-na \
404   | --program-transform-n | --program-transform- \
405   | --program-transform | --program-transfor \
406   | --program-transfo | --program-transf \
407   | --program-trans | --program-tran \
408   | --progr-tra | --program-tr | --program-t)
409     ac_prev=program_transform_name ;;
410   -program-transform-name=* | --program-transform-name=* \
411   | --program-transform-nam=* | --program-transform-na=* \
412   | --program-transform-n=* | --program-transform-=* \
413   | --program-transform=* | --program-transfor=* \
414   | --program-transfo=* | --program-transf=* \
415   | --program-trans=* | --program-tran=* \
416   | --progr-tra=* | --program-tr=* | --program-t=*)
417     program_transform_name="$ac_optarg" ;;
418
419   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
420   | -silent | --silent | --silen | --sile | --sil)
421     silent=yes ;;
422
423   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
424     ac_prev=sbindir ;;
425   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
426   | --sbi=* | --sb=*)
427     sbindir="$ac_optarg" ;;
428
429   -sharedstatedir | --sharedstatedir | --sharedstatedi \
430   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
431   | --sharedst | --shareds | --shared | --share | --shar \
432   | --sha | --sh)
433     ac_prev=sharedstatedir ;;
434   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
435   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
436   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
437   | --sha=* | --sh=*)
438     sharedstatedir="$ac_optarg" ;;
439
440   -site | --site | --sit)
441     ac_prev=site ;;
442   -site=* | --site=* | --sit=*)
443     site="$ac_optarg" ;;
444
445   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
446     ac_prev=srcdir ;;
447   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
448     srcdir="$ac_optarg" ;;
449
450   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
451   | --syscon | --sysco | --sysc | --sys | --sy)
452     ac_prev=sysconfdir ;;
453   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
454   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
455     sysconfdir="$ac_optarg" ;;
456
457   -target | --target | --targe | --targ | --tar | --ta | --t)
458     ac_prev=target ;;
459   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
460     target="$ac_optarg" ;;
461
462   -v | -verbose | --verbose | --verbos | --verbo | --verb)
463     verbose=yes ;;
464
465   -version | --version | --versio | --versi | --vers)
466     echo "configure generated by autoconf version 2.13.1"
467     exit 0 ;;
468
469   -with-* | --with-*)
470     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
471     # Reject names that are not valid shell variable names.
472     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
473       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
474     fi
475     ac_package=`echo $ac_package| sed 's/-/_/g'`
476     case "$ac_option" in
477       *=*) ;;
478       *) ac_optarg=yes ;;
479     esac
480     eval "with_${ac_package}='$ac_optarg'" ;;
481
482   -without-* | --without-*)
483     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
484     # Reject names that are not valid shell variable names.
485     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
486       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
487     fi
488     ac_package=`echo $ac_package| sed 's/-/_/g'`
489     eval "with_${ac_package}=no" ;;
490
491   --x)
492     # Obsolete; use --with-x.
493     with_x=yes ;;
494
495   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
496   | --x-incl | --x-inc | --x-in | --x-i)
497     ac_prev=x_includes ;;
498   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
499   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
500     x_includes="$ac_optarg" ;;
501
502   -x-libraries | --x-libraries | --x-librarie | --x-librari \
503   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
504     ac_prev=x_libraries ;;
505   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
506   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
507     x_libraries="$ac_optarg" ;;
508
509   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
510     ;;
511
512   *)
513     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
514       echo "configure: warning: $ac_option: invalid host type" 1>&2
515     fi
516     if test "x$nonopt" != xNONE; then
517       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
518     fi
519     nonopt="$ac_option"
520     ;;
521
522   esac
523 done
524
525 if test -n "$ac_prev"; then
526   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
527 fi
528
529 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
530
531 # File descriptor usage:
532 # 0 standard input
533 # 1 file creation
534 # 2 errors and warnings
535 # 3 some systems may open it to /dev/tty
536 # 4 used on the Kubota Titan
537 # 6 checking for... messages and results
538 # 5 compiler messages saved in config.log
539 if test "$silent" = yes; then
540   exec 6>/dev/null
541 else
542   exec 6>&1
543 fi
544 exec 5>./config.log
545
546 echo "\
547 This file contains any messages produced by compilers while
548 running configure, to aid debugging if configure makes a mistake.
549 " 1>&5
550
551 # Strip out --no-create and --no-recursion so they do not pile up.
552 # Also quote any args containing shell metacharacters.
553 ac_configure_args=
554 for ac_arg
555 do
556   case "$ac_arg" in
557   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
558   | --no-cr | --no-c) ;;
559   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
560   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
561   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
562   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
563   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
564   esac
565 done
566
567 # NLS nuisances.
568 # Only set these to C if already set.  These must not be set unconditionally
569 # because not all systems understand e.g. LANG=C (notably SCO).
570 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
571 # Non-C LC_CTYPE values break the ctype check.
572 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
573 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
574 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
575 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
576
577 # confdefs.h avoids OS command line length limits that DEFS can exceed.
578 rm -rf conftest* confdefs.h
579 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
580 echo > confdefs.h
581
582 # A filename unique to this package, relative to the directory that
583 # configure is in, which we can look for to find out if srcdir is correct.
584 ac_unique_file=build/version
585
586 # Find the source files, if location was not specified.
587 if test -z "$srcdir"; then
588   ac_srcdir_defaulted=yes
589   # Try the directory containing this script, then its parent.
590   ac_prog=$0
591   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
592   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
593   srcdir=$ac_confdir
594   if test ! -r $srcdir/$ac_unique_file; then
595     srcdir=..
596   fi
597 else
598   ac_srcdir_defaulted=no
599 fi
600 if test ! -r $srcdir/$ac_unique_file; then
601   if test "$ac_srcdir_defaulted" = yes; then
602     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
603   else
604     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
605   fi
606 fi
607 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
608
609 # Prefer explicitly selected file to automatically selected ones.
610 if test -z "$CONFIG_SITE"; then
611   if test "x$prefix" != xNONE; then
612     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
613   else
614     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
615   fi
616 fi
617 for ac_site_file in $CONFIG_SITE; do
618   if test -r "$ac_site_file"; then
619     echo "loading site script $ac_site_file"
620     . "$ac_site_file"
621   fi
622 done
623
624
625 ac_ext=c
626 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
627 ac_cpp='$CPP $CPPFLAGS'
628 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
629 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
630 cross_compiling=$ac_cv_prog_cc_cross
631
632 ac_exeext=
633 ac_objext=o
634 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
635   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
636   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
637     ac_n= ac_c='
638 ' ac_t='        '
639   else
640     ac_n=-n ac_c= ac_t=
641   fi
642 else
643   ac_n= ac_c='\c' ac_t=
644 fi
645
646 ac_aux_dir=
647 for ac_dir in build $srcdir/build; do
648   if test -f $ac_dir/install-sh; then
649     ac_aux_dir=$ac_dir
650     ac_install_sh="$ac_aux_dir/install-sh -c"
651     break
652   elif test -f $ac_dir/install.sh; then
653     ac_aux_dir=$ac_dir
654     ac_install_sh="$ac_aux_dir/install.sh -c"
655     break
656   elif test -f $ac_dir/shtool; then
657     ac_aux_dir=$ac_dir
658     ac_install_sh="$ac_aux_dir/shtool install -c"
659     break
660   fi
661 done
662 if test -z "$ac_aux_dir"; then
663   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
664 fi
665 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
666 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
667 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
668
669 OL_VERSION=`cat $ac_aux_dir/version`
670 if test -z "$OL_VERSION"; then
671         { echo "configure: error: could not determine version" 1>&2; exit 1; }
672 fi
673
674 echo "Configuring OpenLDAP $OL_VERSION ..."
675
676
677 echo $ac_n "checking host system type""... $ac_c" 1>&6
678 echo "configure:679: checking host system type" >&5
679 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
680
681 # Make sure we can run config.sub.
682   if $ac_config_sub sun4 >/dev/null 2>&1; then :
683     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
684   fi
685
686   ac_cv_host_alias=$host
687   case "$ac_cv_host_alias" in
688   NONE)
689     case $nonopt in
690     NONE)
691       if ac_cv_host_alias=`$ac_config_guess`; then :
692       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
693       fi ;;
694     *) ac_cv_host_alias=$nonopt ;;
695     esac ;;
696   esac
697
698   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
699   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
700   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
701   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
702 else
703   echo $ac_n "(cached) $ac_c" 1>&6
704 fi
705
706 echo "$ac_t""$ac_cv_host" 1>&6
707
708 host=$ac_cv_host
709 host_alias=$ac_cv_host_alias
710 host_cpu=$ac_cv_host_cpu
711 host_vendor=$ac_cv_host_vendor
712 host_os=$ac_cv_host_os
713
714
715
716
717
718 echo $ac_n "checking target system type""... $ac_c" 1>&6
719 echo "configure:720: checking target system type" >&5
720 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
721
722 # Make sure we can run config.sub.
723   if $ac_config_sub sun4 >/dev/null 2>&1; then :
724     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
725   fi
726
727   ac_cv_target_alias=$target
728   case "$ac_cv_target_alias" in
729   NONE)
730     case $nonopt in
731     NONE)
732       ac_cv_target_alias=$host_alias ;;
733
734     *) ac_cv_target_alias=$nonopt ;;
735     esac ;;
736   esac
737
738   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
739   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
740   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
741   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
742 else
743   echo $ac_n "(cached) $ac_c" 1>&6
744 fi
745
746 echo "$ac_t""$ac_cv_target" 1>&6
747
748 target=$ac_cv_target
749 target_alias=$ac_cv_target_alias
750 target_cpu=$ac_cv_target_cpu
751 target_vendor=$ac_cv_target_vendor
752 target_os=$ac_cv_target_os
753
754
755
756
757
758 echo $ac_n "checking build system type""... $ac_c" 1>&6
759 echo "configure:760: checking build system type" >&5
760 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
761
762 # Make sure we can run config.sub.
763   if $ac_config_sub sun4 >/dev/null 2>&1; then :
764     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
765   fi
766
767   ac_cv_build_alias=$build
768   case "$ac_cv_build_alias" in
769   NONE)
770     case $nonopt in
771     NONE)
772       ac_cv_build_alias=$host_alias ;;
773
774     *) ac_cv_build_alias=$nonopt ;;
775     esac ;;
776   esac
777
778   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
779   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
780   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
781   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
782 else
783   echo $ac_n "(cached) $ac_c" 1>&6
784 fi
785
786 echo "$ac_t""$ac_cv_build" 1>&6
787
788 build=$ac_cv_build
789 build_alias=$ac_cv_build_alias
790 build_cpu=$ac_cv_build_cpu
791 build_vendor=$ac_cv_build_vendor
792 build_os=$ac_cv_build_os
793
794
795
796
797
798 # Do some error checking and defaulting for the host and target type.
799 # The inputs are:
800 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
801 #
802 # The rules are:
803 # 1. You are not allowed to specify --host, --target, and nonopt at the
804 #    same time.
805 # 2. Host defaults to nonopt.
806 # 3. If nonopt is not specified, then host defaults to the current host,
807 #    as determined by config.guess.
808 # 4. Target and build default to nonopt.
809 # 5. If nonopt is not specified, then target and build default to host.
810
811 # The aliases save the names the user supplied, while $host etc.
812 # will get canonicalized.
813 case $host---$target---$nonopt in
814 NONE---*---* | *---NONE---* | *---*---NONE) ;;
815 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
816 esac
817
818 test "$host_alias" != "$target_alias" &&
819   test "$program_prefix$program_suffix$program_transform_name" = \
820     NONENONEs,x,x, &&
821   program_prefix=${target_alias}-
822
823
824 # Find a good install program.  We prefer a C program (faster),
825 # so one script is as good as another.  But avoid the broken or
826 # incompatible versions:
827 # SysV /etc/install, /usr/sbin/install
828 # SunOS /usr/etc/install
829 # IRIX /sbin/install
830 # AIX /bin/install
831 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
832 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
833 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
834 # ./install, which can be erroneously created by make from ./install.sh.
835 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
836 echo "configure:837: checking for a BSD compatible install" >&5
837 if test -z "$INSTALL"; then
838 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
839   echo $ac_n "(cached) $ac_c" 1>&6
840 else
841     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
842   for ac_dir in $PATH; do
843     # Account for people who put trailing slashes in PATH elements.
844     case "$ac_dir/" in
845     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
846     *)
847       # OSF1 and SCO ODT 3.0 have their own names for install.
848       # Don't use installbsd from OSF since it installs stuff as root
849       # by default.
850       for ac_prog in ginstall scoinst install; do
851         if test -f $ac_dir/$ac_prog; then
852           if test $ac_prog = install &&
853             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
854             # AIX install.  It has an incompatible calling convention.
855             :
856           elif test $ac_prog = install &&
857             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
858             # program-specific install script used by HP pwplus--don't use.
859             :
860           else
861             ac_cv_path_install="$ac_dir/$ac_prog -c"
862             break 2
863           fi
864         fi
865       done
866       ;;
867     esac
868   done
869   IFS="$ac_save_IFS"
870
871 fi
872   if test "${ac_cv_path_install+set}" = set; then
873     INSTALL="$ac_cv_path_install"
874   else
875     # As a last resort, use the slow shell script.  We don't cache a
876     # path for INSTALL within a source directory, because that will
877     # break other packages using the cache if that directory is
878     # removed, or if the path is relative.
879     INSTALL="$ac_install_sh"
880   fi
881 fi
882 echo "$ac_t""$INSTALL" 1>&6
883
884 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
885 # It thinks the first close brace ends the variable substitution.
886 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
887
888 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
889
890 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
891
892 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
893 echo "configure:894: checking whether build environment is sane" >&5
894 # Just in case
895 sleep 1
896 echo timestamp > conftestfile
897 # Do `set' in a subshell so we don't clobber the current shell's
898 # arguments.  Must try -L first in case configure is actually a
899 # symlink; some systems play weird games with the mod time of symlinks
900 # (eg FreeBSD returns the mod time of the symlink's containing
901 # directory).
902 if (
903    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
904    if test "$*" = "X"; then
905       # -L didn't work.
906       set X `ls -t $srcdir/configure conftestfile`
907    fi
908    if test "$*" != "X $srcdir/configure conftestfile" \
909       && test "$*" != "X conftestfile $srcdir/configure"; then
910
911       # If neither matched, then we have a broken ls.  This can happen
912       # if, for instance, CONFIG_SHELL is bash and it inherits a
913       # broken ls alias from the environment.  This has actually
914       # happened.  Such a system could not be considered "sane".
915       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
916 alias in your environment" 1>&2; exit 1; }
917    fi
918
919    test "$2" = conftestfile
920    )
921 then
922    # Ok.
923    :
924 else
925    { echo "configure: error: newly created file is older than distributed files!
926 Check your system clock" 1>&2; exit 1; }
927 fi
928 rm -f conftest*
929 echo "$ac_t""yes" 1>&6
930 if test "$program_transform_name" = s,x,x,; then
931   program_transform_name=
932 else
933   # Double any \ or $.  echo might interpret backslashes.
934   cat <<\EOF_SED > conftestsed
935 s,\\,\\\\,g; s,\$,$$,g
936 EOF_SED
937   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
938   rm -f conftestsed
939 fi
940 test "$program_prefix" != NONE &&
941   program_transform_name="s,^,${program_prefix},;$program_transform_name"
942 # Use a double $ so make ignores it.
943 test "$program_suffix" != NONE &&
944   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
945
946 # sed with no file args requires a program.
947 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
948
949 for ac_prog in mawk gawk nawk awk
950 do
951 # Extract the first word of "$ac_prog", so it can be a program name with args.
952 set dummy $ac_prog; ac_word=$2
953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
954 echo "configure:955: checking for $ac_word" >&5
955 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
956   echo $ac_n "(cached) $ac_c" 1>&6
957 else
958   if test -n "$AWK"; then
959   ac_cv_prog_AWK="$AWK" # Let the user override the test.
960 else
961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
962   ac_dummy="$PATH"
963   for ac_dir in $ac_dummy; do
964     test -z "$ac_dir" && ac_dir=.
965     if test -f $ac_dir/$ac_word; then
966       ac_cv_prog_AWK="$ac_prog"
967       break
968     fi
969   done
970   IFS="$ac_save_ifs"
971 fi
972 fi
973 AWK="$ac_cv_prog_AWK"
974 if test -n "$AWK"; then
975   echo "$ac_t""$AWK" 1>&6
976 else
977   echo "$ac_t""no" 1>&6
978 fi
979
980 test -n "$AWK" && break
981 done
982
983 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
984 echo "configure:985: checking whether ${MAKE-make} sets \${MAKE}" >&5
985 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
986 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
987   echo $ac_n "(cached) $ac_c" 1>&6
988 else
989   cat > conftestmake <<\EOF
990 all:
991         @echo 'ac_maketemp="${MAKE}"'
992 EOF
993 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
994 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
995 if test -n "$ac_maketemp"; then
996   eval ac_cv_prog_make_${ac_make}_set=yes
997 else
998   eval ac_cv_prog_make_${ac_make}_set=no
999 fi
1000 rm -f conftestmake
1001 fi
1002 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1003   echo "$ac_t""yes" 1>&6
1004   SET_MAKE=
1005 else
1006   echo "$ac_t""no" 1>&6
1007   SET_MAKE="MAKE=${MAKE-make}"
1008 fi
1009
1010
1011
1012 PACKAGE=OpenLDAP
1013
1014 VERSION=$OL_VERSION
1015
1016 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1017   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1018 fi
1019
1020
1021
1022 missing_dir=`cd $ac_aux_dir && pwd`
1023 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1024 echo "configure:1025: checking for working aclocal" >&5
1025 # Run test in a subshell; some versions of sh will print an error if
1026 # an executable is not found, even if stderr is redirected.
1027 # Redirect stdin to placate older versions of autoconf.  Sigh.
1028 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1029    ACLOCAL=aclocal
1030    echo "$ac_t""found" 1>&6
1031 else
1032    ACLOCAL="$missing_dir/missing aclocal"
1033    echo "$ac_t""missing" 1>&6
1034 fi
1035
1036 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1037 echo "configure:1038: checking for working autoconf" >&5
1038 # Run test in a subshell; some versions of sh will print an error if
1039 # an executable is not found, even if stderr is redirected.
1040 # Redirect stdin to placate older versions of autoconf.  Sigh.
1041 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1042    AUTOCONF=autoconf
1043    echo "$ac_t""found" 1>&6
1044 else
1045    AUTOCONF="$missing_dir/missing autoconf"
1046    echo "$ac_t""missing" 1>&6
1047 fi
1048
1049 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1050 echo "configure:1051: checking for working automake" >&5
1051 # Run test in a subshell; some versions of sh will print an error if
1052 # an executable is not found, even if stderr is redirected.
1053 # Redirect stdin to placate older versions of autoconf.  Sigh.
1054 if (automake --version) < /dev/null > /dev/null 2>&1; then
1055    AUTOMAKE=automake
1056    echo "$ac_t""found" 1>&6
1057 else
1058    AUTOMAKE="$missing_dir/missing automake"
1059    echo "$ac_t""missing" 1>&6
1060 fi
1061
1062 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1063 echo "configure:1064: checking for working autoheader" >&5
1064 # Run test in a subshell; some versions of sh will print an error if
1065 # an executable is not found, even if stderr is redirected.
1066 # Redirect stdin to placate older versions of autoconf.  Sigh.
1067 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1068    AUTOHEADER=autoheader
1069    echo "$ac_t""found" 1>&6
1070 else
1071    AUTOHEADER="$missing_dir/missing autoheader"
1072    echo "$ac_t""missing" 1>&6
1073 fi
1074
1075 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1076 echo "configure:1077: checking for working makeinfo" >&5
1077 # Run test in a subshell; some versions of sh will print an error if
1078 # an executable is not found, even if stderr is redirected.
1079 # Redirect stdin to placate older versions of autoconf.  Sigh.
1080 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1081    MAKEINFO=makeinfo
1082    echo "$ac_t""found" 1>&6
1083 else
1084    MAKEINFO="$missing_dir/missing makeinfo"
1085    echo "$ac_t""missing" 1>&6
1086 fi
1087
1088 install_sh="$missing_dir/install-sh"
1089 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1090
1091 for ac_prog in gnutar gtar tar
1092 do
1093 # Extract the first word of "$ac_prog", so it can be a program name with args.
1094 set dummy $ac_prog; ac_word=$2
1095 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1096 echo "configure:1097: checking for $ac_word" >&5
1097 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1098   echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100   if test -n "$AMTAR"; then
1101   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1102 else
1103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1104   ac_dummy="$PATH"
1105   for ac_dir in $ac_dummy; do
1106     test -z "$ac_dir" && ac_dir=.
1107     if test -f $ac_dir/$ac_word; then
1108       ac_cv_prog_AMTAR="$ac_prog"
1109       break
1110     fi
1111   done
1112   IFS="$ac_save_ifs"
1113 fi
1114 fi
1115 AMTAR="$ac_cv_prog_AMTAR"
1116 if test -n "$AMTAR"; then
1117   echo "$ac_t""$AMTAR" 1>&6
1118 else
1119   echo "$ac_t""no" 1>&6
1120 fi
1121
1122 test -n "$AMTAR" && break
1123 done
1124
1125
1126 AMTARFLAGS=
1127 if test -n "$AMTAR"; then
1128   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1129         AMTARFLAGS=o
1130   fi
1131 fi
1132
1133
1134
1135 cat >> confdefs.h <<EOF
1136 #define OPENLDAP_PACKAGE "$PACKAGE"
1137 EOF
1138
1139 cat >> confdefs.h <<EOF
1140 #define OPENLDAP_VERSION "$VERSION"
1141 EOF
1142
1143
1144
1145
1146 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1147 echo "configure:1148: checking configure arguments" >&5
1148
1149
1150 top_builddir=`pwd`
1151
1152 ldap_subdir="/openldap"
1153
1154 # Check whether --with-subdir or --without-subdir was given.
1155 if test "${with_subdir+set}" = set; then
1156   withval="$with_subdir"
1157   case "$withval" in
1158         no) ldap_subdir=""
1159                 ;;
1160         yes)
1161                 ;;
1162         /*|\\*)
1163                 ldap_subdir="$withval"
1164                 ;;
1165         *)
1166                 ldap_subdir="/$withval"
1167                 ;;
1168 esac
1169
1170 fi
1171
1172
1173 # OpenLDAP --enable-debug
1174         # Check whether --enable-debug or --disable-debug was given.
1175 if test "${enable_debug+set}" = set; then
1176   enableval="$enable_debug"
1177   
1178         ol_arg=invalid
1179         for ol_val in auto yes no ; do
1180                 if test "$enableval" = "$ol_val" ; then
1181                         ol_arg="$ol_val"
1182                 fi
1183         done
1184         if test "$ol_arg" = "invalid" ; then
1185                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1186         fi
1187         ol_enable_debug="$ol_arg"
1188
1189 else
1190         ol_enable_debug="yes"
1191 fi
1192 # end --enable-debug
1193 # OpenLDAP --enable-syslog
1194         # Check whether --enable-syslog or --disable-syslog was given.
1195 if test "${enable_syslog+set}" = set; then
1196   enableval="$enable_syslog"
1197   
1198         ol_arg=invalid
1199         for ol_val in auto yes no ; do
1200                 if test "$enableval" = "$ol_val" ; then
1201                         ol_arg="$ol_val"
1202                 fi
1203         done
1204         if test "$ol_arg" = "invalid" ; then
1205                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1206         fi
1207         ol_enable_syslog="$ol_arg"
1208
1209 else
1210         ol_enable_syslog="auto"
1211 fi
1212 # end --enable-syslog
1213 # OpenLDAP --enable-proctitle
1214         # Check whether --enable-proctitle or --disable-proctitle was given.
1215 if test "${enable_proctitle+set}" = set; then
1216   enableval="$enable_proctitle"
1217   
1218         ol_arg=invalid
1219         for ol_val in auto yes no ; do
1220                 if test "$enableval" = "$ol_val" ; then
1221                         ol_arg="$ol_val"
1222                 fi
1223         done
1224         if test "$ol_arg" = "invalid" ; then
1225                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1226         fi
1227         ol_enable_proctitle="$ol_arg"
1228
1229 else
1230         ol_enable_proctitle="yes"
1231 fi
1232 # end --enable-proctitle
1233 # OpenLDAP --enable-cache
1234         # Check whether --enable-cache or --disable-cache was given.
1235 if test "${enable_cache+set}" = set; then
1236   enableval="$enable_cache"
1237   
1238         ol_arg=invalid
1239         for ol_val in auto yes no ; do
1240                 if test "$enableval" = "$ol_val" ; then
1241                         ol_arg="$ol_val"
1242                 fi
1243         done
1244         if test "$ol_arg" = "invalid" ; then
1245                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1246         fi
1247         ol_enable_cache="$ol_arg"
1248
1249 else
1250         ol_enable_cache="yes"
1251 fi
1252 # end --enable-cache
1253 # OpenLDAP --enable-referrals
1254         # Check whether --enable-referrals or --disable-referrals was given.
1255 if test "${enable_referrals+set}" = set; then
1256   enableval="$enable_referrals"
1257   
1258         ol_arg=invalid
1259         for ol_val in auto yes no ; do
1260                 if test "$enableval" = "$ol_val" ; then
1261                         ol_arg="$ol_val"
1262                 fi
1263         done
1264         if test "$ol_arg" = "invalid" ; then
1265                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1266         fi
1267         ol_enable_referrals="$ol_arg"
1268
1269 else
1270         ol_enable_referrals="yes"
1271 fi
1272 # end --enable-referrals
1273 # OpenLDAP --enable-kbind
1274         # Check whether --enable-kbind or --disable-kbind was given.
1275 if test "${enable_kbind+set}" = set; then
1276   enableval="$enable_kbind"
1277   
1278         ol_arg=invalid
1279         for ol_val in auto yes no ; do
1280                 if test "$enableval" = "$ol_val" ; then
1281                         ol_arg="$ol_val"
1282                 fi
1283         done
1284         if test "$ol_arg" = "invalid" ; then
1285                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1286         fi
1287         ol_enable_kbind="$ol_arg"
1288
1289 else
1290         ol_enable_kbind="auto"
1291 fi
1292 # end --enable-kbind
1293 # OpenLDAP --enable-cldap
1294         # Check whether --enable-cldap or --disable-cldap was given.
1295 if test "${enable_cldap+set}" = set; then
1296   enableval="$enable_cldap"
1297   
1298         ol_arg=invalid
1299         for ol_val in auto yes no ; do
1300                 if test "$enableval" = "$ol_val" ; then
1301                         ol_arg="$ol_val"
1302                 fi
1303         done
1304         if test "$ol_arg" = "invalid" ; then
1305                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1306         fi
1307         ol_enable_cldap="$ol_arg"
1308
1309 else
1310         ol_enable_cldap="no"
1311 fi
1312 # end --enable-cldap
1313 # OpenLDAP --enable-ldapi
1314         # Check whether --enable-ldapi or --disable-ldapi was given.
1315 if test "${enable_ldapi+set}" = set; then
1316   enableval="$enable_ldapi"
1317   
1318         ol_arg=invalid
1319         for ol_val in auto yes no ; do
1320                 if test "$enableval" = "$ol_val" ; then
1321                         ol_arg="$ol_val"
1322                 fi
1323         done
1324         if test "$ol_arg" = "invalid" ; then
1325                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1326         fi
1327         ol_enable_ldapi="$ol_arg"
1328
1329 else
1330         ol_enable_ldapi="no"
1331 fi
1332 # end --enable-ldapi
1333 # OpenLDAP --enable-x_compile
1334         # Check whether --enable-x_compile or --disable-x_compile was given.
1335 if test "${enable_x_compile+set}" = set; then
1336   enableval="$enable_x_compile"
1337   
1338         ol_arg=invalid
1339         for ol_val in yes no ; do
1340                 if test "$enableval" = "$ol_val" ; then
1341                         ol_arg="$ol_val"
1342                 fi
1343         done
1344         if test "$ol_arg" = "invalid" ; then
1345                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1346         fi
1347         ol_enable_x_compile="$ol_arg"
1348
1349 else
1350         ol_enable_x_compile="no"
1351 fi
1352 # end --enable-x_compile
1353
1354
1355 # OpenLDAP --with-cyrus_sasl
1356         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1357 if test "${with_cyrus_sasl+set}" = set; then
1358   withval="$with_cyrus_sasl"
1359   
1360         ol_arg=invalid
1361         for ol_val in auto yes no  ; do
1362                 if test "$withval" = "$ol_val" ; then
1363                         ol_arg="$ol_val"
1364                 fi
1365         done
1366         if test "$ol_arg" = "invalid" ; then
1367                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1368         fi
1369         ol_with_cyrus_sasl="$ol_arg"
1370
1371 else
1372         ol_with_cyrus_sasl="auto"
1373 fi
1374 # end --with-cyrus_sasl
1375
1376 # OpenLDAP --with-fetch
1377         # Check whether --with-fetch or --without-fetch was given.
1378 if test "${with_fetch+set}" = set; then
1379   withval="$with_fetch"
1380   
1381         ol_arg=invalid
1382         for ol_val in auto yes no  ; do
1383                 if test "$withval" = "$ol_val" ; then
1384                         ol_arg="$ol_val"
1385                 fi
1386         done
1387         if test "$ol_arg" = "invalid" ; then
1388                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1389         fi
1390         ol_with_fetch="$ol_arg"
1391
1392 else
1393         ol_with_fetch="auto"
1394 fi
1395 # end --with-fetch
1396
1397 # OpenLDAP --with-kerberos
1398         # Check whether --with-kerberos or --without-kerberos was given.
1399 if test "${with_kerberos+set}" = set; then
1400   withval="$with_kerberos"
1401   
1402         ol_arg=invalid
1403         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1404                 if test "$withval" = "$ol_val" ; then
1405                         ol_arg="$ol_val"
1406                 fi
1407         done
1408         if test "$ol_arg" = "invalid" ; then
1409                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1410         fi
1411         ol_with_kerberos="$ol_arg"
1412
1413 else
1414         ol_with_kerberos="auto"
1415 fi
1416 # end --with-kerberos
1417
1418 # OpenLDAP --with-readline
1419         # Check whether --with-readline or --without-readline was given.
1420 if test "${with_readline+set}" = set; then
1421   withval="$with_readline"
1422   
1423         ol_arg=invalid
1424         for ol_val in auto yes no  ; do
1425                 if test "$withval" = "$ol_val" ; then
1426                         ol_arg="$ol_val"
1427                 fi
1428         done
1429         if test "$ol_arg" = "invalid" ; then
1430                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1431         fi
1432         ol_with_readline="$ol_arg"
1433
1434 else
1435         ol_with_readline="auto"
1436 fi
1437 # end --with-readline
1438
1439 # OpenLDAP --with-threads
1440         # Check whether --with-threads or --without-threads was given.
1441 if test "${with_threads+set}" = set; then
1442   withval="$with_threads"
1443   
1444         ol_arg=invalid
1445         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1446                 if test "$withval" = "$ol_val" ; then
1447                         ol_arg="$ol_val"
1448                 fi
1449         done
1450         if test "$ol_arg" = "invalid" ; then
1451                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1452         fi
1453         ol_with_threads="$ol_arg"
1454
1455 else
1456         ol_with_threads="auto"
1457 fi
1458 # end --with-threads
1459
1460 # OpenLDAP --with-tls
1461         # Check whether --with-tls or --without-tls was given.
1462 if test "${with_tls+set}" = set; then
1463   withval="$with_tls"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto ssleay openssl yes no  ; do
1467                 if test "$withval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1473         fi
1474         ol_with_tls="$ol_arg"
1475
1476 else
1477         ol_with_tls="auto"
1478 fi
1479 # end --with-tls
1480
1481 # OpenLDAP --with-yielding_select
1482         # Check whether --with-yielding_select or --without-yielding_select was given.
1483 if test "${with_yielding_select+set}" = set; then
1484   withval="$with_yielding_select"
1485   
1486         ol_arg=invalid
1487         for ol_val in auto yes no manual  ; do
1488                 if test "$withval" = "$ol_val" ; then
1489                         ol_arg="$ol_val"
1490                 fi
1491         done
1492         if test "$ol_arg" = "invalid" ; then
1493                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1494         fi
1495         ol_with_yielding_select="$ol_arg"
1496
1497 else
1498         ol_with_yielding_select="auto"
1499 fi
1500 # end --with-yielding_select
1501
1502
1503
1504 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1505 if test "${with_xxslapdoptions+set}" = set; then
1506   withval="$with_xxslapdoptions"
1507   :
1508 fi
1509
1510 # OpenLDAP --enable-slapd
1511         # Check whether --enable-slapd or --disable-slapd was given.
1512 if test "${enable_slapd+set}" = set; then
1513   enableval="$enable_slapd"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no ; do
1517                 if test "$enableval" = "$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 $enableval for --enable-slapd" 1>&2; exit 1; }
1523         fi
1524         ol_enable_slapd="$ol_arg"
1525
1526 else
1527         ol_enable_slapd="yes"
1528 fi
1529 # end --enable-slapd
1530 # OpenLDAP --enable-cleartext
1531         # Check whether --enable-cleartext or --disable-cleartext was given.
1532 if test "${enable_cleartext+set}" = set; then
1533   enableval="$enable_cleartext"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no ; do
1537                 if test "$enableval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1543         fi
1544         ol_enable_cleartext="$ol_arg"
1545
1546 else
1547         ol_enable_cleartext="yes"
1548 fi
1549 # end --enable-cleartext
1550 # OpenLDAP --enable-crypt
1551         # Check whether --enable-crypt or --disable-crypt was given.
1552 if test "${enable_crypt+set}" = set; then
1553   enableval="$enable_crypt"
1554   
1555         ol_arg=invalid
1556         for ol_val in auto yes no ; do
1557                 if test "$enableval" = "$ol_val" ; then
1558                         ol_arg="$ol_val"
1559                 fi
1560         done
1561         if test "$ol_arg" = "invalid" ; then
1562                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1563         fi
1564         ol_enable_crypt="$ol_arg"
1565
1566 else
1567         ol_enable_crypt="auto"
1568 fi
1569 # end --enable-crypt
1570 # OpenLDAP --enable-kpasswd
1571         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1572 if test "${enable_kpasswd+set}" = set; then
1573   enableval="$enable_kpasswd"
1574   
1575         ol_arg=invalid
1576         for ol_val in auto yes no ; do
1577                 if test "$enableval" = "$ol_val" ; then
1578                         ol_arg="$ol_val"
1579                 fi
1580         done
1581         if test "$ol_arg" = "invalid" ; then
1582                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1583         fi
1584         ol_enable_kpasswd="$ol_arg"
1585
1586 else
1587         ol_enable_kpasswd="no"
1588 fi
1589 # end --enable-kpasswd
1590 # OpenLDAP --enable-spasswd
1591         # Check whether --enable-spasswd or --disable-spasswd was given.
1592 if test "${enable_spasswd+set}" = set; then
1593   enableval="$enable_spasswd"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto yes no ; do
1597                 if test "$enableval" = "$ol_val" ; then
1598                         ol_arg="$ol_val"
1599                 fi
1600         done
1601         if test "$ol_arg" = "invalid" ; then
1602                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1603         fi
1604         ol_enable_spasswd="$ol_arg"
1605
1606 else
1607         ol_enable_spasswd="no"
1608 fi
1609 # end --enable-spasswd
1610 # OpenLDAP --enable-modules
1611         # Check whether --enable-modules or --disable-modules was given.
1612 if test "${enable_modules+set}" = set; then
1613   enableval="$enable_modules"
1614   
1615         ol_arg=invalid
1616         for ol_val in auto yes no ; do
1617                 if test "$enableval" = "$ol_val" ; then
1618                         ol_arg="$ol_val"
1619                 fi
1620         done
1621         if test "$ol_arg" = "invalid" ; then
1622                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1623         fi
1624         ol_enable_modules="$ol_arg"
1625
1626 else
1627         ol_enable_modules="no"
1628 fi
1629 # end --enable-modules
1630 # OpenLDAP --enable-multimaster
1631         # Check whether --enable-multimaster or --disable-multimaster was given.
1632 if test "${enable_multimaster+set}" = set; then
1633   enableval="$enable_multimaster"
1634   
1635         ol_arg=invalid
1636         for ol_val in auto yes no ; do
1637                 if test "$enableval" = "$ol_val" ; then
1638                         ol_arg="$ol_val"
1639                 fi
1640         done
1641         if test "$ol_arg" = "invalid" ; then
1642                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1643         fi
1644         ol_enable_multimaster="$ol_arg"
1645
1646 else
1647         ol_enable_multimaster="no"
1648 fi
1649 # end --enable-multimaster
1650 # OpenLDAP --enable-phonetic
1651         # Check whether --enable-phonetic or --disable-phonetic was given.
1652 if test "${enable_phonetic+set}" = set; then
1653   enableval="$enable_phonetic"
1654   
1655         ol_arg=invalid
1656         for ol_val in auto yes no ; do
1657                 if test "$enableval" = "$ol_val" ; then
1658                         ol_arg="$ol_val"
1659                 fi
1660         done
1661         if test "$ol_arg" = "invalid" ; then
1662                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1663         fi
1664         ol_enable_phonetic="$ol_arg"
1665
1666 else
1667         ol_enable_phonetic="no"
1668 fi
1669 # end --enable-phonetic
1670 # OpenLDAP --enable-quipu
1671         # Check whether --enable-quipu or --disable-quipu was given.
1672 if test "${enable_quipu+set}" = set; then
1673   enableval="$enable_quipu"
1674   
1675         ol_arg=invalid
1676         for ol_val in auto yes no ; do
1677                 if test "$enableval" = "$ol_val" ; then
1678                         ol_arg="$ol_val"
1679                 fi
1680         done
1681         if test "$ol_arg" = "invalid" ; then
1682                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1683         fi
1684         ol_enable_quipu="$ol_arg"
1685
1686 else
1687         ol_enable_quipu="no"
1688 fi
1689 # end --enable-quipu
1690 # OpenLDAP --enable-rlookups
1691         # Check whether --enable-rlookups or --disable-rlookups was given.
1692 if test "${enable_rlookups+set}" = set; then
1693   enableval="$enable_rlookups"
1694   
1695         ol_arg=invalid
1696         for ol_val in auto yes no ; do
1697                 if test "$enableval" = "$ol_val" ; then
1698                         ol_arg="$ol_val"
1699                 fi
1700         done
1701         if test "$ol_arg" = "invalid" ; then
1702                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1703         fi
1704         ol_enable_rlookups="$ol_arg"
1705
1706 else
1707         ol_enable_rlookups="auto"
1708 fi
1709 # end --enable-rlookups
1710 # OpenLDAP --enable-aci
1711         # Check whether --enable-aci or --disable-aci was given.
1712 if test "${enable_aci+set}" = set; then
1713   enableval="$enable_aci"
1714   
1715         ol_arg=invalid
1716         for ol_val in auto yes no ; do
1717                 if test "$enableval" = "$ol_val" ; then
1718                         ol_arg="$ol_val"
1719                 fi
1720         done
1721         if test "$ol_arg" = "invalid" ; then
1722                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1723         fi
1724         ol_enable_aci="$ol_arg"
1725
1726 else
1727         ol_enable_aci="no"
1728 fi
1729 # end --enable-aci
1730 # OpenLDAP --enable-wrappers
1731         # Check whether --enable-wrappers or --disable-wrappers was given.
1732 if test "${enable_wrappers+set}" = set; then
1733   enableval="$enable_wrappers"
1734   
1735         ol_arg=invalid
1736         for ol_val in auto yes no ; do
1737                 if test "$enableval" = "$ol_val" ; then
1738                         ol_arg="$ol_val"
1739                 fi
1740         done
1741         if test "$ol_arg" = "invalid" ; then
1742                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1743         fi
1744         ol_enable_wrappers="$ol_arg"
1745
1746 else
1747         ol_enable_wrappers="no"
1748 fi
1749 # end --enable-wrappers
1750 # OpenLDAP --enable-dynamic
1751         # Check whether --enable-dynamic or --disable-dynamic was given.
1752 if test "${enable_dynamic+set}" = set; then
1753   enableval="$enable_dynamic"
1754   
1755         ol_arg=invalid
1756         for ol_val in auto yes no ; do
1757                 if test "$enableval" = "$ol_val" ; then
1758                         ol_arg="$ol_val"
1759                 fi
1760         done
1761         if test "$ol_arg" = "invalid" ; then
1762                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1763         fi
1764         ol_enable_dynamic="$ol_arg"
1765
1766 else
1767         ol_enable_dynamic="no"
1768 fi
1769 # end --enable-dynamic
1770
1771 # OpenLDAP --enable-dnssrv
1772         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1773 if test "${enable_dnssrv+set}" = set; then
1774   enableval="$enable_dnssrv"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1784         fi
1785         ol_enable_dnssrv="$ol_arg"
1786
1787 else
1788         ol_enable_dnssrv="no"
1789 fi
1790 # end --enable-dnssrv
1791 # OpenLDAP --with-dnssrv_module
1792         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1793 if test "${with_dnssrv_module+set}" = set; then
1794   withval="$with_dnssrv_module"
1795   
1796         ol_arg=invalid
1797         for ol_val in static dynamic ; do
1798                 if test "$withval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1804         fi
1805         ol_with_dnssrv_module="$ol_arg"
1806
1807 else
1808         ol_with_dnssrv_module="static"
1809 fi
1810 # end --with-dnssrv_module
1811
1812 # OpenLDAP --enable-ldap
1813         # Check whether --enable-ldap or --disable-ldap was given.
1814 if test "${enable_ldap+set}" = set; then
1815   enableval="$enable_ldap"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1825         fi
1826         ol_enable_ldap="$ol_arg"
1827
1828 else
1829         ol_enable_ldap="no"
1830 fi
1831 # end --enable-ldap
1832 # OpenLDAP --with-ldap_module
1833         # Check whether --with-ldap_module or --without-ldap_module was given.
1834 if test "${with_ldap_module+set}" = set; then
1835   withval="$with_ldap_module"
1836   
1837         ol_arg=invalid
1838         for ol_val in static dynamic ; do
1839                 if test "$withval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1845         fi
1846         ol_with_ldap_module="$ol_arg"
1847
1848 else
1849         ol_with_ldap_module="static"
1850 fi
1851 # end --with-ldap_module
1852
1853 # OpenLDAP --enable-ldbm
1854         # Check whether --enable-ldbm or --disable-ldbm was given.
1855 if test "${enable_ldbm+set}" = set; then
1856   enableval="$enable_ldbm"
1857   
1858         ol_arg=invalid
1859         for ol_val in auto yes no ; do
1860                 if test "$enableval" = "$ol_val" ; then
1861                         ol_arg="$ol_val"
1862                 fi
1863         done
1864         if test "$ol_arg" = "invalid" ; then
1865                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1866         fi
1867         ol_enable_ldbm="$ol_arg"
1868
1869 else
1870         ol_enable_ldbm="yes"
1871 fi
1872 # end --enable-ldbm
1873 # OpenLDAP --with-ldbm_api
1874         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1875 if test "${with_ldbm_api+set}" = set; then
1876   withval="$with_ldbm_api"
1877   
1878         ol_arg=invalid
1879         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1880                 if test "$withval" = "$ol_val" ; then
1881                         ol_arg="$ol_val"
1882                 fi
1883         done
1884         if test "$ol_arg" = "invalid" ; then
1885                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1886         fi
1887         ol_with_ldbm_api="$ol_arg"
1888
1889 else
1890         ol_with_ldbm_api="auto"
1891 fi
1892 # end --with-ldbm_api
1893
1894 # OpenLDAP --with-ldbm_module
1895         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1896 if test "${with_ldbm_module+set}" = set; then
1897   withval="$with_ldbm_module"
1898   
1899         ol_arg=invalid
1900         for ol_val in static dynamic ; do
1901                 if test "$withval" = "$ol_val" ; then
1902                         ol_arg="$ol_val"
1903                 fi
1904         done
1905         if test "$ol_arg" = "invalid" ; then
1906                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1907         fi
1908         ol_with_ldbm_module="$ol_arg"
1909
1910 else
1911         ol_with_ldbm_module="static"
1912 fi
1913 # end --with-ldbm_module
1914
1915 # OpenLDAP --with-ldbm_type
1916         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1917 if test "${with_ldbm_type+set}" = set; then
1918   withval="$with_ldbm_type"
1919   
1920         ol_arg=invalid
1921         for ol_val in auto btree hash ; do
1922                 if test "$withval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1928         fi
1929         ol_with_ldbm_type="$ol_arg"
1930
1931 else
1932         ol_with_ldbm_type="auto"
1933 fi
1934 # end --with-ldbm_type
1935
1936 # OpenLDAP --enable-passwd
1937         # Check whether --enable-passwd or --disable-passwd was given.
1938 if test "${enable_passwd+set}" = set; then
1939   enableval="$enable_passwd"
1940   
1941         ol_arg=invalid
1942         for ol_val in auto yes no ; do
1943                 if test "$enableval" = "$ol_val" ; then
1944                         ol_arg="$ol_val"
1945                 fi
1946         done
1947         if test "$ol_arg" = "invalid" ; then
1948                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1949         fi
1950         ol_enable_passwd="$ol_arg"
1951
1952 else
1953         ol_enable_passwd="no"
1954 fi
1955 # end --enable-passwd
1956 # OpenLDAP --with-passwd_module
1957         # Check whether --with-passwd_module or --without-passwd_module was given.
1958 if test "${with_passwd_module+set}" = set; then
1959   withval="$with_passwd_module"
1960   
1961         ol_arg=invalid
1962         for ol_val in static dynamic ; do
1963                 if test "$withval" = "$ol_val" ; then
1964                         ol_arg="$ol_val"
1965                 fi
1966         done
1967         if test "$ol_arg" = "invalid" ; then
1968                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1969         fi
1970         ol_with_passwd_module="$ol_arg"
1971
1972 else
1973         ol_with_passwd_module="static"
1974 fi
1975 # end --with-passwd_module
1976
1977 # OpenLDAP --enable-perl
1978         # Check whether --enable-perl or --disable-perl was given.
1979 if test "${enable_perl+set}" = set; then
1980   enableval="$enable_perl"
1981   
1982         ol_arg=invalid
1983         for ol_val in auto yes no ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1990         fi
1991         ol_enable_perl="$ol_arg"
1992
1993 else
1994         ol_enable_perl="no"
1995 fi
1996 # end --enable-perl
1997 # OpenLDAP --with-perl_module
1998         # Check whether --with-perl_module or --without-perl_module was given.
1999 if test "${with_perl_module+set}" = set; then
2000   withval="$with_perl_module"
2001   
2002         ol_arg=invalid
2003         for ol_val in static dynamic ; do
2004                 if test "$withval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2010         fi
2011         ol_with_perl_module="$ol_arg"
2012
2013 else
2014         ol_with_perl_module="static"
2015 fi
2016 # end --with-perl_module
2017
2018 # OpenLDAP --enable-shell
2019         # Check whether --enable-shell or --disable-shell was given.
2020 if test "${enable_shell+set}" = set; then
2021   enableval="$enable_shell"
2022   
2023         ol_arg=invalid
2024         for ol_val in auto yes no ; do
2025                 if test "$enableval" = "$ol_val" ; then
2026                         ol_arg="$ol_val"
2027                 fi
2028         done
2029         if test "$ol_arg" = "invalid" ; then
2030                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2031         fi
2032         ol_enable_shell="$ol_arg"
2033
2034 else
2035         ol_enable_shell="no"
2036 fi
2037 # end --enable-shell
2038 # OpenLDAP --with-shell_module
2039         # Check whether --with-shell_module or --without-shell_module was given.
2040 if test "${with_shell_module+set}" = set; then
2041   withval="$with_shell_module"
2042   
2043         ol_arg=invalid
2044         for ol_val in static dynamic ; do
2045                 if test "$withval" = "$ol_val" ; then
2046                         ol_arg="$ol_val"
2047                 fi
2048         done
2049         if test "$ol_arg" = "invalid" ; then
2050                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2051         fi
2052         ol_with_shell_module="$ol_arg"
2053
2054 else
2055         ol_with_shell_module="static"
2056 fi
2057 # end --with-shell_module
2058
2059 # OpenLDAP --enable-sql
2060         # Check whether --enable-sql or --disable-sql was given.
2061 if test "${enable_sql+set}" = set; then
2062   enableval="$enable_sql"
2063   
2064         ol_arg=invalid
2065         for ol_val in auto yes no ; do
2066                 if test "$enableval" = "$ol_val" ; then
2067                         ol_arg="$ol_val"
2068                 fi
2069         done
2070         if test "$ol_arg" = "invalid" ; then
2071                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2072         fi
2073         ol_enable_sql="$ol_arg"
2074
2075 else
2076         ol_enable_sql="no"
2077 fi
2078 # end --enable-sql
2079 # OpenLDAP --with-sql_module
2080         # Check whether --with-sql_module or --without-sql_module was given.
2081 if test "${with_sql_module+set}" = set; then
2082   withval="$with_sql_module"
2083   
2084         ol_arg=invalid
2085         for ol_val in static dynamic ; do
2086                 if test "$withval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2092         fi
2093         ol_with_sql_module="$ol_arg"
2094
2095 else
2096         ol_with_sql_module="static"
2097 fi
2098 # end --with-sql_module
2099
2100 # OpenLDAP --enable-tcl
2101         # Check whether --enable-tcl or --disable-tcl was given.
2102 if test "${enable_tcl+set}" = set; then
2103   enableval="$enable_tcl"
2104   
2105         ol_arg=invalid
2106         for ol_val in auto yes no ; do
2107                 if test "$enableval" = "$ol_val" ; then
2108                         ol_arg="$ol_val"
2109                 fi
2110         done
2111         if test "$ol_arg" = "invalid" ; then
2112                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2113         fi
2114         ol_enable_tcl="$ol_arg"
2115
2116 else
2117         ol_enable_tcl="no"
2118 fi
2119 # end --enable-tcl
2120 # OpenLDAP --with-tcl_module
2121         # Check whether --with-tcl_module or --without-tcl_module was given.
2122 if test "${with_tcl_module+set}" = set; then
2123   withval="$with_tcl_module"
2124   
2125         ol_arg=invalid
2126         for ol_val in static dynamic ; do
2127                 if test "$withval" = "$ol_val" ; then
2128                         ol_arg="$ol_val"
2129                 fi
2130         done
2131         if test "$ol_arg" = "invalid" ; then
2132                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2133         fi
2134         ol_with_tcl_module="$ol_arg"
2135
2136 else
2137         ol_with_tcl_module="static"
2138 fi
2139 # end --with-tcl_module
2140
2141
2142 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2143 if test "${with_xxslurpdoptions+set}" = set; then
2144   withval="$with_xxslurpdoptions"
2145   :
2146 fi
2147
2148 # OpenLDAP --enable-slurpd
2149         # Check whether --enable-slurpd or --disable-slurpd was given.
2150 if test "${enable_slurpd+set}" = set; then
2151   enableval="$enable_slurpd"
2152   
2153         ol_arg=invalid
2154         for ol_val in auto yes no ; do
2155                 if test "$enableval" = "$ol_val" ; then
2156                         ol_arg="$ol_val"
2157                 fi
2158         done
2159         if test "$ol_arg" = "invalid" ; then
2160                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2161         fi
2162         ol_enable_slurpd="$ol_arg"
2163
2164 else
2165         ol_enable_slurpd="auto"
2166 fi
2167 # end --enable-slurpd
2168
2169 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2170 if test "${with_xxliboptions+set}" = set; then
2171   withval="$with_xxliboptions"
2172   :
2173 fi
2174
2175 # Check whether --enable-static or --disable-static was given.
2176 if test "${enable_static+set}" = set; then
2177   enableval="$enable_static"
2178   p=${PACKAGE-default}
2179 case "$enableval" in
2180 yes) enable_static=yes ;;
2181 no) enable_static=no ;;
2182 *)
2183   enable_static=no
2184   # Look at the argument we got.  We use all the common list separators.
2185   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2186   for pkg in $enableval; do
2187     if test "X$pkg" = "X$p"; then
2188       enable_static=yes
2189     fi
2190   done
2191   IFS="$ac_save_ifs"
2192   ;;
2193 esac
2194 else
2195   enable_static=yes
2196 fi
2197
2198 # Check whether --enable-shared or --disable-shared was given.
2199 if test "${enable_shared+set}" = set; then
2200   enableval="$enable_shared"
2201   p=${PACKAGE-default}
2202 case "$enableval" in
2203 yes) enable_shared=yes ;;
2204 no) enable_shared=no ;;
2205 *)
2206   enable_shared=no
2207   # Look at the argument we got.  We use all the common list separators.
2208   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2209   for pkg in $enableval; do
2210     if test "X$pkg" = "X$p"; then
2211       enable_shared=yes
2212     fi
2213   done
2214   IFS="$ac_save_ifs"
2215   ;;
2216 esac
2217 else
2218   enable_shared=yes
2219 fi
2220
2221
2222
2223 # validate options
2224 if test $ol_enable_slapd = no ; then
2225                 if test $ol_enable_dnssrv = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2227         fi
2228         if test $ol_enable_ldap = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2230         fi
2231         if test $ol_enable_ldbm = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2233         fi
2234         if test $ol_enable_passwd = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2236         fi
2237         if test $ol_enable_perl = yes ; then
2238                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2239         fi
2240         if test $ol_enable_shell = yes ; then
2241                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2242         fi
2243         if test $ol_enable_tcl = yes ; then
2244                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2245         fi
2246         if test $ol_enable_sql = yes ; then
2247                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2248         fi
2249         if test $ol_enable_modules = yes ; then
2250                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2251         fi
2252         if test $ol_enable_multimaster = yes ; then
2253                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2254         fi
2255         if test $ol_enable_wrappers = yes ; then
2256                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2257         fi
2258         if test $ol_enable_phonetic = yes ; then
2259                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2260         fi
2261         if test $ol_enable_quipu = yes ; then
2262                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2263         fi
2264         if test $ol_enable_rlookups = yes ; then
2265                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2266         fi
2267         if test $ol_enable_aci = yes ; then
2268                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2269         fi
2270         if test $ol_with_ldbm_api != auto ; then
2271                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2272         fi
2273         if test $ol_with_ldbm_type != auto ; then
2274                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2275         fi
2276         if test $ol_with_dnssrv_module != static ; then
2277                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2278         fi
2279         if test $ol_with_ldap_module != static ; then
2280                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2281         fi
2282         if test $ol_with_ldbm_module != static ; then
2283                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2284         fi
2285         if test $ol_with_passwd_module != static ; then
2286                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2287         fi
2288         if test $ol_with_perl_module != static ; then
2289                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2290         fi
2291         if test $ol_with_shell_module != static ; then
2292                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2293         fi
2294         if test $ol_with_tcl_module != static ; then
2295                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2296         fi
2297         if test $ol_with_sql_module != static ; then
2298                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2299         fi
2300         if test $ol_enable_slurpd = yes ; then
2301                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2302         fi
2303
2304         # force settings to no
2305         ol_enable_dnssrv=no
2306         ol_enable_ldap=no
2307         ol_enable_ldbm=no
2308         ol_enable_passwd=no
2309         ol_enable_perl=no
2310         ol_enable_shell=no
2311         ol_enable_tcl=no
2312         ol_enable_sql=no
2313
2314         ol_enable_modules=no
2315         ol_enable_multimaster=no
2316         ol_enable_phonetic=no
2317         ol_enable_quipu=no
2318         ol_enable_rlookups=no
2319         ol_enable_aci=no
2320         ol_enable_wrappers=no
2321         ol_enable_dynamic=no
2322
2323         ol_with_ldbm_api=no
2324         ol_with_ldbm_type=no
2325
2326         ol_with_dnssrv_module=static
2327         ol_with_ldap_module=static
2328         ol_with_ldbm_module=static
2329         ol_with_passwd_module=static
2330         ol_with_perl_module=static
2331         ol_with_shell_module=static
2332         ol_with_tcl_module=static
2333         ol_with_sql_module=static
2334
2335         ol_enable_slurpd=no
2336
2337 elif test $ol_enable_ldbm = no ; then
2338         
2339         if test $ol_with_ldbm_api != auto ; then
2340                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2341         fi
2342
2343         if test $ol_with_ldbm_type != auto ; then
2344                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2345         fi
2346
2347         if test $ol_with_ldbm_module != static ; then
2348                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2349         fi
2350
2351         if test $ol_enable_modules != yes -a \
2352                 $ol_enable_dnssrv = no -a \
2353                 $ol_enable_ldap = no -a \
2354                 $ol_enable_passwd = no -a \
2355                 $ol_enable_perl = no -a \
2356                 $ol_enable_shell = no -a \
2357                 $ol_enable_sql = no -a \
2358                 $ol_enable_tcl = no ; then
2359                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2360         fi
2361
2362         ol_with_ldbm_api=no
2363         ol_with_ldbm_type=no
2364         ol_with_ldbm_module=static
2365
2366 else
2367                 if test $ol_with_ldbm_api = gdbm -a \
2368                 $ol_with_ldbm_type = btree ; then
2369                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2370         fi
2371         if test $ol_with_ldbm_api = mdbm -a \
2372                 $ol_with_ldbm_type = btree ; then
2373                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2374         fi
2375         if test $ol_with_ldbm_api = ndbm -a \
2376                 $ol_with_ldbm_type = btree ; then
2377                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2378         fi
2379 fi
2380
2381 if test $ol_enable_slurpd = yes ; then
2382                 if test $ol_with_threads = no ; then
2383                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2384         fi
2385 fi
2386
2387 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2388         if test $ol_with_kerberos = no ; then
2389                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2390         fi
2391 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2392         if test $ol_with_kerberos != auto ; then
2393                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2394         else
2395                 ol_with_kerberos=no
2396         fi
2397 fi
2398
2399 if test $ol_enable_spasswd = yes ; then
2400         if test $ol_with_cyrus_sasl = no ; then
2401                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2402         fi
2403         ol_link_spasswd=yes
2404 fi
2405
2406 echo "$ac_t""done" 1>&6
2407
2408 LDAP_LIBS=
2409 LDIF_LIBS=
2410 LDBM_LIBS=
2411 LTHREAD_LIBS=
2412 LUTIL_LIBS=
2413
2414 QUIPU_LIBS=
2415 SLAPD_LIBS=
2416 SLURPD_LIBS=
2417
2418 BUILD_SLAPD=no
2419 BUILD_SLURPD=no
2420
2421 BUILD_QUIPU=no
2422 BUILD_THREAD=no
2423
2424 BUILD_DNSSRV=no
2425 BUILD_LDAP=no
2426 BUILD_LDBM=no
2427 BUILD_PASSWD=no
2428 BUILD_PERL=no
2429 BUILD_SHELL=no
2430 BUILD_SQL=no
2431 BUILD_TCL=no
2432
2433 BUILD_DNSSRV_DYNAMIC=static
2434 BUILD_LDAP_DYNAMIC=static
2435 BUILD_LDBM_DYNAMIC=static
2436 BUILD_PASSWD_DYNAMIC=static
2437 BUILD_PERL_DYNAMIC=static
2438 BUILD_SHELL_DYNAMIC=static
2439 BUILD_TCL_DYNAMIC=static
2440 BUILD_SQL_DYNAMIC=static
2441
2442 SLAPD_MODULES_LDFLAGS=
2443 SLAPD_MODULES_CPPFLAGS=
2444 SLAPD_MODULES_LIST=
2445
2446 SLAPD_PERL_LDFLAGS=
2447 MOD_PERL_LDFLAGS=
2448 PERL_CPPFLAGS=
2449
2450 SLAPD_SQL_LDFLAGS=
2451 SLAPD_SQL_LIBS=
2452 SLAPD_SQL_INCLUDES=
2453
2454 MOD_TCL_LIB=
2455 KRB4_LIBS=
2456 KRB5_LIBS=
2457 READLINE_LIBS=
2458 SASL_LIBS=
2459 TERMCAP_LIBS=
2460 TLS_LIBS=
2461 MODULES_LIBS=
2462 AUTH_LIBS=
2463
2464
2465
2466 cat >> confdefs.h <<\EOF
2467 #define HAVE_MKVERSION 1
2468 EOF
2469
2470
2471
2472
2473 ol_aix_threads=no
2474 case "$target" in
2475 *-*-aix*)       if test -z "$CC" ; then
2476                 case "$ol_with_threads" in
2477                 auto | yes |  posix) ol_aix_threads=yes ;;
2478                 esac
2479         fi
2480 ;;
2481 esac
2482
2483 if test $ol_aix_threads = yes ; then
2484         if test -z "${CC}" ; then
2485                 for ac_prog in cc_r xlc_r cc
2486 do
2487 # Extract the first word of "$ac_prog", so it can be a program name with args.
2488 set dummy $ac_prog; ac_word=$2
2489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2490 echo "configure:2491: checking for $ac_word" >&5
2491 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2492   echo $ac_n "(cached) $ac_c" 1>&6
2493 else
2494   if test -n "$CC"; then
2495   ac_cv_prog_CC="$CC" # Let the user override the test.
2496 else
2497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2498   ac_dummy="$PATH"
2499   for ac_dir in $ac_dummy; do
2500     test -z "$ac_dir" && ac_dir=.
2501     if test -f $ac_dir/$ac_word; then
2502       ac_cv_prog_CC="$ac_prog"
2503       break
2504     fi
2505   done
2506   IFS="$ac_save_ifs"
2507 fi
2508 fi
2509 CC="$ac_cv_prog_CC"
2510 if test -n "$CC"; then
2511   echo "$ac_t""$CC" 1>&6
2512 else
2513   echo "$ac_t""no" 1>&6
2514 fi
2515
2516 test -n "$CC" && break
2517 done
2518
2519
2520                 if test "$CC" = cc ; then
2521                                                 if test $ol_with_threads != auto ; then
2522                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2523                         else
2524                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2525                         fi
2526                         ol_with_threads=no
2527                 fi
2528         fi
2529
2530         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2531                 ol_with_threads=posix
2532                 ol_cv_pthread_create=yes
2533         fi
2534 fi
2535
2536 if test -z "${CC}"; then
2537         for ac_prog in cc
2538 do
2539 # Extract the first word of "$ac_prog", so it can be a program name with args.
2540 set dummy $ac_prog; ac_word=$2
2541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2542 echo "configure:2543: checking for $ac_word" >&5
2543 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2544   echo $ac_n "(cached) $ac_c" 1>&6
2545 else
2546   if test -n "$CC"; then
2547   ac_cv_prog_CC="$CC" # Let the user override the test.
2548 else
2549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2550   ac_dummy="$PATH"
2551   for ac_dir in $ac_dummy; do
2552     test -z "$ac_dir" && ac_dir=.
2553     if test -f $ac_dir/$ac_word; then
2554       ac_cv_prog_CC="$ac_prog"
2555       break
2556     fi
2557   done
2558   IFS="$ac_save_ifs"
2559 fi
2560 fi
2561 CC="$ac_cv_prog_CC"
2562 if test -n "$CC"; then
2563   echo "$ac_t""$CC" 1>&6
2564 else
2565   echo "$ac_t""no" 1>&6
2566 fi
2567
2568 test -n "$CC" && break
2569 done
2570
2571 fi
2572
2573
2574
2575
2576 # Check whether --enable-fast-install or --disable-fast-install was given.
2577 if test "${enable_fast_install+set}" = set; then
2578   enableval="$enable_fast_install"
2579   p=${PACKAGE-default}
2580 case "$enableval" in
2581 yes) enable_fast_install=yes ;;
2582 no) enable_fast_install=no ;;
2583 *)
2584   enable_fast_install=no
2585   # Look at the argument we got.  We use all the common list separators.
2586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2587   for pkg in $enableval; do
2588     if test "X$pkg" = "X$p"; then
2589       enable_fast_install=yes
2590     fi
2591   done
2592   IFS="$ac_save_ifs"
2593   ;;
2594 esac
2595 else
2596   enable_fast_install=yes
2597 fi
2598
2599 # Extract the first word of "ranlib", so it can be a program name with args.
2600 set dummy ranlib; ac_word=$2
2601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2602 echo "configure:2603: checking for $ac_word" >&5
2603 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2604   echo $ac_n "(cached) $ac_c" 1>&6
2605 else
2606   if test -n "$RANLIB"; then
2607   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2608 else
2609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2610   ac_dummy="$PATH"
2611   for ac_dir in $ac_dummy; do
2612     test -z "$ac_dir" && ac_dir=.
2613     if test -f $ac_dir/$ac_word; then
2614       ac_cv_prog_RANLIB="ranlib"
2615       break
2616     fi
2617   done
2618   IFS="$ac_save_ifs"
2619   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2620 fi
2621 fi
2622 RANLIB="$ac_cv_prog_RANLIB"
2623 if test -n "$RANLIB"; then
2624   echo "$ac_t""$RANLIB" 1>&6
2625 else
2626   echo "$ac_t""no" 1>&6
2627 fi
2628
2629 # Extract the first word of "gcc", so it can be a program name with args.
2630 set dummy gcc; ac_word=$2
2631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2632 echo "configure:2633: checking for $ac_word" >&5
2633 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2634   echo $ac_n "(cached) $ac_c" 1>&6
2635 else
2636   if test -n "$CC"; then
2637   ac_cv_prog_CC="$CC" # Let the user override the test.
2638 else
2639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2640   ac_dummy="$PATH"
2641   for ac_dir in $ac_dummy; do
2642     test -z "$ac_dir" && ac_dir=.
2643     if test -f $ac_dir/$ac_word; then
2644       ac_cv_prog_CC="gcc"
2645       break
2646     fi
2647   done
2648   IFS="$ac_save_ifs"
2649 fi
2650 fi
2651 CC="$ac_cv_prog_CC"
2652 if test -n "$CC"; then
2653   echo "$ac_t""$CC" 1>&6
2654 else
2655   echo "$ac_t""no" 1>&6
2656 fi
2657
2658 if test -z "$CC"; then
2659   # Extract the first word of "cc", so it can be a program name with args.
2660 set dummy cc; ac_word=$2
2661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2662 echo "configure:2663: checking for $ac_word" >&5
2663 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2664   echo $ac_n "(cached) $ac_c" 1>&6
2665 else
2666   if test -n "$CC"; then
2667   ac_cv_prog_CC="$CC" # Let the user override the test.
2668 else
2669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2670   ac_prog_rejected=no
2671   ac_dummy="$PATH"
2672   for ac_dir in $ac_dummy; do
2673     test -z "$ac_dir" && ac_dir=.
2674     if test -f $ac_dir/$ac_word; then
2675       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2676         ac_prog_rejected=yes
2677         continue
2678       fi
2679       ac_cv_prog_CC="cc"
2680       break
2681     fi
2682   done
2683   IFS="$ac_save_ifs"
2684 if test $ac_prog_rejected = yes; then
2685   # We found a bogon in the path, so make sure we never use it.
2686   set dummy $ac_cv_prog_CC
2687   shift
2688   if test $# -gt 0; then
2689     # We chose a different compiler from the bogus one.
2690     # However, it has the same basename, so the bogon will be chosen
2691     # first if we set CC to just the basename; use the full file name.
2692     shift
2693     set dummy "$ac_dir/$ac_word" "$@"
2694     shift
2695     ac_cv_prog_CC="$@"
2696   fi
2697 fi
2698 fi
2699 fi
2700 CC="$ac_cv_prog_CC"
2701 if test -n "$CC"; then
2702   echo "$ac_t""$CC" 1>&6
2703 else
2704   echo "$ac_t""no" 1>&6
2705 fi
2706
2707   if test -z "$CC"; then
2708     case "`uname -s`" in
2709     *win32* | *WIN32* | *CYGWIN*)
2710       # Extract the first word of "cl", so it can be a program name with args.
2711 set dummy cl; ac_word=$2
2712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2713 echo "configure:2714: checking for $ac_word" >&5
2714 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2715   echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717   if test -n "$CC"; then
2718   ac_cv_prog_CC="$CC" # Let the user override the test.
2719 else
2720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2721   ac_dummy="$PATH"
2722   for ac_dir in $ac_dummy; do
2723     test -z "$ac_dir" && ac_dir=.
2724     if test -f $ac_dir/$ac_word; then
2725       ac_cv_prog_CC="cl"
2726       break
2727     fi
2728   done
2729   IFS="$ac_save_ifs"
2730 fi
2731 fi
2732 CC="$ac_cv_prog_CC"
2733 if test -n "$CC"; then
2734   echo "$ac_t""$CC" 1>&6
2735 else
2736   echo "$ac_t""no" 1>&6
2737 fi
2738  ;;
2739     esac
2740   fi
2741   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2742 fi
2743
2744 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2745 echo "configure:2746: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2746
2747 ac_ext=c
2748 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2749 ac_cpp='$CPP $CPPFLAGS'
2750 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2751 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2752 cross_compiling=$ac_cv_prog_cc_cross
2753
2754 cat > conftest.$ac_ext << EOF
2755
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758
2759 main(){return(0);}
2760 EOF
2761 if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2762   ac_cv_prog_cc_works=yes
2763   # If we can't run a trivial program, we are probably using a cross compiler.
2764   if (./conftest; exit) 2>/dev/null; then
2765     ac_cv_prog_cc_cross=no
2766   else
2767     ac_cv_prog_cc_cross=yes
2768   fi
2769 else
2770   echo "configure: failed program was:" >&5
2771   cat conftest.$ac_ext >&5
2772   ac_cv_prog_cc_works=no
2773 fi
2774 rm -fr conftest*
2775 ac_ext=c
2776 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2777 ac_cpp='$CPP $CPPFLAGS'
2778 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2779 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2780 cross_compiling=$ac_cv_prog_cc_cross
2781
2782 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2783 if test $ac_cv_prog_cc_works = no; then
2784   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2785 fi
2786 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2787 echo "configure:2788: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2788 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2789 cross_compiling=$ac_cv_prog_cc_cross
2790
2791 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2792 echo "configure:2793: checking whether we are using GNU C" >&5
2793 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   cat > conftest.c <<EOF
2797 #ifdef __GNUC__
2798   yes;
2799 #endif
2800 EOF
2801 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2802   ac_cv_prog_gcc=yes
2803 else
2804   ac_cv_prog_gcc=no
2805 fi
2806 fi
2807
2808 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2809
2810 if test $ac_cv_prog_gcc = yes; then
2811   GCC=yes
2812 else
2813   GCC=
2814 fi
2815
2816 ac_test_CFLAGS="${CFLAGS+set}"
2817 ac_save_CFLAGS="$CFLAGS"
2818 CFLAGS=
2819 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2820 echo "configure:2821: checking whether ${CC-cc} accepts -g" >&5
2821 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   echo 'void f(){}' > conftest.c
2825 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2826   ac_cv_prog_cc_g=yes
2827 else
2828   ac_cv_prog_cc_g=no
2829 fi
2830 rm -f conftest*
2831
2832 fi
2833
2834 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2835 if test "$ac_test_CFLAGS" = set; then
2836   CFLAGS="$ac_save_CFLAGS"
2837 elif test $ac_cv_prog_cc_g = yes; then
2838   if test "$GCC" = yes; then
2839     CFLAGS="-g -O2"
2840   else
2841     CFLAGS="-g"
2842   fi
2843 else
2844   if test "$GCC" = yes; then
2845     CFLAGS="-O2"
2846   else
2847     CFLAGS=
2848   fi
2849 fi
2850
2851 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2852 if test "${with_gnu_ld+set}" = set; then
2853   withval="$with_gnu_ld"
2854   test "$withval" = no || with_gnu_ld=yes
2855 else
2856   with_gnu_ld=no
2857 fi
2858
2859 ac_prog=ld
2860 if test "$ac_cv_prog_gcc" = yes; then
2861   # Check if gcc -print-prog-name=ld gives a path.
2862   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2863 echo "configure:2864: checking for ld used by GCC" >&5
2864   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2865   case "$ac_prog" in
2866     # Accept absolute paths.
2867     [\\/]* | [A-Za-z]:[\\/]*)
2868       re_direlt='/[^/][^/]*/\.\./'
2869       # Canonicalize the path of ld
2870       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2871       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2872         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2873       done
2874       test -z "$LD" && LD="$ac_prog"
2875       ;;
2876   "")
2877     # If it fails, then pretend we aren't using GCC.
2878     ac_prog=ld
2879     ;;
2880   *)
2881     # If it is relative, then search for the first ld in PATH.
2882     with_gnu_ld=unknown
2883     ;;
2884   esac
2885 elif test "$with_gnu_ld" = yes; then
2886   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2887 echo "configure:2888: checking for GNU ld" >&5
2888 else
2889   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2890 echo "configure:2891: checking for non-GNU ld" >&5
2891 fi
2892 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2893   echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895   if test -z "$LD"; then
2896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2897   for ac_dir in $PATH; do
2898     test -z "$ac_dir" && ac_dir=.
2899     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2900       ac_cv_path_LD="$ac_dir/$ac_prog"
2901       # Check to see if the program is GNU ld.  I'd rather use --version,
2902       # but apparently some GNU ld's only accept -v.
2903       # Break only if it was the GNU/non-GNU ld that we prefer.
2904       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2905         test "$with_gnu_ld" != no && break
2906       else
2907         test "$with_gnu_ld" != yes && break
2908       fi
2909     fi
2910   done
2911   IFS="$ac_save_ifs"
2912 else
2913   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2914 fi
2915 fi
2916
2917 LD="$ac_cv_path_LD"
2918 if test -n "$LD"; then
2919   echo "$ac_t""$LD" 1>&6
2920 else
2921   echo "$ac_t""no" 1>&6
2922 fi
2923 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2924 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2925 echo "configure:2926: checking if the linker ($LD) is GNU ld" >&5
2926 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2927   echo $ac_n "(cached) $ac_c" 1>&6
2928 else
2929   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2930 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2931   ac_cv_prog_gnu_ld=yes
2932 else
2933   ac_cv_prog_gnu_ld=no
2934 fi
2935 fi
2936
2937 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2938
2939
2940 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2941 echo "configure:2942: checking for BSD-compatible nm" >&5
2942 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   if test -n "$NM"; then
2946   # Let the user override the test.
2947   ac_cv_path_NM="$NM"
2948 else
2949   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2950   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2951     test -z "$ac_dir" && ac_dir=.
2952     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2953       # Check to see if the nm accepts a BSD-compat flag.
2954       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2955       #   nm: unknown option "B" ignored
2956       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2957         ac_cv_path_NM="$ac_dir/nm -B"
2958         break
2959       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2960         ac_cv_path_NM="$ac_dir/nm -p"
2961         break
2962       else
2963         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2964         continue # so that we can try to find one that supports BSD flags
2965       fi
2966     fi
2967   done
2968   IFS="$ac_save_ifs"
2969   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2970 fi
2971 fi
2972
2973 NM="$ac_cv_path_NM"
2974 echo "$ac_t""$NM" 1>&6
2975
2976 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2977 echo "configure:2978: checking whether ln -s works" >&5
2978 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   rm -f conftestdata
2982 if ln -s X conftestdata 2>/dev/null
2983 then
2984   rm -f conftestdata
2985   ac_cv_prog_LN_S="ln -s"
2986 else
2987   ac_cv_prog_LN_S=ln
2988 fi
2989 fi
2990 LN_S="$ac_cv_prog_LN_S"
2991 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2992   echo "$ac_t""yes" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996
2997 if test $host != $build; then
2998   ac_tool_prefix=${host_alias}-
2999 else
3000   ac_tool_prefix=
3001 fi
3002
3003
3004 case "$target" in
3005 NONE) lt_target="$host" ;;
3006 *) lt_target="$target" ;;
3007 esac
3008
3009 # Check for any special flags to pass to ltconfig.
3010 libtool_flags="--cache-file=$cache_file"
3011 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3012 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3013 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3014 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3015 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3016 libtool_flags="$libtool_flags --enable-dlopen"
3017 libtool_flags="$libtool_flags --enable-win32-dll"
3018 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3019 if test "${enable_libtool_lock+set}" = set; then
3020   enableval="$enable_libtool_lock"
3021   :
3022 fi
3023
3024 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3025 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3026
3027 # Some flags need to be propagated to the compiler or linker for good
3028 # libtool support.
3029 case "$lt_target" in
3030 *-*-irix6*)
3031   # Find out which ABI we are using.
3032   echo '#line 3033 "configure"' > conftest.$ac_ext
3033   if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3034     case "`/usr/bin/file conftest.o`" in
3035     *32-bit*)
3036       LD="${LD-ld} -32"
3037       ;;
3038     *N32*)
3039       LD="${LD-ld} -n32"
3040       ;;
3041     *64-bit*)
3042       LD="${LD-ld} -64"
3043       ;;
3044     esac
3045   fi
3046   rm -rf conftest*
3047   ;;
3048
3049 *-*-sco3.2v5*)
3050   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3051   SAVE_CFLAGS="$CFLAGS"
3052   CFLAGS="$CFLAGS -belf"
3053   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3054 echo "configure:3055: checking whether the C compiler needs -belf" >&5
3055 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3056   echo $ac_n "(cached) $ac_c" 1>&6
3057 else
3058   cat > conftest.$ac_ext <<EOF
3059 #line 3060 "configure"
3060 #include "confdefs.h"
3061
3062 int main() {
3063
3064 ; return 0; }
3065 EOF
3066 if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3067   rm -rf conftest*
3068   lt_cv_cc_needs_belf=yes
3069 else
3070   echo "configure: failed program was:" >&5
3071   cat conftest.$ac_ext >&5
3072   rm -rf conftest*
3073   lt_cv_cc_needs_belf=no
3074 fi
3075 rm -f conftest*
3076 fi
3077
3078 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3079   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3080     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3081     CFLAGS="$SAVE_CFLAGS"
3082   fi
3083   ;;
3084
3085 *-*-cygwin* | *-*-mingw*)
3086   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3087 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3089 echo "configure:3090: checking for $ac_word" >&5
3090 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3091   echo $ac_n "(cached) $ac_c" 1>&6
3092 else
3093   if test -n "$DLLTOOL"; then
3094   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3095 else
3096   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3097   ac_dummy="$PATH"
3098   for ac_dir in $ac_dummy; do
3099     test -z "$ac_dir" && ac_dir=.
3100     if test -f $ac_dir/$ac_word; then
3101       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3102       break
3103     fi
3104   done
3105   IFS="$ac_save_ifs"
3106 fi
3107 fi
3108 DLLTOOL="$ac_cv_prog_DLLTOOL"
3109 if test -n "$DLLTOOL"; then
3110   echo "$ac_t""$DLLTOOL" 1>&6
3111 else
3112   echo "$ac_t""no" 1>&6
3113 fi
3114
3115
3116 if test -z "$ac_cv_prog_DLLTOOL"; then
3117 if test -n "$ac_tool_prefix"; then
3118   # Extract the first word of "dlltool", so it can be a program name with args.
3119 set dummy dlltool; ac_word=$2
3120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3121 echo "configure:3122: checking for $ac_word" >&5
3122 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3123   echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125   if test -n "$DLLTOOL"; then
3126   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3127 else
3128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3129   ac_dummy="$PATH"
3130   for ac_dir in $ac_dummy; do
3131     test -z "$ac_dir" && ac_dir=.
3132     if test -f $ac_dir/$ac_word; then
3133       ac_cv_prog_DLLTOOL="dlltool"
3134       break
3135     fi
3136   done
3137   IFS="$ac_save_ifs"
3138   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3139 fi
3140 fi
3141 DLLTOOL="$ac_cv_prog_DLLTOOL"
3142 if test -n "$DLLTOOL"; then
3143   echo "$ac_t""$DLLTOOL" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 else
3149   DLLTOOL="false"
3150 fi
3151 fi
3152
3153   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3154 set dummy ${ac_tool_prefix}as; ac_word=$2
3155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3156 echo "configure:3157: checking for $ac_word" >&5
3157 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3158   echo $ac_n "(cached) $ac_c" 1>&6
3159 else
3160   if test -n "$AS"; then
3161   ac_cv_prog_AS="$AS" # Let the user override the test.
3162 else
3163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3164   ac_dummy="$PATH"
3165   for ac_dir in $ac_dummy; do
3166     test -z "$ac_dir" && ac_dir=.
3167     if test -f $ac_dir/$ac_word; then
3168       ac_cv_prog_AS="${ac_tool_prefix}as"
3169       break
3170     fi
3171   done
3172   IFS="$ac_save_ifs"
3173 fi
3174 fi
3175 AS="$ac_cv_prog_AS"
3176 if test -n "$AS"; then
3177   echo "$ac_t""$AS" 1>&6
3178 else
3179   echo "$ac_t""no" 1>&6
3180 fi
3181
3182
3183 if test -z "$ac_cv_prog_AS"; then
3184 if test -n "$ac_tool_prefix"; then
3185   # Extract the first word of "as", so it can be a program name with args.
3186 set dummy as; ac_word=$2
3187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3188 echo "configure:3189: checking for $ac_word" >&5
3189 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3190   echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192   if test -n "$AS"; then
3193   ac_cv_prog_AS="$AS" # Let the user override the test.
3194 else
3195   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3196   ac_dummy="$PATH"
3197   for ac_dir in $ac_dummy; do
3198     test -z "$ac_dir" && ac_dir=.
3199     if test -f $ac_dir/$ac_word; then
3200       ac_cv_prog_AS="as"
3201       break
3202     fi
3203   done
3204   IFS="$ac_save_ifs"
3205   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3206 fi
3207 fi
3208 AS="$ac_cv_prog_AS"
3209 if test -n "$AS"; then
3210   echo "$ac_t""$AS" 1>&6
3211 else
3212   echo "$ac_t""no" 1>&6
3213 fi
3214
3215 else
3216   AS="false"
3217 fi
3218 fi
3219
3220   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3221 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3222 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3223 echo "configure:3224: checking for $ac_word" >&5
3224 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   if test -n "$OBJDUMP"; then
3228   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3229 else
3230   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3231   ac_dummy="$PATH"
3232   for ac_dir in $ac_dummy; do
3233     test -z "$ac_dir" && ac_dir=.
3234     if test -f $ac_dir/$ac_word; then
3235       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3236       break
3237     fi
3238   done
3239   IFS="$ac_save_ifs"
3240 fi
3241 fi
3242 OBJDUMP="$ac_cv_prog_OBJDUMP"
3243 if test -n "$OBJDUMP"; then
3244   echo "$ac_t""$OBJDUMP" 1>&6
3245 else
3246   echo "$ac_t""no" 1>&6
3247 fi
3248
3249
3250 if test -z "$ac_cv_prog_OBJDUMP"; then
3251 if test -n "$ac_tool_prefix"; then
3252   # Extract the first word of "objdump", so it can be a program name with args.
3253 set dummy objdump; ac_word=$2
3254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3255 echo "configure:3256: checking for $ac_word" >&5
3256 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   if test -n "$OBJDUMP"; then
3260   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3261 else
3262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3263   ac_dummy="$PATH"
3264   for ac_dir in $ac_dummy; do
3265     test -z "$ac_dir" && ac_dir=.
3266     if test -f $ac_dir/$ac_word; then
3267       ac_cv_prog_OBJDUMP="objdump"
3268       break
3269     fi
3270   done
3271   IFS="$ac_save_ifs"
3272   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3273 fi
3274 fi
3275 OBJDUMP="$ac_cv_prog_OBJDUMP"
3276 if test -n "$OBJDUMP"; then
3277   echo "$ac_t""$OBJDUMP" 1>&6
3278 else
3279   echo "$ac_t""no" 1>&6
3280 fi
3281
3282 else
3283   OBJDUMP="false"
3284 fi
3285 fi
3286
3287   ;;
3288
3289 esac
3290
3291
3292 # Save cache, so that ltconfig can load it
3293
3294
3295 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3296 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3297 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3298 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3299 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3300 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3301 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3302 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3303
3304 # Reload cache, that may have been modified by ltconfig
3305
3306
3307 # This can be used to rebuild libtool when needed
3308 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3309
3310 # Always use our own libtool.
3311 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3312
3313 # Redirect the config.log output again, so that the ltconfig log is not
3314 # clobbered by the next message.
3315 exec 5>>./config.log
3316
3317
3318 for ac_prog in mawk gawk nawk awk
3319 do
3320 # Extract the first word of "$ac_prog", so it can be a program name with args.
3321 set dummy $ac_prog; ac_word=$2
3322 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3323 echo "configure:3324: checking for $ac_word" >&5
3324 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   if test -n "$AWK"; then
3328   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3329 else
3330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3331   ac_dummy="$PATH"
3332   for ac_dir in $ac_dummy; do
3333     test -z "$ac_dir" && ac_dir=.
3334     if test -f $ac_dir/$ac_word; then
3335       ac_cv_prog_AWK="$ac_prog"
3336       break
3337     fi
3338   done
3339   IFS="$ac_save_ifs"
3340 fi
3341 fi
3342 AWK="$ac_cv_prog_AWK"
3343 if test -n "$AWK"; then
3344   echo "$ac_t""$AWK" 1>&6
3345 else
3346   echo "$ac_t""no" 1>&6
3347 fi
3348
3349 test -n "$AWK" && break
3350 done
3351
3352 # test for ln hardlink support
3353 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3354 echo "configure:3355: checking whether ln works" >&5
3355 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358   rm -f conftest.src conftest.dst
3359 echo "conftest" > conftest.src
3360 if ln conftest.src conftest.dst 2>/dev/null
3361 then
3362   ol_cv_prog_LN_H="ln"
3363 else
3364   ol_cv_prog_LN_H="cp"
3365 fi
3366 rm -f conftest.src conftest.dst
3367
3368 fi
3369 LN_H="$ol_cv_prog_LN_H"
3370 if test "$ol_cv_prog_LN_H" = "ln"; then
3371         echo "$ac_t""yes" 1>&6
3372 else
3373         echo "$ac_t""no" 1>&6
3374 fi
3375
3376 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3377 echo "configure:3378: checking whether ln -s works" >&5
3378 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3379   echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381   rm -f conftestdata
3382 if ln -s X conftestdata 2>/dev/null
3383 then
3384   rm -f conftestdata
3385   ac_cv_prog_LN_S="ln -s"
3386 else
3387   ac_cv_prog_LN_S=ln
3388 fi
3389 fi
3390 LN_S="$ac_cv_prog_LN_S"
3391 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3392   echo "$ac_t""yes" 1>&6
3393 else
3394   echo "$ac_t""no" 1>&6
3395 fi
3396
3397
3398 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3399         LN_S="$LN_H"
3400 fi
3401
3402 # Extract the first word of "sendmail", so it can be a program name with args.
3403 set dummy sendmail; ac_word=$2
3404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3405 echo "configure:3406: checking for $ac_word" >&5
3406 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   case "$SENDMAIL" in
3410   /*)
3411   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3412   ;;
3413   ?:/*)
3414   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3415   ;;
3416   *)
3417   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3418   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3419   for ac_dir in $ac_dummy; do 
3420     test -z "$ac_dir" && ac_dir=.
3421     if test -f $ac_dir/$ac_word; then
3422       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3423       break
3424     fi
3425   done
3426   IFS="$ac_save_ifs"
3427   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3428   ;;
3429 esac
3430 fi
3431 SENDMAIL="$ac_cv_path_SENDMAIL"
3432 if test -n "$SENDMAIL"; then
3433   echo "$ac_t""$SENDMAIL" 1>&6
3434 else
3435   echo "$ac_t""no" 1>&6
3436 fi
3437
3438 # Extract the first word of "vi", so it can be a program name with args.
3439 set dummy vi; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   case "$EDITOR" in
3446   /*)
3447   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3448   ;;
3449   ?:/*)
3450   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3451   ;;
3452   *)
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH:/usr/ucb"
3455   for ac_dir in $ac_dummy; do 
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3464   ;;
3465 esac
3466 fi
3467 EDITOR="$ac_cv_path_EDITOR"
3468 if test -n "$EDITOR"; then
3469   echo "$ac_t""$EDITOR" 1>&6
3470 else
3471   echo "$ac_t""no" 1>&6
3472 fi
3473
3474 # Extract the first word of "finger", so it can be a program name with args.
3475 set dummy finger; ac_word=$2
3476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3477 echo "configure:3478: checking for $ac_word" >&5
3478 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   case "$FINGER" in
3482   /*)
3483   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3484   ;;
3485   ?:/*)
3486   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3487   ;;
3488   *)
3489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3490   ac_dummy="$PATH:/usr/ucb"
3491   for ac_dir in $ac_dummy; do 
3492     test -z "$ac_dir" && ac_dir=.
3493     if test -f $ac_dir/$ac_word; then
3494       ac_cv_path_FINGER="$ac_dir/$ac_word"
3495       break
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3500   ;;
3501 esac
3502 fi
3503 FINGER="$ac_cv_path_FINGER"
3504 if test -n "$FINGER"; then
3505   echo "$ac_t""$FINGER" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509
3510
3511 ol_link_perl=no
3512 if test $ol_enable_perl != no ; then
3513         # Extract the first word of "perl", so it can be a program name with args.
3514 set dummy perl; ac_word=$2
3515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3516 echo "configure:3517: checking for $ac_word" >&5
3517 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   case "$PERLBIN" in
3521   /*)
3522   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3523   ;;
3524   ?:/*)
3525   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3526   ;;
3527   *)
3528   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3529   ac_dummy="$PATH"
3530   for ac_dir in $ac_dummy; do 
3531     test -z "$ac_dir" && ac_dir=.
3532     if test -f $ac_dir/$ac_word; then
3533       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3534       break
3535     fi
3536   done
3537   IFS="$ac_save_ifs"
3538   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3539   ;;
3540 esac
3541 fi
3542 PERLBIN="$ac_cv_path_PERLBIN"
3543 if test -n "$PERLBIN"; then
3544   echo "$ac_t""$PERLBIN" 1>&6
3545 else
3546   echo "$ac_t""no" 1>&6
3547 fi
3548
3549
3550         if test "no$PERLBIN" = "no" ; then
3551                 if test $ol_enable_perl = yes ; then
3552                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3553                 fi
3554
3555         else
3556                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3557                 if test x"$ol_with_perl_module" = "xstatic" ; then
3558                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3559                 else
3560                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3561                 fi
3562                                 ol_link_perl=yes
3563         fi
3564 fi
3565
3566 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3567 echo "configure:3568: checking how to run the C preprocessor" >&5
3568 # On Suns, sometimes $CPP names a directory.
3569 if test -n "$CPP" && test -d "$CPP"; then
3570   CPP=
3571 fi
3572 if test -z "$CPP"; then
3573 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576     # This must be in double quotes, not single quotes, because CPP may get
3577   # substituted into the Makefile and "${CC-cc}" will confuse make.
3578   CPP="${CC-cc} -E"
3579   # On the NeXT, cc -E runs the code through the compiler's parser,
3580   # not just through cpp.
3581   cat > conftest.$ac_ext <<EOF
3582 #line 3583 "configure"
3583 #include "confdefs.h"
3584 #include <assert.h>
3585 Syntax Error
3586 EOF
3587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3588 { (eval echo configure:3589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3590 if test -z "$ac_err"; then
3591   :
3592 else
3593   echo "$ac_err" >&5
3594   echo "configure: failed program was:" >&5
3595   cat conftest.$ac_ext >&5
3596   rm -rf conftest*
3597   CPP="${CC-cc} -E -traditional-cpp"
3598   cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #include <assert.h>
3602 Syntax Error
3603 EOF
3604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3605 { (eval echo configure:3606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3607 if test -z "$ac_err"; then
3608   :
3609 else
3610   echo "$ac_err" >&5
3611   echo "configure: failed program was:" >&5
3612   cat conftest.$ac_ext >&5
3613   rm -rf conftest*
3614   CPP="${CC-cc} -nologo -E"
3615   cat > conftest.$ac_ext <<EOF
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618 #include <assert.h>
3619 Syntax Error
3620 EOF
3621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3622 { (eval echo configure:3623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3624 if test -z "$ac_err"; then
3625   :
3626 else
3627   echo "$ac_err" >&5
3628   echo "configure: failed program was:" >&5
3629   cat conftest.$ac_ext >&5
3630   rm -rf conftest*
3631   CPP=/lib/cpp
3632 fi
3633 rm -f conftest*
3634 fi
3635 rm -f conftest*
3636 fi
3637 rm -f conftest*
3638   ac_cv_prog_CPP="$CPP"
3639 fi
3640   CPP="$ac_cv_prog_CPP"
3641 else
3642   ac_cv_prog_CPP="$CPP"
3643 fi
3644 echo "$ac_t""$CPP" 1>&6
3645
3646
3647 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3648         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3649
3650 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3651         echo "configure: warning: programs compiled here do run here..." 1>&2
3652         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3653
3654 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3655         echo "configure: warning: programs compiled here do not run here..." 1>&2
3656         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3657 fi
3658
3659 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3660 echo "configure:3661: checking for AIX" >&5
3661 cat > conftest.$ac_ext <<EOF
3662 #line 3663 "configure"
3663 #include "confdefs.h"
3664 #ifdef _AIX
3665   yes
3666 #endif
3667
3668 EOF
3669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3670   egrep "yes" >/dev/null 2>&1; then
3671   rm -rf conftest*
3672   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3673 #define _ALL_SOURCE 1
3674 EOF
3675
3676 else
3677   rm -rf conftest*
3678   echo "$ac_t""no" 1>&6
3679 fi
3680 rm -f conftest*
3681
3682
3683 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3684 echo "configure:3685: checking for POSIXized ISC" >&5
3685 if test -d /etc/conf/kconfig.d &&
3686   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3687 then
3688   echo "$ac_t""yes" 1>&6
3689   ISC=yes # If later tests want to check for ISC.
3690   cat >> confdefs.h <<\EOF
3691 #define _POSIX_SOURCE 1
3692 EOF
3693
3694   if test "$GCC" = yes; then
3695     CC="$CC -posix"
3696   else
3697     CC="$CC -Xp"
3698   fi
3699 else
3700   echo "$ac_t""no" 1>&6
3701   ISC=
3702 fi
3703
3704 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3705 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3706 echo "configure:3707: checking for minix/config.h" >&5
3707 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3708   echo $ac_n "(cached) $ac_c" 1>&6
3709 else
3710   cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3713 #include <minix/config.h>
3714 EOF
3715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3716 { (eval echo configure:3717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3718 if test -z "$ac_err"; then
3719   rm -rf conftest*
3720   eval "ac_cv_header_$ac_safe=yes"
3721 else
3722   echo "$ac_err" >&5
3723   echo "configure: failed program was:" >&5
3724   cat conftest.$ac_ext >&5
3725   rm -rf conftest*
3726   eval "ac_cv_header_$ac_safe=no"
3727 fi
3728 rm -f conftest*
3729 fi
3730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3731   echo "$ac_t""yes" 1>&6
3732   MINIX=yes
3733 else
3734   echo "$ac_t""no" 1>&6
3735 MINIX=
3736 fi
3737
3738 if test "$MINIX" = yes; then
3739   cat >> confdefs.h <<\EOF
3740 #define _POSIX_SOURCE 1
3741 EOF
3742
3743   cat >> confdefs.h <<\EOF
3744 #define _POSIX_1_SOURCE 2
3745 EOF
3746
3747   cat >> confdefs.h <<\EOF
3748 #define _MINIX 1
3749 EOF
3750
3751 fi
3752
3753
3754 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3755 echo "configure:3756: checking for Cygwin environment" >&5
3756 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3757   echo $ac_n "(cached) $ac_c" 1>&6
3758 else
3759   cat > conftest.$ac_ext <<EOF
3760 #line 3761 "configure"
3761 #include "confdefs.h"
3762
3763 int main() {
3764
3765 #ifndef __CYGWIN__
3766 #define __CYGWIN__ __CYGWIN32__
3767 #endif
3768 return __CYGWIN__;
3769 ; return 0; }
3770 EOF
3771 if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3772   rm -rf conftest*
3773   ac_cv_cygwin=yes
3774 else
3775   echo "configure: failed program was:" >&5
3776   cat conftest.$ac_ext >&5
3777   rm -rf conftest*
3778   ac_cv_cygwin=no
3779 fi
3780 rm -f conftest*
3781 fi
3782
3783 echo "$ac_t""$ac_cv_cygwin" 1>&6
3784 CYGWIN=
3785 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3786 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3787 echo "configure:3788: checking for mingw32 environment" >&5
3788 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   cat > conftest.$ac_ext <<EOF
3792 #line 3793 "configure"
3793 #include "confdefs.h"
3794
3795 int main() {
3796 return __MINGW32__;
3797 ; return 0; }
3798 EOF
3799 if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3800   rm -rf conftest*
3801   ac_cv_mingw32=yes
3802 else
3803   echo "configure: failed program was:" >&5
3804   cat conftest.$ac_ext >&5
3805   rm -rf conftest*
3806   ac_cv_mingw32=no
3807 fi
3808 rm -f conftest*
3809 fi
3810
3811 echo "$ac_t""$ac_cv_mingw32" 1>&6
3812 MINGW32=
3813 test "$ac_cv_mingw32" = yes && MINGW32=yes
3814 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3815 echo "configure:3816: checking for EMX OS/2 environment" >&5
3816 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822
3823 int main() {
3824 return __EMX__;
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3828   rm -rf conftest*
3829   ac_cv_emxos2=yes
3830 else
3831   echo "configure: failed program was:" >&5
3832   cat conftest.$ac_ext >&5
3833   rm -rf conftest*
3834   ac_cv_emxos2=no
3835 fi
3836 rm -f conftest*
3837 fi
3838
3839 echo "$ac_t""$ac_cv_emxos2" 1>&6
3840 EMXOS2=
3841 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3842
3843
3844
3845 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3846 echo "configure:3847: checking for executable suffix" >&5
3847 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3848   echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3851   ac_cv_exeext=.exe
3852 else
3853   rm -f conftest*
3854   echo 'int main () { return 0; }' > conftest.$ac_ext
3855   ac_cv_exeext=
3856   if { (eval echo configure:3857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3857     for file in conftest.*; do
3858       case $file in
3859       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3860       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3861       esac
3862     done
3863   else
3864     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3865   fi
3866   rm -f conftest*
3867   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3868 fi
3869 fi
3870
3871 EXEEXT=""
3872 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3873 echo "$ac_t""${ac_cv_exeext}" 1>&6
3874 ac_exeext=$EXEEXT
3875
3876 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3877 echo "configure:3878: checking for object suffix" >&5
3878 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   rm -f conftest*
3882 echo 'int i = 1;' > conftest.$ac_ext
3883 if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3884   for ac_file in conftest.*; do
3885     case $ac_file in
3886     *.c) ;;
3887     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3888     esac
3889   done
3890 else
3891   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3892 fi
3893 rm -f conftest*
3894 fi
3895
3896 echo "$ac_t""$ac_cv_objext" 1>&6
3897 OBJEXT=$ac_cv_objext
3898 ac_objext=$ac_cv_objext
3899
3900
3901 cat >> confdefs.h <<EOF
3902 #define EXEEXT "${EXEEXT}"
3903 EOF
3904
3905
3906 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3907 echo "configure:3908: checking for be_app in -lbe" >&5
3908 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   ac_save_LIBS="$LIBS"
3913 LIBS="-lbe -lroot -lnet $LIBS"
3914 cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 /* Override any gcc2 internal prototype to avoid an error.  */
3918 /* We use char because int might match the return type of a gcc2
3919     builtin and then its argument prototype would still apply.  */
3920 char be_app();
3921
3922 int main() {
3923 be_app()
3924 ; return 0; }
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3927   rm -rf conftest*
3928   eval "ac_cv_lib_$ac_lib_var=yes"
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   eval "ac_cv_lib_$ac_lib_var=no"
3934 fi
3935 rm -f conftest*
3936 LIBS="$ac_save_LIBS"
3937
3938 fi
3939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3940   echo "$ac_t""yes" 1>&6
3941   LIBS="$LIBS -lbe -lroot -lnet"
3942 else
3943   echo "$ac_t""no" 1>&6
3944 :
3945 fi
3946
3947
3948
3949
3950
3951 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3952 echo "configure:3953: checking for ${CC-cc} option to accept ANSI C" >&5
3953 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   am_cv_prog_cc_stdc=no
3957 ac_save_CC="$CC"
3958 # Don't try gcc -ansi; that turns off useful extensions and
3959 # breaks some systems' header files.
3960 # AIX                   -qlanglvl=ansi
3961 # Ultrix and OSF/1      -std1
3962 # HP-UX 10.20 and later -Ae
3963 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3964 # SVR4                  -Xc -D__EXTENSIONS__
3965 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3966 do
3967   CC="$ac_save_CC $ac_arg"
3968   cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 #include <stdarg.h>
3972 #include <stdio.h>
3973 #include <sys/types.h>
3974 #include <sys/stat.h>
3975 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3976 struct buf { int x; };
3977 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3978 static char *e (p, i)
3979      char **p;
3980      int i;
3981 {
3982   return p[i];
3983 }
3984 static char *f (char * (*g) (char **, int), char **p, ...)
3985 {
3986   char *s;
3987   va_list v;
3988   va_start (v,p);
3989   s = g (p, va_arg (v,int));
3990   va_end (v);
3991   return s;
3992 }
3993 int test (int i, double x);
3994 struct s1 {int (*f) (int a);};
3995 struct s2 {int (*f) (double a);};
3996 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3997 int argc;
3998 char **argv;
3999
4000 int main() {
4001
4002 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4003
4004 ; return 0; }
4005 EOF
4006 if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4007   rm -rf conftest*
4008   am_cv_prog_cc_stdc="$ac_arg"; break
4009 else
4010   echo "configure: failed program was:" >&5
4011   cat conftest.$ac_ext >&5
4012 fi
4013 rm -f conftest*
4014 done
4015 CC="$ac_save_CC"
4016
4017 fi
4018
4019 if test -z "$am_cv_prog_cc_stdc"; then
4020   echo "$ac_t""none needed" 1>&6
4021 else
4022   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4023 fi
4024 case "x$am_cv_prog_cc_stdc" in
4025   x|xno) ;;
4026   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4027 esac
4028
4029 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4030         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4031 fi
4032
4033 # test for make depend flag
4034 OL_MKDEP=
4035 OL_MKDEP_FLAGS=
4036 if test -z "${MKDEP}"; then
4037         OL_MKDEP="${CC-cc}"
4038         if test -z "${MKDEP_FLAGS}"; then
4039                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4040 echo "configure:4041: checking for ${OL_MKDEP} depend flag" >&5
4041 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4042   echo $ac_n "(cached) $ac_c" 1>&6
4043 else
4044   
4045                         ol_cv_mkdep=no
4046                         for flag in "-M" "-xM"; do
4047                                 cat > conftest.c <<EOF
4048  noCode;
4049 EOF
4050                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4051                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4052                                 then
4053                                         if test ! -f conftest."${ac_object}" ; then
4054                                                 ol_cv_mkdep=$flag
4055                                                 OL_MKDEP_FLAGS="$flag"
4056                                                 break
4057                                         fi
4058                                 fi
4059                         done
4060                         rm -f conftest*
4061                 
4062 fi
4063
4064 echo "$ac_t""$ol_cv_mkdep" 1>&6
4065         else
4066                 cc_cv_mkdep=yes
4067                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4068         fi
4069 else
4070         cc_cv_mkdep=yes
4071         OL_MKDEP="${MKDEP}"
4072         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4073 fi
4074
4075
4076
4077 if test "${ol_cv_mkdep}" = no ; then
4078         # this will soon become an error
4079         echo "configure: warning: do not know how to generate dependencies" 1>&2
4080 fi
4081
4082 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4083 echo "configure:4084: checking for afopen in -ls" >&5
4084 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   ac_save_LIBS="$LIBS"
4089 LIBS="-ls  $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char afopen();
4097
4098 int main() {
4099 afopen()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117   
4118         AUTH_LIBS=-ls
4119         cat >> confdefs.h <<\EOF
4120 #define HAVE_AIX_SECURITY 1
4121 EOF
4122
4123
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128
4129 ol_link_modules=no
4130 if test $ol_enable_modules != no ; then
4131         for ac_hdr in ltdl.h
4132 do
4133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4135 echo "configure:4136: checking for $ac_hdr" >&5
4136 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <$ac_hdr>
4143 EOF
4144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4145 { (eval echo configure:4146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4147 if test -z "$ac_err"; then
4148   rm -rf conftest*
4149   eval "ac_cv_header_$ac_safe=yes"
4150 else
4151   echo "$ac_err" >&5
4152   echo "configure: failed program was:" >&5
4153   cat conftest.$ac_ext >&5
4154   rm -rf conftest*
4155   eval "ac_cv_header_$ac_safe=no"
4156 fi
4157 rm -f conftest*
4158 fi
4159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4160   echo "$ac_t""yes" 1>&6
4161     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4162   cat >> confdefs.h <<EOF
4163 #define $ac_tr_hdr 1
4164 EOF
4165  
4166 else
4167   echo "$ac_t""no" 1>&6
4168 fi
4169 done
4170
4171
4172         if test $ac_cv_header_ltdl_h = no ; then
4173                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4174         fi
4175
4176         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4177 echo "configure:4178: checking for lt_dlinit in -lltdl" >&5
4178 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4180   echo $ac_n "(cached) $ac_c" 1>&6
4181 else
4182   ac_save_LIBS="$LIBS"
4183 LIBS="-lltdl  $LIBS"
4184 cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187 /* Override any gcc2 internal prototype to avoid an error.  */
4188 /* We use char because int might match the return type of a gcc2
4189     builtin and then its argument prototype would still apply.  */
4190 char lt_dlinit();
4191
4192 int main() {
4193 lt_dlinit()
4194 ; return 0; }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4197   rm -rf conftest*
4198   eval "ac_cv_lib_$ac_lib_var=yes"
4199 else
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -rf conftest*
4203   eval "ac_cv_lib_$ac_lib_var=no"
4204 fi
4205 rm -f conftest*
4206 LIBS="$ac_save_LIBS"
4207
4208 fi
4209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4210   echo "$ac_t""yes" 1>&6
4211   
4212             MODULES_LIBS=-lltdl
4213             cat >> confdefs.h <<\EOF
4214 #define HAVE_LIBLTDL 1
4215 EOF
4216
4217         
4218 else
4219   echo "$ac_t""no" 1>&6
4220 fi
4221
4222
4223         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4224                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4225         fi
4226         ol_link_modules=yes
4227 else
4228         ol_with_dnssrv_module=static
4229         ol_with_ldap_module=static
4230         ol_with_ldbm_module=static
4231         ol_with_passwd_module=static
4232         ol_with_perl_module=static
4233         ol_with_shell_module=static
4234         ol_with_tcl_module=static
4235         ol_with_sql_module=static
4236 fi
4237
4238 # test for EBCDIC
4239 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4240 echo "configure:4241: checking for EBCDIC" >&5
4241 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4242   echo $ac_n "(cached) $ac_c" 1>&6
4243 else
4244   
4245         cat > conftest.$ac_ext <<EOF
4246 #line 4247 "configure"
4247 #include "confdefs.h"
4248
4249 #if !('M' == 0xd4)
4250 #include <__ASCII__/generate_error.h>
4251 #endif
4252
4253 EOF
4254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4255 { (eval echo configure:4256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4257 if test -z "$ac_err"; then
4258   rm -rf conftest*
4259   ol_cv_cpp_ebcdic=yes
4260 else
4261   echo "$ac_err" >&5
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -rf conftest*
4265   ol_cv_cpp_ebcdic=no
4266 fi
4267 rm -f conftest*
4268 fi
4269
4270 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4271 if test $ol_cv_cpp_ebcdic = yes ; then
4272         cat >> confdefs.h <<\EOF
4273 #define HAVE_EBCDIC 1
4274 EOF
4275
4276 fi
4277
4278 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4279 echo "configure:4280: checking for ANSI C header files" >&5
4280 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4281   echo $ac_n "(cached) $ac_c" 1>&6
4282 else
4283   cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4286 #include <stdlib.h>
4287 #include <stdarg.h>
4288 #include <string.h>
4289 #include <float.h>
4290 EOF
4291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4292 { (eval echo configure:4293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4294 if test -z "$ac_err"; then
4295   rm -rf conftest*
4296   ol_cv_header_stdc=yes
4297 else
4298   echo "$ac_err" >&5
4299   echo "configure: failed program was:" >&5
4300   cat conftest.$ac_ext >&5
4301   rm -rf conftest*
4302   ol_cv_header_stdc=no
4303 fi
4304 rm -f conftest*
4305
4306 if test $ol_cv_header_stdc = yes; then
4307   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <string.h>
4312 EOF
4313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4314   egrep "memchr" >/dev/null 2>&1; then
4315   :
4316 else
4317   rm -rf conftest*
4318   ol_cv_header_stdc=no
4319 fi
4320 rm -f conftest*
4321
4322 fi
4323
4324 if test $ol_cv_header_stdc = yes; then
4325   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4326 cat > conftest.$ac_ext <<EOF
4327 #line 4328 "configure"
4328 #include "confdefs.h"
4329 #include <stdlib.h>
4330 EOF
4331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4332   egrep "free" >/dev/null 2>&1; then
4333   :
4334 else
4335   rm -rf conftest*
4336   ol_cv_header_stdc=no
4337 fi
4338 rm -f conftest*
4339
4340 fi
4341
4342 if test $ol_cv_header_stdc = yes; then
4343   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4344 if test "$cross_compiling" = yes; then
4345   :
4346 else
4347   cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350 #include <ctype.h>
4351 #ifndef HAVE_EBCDIC
4352 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4353 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4354 #else
4355 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4356                 || ('j' <= (c) && (c) <= 'r') \
4357                 || ('s' <= (c) && (c) <= 'z'))
4358 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4359 #endif
4360 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4361 int main () { int i; for (i = 0; i < 256; i++)
4362 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4363 exit (0); }
4364
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4367 then
4368   :
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -fr conftest*
4373   ol_cv_header_stdc=no
4374 fi
4375 rm -fr conftest*
4376 fi
4377
4378 fi
4379 fi
4380
4381 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4382 if test $ol_cv_header_stdc = yes; then
4383   cat >> confdefs.h <<\EOF
4384 #define STDC_HEADERS 1
4385 EOF
4386
4387 fi
4388 ac_cv_header_stdc=disable
4389
4390
4391 if test $ol_cv_header_stdc != yes; then
4392         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4393 fi
4394
4395 ac_header_dirent=no
4396 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4397 do
4398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4399 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4400 echo "configure:4401: checking for $ac_hdr that defines DIR" >&5
4401 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 #include <sys/types.h>
4408 #include <$ac_hdr>
4409 int main() {
4410 DIR *dirp = 0;
4411 ; return 0; }
4412 EOF
4413 if { (eval echo configure:4414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4414   rm -rf conftest*
4415   eval "ac_cv_header_dirent_$ac_safe=yes"
4416 else
4417   echo "configure: failed program was:" >&5
4418   cat conftest.$ac_ext >&5
4419   rm -rf conftest*
4420   eval "ac_cv_header_dirent_$ac_safe=no"
4421 fi
4422 rm -f conftest*
4423 fi
4424 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4425   echo "$ac_t""yes" 1>&6
4426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4427   cat >> confdefs.h <<EOF
4428 #define $ac_tr_hdr 1
4429 EOF
4430  ac_header_dirent=$ac_hdr; break
4431 else
4432   echo "$ac_t""no" 1>&6
4433 fi
4434 done
4435 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4436 if test $ac_header_dirent = dirent.h; then
4437 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4438 echo "configure:4439: checking for opendir in -ldir" >&5
4439 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4440 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4441   echo $ac_n "(cached) $ac_c" 1>&6
4442 else
4443   ac_save_LIBS="$LIBS"
4444 LIBS="-ldir  $LIBS"
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 /* Override any gcc2 internal prototype to avoid an error.  */
4449 /* We use char because int might match the return type of a gcc2
4450     builtin and then its argument prototype would still apply.  */
4451 char opendir();
4452
4453 int main() {
4454 opendir()
4455 ; return 0; }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4458   rm -rf conftest*
4459   eval "ac_cv_lib_$ac_lib_var=yes"
4460 else
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   eval "ac_cv_lib_$ac_lib_var=no"
4465 fi
4466 rm -f conftest*
4467 LIBS="$ac_save_LIBS"
4468
4469 fi
4470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4471   echo "$ac_t""yes" 1>&6
4472   LIBS="$LIBS -ldir"
4473 else
4474   echo "$ac_t""no" 1>&6
4475 fi
4476
4477 else
4478 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4479 echo "configure:4480: checking for opendir in -lx" >&5
4480 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4481 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   ac_save_LIBS="$LIBS"
4485 LIBS="-lx  $LIBS"
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 /* Override any gcc2 internal prototype to avoid an error.  */
4490 /* We use char because int might match the return type of a gcc2
4491     builtin and then its argument prototype would still apply.  */
4492 char opendir();
4493
4494 int main() {
4495 opendir()
4496 ; return 0; }
4497 EOF
4498 if { (eval echo configure:4499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4499   rm -rf conftest*
4500   eval "ac_cv_lib_$ac_lib_var=yes"
4501 else
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_lib_$ac_lib_var=no"
4506 fi
4507 rm -f conftest*
4508 LIBS="$ac_save_LIBS"
4509
4510 fi
4511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4512   echo "$ac_t""yes" 1>&6
4513   LIBS="$LIBS -lx"
4514 else
4515   echo "$ac_t""no" 1>&6
4516 fi
4517
4518 fi
4519
4520 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4521 echo "configure:4522: checking for sys/wait.h that is POSIX.1 compatible" >&5
4522 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4523   echo $ac_n "(cached) $ac_c" 1>&6
4524 else
4525   cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 #include <sys/types.h>
4529 #include <sys/wait.h>
4530 #ifndef WEXITSTATUS
4531 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4532 #endif
4533 #ifndef WIFEXITED
4534 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4535 #endif
4536 int main() {
4537 int s;
4538 wait (&s);
4539 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4540 ; return 0; }
4541 EOF
4542 if { (eval echo configure:4543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4543   rm -rf conftest*
4544   ac_cv_header_sys_wait_h=yes
4545 else
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548   rm -rf conftest*
4549   ac_cv_header_sys_wait_h=no
4550 fi
4551 rm -f conftest*
4552 fi
4553
4554 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4555 if test $ac_cv_header_sys_wait_h = yes; then
4556   cat >> confdefs.h <<\EOF
4557 #define HAVE_SYS_WAIT_H 1
4558 EOF
4559
4560 fi
4561
4562 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4563 echo "configure:4564: checking POSIX termios" >&5
4564 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4565   echo $ac_n "(cached) $ac_c" 1>&6
4566 else
4567   cat > conftest.$ac_ext <<EOF
4568 #line 4569 "configure"
4569 #include "confdefs.h"
4570 #include <sys/types.h>
4571 #include <unistd.h>
4572 #include <termios.h>
4573 int main() {
4574 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4575    tcgetattr(0, 0);
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   am_cv_sys_posix_termios=yes
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -rf conftest*
4585   am_cv_sys_posix_termios=no
4586 fi
4587 rm -f conftest*
4588 fi
4589
4590 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4591
4592
4593  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4594 echo "configure:4595: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4595 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4596   echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4599
4600   gwinsz_in_termios_h=no
4601   if test $am_cv_sys_posix_termios = yes; then
4602     cat > conftest.$ac_ext <<EOF
4603 #line 4604 "configure"
4604 #include "confdefs.h"
4605 #include <sys/types.h>
4606 #     include <termios.h>
4607 #     ifdef TIOCGWINSZ
4608         yes
4609 #     endif
4610     
4611 EOF
4612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4613   egrep "yes" >/dev/null 2>&1; then
4614   rm -rf conftest*
4615   gwinsz_in_termios_h=yes
4616 fi
4617 rm -f conftest*
4618
4619   fi
4620
4621   if test $gwinsz_in_termios_h = no; then
4622     cat > conftest.$ac_ext <<EOF
4623 #line 4624 "configure"
4624 #include "confdefs.h"
4625 #include <sys/types.h>
4626 #     include <sys/ioctl.h>
4627 #     ifdef TIOCGWINSZ
4628         yes
4629 #     endif
4630     
4631 EOF
4632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4633   egrep "yes" >/dev/null 2>&1; then
4634   rm -rf conftest*
4635   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4636 fi
4637 rm -f conftest*
4638
4639   fi
4640   
4641 fi
4642
4643 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4644   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4645     cat >> confdefs.h <<\EOF
4646 #define GWINSZ_IN_SYS_IOCTL 1
4647 EOF
4648
4649   fi
4650
4651 if test $am_cv_sys_posix_termios = yes ; then
4652         cat >> confdefs.h <<\EOF
4653 #define HAVE_POSIX_TERMIOS 1
4654 EOF
4655
4656 fi
4657
4658 for ac_hdr in \
4659         arpa/inet.h             \
4660         arpa/nameser.h  \
4661         assert.h                \
4662         conio.h                 \
4663         crypt.h                 \
4664         direct.h                \
4665         errno.h                 \
4666         fcntl.h                 \
4667         filio.h                 \
4668         getopt.h                \
4669         grp.h                   \
4670         io.h                    \
4671         libutil.h               \
4672         limits.h                \
4673         locale.h                \
4674         netinet/tcp.h   \
4675         malloc.h                \
4676         memory.h                \
4677         psap.h                  \
4678         pwd.h                   \
4679         process.h               \
4680         resolv.h                \
4681         sgtty.h                 \
4682         shadow.h                \
4683         stddef.h                \
4684         string.h                \
4685         strings.h               \
4686         sysexits.h              \
4687         sys/file.h              \
4688         sys/filio.h             \
4689         sys/errno.h             \
4690         sys/ioctl.h             \
4691         sys/param.h             \
4692         sys/resource.h  \
4693         sys/select.h    \
4694         sys/socket.h    \
4695         sys/syslog.h    \
4696         sys/time.h              \
4697         sys/types.h             \
4698         syslog.h                \
4699         termios.h               \
4700         unistd.h                \
4701         winsock.h               \
4702
4703 do
4704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4706 echo "configure:4707: checking for $ac_hdr" >&5
4707 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4708   echo $ac_n "(cached) $ac_c" 1>&6
4709 else
4710   cat > conftest.$ac_ext <<EOF
4711 #line 4712 "configure"
4712 #include "confdefs.h"
4713 #include <$ac_hdr>
4714 EOF
4715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4716 { (eval echo configure:4717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4718 if test -z "$ac_err"; then
4719   rm -rf conftest*
4720   eval "ac_cv_header_$ac_safe=yes"
4721 else
4722   echo "$ac_err" >&5
4723   echo "configure: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   rm -rf conftest*
4726   eval "ac_cv_header_$ac_safe=no"
4727 fi
4728 rm -f conftest*
4729 fi
4730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4731   echo "$ac_t""yes" 1>&6
4732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4733   cat >> confdefs.h <<EOF
4734 #define $ac_tr_hdr 1
4735 EOF
4736  
4737 else
4738   echo "$ac_t""no" 1>&6
4739 fi
4740 done
4741
4742
4743
4744
4745 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4746 echo "configure:4747: checking for sigset in -lV3" >&5
4747 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4748 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4749   echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751   ac_save_LIBS="$LIBS"
4752 LIBS="-lV3  $LIBS"
4753 cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756 /* Override any gcc2 internal prototype to avoid an error.  */
4757 /* We use char because int might match the return type of a gcc2
4758     builtin and then its argument prototype would still apply.  */
4759 char sigset();
4760
4761 int main() {
4762 sigset()
4763 ; return 0; }
4764 EOF
4765 if { (eval echo configure:4766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4766   rm -rf conftest*
4767   eval "ac_cv_lib_$ac_lib_var=yes"
4768 else
4769   echo "configure: failed program was:" >&5
4770   cat conftest.$ac_ext >&5
4771   rm -rf conftest*
4772   eval "ac_cv_lib_$ac_lib_var=no"
4773 fi
4774 rm -f conftest*
4775 LIBS="$ac_save_LIBS"
4776
4777 fi
4778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4779   echo "$ac_t""yes" 1>&6
4780     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4781     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4782   cat >> confdefs.h <<EOF
4783 #define $ac_tr_lib 1
4784 EOF
4785
4786   LIBS="-lV3 $LIBS"
4787
4788 else
4789   echo "$ac_t""no" 1>&6
4790 fi
4791
4792
4793 if test $ac_cv_header_winsock_h = yes; then
4794         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4795 echo "configure:4796: checking for winsock" >&5
4796 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4797   echo $ac_n "(cached) $ac_c" 1>&6
4798 else
4799   cat > conftest.$ac_ext <<EOF
4800 #line 4801 "configure"
4801 #include "confdefs.h"
4802 #include <winsock.h>
4803 int main() {
4804
4805                         socket(0,0,0);
4806                         select(0,NULL,NULL,NULL,NULL);
4807                         closesocket(0);
4808                         gethostname(NULL,0);
4809         
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4813   rm -rf conftest*
4814   ol_cv_winsock=yes
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   ol_cv_winsock=no
4820 fi
4821 rm -f conftest*]
4822 fi
4823
4824 echo "$ac_t""$ol_cv_winsock" 1>&6
4825
4826         if test $ol_cv_winsock = yes ; then
4827                 cat >> confdefs.h <<\EOF
4828 #define HAVE_WINSOCK 1
4829 EOF
4830
4831                 ac_cv_func_socket=yes
4832                 ac_cv_func_select=yes
4833                 ac_cv_func_closesocket=yes
4834                 ac_cv_func_gethostname=yes
4835         fi
4836 fi
4837
4838
4839 echo $ac_n "checking for socket""... $ac_c" 1>&6
4840 echo "configure:4841: checking for socket" >&5
4841 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4842   echo $ac_n "(cached) $ac_c" 1>&6
4843 else
4844   cat > conftest.$ac_ext <<EOF
4845 #line 4846 "configure"
4846 #include "confdefs.h"
4847 /* System header to define __stub macros and hopefully few prototypes,
4848     which can conflict with char socket(); below.  */
4849 #include <assert.h>
4850 /* Override any gcc2 internal prototype to avoid an error.  */
4851 /* We use char because int might match the return type of a gcc2
4852     builtin and then its argument prototype would still apply.  */
4853 char socket();
4854 char (*f)();
4855
4856 int main() {
4857
4858 /* The GNU C library defines this for functions which it implements
4859     to always fail with ENOSYS.  Some functions are actually named
4860     something starting with __ and the normal name is an alias.  */
4861 #if defined (__stub_socket) || defined (__stub___socket)
4862 choke me
4863 #else
4864 f = socket;
4865 #endif
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   eval "ac_cv_func_socket=yes"
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   eval "ac_cv_func_socket=no"
4877 fi
4878 rm -f conftest*
4879 fi
4880
4881 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4882   echo "$ac_t""yes" 1>&6
4883   :
4884 else
4885   echo "$ac_t""no" 1>&6
4886         
4887         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4888 echo "configure:4889: checking for main in -lsocket" >&5
4889 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4891   echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893   ac_save_LIBS="$LIBS"
4894 LIBS="-lsocket  $LIBS"
4895 cat > conftest.$ac_ext <<EOF
4896 #line 4897 "configure"
4897 #include "confdefs.h"
4898
4899 int main() {
4900 main()
4901 ; return 0; }
4902 EOF
4903 if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4904   rm -rf conftest*
4905   eval "ac_cv_lib_$ac_lib_var=yes"
4906 else
4907   echo "configure: failed program was:" >&5
4908   cat conftest.$ac_ext >&5
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=no"
4911 fi
4912 rm -f conftest*
4913 LIBS="$ac_save_LIBS"
4914
4915 fi
4916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4917   echo "$ac_t""yes" 1>&6
4918     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4919     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4920   cat >> confdefs.h <<EOF
4921 #define $ac_tr_lib 1
4922 EOF
4923
4924   LIBS="-lsocket $LIBS"
4925
4926 else
4927   echo "$ac_t""no" 1>&6
4928 fi
4929
4930         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4931 echo "configure:4932: checking for main in -lnet" >&5
4932 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4933 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4934   echo $ac_n "(cached) $ac_c" 1>&6
4935 else
4936   ac_save_LIBS="$LIBS"
4937 LIBS="-lnet  $LIBS"
4938 cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941
4942 int main() {
4943 main()
4944 ; return 0; }
4945 EOF
4946 if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=yes"
4949 else
4950   echo "configure: failed program was:" >&5
4951   cat conftest.$ac_ext >&5
4952   rm -rf conftest*
4953   eval "ac_cv_lib_$ac_lib_var=no"
4954 fi
4955 rm -f conftest*
4956 LIBS="$ac_save_LIBS"
4957
4958 fi
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4960   echo "$ac_t""yes" 1>&6
4961     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4963   cat >> confdefs.h <<EOF
4964 #define $ac_tr_lib 1
4965 EOF
4966
4967   LIBS="-lnet $LIBS"
4968
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972
4973         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4974 echo "configure:4975: checking for main in -lnsl_s" >&5
4975 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4976 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4977   echo $ac_n "(cached) $ac_c" 1>&6
4978 else
4979   ac_save_LIBS="$LIBS"
4980 LIBS="-lnsl_s  $LIBS"
4981 cat > conftest.$ac_ext <<EOF
4982 #line 4983 "configure"
4983 #include "confdefs.h"
4984
4985 int main() {
4986 main()
4987 ; return 0; }
4988 EOF
4989 if { (eval echo configure:4990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4990   rm -rf conftest*
4991   eval "ac_cv_lib_$ac_lib_var=yes"
4992 else
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -rf conftest*
4996   eval "ac_cv_lib_$ac_lib_var=no"
4997 fi
4998 rm -f conftest*
4999 LIBS="$ac_save_LIBS"
5000
5001 fi
5002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5003   echo "$ac_t""yes" 1>&6
5004     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5005     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5006   cat >> confdefs.h <<EOF
5007 #define $ac_tr_lib 1
5008 EOF
5009
5010   LIBS="-lnsl_s $LIBS"
5011
5012 else
5013   echo "$ac_t""no" 1>&6
5014 fi
5015
5016         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5017 echo "configure:5018: checking for main in -lnsl" >&5
5018 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   ac_save_LIBS="$LIBS"
5023 LIBS="-lnsl  $LIBS"
5024 cat > conftest.$ac_ext <<EOF
5025 #line 5026 "configure"
5026 #include "confdefs.h"
5027
5028 int main() {
5029 main()
5030 ; return 0; }
5031 EOF
5032 if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5033   rm -rf conftest*
5034   eval "ac_cv_lib_$ac_lib_var=yes"
5035 else
5036   echo "configure: failed program was:" >&5
5037   cat conftest.$ac_ext >&5
5038   rm -rf conftest*
5039   eval "ac_cv_lib_$ac_lib_var=no"
5040 fi
5041 rm -f conftest*
5042 LIBS="$ac_save_LIBS"
5043
5044 fi
5045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5046   echo "$ac_t""yes" 1>&6
5047     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5048     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5049   cat >> confdefs.h <<EOF
5050 #define $ac_tr_lib 1
5051 EOF
5052
5053   LIBS="-lnsl $LIBS"
5054
5055 else
5056   echo "$ac_t""no" 1>&6
5057 fi
5058
5059         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5060 echo "configure:5061: checking for socket in -linet" >&5
5061 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5063   echo $ac_n "(cached) $ac_c" 1>&6
5064 else
5065   ac_save_LIBS="$LIBS"
5066 LIBS="-linet  $LIBS"
5067 cat > conftest.$ac_ext <<EOF
5068 #line 5069 "configure"
5069 #include "confdefs.h"
5070 /* Override any gcc2 internal prototype to avoid an error.  */
5071 /* We use char because int might match the return type of a gcc2
5072     builtin and then its argument prototype would still apply.  */
5073 char socket();
5074
5075 int main() {
5076 socket()
5077 ; return 0; }
5078 EOF
5079 if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5080   rm -rf conftest*
5081   eval "ac_cv_lib_$ac_lib_var=yes"
5082 else
5083   echo "configure: failed program was:" >&5
5084   cat conftest.$ac_ext >&5
5085   rm -rf conftest*
5086   eval "ac_cv_lib_$ac_lib_var=no"
5087 fi
5088 rm -f conftest*
5089 LIBS="$ac_save_LIBS"
5090
5091 fi
5092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5093   echo "$ac_t""yes" 1>&6
5094     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5095     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5096   cat >> confdefs.h <<EOF
5097 #define $ac_tr_lib 1
5098 EOF
5099
5100   LIBS="-linet $LIBS"
5101
5102 else
5103   echo "$ac_t""no" 1>&6
5104 fi
5105
5106         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5107 echo "configure:5108: checking for main in -lgen" >&5
5108 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5110   echo $ac_n "(cached) $ac_c" 1>&6
5111 else
5112   ac_save_LIBS="$LIBS"
5113 LIBS="-lgen  $LIBS"
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117
5118 int main() {
5119 main()
5120 ; return 0; }
5121 EOF
5122 if { (eval echo configure:5123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5123   rm -rf conftest*
5124   eval "ac_cv_lib_$ac_lib_var=yes"
5125 else
5126   echo "configure: failed program was:" >&5
5127   cat conftest.$ac_ext >&5
5128   rm -rf conftest*
5129   eval "ac_cv_lib_$ac_lib_var=no"
5130 fi
5131 rm -f conftest*
5132 LIBS="$ac_save_LIBS"
5133
5134 fi
5135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5136   echo "$ac_t""yes" 1>&6
5137     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5138     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5139   cat >> confdefs.h <<EOF
5140 #define $ac_tr_lib 1
5141 EOF
5142
5143   LIBS="-lgen $LIBS"
5144
5145 else
5146   echo "$ac_t""no" 1>&6
5147 fi
5148
5149
5150 fi
5151
5152
5153 echo $ac_n "checking for select""... $ac_c" 1>&6
5154 echo "configure:5155: checking for select" >&5
5155 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* System header to define __stub macros and hopefully few prototypes,
5162     which can conflict with char select(); below.  */
5163 #include <assert.h>
5164 /* Override any gcc2 internal prototype to avoid an error.  */
5165 /* We use char because int might match the return type of a gcc2
5166     builtin and then its argument prototype would still apply.  */
5167 char select();
5168 char (*f)();
5169
5170 int main() {
5171
5172 /* The GNU C library defines this for functions which it implements
5173     to always fail with ENOSYS.  Some functions are actually named
5174     something starting with __ and the normal name is an alias.  */
5175 #if defined (__stub_select) || defined (__stub___select)
5176 choke me
5177 #else
5178 f = select;
5179 #endif
5180
5181 ; return 0; }
5182 EOF
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5184   rm -rf conftest*
5185   eval "ac_cv_func_select=yes"
5186 else
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -rf conftest*
5190   eval "ac_cv_func_select=no"
5191 fi
5192 rm -f conftest*
5193 fi
5194
5195 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5196   echo "$ac_t""yes" 1>&6
5197   :
5198 else
5199   echo "$ac_t""no" 1>&6
5200 { echo "configure: error: select() required." 1>&2; exit 1; }
5201 fi
5202
5203
5204 if test "${ac_cv_header_winsock_h}" != yes; then
5205                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5206 echo "configure:5207: checking types of arguments for select()" >&5
5207  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5208   echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5211   echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5217      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5218       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5219        cat > conftest.$ac_ext <<EOF
5220 #line 5221 "configure"
5221 #include "confdefs.h"
5222 #ifdef HAVE_SYS_TYPES_H
5223 #include <sys/types.h>
5224 #endif
5225 #ifdef HAVE_SYS_TIME_H
5226 #include <sys/time.h>
5227 #endif
5228 #ifdef HAVE_SYS_SELECT_H
5229 #include <sys/select.h>
5230 #endif
5231 #ifdef HAVE_SYS_SOCKET_H
5232 #include <sys/socket.h>
5233 #endif
5234 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);
5235 int main() {
5236
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5240   rm -rf conftest*
5241           ac_not_found=no ; break 3
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   ac_not_found=yes
5247 fi
5248 rm -f conftest*
5249       done
5250      done
5251     done
5252    
5253 fi
5254   
5255 fi
5256  
5257 fi
5258  if test "$ac_not_found" = yes; then
5259   ac_cv_func_select_arg1=int 
5260   ac_cv_func_select_arg234='int *' 
5261   ac_cv_func_select_arg5='struct timeval *'
5262  fi
5263  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5264  cat >> confdefs.h <<EOF
5265 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5266 EOF
5267
5268  cat >> confdefs.h <<EOF
5269 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5270 EOF
5271
5272  cat >> confdefs.h <<EOF
5273 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5274 EOF
5275
5276
5277 fi
5278
5279
5280 for ac_hdr in regex.h 
5281 do
5282 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5283 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5284 echo "configure:5285: checking for $ac_hdr" >&5
5285 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5286   echo $ac_n "(cached) $ac_c" 1>&6
5287 else
5288   cat > conftest.$ac_ext <<EOF
5289 #line 5290 "configure"
5290 #include "confdefs.h"
5291 #include <$ac_hdr>
5292 EOF
5293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5294 { (eval echo configure:5295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5296 if test -z "$ac_err"; then
5297   rm -rf conftest*
5298   eval "ac_cv_header_$ac_safe=yes"
5299 else
5300   echo "$ac_err" >&5
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303   rm -rf conftest*
5304   eval "ac_cv_header_$ac_safe=no"
5305 fi
5306 rm -f conftest*
5307 fi
5308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5309   echo "$ac_t""yes" 1>&6
5310     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5311   cat >> confdefs.h <<EOF
5312 #define $ac_tr_hdr 1
5313 EOF
5314  
5315 else
5316   echo "$ac_t""no" 1>&6
5317 fi
5318 done
5319
5320 if test "$ac_cv_header_regex_h" != yes ; then
5321         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5322 fi
5323 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5324 echo "configure:5325: checking for regfree" >&5
5325 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328   cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331 /* System header to define __stub macros and hopefully few prototypes,
5332     which can conflict with char regfree(); below.  */
5333 #include <assert.h>
5334 /* Override any gcc2 internal prototype to avoid an error.  */
5335 /* We use char because int might match the return type of a gcc2
5336     builtin and then its argument prototype would still apply.  */
5337 char regfree();
5338 char (*f)();
5339
5340 int main() {
5341
5342 /* The GNU C library defines this for functions which it implements
5343     to always fail with ENOSYS.  Some functions are actually named
5344     something starting with __ and the normal name is an alias.  */
5345 #if defined (__stub_regfree) || defined (__stub___regfree)
5346 choke me
5347 #else
5348 f = regfree;
5349 #endif
5350
5351 ; return 0; }
5352 EOF
5353 if { (eval echo configure:5354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5354   rm -rf conftest*
5355   eval "ac_cv_func_regfree=yes"
5356 else
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359   rm -rf conftest*
5360   eval "ac_cv_func_regfree=no"
5361 fi
5362 rm -f conftest*
5363 fi
5364
5365 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367   :
5368 else
5369   echo "$ac_t""no" 1>&6
5370 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5371 fi
5372
5373
5374
5375 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5376 echo "configure:5377: checking for compatible POSIX regex" >&5
5377 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   
5381         if test "$cross_compiling" = yes; then
5382   ol_cv_c_posix_regex=cross
5383 else
5384   cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387
5388 #include <sys/types.h>
5389 #include <regex.h>
5390 static char *pattern, *string;
5391 main()
5392 {
5393         int rc;
5394         regex_t re;
5395
5396         pattern = "^A";
5397
5398         if(regcomp(&re, pattern, 0)) {
5399                 return -1;
5400         }
5401         
5402         string = "ALL MATCH";
5403         
5404         rc = regexec(&re, string, 0, (void*)0, 0);
5405
5406         regfree(&re);
5407
5408         return rc;
5409 }
5410 EOF
5411 if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5412 then
5413   ol_cv_c_posix_regex=yes
5414 else
5415   echo "configure: failed program was:" >&5
5416   cat conftest.$ac_ext >&5
5417   rm -fr conftest*
5418   ol_cv_c_posix_regex=no
5419 fi
5420 rm -fr conftest*
5421 fi
5422
5423 fi
5424
5425 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5426
5427 if test "$ol_cv_c_posix_regex" = no ; then
5428         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5429 fi
5430
5431 ol_link_dnssrv=no
5432 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5433 echo "configure:5434: checking for res_query" >&5
5434 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5440 /* System header to define __stub macros and hopefully few prototypes,
5441     which can conflict with char res_query(); below.  */
5442 #include <assert.h>
5443 /* Override any gcc2 internal prototype to avoid an error.  */
5444 /* We use char because int might match the return type of a gcc2
5445     builtin and then its argument prototype would still apply.  */
5446 char res_query();
5447 char (*f)();
5448
5449 int main() {
5450
5451 /* The GNU C library defines this for functions which it implements
5452     to always fail with ENOSYS.  Some functions are actually named
5453     something starting with __ and the normal name is an alias.  */
5454 #if defined (__stub_res_query) || defined (__stub___res_query)
5455 choke me
5456 #else
5457 f = res_query;
5458 #endif
5459
5460 ; return 0; }
5461 EOF
5462 if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5463   rm -rf conftest*
5464   eval "ac_cv_func_res_query=yes"
5465 else
5466   echo "configure: failed program was:" >&5
5467   cat conftest.$ac_ext >&5
5468   rm -rf conftest*
5469   eval "ac_cv_func_res_query=no"
5470 fi
5471 rm -f conftest*
5472 fi
5473
5474 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5475   echo "$ac_t""yes" 1>&6
5476   :
5477 else
5478   echo "$ac_t""no" 1>&6
5479 fi
5480
5481 if test $ac_cv_func_res_query = no ; then 
5482         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5483 echo "configure:5484: checking for res_query in -lbind" >&5
5484 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5485 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   ac_save_LIBS="$LIBS"
5489 LIBS="-lbind  $LIBS"
5490 cat > conftest.$ac_ext <<EOF
5491 #line 5492 "configure"
5492 #include "confdefs.h"
5493 /* Override any gcc2 internal prototype to avoid an error.  */
5494 /* We use char because int might match the return type of a gcc2
5495     builtin and then its argument prototype would still apply.  */
5496 char res_query();
5497
5498 int main() {
5499 res_query()
5500 ; return 0; }
5501 EOF
5502 if { (eval echo configure:5503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5503   rm -rf conftest*
5504   eval "ac_cv_lib_$ac_lib_var=yes"
5505 else
5506   echo "configure: failed program was:" >&5
5507   cat conftest.$ac_ext >&5
5508   rm -rf conftest*
5509   eval "ac_cv_lib_$ac_lib_var=no"
5510 fi
5511 rm -f conftest*
5512 LIBS="$ac_save_LIBS"
5513
5514 fi
5515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5516   echo "$ac_t""yes" 1>&6
5517     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5518     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5519   cat >> confdefs.h <<EOF
5520 #define $ac_tr_lib 1
5521 EOF
5522
5523   LIBS="-lbind $LIBS"
5524
5525 else
5526   echo "$ac_t""no" 1>&6
5527 fi
5528
5529         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5530 fi
5531
5532 if test $ac_cv_func_res_query = no ; then 
5533         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5534 echo "configure:5535: checking for __res_query in -lbind" >&5
5535 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5536 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5537   echo $ac_n "(cached) $ac_c" 1>&6
5538 else
5539   ac_save_LIBS="$LIBS"
5540 LIBS="-lbind  $LIBS"
5541 cat > conftest.$ac_ext <<EOF
5542 #line 5543 "configure"
5543 #include "confdefs.h"
5544 /* Override any gcc2 internal prototype to avoid an error.  */
5545 /* We use char because int might match the return type of a gcc2
5546     builtin and then its argument prototype would still apply.  */
5547 char __res_query();
5548
5549 int main() {
5550 __res_query()
5551 ; return 0; }
5552 EOF
5553 if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5554   rm -rf conftest*
5555   eval "ac_cv_lib_$ac_lib_var=yes"
5556 else
5557   echo "configure: failed program was:" >&5
5558   cat conftest.$ac_ext >&5
5559   rm -rf conftest*
5560   eval "ac_cv_lib_$ac_lib_var=no"
5561 fi
5562 rm -f conftest*
5563 LIBS="$ac_save_LIBS"
5564
5565 fi
5566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5567   echo "$ac_t""yes" 1>&6
5568     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5569     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5570   cat >> confdefs.h <<EOF
5571 #define $ac_tr_lib 1
5572 EOF
5573
5574   LIBS="-lbind $LIBS"
5575
5576 else
5577   echo "$ac_t""no" 1>&6
5578 fi
5579
5580         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5581 fi
5582
5583 if test $ac_cv_func_res_query = no ; then 
5584         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5585 echo "configure:5586: checking for res_query in -lresolv" >&5
5586 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5588   echo $ac_n "(cached) $ac_c" 1>&6
5589 else
5590   ac_save_LIBS="$LIBS"
5591 LIBS="-lresolv  $LIBS"
5592 cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 /* We use char because int might match the return type of a gcc2
5597     builtin and then its argument prototype would still apply.  */
5598 char res_query();
5599
5600 int main() {
5601 res_query()
5602 ; return 0; }
5603 EOF
5604 if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5605   rm -rf conftest*
5606   eval "ac_cv_lib_$ac_lib_var=yes"
5607 else
5608   echo "configure: failed program was:" >&5
5609   cat conftest.$ac_ext >&5
5610   rm -rf conftest*
5611   eval "ac_cv_lib_$ac_lib_var=no"
5612 fi
5613 rm -f conftest*
5614 LIBS="$ac_save_LIBS"
5615
5616 fi
5617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5618   echo "$ac_t""yes" 1>&6
5619     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5620     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5621   cat >> confdefs.h <<EOF
5622 #define $ac_tr_lib 1
5623 EOF
5624
5625   LIBS="-lresolv $LIBS"
5626
5627 else
5628   echo "$ac_t""no" 1>&6
5629 fi
5630
5631         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5632 fi
5633
5634 if test "$ac_cv_func_res_query" = yes ; then
5635         cat >> confdefs.h <<\EOF
5636 #define HAVE_RES_QUERY 1
5637 EOF
5638
5639
5640         if test $ol_enable_dnssrv != no ; then
5641                 ol_link_dnssrv=yes
5642         fi
5643 fi
5644
5645 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5646         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5647 fi
5648
5649 if test $ol_enable_quipu != no ; then
5650         for ac_hdr in quipu/commonarg.h
5651 do
5652 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5653 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5654 echo "configure:5655: checking for $ac_hdr" >&5
5655 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5656   echo $ac_n "(cached) $ac_c" 1>&6
5657 else
5658   cat > conftest.$ac_ext <<EOF
5659 #line 5660 "configure"
5660 #include "confdefs.h"
5661 #include <$ac_hdr>
5662 EOF
5663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5664 { (eval echo configure:5665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5666 if test -z "$ac_err"; then
5667   rm -rf conftest*
5668   eval "ac_cv_header_$ac_safe=yes"
5669 else
5670   echo "$ac_err" >&5
5671   echo "configure: failed program was:" >&5
5672   cat conftest.$ac_ext >&5
5673   rm -rf conftest*
5674   eval "ac_cv_header_$ac_safe=no"
5675 fi
5676 rm -f conftest*
5677 fi
5678 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5679   echo "$ac_t""yes" 1>&6
5680     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5681   cat >> confdefs.h <<EOF
5682 #define $ac_tr_hdr 1
5683 EOF
5684  
5685 else
5686   echo "$ac_t""no" 1>&6
5687 fi
5688 done
5689
5690
5691         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5692                 BUILD_QUIPU=yes
5693         elif test $ol_enable_quipu = auto ; then
5694                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5695         else
5696                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5697         fi
5698 fi
5699
5700 ol_link_kbind=no
5701 ol_link_kpasswd=no
5702 ol_link_krb5=no
5703 ol_link_krb4=no
5704
5705 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5706         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5707
5708         for ac_hdr in krb5.h
5709 do
5710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5712 echo "configure:5713: checking for $ac_hdr" >&5
5713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5714   echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716   cat > conftest.$ac_ext <<EOF
5717 #line 5718 "configure"
5718 #include "confdefs.h"
5719 #include <$ac_hdr>
5720 EOF
5721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5722 { (eval echo configure:5723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5724 if test -z "$ac_err"; then
5725   rm -rf conftest*
5726   eval "ac_cv_header_$ac_safe=yes"
5727 else
5728   echo "$ac_err" >&5
5729   echo "configure: failed program was:" >&5
5730   cat conftest.$ac_ext >&5
5731   rm -rf conftest*
5732   eval "ac_cv_header_$ac_safe=no"
5733 fi
5734 rm -f conftest*
5735 fi
5736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5737   echo "$ac_t""yes" 1>&6
5738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5739   cat >> confdefs.h <<EOF
5740 #define $ac_tr_hdr 1
5741 EOF
5742  
5743 else
5744   echo "$ac_t""no" 1>&6
5745 fi
5746 done
5747
5748
5749         if test $ac_cv_header_krb5_h = yes ; then
5750                                 for ac_hdr in heim_err.h
5751 do
5752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5754 echo "configure:5755: checking for $ac_hdr" >&5
5755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5756   echo $ac_n "(cached) $ac_c" 1>&6
5757 else
5758   cat > conftest.$ac_ext <<EOF
5759 #line 5760 "configure"
5760 #include "confdefs.h"
5761 #include <$ac_hdr>
5762 EOF
5763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5764 { (eval echo configure:5765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5766 if test -z "$ac_err"; then
5767   rm -rf conftest*
5768   eval "ac_cv_header_$ac_safe=yes"
5769 else
5770   echo "$ac_err" >&5
5771   echo "configure: failed program was:" >&5
5772   cat conftest.$ac_ext >&5
5773   rm -rf conftest*
5774   eval "ac_cv_header_$ac_safe=no"
5775 fi
5776 rm -f conftest*
5777 fi
5778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5779   echo "$ac_t""yes" 1>&6
5780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5781   cat >> confdefs.h <<EOF
5782 #define $ac_tr_hdr 1
5783 EOF
5784  
5785 else
5786   echo "$ac_t""no" 1>&6
5787 fi
5788 done
5789
5790                 if test $ac_cv_header_heim_err_h = yes ; then
5791                         krb5_impl=heimdal
5792                 else
5793                         krb5_impl=mit
5794                 fi
5795
5796                 if test $krb5_impl = mit; then
5797                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5798 echo "configure:5799: checking for main in -lkrb5" >&5
5799 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5801   echo $ac_n "(cached) $ac_c" 1>&6
5802 else
5803   ac_save_LIBS="$LIBS"
5804 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5805 cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808
5809 int main() {
5810 main()
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5814   rm -rf conftest*
5815   eval "ac_cv_lib_$ac_lib_var=yes"
5816 else
5817   echo "configure: failed program was:" >&5
5818   cat conftest.$ac_ext >&5
5819   rm -rf conftest*
5820   eval "ac_cv_lib_$ac_lib_var=no"
5821 fi
5822 rm -f conftest*
5823 LIBS="$ac_save_LIBS"
5824
5825 fi
5826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5827   echo "$ac_t""yes" 1>&6
5828   have_krb5=yes
5829                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5830 else
5831   echo "$ac_t""no" 1>&6
5832 have_krb5=no
5833 fi
5834
5835
5836                 elif test $krb5_impl = heimdal; then
5837                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5838 echo "configure:5839: checking for main in -lkrb5" >&5
5839 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5840 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5841   echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843   ac_save_LIBS="$LIBS"
5844 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5845 cat > conftest.$ac_ext <<EOF
5846 #line 5847 "configure"
5847 #include "confdefs.h"
5848
5849 int main() {
5850 main()
5851 ; return 0; }
5852 EOF
5853 if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5854   rm -rf conftest*
5855   eval "ac_cv_lib_$ac_lib_var=yes"
5856 else
5857   echo "configure: failed program was:" >&5
5858   cat conftest.$ac_ext >&5
5859   rm -rf conftest*
5860   eval "ac_cv_lib_$ac_lib_var=no"
5861 fi
5862 rm -f conftest*
5863 LIBS="$ac_save_LIBS"
5864
5865 fi
5866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5867   echo "$ac_t""yes" 1>&6
5868   have_krb5=yes
5869                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5870 else
5871   echo "$ac_t""no" 1>&6
5872 have_krb5=no
5873 fi
5874
5875
5876                         cat >> confdefs.h <<\EOF
5877 #define HAVE_HEIMDAL_KERBEROS 1
5878 EOF
5879
5880                 else
5881                         have_krb5=no
5882                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5883                 fi
5884
5885                 if test $have_krb5 = yes ; then
5886                         ol_link_krb5=yes
5887
5888                         cat >> confdefs.h <<\EOF
5889 #define HAVE_KRB5 1
5890 EOF
5891
5892
5893                         if test $ol_enable_kpasswd != no ; then
5894                                 ol_link_kpasswd=yes;
5895                         fi
5896
5897                         if test $ol_with_kerberos = k5only ; then
5898                                 ol_with_kerberos=found
5899                         fi
5900
5901                 elif test $ol_with_kerberos != auto ; then
5902                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5903                 fi
5904
5905         fi
5906 fi
5907
5908 if test $ol_link_krb5 = yes -a \
5909         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5910
5911         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5912 do
5913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5915 echo "configure:5916: checking for $ac_hdr" >&5
5916 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5917   echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919   cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922 #include <$ac_hdr>
5923 EOF
5924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5925 { (eval echo configure:5926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5927 if test -z "$ac_err"; then
5928   rm -rf conftest*
5929   eval "ac_cv_header_$ac_safe=yes"
5930 else
5931   echo "$ac_err" >&5
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934   rm -rf conftest*
5935   eval "ac_cv_header_$ac_safe=no"
5936 fi
5937 rm -f conftest*
5938 fi
5939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5940   echo "$ac_t""yes" 1>&6
5941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5942   cat >> confdefs.h <<EOF
5943 #define $ac_tr_hdr 1
5944 EOF
5945  
5946 else
5947   echo "$ac_t""no" 1>&6
5948 fi
5949 done
5950
5951
5952         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5953                 if test $krb5_impl = mit; then
5954                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5955 echo "configure:5956: checking for main in -lkrb4" >&5
5956 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5958   echo $ac_n "(cached) $ac_c" 1>&6
5959 else
5960   ac_save_LIBS="$LIBS"
5961 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5962 cat > conftest.$ac_ext <<EOF
5963 #line 5964 "configure"
5964 #include "confdefs.h"
5965
5966 int main() {
5967 main()
5968 ; return 0; }
5969 EOF
5970 if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5971   rm -rf conftest*
5972   eval "ac_cv_lib_$ac_lib_var=yes"
5973 else
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   eval "ac_cv_lib_$ac_lib_var=no"
5978 fi
5979 rm -f conftest*
5980 LIBS="$ac_save_LIBS"
5981
5982 fi
5983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5984   echo "$ac_t""yes" 1>&6
5985   have_k425=yes
5986                                 KRB4_LIBS="-lkrb4 -ldes425"
5987 else
5988   echo "$ac_t""no" 1>&6
5989 have_k425=no
5990 fi
5991
5992
5993                 elif test $krb5_impl = heimdal; then
5994                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5995 echo "configure:5996: checking for main in -lkrb4" >&5
5996 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5997 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5998   echo $ac_n "(cached) $ac_c" 1>&6
5999 else
6000   ac_save_LIBS="$LIBS"
6001 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6002 cat > conftest.$ac_ext <<EOF
6003 #line 6004 "configure"
6004 #include "confdefs.h"
6005
6006 int main() {
6007 main()
6008 ; return 0; }
6009 EOF
6010 if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=yes"
6013 else
6014   echo "configure: failed program was:" >&5
6015   cat conftest.$ac_ext >&5
6016   rm -rf conftest*
6017   eval "ac_cv_lib_$ac_lib_var=no"
6018 fi
6019 rm -f conftest*
6020 LIBS="$ac_save_LIBS"
6021
6022 fi
6023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6024   echo "$ac_t""yes" 1>&6
6025   have_k425=yes
6026                                 KRB4_LIBS="-lkrb4"
6027 else
6028   echo "$ac_t""no" 1>&6
6029 have_k425=no
6030 fi
6031
6032
6033                 else
6034                         have_425=no
6035                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6036                 fi
6037
6038                 if test $have_k425 = yes ; then
6039                         ol_with_kerberos=found
6040                         ol_link_krb4=yes
6041
6042                         cat >> confdefs.h <<\EOF
6043 #define HAVE_KRB425 1
6044 EOF
6045
6046                         cat >> confdefs.h <<\EOF
6047 #define HAVE_KRB4 1
6048 EOF
6049
6050
6051                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6052 echo "configure:6053: checking for des_debug in Kerberos libraries" >&5
6053 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6054   echo $ac_n "(cached) $ac_c" 1>&6
6055 else
6056   
6057                                                                 save_LIBS="$LIBS"
6058                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6059                                 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062
6063 #include <kerberosIV/krb.h>
6064 #include <kerberosIV/des.h>
6065 extern int des_debug;
6066
6067 int main() {
6068
6069 des_debug = 1;
6070
6071 ; return 0; }
6072 EOF
6073 if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6074   rm -rf conftest*
6075   ol_cv_var_des_debug=yes
6076 else
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
6080   ol_cv_var_des_debug=no
6081 fi
6082 rm -f conftest*
6083                                                                 LIBS="$save_LIBS"
6084                         
6085 fi
6086
6087 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6088
6089                         if test $ol_cv_var_des_debug = yes ; then
6090                                 cat >> confdefs.h <<\EOF
6091 #define HAVE_DES_DEBUG 1
6092 EOF
6093
6094                         fi
6095
6096                         LIBS="$save_LIBS"
6097                 fi
6098         fi
6099 fi
6100
6101 if test $ol_link_krb5 = yes ; then
6102         ol_with_kerberos=found
6103 fi
6104
6105 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6106         -o $ol_with_kerberos = kth ; then
6107
6108         for ac_hdr in krb.h des.h krb-archaeology.h 
6109 do
6110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6112 echo "configure:6113: checking for $ac_hdr" >&5
6113 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6114   echo $ac_n "(cached) $ac_c" 1>&6
6115 else
6116   cat > conftest.$ac_ext <<EOF
6117 #line 6118 "configure"
6118 #include "confdefs.h"
6119 #include <$ac_hdr>
6120 EOF
6121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6122 { (eval echo configure:6123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6124 if test -z "$ac_err"; then
6125   rm -rf conftest*
6126   eval "ac_cv_header_$ac_safe=yes"
6127 else
6128   echo "$ac_err" >&5
6129   echo "configure: failed program was:" >&5
6130   cat conftest.$ac_ext >&5
6131   rm -rf conftest*
6132   eval "ac_cv_header_$ac_safe=no"
6133 fi
6134 rm -f conftest*
6135 fi
6136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6137   echo "$ac_t""yes" 1>&6
6138     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6139   cat >> confdefs.h <<EOF
6140 #define $ac_tr_hdr 1
6141 EOF
6142  
6143 else
6144   echo "$ac_t""no" 1>&6
6145 fi
6146 done
6147
6148
6149         if test $ac_cv_header_krb_h = yes ; then
6150                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6151 echo "configure:6152: checking for main in -lkrb" >&5
6152 ac_lib_var=`echo krb'_'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="-lkrb -ldes $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_k4=yes
6182 else
6183   echo "$ac_t""no" 1>&6
6184 have_k4=no
6185 fi
6186
6187
6188                 if test $have_k4 = yes ; then
6189                         ol_with_kerberos=found
6190                         ol_link_krb4=yes
6191
6192                         cat >> confdefs.h <<\EOF
6193 #define HAVE_KRB4 1
6194 EOF
6195
6196
6197                         KRB4_LIBS="-lkrb -ldes"
6198
6199                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6200                                 cat >> confdefs.h <<\EOF
6201 #define HAVE_KTH_KERBEROS 1
6202 EOF
6203
6204                         fi
6205                 fi
6206         fi
6207 fi
6208
6209 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6210         ol_link_kpasswd=yes;
6211 fi
6212
6213 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6214         cat >> confdefs.h <<\EOF
6215 #define HAVE_KERBEROS 1
6216 EOF
6217
6218
6219 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6220         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6221 fi
6222
6223 ol_link_tls=no
6224 if test $ol_with_tls != no ; then
6225         
6226         for ac_hdr in openssl/ssl.h ssl.h
6227 do
6228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6230 echo "configure:6231: checking for $ac_hdr" >&5
6231 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6232   echo $ac_n "(cached) $ac_c" 1>&6
6233 else
6234   cat > conftest.$ac_ext <<EOF
6235 #line 6236 "configure"
6236 #include "confdefs.h"
6237 #include <$ac_hdr>
6238 EOF
6239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6240 { (eval echo configure:6241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6242 if test -z "$ac_err"; then
6243   rm -rf conftest*
6244   eval "ac_cv_header_$ac_safe=yes"
6245 else
6246   echo "$ac_err" >&5
6247   echo "configure: failed program was:" >&5
6248   cat conftest.$ac_ext >&5
6249   rm -rf conftest*
6250   eval "ac_cv_header_$ac_safe=no"
6251 fi
6252 rm -f conftest*
6253 fi
6254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6255   echo "$ac_t""yes" 1>&6
6256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6257   cat >> confdefs.h <<EOF
6258 #define $ac_tr_hdr 1
6259 EOF
6260  
6261 else
6262   echo "$ac_t""no" 1>&6
6263 fi
6264 done
6265
6266         
6267         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6268                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6269 echo "configure:6270: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6270 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6272   echo $ac_n "(cached) $ac_c" 1>&6
6273 else
6274   ac_save_LIBS="$LIBS"
6275 LIBS="-lssl -lcrypto $LIBS"
6276 cat > conftest.$ac_ext <<EOF
6277 #line 6278 "configure"
6278 #include "confdefs.h"
6279 /* Override any gcc2 internal prototype to avoid an error.  */
6280 /* We use char because int might match the return type of a gcc2
6281     builtin and then its argument prototype would still apply.  */
6282 char SSLeay_add_ssl_algorithms();
6283
6284 int main() {
6285 SSLeay_add_ssl_algorithms()
6286 ; return 0; }
6287 EOF
6288 if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6289   rm -rf conftest*
6290   eval "ac_cv_lib_$ac_lib_var=yes"
6291 else
6292   echo "configure: failed program was:" >&5
6293   cat conftest.$ac_ext >&5
6294   rm -rf conftest*
6295   eval "ac_cv_lib_$ac_lib_var=no"
6296 fi
6297 rm -f conftest*
6298 LIBS="$ac_save_LIBS"
6299
6300 fi
6301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6302   echo "$ac_t""yes" 1>&6
6303   have_ssleay=yes
6304                         need_rsaref=no
6305 else
6306   echo "$ac_t""no" 1>&6
6307 have_ssleay=no
6308 fi
6309
6310                         
6311                 if test $have_ssleay = no ; then
6312                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6313 echo "configure:6314: checking for SSL_library_init in -lssl" >&5
6314 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6316   echo $ac_n "(cached) $ac_c" 1>&6
6317 else
6318   ac_save_LIBS="$LIBS"
6319 LIBS="-lssl -lcrypto $LIBS"
6320 cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323 /* Override any gcc2 internal prototype to avoid an error.  */
6324 /* We use char because int might match the return type of a gcc2
6325     builtin and then its argument prototype would still apply.  */
6326 char SSL_library_init();
6327
6328 int main() {
6329 SSL_library_init()
6330 ; return 0; }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333   rm -rf conftest*
6334   eval "ac_cv_lib_$ac_lib_var=yes"
6335 else
6336   echo "configure: failed program was:" >&5
6337   cat conftest.$ac_ext >&5
6338   rm -rf conftest*
6339   eval "ac_cv_lib_$ac_lib_var=no"
6340 fi
6341 rm -f conftest*
6342 LIBS="$ac_save_LIBS"
6343
6344 fi
6345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6346   echo "$ac_t""yes" 1>&6
6347   have_ssleay=yes
6348                                 need_rsaref=no
6349 else
6350   echo "$ac_t""no" 1>&6
6351 have_ssleay=no
6352 fi
6353
6354                 fi
6355
6356                 if test $have_ssleay = no ; then
6357                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6358 echo "configure:6359: checking for ssl3_accept in -lssl" >&5
6359 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6361   echo $ac_n "(cached) $ac_c" 1>&6
6362 else
6363   ac_save_LIBS="$LIBS"
6364 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6365 cat > conftest.$ac_ext <<EOF
6366 #line 6367 "configure"
6367 #include "confdefs.h"
6368 /* Override any gcc2 internal prototype to avoid an error.  */
6369 /* We use char because int might match the return type of a gcc2
6370     builtin and then its argument prototype would still apply.  */
6371 char ssl3_accept();
6372
6373 int main() {
6374 ssl3_accept()
6375 ; return 0; }
6376 EOF
6377 if { (eval echo configure:6378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6378   rm -rf conftest*
6379   eval "ac_cv_lib_$ac_lib_var=yes"
6380 else
6381   echo "configure: failed program was:" >&5
6382   cat conftest.$ac_ext >&5
6383   rm -rf conftest*
6384   eval "ac_cv_lib_$ac_lib_var=no"
6385 fi
6386 rm -f conftest*
6387 LIBS="$ac_save_LIBS"
6388
6389 fi
6390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6391   echo "$ac_t""yes" 1>&6
6392   have_ssleay=yes
6393                                 need_rsaref=yes
6394 else
6395   echo "$ac_t""no" 1>&6
6396 have_ssleay=no
6397 fi
6398
6399                 fi
6400
6401                 if test $have_ssleay = yes ; then
6402                         ol_with_tls=found
6403                         ol_link_tls=yes
6404
6405                         cat >> confdefs.h <<\EOF
6406 #define HAVE_SSLEAY 1
6407 EOF
6408
6409
6410                         if test $need_rsaref = yes; then
6411                                 cat >> confdefs.h <<\EOF
6412 #define HAVE_RSAREF 1
6413 EOF
6414
6415
6416                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6417                         else
6418                                 TLS_LIBS="-lssl -lcrypto"
6419                         fi
6420                 fi
6421         fi
6422 fi
6423
6424 if test $ol_link_tls = yes ; then
6425         cat >> confdefs.h <<\EOF
6426 #define HAVE_TLS 1
6427 EOF
6428
6429 fi      
6430
6431 for ac_func in \
6432         ctime_r                 \
6433         gethostbyname_r gethostbyaddr_r \
6434
6435 do
6436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6437 echo "configure:6438: checking for $ac_func" >&5
6438 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6439   echo $ac_n "(cached) $ac_c" 1>&6
6440 else
6441   cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 /* System header to define __stub macros and hopefully few prototypes,
6445     which can conflict with char $ac_func(); below.  */
6446 #include <assert.h>
6447 /* Override any gcc2 internal prototype to avoid an error.  */
6448 /* We use char because int might match the return type of a gcc2
6449     builtin and then its argument prototype would still apply.  */
6450 char $ac_func();
6451 char (*f)();
6452
6453 int main() {
6454
6455 /* The GNU C library defines this for functions which it implements
6456     to always fail with ENOSYS.  Some functions are actually named
6457     something starting with __ and the normal name is an alias.  */
6458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6459 choke me
6460 #else
6461 f = $ac_func;
6462 #endif
6463
6464 ; return 0; }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6467   rm -rf conftest*
6468   eval "ac_cv_func_$ac_func=yes"
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   eval "ac_cv_func_$ac_func=no"
6474 fi
6475 rm -f conftest*
6476 fi
6477
6478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6479   echo "$ac_t""yes" 1>&6
6480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6481   cat >> confdefs.h <<EOF
6482 #define $ac_tr_func 1
6483 EOF
6484  
6485 else
6486   echo "$ac_t""no" 1>&6
6487 fi
6488 done
6489
6490
6491 if test "$ac_cv_func_ctime_r" = no ; then
6492         ol_cv_func_ctime_r_nargs=0
6493 else
6494         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6495 echo "configure:6496: checking number of arguments of ctime_r" >&5
6496 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6497   echo $ac_n "(cached) $ac_c" 1>&6
6498 else
6499   cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6502 #include <time.h>
6503 int main() {
6504 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6505 ; return 0; }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6508   rm -rf conftest*
6509   ol_cv_func_ctime_r_nargs3=yes
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -rf conftest*
6514   ol_cv_func_ctime_r_nargs3=no
6515 fi
6516 rm -f conftest*
6517
6518         cat > conftest.$ac_ext <<EOF
6519 #line 6520 "configure"
6520 #include "confdefs.h"
6521 #include <time.h>
6522 int main() {
6523 time_t ti; char *buffer; ctime_r(&ti,buffer);
6524 ; return 0; }
6525 EOF
6526 if { (eval echo configure:6527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6527   rm -rf conftest*
6528   ol_cv_func_ctime_r_nargs2=yes
6529 else
6530   echo "configure: failed program was:" >&5
6531   cat conftest.$ac_ext >&5
6532   rm -rf conftest*
6533   ol_cv_func_ctime_r_nargs2=no
6534 fi
6535 rm -f conftest*
6536
6537         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6538                 $ol_cv_func_ctime_r_nargs2 = no ; then
6539
6540                 ol_cv_func_ctime_r_nargs=3
6541
6542         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6543                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6544
6545                 ol_cv_func_ctime_r_nargs=2
6546
6547         else
6548                 ol_cv_func_ctime_r_nargs=0
6549         fi
6550   
6551 fi
6552
6553 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6554
6555   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6556         cat >> confdefs.h <<EOF
6557 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6558 EOF
6559
6560   fi
6561
6562 fi
6563
6564 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6565         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6566 echo "configure:6567: checking number of arguments of gethostbyname_r" >&5
6567 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6568   echo $ac_n "(cached) $ac_c" 1>&6
6569 else
6570   cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 #include <sys/types.h>
6574 #include <sys/socket.h>
6575 #include <netinet/in.h>
6576 #include <netdb.h>
6577 #define BUFSIZE (sizeof(struct hostent)+10)
6578 int main() {
6579 struct hostent hent; char buffer[BUFSIZE];
6580                 int bufsize=BUFSIZE;int h_errno;
6581                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6582                         buffer, bufsize, &h_errno);
6583 ; return 0; }
6584 EOF
6585 if { (eval echo configure:6586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6586   rm -rf conftest*
6587   ol_cv_func_gethostbyname_r_nargs5=yes
6588 else
6589   echo "configure: failed program was:" >&5
6590   cat conftest.$ac_ext >&5
6591   rm -rf conftest*
6592   ol_cv_func_gethostbyname_r_nargs5=no
6593 fi
6594 rm -f conftest*
6595
6596         cat > conftest.$ac_ext <<EOF
6597 #line 6598 "configure"
6598 #include "confdefs.h"
6599 #include <sys/types.h>
6600 #include <sys/socket.h>
6601 #include <netinet/in.h>
6602 #include <netdb.h>
6603 #define BUFSIZE (sizeof(struct hostent)+10)
6604 int main() {
6605 struct hostent hent;struct hostent *rhent;
6606                 char buffer[BUFSIZE];
6607                 int bufsize=BUFSIZE;int h_errno;
6608                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6609                         &rhent, &h_errno);
6610 ; return 0; }
6611 EOF
6612 if { (eval echo configure:6613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6613   rm -rf conftest*
6614   ol_cv_func_gethostbyname_r_nargs6=yes
6615 else
6616   echo "configure: failed program was:" >&5
6617   cat conftest.$ac_ext >&5
6618   rm -rf conftest*
6619   ol_cv_func_gethostbyname_r_nargs6=no
6620 fi
6621 rm -f conftest*
6622
6623         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6624                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6625
6626                 ol_cv_func_gethostbyname_r_nargs=5
6627
6628         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6629                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6630
6631                 ol_cv_func_gethostbyname_r_nargs=6
6632
6633         else
6634                 ol_cv_func_gethostbyname_r_nargs=0
6635         fi
6636   
6637 fi
6638
6639 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6640   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6641         cat >> confdefs.h <<EOF
6642 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6643 EOF
6644
6645   fi
6646
6647 else
6648         ol_cv_func_gethostbyname_r_nargs=0
6649 fi
6650  
6651 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6652         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6653 echo "configure:6654: checking number of arguments of gethostbyaddr_r" >&5
6654 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6655   echo $ac_n "(cached) $ac_c" 1>&6
6656 else
6657   cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 #include <sys/types.h>
6661 #include <sys/socket.h>
6662 #include <netinet/in.h>
6663 #include <netdb.h>
6664 #define BUFSIZE (sizeof(struct hostent)+10)
6665 int main() {
6666 struct hostent hent; char buffer[BUFSIZE]; 
6667             struct in_addr add;
6668             size_t alen=sizeof(struct in_addr);
6669             int bufsize=BUFSIZE;int h_errno;
6670                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6671                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6672 ; return 0; }
6673 EOF
6674 if { (eval echo configure:6675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6675   rm -rf conftest*
6676   ol_cv_func_gethostbyaddr_r_nargs7=yes
6677 else
6678   echo "configure: failed program was:" >&5
6679   cat conftest.$ac_ext >&5
6680   rm -rf conftest*
6681   ol_cv_func_gethostbyaddr_r_nargs7=no
6682 fi
6683 rm -f conftest*
6684
6685         cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 #include <sys/types.h>
6689 #include <sys/socket.h>
6690 #include <netinet/in.h>
6691 #include <netdb.h>
6692 #define BUFSIZE (sizeof(struct hostent)+10)
6693 int main() {
6694 struct hostent hent;
6695                 struct hostent *rhent; char buffer[BUFSIZE]; 
6696                 struct in_addr add;
6697                 size_t alen=sizeof(struct in_addr);
6698                 int bufsize=BUFSIZE;int h_errno;
6699                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6700                         alen, AF_INET, &hent, buffer, bufsize, 
6701                         &rhent, &h_errno);
6702 ; return 0; }
6703 EOF
6704 if { (eval echo configure:6705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6705   rm -rf conftest*
6706   ol_cv_func_gethostbyaddr_r_nargs8=yes
6707 else
6708   echo "configure: failed program was:" >&5
6709   cat conftest.$ac_ext >&5
6710   rm -rf conftest*
6711   ol_cv_func_gethostbyaddr_r_nargs8=no
6712 fi
6713 rm -f conftest*
6714
6715         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6716                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6717
6718                 ol_cv_func_gethostbyaddr_r_nargs=7
6719
6720         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6721                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6722
6723                 ol_cv_func_gethostbyaddr_r_nargs=8
6724
6725         else
6726                 ol_cv_func_gethostbyaddr_r_nargs=0
6727         fi
6728   
6729 fi
6730
6731 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6732   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6733     cat >> confdefs.h <<EOF
6734 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6735 EOF
6736
6737   fi
6738
6739 else
6740         ol_cv_func_gethostbyaddr_r_nargs=0
6741 fi
6742
6743 if test "$ac_cv_func_ctime_r" = yes \
6744         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6745         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6746         -a "$ac_cv_func_gethostbyname_r" = yes \
6747         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6748         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6749         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6750         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6751         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6752         ; then
6753  
6754         cat >> confdefs.h <<\EOF
6755 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6756 EOF
6757
6758 fi
6759
6760 ol_link_threads=no
6761
6762 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6763         -o $ol_with_threads = nt ; then
6764
6765         
6766         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6767 echo "configure:6768: checking for NT Threads" >&5
6768 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6769   echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771   
6772                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6773 echo "configure:6774: checking for _beginthread" >&5
6774 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6775   echo $ac_n "(cached) $ac_c" 1>&6
6776 else
6777   cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780 /* System header to define __stub macros and hopefully few prototypes,
6781     which can conflict with char _beginthread(); below.  */
6782 #include <assert.h>
6783 /* Override any gcc2 internal prototype to avoid an error.  */
6784 /* We use char because int might match the return type of a gcc2
6785     builtin and then its argument prototype would still apply.  */
6786 char _beginthread();
6787 char (*f)();
6788
6789 int main() {
6790
6791 /* The GNU C library defines this for functions which it implements
6792     to always fail with ENOSYS.  Some functions are actually named
6793     something starting with __ and the normal name is an alias.  */
6794 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6795 choke me
6796 #else
6797 f = _beginthread;
6798 #endif
6799
6800 ; return 0; }
6801 EOF
6802 if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6803   rm -rf conftest*
6804   eval "ac_cv_func__beginthread=yes"
6805 else
6806   echo "configure: failed program was:" >&5
6807   cat conftest.$ac_ext >&5
6808   rm -rf conftest*
6809   eval "ac_cv_func__beginthread=no"
6810 fi
6811 rm -f conftest*
6812 fi
6813
6814 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6815   echo "$ac_t""yes" 1>&6
6816   ol_cv_nt_threads=yes
6817 else
6818   echo "$ac_t""no" 1>&6
6819 ol_cv_nt_threads=no
6820 fi
6821
6822         
6823 fi
6824
6825 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6826
6827         if test $ol_cv_nt_threads = yes ; then
6828                 cat >> confdefs.h <<\EOF
6829 #define HAVE_NT_THREADS 1
6830 EOF
6831
6832         fi
6833
6834
6835         if test "$ol_cv_nt_threads" = yes ; then
6836         ol_link_threads=nt
6837         ol_with_threads=found
6838         ol_with_yielding_select=yes
6839
6840                 cat >> confdefs.h <<\EOF
6841 #define HAVE_NT_SERVICE_MANAGER 1
6842 EOF
6843
6844                 cat >> confdefs.h <<\EOF
6845 #define HAVE_NT_EVENT_LOG 1
6846 EOF
6847
6848         fi
6849
6850         if test $ol_with_threads = nt ; then
6851                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6852         fi
6853 fi
6854
6855 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6856         -o $ol_with_threads = posix ; then
6857
6858         for ac_hdr in pthread.h
6859 do
6860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6862 echo "configure:6863: checking for $ac_hdr" >&5
6863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6864   echo $ac_n "(cached) $ac_c" 1>&6
6865 else
6866   cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 #include <$ac_hdr>
6870 EOF
6871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6872 { (eval echo configure:6873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6874 if test -z "$ac_err"; then
6875   rm -rf conftest*
6876   eval "ac_cv_header_$ac_safe=yes"
6877 else
6878   echo "$ac_err" >&5
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   eval "ac_cv_header_$ac_safe=no"
6883 fi
6884 rm -f conftest*
6885 fi
6886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6887   echo "$ac_t""yes" 1>&6
6888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6889   cat >> confdefs.h <<EOF
6890 #define $ac_tr_hdr 1
6891 EOF
6892  
6893 else
6894   echo "$ac_t""no" 1>&6
6895 fi
6896 done
6897
6898
6899         if test $ac_cv_header_pthread_h = yes ; then
6900                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6901 echo "configure:6902: checking POSIX thread version" >&5
6902 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905   
6906         cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909
6910 #               include <pthread.h>
6911                 /* this check could be improved */
6912 #               ifdef PTHREAD_ONCE_INIT
6913                         pthread_version_final;
6914 #               endif
6915         
6916 EOF
6917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6918   egrep "pthread_version_final" >/dev/null 2>&1; then
6919   rm -rf conftest*
6920   ol_pthread_final=yes
6921 else
6922   rm -rf conftest*
6923   ol_pthread_final=no
6924 fi
6925 rm -f conftest*
6926
6927
6928         cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931
6932 #               include <pthread.h>
6933                 /* this check could be improved */
6934 #               ifdef pthread_once_init
6935                         pthread_version_draft4;
6936 #               endif
6937         
6938 EOF
6939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6940   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6941   rm -rf conftest*
6942   ol_pthread_draft4=yes
6943 else
6944   rm -rf conftest*
6945   ol_pthread_draft4=no
6946 fi
6947 rm -f conftest*
6948
6949
6950         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6951                 ol_cv_pthread_version=final
6952         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6953                 ol_cv_pthread_version=draft4
6954         else
6955                 ol_cv_pthread_version=unknown
6956         fi
6957
6958 fi
6959
6960 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6961
6962
6963                 if test $ol_cv_pthread_version = final ; then
6964                         cat >> confdefs.h <<\EOF
6965 #define HAVE_PTHREADS_FINAL 1
6966 EOF
6967
6968                 elif test $ol_cv_pthread_version = draft4 ; then
6969                         cat >> confdefs.h <<\EOF
6970 #define HAVE_PTHREADS_D4 1
6971 EOF
6972
6973                 else
6974                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6975                 fi
6976
6977                 # consider threads found
6978                 ol_with_threads=found
6979
6980                 
6981         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6982 echo "configure:6983: checking for LinuxThreads pthread.h" >&5
6983 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6984   echo $ac_n "(cached) $ac_c" 1>&6
6985 else
6986   cat > conftest.$ac_ext <<EOF
6987 #line 6988 "configure"
6988 #include "confdefs.h"
6989 #include <pthread.h>
6990 EOF
6991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6992   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6993   rm -rf conftest*
6994   ol_cv_header_linux_threads=yes
6995 else
6996   rm -rf conftest*
6997   ol_cv_header_linux_threads=no
6998 fi
6999 rm -f conftest*
7000
7001                 
7002 fi
7003
7004 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7005         if test $ol_cv_header_linux_threads = yes; then
7006                 cat >> confdefs.h <<\EOF
7007 #define HAVE_LINUX_THREADS 1
7008 EOF
7009
7010         fi
7011
7012                 
7013         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7014 echo "configure:7015: checking for GNU Pth pthread.h" >&5
7015 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7016   echo $ac_n "(cached) $ac_c" 1>&6
7017 else
7018   cat > conftest.$ac_ext <<EOF
7019 #line 7020 "configure"
7020 #include "confdefs.h"
7021 #include <pthread.h>
7022 #ifdef _POSIX_THREAD_IS_GNU_PTH
7023         __gnu_pth__;
7024 #endif
7025
7026 EOF
7027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7028   egrep "__gnu_pth__" >/dev/null 2>&1; then
7029   rm -rf conftest*
7030   ol_cv_header_gnu_pth_pthread_h=yes
7031 else
7032   rm -rf conftest*
7033   ol_cv_header_gnu_pth_pthread_h=no
7034 fi
7035 rm -f conftest*
7036
7037                 
7038 fi
7039
7040 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7041
7042
7043                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7044                         for ac_hdr in sched.h
7045 do
7046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7048 echo "configure:7049: checking for $ac_hdr" >&5
7049 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7050   echo $ac_n "(cached) $ac_c" 1>&6
7051 else
7052   cat > conftest.$ac_ext <<EOF
7053 #line 7054 "configure"
7054 #include "confdefs.h"
7055 #include <$ac_hdr>
7056 EOF
7057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7058 { (eval echo configure:7059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7060 if test -z "$ac_err"; then
7061   rm -rf conftest*
7062   eval "ac_cv_header_$ac_safe=yes"
7063 else
7064   echo "$ac_err" >&5
7065   echo "configure: failed program was:" >&5
7066   cat conftest.$ac_ext >&5
7067   rm -rf conftest*
7068   eval "ac_cv_header_$ac_safe=no"
7069 fi
7070 rm -f conftest*
7071 fi
7072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7073   echo "$ac_t""yes" 1>&6
7074     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7075   cat >> confdefs.h <<EOF
7076 #define $ac_tr_hdr 1
7077 EOF
7078  
7079 else
7080   echo "$ac_t""no" 1>&6
7081 fi
7082 done
7083
7084                 fi
7085
7086                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7087                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7088 echo "configure:7089: checking for pthread_create in default libraries" >&5
7089 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   
7093                 if test "$cross_compiling" = yes; then
7094   cat > conftest.$ac_ext <<EOF
7095 #line 7096 "configure"
7096 #include "confdefs.h"
7097 /* pthread test headers */
7098 #include <pthread.h>
7099 #ifndef NULL
7100 #define NULL (void*)0
7101 #endif
7102
7103 static void *task(p)
7104         void *p;
7105 {
7106         return (void *) (p == NULL);
7107 }
7108
7109 int main() {
7110
7111         /* pthread test function */
7112         pthread_t t;
7113         int status;
7114 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7115         /* This system (e.g. AIX) defaults detached; must override */
7116         pthread_attr_t attr;
7117
7118         status = pthread_attr_init(&attr);
7119         if( status ) exit( status );
7120
7121         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7122         if( status ) exit( status );
7123
7124 #define ATTR    &attr
7125 #else
7126 #if HAVE_PTHREADS_D4
7127 #define ATTR    pthread_attr_default
7128 #else
7129 #define ATTR    NULL
7130 #endif
7131 #endif
7132         /* make sure pthread_create() isn't just a stub */
7133         status = pthread_create(&t, ATTR, task, NULL);
7134         if( status ) exit( status );
7135
7136         /* make sure pthread_detach() isn't just a stub */
7137 #if HAVE_PTHREADS_D4
7138         status = pthread_detach( &t );
7139 #else
7140         status = pthread_detach( t );
7141 #endif
7142
7143 #ifdef HAVE_LINUX_THREADS
7144         pthread_kill_other_threads_np();
7145 #endif
7146
7147         exit( status );
7148
7149 ; return 0; }
7150 EOF
7151 if { (eval echo configure:7152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7152   rm -rf conftest*
7153   ol_cv_pthread_create=yes
7154 else
7155   echo "configure: failed program was:" >&5
7156   cat conftest.$ac_ext >&5
7157   rm -rf conftest*
7158   ol_cv_pthread_create=no
7159 fi
7160 rm -f conftest*
7161 else
7162   cat > conftest.$ac_ext <<EOF
7163 #line 7164 "configure"
7164 #include "confdefs.h"
7165 /* pthread test headers */
7166 #include <pthread.h>
7167 #ifndef NULL
7168 #define NULL (void*)0
7169 #endif
7170
7171 static void *task(p)
7172         void *p;
7173 {
7174         return (void *) (p == NULL);
7175 }
7176
7177
7178 int main(argc, argv)
7179         int argc;
7180         char **argv;
7181 {
7182
7183         /* pthread test function */
7184         pthread_t t;
7185         int status;
7186 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7187         /* This system (e.g. AIX) defaults detached; must override */
7188         pthread_attr_t attr;
7189
7190         status = pthread_attr_init(&attr);
7191         if( status ) exit( status );
7192
7193         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7194         if( status ) exit( status );
7195
7196 #define ATTR    &attr
7197 #else
7198 #if HAVE_PTHREADS_D4
7199 #define ATTR    pthread_attr_default
7200 #else
7201 #define ATTR    NULL
7202 #endif
7203 #endif
7204         /* make sure pthread_create() isn't just a stub */
7205         status = pthread_create(&t, ATTR, task, NULL);
7206         if( status ) exit( status );
7207
7208         /* make sure pthread_detach() isn't just a stub */
7209 #if HAVE_PTHREADS_D4
7210         status = pthread_detach( &t );
7211 #else
7212         status = pthread_detach( t );
7213 #endif
7214
7215 #ifdef HAVE_LINUX_THREADS
7216         pthread_kill_other_threads_np();
7217 #endif
7218
7219         exit( status );
7220
7221 }
7222
7223 EOF
7224 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7225 then
7226   ol_cv_pthread_create=yes
7227 else
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -fr conftest*
7231   ol_cv_pthread_create=no
7232 fi
7233 rm -fr conftest*
7234 fi
7235
7236 fi
7237
7238 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7239
7240                 if test $ol_cv_pthread_create != no ; then
7241                         ol_link_threads=posix
7242                         ol_link_pthreads=""
7243                 fi
7244                 
7245                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7246 if test "$ol_link_threads" = no ; then
7247         # try -kthread
7248         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7249 echo "configure:7250: checking for pthread link with -kthread" >&5
7250 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7251   echo $ac_n "(cached) $ac_c" 1>&6
7252 else
7253   
7254                 # save the flags
7255                 ol_LIBS="$LIBS"
7256                 LIBS="-kthread $LIBS"
7257
7258                 if test "$cross_compiling" = yes; then
7259   cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 /* pthread test headers */
7263 #include <pthread.h>
7264 #ifndef NULL
7265 #define NULL (void*)0
7266 #endif
7267
7268 static void *task(p)
7269         void *p;
7270 {
7271         return (void *) (p == NULL);
7272 }
7273
7274 int main() {
7275
7276         /* pthread test function */
7277         pthread_t t;
7278         int status;
7279 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7280         /* This system (e.g. AIX) defaults detached; must override */
7281         pthread_attr_t attr;
7282
7283         status = pthread_attr_init(&attr);
7284         if( status ) exit( status );
7285
7286         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7287         if( status ) exit( status );
7288
7289 #define ATTR    &attr
7290 #else
7291 #if HAVE_PTHREADS_D4
7292 #define ATTR    pthread_attr_default
7293 #else
7294 #define ATTR    NULL
7295 #endif
7296 #endif
7297         /* make sure pthread_create() isn't just a stub */
7298         status = pthread_create(&t, ATTR, task, NULL);
7299         if( status ) exit( status );
7300
7301         /* make sure pthread_detach() isn't just a stub */
7302 #if HAVE_PTHREADS_D4
7303         status = pthread_detach( &t );
7304 #else
7305         status = pthread_detach( t );
7306 #endif
7307
7308 #ifdef HAVE_LINUX_THREADS
7309         pthread_kill_other_threads_np();
7310 #endif
7311
7312         exit( status );
7313
7314 ; return 0; }
7315 EOF
7316 if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7317   rm -rf conftest*
7318   ol_cv_pthread_kthread=yes
7319 else
7320   echo "configure: failed program was:" >&5
7321   cat conftest.$ac_ext >&5
7322   rm -rf conftest*
7323   ol_cv_pthread_kthread=no
7324 fi
7325 rm -f conftest*
7326 else
7327   cat > conftest.$ac_ext <<EOF
7328 #line 7329 "configure"
7329 #include "confdefs.h"
7330 /* pthread test headers */
7331 #include <pthread.h>
7332 #ifndef NULL
7333 #define NULL (void*)0
7334 #endif
7335
7336 static void *task(p)
7337         void *p;
7338 {
7339         return (void *) (p == NULL);
7340 }
7341
7342
7343 int main(argc, argv)
7344         int argc;
7345         char **argv;
7346 {
7347
7348         /* pthread test function */
7349         pthread_t t;
7350         int status;
7351 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7352         /* This system (e.g. AIX) defaults detached; must override */
7353         pthread_attr_t attr;
7354
7355         status = pthread_attr_init(&attr);
7356         if( status ) exit( status );
7357
7358         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7359         if( status ) exit( status );
7360
7361 #define ATTR    &attr
7362 #else
7363 #if HAVE_PTHREADS_D4
7364 #define ATTR    pthread_attr_default
7365 #else
7366 #define ATTR    NULL
7367 #endif
7368 #endif
7369         /* make sure pthread_create() isn't just a stub */
7370         status = pthread_create(&t, ATTR, task, NULL);
7371         if( status ) exit( status );
7372
7373         /* make sure pthread_detach() isn't just a stub */
7374 #if HAVE_PTHREADS_D4
7375         status = pthread_detach( &t );
7376 #else
7377         status = pthread_detach( t );
7378 #endif
7379
7380 #ifdef HAVE_LINUX_THREADS
7381         pthread_kill_other_threads_np();
7382 #endif
7383
7384         exit( status );
7385
7386 }
7387
7388 EOF
7389 if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7390 then
7391   ol_cv_pthread_kthread=yes
7392 else
7393   echo "configure: failed program was:" >&5
7394   cat conftest.$ac_ext >&5
7395   rm -fr conftest*
7396   ol_cv_pthread_kthread=no
7397 fi
7398 rm -fr conftest*
7399 fi
7400
7401
7402                 # restore the LIBS
7403                 LIBS="$ol_LIBS"
7404         
7405 fi
7406
7407 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7408
7409         if test $ol_cv_pthread_kthread = yes ; then
7410                 ol_link_pthreads="-kthread"
7411                 ol_link_threads=posix
7412         fi
7413 fi
7414
7415                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7416 if test "$ol_link_threads" = no ; then
7417         # try -pthread
7418         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7419 echo "configure:7420: checking for pthread link with -pthread" >&5
7420 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7421   echo $ac_n "(cached) $ac_c" 1>&6
7422 else
7423   
7424                 # save the flags
7425                 ol_LIBS="$LIBS"
7426                 LIBS="-pthread $LIBS"
7427
7428                 if test "$cross_compiling" = yes; then
7429   cat > conftest.$ac_ext <<EOF
7430 #line 7431 "configure"
7431 #include "confdefs.h"
7432 /* pthread test headers */
7433 #include <pthread.h>
7434 #ifndef NULL
7435 #define NULL (void*)0
7436 #endif
7437
7438 static void *task(p)
7439         void *p;
7440 {
7441         return (void *) (p == NULL);
7442 }
7443
7444 int main() {
7445
7446         /* pthread test function */
7447         pthread_t t;
7448         int status;
7449 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7450         /* This system (e.g. AIX) defaults detached; must override */
7451         pthread_attr_t attr;
7452
7453         status = pthread_attr_init(&attr);
7454         if( status ) exit( status );
7455
7456         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7457         if( status ) exit( status );
7458
7459 #define ATTR    &attr
7460 #else
7461 #if HAVE_PTHREADS_D4
7462 #define ATTR    pthread_attr_default
7463 #else
7464 #define ATTR    NULL
7465 #endif
7466 #endif
7467         /* make sure pthread_create() isn't just a stub */
7468         status = pthread_create(&t, ATTR, task, NULL);
7469         if( status ) exit( status );
7470
7471         /* make sure pthread_detach() isn't just a stub */
7472 #if HAVE_PTHREADS_D4
7473         status = pthread_detach( &t );
7474 #else
7475         status = pthread_detach( t );
7476 #endif
7477
7478 #ifdef HAVE_LINUX_THREADS
7479         pthread_kill_other_threads_np();
7480 #endif
7481
7482         exit( status );
7483
7484 ; return 0; }
7485 EOF
7486 if { (eval echo configure:7487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7487   rm -rf conftest*
7488   ol_cv_pthread_pthread=yes
7489 else
7490   echo "configure: failed program was:" >&5
7491   cat conftest.$ac_ext >&5
7492   rm -rf conftest*
7493   ol_cv_pthread_pthread=no
7494 fi
7495 rm -f conftest*
7496 else
7497   cat > conftest.$ac_ext <<EOF
7498 #line 7499 "configure"
7499 #include "confdefs.h"
7500 /* pthread test headers */
7501 #include <pthread.h>
7502 #ifndef NULL
7503 #define NULL (void*)0
7504 #endif
7505
7506 static void *task(p)
7507         void *p;
7508 {
7509         return (void *) (p == NULL);
7510 }
7511
7512
7513 int main(argc, argv)
7514         int argc;
7515         char **argv;
7516 {
7517
7518         /* pthread test function */
7519         pthread_t t;
7520         int status;
7521 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7522         /* This system (e.g. AIX) defaults detached; must override */
7523         pthread_attr_t attr;
7524
7525         status = pthread_attr_init(&attr);
7526         if( status ) exit( status );
7527
7528         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7529         if( status ) exit( status );
7530
7531 #define ATTR    &attr
7532 #else
7533 #if HAVE_PTHREADS_D4
7534 #define ATTR    pthread_attr_default
7535 #else
7536 #define ATTR    NULL
7537 #endif
7538 #endif
7539         /* make sure pthread_create() isn't just a stub */
7540         status = pthread_create(&t, ATTR, task, NULL);
7541         if( status ) exit( status );
7542
7543         /* make sure pthread_detach() isn't just a stub */
7544 #if HAVE_PTHREADS_D4
7545         status = pthread_detach( &t );
7546 #else
7547         status = pthread_detach( t );
7548 #endif
7549
7550 #ifdef HAVE_LINUX_THREADS
7551         pthread_kill_other_threads_np();
7552 #endif
7553
7554         exit( status );
7555
7556 }
7557
7558 EOF
7559 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7560 then
7561   ol_cv_pthread_pthread=yes
7562 else
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -fr conftest*
7566   ol_cv_pthread_pthread=no
7567 fi
7568 rm -fr conftest*
7569 fi
7570
7571
7572                 # restore the LIBS
7573                 LIBS="$ol_LIBS"
7574         
7575 fi
7576
7577 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7578
7579         if test $ol_cv_pthread_pthread = yes ; then
7580                 ol_link_pthreads="-pthread"
7581                 ol_link_threads=posix
7582         fi
7583 fi
7584
7585                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7586 if test "$ol_link_threads" = no ; then
7587         # try -pthreads
7588         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7589 echo "configure:7590: checking for pthread link with -pthreads" >&5
7590 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7591   echo $ac_n "(cached) $ac_c" 1>&6
7592 else
7593   
7594                 # save the flags
7595                 ol_LIBS="$LIBS"
7596                 LIBS="-pthreads $LIBS"
7597
7598                 if test "$cross_compiling" = yes; then
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 /* pthread test headers */
7603 #include <pthread.h>
7604 #ifndef NULL
7605 #define NULL (void*)0
7606 #endif
7607
7608 static void *task(p)
7609         void *p;
7610 {
7611         return (void *) (p == NULL);
7612 }
7613
7614 int main() {
7615
7616         /* pthread test function */
7617         pthread_t t;
7618         int status;
7619 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7620         /* This system (e.g. AIX) defaults detached; must override */
7621         pthread_attr_t attr;
7622
7623         status = pthread_attr_init(&attr);
7624         if( status ) exit( status );
7625
7626         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7627         if( status ) exit( status );
7628
7629 #define ATTR    &attr
7630 #else
7631 #if HAVE_PTHREADS_D4
7632 #define ATTR    pthread_attr_default
7633 #else
7634 #define ATTR    NULL
7635 #endif
7636 #endif
7637         /* make sure pthread_create() isn't just a stub */
7638         status = pthread_create(&t, ATTR, task, NULL);
7639         if( status ) exit( status );
7640
7641         /* make sure pthread_detach() isn't just a stub */
7642 #if HAVE_PTHREADS_D4
7643         status = pthread_detach( &t );
7644 #else
7645         status = pthread_detach( t );
7646 #endif
7647
7648 #ifdef HAVE_LINUX_THREADS
7649         pthread_kill_other_threads_np();
7650 #endif
7651
7652         exit( status );
7653
7654 ; return 0; }
7655 EOF
7656 if { (eval echo configure:7657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7657   rm -rf conftest*
7658   ol_cv_pthread_pthreads=yes
7659 else
7660   echo "configure: failed program was:" >&5
7661   cat conftest.$ac_ext >&5
7662   rm -rf conftest*
7663   ol_cv_pthread_pthreads=no
7664 fi
7665 rm -f conftest*
7666 else
7667   cat > conftest.$ac_ext <<EOF
7668 #line 7669 "configure"
7669 #include "confdefs.h"
7670 /* pthread test headers */
7671 #include <pthread.h>
7672 #ifndef NULL
7673 #define NULL (void*)0
7674 #endif
7675
7676 static void *task(p)
7677         void *p;
7678 {
7679         return (void *) (p == NULL);
7680 }
7681
7682
7683 int main(argc, argv)
7684         int argc;
7685         char **argv;
7686 {
7687
7688         /* pthread test function */
7689         pthread_t t;
7690         int status;
7691 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7692         /* This system (e.g. AIX) defaults detached; must override */
7693         pthread_attr_t attr;
7694
7695         status = pthread_attr_init(&attr);
7696         if( status ) exit( status );
7697
7698         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7699         if( status ) exit( status );
7700
7701 #define ATTR    &attr
7702 #else
7703 #if HAVE_PTHREADS_D4
7704 #define ATTR    pthread_attr_default
7705 #else
7706 #define ATTR    NULL
7707 #endif
7708 #endif
7709         /* make sure pthread_create() isn't just a stub */
7710         status = pthread_create(&t, ATTR, task, NULL);
7711         if( status ) exit( status );
7712
7713         /* make sure pthread_detach() isn't just a stub */
7714 #if HAVE_PTHREADS_D4
7715         status = pthread_detach( &t );
7716 #else
7717         status = pthread_detach( t );
7718 #endif
7719
7720 #ifdef HAVE_LINUX_THREADS
7721         pthread_kill_other_threads_np();
7722 #endif
7723
7724         exit( status );
7725
7726 }
7727
7728 EOF
7729 if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7730 then
7731   ol_cv_pthread_pthreads=yes
7732 else
7733   echo "configure: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   rm -fr conftest*
7736   ol_cv_pthread_pthreads=no
7737 fi
7738 rm -fr conftest*
7739 fi
7740
7741
7742                 # restore the LIBS
7743                 LIBS="$ol_LIBS"
7744         
7745 fi
7746
7747 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7748
7749         if test $ol_cv_pthread_pthreads = yes ; then
7750                 ol_link_pthreads="-pthreads"
7751                 ol_link_threads=posix
7752         fi
7753 fi
7754
7755                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7756 if test "$ol_link_threads" = no ; then
7757         # try -mthreads
7758         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7759 echo "configure:7760: checking for pthread link with -mthreads" >&5
7760 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7761   echo $ac_n "(cached) $ac_c" 1>&6
7762 else
7763   
7764                 # save the flags
7765                 ol_LIBS="$LIBS"
7766                 LIBS="-mthreads $LIBS"
7767
7768                 if test "$cross_compiling" = yes; then
7769   cat > conftest.$ac_ext <<EOF
7770 #line 7771 "configure"
7771 #include "confdefs.h"
7772 /* pthread test headers */
7773 #include <pthread.h>
7774 #ifndef NULL
7775 #define NULL (void*)0
7776 #endif
7777
7778 static void *task(p)
7779         void *p;
7780 {
7781         return (void *) (p == NULL);
7782 }
7783
7784 int main() {
7785
7786         /* pthread test function */
7787         pthread_t t;
7788         int status;
7789 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7790         /* This system (e.g. AIX) defaults detached; must override */
7791         pthread_attr_t attr;
7792
7793         status = pthread_attr_init(&attr);
7794         if( status ) exit( status );
7795
7796         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7797         if( status ) exit( status );
7798
7799 #define ATTR    &attr
7800 #else
7801 #if HAVE_PTHREADS_D4
7802 #define ATTR    pthread_attr_default
7803 #else
7804 #define ATTR    NULL
7805 #endif
7806 #endif
7807         /* make sure pthread_create() isn't just a stub */
7808         status = pthread_create(&t, ATTR, task, NULL);
7809         if( status ) exit( status );
7810
7811         /* make sure pthread_detach() isn't just a stub */
7812 #if HAVE_PTHREADS_D4
7813         status = pthread_detach( &t );
7814 #else
7815         status = pthread_detach( t );
7816 #endif
7817
7818 #ifdef HAVE_LINUX_THREADS
7819         pthread_kill_other_threads_np();
7820 #endif
7821
7822         exit( status );
7823
7824 ; return 0; }
7825 EOF
7826 if { (eval echo configure:7827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7827   rm -rf conftest*
7828   ol_cv_pthread_mthreads=yes
7829 else
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -rf conftest*
7833   ol_cv_pthread_mthreads=no
7834 fi
7835 rm -f conftest*
7836 else
7837   cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 /* pthread test headers */
7841 #include <pthread.h>
7842 #ifndef NULL
7843 #define NULL (void*)0
7844 #endif
7845
7846 static void *task(p)
7847         void *p;
7848 {
7849         return (void *) (p == NULL);
7850 }
7851
7852
7853 int main(argc, argv)
7854         int argc;
7855         char **argv;
7856 {
7857
7858         /* pthread test function */
7859         pthread_t t;
7860         int status;
7861 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7862         /* This system (e.g. AIX) defaults detached; must override */
7863         pthread_attr_t attr;
7864
7865         status = pthread_attr_init(&attr);
7866         if( status ) exit( status );
7867
7868         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7869         if( status ) exit( status );
7870
7871 #define ATTR    &attr
7872 #else
7873 #if HAVE_PTHREADS_D4
7874 #define ATTR    pthread_attr_default
7875 #else
7876 #define ATTR    NULL
7877 #endif
7878 #endif
7879         /* make sure pthread_create() isn't just a stub */
7880         status = pthread_create(&t, ATTR, task, NULL);
7881         if( status ) exit( status );
7882
7883         /* make sure pthread_detach() isn't just a stub */
7884 #if HAVE_PTHREADS_D4
7885         status = pthread_detach( &t );
7886 #else
7887         status = pthread_detach( t );
7888 #endif
7889
7890 #ifdef HAVE_LINUX_THREADS
7891         pthread_kill_other_threads_np();
7892 #endif
7893
7894         exit( status );
7895
7896 }
7897
7898 EOF
7899 if { (eval echo configure:7900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7900 then
7901   ol_cv_pthread_mthreads=yes
7902 else
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -fr conftest*
7906   ol_cv_pthread_mthreads=no
7907 fi
7908 rm -fr conftest*
7909 fi
7910
7911
7912                 # restore the LIBS
7913                 LIBS="$ol_LIBS"
7914         
7915 fi
7916
7917 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7918
7919         if test $ol_cv_pthread_mthreads = yes ; then
7920                 ol_link_pthreads="-mthreads"
7921                 ol_link_threads=posix
7922         fi
7923 fi
7924
7925                 # Pthread try link: -thread (ol_cv_pthread_thread)
7926 if test "$ol_link_threads" = no ; then
7927         # try -thread
7928         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7929 echo "configure:7930: checking for pthread link with -thread" >&5
7930 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7931   echo $ac_n "(cached) $ac_c" 1>&6
7932 else
7933   
7934                 # save the flags
7935                 ol_LIBS="$LIBS"
7936                 LIBS="-thread $LIBS"
7937
7938                 if test "$cross_compiling" = yes; then
7939   cat > conftest.$ac_ext <<EOF
7940 #line 7941 "configure"
7941 #include "confdefs.h"
7942 /* pthread test headers */
7943 #include <pthread.h>
7944 #ifndef NULL
7945 #define NULL (void*)0
7946 #endif
7947
7948 static void *task(p)
7949         void *p;
7950 {
7951         return (void *) (p == NULL);
7952 }
7953
7954 int main() {
7955
7956         /* pthread test function */
7957         pthread_t t;
7958         int status;
7959 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7960         /* This system (e.g. AIX) defaults detached; must override */
7961         pthread_attr_t attr;
7962
7963         status = pthread_attr_init(&attr);
7964         if( status ) exit( status );
7965
7966         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7967         if( status ) exit( status );
7968
7969 #define ATTR    &attr
7970 #else
7971 #if HAVE_PTHREADS_D4
7972 #define ATTR    pthread_attr_default
7973 #else
7974 #define ATTR    NULL
7975 #endif
7976 #endif
7977         /* make sure pthread_create() isn't just a stub */
7978         status = pthread_create(&t, ATTR, task, NULL);
7979         if( status ) exit( status );
7980
7981         /* make sure pthread_detach() isn't just a stub */
7982 #if HAVE_PTHREADS_D4
7983         status = pthread_detach( &t );
7984 #else
7985         status = pthread_detach( t );
7986 #endif
7987
7988 #ifdef HAVE_LINUX_THREADS
7989         pthread_kill_other_threads_np();
7990 #endif
7991
7992         exit( status );
7993
7994 ; return 0; }
7995 EOF
7996 if { (eval echo configure:7997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7997   rm -rf conftest*
7998   ol_cv_pthread_thread=yes
7999 else
8000   echo "configure: failed program was:" >&5
8001   cat conftest.$ac_ext >&5
8002   rm -rf conftest*
8003   ol_cv_pthread_thread=no
8004 fi
8005 rm -f conftest*
8006 else
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* pthread test headers */
8011 #include <pthread.h>
8012 #ifndef NULL
8013 #define NULL (void*)0
8014 #endif
8015
8016 static void *task(p)
8017         void *p;
8018 {
8019         return (void *) (p == NULL);
8020 }
8021
8022
8023 int main(argc, argv)
8024         int argc;
8025         char **argv;
8026 {
8027
8028         /* pthread test function */
8029         pthread_t t;
8030         int status;
8031 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8032         /* This system (e.g. AIX) defaults detached; must override */
8033         pthread_attr_t attr;
8034
8035         status = pthread_attr_init(&attr);
8036         if( status ) exit( status );
8037
8038         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8039         if( status ) exit( status );
8040
8041 #define ATTR    &attr
8042 #else
8043 #if HAVE_PTHREADS_D4
8044 #define ATTR    pthread_attr_default
8045 #else
8046 #define ATTR    NULL
8047 #endif
8048 #endif
8049         /* make sure pthread_create() isn't just a stub */
8050         status = pthread_create(&t, ATTR, task, NULL);
8051         if( status ) exit( status );
8052
8053         /* make sure pthread_detach() isn't just a stub */
8054 #if HAVE_PTHREADS_D4
8055         status = pthread_detach( &t );
8056 #else
8057         status = pthread_detach( t );
8058 #endif
8059
8060 #ifdef HAVE_LINUX_THREADS
8061         pthread_kill_other_threads_np();
8062 #endif
8063
8064         exit( status );
8065
8066 }
8067
8068 EOF
8069 if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8070 then
8071   ol_cv_pthread_thread=yes
8072 else
8073   echo "configure: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   rm -fr conftest*
8076   ol_cv_pthread_thread=no
8077 fi
8078 rm -fr conftest*
8079 fi
8080
8081
8082                 # restore the LIBS
8083                 LIBS="$ol_LIBS"
8084         
8085 fi
8086
8087 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8088
8089         if test $ol_cv_pthread_thread = yes ; then
8090                 ol_link_pthreads="-thread"
8091                 ol_link_threads=posix
8092         fi
8093 fi
8094
8095
8096                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8097 if test "$ol_link_threads" = no ; then
8098         # try -lpthread -lmach -lexc -lc_r
8099         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8100 echo "configure:8101: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8101 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8102   echo $ac_n "(cached) $ac_c" 1>&6
8103 else
8104   
8105                 # save the flags
8106                 ol_LIBS="$LIBS"
8107                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8108
8109                 if test "$cross_compiling" = yes; then
8110   cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 /* pthread test headers */
8114 #include <pthread.h>
8115 #ifndef NULL
8116 #define NULL (void*)0
8117 #endif
8118
8119 static void *task(p)
8120         void *p;
8121 {
8122         return (void *) (p == NULL);
8123 }
8124
8125 int main() {
8126
8127         /* pthread test function */
8128         pthread_t t;
8129         int status;
8130 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8131         /* This system (e.g. AIX) defaults detached; must override */
8132         pthread_attr_t attr;
8133
8134         status = pthread_attr_init(&attr);
8135         if( status ) exit( status );
8136
8137         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8138         if( status ) exit( status );
8139
8140 #define ATTR    &attr
8141 #else
8142 #if HAVE_PTHREADS_D4
8143 #define ATTR    pthread_attr_default
8144 #else
8145 #define ATTR    NULL
8146 #endif
8147 #endif
8148         /* make sure pthread_create() isn't just a stub */
8149         status = pthread_create(&t, ATTR, task, NULL);
8150         if( status ) exit( status );
8151
8152         /* make sure pthread_detach() isn't just a stub */
8153 #if HAVE_PTHREADS_D4
8154         status = pthread_detach( &t );
8155 #else
8156         status = pthread_detach( t );
8157 #endif
8158
8159 #ifdef HAVE_LINUX_THREADS
8160         pthread_kill_other_threads_np();
8161 #endif
8162
8163         exit( status );
8164
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8168   rm -rf conftest*
8169   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8175 fi
8176 rm -f conftest*
8177 else
8178   cat > conftest.$ac_ext <<EOF
8179 #line 8180 "configure"
8180 #include "confdefs.h"
8181 /* pthread test headers */
8182 #include <pthread.h>
8183 #ifndef NULL
8184 #define NULL (void*)0
8185 #endif
8186
8187 static void *task(p)
8188         void *p;
8189 {
8190         return (void *) (p == NULL);
8191 }
8192
8193
8194 int main(argc, argv)
8195         int argc;
8196         char **argv;
8197 {
8198
8199         /* pthread test function */
8200         pthread_t t;
8201         int status;
8202 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8203         /* This system (e.g. AIX) defaults detached; must override */
8204         pthread_attr_t attr;
8205
8206         status = pthread_attr_init(&attr);
8207         if( status ) exit( status );
8208
8209         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8210         if( status ) exit( status );
8211
8212 #define ATTR    &attr
8213 #else
8214 #if HAVE_PTHREADS_D4
8215 #define ATTR    pthread_attr_default
8216 #else
8217 #define ATTR    NULL
8218 #endif
8219 #endif
8220         /* make sure pthread_create() isn't just a stub */
8221         status = pthread_create(&t, ATTR, task, NULL);
8222         if( status ) exit( status );
8223
8224         /* make sure pthread_detach() isn't just a stub */
8225 #if HAVE_PTHREADS_D4
8226         status = pthread_detach( &t );
8227 #else
8228         status = pthread_detach( t );
8229 #endif
8230
8231 #ifdef HAVE_LINUX_THREADS
8232         pthread_kill_other_threads_np();
8233 #endif
8234
8235         exit( status );
8236
8237 }
8238
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8241 then
8242   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -fr conftest*
8247   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8248 fi
8249 rm -fr conftest*
8250 fi
8251
8252
8253                 # restore the LIBS
8254                 LIBS="$ol_LIBS"
8255         
8256 fi
8257
8258 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8259
8260         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8261                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8262                 ol_link_threads=posix
8263         fi
8264 fi
8265
8266                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8267 if test "$ol_link_threads" = no ; then
8268         # try -lpthread -lmach -lexc
8269         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8270 echo "configure:8271: checking for pthread link with -lpthread -lmach -lexc" >&5
8271 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   
8275                 # save the flags
8276                 ol_LIBS="$LIBS"
8277                 LIBS="-lpthread -lmach -lexc $LIBS"
8278
8279                 if test "$cross_compiling" = yes; then
8280   cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 /* pthread test headers */
8284 #include <pthread.h>
8285 #ifndef NULL
8286 #define NULL (void*)0
8287 #endif
8288
8289 static void *task(p)
8290         void *p;
8291 {
8292         return (void *) (p == NULL);
8293 }
8294
8295 int main() {
8296
8297         /* pthread test function */
8298         pthread_t t;
8299         int status;
8300 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8301         /* This system (e.g. AIX) defaults detached; must override */
8302         pthread_attr_t attr;
8303
8304         status = pthread_attr_init(&attr);
8305         if( status ) exit( status );
8306
8307         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8308         if( status ) exit( status );
8309
8310 #define ATTR    &attr
8311 #else
8312 #if HAVE_PTHREADS_D4
8313 #define ATTR    pthread_attr_default
8314 #else
8315 #define ATTR    NULL
8316 #endif
8317 #endif
8318         /* make sure pthread_create() isn't just a stub */
8319         status = pthread_create(&t, ATTR, task, NULL);
8320         if( status ) exit( status );
8321
8322         /* make sure pthread_detach() isn't just a stub */
8323 #if HAVE_PTHREADS_D4
8324         status = pthread_detach( &t );
8325 #else
8326         status = pthread_detach( t );
8327 #endif
8328
8329 #ifdef HAVE_LINUX_THREADS
8330         pthread_kill_other_threads_np();
8331 #endif
8332
8333         exit( status );
8334
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   ol_cv_pthread_lpthread_lmach_lexc=yes
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   ol_cv_pthread_lpthread_lmach_lexc=no
8345 fi
8346 rm -f conftest*
8347 else
8348   cat > conftest.$ac_ext <<EOF
8349 #line 8350 "configure"
8350 #include "confdefs.h"
8351 /* pthread test headers */
8352 #include <pthread.h>
8353 #ifndef NULL
8354 #define NULL (void*)0
8355 #endif
8356
8357 static void *task(p)
8358         void *p;
8359 {
8360         return (void *) (p == NULL);
8361 }
8362
8363
8364 int main(argc, argv)
8365         int argc;
8366         char **argv;
8367 {
8368
8369         /* pthread test function */
8370         pthread_t t;
8371         int status;
8372 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8373         /* This system (e.g. AIX) defaults detached; must override */
8374         pthread_attr_t attr;
8375
8376         status = pthread_attr_init(&attr);
8377         if( status ) exit( status );
8378
8379         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8380         if( status ) exit( status );
8381
8382 #define ATTR    &attr
8383 #else
8384 #if HAVE_PTHREADS_D4
8385 #define ATTR    pthread_attr_default
8386 #else
8387 #define ATTR    NULL
8388 #endif
8389 #endif
8390         /* make sure pthread_create() isn't just a stub */
8391         status = pthread_create(&t, ATTR, task, NULL);
8392         if( status ) exit( status );
8393
8394         /* make sure pthread_detach() isn't just a stub */
8395 #if HAVE_PTHREADS_D4
8396         status = pthread_detach( &t );
8397 #else
8398         status = pthread_detach( t );
8399 #endif
8400
8401 #ifdef HAVE_LINUX_THREADS
8402         pthread_kill_other_threads_np();
8403 #endif
8404
8405         exit( status );
8406
8407 }
8408
8409 EOF
8410 if { (eval echo configure:8411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8411 then
8412   ol_cv_pthread_lpthread_lmach_lexc=yes
8413 else
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -fr conftest*
8417   ol_cv_pthread_lpthread_lmach_lexc=no
8418 fi
8419 rm -fr conftest*
8420 fi
8421
8422
8423                 # restore the LIBS
8424                 LIBS="$ol_LIBS"
8425         
8426 fi
8427
8428 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8429
8430         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8431                 ol_link_pthreads="-lpthread -lmach -lexc"
8432                 ol_link_threads=posix
8433         fi
8434 fi
8435
8436
8437                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8438 if test "$ol_link_threads" = no ; then
8439         # try -lpthread -Wl,-woff,85
8440         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8441 echo "configure:8442: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8442 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8443   echo $ac_n "(cached) $ac_c" 1>&6
8444 else
8445   
8446                 # save the flags
8447                 ol_LIBS="$LIBS"
8448                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8449
8450                 if test "$cross_compiling" = yes; then
8451   cat > conftest.$ac_ext <<EOF
8452 #line 8453 "configure"
8453 #include "confdefs.h"
8454 /* pthread test headers */
8455 #include <pthread.h>
8456 #ifndef NULL
8457 #define NULL (void*)0
8458 #endif
8459
8460 static void *task(p)
8461         void *p;
8462 {
8463         return (void *) (p == NULL);
8464 }
8465
8466 int main() {
8467
8468         /* pthread test function */
8469         pthread_t t;
8470         int status;
8471 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8472         /* This system (e.g. AIX) defaults detached; must override */
8473         pthread_attr_t attr;
8474
8475         status = pthread_attr_init(&attr);
8476         if( status ) exit( status );
8477
8478         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8479         if( status ) exit( status );
8480
8481 #define ATTR    &attr
8482 #else
8483 #if HAVE_PTHREADS_D4
8484 #define ATTR    pthread_attr_default
8485 #else
8486 #define ATTR    NULL
8487 #endif
8488 #endif
8489         /* make sure pthread_create() isn't just a stub */
8490         status = pthread_create(&t, ATTR, task, NULL);
8491         if( status ) exit( status );
8492
8493         /* make sure pthread_detach() isn't just a stub */
8494 #if HAVE_PTHREADS_D4
8495         status = pthread_detach( &t );
8496 #else
8497         status = pthread_detach( t );
8498 #endif
8499
8500 #ifdef HAVE_LINUX_THREADS
8501         pthread_kill_other_threads_np();
8502 #endif
8503
8504         exit( status );
8505
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   ol_cv_pthread_lib_lpthread_woff=yes
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   ol_cv_pthread_lib_lpthread_woff=no
8516 fi
8517 rm -f conftest*
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* pthread test headers */
8523 #include <pthread.h>
8524 #ifndef NULL
8525 #define NULL (void*)0
8526 #endif
8527
8528 static void *task(p)
8529         void *p;
8530 {
8531         return (void *) (p == NULL);
8532 }
8533
8534
8535 int main(argc, argv)
8536         int argc;
8537         char **argv;
8538 {
8539
8540         /* pthread test function */
8541         pthread_t t;
8542         int status;
8543 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8544         /* This system (e.g. AIX) defaults detached; must override */
8545         pthread_attr_t attr;
8546
8547         status = pthread_attr_init(&attr);
8548         if( status ) exit( status );
8549
8550         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8551         if( status ) exit( status );
8552
8553 #define ATTR    &attr
8554 #else
8555 #if HAVE_PTHREADS_D4
8556 #define ATTR    pthread_attr_default
8557 #else
8558 #define ATTR    NULL
8559 #endif
8560 #endif
8561         /* make sure pthread_create() isn't just a stub */
8562         status = pthread_create(&t, ATTR, task, NULL);
8563         if( status ) exit( status );
8564
8565         /* make sure pthread_detach() isn't just a stub */
8566 #if HAVE_PTHREADS_D4
8567         status = pthread_detach( &t );
8568 #else
8569         status = pthread_detach( t );
8570 #endif
8571
8572 #ifdef HAVE_LINUX_THREADS
8573         pthread_kill_other_threads_np();
8574 #endif
8575
8576         exit( status );
8577
8578 }
8579
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8582 then
8583   ol_cv_pthread_lib_lpthread_woff=yes
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -fr conftest*
8588   ol_cv_pthread_lib_lpthread_woff=no
8589 fi
8590 rm -fr conftest*
8591 fi
8592
8593
8594                 # restore the LIBS
8595                 LIBS="$ol_LIBS"
8596         
8597 fi
8598
8599 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8600
8601         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8602                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8603                 ol_link_threads=posix
8604         fi
8605 fi
8606
8607
8608                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8609 if test "$ol_link_threads" = no ; then
8610         # try -lpthread
8611         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8612 echo "configure:8613: checking for pthread link with -lpthread" >&5
8613 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8614   echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616   
8617                 # save the flags
8618                 ol_LIBS="$LIBS"
8619                 LIBS="-lpthread $LIBS"
8620
8621                 if test "$cross_compiling" = yes; then
8622   cat > conftest.$ac_ext <<EOF
8623 #line 8624 "configure"
8624 #include "confdefs.h"
8625 /* pthread test headers */
8626 #include <pthread.h>
8627 #ifndef NULL
8628 #define NULL (void*)0
8629 #endif
8630
8631 static void *task(p)
8632         void *p;
8633 {
8634         return (void *) (p == NULL);
8635 }
8636
8637 int main() {
8638
8639         /* pthread test function */
8640         pthread_t t;
8641         int status;
8642 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8643         /* This system (e.g. AIX) defaults detached; must override */
8644         pthread_attr_t attr;
8645
8646         status = pthread_attr_init(&attr);
8647         if( status ) exit( status );
8648
8649         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8650         if( status ) exit( status );
8651
8652 #define ATTR    &attr
8653 #else
8654 #if HAVE_PTHREADS_D4
8655 #define ATTR    pthread_attr_default
8656 #else
8657 #define ATTR    NULL
8658 #endif
8659 #endif
8660         /* make sure pthread_create() isn't just a stub */
8661         status = pthread_create(&t, ATTR, task, NULL);
8662         if( status ) exit( status );
8663
8664         /* make sure pthread_detach() isn't just a stub */
8665 #if HAVE_PTHREADS_D4
8666         status = pthread_detach( &t );
8667 #else
8668         status = pthread_detach( t );
8669 #endif
8670
8671 #ifdef HAVE_LINUX_THREADS
8672         pthread_kill_other_threads_np();
8673 #endif
8674
8675         exit( status );
8676
8677 ; return 0; }
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8680   rm -rf conftest*
8681   ol_cv_pthread_lpthread=yes
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   ol_cv_pthread_lpthread=no
8687 fi
8688 rm -f conftest*
8689 else
8690   cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693 /* pthread test headers */
8694 #include <pthread.h>
8695 #ifndef NULL
8696 #define NULL (void*)0
8697 #endif
8698
8699 static void *task(p)
8700         void *p;
8701 {
8702         return (void *) (p == NULL);
8703 }
8704
8705
8706 int main(argc, argv)
8707         int argc;
8708         char **argv;
8709 {
8710
8711         /* pthread test function */
8712         pthread_t t;
8713         int status;
8714 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8715         /* This system (e.g. AIX) defaults detached; must override */
8716         pthread_attr_t attr;
8717
8718         status = pthread_attr_init(&attr);
8719         if( status ) exit( status );
8720
8721         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8722         if( status ) exit( status );
8723
8724 #define ATTR    &attr
8725 #else
8726 #if HAVE_PTHREADS_D4
8727 #define ATTR    pthread_attr_default
8728 #else
8729 #define ATTR    NULL
8730 #endif
8731 #endif
8732         /* make sure pthread_create() isn't just a stub */
8733         status = pthread_create(&t, ATTR, task, NULL);
8734         if( status ) exit( status );
8735
8736         /* make sure pthread_detach() isn't just a stub */
8737 #if HAVE_PTHREADS_D4
8738         status = pthread_detach( &t );
8739 #else
8740         status = pthread_detach( t );
8741 #endif
8742
8743 #ifdef HAVE_LINUX_THREADS
8744         pthread_kill_other_threads_np();
8745 #endif
8746
8747         exit( status );
8748
8749 }
8750
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8753 then
8754   ol_cv_pthread_lpthread=yes
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -fr conftest*
8759   ol_cv_pthread_lpthread=no
8760 fi
8761 rm -fr conftest*
8762 fi
8763
8764
8765                 # restore the LIBS
8766                 LIBS="$ol_LIBS"
8767         
8768 fi
8769
8770 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8771
8772         if test $ol_cv_pthread_lpthread = yes ; then
8773                 ol_link_pthreads="-lpthread"
8774                 ol_link_threads=posix
8775         fi
8776 fi
8777
8778                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8779 if test "$ol_link_threads" = no ; then
8780         # try -lc_r
8781         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8782 echo "configure:8783: checking for pthread link with -lc_r" >&5
8783 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   
8787                 # save the flags
8788                 ol_LIBS="$LIBS"
8789                 LIBS="-lc_r $LIBS"
8790
8791                 if test "$cross_compiling" = yes; then
8792   cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 /* pthread test headers */
8796 #include <pthread.h>
8797 #ifndef NULL
8798 #define NULL (void*)0
8799 #endif
8800
8801 static void *task(p)
8802         void *p;
8803 {
8804         return (void *) (p == NULL);
8805 }
8806
8807 int main() {
8808
8809         /* pthread test function */
8810         pthread_t t;
8811         int status;
8812 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8813         /* This system (e.g. AIX) defaults detached; must override */
8814         pthread_attr_t attr;
8815
8816         status = pthread_attr_init(&attr);
8817         if( status ) exit( status );
8818
8819         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8820         if( status ) exit( status );
8821
8822 #define ATTR    &attr
8823 #else
8824 #if HAVE_PTHREADS_D4
8825 #define ATTR    pthread_attr_default
8826 #else
8827 #define ATTR    NULL
8828 #endif
8829 #endif
8830         /* make sure pthread_create() isn't just a stub */
8831         status = pthread_create(&t, ATTR, task, NULL);
8832         if( status ) exit( status );
8833
8834         /* make sure pthread_detach() isn't just a stub */
8835 #if HAVE_PTHREADS_D4
8836         status = pthread_detach( &t );
8837 #else
8838         status = pthread_detach( t );
8839 #endif
8840
8841 #ifdef HAVE_LINUX_THREADS
8842         pthread_kill_other_threads_np();
8843 #endif
8844
8845         exit( status );
8846
8847 ; return 0; }
8848 EOF
8849 if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8850   rm -rf conftest*
8851   ol_cv_pthread_lc_r=yes
8852 else
8853   echo "configure: failed program was:" >&5
8854   cat conftest.$ac_ext >&5
8855   rm -rf conftest*
8856   ol_cv_pthread_lc_r=no
8857 fi
8858 rm -f conftest*
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 /* pthread test headers */
8864 #include <pthread.h>
8865 #ifndef NULL
8866 #define NULL (void*)0
8867 #endif
8868
8869 static void *task(p)
8870         void *p;
8871 {
8872         return (void *) (p == NULL);
8873 }
8874
8875
8876 int main(argc, argv)
8877         int argc;
8878         char **argv;
8879 {
8880
8881         /* pthread test function */
8882         pthread_t t;
8883         int status;
8884 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8885         /* This system (e.g. AIX) defaults detached; must override */
8886         pthread_attr_t attr;
8887
8888         status = pthread_attr_init(&attr);
8889         if( status ) exit( status );
8890
8891         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8892         if( status ) exit( status );
8893
8894 #define ATTR    &attr
8895 #else
8896 #if HAVE_PTHREADS_D4
8897 #define ATTR    pthread_attr_default
8898 #else
8899 #define ATTR    NULL
8900 #endif
8901 #endif
8902         /* make sure pthread_create() isn't just a stub */
8903         status = pthread_create(&t, ATTR, task, NULL);
8904         if( status ) exit( status );
8905
8906         /* make sure pthread_detach() isn't just a stub */
8907 #if HAVE_PTHREADS_D4
8908         status = pthread_detach( &t );
8909 #else
8910         status = pthread_detach( t );
8911 #endif
8912
8913 #ifdef HAVE_LINUX_THREADS
8914         pthread_kill_other_threads_np();
8915 #endif
8916
8917         exit( status );
8918
8919 }
8920
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8923 then
8924   ol_cv_pthread_lc_r=yes
8925 else
8926   echo "configure: failed program was:" >&5
8927   cat conftest.$ac_ext >&5
8928   rm -fr conftest*
8929   ol_cv_pthread_lc_r=no
8930 fi
8931 rm -fr conftest*
8932 fi
8933
8934
8935                 # restore the LIBS
8936                 LIBS="$ol_LIBS"
8937         
8938 fi
8939
8940 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8941
8942         if test $ol_cv_pthread_lc_r = yes ; then
8943                 ol_link_pthreads="-lc_r"
8944                 ol_link_threads=posix
8945         fi
8946 fi
8947
8948
8949                 # Pthread try link: -threads (ol_cv_pthread_threads)
8950 if test "$ol_link_threads" = no ; then
8951         # try -threads
8952         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8953 echo "configure:8954: checking for pthread link with -threads" >&5
8954 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8955   echo $ac_n "(cached) $ac_c" 1>&6
8956 else
8957   
8958                 # save the flags
8959                 ol_LIBS="$LIBS"
8960                 LIBS="-threads $LIBS"
8961
8962                 if test "$cross_compiling" = yes; then
8963   cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* pthread test headers */
8967 #include <pthread.h>
8968 #ifndef NULL
8969 #define NULL (void*)0
8970 #endif
8971
8972 static void *task(p)
8973         void *p;
8974 {
8975         return (void *) (p == NULL);
8976 }
8977
8978 int main() {
8979
8980         /* pthread test function */
8981         pthread_t t;
8982         int status;
8983 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8984         /* This system (e.g. AIX) defaults detached; must override */
8985         pthread_attr_t attr;
8986
8987         status = pthread_attr_init(&attr);
8988         if( status ) exit( status );
8989
8990         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8991         if( status ) exit( status );
8992
8993 #define ATTR    &attr
8994 #else
8995 #if HAVE_PTHREADS_D4
8996 #define ATTR    pthread_attr_default
8997 #else
8998 #define ATTR    NULL
8999 #endif
9000 #endif
9001         /* make sure pthread_create() isn't just a stub */
9002         status = pthread_create(&t, ATTR, task, NULL);
9003         if( status ) exit( status );
9004
9005         /* make sure pthread_detach() isn't just a stub */
9006 #if HAVE_PTHREADS_D4
9007         status = pthread_detach( &t );
9008 #else
9009         status = pthread_detach( t );
9010 #endif
9011
9012 #ifdef HAVE_LINUX_THREADS
9013         pthread_kill_other_threads_np();
9014 #endif
9015
9016         exit( status );
9017
9018 ; return 0; }
9019 EOF
9020 if { (eval echo configure:9021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9021   rm -rf conftest*
9022   ol_cv_pthread_threads=yes
9023 else
9024   echo "configure: failed program was:" >&5
9025   cat conftest.$ac_ext >&5
9026   rm -rf conftest*
9027   ol_cv_pthread_threads=no
9028 fi
9029 rm -f conftest*
9030 else
9031   cat > conftest.$ac_ext <<EOF
9032 #line 9033 "configure"
9033 #include "confdefs.h"
9034 /* pthread test headers */
9035 #include <pthread.h>
9036 #ifndef NULL
9037 #define NULL (void*)0
9038 #endif
9039
9040 static void *task(p)
9041         void *p;
9042 {
9043         return (void *) (p == NULL);
9044 }
9045
9046
9047 int main(argc, argv)
9048         int argc;
9049         char **argv;
9050 {
9051
9052         /* pthread test function */
9053         pthread_t t;
9054         int status;
9055 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9056         /* This system (e.g. AIX) defaults detached; must override */
9057         pthread_attr_t attr;
9058
9059         status = pthread_attr_init(&attr);
9060         if( status ) exit( status );
9061
9062         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9063         if( status ) exit( status );
9064
9065 #define ATTR    &attr
9066 #else
9067 #if HAVE_PTHREADS_D4
9068 #define ATTR    pthread_attr_default
9069 #else
9070 #define ATTR    NULL
9071 #endif
9072 #endif
9073         /* make sure pthread_create() isn't just a stub */
9074         status = pthread_create(&t, ATTR, task, NULL);
9075         if( status ) exit( status );
9076
9077         /* make sure pthread_detach() isn't just a stub */
9078 #if HAVE_PTHREADS_D4
9079         status = pthread_detach( &t );
9080 #else
9081         status = pthread_detach( t );
9082 #endif
9083
9084 #ifdef HAVE_LINUX_THREADS
9085         pthread_kill_other_threads_np();
9086 #endif
9087
9088         exit( status );
9089
9090 }
9091
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9094 then
9095   ol_cv_pthread_threads=yes
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -fr conftest*
9100   ol_cv_pthread_threads=no
9101 fi
9102 rm -fr conftest*
9103 fi
9104
9105
9106                 # restore the LIBS
9107                 LIBS="$ol_LIBS"
9108         
9109 fi
9110
9111 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9112
9113         if test $ol_cv_pthread_threads = yes ; then
9114                 ol_link_pthreads="-threads"
9115                 ol_link_threads=posix
9116         fi
9117 fi
9118
9119
9120                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9121 if test "$ol_link_threads" = no ; then
9122         # try -lpthreads -lmach -lexc -lc_r
9123         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9124 echo "configure:9125: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9125 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9126   echo $ac_n "(cached) $ac_c" 1>&6
9127 else
9128   
9129                 # save the flags
9130                 ol_LIBS="$LIBS"
9131                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9132
9133                 if test "$cross_compiling" = yes; then
9134   cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 /* pthread test headers */
9138 #include <pthread.h>
9139 #ifndef NULL
9140 #define NULL (void*)0
9141 #endif
9142
9143 static void *task(p)
9144         void *p;
9145 {
9146         return (void *) (p == NULL);
9147 }
9148
9149 int main() {
9150
9151         /* pthread test function */
9152         pthread_t t;
9153         int status;
9154 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9155         /* This system (e.g. AIX) defaults detached; must override */
9156         pthread_attr_t attr;
9157
9158         status = pthread_attr_init(&attr);
9159         if( status ) exit( status );
9160
9161         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9162         if( status ) exit( status );
9163
9164 #define ATTR    &attr
9165 #else
9166 #if HAVE_PTHREADS_D4
9167 #define ATTR    pthread_attr_default
9168 #else
9169 #define ATTR    NULL
9170 #endif
9171 #endif
9172         /* make sure pthread_create() isn't just a stub */
9173         status = pthread_create(&t, ATTR, task, NULL);
9174         if( status ) exit( status );
9175
9176         /* make sure pthread_detach() isn't just a stub */
9177 #if HAVE_PTHREADS_D4
9178         status = pthread_detach( &t );
9179 #else
9180         status = pthread_detach( t );
9181 #endif
9182
9183 #ifdef HAVE_LINUX_THREADS
9184         pthread_kill_other_threads_np();
9185 #endif
9186
9187         exit( status );
9188
9189 ; return 0; }
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192   rm -rf conftest*
9193   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9199 fi
9200 rm -f conftest*
9201 else
9202   cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 /* pthread test headers */
9206 #include <pthread.h>
9207 #ifndef NULL
9208 #define NULL (void*)0
9209 #endif
9210
9211 static void *task(p)
9212         void *p;
9213 {
9214         return (void *) (p == NULL);
9215 }
9216
9217
9218 int main(argc, argv)
9219         int argc;
9220         char **argv;
9221 {
9222
9223         /* pthread test function */
9224         pthread_t t;
9225         int status;
9226 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9227         /* This system (e.g. AIX) defaults detached; must override */
9228         pthread_attr_t attr;
9229
9230         status = pthread_attr_init(&attr);
9231         if( status ) exit( status );
9232
9233         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9234         if( status ) exit( status );
9235
9236 #define ATTR    &attr
9237 #else
9238 #if HAVE_PTHREADS_D4
9239 #define ATTR    pthread_attr_default
9240 #else
9241 #define ATTR    NULL
9242 #endif
9243 #endif
9244         /* make sure pthread_create() isn't just a stub */
9245         status = pthread_create(&t, ATTR, task, NULL);
9246         if( status ) exit( status );
9247
9248         /* make sure pthread_detach() isn't just a stub */
9249 #if HAVE_PTHREADS_D4
9250         status = pthread_detach( &t );
9251 #else
9252         status = pthread_detach( t );
9253 #endif
9254
9255 #ifdef HAVE_LINUX_THREADS
9256         pthread_kill_other_threads_np();
9257 #endif
9258
9259         exit( status );
9260
9261 }
9262
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9265 then
9266   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -fr conftest*
9271   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9272 fi
9273 rm -fr conftest*
9274 fi
9275
9276
9277                 # restore the LIBS
9278                 LIBS="$ol_LIBS"
9279         
9280 fi
9281
9282 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9283
9284         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9285                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9286                 ol_link_threads=posix
9287         fi
9288 fi
9289
9290                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9291 if test "$ol_link_threads" = no ; then
9292         # try -lpthreads -lmach -lexc
9293         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9294 echo "configure:9295: checking for pthread link with -lpthreads -lmach -lexc" >&5
9295 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9296   echo $ac_n "(cached) $ac_c" 1>&6
9297 else
9298   
9299                 # save the flags
9300                 ol_LIBS="$LIBS"
9301                 LIBS="-lpthreads -lmach -lexc $LIBS"
9302
9303                 if test "$cross_compiling" = yes; then
9304   cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307 /* pthread test headers */
9308 #include <pthread.h>
9309 #ifndef NULL
9310 #define NULL (void*)0
9311 #endif
9312
9313 static void *task(p)
9314         void *p;
9315 {
9316         return (void *) (p == NULL);
9317 }
9318
9319 int main() {
9320
9321         /* pthread test function */
9322         pthread_t t;
9323         int status;
9324 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9325         /* This system (e.g. AIX) defaults detached; must override */
9326         pthread_attr_t attr;
9327
9328         status = pthread_attr_init(&attr);
9329         if( status ) exit( status );
9330
9331         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9332         if( status ) exit( status );
9333
9334 #define ATTR    &attr
9335 #else
9336 #if HAVE_PTHREADS_D4
9337 #define ATTR    pthread_attr_default
9338 #else
9339 #define ATTR    NULL
9340 #endif
9341 #endif
9342         /* make sure pthread_create() isn't just a stub */
9343         status = pthread_create(&t, ATTR, task, NULL);
9344         if( status ) exit( status );
9345
9346         /* make sure pthread_detach() isn't just a stub */
9347 #if HAVE_PTHREADS_D4
9348         status = pthread_detach( &t );
9349 #else
9350         status = pthread_detach( t );
9351 #endif
9352
9353 #ifdef HAVE_LINUX_THREADS
9354         pthread_kill_other_threads_np();
9355 #endif
9356
9357         exit( status );
9358
9359 ; return 0; }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9362   rm -rf conftest*
9363   ol_cv_pthread_lpthreads_lmach_lexc=yes
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -rf conftest*
9368   ol_cv_pthread_lpthreads_lmach_lexc=no
9369 fi
9370 rm -f conftest*
9371 else
9372   cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 /* pthread test headers */
9376 #include <pthread.h>
9377 #ifndef NULL
9378 #define NULL (void*)0
9379 #endif
9380
9381 static void *task(p)
9382         void *p;
9383 {
9384         return (void *) (p == NULL);
9385 }
9386
9387
9388 int main(argc, argv)
9389         int argc;
9390         char **argv;
9391 {
9392
9393         /* pthread test function */
9394         pthread_t t;
9395         int status;
9396 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9397         /* This system (e.g. AIX) defaults detached; must override */
9398         pthread_attr_t attr;
9399
9400         status = pthread_attr_init(&attr);
9401         if( status ) exit( status );
9402
9403         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9404         if( status ) exit( status );
9405
9406 #define ATTR    &attr
9407 #else
9408 #if HAVE_PTHREADS_D4
9409 #define ATTR    pthread_attr_default
9410 #else
9411 #define ATTR    NULL
9412 #endif
9413 #endif
9414         /* make sure pthread_create() isn't just a stub */
9415         status = pthread_create(&t, ATTR, task, NULL);
9416         if( status ) exit( status );
9417
9418         /* make sure pthread_detach() isn't just a stub */
9419 #if HAVE_PTHREADS_D4
9420         status = pthread_detach( &t );
9421 #else
9422         status = pthread_detach( t );
9423 #endif
9424
9425 #ifdef HAVE_LINUX_THREADS
9426         pthread_kill_other_threads_np();
9427 #endif
9428
9429         exit( status );
9430
9431 }
9432
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9435 then
9436   ol_cv_pthread_lpthreads_lmach_lexc=yes
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -fr conftest*
9441   ol_cv_pthread_lpthreads_lmach_lexc=no
9442 fi
9443 rm -fr conftest*
9444 fi
9445
9446
9447                 # restore the LIBS
9448                 LIBS="$ol_LIBS"
9449         
9450 fi
9451
9452 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9453
9454         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9455                 ol_link_pthreads="-lpthreads -lmach -lexc"
9456                 ol_link_threads=posix
9457         fi
9458 fi
9459
9460                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9461 if test "$ol_link_threads" = no ; then
9462         # try -lpthreads -lexc
9463         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9464 echo "configure:9465: checking for pthread link with -lpthreads -lexc" >&5
9465 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9466   echo $ac_n "(cached) $ac_c" 1>&6
9467 else
9468   
9469                 # save the flags
9470                 ol_LIBS="$LIBS"
9471                 LIBS="-lpthreads -lexc $LIBS"
9472
9473                 if test "$cross_compiling" = yes; then
9474   cat > conftest.$ac_ext <<EOF
9475 #line 9476 "configure"
9476 #include "confdefs.h"
9477 /* pthread test headers */
9478 #include <pthread.h>
9479 #ifndef NULL
9480 #define NULL (void*)0
9481 #endif
9482
9483 static void *task(p)
9484         void *p;
9485 {
9486         return (void *) (p == NULL);
9487 }
9488
9489 int main() {
9490
9491         /* pthread test function */
9492         pthread_t t;
9493         int status;
9494 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9495         /* This system (e.g. AIX) defaults detached; must override */
9496         pthread_attr_t attr;
9497
9498         status = pthread_attr_init(&attr);
9499         if( status ) exit( status );
9500
9501         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9502         if( status ) exit( status );
9503
9504 #define ATTR    &attr
9505 #else
9506 #if HAVE_PTHREADS_D4
9507 #define ATTR    pthread_attr_default
9508 #else
9509 #define ATTR    NULL
9510 #endif
9511 #endif
9512         /* make sure pthread_create() isn't just a stub */
9513         status = pthread_create(&t, ATTR, task, NULL);
9514         if( status ) exit( status );
9515
9516         /* make sure pthread_detach() isn't just a stub */
9517 #if HAVE_PTHREADS_D4
9518         status = pthread_detach( &t );
9519 #else
9520         status = pthread_detach( t );
9521 #endif
9522
9523 #ifdef HAVE_LINUX_THREADS
9524         pthread_kill_other_threads_np();
9525 #endif
9526
9527         exit( status );
9528
9529 ; return 0; }
9530 EOF
9531 if { (eval echo configure:9532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9532   rm -rf conftest*
9533   ol_cv_pthread_lpthreads_lexc=yes
9534 else
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   ol_cv_pthread_lpthreads_lexc=no
9539 fi
9540 rm -f conftest*
9541 else
9542   cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 /* pthread test headers */
9546 #include <pthread.h>
9547 #ifndef NULL
9548 #define NULL (void*)0
9549 #endif
9550
9551 static void *task(p)
9552         void *p;
9553 {
9554         return (void *) (p == NULL);
9555 }
9556
9557
9558 int main(argc, argv)
9559         int argc;
9560         char **argv;
9561 {
9562
9563         /* pthread test function */
9564         pthread_t t;
9565         int status;
9566 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9567         /* This system (e.g. AIX) defaults detached; must override */
9568         pthread_attr_t attr;
9569
9570         status = pthread_attr_init(&attr);
9571         if( status ) exit( status );
9572
9573         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9574         if( status ) exit( status );
9575
9576 #define ATTR    &attr
9577 #else
9578 #if HAVE_PTHREADS_D4
9579 #define ATTR    pthread_attr_default
9580 #else
9581 #define ATTR    NULL
9582 #endif
9583 #endif
9584         /* make sure pthread_create() isn't just a stub */
9585         status = pthread_create(&t, ATTR, task, NULL);
9586         if( status ) exit( status );
9587
9588         /* make sure pthread_detach() isn't just a stub */
9589 #if HAVE_PTHREADS_D4
9590         status = pthread_detach( &t );
9591 #else
9592         status = pthread_detach( t );
9593 #endif
9594
9595 #ifdef HAVE_LINUX_THREADS
9596         pthread_kill_other_threads_np();
9597 #endif
9598
9599         exit( status );
9600
9601 }
9602
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9605 then
9606   ol_cv_pthread_lpthreads_lexc=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -fr conftest*
9611   ol_cv_pthread_lpthreads_lexc=no
9612 fi
9613 rm -fr conftest*
9614 fi
9615
9616
9617                 # restore the LIBS
9618                 LIBS="$ol_LIBS"
9619         
9620 fi
9621
9622 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9623
9624         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9625                 ol_link_pthreads="-lpthreads -lexc"
9626                 ol_link_threads=posix
9627         fi
9628 fi
9629
9630
9631                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9632 if test "$ol_link_threads" = no ; then
9633         # try -lpthreads
9634         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9635 echo "configure:9636: checking for pthread link with -lpthreads" >&5
9636 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9637   echo $ac_n "(cached) $ac_c" 1>&6
9638 else
9639   
9640                 # save the flags
9641                 ol_LIBS="$LIBS"
9642                 LIBS="-lpthreads $LIBS"
9643
9644                 if test "$cross_compiling" = yes; then
9645   cat > conftest.$ac_ext <<EOF
9646 #line 9647 "configure"
9647 #include "confdefs.h"
9648 /* pthread test headers */
9649 #include <pthread.h>
9650 #ifndef NULL
9651 #define NULL (void*)0
9652 #endif
9653
9654 static void *task(p)
9655         void *p;
9656 {
9657         return (void *) (p == NULL);
9658 }
9659
9660 int main() {
9661
9662         /* pthread test function */
9663         pthread_t t;
9664         int status;
9665 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9666         /* This system (e.g. AIX) defaults detached; must override */
9667         pthread_attr_t attr;
9668
9669         status = pthread_attr_init(&attr);
9670         if( status ) exit( status );
9671
9672         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9673         if( status ) exit( status );
9674
9675 #define ATTR    &attr
9676 #else
9677 #if HAVE_PTHREADS_D4
9678 #define ATTR    pthread_attr_default
9679 #else
9680 #define ATTR    NULL
9681 #endif
9682 #endif
9683         /* make sure pthread_create() isn't just a stub */
9684         status = pthread_create(&t, ATTR, task, NULL);
9685         if( status ) exit( status );
9686
9687         /* make sure pthread_detach() isn't just a stub */
9688 #if HAVE_PTHREADS_D4
9689         status = pthread_detach( &t );
9690 #else
9691         status = pthread_detach( t );
9692 #endif
9693
9694 #ifdef HAVE_LINUX_THREADS
9695         pthread_kill_other_threads_np();
9696 #endif
9697
9698         exit( status );
9699
9700 ; return 0; }
9701 EOF
9702 if { (eval echo configure:9703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9703   rm -rf conftest*
9704   ol_cv_pthread_lib_lpthreads=yes
9705 else
9706   echo "configure: failed program was:" >&5
9707   cat conftest.$ac_ext >&5
9708   rm -rf conftest*
9709   ol_cv_pthread_lib_lpthreads=no
9710 fi
9711 rm -f conftest*
9712 else
9713   cat > conftest.$ac_ext <<EOF
9714 #line 9715 "configure"
9715 #include "confdefs.h"
9716 /* pthread test headers */
9717 #include <pthread.h>
9718 #ifndef NULL
9719 #define NULL (void*)0
9720 #endif
9721
9722 static void *task(p)
9723         void *p;
9724 {
9725         return (void *) (p == NULL);
9726 }
9727
9728
9729 int main(argc, argv)
9730         int argc;
9731         char **argv;
9732 {
9733
9734         /* pthread test function */
9735         pthread_t t;
9736         int status;
9737 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9738         /* This system (e.g. AIX) defaults detached; must override */
9739         pthread_attr_t attr;
9740
9741         status = pthread_attr_init(&attr);
9742         if( status ) exit( status );
9743
9744         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9745         if( status ) exit( status );
9746
9747 #define ATTR    &attr
9748 #else
9749 #if HAVE_PTHREADS_D4
9750 #define ATTR    pthread_attr_default
9751 #else
9752 #define ATTR    NULL
9753 #endif
9754 #endif
9755         /* make sure pthread_create() isn't just a stub */
9756         status = pthread_create(&t, ATTR, task, NULL);
9757         if( status ) exit( status );
9758
9759         /* make sure pthread_detach() isn't just a stub */
9760 #if HAVE_PTHREADS_D4
9761         status = pthread_detach( &t );
9762 #else
9763         status = pthread_detach( t );
9764 #endif
9765
9766 #ifdef HAVE_LINUX_THREADS
9767         pthread_kill_other_threads_np();
9768 #endif
9769
9770         exit( status );
9771
9772 }
9773
9774 EOF
9775 if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9776 then
9777   ol_cv_pthread_lib_lpthreads=yes
9778 else
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -fr conftest*
9782   ol_cv_pthread_lib_lpthreads=no
9783 fi
9784 rm -fr conftest*
9785 fi
9786
9787
9788                 # restore the LIBS
9789                 LIBS="$ol_LIBS"
9790         
9791 fi
9792
9793 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9794
9795         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9796                 ol_link_pthreads="-lpthreads"
9797                 ol_link_threads=posix
9798         fi
9799 fi
9800
9801
9802                 if test $ol_link_threads != no ; then
9803                         cat >> confdefs.h <<\EOF
9804 #define HAVE_PTHREADS 1
9805 EOF
9806
9807
9808                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9809
9810                                                 save_CPPFLAGS="$CPPFLAGS"
9811                         save_LIBS="$LIBS"
9812                         LIBS="$LTHREAD_LIBS $LIBS"
9813
9814                                                                                                 for ac_func in sched_yield pthread_yield
9815 do
9816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9817 echo "configure:9818: checking for $ac_func" >&5
9818 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9819   echo $ac_n "(cached) $ac_c" 1>&6
9820 else
9821   cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824 /* System header to define __stub macros and hopefully few prototypes,
9825     which can conflict with char $ac_func(); below.  */
9826 #include <assert.h>
9827 /* Override any gcc2 internal prototype to avoid an error.  */
9828 /* We use char because int might match the return type of a gcc2
9829     builtin and then its argument prototype would still apply.  */
9830 char $ac_func();
9831 char (*f)();
9832
9833 int main() {
9834
9835 /* The GNU C library defines this for functions which it implements
9836     to always fail with ENOSYS.  Some functions are actually named
9837     something starting with __ and the normal name is an alias.  */
9838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9839 choke me
9840 #else
9841 f = $ac_func;
9842 #endif
9843
9844 ; return 0; }
9845 EOF
9846 if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9847   rm -rf conftest*
9848   eval "ac_cv_func_$ac_func=yes"
9849 else
9850   echo "configure: failed program was:" >&5
9851   cat conftest.$ac_ext >&5
9852   rm -rf conftest*
9853   eval "ac_cv_func_$ac_func=no"
9854 fi
9855 rm -f conftest*
9856 fi
9857
9858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9859   echo "$ac_t""yes" 1>&6
9860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9861   cat >> confdefs.h <<EOF
9862 #define $ac_tr_func 1
9863 EOF
9864  
9865 else
9866   echo "$ac_t""no" 1>&6
9867 fi
9868 done
9869
9870
9871                         if test $ac_cv_func_sched_yield = no -a \
9872                                 $ac_cv_func_pthread_yield = no ; then
9873                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9874 echo "configure:9875: checking for sched_yield in -lrt" >&5
9875 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9876 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9877   echo $ac_n "(cached) $ac_c" 1>&6
9878 else
9879   ac_save_LIBS="$LIBS"
9880 LIBS="-lrt  $LIBS"
9881 cat > conftest.$ac_ext <<EOF
9882 #line 9883 "configure"
9883 #include "confdefs.h"
9884 /* Override any gcc2 internal prototype to avoid an error.  */
9885 /* We use char because int might match the return type of a gcc2
9886     builtin and then its argument prototype would still apply.  */
9887 char sched_yield();
9888
9889 int main() {
9890 sched_yield()
9891 ; return 0; }
9892 EOF
9893 if { (eval echo configure:9894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9894   rm -rf conftest*
9895   eval "ac_cv_lib_$ac_lib_var=yes"
9896 else
9897   echo "configure: failed program was:" >&5
9898   cat conftest.$ac_ext >&5
9899   rm -rf conftest*
9900   eval "ac_cv_lib_$ac_lib_var=no"
9901 fi
9902 rm -f conftest*
9903 LIBS="$ac_save_LIBS"
9904
9905 fi
9906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9907   echo "$ac_t""yes" 1>&6
9908   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9909                                         cat >> confdefs.h <<\EOF
9910 #define HAVE_SCHED_YIELD 1
9911 EOF
9912
9913                                         ac_cv_func_sched_yield=yes
9914 else
9915   echo "$ac_t""no" 1>&6
9916 ac_cv_func_sched_yield=no
9917 fi
9918
9919                         fi
9920                         if test $ac_cv_func_sched_yield = no -a \
9921                                 $ac_cv_func_pthread_yield = no ; then
9922                                                                                                 for ac_func in thr_yield
9923 do
9924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9925 echo "configure:9926: checking for $ac_func" >&5
9926 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9927   echo $ac_n "(cached) $ac_c" 1>&6
9928 else
9929   cat > conftest.$ac_ext <<EOF
9930 #line 9931 "configure"
9931 #include "confdefs.h"
9932 /* System header to define __stub macros and hopefully few prototypes,
9933     which can conflict with char $ac_func(); below.  */
9934 #include <assert.h>
9935 /* Override any gcc2 internal prototype to avoid an error.  */
9936 /* We use char because int might match the return type of a gcc2
9937     builtin and then its argument prototype would still apply.  */
9938 char $ac_func();
9939 char (*f)();
9940
9941 int main() {
9942
9943 /* The GNU C library defines this for functions which it implements
9944     to always fail with ENOSYS.  Some functions are actually named
9945     something starting with __ and the normal name is an alias.  */
9946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9947 choke me
9948 #else
9949 f = $ac_func;
9950 #endif
9951
9952 ; return 0; }
9953 EOF
9954 if { (eval echo configure:9955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9955   rm -rf conftest*
9956   eval "ac_cv_func_$ac_func=yes"
9957 else
9958   echo "configure: failed program was:" >&5
9959   cat conftest.$ac_ext >&5
9960   rm -rf conftest*
9961   eval "ac_cv_func_$ac_func=no"
9962 fi
9963 rm -f conftest*
9964 fi
9965
9966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9967   echo "$ac_t""yes" 1>&6
9968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9969   cat >> confdefs.h <<EOF
9970 #define $ac_tr_func 1
9971 EOF
9972  
9973 else
9974   echo "$ac_t""no" 1>&6
9975 fi
9976 done
9977
9978                         fi
9979                         if test $ac_cv_func_sched_yield = no -a \
9980                                 $ac_cv_func_pthread_yield = no -a \
9981                                 "$ac_cv_func_thr_yield" = no ; then
9982                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9983                         fi
9984
9985                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9986 do
9987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9988 echo "configure:9989: checking for $ac_func" >&5
9989 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9990   echo $ac_n "(cached) $ac_c" 1>&6
9991 else
9992   cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 /* System header to define __stub macros and hopefully few prototypes,
9996     which can conflict with char $ac_func(); below.  */
9997 #include <assert.h>
9998 /* Override any gcc2 internal prototype to avoid an error.  */
9999 /* We use char because int might match the return type of a gcc2
10000     builtin and then its argument prototype would still apply.  */
10001 char $ac_func();
10002 char (*f)();
10003
10004 int main() {
10005
10006 /* The GNU C library defines this for functions which it implements
10007     to always fail with ENOSYS.  Some functions are actually named
10008     something starting with __ and the normal name is an alias.  */
10009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10010 choke me
10011 #else
10012 f = $ac_func;
10013 #endif
10014
10015 ; return 0; }
10016 EOF
10017 if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10018   rm -rf conftest*
10019   eval "ac_cv_func_$ac_func=yes"
10020 else
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   eval "ac_cv_func_$ac_func=no"
10025 fi
10026 rm -f conftest*
10027 fi
10028
10029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10030   echo "$ac_t""yes" 1>&6
10031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10032   cat >> confdefs.h <<EOF
10033 #define $ac_tr_func 1
10034 EOF
10035  
10036 else
10037   echo "$ac_t""no" 1>&6
10038 fi
10039 done
10040
10041
10042                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10043 echo "configure:10044: checking for pthread_detach with <pthread.h>" >&5
10044 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10045   echo $ac_n "(cached) $ac_c" 1>&6
10046 else
10047   
10048                                                                 cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051
10052 #include <pthread.h>
10053 #ifndef NULL
10054 #define NULL (void*)0
10055 #endif
10056
10057 int main() {
10058 pthread_detach(NULL);
10059 ; return 0; }
10060 EOF
10061 if { (eval echo configure:10062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10062   rm -rf conftest*
10063   ol_cv_func_pthread_detach=yes
10064 else
10065   echo "configure: failed program was:" >&5
10066   cat conftest.$ac_ext >&5
10067   rm -rf conftest*
10068   ol_cv_func_pthread_detach=no
10069 fi
10070 rm -f conftest*
10071                         
10072 fi
10073
10074 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10075
10076                         if test $ol_cv_func_pthread_detach = no ; then
10077                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10078                         fi
10079
10080                         cat >> confdefs.h <<\EOF
10081 #define HAVE_PTHREAD_DETACH 1
10082 EOF
10083
10084
10085                                                 for ac_func in \
10086                                 pthread_setconcurrency \
10087                                 pthread_getconcurrency \
10088                                 thr_setconcurrency \
10089                                 thr_getconcurrency \
10090                         
10091 do
10092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10093 echo "configure:10094: checking for $ac_func" >&5
10094 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   cat > conftest.$ac_ext <<EOF
10098 #line 10099 "configure"
10099 #include "confdefs.h"
10100 /* System header to define __stub macros and hopefully few prototypes,
10101     which can conflict with char $ac_func(); below.  */
10102 #include <assert.h>
10103 /* Override any gcc2 internal prototype to avoid an error.  */
10104 /* We use char because int might match the return type of a gcc2
10105     builtin and then its argument prototype would still apply.  */
10106 char $ac_func();
10107 char (*f)();
10108
10109 int main() {
10110
10111 /* The GNU C library defines this for functions which it implements
10112     to always fail with ENOSYS.  Some functions are actually named
10113     something starting with __ and the normal name is an alias.  */
10114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10115 choke me
10116 #else
10117 f = $ac_func;
10118 #endif
10119
10120 ; return 0; }
10121 EOF
10122 if { (eval echo configure:10123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10123   rm -rf conftest*
10124   eval "ac_cv_func_$ac_func=yes"
10125 else
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_func_$ac_func=no"
10130 fi
10131 rm -f conftest*
10132 fi
10133
10134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10135   echo "$ac_t""yes" 1>&6
10136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10137   cat >> confdefs.h <<EOF
10138 #define $ac_tr_func 1
10139 EOF
10140  
10141 else
10142   echo "$ac_t""no" 1>&6
10143 fi
10144 done
10145
10146
10147                         
10148         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10149 echo "configure:10150: checking for pthread_kill_other_threads_np" >&5
10150 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10151   echo $ac_n "(cached) $ac_c" 1>&6
10152 else
10153   cat > conftest.$ac_ext <<EOF
10154 #line 10155 "configure"
10155 #include "confdefs.h"
10156 /* System header to define __stub macros and hopefully few prototypes,
10157     which can conflict with char pthread_kill_other_threads_np(); below.  */
10158 #include <assert.h>
10159 /* Override any gcc2 internal prototype to avoid an error.  */
10160 /* We use char because int might match the return type of a gcc2
10161     builtin and then its argument prototype would still apply.  */
10162 char pthread_kill_other_threads_np();
10163 char (*f)();
10164
10165 int main() {
10166
10167 /* The GNU C library defines this for functions which it implements
10168     to always fail with ENOSYS.  Some functions are actually named
10169     something starting with __ and the normal name is an alias.  */
10170 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10171 choke me
10172 #else
10173 f = pthread_kill_other_threads_np;
10174 #endif
10175
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10186 fi
10187 rm -f conftest*
10188 fi
10189
10190 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10191   echo "$ac_t""yes" 1>&6
10192   :
10193 else
10194   echo "$ac_t""no" 1>&6
10195 fi
10196
10197         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10198 echo "configure:10199: checking for LinuxThreads implementation" >&5
10199 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10200   echo $ac_n "(cached) $ac_c" 1>&6
10201 else
10202   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10203 fi
10204
10205 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10206
10207                         
10208         
10209         
10210         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10211 echo "configure:10212: checking for LinuxThreads consistency" >&5
10212 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10213   echo $ac_n "(cached) $ac_c" 1>&6
10214 else
10215   
10216                 if test $ol_cv_header_linux_threads = yes -a \
10217                         $ol_cv_sys_linux_threads = yes; then
10218                         ol_cv_linux_threads=yes
10219                 elif test $ol_cv_header_linux_threads = no -a \
10220                         $ol_cv_sys_linux_threads = no; then
10221                         ol_cv_linux_threads=no
10222                 else
10223                         ol_cv_linux_threads=error
10224                 fi
10225         
10226 fi
10227
10228 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10229
10230
10231                         if test $ol_cv_linux_threads = error; then
10232                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10233                         fi
10234
10235                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10236 echo "configure:10237: checking if pthread_create() works" >&5
10237 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10238   echo $ac_n "(cached) $ac_c" 1>&6
10239 else
10240   
10241                         if test "$cross_compiling" = yes; then
10242                                 ol_cv_pthread_create_works=yes
10243 else
10244   cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247 /* pthread test headers */
10248 #include <pthread.h>
10249 #ifndef NULL
10250 #define NULL (void*)0
10251 #endif
10252
10253 static void *task(p)
10254         void *p;
10255 {
10256         return (void *) (p == NULL);
10257 }
10258
10259
10260 int main(argc, argv)
10261         int argc;
10262         char **argv;
10263 {
10264
10265         /* pthread test function */
10266         pthread_t t;
10267         int status;
10268 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10269         /* This system (e.g. AIX) defaults detached; must override */
10270         pthread_attr_t attr;
10271
10272         status = pthread_attr_init(&attr);
10273         if( status ) exit( status );
10274
10275         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10276         if( status ) exit( status );
10277
10278 #define ATTR    &attr
10279 #else
10280 #if HAVE_PTHREADS_D4
10281 #define ATTR    pthread_attr_default
10282 #else
10283 #define ATTR    NULL
10284 #endif
10285 #endif
10286         /* make sure pthread_create() isn't just a stub */
10287         status = pthread_create(&t, ATTR, task, NULL);
10288         if( status ) exit( status );
10289
10290         /* make sure pthread_detach() isn't just a stub */
10291 #if HAVE_PTHREADS_D4
10292         status = pthread_detach( &t );
10293 #else
10294         status = pthread_detach( t );
10295 #endif
10296
10297 #ifdef HAVE_LINUX_THREADS
10298         pthread_kill_other_threads_np();
10299 #endif
10300
10301         exit( status );
10302
10303 }
10304
10305 EOF
10306 if { (eval echo configure:10307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10307 then
10308   ol_cv_pthread_create_works=yes
10309 else
10310   echo "configure: failed program was:" >&5
10311   cat conftest.$ac_ext >&5
10312   rm -fr conftest*
10313   ol_cv_pthread_create_works=no
10314 fi
10315 rm -fr conftest*
10316 fi
10317
10318 fi
10319
10320 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10321
10322                         if test $ol_cv_pthread_create_works = no ; then
10323                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10324                         fi
10325
10326                                                 if test $ol_with_yielding_select = auto ; then
10327                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10328 echo "configure:10329: checking if select yields when using pthreads" >&5
10329 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10330   echo $ac_n "(cached) $ac_c" 1>&6
10331 else
10332   
10333                                 if test "$cross_compiling" = yes; then
10334   ol_cv_pthread_select_yields=cross
10335 else
10336   cat > conftest.$ac_ext <<EOF
10337 #line 10338 "configure"
10338 #include "confdefs.h"
10339
10340 #include <sys/types.h>
10341 #include <sys/time.h>
10342 #include <unistd.h>
10343 #include <pthread.h>
10344 #ifndef NULL
10345 #define NULL (void*) 0
10346 #endif
10347
10348 static int fildes[2];
10349
10350 static void *task(p)
10351         void *p;
10352 {
10353         int i;
10354         struct timeval tv;
10355
10356         fd_set rfds;
10357
10358         tv.tv_sec=10;
10359         tv.tv_usec=0;
10360
10361         FD_ZERO(&rfds);
10362         FD_SET(fildes[0], &rfds);
10363
10364         /* we're not interested in any fds */
10365         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10366
10367         if(i < 0) {
10368                 perror("select");
10369                 exit(10);
10370         }
10371
10372         exit(0); /* if we exit here, the select blocked the whole process */
10373 }
10374
10375 int main(argc, argv)
10376         int argc;
10377         char **argv;
10378 {
10379         pthread_t t;
10380
10381         /* create a pipe to select */
10382         if(pipe(&fildes[0])) {
10383                 perror("select");
10384                 exit(1);
10385         }
10386
10387 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10388         (void) pthread_setconcurrency(2);
10389 #else
10390 #ifdef HAVE_THR_SETCONCURRENCY
10391         /* Set Solaris LWP concurrency to 2 */
10392         thr_setconcurrency(2);
10393 #endif
10394 #endif
10395
10396 #if HAVE_PTHREADS_D4
10397         pthread_create(&t, pthread_attr_default, task, NULL);
10398 #else
10399         pthread_create(&t, NULL, task, NULL);
10400 #endif
10401
10402 #if HAVE_SCHED_YIELD
10403         sched_yield();  /* make sure task runs first */
10404 #else
10405 #ifdef HAVE_PTHREAD_YIELD
10406         pthread_yield();        /* make sure task runs first */
10407 #endif
10408 #endif
10409
10410         exit(2);
10411 }
10412 EOF
10413 if { (eval echo configure:10414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10414 then
10415   ol_cv_pthread_select_yields=no
10416 else
10417   echo "configure: failed program was:" >&5
10418   cat conftest.$ac_ext >&5
10419   rm -fr conftest*
10420   ol_cv_pthread_select_yields=yes
10421 fi
10422 rm -fr conftest*
10423 fi
10424
10425 fi
10426
10427 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10428
10429                                 if test $ol_cv_pthread_select_yields = cross ; then
10430                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10431                                 fi
10432
10433                                 if test $ol_cv_pthread_select_yields = yes ; then
10434                                         ol_with_yielding_select=yes
10435                                 fi
10436                         fi
10437
10438                                                 CPPFLAGS="$save_CPPFLAGS"
10439                         LIBS="$save_LIBS"
10440                 else
10441                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10442                 fi
10443         fi
10444
10445         if test $ol_with_threads = posix ; then
10446                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10447         fi
10448 fi
10449
10450 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10451         -o $ol_with_threads = mach ; then
10452
10453                 for ac_hdr in mach/cthreads.h
10454 do
10455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10457 echo "configure:10458: checking for $ac_hdr" >&5
10458 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10459   echo $ac_n "(cached) $ac_c" 1>&6
10460 else
10461   cat > conftest.$ac_ext <<EOF
10462 #line 10463 "configure"
10463 #include "confdefs.h"
10464 #include <$ac_hdr>
10465 EOF
10466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10467 { (eval echo configure:10468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10469 if test -z "$ac_err"; then
10470   rm -rf conftest*
10471   eval "ac_cv_header_$ac_safe=yes"
10472 else
10473   echo "$ac_err" >&5
10474   echo "configure: failed program was:" >&5
10475   cat conftest.$ac_ext >&5
10476   rm -rf conftest*
10477   eval "ac_cv_header_$ac_safe=no"
10478 fi
10479 rm -f conftest*
10480 fi
10481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10482   echo "$ac_t""yes" 1>&6
10483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10484   cat >> confdefs.h <<EOF
10485 #define $ac_tr_hdr 1
10486 EOF
10487  
10488 else
10489   echo "$ac_t""no" 1>&6
10490 fi
10491 done
10492
10493         if test $ac_cv_header_mach_cthreads_h = yes ; then
10494                 ol_with_threads=found
10495
10496                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10497 echo "configure:10498: checking for cthread_fork" >&5
10498 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   cat > conftest.$ac_ext <<EOF
10502 #line 10503 "configure"
10503 #include "confdefs.h"
10504 /* System header to define __stub macros and hopefully few prototypes,
10505     which can conflict with char cthread_fork(); below.  */
10506 #include <assert.h>
10507 /* Override any gcc2 internal prototype to avoid an error.  */
10508 /* We use char because int might match the return type of a gcc2
10509     builtin and then its argument prototype would still apply.  */
10510 char cthread_fork();
10511 char (*f)();
10512
10513 int main() {
10514
10515 /* The GNU C library defines this for functions which it implements
10516     to always fail with ENOSYS.  Some functions are actually named
10517     something starting with __ and the normal name is an alias.  */
10518 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10519 choke me
10520 #else
10521 f = cthread_fork;
10522 #endif
10523
10524 ; return 0; }
10525 EOF
10526 if { (eval echo configure:10527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10527   rm -rf conftest*
10528   eval "ac_cv_func_cthread_fork=yes"
10529 else
10530   echo "configure: failed program was:" >&5
10531   cat conftest.$ac_ext >&5
10532   rm -rf conftest*
10533   eval "ac_cv_func_cthread_fork=no"
10534 fi
10535 rm -f conftest*
10536 fi
10537
10538 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10539   echo "$ac_t""yes" 1>&6
10540   ol_link_threads=yes
10541 else
10542   echo "$ac_t""no" 1>&6
10543 fi
10544
10545
10546                 if test $ol_link_threads = no ; then
10547                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10548 echo "configure:10549: checking for cthread_fork with -all_load" >&5
10549 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10550   echo $ac_n "(cached) $ac_c" 1>&6
10551 else
10552   
10553                                                                 save_LIBS="$LIBS"
10554                                 LIBS="-all_load $LIBS"
10555                                 cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558 #include <mach/cthreads.h>
10559 int main() {
10560
10561                                         cthread_fork((void *)0, (void *)0);
10562                                         
10563 ; return 0; }
10564 EOF
10565 if { (eval echo configure:10566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10566   rm -rf conftest*
10567   ol_cv_cthread_all_load=yes
10568 else
10569   echo "configure: failed program was:" >&5
10570   cat conftest.$ac_ext >&5
10571   rm -rf conftest*
10572   ol_cv_cthread_all_load=no
10573 fi
10574 rm -f conftest*
10575                                                                 LIBS="$save_LIBS"
10576                         
10577 fi
10578
10579 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10580
10581                         if test $ol_cv_cthread_all_load = yes ; then
10582                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10583                                 ol_link_threads=mach
10584                         fi
10585                 fi
10586
10587                 if test $ol_link_threads != no ; then
10588                         : check for cthread specific functionality here
10589                         cat >> confdefs.h <<\EOF
10590 #define HAVE_MACH_CTHREADS 1
10591 EOF
10592
10593                 else
10594                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10595                 fi
10596         fi
10597
10598         if test $ol_with_threads = mach ; then
10599                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10600         fi
10601 fi
10602
10603 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10604         -o $ol_with_threads = pth ; then
10605
10606         for ac_hdr in pth.h
10607 do
10608 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10609 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10610 echo "configure:10611: checking for $ac_hdr" >&5
10611 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10612   echo $ac_n "(cached) $ac_c" 1>&6
10613 else
10614   cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617 #include <$ac_hdr>
10618 EOF
10619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10620 { (eval echo configure:10621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10622 if test -z "$ac_err"; then
10623   rm -rf conftest*
10624   eval "ac_cv_header_$ac_safe=yes"
10625 else
10626   echo "$ac_err" >&5
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   eval "ac_cv_header_$ac_safe=no"
10631 fi
10632 rm -f conftest*
10633 fi
10634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10635   echo "$ac_t""yes" 1>&6
10636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10637   cat >> confdefs.h <<EOF
10638 #define $ac_tr_hdr 1
10639 EOF
10640  
10641 else
10642   echo "$ac_t""no" 1>&6
10643 fi
10644 done
10645
10646
10647         if test $ac_cv_header_pth_h = yes ; then
10648                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10649 echo "configure:10650: checking for pth_version in -lpth" >&5
10650 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10652   echo $ac_n "(cached) $ac_c" 1>&6
10653 else
10654   ac_save_LIBS="$LIBS"
10655 LIBS="-lpth  $LIBS"
10656 cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 /* Override any gcc2 internal prototype to avoid an error.  */
10660 /* We use char because int might match the return type of a gcc2
10661     builtin and then its argument prototype would still apply.  */
10662 char pth_version();
10663
10664 int main() {
10665 pth_version()
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   eval "ac_cv_lib_$ac_lib_var=yes"
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_lib_$ac_lib_var=no"
10676 fi
10677 rm -f conftest*
10678 LIBS="$ac_save_LIBS"
10679
10680 fi
10681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10682   echo "$ac_t""yes" 1>&6
10683   have_pth=yes
10684 else
10685   echo "$ac_t""no" 1>&6
10686 have_pth=no
10687 fi
10688
10689
10690                 if test $have_pth = yes ; then
10691                         cat >> confdefs.h <<\EOF
10692 #define HAVE_GNU_PTH 1
10693 EOF
10694
10695                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10696                         ol_link_threads=pth
10697
10698                         if test $ol_with_yielding_select = auto ; then
10699                                 ol_with_yielding_select=yes
10700                         fi
10701                 fi
10702         fi
10703 fi
10704
10705 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10706         -o $ol_with_threads = lwp ; then
10707
10708                 for ac_hdr in thread.h synch.h
10709 do
10710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10712 echo "configure:10713: checking for $ac_hdr" >&5
10713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 #include <$ac_hdr>
10720 EOF
10721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10722 { (eval echo configure:10723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10724 if test -z "$ac_err"; then
10725   rm -rf conftest*
10726   eval "ac_cv_header_$ac_safe=yes"
10727 else
10728   echo "$ac_err" >&5
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -rf conftest*
10732   eval "ac_cv_header_$ac_safe=no"
10733 fi
10734 rm -f conftest*
10735 fi
10736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10737   echo "$ac_t""yes" 1>&6
10738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10739   cat >> confdefs.h <<EOF
10740 #define $ac_tr_hdr 1
10741 EOF
10742  
10743 else
10744   echo "$ac_t""no" 1>&6
10745 fi
10746 done
10747
10748         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10749                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10750 echo "configure:10751: checking for thr_create in -lthread" >&5
10751 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10753   echo $ac_n "(cached) $ac_c" 1>&6
10754 else
10755   ac_save_LIBS="$LIBS"
10756 LIBS="-lthread  $LIBS"
10757 cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760 /* Override any gcc2 internal prototype to avoid an error.  */
10761 /* We use char because int might match the return type of a gcc2
10762     builtin and then its argument prototype would still apply.  */
10763 char thr_create();
10764
10765 int main() {
10766 thr_create()
10767 ; return 0; }
10768 EOF
10769 if { (eval echo configure:10770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10770   rm -rf conftest*
10771   eval "ac_cv_lib_$ac_lib_var=yes"
10772 else
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   eval "ac_cv_lib_$ac_lib_var=no"
10777 fi
10778 rm -f conftest*
10779 LIBS="$ac_save_LIBS"
10780
10781 fi
10782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10783   echo "$ac_t""yes" 1>&6
10784   have_thr=yes
10785 else
10786   echo "$ac_t""no" 1>&6
10787 have_thr=no
10788 fi
10789
10790
10791                 if test $have_thr = yes ; then
10792                         cat >> confdefs.h <<\EOF
10793 #define HAVE_THR 1
10794 EOF
10795
10796                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10797                         ol_link_threads=thr
10798
10799                         if test $ol_with_yielding_select = auto ; then
10800                                 ol_with_yielding_select=yes
10801                         fi
10802
10803                                                 for ac_func in \
10804                                 thr_setconcurrency \
10805                                 thr_getconcurrency \
10806                         
10807 do
10808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10809 echo "configure:10810: checking for $ac_func" >&5
10810 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   cat > conftest.$ac_ext <<EOF
10814 #line 10815 "configure"
10815 #include "confdefs.h"
10816 /* System header to define __stub macros and hopefully few prototypes,
10817     which can conflict with char $ac_func(); below.  */
10818 #include <assert.h>
10819 /* Override any gcc2 internal prototype to avoid an error.  */
10820 /* We use char because int might match the return type of a gcc2
10821     builtin and then its argument prototype would still apply.  */
10822 char $ac_func();
10823 char (*f)();
10824
10825 int main() {
10826
10827 /* The GNU C library defines this for functions which it implements
10828     to always fail with ENOSYS.  Some functions are actually named
10829     something starting with __ and the normal name is an alias.  */
10830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10831 choke me
10832 #else
10833 f = $ac_func;
10834 #endif
10835
10836 ; return 0; }
10837 EOF
10838 if { (eval echo configure:10839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10839   rm -rf conftest*
10840   eval "ac_cv_func_$ac_func=yes"
10841 else
10842   echo "configure: failed program was:" >&5
10843   cat conftest.$ac_ext >&5
10844   rm -rf conftest*
10845   eval "ac_cv_func_$ac_func=no"
10846 fi
10847 rm -f conftest*
10848 fi
10849
10850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10851   echo "$ac_t""yes" 1>&6
10852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10853   cat >> confdefs.h <<EOF
10854 #define $ac_tr_func 1
10855 EOF
10856  
10857 else
10858   echo "$ac_t""no" 1>&6
10859 fi
10860 done
10861
10862                 fi
10863         fi
10864
10865                 for ac_hdr in lwp/lwp.h
10866 do
10867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10869 echo "configure:10870: checking for $ac_hdr" >&5
10870 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10871   echo $ac_n "(cached) $ac_c" 1>&6
10872 else
10873   cat > conftest.$ac_ext <<EOF
10874 #line 10875 "configure"
10875 #include "confdefs.h"
10876 #include <$ac_hdr>
10877 EOF
10878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10879 { (eval echo configure:10880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10881 if test -z "$ac_err"; then
10882   rm -rf conftest*
10883   eval "ac_cv_header_$ac_safe=yes"
10884 else
10885   echo "$ac_err" >&5
10886   echo "configure: failed program was:" >&5
10887   cat conftest.$ac_ext >&5
10888   rm -rf conftest*
10889   eval "ac_cv_header_$ac_safe=no"
10890 fi
10891 rm -f conftest*
10892 fi
10893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10894   echo "$ac_t""yes" 1>&6
10895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10896   cat >> confdefs.h <<EOF
10897 #define $ac_tr_hdr 1
10898 EOF
10899  
10900 else
10901   echo "$ac_t""no" 1>&6
10902 fi
10903 done
10904
10905         if test $ac_cv_header_lwp_lwp_h = yes ; then
10906                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10907 echo "configure:10908: checking for lwp_create in -llwp" >&5
10908 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10910   echo $ac_n "(cached) $ac_c" 1>&6
10911 else
10912   ac_save_LIBS="$LIBS"
10913 LIBS="-llwp  $LIBS"
10914 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917 /* Override any gcc2 internal prototype to avoid an error.  */
10918 /* We use char because int might match the return type of a gcc2
10919     builtin and then its argument prototype would still apply.  */
10920 char lwp_create();
10921
10922 int main() {
10923 lwp_create()
10924 ; return 0; }
10925 EOF
10926 if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10927   rm -rf conftest*
10928   eval "ac_cv_lib_$ac_lib_var=yes"
10929 else
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   eval "ac_cv_lib_$ac_lib_var=no"
10934 fi
10935 rm -f conftest*
10936 LIBS="$ac_save_LIBS"
10937
10938 fi
10939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10940   echo "$ac_t""yes" 1>&6
10941   have_lwp=yes
10942 else
10943   echo "$ac_t""no" 1>&6
10944 have_lwp=no
10945 fi
10946
10947
10948                 if test $have_lwp = yes ; then
10949                         cat >> confdefs.h <<\EOF
10950 #define HAVE_LWP 1
10951 EOF
10952
10953                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10954                         ol_link_threads=lwp
10955
10956                         if test $ol_with_yielding_select = auto ; then
10957                                 ol_with_yielding_select=no
10958                         fi
10959                 fi
10960         fi
10961 fi
10962
10963 if test $ol_with_yielding_select = yes ; then
10964         cat >> confdefs.h <<\EOF
10965 #define HAVE_YIELDING_SELECT 1
10966 EOF
10967
10968 fi
10969
10970 if test $ol_with_threads = manual ; then
10971                 ol_link_threads=yes
10972
10973         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10974
10975         for ac_hdr in pthread.h sched.h
10976 do
10977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10979 echo "configure:10980: checking for $ac_hdr" >&5
10980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include <$ac_hdr>
10987 EOF
10988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10989 { (eval echo configure:10990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10991 if test -z "$ac_err"; then
10992   rm -rf conftest*
10993   eval "ac_cv_header_$ac_safe=yes"
10994 else
10995   echo "$ac_err" >&5
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -rf conftest*
10999   eval "ac_cv_header_$ac_safe=no"
11000 fi
11001 rm -f conftest*
11002 fi
11003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11004   echo "$ac_t""yes" 1>&6
11005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11006   cat >> confdefs.h <<EOF
11007 #define $ac_tr_hdr 1
11008 EOF
11009  
11010 else
11011   echo "$ac_t""no" 1>&6
11012 fi
11013 done
11014
11015         for ac_func in sched_yield pthread_yield
11016 do
11017 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11018 echo "configure:11019: checking for $ac_func" >&5
11019 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11020   echo $ac_n "(cached) $ac_c" 1>&6
11021 else
11022   cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 /* System header to define __stub macros and hopefully few prototypes,
11026     which can conflict with char $ac_func(); below.  */
11027 #include <assert.h>
11028 /* Override any gcc2 internal prototype to avoid an error.  */
11029 /* We use char because int might match the return type of a gcc2
11030     builtin and then its argument prototype would still apply.  */
11031 char $ac_func();
11032 char (*f)();
11033
11034 int main() {
11035
11036 /* The GNU C library defines this for functions which it implements
11037     to always fail with ENOSYS.  Some functions are actually named
11038     something starting with __ and the normal name is an alias.  */
11039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11040 choke me
11041 #else
11042 f = $ac_func;
11043 #endif
11044
11045 ; return 0; }
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11048   rm -rf conftest*
11049   eval "ac_cv_func_$ac_func=yes"
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   eval "ac_cv_func_$ac_func=no"
11055 fi
11056 rm -f conftest*
11057 fi
11058
11059 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11060   echo "$ac_t""yes" 1>&6
11061     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11062   cat >> confdefs.h <<EOF
11063 #define $ac_tr_func 1
11064 EOF
11065  
11066 else
11067   echo "$ac_t""no" 1>&6
11068 fi
11069 done
11070
11071         
11072         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11073 echo "configure:11074: checking for LinuxThreads pthread.h" >&5
11074 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11075   echo $ac_n "(cached) $ac_c" 1>&6
11076 else
11077   cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080 #include <pthread.h>
11081 EOF
11082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11083   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11084   rm -rf conftest*
11085   ol_cv_header_linux_threads=yes
11086 else
11087   rm -rf conftest*
11088   ol_cv_header_linux_threads=no
11089 fi
11090 rm -f conftest*
11091
11092                 
11093 fi
11094
11095 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11096         if test $ol_cv_header_linux_threads = yes; then
11097                 cat >> confdefs.h <<\EOF
11098 #define HAVE_LINUX_THREADS 1
11099 EOF
11100
11101         fi
11102
11103
11104         for ac_hdr in mach/cthreads.h
11105 do
11106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11108 echo "configure:11109: checking for $ac_hdr" >&5
11109 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 #include <$ac_hdr>
11116 EOF
11117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11118 { (eval echo configure:11119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11120 if test -z "$ac_err"; then
11121   rm -rf conftest*
11122   eval "ac_cv_header_$ac_safe=yes"
11123 else
11124   echo "$ac_err" >&5
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -rf conftest*
11128   eval "ac_cv_header_$ac_safe=no"
11129 fi
11130 rm -f conftest*
11131 fi
11132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11133   echo "$ac_t""yes" 1>&6
11134     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11135   cat >> confdefs.h <<EOF
11136 #define $ac_tr_hdr 1
11137 EOF
11138  
11139 else
11140   echo "$ac_t""no" 1>&6
11141 fi
11142 done
11143
11144         for ac_hdr in lwp/lwp.h
11145 do
11146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11148 echo "configure:11149: checking for $ac_hdr" >&5
11149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 #include <$ac_hdr>
11156 EOF
11157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11158 { (eval echo configure:11159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11160 if test -z "$ac_err"; then
11161   rm -rf conftest*
11162   eval "ac_cv_header_$ac_safe=yes"
11163 else
11164   echo "$ac_err" >&5
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   eval "ac_cv_header_$ac_safe=no"
11169 fi
11170 rm -f conftest*
11171 fi
11172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11173   echo "$ac_t""yes" 1>&6
11174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11175   cat >> confdefs.h <<EOF
11176 #define $ac_tr_hdr 1
11177 EOF
11178  
11179 else
11180   echo "$ac_t""no" 1>&6
11181 fi
11182 done
11183
11184         for ac_hdr in thread.h synch.h
11185 do
11186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11188 echo "configure:11189: checking for $ac_hdr" >&5
11189 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11190   echo $ac_n "(cached) $ac_c" 1>&6
11191 else
11192   cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 #include <$ac_hdr>
11196 EOF
11197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11198 { (eval echo configure:11199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11200 if test -z "$ac_err"; then
11201   rm -rf conftest*
11202   eval "ac_cv_header_$ac_safe=yes"
11203 else
11204   echo "$ac_err" >&5
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=no"
11209 fi
11210 rm -f conftest*
11211 fi
11212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11213   echo "$ac_t""yes" 1>&6
11214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11215   cat >> confdefs.h <<EOF
11216 #define $ac_tr_hdr 1
11217 EOF
11218  
11219 else
11220   echo "$ac_t""no" 1>&6
11221 fi
11222 done
11223
11224 fi
11225
11226 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11227                         cat >> confdefs.h <<\EOF
11228 #define REENTRANT 1
11229 EOF
11230
11231         cat >> confdefs.h <<\EOF
11232 #define _REENTRANT 1
11233 EOF
11234
11235         cat >> confdefs.h <<\EOF
11236 #define THREAD_SAFE 1
11237 EOF
11238
11239         cat >> confdefs.h <<\EOF
11240 #define _THREAD_SAFE 1
11241 EOF
11242
11243         cat >> confdefs.h <<\EOF
11244 #define THREADSAFE 1
11245 EOF
11246
11247         cat >> confdefs.h <<\EOF
11248 #define _THREADSAFE 1
11249 EOF
11250
11251         cat >> confdefs.h <<\EOF
11252 #define _SGI_MP_SOURCE 1
11253 EOF
11254
11255
11256                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11257 echo "configure:11258: checking for thread specific errno" >&5
11258 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11259   echo $ac_n "(cached) $ac_c" 1>&6
11260 else
11261   
11262                 cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 #include <errno.h>
11266 int main() {
11267 errno = 0;
11268 ; return 0; }
11269 EOF
11270 if { (eval echo configure:11271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11271   rm -rf conftest*
11272   ol_cv_errno_thread_specific=yes
11273 else
11274   echo "configure: failed program was:" >&5
11275   cat conftest.$ac_ext >&5
11276   rm -rf conftest*
11277   ol_cv_errno_thread_specific=no
11278 fi
11279 rm -f conftest*
11280         
11281 fi
11282
11283 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11284
11285                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11286 echo "configure:11287: checking for thread specific h_errno" >&5
11287 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11288   echo $ac_n "(cached) $ac_c" 1>&6
11289 else
11290   
11291                 cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 #include <netdb.h>
11295 int main() {
11296 h_errno = 0;
11297 ; return 0; }
11298 EOF
11299 if { (eval echo configure:11300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11300   rm -rf conftest*
11301   ol_cv_h_errno_thread_specific=yes
11302 else
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   ol_cv_h_errno_thread_specific=no
11307 fi
11308 rm -f conftest*
11309         
11310 fi
11311
11312 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11313
11314         if test $ol_cv_errno_thread_specific != yes \
11315                 -o $ol_cv_h_errno_thread_specific != yes ; then
11316                 LIBS="$LTHREAD_LIBS $LIBS"
11317                 LTHREAD_LIBS=""
11318         fi
11319
11320 fi  
11321
11322 if test $ol_link_threads = no ; then
11323         if test $ol_with_threads = yes ; then
11324                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11325         fi
11326
11327         if test $ol_with_threads = auto ; then
11328                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11329                 ol_with_threads=no
11330         fi
11331
11332         cat >> confdefs.h <<\EOF
11333 #define NO_THREADS 1
11334 EOF
11335
11336         LTHREAD_LIBS=""
11337 fi
11338
11339 if test $ol_link_threads != no ; then
11340         cat >> confdefs.h <<\EOF
11341 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11342 EOF
11343
11344 fi
11345
11346 ol_link_ldbm=no 
11347
11348 if test $ol_with_ldbm_api = auto \
11349         -o $ol_with_ldbm_api = berkeley \
11350         -o $ol_with_ldbm_api = bcompat ; then
11351
11352         if test $ol_with_ldbm_api = bcompat; then \
11353                 ol_cv_berkeley_db=no
11354 for ac_hdr in db_185.h db.h
11355 do
11356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11358 echo "configure:11359: checking for $ac_hdr" >&5
11359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11360   echo $ac_n "(cached) $ac_c" 1>&6
11361 else
11362   cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365 #include <$ac_hdr>
11366 EOF
11367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11368 { (eval echo configure:11369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11370 if test -z "$ac_err"; then
11371   rm -rf conftest*
11372   eval "ac_cv_header_$ac_safe=yes"
11373 else
11374   echo "$ac_err" >&5
11375   echo "configure: failed program was:" >&5
11376   cat conftest.$ac_ext >&5
11377   rm -rf conftest*
11378   eval "ac_cv_header_$ac_safe=no"
11379 fi
11380 rm -f conftest*
11381 fi
11382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11383   echo "$ac_t""yes" 1>&6
11384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11385   cat >> confdefs.h <<EOF
11386 #define $ac_tr_hdr 1
11387 EOF
11388  
11389 else
11390   echo "$ac_t""no" 1>&6
11391 fi
11392 done
11393
11394 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11395         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11396 echo "configure:11397: checking if Berkeley DB header compatibility" >&5
11397 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11398   echo $ac_n "(cached) $ac_c" 1>&6
11399 else
11400   
11401                 cat > conftest.$ac_ext <<EOF
11402 #line 11403 "configure"
11403 #include "confdefs.h"
11404
11405 #if HAVE_DB_185_H
11406 #       include <db_185.h>
11407 #else
11408 #       include <db.h>
11409 #endif
11410
11411  /* this check could be improved */
11412 #ifndef DB_VERSION_MAJOR
11413 #       define DB_VERSION_MAJOR 1
11414 #endif
11415
11416 #if DB_VERSION_MAJOR == 1 
11417         __db_version_1
11418 #endif
11419
11420 EOF
11421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11422   egrep "__db_version_1" >/dev/null 2>&1; then
11423   rm -rf conftest*
11424   ol_cv_header_db1=yes
11425 else
11426   rm -rf conftest*
11427   ol_cv_header_db1=no
11428 fi
11429 rm -f conftest*
11430
11431 fi
11432
11433 echo "$ac_t""$ol_cv_header_db1" 1>&6
11434
11435         if test ol_cv_header_db1=yes ; then
11436                 ol_cv_lib_db=no
11437 if test $ol_cv_lib_db = no ; then
11438         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11439 echo "configure:11440: checking for Berkeley DB link (default)" >&5
11440 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11441   echo $ac_n "(cached) $ac_c" 1>&6
11442 else
11443   
11444         ol_DB_LIB=
11445         ol_LIBS=$LIBS
11446         LIBS="$ol_DB_LIB $LIBS"
11447
11448         cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451
11452 #ifdef HAVE_DB_185_H
11453 # include <db_185.h>
11454 #else
11455 # include <db.h>
11456 #endif
11457
11458 #ifndef DB_VERSION_MAJOR
11459 # define DB_VERSION_MAJOR 1
11460 #endif
11461
11462 #ifndef NULL
11463 #define NULL ((void*)0)
11464 #endif
11465
11466 int main() {
11467
11468 #if DB_VERSION_MAJOR > 2
11469         db_env_create( NULL, 0 );
11470 #elif DB_VERSION_MAJOR > 1
11471         db_appexit( NULL );
11472 #else
11473         (void) dbopen( NULL, 0, 0, 0, NULL);
11474 #endif
11475
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_db_none=yes
11481 else
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   ol_cv_db_none=no
11486 fi
11487 rm -f conftest*
11488
11489         LIBS="$ol_LIBS"
11490
11491 fi
11492
11493 echo "$ac_t""$ol_cv_db_none" 1>&6
11494
11495         if test $ol_cv_db_none = yes ; then
11496                 ol_cv_lib_db=yes
11497         fi
11498 fi
11499
11500 if test $ol_cv_lib_db = no ; then
11501         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11502 echo "configure:11503: checking for Berkeley DB link (-ldb)" >&5
11503 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11504   echo $ac_n "(cached) $ac_c" 1>&6
11505 else
11506   
11507         ol_DB_LIB=-ldb
11508         ol_LIBS=$LIBS
11509         LIBS="$ol_DB_LIB $LIBS"
11510
11511         cat > conftest.$ac_ext <<EOF
11512 #line 11513 "configure"
11513 #include "confdefs.h"
11514
11515 #ifdef HAVE_DB_185_H
11516 # include <db_185.h>
11517 #else
11518 # include <db.h>
11519 #endif
11520
11521 #ifndef DB_VERSION_MAJOR
11522 # define DB_VERSION_MAJOR 1
11523 #endif
11524
11525 #ifndef NULL
11526 #define NULL ((void*)0)
11527 #endif
11528
11529 int main() {
11530
11531 #if DB_VERSION_MAJOR > 2
11532         db_env_create( NULL, 0 );
11533 #elif DB_VERSION_MAJOR > 1
11534         db_appexit( NULL );
11535 #else
11536         (void) dbopen( NULL, 0, 0, 0, NULL);
11537 #endif
11538
11539 ; return 0; }
11540 EOF
11541 if { (eval echo configure:11542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11542   rm -rf conftest*
11543   ol_cv_db_db=yes
11544 else
11545   echo "configure: failed program was:" >&5
11546   cat conftest.$ac_ext >&5
11547   rm -rf conftest*
11548   ol_cv_db_db=no
11549 fi
11550 rm -f conftest*
11551
11552         LIBS="$ol_LIBS"
11553
11554 fi
11555
11556 echo "$ac_t""$ol_cv_db_db" 1>&6
11557
11558         if test $ol_cv_db_db = yes ; then
11559                 ol_cv_lib_db=-ldb
11560         fi
11561 fi
11562
11563 if test $ol_cv_lib_db = no ; then
11564         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11565 echo "configure:11566: checking for Berkeley DB link (-ldb3)" >&5
11566 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11567   echo $ac_n "(cached) $ac_c" 1>&6
11568 else
11569   
11570         ol_DB_LIB=-ldb3
11571         ol_LIBS=$LIBS
11572         LIBS="$ol_DB_LIB $LIBS"
11573
11574         cat > conftest.$ac_ext <<EOF
11575 #line 11576 "configure"
11576 #include "confdefs.h"
11577
11578 #ifdef HAVE_DB_185_H
11579 # include <db_185.h>
11580 #else
11581 # include <db.h>
11582 #endif
11583
11584 #ifndef DB_VERSION_MAJOR
11585 # define DB_VERSION_MAJOR 1
11586 #endif
11587
11588 #ifndef NULL
11589 #define NULL ((void*)0)
11590 #endif
11591
11592 int main() {
11593
11594 #if DB_VERSION_MAJOR > 2
11595         db_env_create( NULL, 0 );
11596 #elif DB_VERSION_MAJOR > 1
11597         db_appexit( NULL );
11598 #else
11599         (void) dbopen( NULL, 0, 0, 0, NULL);
11600 #endif
11601
11602 ; return 0; }
11603 EOF
11604 if { (eval echo configure:11605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11605   rm -rf conftest*
11606   ol_cv_db_db3=yes
11607 else
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -rf conftest*
11611   ol_cv_db_db3=no
11612 fi
11613 rm -f conftest*
11614
11615         LIBS="$ol_LIBS"
11616
11617 fi
11618
11619 echo "$ac_t""$ol_cv_db_db3" 1>&6
11620
11621         if test $ol_cv_db_db3 = yes ; then
11622                 ol_cv_lib_db=-ldb3
11623         fi
11624 fi
11625
11626 if test $ol_cv_lib_db = no ; then
11627         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11628 echo "configure:11629: checking for Berkeley DB link (-ldb2)" >&5
11629 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   
11633         ol_DB_LIB=-ldb2
11634         ol_LIBS=$LIBS
11635         LIBS="$ol_DB_LIB $LIBS"
11636
11637         cat > conftest.$ac_ext <<EOF
11638 #line 11639 "configure"
11639 #include "confdefs.h"
11640
11641 #ifdef HAVE_DB_185_H
11642 # include <db_185.h>
11643 #else
11644 # include <db.h>
11645 #endif
11646
11647 #ifndef DB_VERSION_MAJOR
11648 # define DB_VERSION_MAJOR 1
11649 #endif
11650
11651 #ifndef NULL
11652 #define NULL ((void*)0)
11653 #endif
11654
11655 int main() {
11656
11657 #if DB_VERSION_MAJOR > 2
11658         db_env_create( NULL, 0 );
11659 #elif DB_VERSION_MAJOR > 1
11660         db_appexit( NULL );
11661 #else
11662         (void) dbopen( NULL, 0, 0, 0, NULL);
11663 #endif
11664
11665 ; return 0; }
11666 EOF
11667 if { (eval echo configure:11668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11668   rm -rf conftest*
11669   ol_cv_db_db2=yes
11670 else
11671   echo "configure: failed program was:" >&5
11672   cat conftest.$ac_ext >&5
11673   rm -rf conftest*
11674   ol_cv_db_db2=no
11675 fi
11676 rm -f conftest*
11677
11678         LIBS="$ol_LIBS"
11679
11680 fi
11681
11682 echo "$ac_t""$ol_cv_db_db2" 1>&6
11683
11684         if test $ol_cv_db_db2 = yes ; then
11685                 ol_cv_lib_db=-ldb2
11686         fi
11687 fi
11688
11689 if test $ol_cv_lib_db = no ; then
11690         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11691 echo "configure:11692: checking for Berkeley DB link (-ldb1)" >&5
11692 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   
11696         ol_DB_LIB=-ldb1
11697         ol_LIBS=$LIBS
11698         LIBS="$ol_DB_LIB $LIBS"
11699
11700         cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703
11704 #ifdef HAVE_DB_185_H
11705 # include <db_185.h>
11706 #else
11707 # include <db.h>
11708 #endif
11709
11710 #ifndef DB_VERSION_MAJOR
11711 # define DB_VERSION_MAJOR 1
11712 #endif
11713
11714 #ifndef NULL
11715 #define NULL ((void*)0)
11716 #endif
11717
11718 int main() {
11719
11720 #if DB_VERSION_MAJOR > 2
11721         db_env_create( NULL, 0 );
11722 #elif DB_VERSION_MAJOR > 1
11723         db_appexit( NULL );
11724 #else
11725         (void) dbopen( NULL, 0, 0, 0, NULL);
11726 #endif
11727
11728 ; return 0; }
11729 EOF
11730 if { (eval echo configure:11731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11731   rm -rf conftest*
11732   ol_cv_db_db1=yes
11733 else
11734   echo "configure: failed program was:" >&5
11735   cat conftest.$ac_ext >&5
11736   rm -rf conftest*
11737   ol_cv_db_db1=no
11738 fi
11739 rm -f conftest*
11740
11741         LIBS="$ol_LIBS"
11742
11743 fi
11744
11745 echo "$ac_t""$ol_cv_db_db1" 1>&6
11746
11747         if test $ol_cv_db_db1 = yes ; then
11748                 ol_cv_lib_db=-ldb1
11749         fi
11750 fi
11751
11752
11753                 if test "$ol_cv_lib_db" != no ; then
11754                         ol_cv_berkeley_db=yes
11755                 fi
11756         fi
11757 fi
11758
11759         else
11760                 ol_cv_berkeley_db=no
11761 for ac_hdr in db.h
11762 do
11763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11765 echo "configure:11766: checking for $ac_hdr" >&5
11766 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11767   echo $ac_n "(cached) $ac_c" 1>&6
11768 else
11769   cat > conftest.$ac_ext <<EOF
11770 #line 11771 "configure"
11771 #include "confdefs.h"
11772 #include <$ac_hdr>
11773 EOF
11774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11775 { (eval echo configure:11776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11777 if test -z "$ac_err"; then
11778   rm -rf conftest*
11779   eval "ac_cv_header_$ac_safe=yes"
11780 else
11781   echo "$ac_err" >&5
11782   echo "configure: failed program was:" >&5
11783   cat conftest.$ac_ext >&5
11784   rm -rf conftest*
11785   eval "ac_cv_header_$ac_safe=no"
11786 fi
11787 rm -f conftest*
11788 fi
11789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11790   echo "$ac_t""yes" 1>&6
11791     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11792   cat >> confdefs.h <<EOF
11793 #define $ac_tr_hdr 1
11794 EOF
11795  
11796 else
11797   echo "$ac_t""no" 1>&6
11798 fi
11799 done
11800
11801 if test $ac_cv_header_db_h = yes; then
11802         ol_cv_lib_db=no
11803 if test $ol_cv_lib_db = no ; then
11804         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11805 echo "configure:11806: checking for Berkeley DB link (default)" >&5
11806 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   
11810         ol_DB_LIB=
11811         ol_LIBS=$LIBS
11812         LIBS="$ol_DB_LIB $LIBS"
11813
11814         cat > conftest.$ac_ext <<EOF
11815 #line 11816 "configure"
11816 #include "confdefs.h"
11817
11818 #ifdef HAVE_DB_185_H
11819 # include <db_185.h>
11820 #else
11821 # include <db.h>
11822 #endif
11823
11824 #ifndef DB_VERSION_MAJOR
11825 # define DB_VERSION_MAJOR 1
11826 #endif
11827
11828 #ifndef NULL
11829 #define NULL ((void*)0)
11830 #endif
11831
11832 int main() {
11833
11834 #if DB_VERSION_MAJOR > 2
11835         db_env_create( NULL, 0 );
11836 #elif DB_VERSION_MAJOR > 1
11837         db_appexit( NULL );
11838 #else
11839         (void) dbopen( NULL, 0, 0, 0, NULL);
11840 #endif
11841
11842 ; return 0; }
11843 EOF
11844 if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11845   rm -rf conftest*
11846   ol_cv_db_none=yes
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   ol_cv_db_none=no
11852 fi
11853 rm -f conftest*
11854
11855         LIBS="$ol_LIBS"
11856
11857 fi
11858
11859 echo "$ac_t""$ol_cv_db_none" 1>&6
11860
11861         if test $ol_cv_db_none = yes ; then
11862                 ol_cv_lib_db=yes
11863         fi
11864 fi
11865
11866 if test $ol_cv_lib_db = no ; then
11867         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11868 echo "configure:11869: checking for Berkeley DB link (-ldb)" >&5
11869 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11870   echo $ac_n "(cached) $ac_c" 1>&6
11871 else
11872   
11873         ol_DB_LIB=-ldb
11874         ol_LIBS=$LIBS
11875         LIBS="$ol_DB_LIB $LIBS"
11876
11877         cat > conftest.$ac_ext <<EOF
11878 #line 11879 "configure"
11879 #include "confdefs.h"
11880
11881 #ifdef HAVE_DB_185_H
11882 # include <db_185.h>
11883 #else
11884 # include <db.h>
11885 #endif
11886
11887 #ifndef DB_VERSION_MAJOR
11888 # define DB_VERSION_MAJOR 1
11889 #endif
11890
11891 #ifndef NULL
11892 #define NULL ((void*)0)
11893 #endif
11894
11895 int main() {
11896
11897 #if DB_VERSION_MAJOR > 2
11898         db_env_create( NULL, 0 );
11899 #elif DB_VERSION_MAJOR > 1
11900         db_appexit( NULL );
11901 #else
11902         (void) dbopen( NULL, 0, 0, 0, NULL);
11903 #endif
11904
11905 ; return 0; }
11906 EOF
11907 if { (eval echo configure:11908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11908   rm -rf conftest*
11909   ol_cv_db_db=yes
11910 else
11911   echo "configure: failed program was:" >&5
11912   cat conftest.$ac_ext >&5
11913   rm -rf conftest*
11914   ol_cv_db_db=no
11915 fi
11916 rm -f conftest*
11917
11918         LIBS="$ol_LIBS"
11919
11920 fi
11921
11922 echo "$ac_t""$ol_cv_db_db" 1>&6
11923
11924         if test $ol_cv_db_db = yes ; then
11925                 ol_cv_lib_db=-ldb
11926         fi
11927 fi
11928
11929 if test $ol_cv_lib_db = no ; then
11930         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11931 echo "configure:11932: checking for Berkeley DB link (-ldb3)" >&5
11932 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11933   echo $ac_n "(cached) $ac_c" 1>&6
11934 else
11935   
11936         ol_DB_LIB=-ldb3
11937         ol_LIBS=$LIBS
11938         LIBS="$ol_DB_LIB $LIBS"
11939
11940         cat > conftest.$ac_ext <<EOF
11941 #line 11942 "configure"
11942 #include "confdefs.h"
11943
11944 #ifdef HAVE_DB_185_H
11945 # include <db_185.h>
11946 #else
11947 # include <db.h>
11948 #endif
11949
11950 #ifndef DB_VERSION_MAJOR
11951 # define DB_VERSION_MAJOR 1
11952 #endif
11953
11954 #ifndef NULL
11955 #define NULL ((void*)0)
11956 #endif
11957
11958 int main() {
11959
11960 #if DB_VERSION_MAJOR > 2
11961         db_env_create( NULL, 0 );
11962 #elif DB_VERSION_MAJOR > 1
11963         db_appexit( NULL );
11964 #else
11965         (void) dbopen( NULL, 0, 0, 0, NULL);
11966 #endif
11967
11968 ; return 0; }
11969 EOF
11970 if { (eval echo configure:11971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11971   rm -rf conftest*
11972   ol_cv_db_db3=yes
11973 else
11974   echo "configure: failed program was:" >&5
11975   cat conftest.$ac_ext >&5
11976   rm -rf conftest*
11977   ol_cv_db_db3=no
11978 fi
11979 rm -f conftest*
11980
11981         LIBS="$ol_LIBS"
11982
11983 fi
11984
11985 echo "$ac_t""$ol_cv_db_db3" 1>&6
11986
11987         if test $ol_cv_db_db3 = yes ; then
11988                 ol_cv_lib_db=-ldb3
11989         fi
11990 fi
11991
11992 if test $ol_cv_lib_db = no ; then
11993         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11994 echo "configure:11995: checking for Berkeley DB link (-ldb2)" >&5
11995 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11996   echo $ac_n "(cached) $ac_c" 1>&6
11997 else
11998   
11999         ol_DB_LIB=-ldb2
12000         ol_LIBS=$LIBS
12001         LIBS="$ol_DB_LIB $LIBS"
12002
12003         cat > conftest.$ac_ext <<EOF
12004 #line 12005 "configure"
12005 #include "confdefs.h"
12006
12007 #ifdef HAVE_DB_185_H
12008 # include <db_185.h>
12009 #else
12010 # include <db.h>
12011 #endif
12012
12013 #ifndef DB_VERSION_MAJOR
12014 # define DB_VERSION_MAJOR 1
12015 #endif
12016
12017 #ifndef NULL
12018 #define NULL ((void*)0)
12019 #endif
12020
12021 int main() {
12022
12023 #if DB_VERSION_MAJOR > 2
12024         db_env_create( NULL, 0 );
12025 #elif DB_VERSION_MAJOR > 1
12026         db_appexit( NULL );
12027 #else
12028         (void) dbopen( NULL, 0, 0, 0, NULL);
12029 #endif
12030
12031 ; return 0; }
12032 EOF
12033 if { (eval echo configure:12034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12034   rm -rf conftest*
12035   ol_cv_db_db2=yes
12036 else
12037   echo "configure: failed program was:" >&5
12038   cat conftest.$ac_ext >&5
12039   rm -rf conftest*
12040   ol_cv_db_db2=no
12041 fi
12042 rm -f conftest*
12043
12044         LIBS="$ol_LIBS"
12045
12046 fi
12047
12048 echo "$ac_t""$ol_cv_db_db2" 1>&6
12049
12050         if test $ol_cv_db_db2 = yes ; then
12051                 ol_cv_lib_db=-ldb2
12052         fi
12053 fi
12054
12055 if test $ol_cv_lib_db = no ; then
12056         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12057 echo "configure:12058: checking for Berkeley DB link (-ldb1)" >&5
12058 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12059   echo $ac_n "(cached) $ac_c" 1>&6
12060 else
12061   
12062         ol_DB_LIB=-ldb1
12063         ol_LIBS=$LIBS
12064         LIBS="$ol_DB_LIB $LIBS"
12065
12066         cat > conftest.$ac_ext <<EOF
12067 #line 12068 "configure"
12068 #include "confdefs.h"
12069
12070 #ifdef HAVE_DB_185_H
12071 # include <db_185.h>
12072 #else
12073 # include <db.h>
12074 #endif
12075
12076 #ifndef DB_VERSION_MAJOR
12077 # define DB_VERSION_MAJOR 1
12078 #endif
12079
12080 #ifndef NULL
12081 #define NULL ((void*)0)
12082 #endif
12083
12084 int main() {
12085
12086 #if DB_VERSION_MAJOR > 2
12087         db_env_create( NULL, 0 );
12088 #elif DB_VERSION_MAJOR > 1
12089         db_appexit( NULL );
12090 #else
12091         (void) dbopen( NULL, 0, 0, 0, NULL);
12092 #endif
12093
12094 ; return 0; }
12095 EOF
12096 if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12097   rm -rf conftest*
12098   ol_cv_db_db1=yes
12099 else
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -rf conftest*
12103   ol_cv_db_db1=no
12104 fi
12105 rm -f conftest*
12106
12107         LIBS="$ol_LIBS"
12108
12109 fi
12110
12111 echo "$ac_t""$ol_cv_db_db1" 1>&6
12112
12113         if test $ol_cv_db_db1 = yes ; then
12114                 ol_cv_lib_db=-ldb1
12115         fi
12116 fi
12117
12118
12119         if test "$ol_cv_lib_db" != no ; then
12120                 ol_cv_berkeley_db=yes
12121                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12122 echo "configure:12123: checking for Berkeley DB thread support" >&5
12123 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12124   echo $ac_n "(cached) $ac_c" 1>&6
12125 else
12126   
12127         ol_LIBS="$LIBS"
12128         if test $ol_cv_lib_db != yes ; then
12129                 LIBS="$ol_cv_lib_db"
12130         fi
12131
12132         if test "$cross_compiling" = yes; then
12133   ol_cv_berkeley_db_thread=cross
12134 else
12135   cat > conftest.$ac_ext <<EOF
12136 #line 12137 "configure"
12137 #include "confdefs.h"
12138
12139 #ifdef HAVE_DB_185_H
12140         choke me;
12141 #else
12142 #include <db.h>
12143 #endif
12144 #ifndef NULL
12145 #define NULL ((void *)0)
12146 #endif
12147 main()
12148 {
12149         int rc;
12150         u_int32_t flags = DB_CREATE | DB_THREAD;
12151
12152
12153 #if DB_VERSION_MAJOR > 2
12154         DB_ENV *env = NULL;
12155
12156         rc = db_env_create( &env, 0 );
12157
12158         if( rc == 0 ) {
12159                 rc = env->open( env, NULL, NULL, flags, 0 );
12160         }
12161
12162 #else
12163         DB_ENV env;
12164         memset( &env, '\0', sizeof(env) );
12165
12166         rc = db_appinit( NULL, NULL, &env, flags );
12167
12168         if( rc == 0 ) {
12169                 db_appexit( &env );
12170         }
12171 #endif
12172
12173         return rc;
12174 }
12175 EOF
12176 if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12177 then
12178   ol_cv_berkeley_db_thread=yes
12179 else
12180   echo "configure: failed program was:" >&5
12181   cat conftest.$ac_ext >&5
12182   rm -fr conftest*
12183   ol_cv_berkeley_db_thread=no
12184 fi
12185 rm -fr conftest*
12186 fi
12187
12188
12189         LIBS="$ol_LIBS"
12190
12191         if test $ol_cv_berkeley_db_thread != no ; then
12192                 cat >> confdefs.h <<\EOF
12193 #define HAVE_BERKELEY_DB_THREAD 1
12194 EOF
12195
12196         fi
12197
12198 fi
12199
12200 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12201         fi
12202 fi
12203
12204         fi
12205
12206         if test $ol_cv_berkeley_db != no ; then
12207                 cat >> confdefs.h <<\EOF
12208 #define HAVE_BERKELEY_DB 1
12209 EOF
12210
12211
12212                 ol_link_ldbm=berkeley
12213                 ol_with_ldbm_api=db
12214
12215                 if test $ol_with_ldbm_type = hash ; then
12216                         cat >> confdefs.h <<\EOF
12217 #define LDBM_USE_DBHASH 1
12218 EOF
12219
12220                 else
12221                         cat >> confdefs.h <<\EOF
12222 #define LDBM_USE_DBBTREE 1
12223 EOF
12224
12225                 fi
12226
12227                                                 if test $ol_cv_lib_db != yes ; then
12228                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12229                 fi
12230         fi
12231 fi
12232
12233 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12234         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12235         ol_with_ldbm_api=none
12236 fi
12237
12238 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12239         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12240 echo "configure:12241: checking for MDBM library" >&5
12241 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12242   echo $ac_n "(cached) $ac_c" 1>&6
12243 else
12244         ol_LIBS="$LIBS"
12245         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12246 echo "configure:12247: checking for mdbm_set_chain" >&5
12247 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12248   echo $ac_n "(cached) $ac_c" 1>&6
12249 else
12250   cat > conftest.$ac_ext <<EOF
12251 #line 12252 "configure"
12252 #include "confdefs.h"
12253 /* System header to define __stub macros and hopefully few prototypes,
12254     which can conflict with char mdbm_set_chain(); below.  */
12255 #include <assert.h>
12256 /* Override any gcc2 internal prototype to avoid an error.  */
12257 /* We use char because int might match the return type of a gcc2
12258     builtin and then its argument prototype would still apply.  */
12259 char mdbm_set_chain();
12260 char (*f)();
12261
12262 int main() {
12263
12264 /* The GNU C library defines this for functions which it implements
12265     to always fail with ENOSYS.  Some functions are actually named
12266     something starting with __ and the normal name is an alias.  */
12267 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12268 choke me
12269 #else
12270 f = mdbm_set_chain;
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   eval "ac_cv_func_mdbm_set_chain=yes"
12278 else
12279   echo "configure: failed program was:" >&5
12280   cat conftest.$ac_ext >&5
12281   rm -rf conftest*
12282   eval "ac_cv_func_mdbm_set_chain=no"
12283 fi
12284 rm -f conftest*
12285 fi
12286
12287 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12288   echo "$ac_t""yes" 1>&6
12289   ol_cv_lib_mdbm=yes
12290 else
12291   echo "$ac_t""no" 1>&6
12292
12293                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12294 echo "configure:12295: checking for mdbm_set_chain in -lmdbm" >&5
12295 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12297   echo $ac_n "(cached) $ac_c" 1>&6
12298 else
12299   ac_save_LIBS="$LIBS"
12300 LIBS="-lmdbm  $LIBS"
12301 cat > conftest.$ac_ext <<EOF
12302 #line 12303 "configure"
12303 #include "confdefs.h"
12304 /* Override any gcc2 internal prototype to avoid an error.  */
12305 /* We use char because int might match the return type of a gcc2
12306     builtin and then its argument prototype would still apply.  */
12307 char mdbm_set_chain();
12308
12309 int main() {
12310 mdbm_set_chain()
12311 ; return 0; }
12312 EOF
12313 if { (eval echo configure:12314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12314   rm -rf conftest*
12315   eval "ac_cv_lib_$ac_lib_var=yes"
12316 else
12317   echo "configure: failed program was:" >&5
12318   cat conftest.$ac_ext >&5
12319   rm -rf conftest*
12320   eval "ac_cv_lib_$ac_lib_var=no"
12321 fi
12322 rm -f conftest*
12323 LIBS="$ac_save_LIBS"
12324
12325 fi
12326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12327   echo "$ac_t""yes" 1>&6
12328   ol_cv_lib_mdbm=-lmdbm
12329 else
12330   echo "$ac_t""no" 1>&6
12331 ol_cv_lib_mdbm=no
12332 fi
12333
12334         
12335 fi
12336
12337         LIBS="$ol_LIBS"
12338
12339 fi
12340
12341 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12342
12343
12344  for ac_hdr in mdbm.h
12345 do
12346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12348 echo "configure:12349: checking for $ac_hdr" >&5
12349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12350   echo $ac_n "(cached) $ac_c" 1>&6
12351 else
12352   cat > conftest.$ac_ext <<EOF
12353 #line 12354 "configure"
12354 #include "confdefs.h"
12355 #include <$ac_hdr>
12356 EOF
12357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12358 { (eval echo configure:12359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12360 if test -z "$ac_err"; then
12361   rm -rf conftest*
12362   eval "ac_cv_header_$ac_safe=yes"
12363 else
12364   echo "$ac_err" >&5
12365   echo "configure: failed program was:" >&5
12366   cat conftest.$ac_ext >&5
12367   rm -rf conftest*
12368   eval "ac_cv_header_$ac_safe=no"
12369 fi
12370 rm -f conftest*
12371 fi
12372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12373   echo "$ac_t""yes" 1>&6
12374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12375   cat >> confdefs.h <<EOF
12376 #define $ac_tr_hdr 1
12377 EOF
12378  
12379 else
12380   echo "$ac_t""no" 1>&6
12381 fi
12382 done
12383
12384  echo $ac_n "checking for db""... $ac_c" 1>&6
12385 echo "configure:12386: checking for db" >&5
12386 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12387   echo $ac_n "(cached) $ac_c" 1>&6
12388 else
12389   
12390         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12391                 ol_cv_mdbm=no
12392         else
12393                 ol_cv_mdbm=yes
12394         fi
12395
12396 fi
12397
12398 echo "$ac_t""$ol_cv_mdbm" 1>&6
12399  if test $ol_cv_mdbm = yes ; then
12400         cat >> confdefs.h <<\EOF
12401 #define HAVE_MDBM 1
12402 EOF
12403
12404  fi
12405
12406
12407         if test $ol_cv_mdbm = yes ; then
12408                 ol_link_ldbm=mdbm
12409                 ol_with_ldbm_api=mdbm
12410                 if test $ol_cv_lib_mdbm != yes ; then
12411                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12412                 fi
12413         fi
12414 fi
12415
12416 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12417         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12418 echo "configure:12419: checking for GDBM library" >&5
12419 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12420   echo $ac_n "(cached) $ac_c" 1>&6
12421 else
12422         ol_LIBS="$LIBS"
12423         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12424 echo "configure:12425: checking for gdbm_open" >&5
12425 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12426   echo $ac_n "(cached) $ac_c" 1>&6
12427 else
12428   cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 /* System header to define __stub macros and hopefully few prototypes,
12432     which can conflict with char gdbm_open(); below.  */
12433 #include <assert.h>
12434 /* Override any gcc2 internal prototype to avoid an error.  */
12435 /* We use char because int might match the return type of a gcc2
12436     builtin and then its argument prototype would still apply.  */
12437 char gdbm_open();
12438 char (*f)();
12439
12440 int main() {
12441
12442 /* The GNU C library defines this for functions which it implements
12443     to always fail with ENOSYS.  Some functions are actually named
12444     something starting with __ and the normal name is an alias.  */
12445 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12446 choke me
12447 #else
12448 f = gdbm_open;
12449 #endif
12450
12451 ; return 0; }
12452 EOF
12453 if { (eval echo configure:12454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12454   rm -rf conftest*
12455   eval "ac_cv_func_gdbm_open=yes"
12456 else
12457   echo "configure: failed program was:" >&5
12458   cat conftest.$ac_ext >&5
12459   rm -rf conftest*
12460   eval "ac_cv_func_gdbm_open=no"
12461 fi
12462 rm -f conftest*
12463 fi
12464
12465 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12466   echo "$ac_t""yes" 1>&6
12467   ol_cv_lib_gdbm=yes
12468 else
12469   echo "$ac_t""no" 1>&6
12470
12471                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12472 echo "configure:12473: checking for gdbm_open in -lgdbm" >&5
12473 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12474 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12475   echo $ac_n "(cached) $ac_c" 1>&6
12476 else
12477   ac_save_LIBS="$LIBS"
12478 LIBS="-lgdbm  $LIBS"
12479 cat > conftest.$ac_ext <<EOF
12480 #line 12481 "configure"
12481 #include "confdefs.h"
12482 /* Override any gcc2 internal prototype to avoid an error.  */
12483 /* We use char because int might match the return type of a gcc2
12484     builtin and then its argument prototype would still apply.  */
12485 char gdbm_open();
12486
12487 int main() {
12488 gdbm_open()
12489 ; return 0; }
12490 EOF
12491 if { (eval echo configure:12492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12492   rm -rf conftest*
12493   eval "ac_cv_lib_$ac_lib_var=yes"
12494 else
12495   echo "configure: failed program was:" >&5
12496   cat conftest.$ac_ext >&5
12497   rm -rf conftest*
12498   eval "ac_cv_lib_$ac_lib_var=no"
12499 fi
12500 rm -f conftest*
12501 LIBS="$ac_save_LIBS"
12502
12503 fi
12504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12505   echo "$ac_t""yes" 1>&6
12506   ol_cv_lib_gdbm=-lgdbm
12507 else
12508   echo "$ac_t""no" 1>&6
12509 ol_cv_lib_gdbm=no
12510 fi
12511
12512         
12513 fi
12514
12515         LIBS="$ol_LIBS"
12516
12517 fi
12518
12519 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12520
12521
12522  for ac_hdr in gdbm.h
12523 do
12524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12526 echo "configure:12527: checking for $ac_hdr" >&5
12527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12528   echo $ac_n "(cached) $ac_c" 1>&6
12529 else
12530   cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 #include <$ac_hdr>
12534 EOF
12535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12536 { (eval echo configure:12537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12538 if test -z "$ac_err"; then
12539   rm -rf conftest*
12540   eval "ac_cv_header_$ac_safe=yes"
12541 else
12542   echo "$ac_err" >&5
12543   echo "configure: failed program was:" >&5
12544   cat conftest.$ac_ext >&5
12545   rm -rf conftest*
12546   eval "ac_cv_header_$ac_safe=no"
12547 fi
12548 rm -f conftest*
12549 fi
12550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12551   echo "$ac_t""yes" 1>&6
12552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12553   cat >> confdefs.h <<EOF
12554 #define $ac_tr_hdr 1
12555 EOF
12556  
12557 else
12558   echo "$ac_t""no" 1>&6
12559 fi
12560 done
12561
12562  echo $ac_n "checking for db""... $ac_c" 1>&6
12563 echo "configure:12564: checking for db" >&5
12564 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12565   echo $ac_n "(cached) $ac_c" 1>&6
12566 else
12567   
12568         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12569                 ol_cv_gdbm=no
12570         else
12571                 ol_cv_gdbm=yes
12572         fi
12573
12574 fi
12575
12576 echo "$ac_t""$ol_cv_gdbm" 1>&6
12577  if test $ol_cv_gdbm = yes ; then
12578         cat >> confdefs.h <<\EOF
12579 #define HAVE_GDBM 1
12580 EOF
12581
12582  fi
12583
12584
12585         if test $ol_cv_gdbm = yes ; then
12586                 ol_link_ldbm=gdbm
12587                 ol_with_ldbm_api=gdbm
12588
12589                 if test $ol_cv_lib_gdbm != yes ; then
12590                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12591                 fi
12592         fi
12593 fi
12594
12595 if test $ol_with_ldbm_api = ndbm ; then
12596         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12597 echo "configure:12598: checking for NDBM library" >&5
12598 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12599   echo $ac_n "(cached) $ac_c" 1>&6
12600 else
12601         ol_LIBS="$LIBS"
12602         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12603 echo "configure:12604: checking for dbm_open" >&5
12604 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12605   echo $ac_n "(cached) $ac_c" 1>&6
12606 else
12607   cat > conftest.$ac_ext <<EOF
12608 #line 12609 "configure"
12609 #include "confdefs.h"
12610 /* System header to define __stub macros and hopefully few prototypes,
12611     which can conflict with char dbm_open(); below.  */
12612 #include <assert.h>
12613 /* Override any gcc2 internal prototype to avoid an error.  */
12614 /* We use char because int might match the return type of a gcc2
12615     builtin and then its argument prototype would still apply.  */
12616 char dbm_open();
12617 char (*f)();
12618
12619 int main() {
12620
12621 /* The GNU C library defines this for functions which it implements
12622     to always fail with ENOSYS.  Some functions are actually named
12623     something starting with __ and the normal name is an alias.  */
12624 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12625 choke me
12626 #else
12627 f = dbm_open;
12628 #endif
12629
12630 ; return 0; }
12631 EOF
12632 if { (eval echo configure:12633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12633   rm -rf conftest*
12634   eval "ac_cv_func_dbm_open=yes"
12635 else
12636   echo "configure: failed program was:" >&5
12637   cat conftest.$ac_ext >&5
12638   rm -rf conftest*
12639   eval "ac_cv_func_dbm_open=no"
12640 fi
12641 rm -f conftest*
12642 fi
12643
12644 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12645   echo "$ac_t""yes" 1>&6
12646   ol_cv_lib_ndbm=yes
12647 else
12648   echo "$ac_t""no" 1>&6
12649
12650                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12651 echo "configure:12652: checking for dbm_open in -lndbm" >&5
12652 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12654   echo $ac_n "(cached) $ac_c" 1>&6
12655 else
12656   ac_save_LIBS="$LIBS"
12657 LIBS="-lndbm  $LIBS"
12658 cat > conftest.$ac_ext <<EOF
12659 #line 12660 "configure"
12660 #include "confdefs.h"
12661 /* Override any gcc2 internal prototype to avoid an error.  */
12662 /* We use char because int might match the return type of a gcc2
12663     builtin and then its argument prototype would still apply.  */
12664 char dbm_open();
12665
12666 int main() {
12667 dbm_open()
12668 ; return 0; }
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12671   rm -rf conftest*
12672   eval "ac_cv_lib_$ac_lib_var=yes"
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -rf conftest*
12677   eval "ac_cv_lib_$ac_lib_var=no"
12678 fi
12679 rm -f conftest*
12680 LIBS="$ac_save_LIBS"
12681
12682 fi
12683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12684   echo "$ac_t""yes" 1>&6
12685   ol_cv_lib_ndbm=-lndbm
12686 else
12687   echo "$ac_t""no" 1>&6
12688
12689                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12690 echo "configure:12691: checking for dbm_open in -ldbm" >&5
12691 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12693   echo $ac_n "(cached) $ac_c" 1>&6
12694 else
12695   ac_save_LIBS="$LIBS"
12696 LIBS="-ldbm  $LIBS"
12697 cat > conftest.$ac_ext <<EOF
12698 #line 12699 "configure"
12699 #include "confdefs.h"
12700 /* Override any gcc2 internal prototype to avoid an error.  */
12701 /* We use char because int might match the return type of a gcc2
12702     builtin and then its argument prototype would still apply.  */
12703 char dbm_open();
12704
12705 int main() {
12706 dbm_open()
12707 ; return 0; }
12708 EOF
12709 if { (eval echo configure:12710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12710   rm -rf conftest*
12711   eval "ac_cv_lib_$ac_lib_var=yes"
12712 else
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   eval "ac_cv_lib_$ac_lib_var=no"
12717 fi
12718 rm -f conftest*
12719 LIBS="$ac_save_LIBS"
12720
12721 fi
12722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12723   echo "$ac_t""yes" 1>&6
12724   ol_cv_lib_ndbm=-ldbm
12725 else
12726   echo "$ac_t""no" 1>&6
12727 ol_cv_lib_ndbm=no
12728 fi
12729                 
12730 fi
12731
12732         
12733 fi
12734
12735         LIBS="$ol_LIBS"
12736
12737 fi
12738
12739 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12740
12741
12742  for ac_hdr in ndbm.h
12743 do
12744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12746 echo "configure:12747: checking for $ac_hdr" >&5
12747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753 #include <$ac_hdr>
12754 EOF
12755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12756 { (eval echo configure:12757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12758 if test -z "$ac_err"; then
12759   rm -rf conftest*
12760   eval "ac_cv_header_$ac_safe=yes"
12761 else
12762   echo "$ac_err" >&5
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -rf conftest*
12766   eval "ac_cv_header_$ac_safe=no"
12767 fi
12768 rm -f conftest*
12769 fi
12770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12771   echo "$ac_t""yes" 1>&6
12772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12773   cat >> confdefs.h <<EOF
12774 #define $ac_tr_hdr 1
12775 EOF
12776  
12777 else
12778   echo "$ac_t""no" 1>&6
12779 fi
12780 done
12781
12782  echo $ac_n "checking for db""... $ac_c" 1>&6
12783 echo "configure:12784: checking for db" >&5
12784 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12785   echo $ac_n "(cached) $ac_c" 1>&6
12786 else
12787   
12788         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12789                 ol_cv_ndbm=no
12790         else
12791                 ol_cv_ndbm=yes
12792         fi
12793
12794 fi
12795
12796 echo "$ac_t""$ol_cv_ndbm" 1>&6
12797  if test $ol_cv_ndbm = yes ; then
12798         cat >> confdefs.h <<\EOF
12799 #define HAVE_NDBM 1
12800 EOF
12801
12802  fi
12803
12804
12805         if test $ol_cv_ndbm = yes ; then
12806                 ol_link_ldbm=ndbm
12807                 ol_with_ldbm_api=ndbm
12808
12809                 if test $ol_cv_lib_ndbm != yes ; then
12810                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12811                 fi
12812         fi
12813 fi
12814
12815 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12816         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12817         if test $ol_enable_ldbm = yes ; then
12818                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12819         fi
12820
12821         echo "configure: warning: disabling LDBM" 1>&2
12822         ol_enable_ldbm=no
12823 fi
12824
12825 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12826         LINK_BINS_DYNAMIC="yes"
12827 else
12828         LINK_BINS_DYNAMIC="no"
12829 fi
12830
12831 if test $ol_enable_wrappers != no ; then
12832         for ac_hdr in tcpd.h
12833 do
12834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12836 echo "configure:12837: checking for $ac_hdr" >&5
12837 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12838   echo $ac_n "(cached) $ac_c" 1>&6
12839 else
12840   cat > conftest.$ac_ext <<EOF
12841 #line 12842 "configure"
12842 #include "confdefs.h"
12843 #include <$ac_hdr>
12844 EOF
12845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12846 { (eval echo configure:12847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12848 if test -z "$ac_err"; then
12849   rm -rf conftest*
12850   eval "ac_cv_header_$ac_safe=yes"
12851 else
12852   echo "$ac_err" >&5
12853   echo "configure: failed program was:" >&5
12854   cat conftest.$ac_ext >&5
12855   rm -rf conftest*
12856   eval "ac_cv_header_$ac_safe=no"
12857 fi
12858 rm -f conftest*
12859 fi
12860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12861   echo "$ac_t""yes" 1>&6
12862     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12863   cat >> confdefs.h <<EOF
12864 #define $ac_tr_hdr 1
12865 EOF
12866  
12867 else
12868   echo "$ac_t""no" 1>&6
12869 fi
12870 done
12871
12872
12873         if test $ac_cv_header_tcpd_h != yes ; then
12874                 have_wrappers=no
12875         else
12876                 cat > conftest.$ac_ext <<EOF
12877 #line 12878 "configure"
12878 #include "confdefs.h"
12879
12880 int allow_severity = 0;
12881 int deny_severity  = 0;
12882                 
12883 int main() {
12884 hosts_access()
12885 ; return 0; }
12886 EOF
12887 if { (eval echo configure:12888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12888   rm -rf conftest*
12889   have_wrappers=yes
12890 else
12891   echo "configure: failed program was:" >&5
12892   cat conftest.$ac_ext >&5
12893   rm -rf conftest*
12894   have_wrappers=no
12895 fi
12896 rm -f conftest*
12897         fi
12898
12899         if test $have_wrappers = yes ; then
12900                 cat >> confdefs.h <<\EOF
12901 #define HAVE_TCPD 1
12902 EOF
12903
12904                 WRAP_LIBS="-lwrap"
12905
12906                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12907 echo "configure:12908: checking for main in -lnsl" >&5
12908 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12910   echo $ac_n "(cached) $ac_c" 1>&6
12911 else
12912   ac_save_LIBS="$LIBS"
12913 LIBS="-lnsl  $LIBS"
12914 cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917
12918 int main() {
12919 main()
12920 ; return 0; }
12921 EOF
12922 if { (eval echo configure:12923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12923   rm -rf conftest*
12924   eval "ac_cv_lib_$ac_lib_var=yes"
12925 else
12926   echo "configure: failed program was:" >&5
12927   cat conftest.$ac_ext >&5
12928   rm -rf conftest*
12929   eval "ac_cv_lib_$ac_lib_var=no"
12930 fi
12931 rm -f conftest*
12932 LIBS="$ac_save_LIBS"
12933
12934 fi
12935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12936   echo "$ac_t""yes" 1>&6
12937     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12938     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12939   cat >> confdefs.h <<EOF
12940 #define $ac_tr_lib 1
12941 EOF
12942
12943   LIBS="-lnsl $LIBS"
12944
12945 else
12946   echo "$ac_t""no" 1>&6
12947 fi
12948
12949         else
12950                 echo "configure: warning: could not find -lwrap" 1>&2
12951                 if test $ol_enable_wrappers = yes ; then
12952                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12953                 fi
12954
12955                 echo "configure: warning: disabling wrappers support" 1>&2
12956                 ol_enable_wrappers=no
12957                 WRAP_LIBS=""
12958         fi
12959 fi
12960
12961 if test $ol_enable_syslog != no ; then
12962         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12963 echo "configure:12964: checking for openlog" >&5
12964 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12965   echo $ac_n "(cached) $ac_c" 1>&6
12966 else
12967   cat > conftest.$ac_ext <<EOF
12968 #line 12969 "configure"
12969 #include "confdefs.h"
12970 /* System header to define __stub macros and hopefully few prototypes,
12971     which can conflict with char openlog(); below.  */
12972 #include <assert.h>
12973 /* Override any gcc2 internal prototype to avoid an error.  */
12974 /* We use char because int might match the return type of a gcc2
12975     builtin and then its argument prototype would still apply.  */
12976 char openlog();
12977 char (*f)();
12978
12979 int main() {
12980
12981 /* The GNU C library defines this for functions which it implements
12982     to always fail with ENOSYS.  Some functions are actually named
12983     something starting with __ and the normal name is an alias.  */
12984 #if defined (__stub_openlog) || defined (__stub___openlog)
12985 choke me
12986 #else
12987 f = openlog;
12988 #endif
12989
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12993   rm -rf conftest*
12994   eval "ac_cv_func_openlog=yes"
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   eval "ac_cv_func_openlog=no"
13000 fi
13001 rm -f conftest*
13002 fi
13003
13004 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13005   echo "$ac_t""yes" 1>&6
13006   :
13007 else
13008   echo "$ac_t""no" 1>&6
13009 fi
13010
13011         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13012                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13013         fi
13014         ol_enable_syslog=$ac_cv_func_openlog
13015 fi
13016
13017 if test $ol_enable_tcl != no ; then
13018         for ac_hdr in tcl.h
13019 do
13020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13022 echo "configure:13023: checking for $ac_hdr" >&5
13023 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13024   echo $ac_n "(cached) $ac_c" 1>&6
13025 else
13026   cat > conftest.$ac_ext <<EOF
13027 #line 13028 "configure"
13028 #include "confdefs.h"
13029 #include <$ac_hdr>
13030 EOF
13031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13032 { (eval echo configure:13033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13034 if test -z "$ac_err"; then
13035   rm -rf conftest*
13036   eval "ac_cv_header_$ac_safe=yes"
13037 else
13038   echo "$ac_err" >&5
13039   echo "configure: failed program was:" >&5
13040   cat conftest.$ac_ext >&5
13041   rm -rf conftest*
13042   eval "ac_cv_header_$ac_safe=no"
13043 fi
13044 rm -f conftest*
13045 fi
13046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13047   echo "$ac_t""yes" 1>&6
13048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13049   cat >> confdefs.h <<EOF
13050 #define $ac_tr_hdr 1
13051 EOF
13052  
13053 else
13054   echo "$ac_t""no" 1>&6
13055 fi
13056 done
13057
13058
13059         if test $ac_cv_header_tcl_h != yes ; then
13060                 have_tcl=no
13061         else
13062                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13063                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13064 echo "configure:13065: checking for main in -l$lib" >&5
13065 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13066 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13067   echo $ac_n "(cached) $ac_c" 1>&6
13068 else
13069   ac_save_LIBS="$LIBS"
13070 LIBS="-l$lib  $LIBS"
13071 cat > conftest.$ac_ext <<EOF
13072 #line 13073 "configure"
13073 #include "confdefs.h"
13074
13075 int main() {
13076 main()
13077 ; return 0; }
13078 EOF
13079 if { (eval echo configure:13080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13080   rm -rf conftest*
13081   eval "ac_cv_lib_$ac_lib_var=yes"
13082 else
13083   echo "configure: failed program was:" >&5
13084   cat conftest.$ac_ext >&5
13085   rm -rf conftest*
13086   eval "ac_cv_lib_$ac_lib_var=no"
13087 fi
13088 rm -f conftest*
13089 LIBS="$ac_save_LIBS"
13090
13091 fi
13092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13093   echo "$ac_t""yes" 1>&6
13094   have_tcl=yes
13095                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13096                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13097                            else
13098                                MOD_TCL_LIB="-l${lib}"
13099                            fi;break
13100 else
13101   echo "$ac_t""no" 1>&6
13102 have_tcl=no
13103 fi
13104
13105                 done
13106         fi
13107
13108         if test $have_tcl != yes ; then
13109                 echo "configure: warning: could not find -ltcl" 1>&2
13110                 if test $ol_enable_tcl = yes ; then
13111                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13112                 fi
13113
13114                 ol_enable_tcl=no
13115         fi
13116 fi
13117
13118 ol_link_termcap=no
13119 for ac_hdr in termcap.h ncurses.h
13120 do
13121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13123 echo "configure:13124: checking for $ac_hdr" >&5
13124 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13125   echo $ac_n "(cached) $ac_c" 1>&6
13126 else
13127   cat > conftest.$ac_ext <<EOF
13128 #line 13129 "configure"
13129 #include "confdefs.h"
13130 #include <$ac_hdr>
13131 EOF
13132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13133 { (eval echo configure:13134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13135 if test -z "$ac_err"; then
13136   rm -rf conftest*
13137   eval "ac_cv_header_$ac_safe=yes"
13138 else
13139   echo "$ac_err" >&5
13140   echo "configure: failed program was:" >&5
13141   cat conftest.$ac_ext >&5
13142   rm -rf conftest*
13143   eval "ac_cv_header_$ac_safe=no"
13144 fi
13145 rm -f conftest*
13146 fi
13147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13148   echo "$ac_t""yes" 1>&6
13149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13150   cat >> confdefs.h <<EOF
13151 #define $ac_tr_hdr 1
13152 EOF
13153  
13154 else
13155   echo "$ac_t""no" 1>&6
13156 fi
13157 done
13158
13159
13160 if test $ol_link_termcap = no ; then
13161         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13162 echo "configure:13163: checking for tputs in -ltermcap" >&5
13163 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13165   echo $ac_n "(cached) $ac_c" 1>&6
13166 else
13167   ac_save_LIBS="$LIBS"
13168 LIBS="-ltermcap  $LIBS"
13169 cat > conftest.$ac_ext <<EOF
13170 #line 13171 "configure"
13171 #include "confdefs.h"
13172 /* Override any gcc2 internal prototype to avoid an error.  */
13173 /* We use char because int might match the return type of a gcc2
13174     builtin and then its argument prototype would still apply.  */
13175 char tputs();
13176
13177 int main() {
13178 tputs()
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_lib_$ac_lib_var=yes"
13184 else
13185   echo "configure: failed program was:" >&5
13186   cat conftest.$ac_ext >&5
13187   rm -rf conftest*
13188   eval "ac_cv_lib_$ac_lib_var=no"
13189 fi
13190 rm -f conftest*
13191 LIBS="$ac_save_LIBS"
13192
13193 fi
13194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13195   echo "$ac_t""yes" 1>&6
13196   have_termcap=yes
13197 else
13198   echo "$ac_t""no" 1>&6
13199 have_termcap=no
13200 fi
13201
13202         if test $have_termcap = yes ; then
13203                 cat >> confdefs.h <<\EOF
13204 #define HAVE_TERMCAP 1
13205 EOF
13206
13207                 ol_link_termcap=yes
13208                 TERMCAP_LIBS=-ltermcap
13209         fi
13210 fi
13211
13212 if test $ol_link_termcap = no ; then
13213         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13214 echo "configure:13215: checking for initscr in -lncurses" >&5
13215 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13217   echo $ac_n "(cached) $ac_c" 1>&6
13218 else
13219   ac_save_LIBS="$LIBS"
13220 LIBS="-lncurses  $LIBS"
13221 cat > conftest.$ac_ext <<EOF
13222 #line 13223 "configure"
13223 #include "confdefs.h"
13224 /* Override any gcc2 internal prototype to avoid an error.  */
13225 /* We use char because int might match the return type of a gcc2
13226     builtin and then its argument prototype would still apply.  */
13227 char initscr();
13228
13229 int main() {
13230 initscr()
13231 ; return 0; }
13232 EOF
13233 if { (eval echo configure:13234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13234   rm -rf conftest*
13235   eval "ac_cv_lib_$ac_lib_var=yes"
13236 else
13237   echo "configure: failed program was:" >&5
13238   cat conftest.$ac_ext >&5
13239   rm -rf conftest*
13240   eval "ac_cv_lib_$ac_lib_var=no"
13241 fi
13242 rm -f conftest*
13243 LIBS="$ac_save_LIBS"
13244
13245 fi
13246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13247   echo "$ac_t""yes" 1>&6
13248   have_ncurses=yes
13249 else
13250   echo "$ac_t""no" 1>&6
13251 have_ncurses=no
13252 fi
13253
13254         if test $have_ncurses = yes ; then
13255                 cat >> confdefs.h <<\EOF
13256 #define HAVE_NCURSES 1
13257 EOF
13258
13259                 ol_link_termcap=yes
13260                 TERMCAP_LIBS=-lncurses
13261         fi
13262 fi
13263
13264 if test $ol_link_termcap = no ; then
13265         cat >> confdefs.h <<\EOF
13266 #define NO_TERMCAP 1
13267 EOF
13268
13269         TERMCAP_LIBS=
13270 fi
13271
13272 ol_link_sasl=no
13273 ol_link_spasswd=no
13274 if test $ol_with_cyrus_sasl != no ; then
13275         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13276 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13277 echo "configure:13278: checking for sasl.h" >&5
13278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13279   echo $ac_n "(cached) $ac_c" 1>&6
13280 else
13281   cat > conftest.$ac_ext <<EOF
13282 #line 13283 "configure"
13283 #include "confdefs.h"
13284 #include <sasl.h>
13285 EOF
13286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13287 { (eval echo configure:13288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13289 if test -z "$ac_err"; then
13290   rm -rf conftest*
13291   eval "ac_cv_header_$ac_safe=yes"
13292 else
13293   echo "$ac_err" >&5
13294   echo "configure: failed program was:" >&5
13295   cat conftest.$ac_ext >&5
13296   rm -rf conftest*
13297   eval "ac_cv_header_$ac_safe=no"
13298 fi
13299 rm -f conftest*
13300 fi
13301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13302   echo "$ac_t""yes" 1>&6
13303   :
13304 else
13305   echo "$ac_t""no" 1>&6
13306 fi
13307
13308
13309         if test $ac_cv_header_sasl_h = yes ; then
13310                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13311 echo "configure:13312: checking for sasl_client_init in -lsasl" >&5
13312 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13313 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13314   echo $ac_n "(cached) $ac_c" 1>&6
13315 else
13316   ac_save_LIBS="$LIBS"
13317 LIBS="-lsasl  $LIBS"
13318 cat > conftest.$ac_ext <<EOF
13319 #line 13320 "configure"
13320 #include "confdefs.h"
13321 /* Override any gcc2 internal prototype to avoid an error.  */
13322 /* We use char because int might match the return type of a gcc2
13323     builtin and then its argument prototype would still apply.  */
13324 char sasl_client_init();
13325
13326 int main() {
13327 sasl_client_init()
13328 ; return 0; }
13329 EOF
13330 if { (eval echo configure:13331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13331   rm -rf conftest*
13332   eval "ac_cv_lib_$ac_lib_var=yes"
13333 else
13334   echo "configure: failed program was:" >&5
13335   cat conftest.$ac_ext >&5
13336   rm -rf conftest*
13337   eval "ac_cv_lib_$ac_lib_var=no"
13338 fi
13339 rm -f conftest*
13340 LIBS="$ac_save_LIBS"
13341
13342 fi
13343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13344   echo "$ac_t""yes" 1>&6
13345   have_cyrus_sasl=yes
13346 else
13347   echo "$ac_t""no" 1>&6
13348 have_cyrus_sasl=no
13349 fi
13350
13351
13352                 if test $have_cyrus_sasl != no ; then
13353                         SASL_LIBS="-lsasl"
13354                         cat >> confdefs.h <<\EOF
13355 #define HAVE_CYRUS_SASL 1
13356 EOF
13357
13358                         ol_link_sasl=yes
13359                 fi
13360         fi
13361
13362         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13363                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13364         fi
13365 fi
13366
13367 if test $cross_compiling != yes ; then
13368         dev=no
13369         if test -r /dev/urandom ; then
13370                 dev="/dev/urandom";
13371         elif test -r /idev/urandom ; then
13372                 dev="/idev/urandom";
13373         elif test -r /dev/srandom ; then
13374                 dev="/dev/srandom";
13375         elif test -r /dev/random ; then
13376                 dev="/dev/random";
13377         elif test -r /idev/random ; then
13378                 dev="/idev/random";
13379         fi
13380
13381         if test $dev != no ; then
13382                 cat >> confdefs.h <<EOF
13383 #define URANDOM_DEVICE "$dev"
13384 EOF
13385
13386         fi
13387 fi
13388
13389 ol_link_fetch=no
13390 if test $ol_with_fetch != no ; then
13391         ol_LIBS=$LIBS
13392 LIBS="-lfetch -lcom_err $LIBS"
13393 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13394 echo "configure:13395: checking fetch(3) library" >&5
13395 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13396   echo $ac_n "(cached) $ac_c" 1>&6
13397 else
13398   
13399         cat > conftest.$ac_ext <<EOF
13400 #line 13401 "configure"
13401 #include "confdefs.h"
13402
13403 #include <sys/param.h>
13404 #include <stdio.h>
13405 #include <fetch.h>
13406 int main() {
13407 struct url *u = fetchParseURL("file:///"); 
13408 ; return 0; }
13409 EOF
13410 if { (eval echo configure:13411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13411   rm -rf conftest*
13412   ol_cv_lib_fetch=yes
13413 else
13414   echo "configure: failed program was:" >&5
13415   cat conftest.$ac_ext >&5
13416   rm -rf conftest*
13417   ol_cv_lib_fetch=no
13418 fi
13419 rm -f conftest*
13420 fi
13421
13422 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13423 LIBS=$ol_LIBS
13424 if test $ol_cv_lib_fetch != no ; then
13425         ol_link_fetch="-lfetch -lcom_err"
13426         cat >> confdefs.h <<\EOF
13427 #define HAVE_FETCH 1
13428 EOF
13429
13430 fi
13431
13432
13433         if test $ol_cv_lib_fetch != no ; then
13434                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13435                 ol_link_fetch=freebsd
13436
13437         elif test $ol_with_fetch != auto ; then
13438                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13439         fi 
13440 fi
13441
13442 ol_link_readline=no
13443 if test $ol_with_readline != no ; then
13444         for ac_hdr in readline/readline.h readline/history.h
13445 do
13446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13448 echo "configure:13449: checking for $ac_hdr" >&5
13449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13450   echo $ac_n "(cached) $ac_c" 1>&6
13451 else
13452   cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 #include <$ac_hdr>
13456 EOF
13457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13458 { (eval echo configure:13459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13460 if test -z "$ac_err"; then
13461   rm -rf conftest*
13462   eval "ac_cv_header_$ac_safe=yes"
13463 else
13464   echo "$ac_err" >&5
13465   echo "configure: failed program was:" >&5
13466   cat conftest.$ac_ext >&5
13467   rm -rf conftest*
13468   eval "ac_cv_header_$ac_safe=no"
13469 fi
13470 rm -f conftest*
13471 fi
13472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13473   echo "$ac_t""yes" 1>&6
13474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13475   cat >> confdefs.h <<EOF
13476 #define $ac_tr_hdr 1
13477 EOF
13478  
13479 else
13480   echo "$ac_t""no" 1>&6
13481 fi
13482 done
13483
13484
13485         if test $ac_cv_header_readline_readline_h = yes ; then
13486                 save_LIBS="$LIBS"
13487                 LIBS="$TERMCAP_LIBS $LIBS"
13488                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13489 echo "configure:13490: checking for readline in -lreadline" >&5
13490 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13492   echo $ac_n "(cached) $ac_c" 1>&6
13493 else
13494   ac_save_LIBS="$LIBS"
13495 LIBS="-lreadline  $LIBS"
13496 cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 /* Override any gcc2 internal prototype to avoid an error.  */
13500 /* We use char because int might match the return type of a gcc2
13501     builtin and then its argument prototype would still apply.  */
13502 char readline();
13503
13504 int main() {
13505 readline()
13506 ; return 0; }
13507 EOF
13508 if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13509   rm -rf conftest*
13510   eval "ac_cv_lib_$ac_lib_var=yes"
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -rf conftest*
13515   eval "ac_cv_lib_$ac_lib_var=no"
13516 fi
13517 rm -f conftest*
13518 LIBS="$ac_save_LIBS"
13519
13520 fi
13521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13522   echo "$ac_t""yes" 1>&6
13523   have_readline=yes
13524 else
13525   echo "$ac_t""no" 1>&6
13526 have_readline=no
13527 fi
13528
13529                 LIBS="$save_LIBS"
13530                         
13531                 if test $have_readline = yes ; then
13532                         ol_with_readline=found
13533                         ol_link_readline=yes
13534
13535                         READLINE_LIBS="-lreadline"
13536                 fi
13537         fi
13538 fi
13539
13540 if test $ol_link_readline = yes ; then
13541         cat >> confdefs.h <<\EOF
13542 #define HAVE_READLINE 1
13543 EOF
13544
13545 fi
13546
13547
13548 if test $ol_enable_crypt != no ; then
13549         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13550 echo "configure:13551: checking for crypt" >&5
13551 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13552   echo $ac_n "(cached) $ac_c" 1>&6
13553 else
13554   cat > conftest.$ac_ext <<EOF
13555 #line 13556 "configure"
13556 #include "confdefs.h"
13557 /* System header to define __stub macros and hopefully few prototypes,
13558     which can conflict with char crypt(); below.  */
13559 #include <assert.h>
13560 /* Override any gcc2 internal prototype to avoid an error.  */
13561 /* We use char because int might match the return type of a gcc2
13562     builtin and then its argument prototype would still apply.  */
13563 char crypt();
13564 char (*f)();
13565
13566 int main() {
13567
13568 /* The GNU C library defines this for functions which it implements
13569     to always fail with ENOSYS.  Some functions are actually named
13570     something starting with __ and the normal name is an alias.  */
13571 #if defined (__stub_crypt) || defined (__stub___crypt)
13572 choke me
13573 #else
13574 f = crypt;
13575 #endif
13576
13577 ; return 0; }
13578 EOF
13579 if { (eval echo configure:13580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13580   rm -rf conftest*
13581   eval "ac_cv_func_crypt=yes"
13582 else
13583   echo "configure: failed program was:" >&5
13584   cat conftest.$ac_ext >&5
13585   rm -rf conftest*
13586   eval "ac_cv_func_crypt=no"
13587 fi
13588 rm -f conftest*
13589 fi
13590
13591 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13592   echo "$ac_t""yes" 1>&6
13593   have_crypt=yes
13594 else
13595   echo "$ac_t""no" 1>&6
13596
13597                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13598 echo "configure:13599: checking for crypt in -lcrypt" >&5
13599 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13601   echo $ac_n "(cached) $ac_c" 1>&6
13602 else
13603   ac_save_LIBS="$LIBS"
13604 LIBS="-lcrypt  $LIBS"
13605 cat > conftest.$ac_ext <<EOF
13606 #line 13607 "configure"
13607 #include "confdefs.h"
13608 /* Override any gcc2 internal prototype to avoid an error.  */
13609 /* We use char because int might match the return type of a gcc2
13610     builtin and then its argument prototype would still apply.  */
13611 char crypt();
13612
13613 int main() {
13614 crypt()
13615 ; return 0; }
13616 EOF
13617 if { (eval echo configure:13618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13618   rm -rf conftest*
13619   eval "ac_cv_lib_$ac_lib_var=yes"
13620 else
13621   echo "configure: failed program was:" >&5
13622   cat conftest.$ac_ext >&5
13623   rm -rf conftest*
13624   eval "ac_cv_lib_$ac_lib_var=no"
13625 fi
13626 rm -f conftest*
13627 LIBS="$ac_save_LIBS"
13628
13629 fi
13630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13631   echo "$ac_t""yes" 1>&6
13632   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13633                         have_crypt=yes
13634 else
13635   echo "$ac_t""no" 1>&6
13636 have_crypt=no
13637 fi
13638
13639 fi
13640
13641
13642         if test $have_crypt = yes ; then
13643                 cat >> confdefs.h <<\EOF
13644 #define HAVE_CRYPT 1
13645 EOF
13646
13647         else
13648                 echo "configure: warning: could not find crypt" 1>&2
13649                 if test $ol_enable_crypt = yes ; then
13650                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13651                 fi
13652
13653                 echo "configure: warning: disabling crypt support" 1>&2
13654                 ol_enable_crypt=no
13655         fi
13656 fi
13657
13658 if test $ol_enable_proctitle != no ; then
13659         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13660 echo "configure:13661: checking for setproctitle" >&5
13661 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13662   echo $ac_n "(cached) $ac_c" 1>&6
13663 else
13664   cat > conftest.$ac_ext <<EOF
13665 #line 13666 "configure"
13666 #include "confdefs.h"
13667 /* System header to define __stub macros and hopefully few prototypes,
13668     which can conflict with char setproctitle(); below.  */
13669 #include <assert.h>
13670 /* Override any gcc2 internal prototype to avoid an error.  */
13671 /* We use char because int might match the return type of a gcc2
13672     builtin and then its argument prototype would still apply.  */
13673 char setproctitle();
13674 char (*f)();
13675
13676 int main() {
13677
13678 /* The GNU C library defines this for functions which it implements
13679     to always fail with ENOSYS.  Some functions are actually named
13680     something starting with __ and the normal name is an alias.  */
13681 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13682 choke me
13683 #else
13684 f = setproctitle;
13685 #endif
13686
13687 ; return 0; }
13688 EOF
13689 if { (eval echo configure:13690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13690   rm -rf conftest*
13691   eval "ac_cv_func_setproctitle=yes"
13692 else
13693   echo "configure: failed program was:" >&5
13694   cat conftest.$ac_ext >&5
13695   rm -rf conftest*
13696   eval "ac_cv_func_setproctitle=no"
13697 fi
13698 rm -f conftest*
13699 fi
13700
13701 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13702   echo "$ac_t""yes" 1>&6
13703   have_setproctitle=yes
13704 else
13705   echo "$ac_t""no" 1>&6
13706
13707                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13708 echo "configure:13709: checking for setproctitle in -lutil" >&5
13709 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13711   echo $ac_n "(cached) $ac_c" 1>&6
13712 else
13713   ac_save_LIBS="$LIBS"
13714 LIBS="-lutil  $LIBS"
13715 cat > conftest.$ac_ext <<EOF
13716 #line 13717 "configure"
13717 #include "confdefs.h"
13718 /* Override any gcc2 internal prototype to avoid an error.  */
13719 /* We use char because int might match the return type of a gcc2
13720     builtin and then its argument prototype would still apply.  */
13721 char setproctitle();
13722
13723 int main() {
13724 setproctitle()
13725 ; return 0; }
13726 EOF
13727 if { (eval echo configure:13728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13728   rm -rf conftest*
13729   eval "ac_cv_lib_$ac_lib_var=yes"
13730 else
13731   echo "configure: failed program was:" >&5
13732   cat conftest.$ac_ext >&5
13733   rm -rf conftest*
13734   eval "ac_cv_lib_$ac_lib_var=no"
13735 fi
13736 rm -f conftest*
13737 LIBS="$ac_save_LIBS"
13738
13739 fi
13740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13741   echo "$ac_t""yes" 1>&6
13742   have_setproctitle=yes
13743                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13744 else
13745   echo "$ac_t""no" 1>&6
13746 have_setproctitle=no
13747                         LIBOBJS="$LIBOBJS setproctitle.o"
13748                         LIBSRCS="$LIBSRCS setproctitle.c"
13749 fi
13750
13751 fi
13752
13753
13754         if test $have_setproctitle = yes ; then
13755                 cat >> confdefs.h <<\EOF
13756 #define HAVE_SETPROCTITLE 1
13757 EOF
13758
13759         fi
13760 fi
13761
13762 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13763 echo "configure:13764: checking for ANSI C header files" >&5
13764 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13765   echo $ac_n "(cached) $ac_c" 1>&6
13766 else
13767   cat > conftest.$ac_ext <<EOF
13768 #line 13769 "configure"
13769 #include "confdefs.h"
13770 #include <stdlib.h>
13771 #include <stdarg.h>
13772 #include <string.h>
13773 #include <float.h>
13774 EOF
13775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13776 { (eval echo configure:13777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13778 if test -z "$ac_err"; then
13779   rm -rf conftest*
13780   ac_cv_header_stdc=yes
13781 else
13782   echo "$ac_err" >&5
13783   echo "configure: failed program was:" >&5
13784   cat conftest.$ac_ext >&5
13785   rm -rf conftest*
13786   ac_cv_header_stdc=no
13787 fi
13788 rm -f conftest*
13789
13790 if test $ac_cv_header_stdc = yes; then
13791   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13792 cat > conftest.$ac_ext <<EOF
13793 #line 13794 "configure"
13794 #include "confdefs.h"
13795 #include <string.h>
13796 EOF
13797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13798   egrep "memchr" >/dev/null 2>&1; then
13799   :
13800 else
13801   rm -rf conftest*
13802   ac_cv_header_stdc=no
13803 fi
13804 rm -f conftest*
13805
13806 fi
13807
13808 if test $ac_cv_header_stdc = yes; then
13809   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13810 cat > conftest.$ac_ext <<EOF
13811 #line 13812 "configure"
13812 #include "confdefs.h"
13813 #include <stdlib.h>
13814 EOF
13815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13816   egrep "free" >/dev/null 2>&1; then
13817   :
13818 else
13819   rm -rf conftest*
13820   ac_cv_header_stdc=no
13821 fi
13822 rm -f conftest*
13823
13824 fi
13825
13826 if test $ac_cv_header_stdc = yes; then
13827   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13828 if test "$cross_compiling" = yes; then
13829   :
13830 else
13831   cat > conftest.$ac_ext <<EOF
13832 #line 13833 "configure"
13833 #include "confdefs.h"
13834 #include <ctype.h>
13835 #if ((' ' & 0x0FF) == 0x020)
13836 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13837 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13838 #else
13839 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13840  || ('j' <= (c) && (c) <= 'r') \
13841  || ('s' <= (c) && (c) <= 'z'))
13842 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13843 #endif
13844 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13845 int main () { int i; for (i = 0; i < 256; i++)
13846 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13847 exit (0); }
13848
13849 EOF
13850 if { (eval echo configure:13851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13851 then
13852   :
13853 else
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -fr conftest*
13857   ac_cv_header_stdc=no
13858 fi
13859 rm -fr conftest*
13860 fi
13861
13862 fi
13863 fi
13864
13865 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13866 if test $ac_cv_header_stdc = yes; then
13867   cat >> confdefs.h <<\EOF
13868 #define STDC_HEADERS 1
13869 EOF
13870
13871 fi
13872
13873 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13874 echo "configure:13875: checking for mode_t" >&5
13875 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13876   echo $ac_n "(cached) $ac_c" 1>&6
13877 else
13878   cat > conftest.$ac_ext <<EOF
13879 #line 13880 "configure"
13880 #include "confdefs.h"
13881 #include <sys/types.h>
13882 #if STDC_HEADERS
13883 #include <stdlib.h>
13884 #include <stddef.h>
13885 #endif
13886
13887 EOF
13888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13889   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13890   rm -rf conftest*
13891   eval "ac_cv_type_mode_t=yes"
13892 else
13893   rm -rf conftest*
13894   eval "ac_cv_type_mode_t=no"
13895 fi
13896 rm -f conftest*
13897
13898 fi
13899 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13900   echo "$ac_t""yes" 1>&6
13901 else
13902   echo "$ac_t""no" 1>&6
13903   cat >> confdefs.h <<EOF
13904 #define mode_t int
13905 EOF
13906
13907 fi
13908
13909 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13910 echo "configure:13911: checking for off_t" >&5
13911 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13912   echo $ac_n "(cached) $ac_c" 1>&6
13913 else
13914   cat > conftest.$ac_ext <<EOF
13915 #line 13916 "configure"
13916 #include "confdefs.h"
13917 #include <sys/types.h>
13918 #if STDC_HEADERS
13919 #include <stdlib.h>
13920 #include <stddef.h>
13921 #endif
13922
13923 EOF
13924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13925   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13926   rm -rf conftest*
13927   eval "ac_cv_type_off_t=yes"
13928 else
13929   rm -rf conftest*
13930   eval "ac_cv_type_off_t=no"
13931 fi
13932 rm -f conftest*
13933
13934 fi
13935 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13936   echo "$ac_t""yes" 1>&6
13937 else
13938   echo "$ac_t""no" 1>&6
13939   cat >> confdefs.h <<EOF
13940 #define off_t long
13941 EOF
13942
13943 fi
13944
13945 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13946 echo "configure:13947: checking for pid_t" >&5
13947 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13948   echo $ac_n "(cached) $ac_c" 1>&6
13949 else
13950   cat > conftest.$ac_ext <<EOF
13951 #line 13952 "configure"
13952 #include "confdefs.h"
13953 #include <sys/types.h>
13954 #if STDC_HEADERS
13955 #include <stdlib.h>
13956 #include <stddef.h>
13957 #endif
13958
13959 EOF
13960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13961   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13962   rm -rf conftest*
13963   eval "ac_cv_type_pid_t=yes"
13964 else
13965   rm -rf conftest*
13966   eval "ac_cv_type_pid_t=no"
13967 fi
13968 rm -f conftest*
13969
13970 fi
13971 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13972   echo "$ac_t""yes" 1>&6
13973 else
13974   echo "$ac_t""no" 1>&6
13975   cat >> confdefs.h <<EOF
13976 #define pid_t int
13977 EOF
13978
13979 fi
13980
13981 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13982 echo "configure:13983: checking for ptrdiff_t" >&5
13983 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13984   echo $ac_n "(cached) $ac_c" 1>&6
13985 else
13986   cat > conftest.$ac_ext <<EOF
13987 #line 13988 "configure"
13988 #include "confdefs.h"
13989 #include <stddef.h>
13990 int main() {
13991 ptrdiff_t p
13992 ; return 0; }
13993 EOF
13994 if { (eval echo configure:13995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13995   rm -rf conftest*
13996   am_cv_type_ptrdiff_t=yes
13997 else
13998   echo "configure: failed program was:" >&5
13999   cat conftest.$ac_ext >&5
14000   rm -rf conftest*
14001   am_cv_type_ptrdiff_t=no
14002 fi
14003 rm -f conftest*
14004 fi
14005
14006 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14007    if test $am_cv_type_ptrdiff_t = yes; then
14008      cat >> confdefs.h <<\EOF
14009 #define HAVE_PTRDIFF_T 1
14010 EOF
14011
14012    fi
14013
14014 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14015 echo "configure:14016: checking return type of signal handlers" >&5
14016 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14017   echo $ac_n "(cached) $ac_c" 1>&6
14018 else
14019   cat > conftest.$ac_ext <<EOF
14020 #line 14021 "configure"
14021 #include "confdefs.h"
14022 #include <sys/types.h>
14023 #include <signal.h>
14024 #ifdef signal
14025 #undef signal
14026 #endif
14027 #ifdef __cplusplus
14028 extern "C" void (*signal (int, void (*)(int)))(int);
14029 #else
14030 void (*signal ()) ();
14031 #endif
14032
14033 int main() {
14034 int i;
14035 ; return 0; }
14036 EOF
14037 if { (eval echo configure:14038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14038   rm -rf conftest*
14039   ac_cv_type_signal=void
14040 else
14041   echo "configure: failed program was:" >&5
14042   cat conftest.$ac_ext >&5
14043   rm -rf conftest*
14044   ac_cv_type_signal=int
14045 fi
14046 rm -f conftest*
14047 fi
14048
14049 echo "$ac_t""$ac_cv_type_signal" 1>&6
14050 cat >> confdefs.h <<EOF
14051 #define RETSIGTYPE $ac_cv_type_signal
14052 EOF
14053
14054
14055 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14056 echo "configure:14057: checking for size_t" >&5
14057 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14058   echo $ac_n "(cached) $ac_c" 1>&6
14059 else
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 #include <sys/types.h>
14064 #if STDC_HEADERS
14065 #include <stdlib.h>
14066 #include <stddef.h>
14067 #endif
14068
14069 EOF
14070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14071   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14072   rm -rf conftest*
14073   eval "ac_cv_type_size_t=yes"
14074 else
14075   rm -rf conftest*
14076   eval "ac_cv_type_size_t=no"
14077 fi
14078 rm -f conftest*
14079
14080 fi
14081 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14082   echo "$ac_t""yes" 1>&6
14083 else
14084   echo "$ac_t""no" 1>&6
14085   cat >> confdefs.h <<EOF
14086 #define size_t unsigned
14087 EOF
14088
14089 fi
14090
14091
14092 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14093 echo "configure:14094: checking for ssize_t" >&5
14094 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14095   echo $ac_n "(cached) $ac_c" 1>&6
14096 else
14097   cat > conftest.$ac_ext <<EOF
14098 #line 14099 "configure"
14099 #include "confdefs.h"
14100 #include <sys/types.h>
14101 #if STDC_HEADERS
14102 #include <stdlib.h>
14103 #include <stddef.h>
14104 #endif
14105
14106 EOF
14107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14108   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14109   rm -rf conftest*
14110   eval "ac_cv_type_ssize_t=yes"
14111 else
14112   rm -rf conftest*
14113   eval "ac_cv_type_ssize_t=no"
14114 fi
14115 rm -f conftest*
14116
14117 fi
14118 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14119   echo "$ac_t""yes" 1>&6
14120 else
14121   echo "$ac_t""no" 1>&6
14122   cat >> confdefs.h <<EOF
14123 #define ssize_t signed int
14124 EOF
14125
14126 fi
14127
14128 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14129 echo "configure:14130: checking for caddr_t" >&5
14130 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14131   echo $ac_n "(cached) $ac_c" 1>&6
14132 else
14133   cat > conftest.$ac_ext <<EOF
14134 #line 14135 "configure"
14135 #include "confdefs.h"
14136 #include <sys/types.h>
14137 #if STDC_HEADERS
14138 #include <stdlib.h>
14139 #include <stddef.h>
14140 #endif
14141
14142 EOF
14143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14144   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14145   rm -rf conftest*
14146   eval "ac_cv_type_caddr_t=yes"
14147 else
14148   rm -rf conftest*
14149   eval "ac_cv_type_caddr_t=no"
14150 fi
14151 rm -f conftest*
14152
14153 fi
14154 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14155   echo "$ac_t""yes" 1>&6
14156 else
14157   echo "$ac_t""no" 1>&6
14158   cat >> confdefs.h <<EOF
14159 #define caddr_t char *
14160 EOF
14161
14162 fi
14163
14164
14165 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14166 echo "configure:14167: checking for socklen_t" >&5
14167 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14168   echo $ac_n "(cached) $ac_c" 1>&6
14169 else
14170   cat > conftest.$ac_ext <<EOF
14171 #line 14172 "configure"
14172 #include "confdefs.h"
14173
14174 #ifdef HAVE_SYS_TYPES_H
14175 #include <sys/types.h>
14176 #endif
14177 #ifdef HAVE_SYS_SOCKET_H
14178 #include <sys/socket.h>
14179 #endif
14180
14181 int main() {
14182 socklen_t len;
14183 ; return 0; }
14184 EOF
14185 if { (eval echo configure:14186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14186   rm -rf conftest*
14187   ol_cv_type_socklen_t=yes
14188 else
14189   echo "configure: failed program was:" >&5
14190   cat conftest.$ac_ext >&5
14191   rm -rf conftest*
14192   ol_cv_type_socklen_t=no
14193 fi
14194 rm -f conftest*
14195 fi
14196
14197 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14198   if test $ol_cv_type_socklen_t = no; then
14199     cat >> confdefs.h <<\EOF
14200 #define socklen_t int
14201 EOF
14202
14203   fi
14204  
14205 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14206 echo "configure:14207: checking for member st_blksize in aggregate type struct stat" >&5
14207 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14208   echo $ac_n "(cached) $ac_c" 1>&6
14209 else
14210   cat > conftest.$ac_ext <<EOF
14211 #line 14212 "configure"
14212 #include "confdefs.h"
14213 #include <sys/types.h>
14214 #include <sys/stat.h>
14215 int main() {
14216 struct stat foo; foo.st_blksize;
14217 ; return 0; }
14218 EOF
14219 if { (eval echo configure:14220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14220   rm -rf conftest*
14221   ac_cv_c_struct_member_st_blksize=yes
14222 else
14223   echo "configure: failed program was:" >&5
14224   cat conftest.$ac_ext >&5
14225   rm -rf conftest*
14226   ac_cv_c_struct_member_st_blksize=no
14227 fi
14228 rm -f conftest*
14229 fi
14230
14231 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14232 st_blksize="$ac_cv_c_struct_member_st_blksize"
14233 if test $ac_cv_c_struct_member_st_blksize = yes; then
14234   cat >> confdefs.h <<\EOF
14235 #define HAVE_ST_BLKSIZE 1
14236 EOF
14237
14238 fi
14239
14240 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14241 echo "configure:14242: checking whether time.h and sys/time.h may both be included" >&5
14242 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14243   echo $ac_n "(cached) $ac_c" 1>&6
14244 else
14245   cat > conftest.$ac_ext <<EOF
14246 #line 14247 "configure"
14247 #include "confdefs.h"
14248 #include <sys/types.h>
14249 #include <sys/time.h>
14250 #include <time.h>
14251 int main() {
14252 struct tm *tp;
14253 ; return 0; }
14254 EOF
14255 if { (eval echo configure:14256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14256   rm -rf conftest*
14257   ac_cv_header_time=yes
14258 else
14259   echo "configure: failed program was:" >&5
14260   cat conftest.$ac_ext >&5
14261   rm -rf conftest*
14262   ac_cv_header_time=no
14263 fi
14264 rm -f conftest*
14265 fi
14266
14267 echo "$ac_t""$ac_cv_header_time" 1>&6
14268 if test $ac_cv_header_time = yes; then
14269   cat >> confdefs.h <<\EOF
14270 #define TIME_WITH_SYS_TIME 1
14271 EOF
14272
14273 fi
14274
14275 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14276 echo "configure:14277: checking whether struct tm is in sys/time.h or time.h" >&5
14277 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14278   echo $ac_n "(cached) $ac_c" 1>&6
14279 else
14280   cat > conftest.$ac_ext <<EOF
14281 #line 14282 "configure"
14282 #include "confdefs.h"
14283 #include <sys/types.h>
14284 #include <time.h>
14285 int main() {
14286 struct tm *tp; tp->tm_sec;
14287 ; return 0; }
14288 EOF
14289 if { (eval echo configure:14290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14290   rm -rf conftest*
14291   ac_cv_struct_tm=time.h
14292 else
14293   echo "configure: failed program was:" >&5
14294   cat conftest.$ac_ext >&5
14295   rm -rf conftest*
14296   ac_cv_struct_tm=sys/time.h
14297 fi
14298 rm -f conftest*
14299 fi
14300
14301 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14302 if test $ac_cv_struct_tm = sys/time.h; then
14303   cat >> confdefs.h <<\EOF
14304 #define TM_IN_SYS_TIME 1
14305 EOF
14306
14307 fi
14308
14309 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14310 echo "configure:14311: checking for uid_t in sys/types.h" >&5
14311 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14312   echo $ac_n "(cached) $ac_c" 1>&6
14313 else
14314   cat > conftest.$ac_ext <<EOF
14315 #line 14316 "configure"
14316 #include "confdefs.h"
14317 #include <sys/types.h>
14318 EOF
14319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14320   egrep "uid_t" >/dev/null 2>&1; then
14321   rm -rf conftest*
14322   ac_cv_type_uid_t=yes
14323 else
14324   rm -rf conftest*
14325   ac_cv_type_uid_t=no
14326 fi
14327 rm -f conftest*
14328
14329 fi
14330
14331 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14332 if test $ac_cv_type_uid_t = no; then
14333   cat >> confdefs.h <<\EOF
14334 #define uid_t int
14335 EOF
14336
14337   cat >> confdefs.h <<\EOF
14338 #define gid_t int
14339 EOF
14340
14341 fi
14342
14343 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14344 echo "configure:14345: checking for sig_atomic_t" >&5
14345 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14346   echo $ac_n "(cached) $ac_c" 1>&6
14347 else
14348   cat > conftest.$ac_ext <<EOF
14349 #line 14350 "configure"
14350 #include "confdefs.h"
14351 #include <signal.h>
14352 int main() {
14353 sig_atomic_t atomic;
14354 ; return 0; }
14355 EOF
14356 if { (eval echo configure:14357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14357   rm -rf conftest*
14358   ol_cv_type_sig_atomic_t=yes
14359 else
14360   echo "configure: failed program was:" >&5
14361   cat conftest.$ac_ext >&5
14362   rm -rf conftest*
14363   ol_cv_type_sig_atomic_t=no
14364 fi
14365 rm -f conftest*
14366 fi
14367
14368 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14369   if test $ol_cv_type_sig_atomic_t = no; then
14370     cat >> confdefs.h <<\EOF
14371 #define sig_atomic_t int
14372 EOF
14373
14374   fi
14375  
14376
14377
14378 # test for pw_gecos in struct passwd
14379 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14380 echo "configure:14381: checking struct passwd for pw_gecos" >&5
14381 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14382   echo $ac_n "(cached) $ac_c" 1>&6
14383 else
14384   
14385         cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388 #include <pwd.h>
14389 int main() {
14390
14391         struct passwd pwd;
14392         pwd.pw_gecos = pwd.pw_name;
14393
14394 ; return 0; }
14395 EOF
14396 if { (eval echo configure:14397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14397   rm -rf conftest*
14398   ol_cv_struct_passwd_pw_gecos=yes
14399 else
14400   echo "configure: failed program was:" >&5
14401   cat conftest.$ac_ext >&5
14402   rm -rf conftest*
14403   ol_cv_struct_passwd_pw_gecos=no
14404 fi
14405 rm -f conftest*
14406 fi
14407
14408 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14409 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14410         cat >> confdefs.h <<\EOF
14411 #define HAVE_PW_GECOS 1
14412 EOF
14413
14414 fi
14415
14416 # test for pw_passwd in struct passwd
14417 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14418 echo "configure:14419: checking struct passwd for pw_passwd" >&5
14419 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14420   echo $ac_n "(cached) $ac_c" 1>&6
14421 else
14422   
14423         cat > conftest.$ac_ext <<EOF
14424 #line 14425 "configure"
14425 #include "confdefs.h"
14426 #include <pwd.h>
14427 int main() {
14428
14429         struct passwd pwd;
14430         pwd.pw_passwd = pwd.pw_name;
14431
14432 ; return 0; }
14433 EOF
14434 if { (eval echo configure:14435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14435   rm -rf conftest*
14436   ol_cv_struct_passwd_pw_passwd=yes
14437 else
14438   echo "configure: failed program was:" >&5
14439   cat conftest.$ac_ext >&5
14440   rm -rf conftest*
14441   ol_cv_struct_passwd_pw_passwd=no
14442 fi
14443 rm -f conftest*
14444 fi
14445
14446 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14447 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14448         cat >> confdefs.h <<\EOF
14449 #define HAVE_PW_PASSWD 1
14450 EOF
14451
14452 fi
14453
14454
14455 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14456 echo "configure:14457: checking if toupper() requires islower()" >&5
14457 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14458   echo $ac_n "(cached) $ac_c" 1>&6
14459 else
14460   
14461         if test "$cross_compiling" = yes; then
14462   ol_cv_c_upper_lower=safe
14463 else
14464   cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467
14468 #include <ctype.h>
14469 main()
14470 {
14471         if ('C' == toupper('C'))
14472                 exit(0);
14473         else
14474                 exit(1);
14475 }
14476 EOF
14477 if { (eval echo configure:14478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14478 then
14479   ol_cv_c_upper_lower=no
14480 else
14481   echo "configure: failed program was:" >&5
14482   cat conftest.$ac_ext >&5
14483   rm -fr conftest*
14484   ol_cv_c_upper_lower=yes
14485 fi
14486 rm -fr conftest*
14487 fi
14488
14489 fi
14490
14491 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14492 if test $ol_cv_c_upper_lower != no ; then
14493         cat >> confdefs.h <<\EOF
14494 #define C_UPPER_LOWER 1
14495 EOF
14496
14497 fi
14498
14499 echo $ac_n "checking for working const""... $ac_c" 1>&6
14500 echo "configure:14501: checking for working const" >&5
14501 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14502   echo $ac_n "(cached) $ac_c" 1>&6
14503 else
14504   cat > conftest.$ac_ext <<EOF
14505 #line 14506 "configure"
14506 #include "confdefs.h"
14507
14508 int main() {
14509
14510 /* Ultrix mips cc rejects this.  */
14511 typedef int charset[2]; const charset x;
14512 /* SunOS 4.1.1 cc rejects this.  */
14513 char const *const *ccp;
14514 char **p;
14515 /* NEC SVR4.0.2 mips cc rejects this.  */
14516 struct point {int x, y;};
14517 static struct point const zero = {0,0};
14518 /* AIX XL C 1.02.0.0 rejects this.
14519    It does not let you subtract one const X* pointer from another in an arm
14520    of an if-expression whose if-part is not a constant expression */
14521 const char *g = "string";
14522 ccp = &g + (g ? g-g : 0);
14523 /* HPUX 7.0 cc rejects these. */
14524 ++ccp;
14525 p = (char**) ccp;
14526 ccp = (char const *const *) p;
14527 { /* SCO 3.2v4 cc rejects this.  */
14528   char *t;
14529   char const *s = 0 ? (char *) 0 : (char const *) 0;
14530
14531   *t++ = 0;
14532 }
14533 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14534   int x[] = {25, 17};
14535   const int *foo = &x[0];
14536   ++foo;
14537 }
14538 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14539   typedef const int *iptr;
14540   iptr p = 0;
14541   ++p;
14542 }
14543 { /* AIX XL C 1.02.0.0 rejects this saying
14544      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14545   struct s { int j; const int *ap[3]; };
14546   struct s *b; b->j = 5;
14547 }
14548 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14549   const int foo = 10;
14550 }
14551
14552 ; return 0; }
14553 EOF
14554 if { (eval echo configure:14555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14555   rm -rf conftest*
14556   ac_cv_c_const=yes
14557 else
14558   echo "configure: failed program was:" >&5
14559   cat conftest.$ac_ext >&5
14560   rm -rf conftest*
14561   ac_cv_c_const=no
14562 fi
14563 rm -f conftest*
14564 fi
14565
14566 echo "$ac_t""$ac_cv_c_const" 1>&6
14567 if test $ac_cv_c_const = no; then
14568   cat >> confdefs.h <<\EOF
14569 #define const 
14570 EOF
14571
14572 fi
14573
14574 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14575 echo "configure:14576: checking if compiler understands volatile" >&5
14576 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14577   echo $ac_n "(cached) $ac_c" 1>&6
14578 else
14579   cat > conftest.$ac_ext <<EOF
14580 #line 14581 "configure"
14581 #include "confdefs.h"
14582 int x, y, z;
14583 int main() {
14584 volatile int a; int * volatile b = x ? &y : &z;
14585       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14586       *b = 0;
14587 ; return 0; }
14588 EOF
14589 if { (eval echo configure:14590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14590   rm -rf conftest*
14591   ol_cv_c_volatile=yes
14592 else
14593   echo "configure: failed program was:" >&5
14594   cat conftest.$ac_ext >&5
14595   rm -rf conftest*
14596   ol_cv_c_volatile=no
14597 fi
14598 rm -f conftest*
14599 fi
14600
14601 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14602   if test $ol_cv_c_volatile = yes; then
14603     : 
14604   else
14605     cat >> confdefs.h <<\EOF
14606 #define volatile 
14607 EOF
14608
14609   fi
14610  
14611
14612 if test $cross_compiling = yes ; then
14613         cat >> confdefs.h <<\EOF
14614 #define CROSS_COMPILING 1
14615 EOF
14616
14617 else
14618         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14619 echo "configure:14620: checking whether byte ordering is bigendian" >&5
14620 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14621   echo $ac_n "(cached) $ac_c" 1>&6
14622 else
14623   ac_cv_c_bigendian=unknown
14624 # See if sys/param.h defines the BYTE_ORDER macro.
14625 cat > conftest.$ac_ext <<EOF
14626 #line 14627 "configure"
14627 #include "confdefs.h"
14628 #include <sys/types.h>
14629 #include <sys/param.h>
14630 int main() {
14631
14632 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14633  bogus endian macros
14634 #endif
14635 ; return 0; }
14636 EOF
14637 if { (eval echo configure:14638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14638   rm -rf conftest*
14639   # It does; now see whether it defined to BIG_ENDIAN or not.
14640 cat > conftest.$ac_ext <<EOF
14641 #line 14642 "configure"
14642 #include "confdefs.h"
14643 #include <sys/types.h>
14644 #include <sys/param.h>
14645 int main() {
14646
14647 #if BYTE_ORDER != BIG_ENDIAN
14648  not big endian
14649 #endif
14650 ; return 0; }
14651 EOF
14652 if { (eval echo configure:14653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14653   rm -rf conftest*
14654   ac_cv_c_bigendian=yes
14655 else
14656   echo "configure: failed program was:" >&5
14657   cat conftest.$ac_ext >&5
14658   rm -rf conftest*
14659   ac_cv_c_bigendian=no
14660 fi
14661 rm -f conftest*
14662 else
14663   echo "configure: failed program was:" >&5
14664   cat conftest.$ac_ext >&5
14665 fi
14666 rm -f conftest*
14667 if test $ac_cv_c_bigendian = unknown; then
14668 if test "$cross_compiling" = yes; then
14669     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14670 else
14671   cat > conftest.$ac_ext <<EOF
14672 #line 14673 "configure"
14673 #include "confdefs.h"
14674 main () {
14675   /* Are we little or big endian?  From Harbison&Steele.  */
14676   union
14677   {
14678     long l;
14679     char c[sizeof (long)];
14680   } u;
14681   u.l = 1;
14682   exit (u.c[sizeof (long) - 1] == 1);
14683 }
14684 EOF
14685 if { (eval echo configure:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14686 then
14687   ac_cv_c_bigendian=no
14688 else
14689   echo "configure: failed program was:" >&5
14690   cat conftest.$ac_ext >&5
14691   rm -fr conftest*
14692   ac_cv_c_bigendian=yes
14693 fi
14694 rm -fr conftest*
14695 fi
14696
14697 fi
14698 fi
14699
14700 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14701 if test $ac_cv_c_bigendian = yes; then
14702   cat >> confdefs.h <<\EOF
14703 #define WORDS_BIGENDIAN 1
14704 EOF
14705
14706 fi
14707
14708 fi
14709
14710 echo $ac_n "checking size of short""... $ac_c" 1>&6
14711 echo "configure:14712: checking size of short" >&5 
14712 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14713   echo $ac_n "(cached) $ac_c" 1>&6
14714 else
14715   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14716   cat > conftest.$ac_ext <<EOF
14717 #line 14718 "configure"
14718 #include "confdefs.h"
14719 #include "confdefs.h" 
14720 #include <sys/types.h> 
14721  
14722
14723 int main() {
14724 switch (0) case 0: case (sizeof (short) == $ac_size):;
14725 ; return 0; }
14726 EOF
14727 if { (eval echo configure:14728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14728   rm -rf conftest*
14729   ac_cv_sizeof_short=$ac_size
14730 else
14731   echo "configure: failed program was:" >&5
14732   cat conftest.$ac_ext >&5
14733 fi
14734 rm -f conftest* 
14735   if test x$ac_cv_sizeof_short != x ; then break; fi 
14736 done 
14737
14738 fi
14739  
14740 if test x$ac_cv_sizeof_short = x ; then 
14741   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14742 fi 
14743 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14744 cat >> confdefs.h <<EOF
14745 #define SIZEOF_SHORT $ac_cv_sizeof_short
14746 EOF
14747  
14748  
14749 echo $ac_n "checking size of int""... $ac_c" 1>&6
14750 echo "configure:14751: checking size of int" >&5 
14751 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14752   echo $ac_n "(cached) $ac_c" 1>&6
14753 else
14754   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14755   cat > conftest.$ac_ext <<EOF
14756 #line 14757 "configure"
14757 #include "confdefs.h"
14758 #include "confdefs.h" 
14759 #include <sys/types.h> 
14760  
14761
14762 int main() {
14763 switch (0) case 0: case (sizeof (int) == $ac_size):;
14764 ; return 0; }
14765 EOF
14766 if { (eval echo configure:14767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14767   rm -rf conftest*
14768   ac_cv_sizeof_int=$ac_size
14769 else
14770   echo "configure: failed program was:" >&5
14771   cat conftest.$ac_ext >&5
14772 fi
14773 rm -f conftest* 
14774   if test x$ac_cv_sizeof_int != x ; then break; fi 
14775 done 
14776
14777 fi
14778  
14779 if test x$ac_cv_sizeof_int = x ; then 
14780   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14781 fi 
14782 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14783 cat >> confdefs.h <<EOF
14784 #define SIZEOF_INT $ac_cv_sizeof_int
14785 EOF
14786  
14787  
14788 echo $ac_n "checking size of long""... $ac_c" 1>&6
14789 echo "configure:14790: checking size of long" >&5 
14790 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14791   echo $ac_n "(cached) $ac_c" 1>&6
14792 else
14793   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14794   cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797 #include "confdefs.h" 
14798 #include <sys/types.h> 
14799  
14800
14801 int main() {
14802 switch (0) case 0: case (sizeof (long) == $ac_size):;
14803 ; return 0; }
14804 EOF
14805 if { (eval echo configure:14806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14806   rm -rf conftest*
14807   ac_cv_sizeof_long=$ac_size
14808 else
14809   echo "configure: failed program was:" >&5
14810   cat conftest.$ac_ext >&5
14811 fi
14812 rm -f conftest* 
14813   if test x$ac_cv_sizeof_long != x ; then break; fi 
14814 done 
14815
14816 fi
14817  
14818 if test x$ac_cv_sizeof_long = x ; then 
14819   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14820 fi 
14821 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14822 cat >> confdefs.h <<EOF
14823 #define SIZEOF_LONG $ac_cv_sizeof_long
14824 EOF
14825  
14826
14827
14828 if test "$ac_cv_sizeof_int" -lt 4 ; then
14829         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14830
14831         cat >> confdefs.h <<\EOF
14832 #define LBER_INT_T long
14833 EOF
14834
14835 else
14836         cat >> confdefs.h <<\EOF
14837 #define LBER_INT_T int
14838 EOF
14839
14840 fi
14841
14842 cat >> confdefs.h <<\EOF
14843 #define LBER_LEN_T long
14844 EOF
14845
14846 cat >> confdefs.h <<\EOF
14847 #define LBER_SOCKET_T int
14848 EOF
14849
14850 cat >> confdefs.h <<\EOF
14851 #define LBER_TAG_T long
14852 EOF
14853
14854
14855 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14856 echo "configure:14857: checking for 8-bit clean memcmp" >&5
14857 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14858   echo $ac_n "(cached) $ac_c" 1>&6
14859 else
14860   if test "$cross_compiling" = yes; then
14861   ac_cv_func_memcmp_clean=no
14862 else
14863   cat > conftest.$ac_ext <<EOF
14864 #line 14865 "configure"
14865 #include "confdefs.h"
14866
14867 main()
14868 {
14869   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14870   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14871 }
14872
14873 EOF
14874 if { (eval echo configure:14875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14875 then
14876   ac_cv_func_memcmp_clean=yes
14877 else
14878   echo "configure: failed program was:" >&5
14879   cat conftest.$ac_ext >&5
14880   rm -fr conftest*
14881   ac_cv_func_memcmp_clean=no
14882 fi
14883 rm -fr conftest*
14884 fi
14885
14886 fi
14887
14888 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14889 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14890
14891 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14892 echo "configure:14893: checking for strftime" >&5
14893 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14894   echo $ac_n "(cached) $ac_c" 1>&6
14895 else
14896   cat > conftest.$ac_ext <<EOF
14897 #line 14898 "configure"
14898 #include "confdefs.h"
14899 /* System header to define __stub macros and hopefully few prototypes,
14900     which can conflict with char strftime(); below.  */
14901 #include <assert.h>
14902 /* Override any gcc2 internal prototype to avoid an error.  */
14903 /* We use char because int might match the return type of a gcc2
14904     builtin and then its argument prototype would still apply.  */
14905 char strftime();
14906 char (*f)();
14907
14908 int main() {
14909
14910 /* The GNU C library defines this for functions which it implements
14911     to always fail with ENOSYS.  Some functions are actually named
14912     something starting with __ and the normal name is an alias.  */
14913 #if defined (__stub_strftime) || defined (__stub___strftime)
14914 choke me
14915 #else
14916 f = strftime;
14917 #endif
14918
14919 ; return 0; }
14920 EOF
14921 if { (eval echo configure:14922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14922   rm -rf conftest*
14923   eval "ac_cv_func_strftime=yes"
14924 else
14925   echo "configure: failed program was:" >&5
14926   cat conftest.$ac_ext >&5
14927   rm -rf conftest*
14928   eval "ac_cv_func_strftime=no"
14929 fi
14930 rm -f conftest*
14931 fi
14932
14933 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14934   echo "$ac_t""yes" 1>&6
14935   cat >> confdefs.h <<\EOF
14936 #define HAVE_STRFTIME 1
14937 EOF
14938
14939 else
14940   echo "$ac_t""no" 1>&6
14941 # strftime is in -lintl on SCO UNIX.
14942 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14943 echo "configure:14944: checking for strftime in -lintl" >&5
14944 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14946   echo $ac_n "(cached) $ac_c" 1>&6
14947 else
14948   ac_save_LIBS="$LIBS"
14949 LIBS="-lintl  $LIBS"
14950 cat > conftest.$ac_ext <<EOF
14951 #line 14952 "configure"
14952 #include "confdefs.h"
14953 /* Override any gcc2 internal prototype to avoid an error.  */
14954 /* We use char because int might match the return type of a gcc2
14955     builtin and then its argument prototype would still apply.  */
14956 char strftime();
14957
14958 int main() {
14959 strftime()
14960 ; return 0; }
14961 EOF
14962 if { (eval echo configure:14963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14963   rm -rf conftest*
14964   eval "ac_cv_lib_$ac_lib_var=yes"
14965 else
14966   echo "configure: failed program was:" >&5
14967   cat conftest.$ac_ext >&5
14968   rm -rf conftest*
14969   eval "ac_cv_lib_$ac_lib_var=no"
14970 fi
14971 rm -f conftest*
14972 LIBS="$ac_save_LIBS"
14973
14974 fi
14975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14976   echo "$ac_t""yes" 1>&6
14977   cat >> confdefs.h <<\EOF
14978 #define HAVE_STRFTIME 1
14979 EOF
14980
14981 LIBS="-lintl $LIBS"
14982 else
14983   echo "$ac_t""no" 1>&6
14984 fi
14985
14986 fi
14987
14988
14989 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14990 echo "configure:14991: checking for inet_aton()" >&5
14991 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14992   echo $ac_n "(cached) $ac_c" 1>&6
14993 else
14994   cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997
14998 #ifdef HAVE_SYS_TYPES_H
14999 #       include <sys/types.h>
15000 #endif
15001 #ifdef HAVE_SYS_SOCKET_H
15002 #       include <sys/socket.h>
15003 #       ifdef HAVE_SYS_SELECT_H
15004 #               include <sys/select.h>
15005 #       endif
15006 #       include <netinet/in.h>
15007 #       ifdef HAVE_ARPA_INET_H
15008 #               include <arpa/inet.h>
15009 #       endif
15010 #endif
15011
15012 int main() {
15013 struct in_addr in;
15014 int rc = inet_aton( "255.255.255.255", &in );
15015 ; return 0; }
15016 EOF
15017 if { (eval echo configure:15018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15018   rm -rf conftest*
15019   ol_cv_func_inet_aton=yes
15020 else
15021   echo "configure: failed program was:" >&5
15022   cat conftest.$ac_ext >&5
15023   rm -rf conftest*
15024   ol_cv_func_inet_aton=no
15025 fi
15026 rm -f conftest*
15027 fi
15028
15029 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15030   if test $ol_cv_func_inet_aton != no; then
15031     cat >> confdefs.h <<\EOF
15032 #define HAVE_INET_ATON 1
15033 EOF
15034
15035   fi
15036  
15037
15038 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15039 echo "configure:15040: checking for _spawnlp" >&5
15040 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* System header to define __stub macros and hopefully few prototypes,
15047     which can conflict with char _spawnlp(); below.  */
15048 #include <assert.h>
15049 /* Override any gcc2 internal prototype to avoid an error.  */
15050 /* We use char because int might match the return type of a gcc2
15051     builtin and then its argument prototype would still apply.  */
15052 char _spawnlp();
15053 char (*f)();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15061 choke me
15062 #else
15063 f = _spawnlp;
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func__spawnlp=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func__spawnlp=no"
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15081   echo "$ac_t""yes" 1>&6
15082   cat >> confdefs.h <<\EOF
15083 #define HAVE_SPAWNLP 1
15084 EOF
15085
15086 else
15087   echo "$ac_t""no" 1>&6
15088 fi
15089
15090
15091 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15092 echo "configure:15093: checking for _snprintf" >&5
15093 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15094   echo $ac_n "(cached) $ac_c" 1>&6
15095 else
15096   cat > conftest.$ac_ext <<EOF
15097 #line 15098 "configure"
15098 #include "confdefs.h"
15099 /* System header to define __stub macros and hopefully few prototypes,
15100     which can conflict with char _snprintf(); below.  */
15101 #include <assert.h>
15102 /* Override any gcc2 internal prototype to avoid an error.  */
15103 /* We use char because int might match the return type of a gcc2
15104     builtin and then its argument prototype would still apply.  */
15105 char _snprintf();
15106 char (*f)();
15107
15108 int main() {
15109
15110 /* The GNU C library defines this for functions which it implements
15111     to always fail with ENOSYS.  Some functions are actually named
15112     something starting with __ and the normal name is an alias.  */
15113 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15114 choke me
15115 #else
15116 f = _snprintf;
15117 #endif
15118
15119 ; return 0; }
15120 EOF
15121 if { (eval echo configure:15122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15122   rm -rf conftest*
15123   eval "ac_cv_func__snprintf=yes"
15124 else
15125   echo "configure: failed program was:" >&5
15126   cat conftest.$ac_ext >&5
15127   rm -rf conftest*
15128   eval "ac_cv_func__snprintf=no"
15129 fi
15130 rm -f conftest*
15131 fi
15132
15133 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15134   echo "$ac_t""yes" 1>&6
15135   ac_cv_func_snprintf=yes
15136         cat >> confdefs.h <<\EOF
15137 #define snprintf _snprintf
15138 EOF
15139
15140
15141 else
15142   echo "$ac_t""no" 1>&6
15143 fi
15144
15145
15146 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15147 echo "configure:15148: checking for _vsnprintf" >&5
15148 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15149   echo $ac_n "(cached) $ac_c" 1>&6
15150 else
15151   cat > conftest.$ac_ext <<EOF
15152 #line 15153 "configure"
15153 #include "confdefs.h"
15154 /* System header to define __stub macros and hopefully few prototypes,
15155     which can conflict with char _vsnprintf(); below.  */
15156 #include <assert.h>
15157 /* Override any gcc2 internal prototype to avoid an error.  */
15158 /* We use char because int might match the return type of a gcc2
15159     builtin and then its argument prototype would still apply.  */
15160 char _vsnprintf();
15161 char (*f)();
15162
15163 int main() {
15164
15165 /* The GNU C library defines this for functions which it implements
15166     to always fail with ENOSYS.  Some functions are actually named
15167     something starting with __ and the normal name is an alias.  */
15168 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15169 choke me
15170 #else
15171 f = _vsnprintf;
15172 #endif
15173
15174 ; return 0; }
15175 EOF
15176 if { (eval echo configure:15177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15177   rm -rf conftest*
15178   eval "ac_cv_func__vsnprintf=yes"
15179 else
15180   echo "configure: failed program was:" >&5
15181   cat conftest.$ac_ext >&5
15182   rm -rf conftest*
15183   eval "ac_cv_func__vsnprintf=no"
15184 fi
15185 rm -f conftest*
15186 fi
15187
15188 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15189   echo "$ac_t""yes" 1>&6
15190   ac_cv_func_vsnprintf=yes
15191         cat >> confdefs.h <<\EOF
15192 #define vsnprintf _vsnprintf
15193 EOF
15194
15195
15196 else
15197   echo "$ac_t""no" 1>&6
15198 fi
15199
15200
15201 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15202 echo "configure:15203: checking for vprintf" >&5
15203 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15204   echo $ac_n "(cached) $ac_c" 1>&6
15205 else
15206   cat > conftest.$ac_ext <<EOF
15207 #line 15208 "configure"
15208 #include "confdefs.h"
15209 /* System header to define __stub macros and hopefully few prototypes,
15210     which can conflict with char vprintf(); below.  */
15211 #include <assert.h>
15212 /* Override any gcc2 internal prototype to avoid an error.  */
15213 /* We use char because int might match the return type of a gcc2
15214     builtin and then its argument prototype would still apply.  */
15215 char vprintf();
15216 char (*f)();
15217
15218 int main() {
15219
15220 /* The GNU C library defines this for functions which it implements
15221     to always fail with ENOSYS.  Some functions are actually named
15222     something starting with __ and the normal name is an alias.  */
15223 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15224 choke me
15225 #else
15226 f = vprintf;
15227 #endif
15228
15229 ; return 0; }
15230 EOF
15231 if { (eval echo configure:15232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15232   rm -rf conftest*
15233   eval "ac_cv_func_vprintf=yes"
15234 else
15235   echo "configure: failed program was:" >&5
15236   cat conftest.$ac_ext >&5
15237   rm -rf conftest*
15238   eval "ac_cv_func_vprintf=no"
15239 fi
15240 rm -f conftest*
15241 fi
15242
15243 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15244   echo "$ac_t""yes" 1>&6
15245   cat >> confdefs.h <<\EOF
15246 #define HAVE_VPRINTF 1
15247 EOF
15248
15249 else
15250   echo "$ac_t""no" 1>&6
15251 fi
15252
15253 if test "$ac_cv_func_vprintf" != yes; then
15254 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15255 echo "configure:15256: checking for _doprnt" >&5
15256 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15257   echo $ac_n "(cached) $ac_c" 1>&6
15258 else
15259   cat > conftest.$ac_ext <<EOF
15260 #line 15261 "configure"
15261 #include "confdefs.h"
15262 /* System header to define __stub macros and hopefully few prototypes,
15263     which can conflict with char _doprnt(); below.  */
15264 #include <assert.h>
15265 /* Override any gcc2 internal prototype to avoid an error.  */
15266 /* We use char because int might match the return type of a gcc2
15267     builtin and then its argument prototype would still apply.  */
15268 char _doprnt();
15269 char (*f)();
15270
15271 int main() {
15272
15273 /* The GNU C library defines this for functions which it implements
15274     to always fail with ENOSYS.  Some functions are actually named
15275     something starting with __ and the normal name is an alias.  */
15276 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15277 choke me
15278 #else
15279 f = _doprnt;
15280 #endif
15281
15282 ; return 0; }
15283 EOF
15284 if { (eval echo configure:15285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15285   rm -rf conftest*
15286   eval "ac_cv_func__doprnt=yes"
15287 else
15288   echo "configure: failed program was:" >&5
15289   cat conftest.$ac_ext >&5
15290   rm -rf conftest*
15291   eval "ac_cv_func__doprnt=no"
15292 fi
15293 rm -f conftest*
15294 fi
15295
15296 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15297   echo "$ac_t""yes" 1>&6
15298   cat >> confdefs.h <<\EOF
15299 #define HAVE_DOPRNT 1
15300 EOF
15301
15302 else
15303   echo "$ac_t""no" 1>&6
15304 fi
15305
15306 fi
15307
15308
15309 if test $ac_cv_func_vprintf = yes ; then
15310                 for ac_func in vsnprintf vsprintf
15311 do
15312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15313 echo "configure:15314: checking for $ac_func" >&5
15314 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15315   echo $ac_n "(cached) $ac_c" 1>&6
15316 else
15317   cat > conftest.$ac_ext <<EOF
15318 #line 15319 "configure"
15319 #include "confdefs.h"
15320 /* System header to define __stub macros and hopefully few prototypes,
15321     which can conflict with char $ac_func(); below.  */
15322 #include <assert.h>
15323 /* Override any gcc2 internal prototype to avoid an error.  */
15324 /* We use char because int might match the return type of a gcc2
15325     builtin and then its argument prototype would still apply.  */
15326 char $ac_func();
15327 char (*f)();
15328
15329 int main() {
15330
15331 /* The GNU C library defines this for functions which it implements
15332     to always fail with ENOSYS.  Some functions are actually named
15333     something starting with __ and the normal name is an alias.  */
15334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15335 choke me
15336 #else
15337 f = $ac_func;
15338 #endif
15339
15340 ; return 0; }
15341 EOF
15342 if { (eval echo configure:15343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15343   rm -rf conftest*
15344   eval "ac_cv_func_$ac_func=yes"
15345 else
15346   echo "configure: failed program was:" >&5
15347   cat conftest.$ac_ext >&5
15348   rm -rf conftest*
15349   eval "ac_cv_func_$ac_func=no"
15350 fi
15351 rm -f conftest*
15352 fi
15353
15354 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15355   echo "$ac_t""yes" 1>&6
15356     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15357   cat >> confdefs.h <<EOF
15358 #define $ac_tr_func 1
15359 EOF
15360  
15361 else
15362   echo "$ac_t""no" 1>&6
15363 fi
15364 done
15365
15366 fi
15367
15368 for ac_func in \
15369         bcopy                   \
15370         closesocket             \
15371         chroot                  \
15372         endgrent                \
15373         endpwent                \
15374         flock                   \
15375         getdtablesize   \
15376         getgrgid                \
15377         gethostname             \
15378         getpass                 \
15379         getpassphrase   \
15380         getpwuid                \
15381         getpwnam                \
15382         getspnam                \
15383         gettimeofday    \
15384         initgroups              \
15385         lockf                   \
15386         memcpy                  \
15387         memmove                 \
15388         mkstemp                 \
15389         pipe                    \
15390         read                    \
15391         recv                    \
15392         recvfrom                \
15393         setpwfile               \
15394         setgid                  \
15395         setegid                 \
15396         setsid                  \
15397         setuid                  \
15398         seteuid                 \
15399         sigaction               \
15400         signal                  \
15401         sigset                  \
15402         snprintf                \
15403         strdup                  \
15404         strerror                \
15405         strpbrk                 \
15406         strrchr                 \
15407         strsep                  \
15408         strstr                  \
15409         strtol                  \
15410         strtoul                 \
15411         strspn                  \
15412         sysconf                 \
15413         waitpid                 \
15414         wait4                   \
15415         write                   \
15416         send                    \
15417         sendto                  \
15418
15419 do
15420 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15421 echo "configure:15422: checking for $ac_func" >&5
15422 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15423   echo $ac_n "(cached) $ac_c" 1>&6
15424 else
15425   cat > conftest.$ac_ext <<EOF
15426 #line 15427 "configure"
15427 #include "confdefs.h"
15428 /* System header to define __stub macros and hopefully few prototypes,
15429     which can conflict with char $ac_func(); below.  */
15430 #include <assert.h>
15431 /* Override any gcc2 internal prototype to avoid an error.  */
15432 /* We use char because int might match the return type of a gcc2
15433     builtin and then its argument prototype would still apply.  */
15434 char $ac_func();
15435 char (*f)();
15436
15437 int main() {
15438
15439 /* The GNU C library defines this for functions which it implements
15440     to always fail with ENOSYS.  Some functions are actually named
15441     something starting with __ and the normal name is an alias.  */
15442 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15443 choke me
15444 #else
15445 f = $ac_func;
15446 #endif
15447
15448 ; return 0; }
15449 EOF
15450 if { (eval echo configure:15451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15451   rm -rf conftest*
15452   eval "ac_cv_func_$ac_func=yes"
15453 else
15454   echo "configure: failed program was:" >&5
15455   cat conftest.$ac_ext >&5
15456   rm -rf conftest*
15457   eval "ac_cv_func_$ac_func=no"
15458 fi
15459 rm -f conftest*
15460 fi
15461
15462 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15463   echo "$ac_t""yes" 1>&6
15464     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15465   cat >> confdefs.h <<EOF
15466 #define $ac_tr_func 1
15467 EOF
15468  
15469 else
15470   echo "$ac_t""no" 1>&6
15471 fi
15472 done
15473
15474
15475 for ac_func in getopt tempnam
15476 do
15477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15478 echo "configure:15479: checking for $ac_func" >&5
15479 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15480   echo $ac_n "(cached) $ac_c" 1>&6
15481 else
15482   cat > conftest.$ac_ext <<EOF
15483 #line 15484 "configure"
15484 #include "confdefs.h"
15485 /* System header to define __stub macros and hopefully few prototypes,
15486     which can conflict with char $ac_func(); below.  */
15487 #include <assert.h>
15488 /* Override any gcc2 internal prototype to avoid an error.  */
15489 /* We use char because int might match the return type of a gcc2
15490     builtin and then its argument prototype would still apply.  */
15491 char $ac_func();
15492 char (*f)();
15493
15494 int main() {
15495
15496 /* The GNU C library defines this for functions which it implements
15497     to always fail with ENOSYS.  Some functions are actually named
15498     something starting with __ and the normal name is an alias.  */
15499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15500 choke me
15501 #else
15502 f = $ac_func;
15503 #endif
15504
15505 ; return 0; }
15506 EOF
15507 if { (eval echo configure:15508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15508   rm -rf conftest*
15509   eval "ac_cv_func_$ac_func=yes"
15510 else
15511   echo "configure: failed program was:" >&5
15512   cat conftest.$ac_ext >&5
15513   rm -rf conftest*
15514   eval "ac_cv_func_$ac_func=no"
15515 fi
15516 rm -f conftest*
15517 fi
15518
15519 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15520   echo "$ac_t""yes" 1>&6
15521     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15522   cat >> confdefs.h <<EOF
15523 #define $ac_tr_func 1
15524 EOF
15525  
15526 else
15527   echo "$ac_t""no" 1>&6
15528 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15529 fi
15530 done
15531
15532
15533
15534 if test "$ac_cv_func_getopt" != yes; then
15535     LIBSRCS="$LIBSRCS getopt.c"
15536 fi
15537
15538 if test "$ac_cv_func_tempnam" != yes; then
15539     LIBSRCS="$LIBSRCS tempnam.c"
15540 fi
15541
15542 # Check Configuration
15543 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15544 echo "configure:15545: checking declaration of sys_errlist" >&5
15545 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15546   echo $ac_n "(cached) $ac_c" 1>&6
15547 else
15548   
15549         cat > conftest.$ac_ext <<EOF
15550 #line 15551 "configure"
15551 #include "confdefs.h"
15552
15553 #include <stdio.h>
15554 #include <sys/types.h>
15555 #include <errno.h>
15556 #ifdef WINNT
15557 #include <stdlib.h>
15558 #endif 
15559 int main() {
15560 char *c = (char *) *sys_errlist
15561 ; return 0; }
15562 EOF
15563 if { (eval echo configure:15564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15564   rm -rf conftest*
15565   ol_cv_dcl_sys_errlist=yes
15566         ol_cv_have_sys_errlist=yes
15567 else
15568   echo "configure: failed program was:" >&5
15569   cat conftest.$ac_ext >&5
15570   rm -rf conftest*
15571   ol_cv_dcl_sys_errlist=no
15572 fi
15573 rm -f conftest*
15574 fi
15575
15576 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15577 #
15578 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15579 if test $ol_cv_dcl_sys_errlist = no ; then
15580         cat >> confdefs.h <<\EOF
15581 #define DECL_SYS_ERRLIST 1
15582 EOF
15583
15584
15585         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15586 echo "configure:15587: checking existence of sys_errlist" >&5
15587 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15588   echo $ac_n "(cached) $ac_c" 1>&6
15589 else
15590   
15591                 cat > conftest.$ac_ext <<EOF
15592 #line 15593 "configure"
15593 #include "confdefs.h"
15594 #include <errno.h>
15595 int main() {
15596 char *c = (char *) *sys_errlist
15597 ; return 0; }
15598 EOF
15599 if { (eval echo configure:15600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15600   rm -rf conftest*
15601   ol_cv_have_sys_errlist=yes
15602 else
15603   echo "configure: failed program was:" >&5
15604   cat conftest.$ac_ext >&5
15605   rm -rf conftest*
15606   ol_cv_have_sys_errlist=no
15607 fi
15608 rm -f conftest*
15609 fi
15610
15611 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15612 fi
15613 if test $ol_cv_have_sys_errlist = yes ; then
15614         cat >> confdefs.h <<\EOF
15615 #define HAVE_SYS_ERRLIST 1
15616 EOF
15617
15618 fi
15619
15620
15621
15622 if test "$ol_enable_debug" != no ; then
15623         cat >> confdefs.h <<\EOF
15624 #define LDAP_DEBUG 1
15625 EOF
15626
15627 fi
15628 if test "$ol_enable_syslog" = yes ; then
15629         cat >> confdefs.h <<\EOF
15630 #define LDAP_SYSLOG 1
15631 EOF
15632
15633 fi
15634 if test "$ol_enable_libui" = yes ; then
15635         cat >> confdefs.h <<\EOF
15636 #define LDAP_LIBUI 1
15637 EOF
15638
15639 fi
15640 if test "$ol_enable_cache" = no ; then
15641         cat >> confdefs.h <<\EOF
15642 #define LDAP_NOCACHE 1
15643 EOF
15644
15645 fi
15646 if test "$ol_link_kbind" != no ; then
15647         cat >> confdefs.h <<\EOF
15648 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15649 EOF
15650
15651 fi
15652 if test "$ol_enable_proctitle" != no ; then
15653         cat >> confdefs.h <<\EOF
15654 #define LDAP_PROCTITLE 1
15655 EOF
15656
15657 fi
15658 if test "$ol_enable_referrals" != no ; then
15659         cat >> confdefs.h <<\EOF
15660 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15661 EOF
15662
15663 fi
15664 if test "$ol_enable_cldap" != no ; then
15665         cat >> confdefs.h <<\EOF
15666 #define LDAP_CONNECTIONLESS 1
15667 EOF
15668
15669 fi
15670 if test "$ol_enable_ldapi" != no; then
15671         cat >> confdefs.h <<\EOF
15672 #define USE_PF_LOCAL 1
15673 EOF
15674
15675 fi
15676
15677 if test "$ol_enable_cleartext" != no ; then
15678         cat >> confdefs.h <<\EOF
15679 #define SLAPD_CLEARTEXT 1
15680 EOF
15681
15682 fi
15683 if test "$ol_enable_crypt" != no ; then
15684         cat >> confdefs.h <<\EOF
15685 #define SLAPD_CRYPT 1
15686 EOF
15687
15688 fi
15689 if test "$ol_link_kpasswd" != no ; then
15690         cat >> confdefs.h <<\EOF
15691 #define SLAPD_KPASSWD 1
15692 EOF
15693
15694 fi
15695 if test "$ol_link_spasswd" != no ; then
15696         cat >> confdefs.h <<\EOF
15697 #define SLAPD_SPASSWD 1
15698 EOF
15699
15700 fi
15701 if test "$ol_enable_multimaster" != no ; then
15702         cat >> confdefs.h <<\EOF
15703 #define SLAPD_MULTIMASTER 1
15704 EOF
15705
15706 fi
15707 if test "$ol_enable_phonetic" != no ; then
15708         cat >> confdefs.h <<\EOF
15709 #define SLAPD_PHONETIC 1
15710 EOF
15711
15712 fi
15713 if test "$ol_enable_rlookups" != no ; then
15714         cat >> confdefs.h <<\EOF
15715 #define SLAPD_RLOOKUPS 1
15716 EOF
15717
15718 fi
15719 if test "$ol_enable_aci" != no ; then
15720         cat >> confdefs.h <<\EOF
15721 #define SLAPD_ACI_ENABLED 1
15722 EOF
15723
15724 fi
15725
15726 if test "$ol_link_modules" != no ; then
15727         cat >> confdefs.h <<\EOF
15728 #define SLAPD_MODULES 1
15729 EOF
15730
15731         BUILD_SLAPD=yes
15732         SLAPD_MODULES_LDFLAGS="-dlopen self"
15733 fi
15734
15735 if test "$ol_link_dnssrv" != no ; then
15736         cat >> confdefs.h <<\EOF
15737 #define SLAPD_DNSSRV 1
15738 EOF
15739
15740         BUILD_SLAPD=yes
15741         BUILD_DNSSRV=yes
15742         if test "$ol_with_dnssrv_module" != static ; then
15743                 cat >> confdefs.h <<\EOF
15744 #define SLAPD_DNSSRV_DYNAMIC 1
15745 EOF
15746
15747                 BUILD_DNSSRV=mod
15748                 BUILD_DNSSRV_DYNAMIC=shared
15749                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15750         fi
15751 fi
15752
15753 if test "$ol_enable_ldap" != no ; then
15754         cat >> confdefs.h <<\EOF
15755 #define SLAPD_LDAP 1
15756 EOF
15757
15758         BUILD_SLAPD=yes
15759         BUILD_LDAP=yes
15760         if test "$ol_with_ldap_module" != static ; then
15761                 cat >> confdefs.h <<\EOF
15762 #define SLAPD_LDAP_DYNAMIC 1
15763 EOF
15764
15765                 BUILD_LDAP=mod
15766                 BUILD_LDAP_DYNAMIC=shared
15767                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15768         fi
15769 fi
15770
15771 if test "$ol_link_ldbm" != no ; then
15772         cat >> confdefs.h <<\EOF
15773 #define SLAPD_LDBM 1
15774 EOF
15775
15776         BUILD_SLAPD=yes
15777         BUILD_LDBM=yes
15778         if test "$ol_with_ldbm_module" != static ; then
15779                 cat >> confdefs.h <<\EOF
15780 #define SLAPD_LDBM_DYNAMIC 1
15781 EOF
15782
15783                 BUILD_LDBM=mod
15784                 BUILD_LDBM_DYNAMIC=shared
15785                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15786         fi
15787 fi
15788
15789 if test "$ol_enable_passwd" != no ; then
15790         cat >> confdefs.h <<\EOF
15791 #define SLAPD_PASSWD 1
15792 EOF
15793
15794         BUILD_SLAPD=yes
15795         BUILD_PASSWD=yes
15796         if test "$ol_with_passwd_module" != static ; then
15797                 cat >> confdefs.h <<\EOF
15798 #define SLAPD_PASSWD_DYNAMIC 1
15799 EOF
15800
15801                 BUILD_PASSWD=mod
15802                 BUILD_PASSWD_DYNAMIC=shared
15803                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15804         fi
15805 fi
15806
15807 if test "$ol_link_perl" != no ; then
15808         cat >> confdefs.h <<\EOF
15809 #define SLAPD_PERL 1
15810 EOF
15811
15812         BUILD_SLAPD=yes
15813         BUILD_PERL=yes
15814         if test "$ol_with_perl_module" != static ; then
15815                 cat >> confdefs.h <<\EOF
15816 #define SLAPD_PERL_DYNAMIC 1
15817 EOF
15818
15819                 BUILD_PERL=mod
15820                 BUILD_PERL_DYNAMIC=shared
15821                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15822         fi
15823 fi
15824
15825 if test "$ol_enable_shell" != no ; then
15826         cat >> confdefs.h <<\EOF
15827 #define SLAPD_SHELL 1
15828 EOF
15829
15830         BUILD_SLAPD=yes
15831         BUILD_SHELL=yes
15832         if test "$ol_with_shell_module" != static ; then
15833                 cat >> confdefs.h <<\EOF
15834 #define SLAPD_SHELL_DYNAMIC 1
15835 EOF
15836
15837                 BUILD_SHELL=mod
15838                 BUILD_SHELL_DYNAMIC=shared
15839                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15840         fi
15841 fi
15842
15843 if test "$ol_enable_tcl" != no ; then
15844         cat >> confdefs.h <<\EOF
15845 #define SLAPD_TCL 1
15846 EOF
15847
15848         BUILD_SLAPD=yes
15849         BUILD_TCL=yes
15850         if test "$ol_with_tcl_module" != static; then
15851                 cat >> confdefs.h <<\EOF
15852 #define SLAPD_TCL_DYNAMIC 1
15853 EOF
15854
15855                 BUILD_TCL=mod
15856                 BUILD_TCL_DYNAMIC=shared
15857                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15858         fi
15859 fi
15860
15861 if test "$ol_enable_sql" != no ; then
15862         cat >> confdefs.h <<\EOF
15863 #define SLAPD_SQL 1
15864 EOF
15865
15866         BUILD_SLAPD=yes
15867         BUILD_SQL=yes
15868         SLAPD_SQL_LIBS=-liodbc
15869         if test "$ol_with_sql_module" != static; then
15870                 cat >> confdefs.h <<\EOF
15871 #define SLAPD_SQL_DYNAMIC 1
15872 EOF
15873
15874                 BUILD_SQL=mod
15875                 BUILD_SQL_DYNAMIC=shared
15876                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15877         fi
15878 fi
15879
15880 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15881         $BUILD_SLAPD = yes ; then
15882         BUILD_SLURPD=yes
15883 fi
15884
15885
15886 if test "$LINK_BINS_DYNAMIC" = yes; then
15887     LIB_LINKAGE=DYN
15888     LT_LIB_LINKAGE=shared
15889 else
15890     LIB_LINKAGE=STAT
15891     LT_LIB_LINKAGE=static
15892 fi
15893
15894 if test "$ac_cv_mingw32" = yes ; then
15895     PLAT=NT
15896     DYN_EXT=dll
15897 else
15898     PLAT=UNIX
15899     DYN_EXT=so
15900 fi
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910   
15911   
15912   
15913   
15914   
15915   
15916   
15917   
15918   
15919   
15920   
15921   
15922   
15923   
15924   
15925   
15926   
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963 trap '' 1 2 15
15964
15965 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15966
15967 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15968 # Let make expand exec_prefix.
15969 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15970
15971 # Any assignment to VPATH causes Sun make to only execute
15972 # the first set of double-colon rules, so remove it if not needed.
15973 # If there is a colon in the path, we need to keep it.
15974 if test "x$srcdir" = x.; then
15975   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15976 fi
15977
15978 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15979
15980 DEFS=-DHAVE_CONFIG_H
15981
15982 # Without the "./", some shells look in PATH for config.status.
15983 : ${CONFIG_STATUS=./config.status}
15984
15985 echo creating $CONFIG_STATUS
15986 rm -f $CONFIG_STATUS
15987 cat > $CONFIG_STATUS <<EOF
15988 #! /bin/sh
15989 # Generated automatically by configure.
15990 # Run this file to recreate the current configuration.
15991 # This directory was configured as follows,
15992 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15993 #
15994 # $0 $ac_configure_args
15995 #
15996 # Compiler output produced by configure, useful for debugging
15997 # configure, is in ./config.log if it exists.
15998
15999 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16000 for ac_option
16001 do
16002   case "\$ac_option" in
16003   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16004     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16005     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16006   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16007     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16008     exit 0 ;;
16009   -help | --help | --hel | --he | --h)
16010     echo "\$ac_cs_usage"; exit 0 ;;
16011   *) echo "\$ac_cs_usage"; exit 1 ;;
16012   esac
16013 done
16014
16015 ac_given_srcdir=$srcdir
16016 ac_given_INSTALL="$INSTALL"
16017
16018 trap 'rm -fr `echo "\
16019 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16020 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16021 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16022 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16023 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16024 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16025 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16026 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16027 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16028 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16029 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16030 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16031 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16032 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16033 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16034 include/Makefile:build/top.mk:include/Makefile.in \
16035 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16036 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16037 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16038 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16039 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16040 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16041 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16042 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16043 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16044 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16045 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16046 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16047 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16048 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16049 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16050 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16051 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16052 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16053 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16054 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16055 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16056 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16057 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16058 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16059 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16060 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16061 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16062  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16063 EOF
16064 cat >> $CONFIG_STATUS <<EOF
16065
16066 # Protect against being on the right side of a sed subst in config.status.
16067 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16068  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16069 $ac_vpsub
16070 $extrasub
16071 s%@SHELL@%$SHELL%g
16072 s%@CFLAGS@%$CFLAGS%g
16073 s%@CPPFLAGS@%$CPPFLAGS%g
16074 s%@CXXFLAGS@%$CXXFLAGS%g
16075 s%@FFLAGS@%$FFLAGS%g
16076 s%@DEFS@%$DEFS%g
16077 s%@LDFLAGS@%$LDFLAGS%g
16078 s%@LIBS@%$LIBS%g
16079 s%@exec_prefix@%$exec_prefix%g
16080 s%@prefix@%$prefix%g
16081 s%@program_transform_name@%$program_transform_name%g
16082 s%@bindir@%$bindir%g
16083 s%@sbindir@%$sbindir%g
16084 s%@libexecdir@%$libexecdir%g
16085 s%@datadir@%$datadir%g
16086 s%@sysconfdir@%$sysconfdir%g
16087 s%@sharedstatedir@%$sharedstatedir%g
16088 s%@localstatedir@%$localstatedir%g
16089 s%@libdir@%$libdir%g
16090 s%@includedir@%$includedir%g
16091 s%@oldincludedir@%$oldincludedir%g
16092 s%@infodir@%$infodir%g
16093 s%@mandir@%$mandir%g
16094 s%@host@%$host%g
16095 s%@host_alias@%$host_alias%g
16096 s%@host_cpu@%$host_cpu%g
16097 s%@host_vendor@%$host_vendor%g
16098 s%@host_os@%$host_os%g
16099 s%@target@%$target%g
16100 s%@target_alias@%$target_alias%g
16101 s%@target_cpu@%$target_cpu%g
16102 s%@target_vendor@%$target_vendor%g
16103 s%@target_os@%$target_os%g
16104 s%@build@%$build%g
16105 s%@build_alias@%$build_alias%g
16106 s%@build_cpu@%$build_cpu%g
16107 s%@build_vendor@%$build_vendor%g
16108 s%@build_os@%$build_os%g
16109 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16110 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16111 s%@INSTALL_DATA@%$INSTALL_DATA%g
16112 s%@PACKAGE@%$PACKAGE%g
16113 s%@VERSION@%$VERSION%g
16114 s%@ACLOCAL@%$ACLOCAL%g
16115 s%@AUTOCONF@%$AUTOCONF%g
16116 s%@AUTOMAKE@%$AUTOMAKE%g
16117 s%@AUTOHEADER@%$AUTOHEADER%g
16118 s%@MAKEINFO@%$MAKEINFO%g
16119 s%@install_sh@%$install_sh%g
16120 s%@AMTAR@%$AMTAR%g
16121 s%@AWK@%$AWK%g
16122 s%@AMTARFLAGS@%$AMTARFLAGS%g
16123 s%@SET_MAKE@%$SET_MAKE%g
16124 s%@top_builddir@%$top_builddir%g
16125 s%@ldap_subdir@%$ldap_subdir%g
16126 s%@CC@%$CC%g
16127 s%@RANLIB@%$RANLIB%g
16128 s%@LN_S@%$LN_S%g
16129 s%@DLLTOOL@%$DLLTOOL%g
16130 s%@AS@%$AS%g
16131 s%@OBJDUMP@%$OBJDUMP%g
16132 s%@LIBTOOL@%$LIBTOOL%g
16133 s%@LN_H@%$LN_H%g
16134 s%@SENDMAIL@%$SENDMAIL%g
16135 s%@EDITOR@%$EDITOR%g
16136 s%@FINGER@%$FINGER%g
16137 s%@PERLBIN@%$PERLBIN%g
16138 s%@CPP@%$CPP%g
16139 s%@EXEEXT@%$EXEEXT%g
16140 s%@OBJEXT@%$OBJEXT%g
16141 s%@OL_MKDEP@%$OL_MKDEP%g
16142 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16143 s%@LIBOBJS@%$LIBOBJS%g
16144 s%@LIBSRCS@%$LIBSRCS%g
16145 s%@PLAT@%$PLAT%g
16146 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16147 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16148 s%@DYN_EXT@%$DYN_EXT%g
16149 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16150 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16151 s%@BUILD_LDAP@%$BUILD_LDAP%g
16152 s%@BUILD_LDBM@%$BUILD_LDBM%g
16153 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16154 s%@BUILD_PERL@%$BUILD_PERL%g
16155 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16156 s%@BUILD_SHELL@%$BUILD_SHELL%g
16157 s%@BUILD_SQL@%$BUILD_SQL%g
16158 s%@BUILD_TCL@%$BUILD_TCL%g
16159 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16160 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16161 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16162 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16163 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16164 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16165 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16166 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16167 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16168 s%@LDAP_LIBS@%$LDAP_LIBS%g
16169 s%@LDIF_LIBS@%$LDIF_LIBS%g
16170 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16171 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16172 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16173 s%@LDBM_LIBS@%$LDBM_LIBS%g
16174 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16175 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16176 s%@WRAP_LIBS@%$WRAP_LIBS%g
16177 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16178 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16179 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16180 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16181 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16182 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16183 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16184 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16185 s%@KRB4_LIBS@%$KRB4_LIBS%g
16186 s%@KRB5_LIBS@%$KRB5_LIBS%g
16187 s%@READLINE_LIBS@%$READLINE_LIBS%g
16188 s%@SASL_LIBS@%$SASL_LIBS%g
16189 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16190 s%@TLS_LIBS@%$TLS_LIBS%g
16191 s%@MODULES_LIBS@%$MODULES_LIBS%g
16192 s%@AUTH_LIBS@%$AUTH_LIBS%g
16193 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16194 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16195 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16196
16197 CEOF
16198 EOF
16199
16200 cat >> $CONFIG_STATUS <<\EOF
16201
16202 # Split the substitutions into bite-sized pieces for seds with
16203 # small command number limits, like on Digital OSF/1 and HP-UX.
16204 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16205 ac_file=1 # Number of current file.
16206 ac_beg=1 # First line for current file.
16207 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16208 ac_more_lines=:
16209 ac_sed_cmds=""
16210 while $ac_more_lines; do
16211   if test $ac_beg -gt 1; then
16212     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16213   else
16214     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16215   fi
16216   if test ! -s conftest.s$ac_file; then
16217     ac_more_lines=false
16218     rm -f conftest.s$ac_file
16219   else
16220     if test -z "$ac_sed_cmds"; then
16221       ac_sed_cmds="sed -f conftest.s$ac_file"
16222     else
16223       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16224     fi
16225     ac_file=`expr $ac_file + 1`
16226     ac_beg=$ac_end
16227     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16228   fi
16229 done
16230 if test -z "$ac_sed_cmds"; then
16231   ac_sed_cmds=cat
16232 fi
16233 EOF
16234
16235 cat >> $CONFIG_STATUS <<EOF
16236
16237 CONFIG_FILES=\${CONFIG_FILES-"\
16238 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16239 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16240 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16241 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16242 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16243 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16244 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16245 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16246 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16247 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16248 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16249 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16250 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16251 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16252 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16253 include/Makefile:build/top.mk:include/Makefile.in \
16254 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16255 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16256 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16257 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16258 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16259 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16260 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16261 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16262 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16263 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16264 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16265 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16266 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16267 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16268 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16269 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16270 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16271 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16272 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16273 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16274 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16275 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16276 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16277 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16278 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16279 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16280 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16281 "}
16282 EOF
16283 cat >> $CONFIG_STATUS <<\EOF
16284 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16285   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16286   case "$ac_file" in
16287   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16288        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16289   *) ac_file_in="${ac_file}.in" ;;
16290   esac
16291
16292   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16293
16294   # Remove last slash and all that follows it.  Not all systems have dirname.
16295   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16296   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16297     # The file is in a subdirectory.
16298     test ! -d "$ac_dir" && mkdir "$ac_dir"
16299     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16300     # A "../" for each directory in $ac_dir_suffix.
16301     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16302   else
16303     ac_dir_suffix= ac_dots=
16304   fi
16305
16306   case "$ac_given_srcdir" in
16307   .)  srcdir=.
16308       if test -z "$ac_dots"; then top_srcdir=.
16309       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16310   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16311   *) # Relative path.
16312     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16313     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16314   esac
16315
16316   case "$ac_given_INSTALL" in
16317   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16318   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16319   esac
16320
16321   echo creating "$ac_file"
16322   rm -f "$ac_file"
16323   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16324   case "$ac_file" in
16325   *[Mm]akefile*) ac_comsub="1i\\
16326 # $configure_input" ;;
16327   *) ac_comsub= ;;
16328   esac
16329
16330   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16331   sed -e "$ac_comsub
16332 s%@configure_input@%$configure_input%g
16333 s%@srcdir@%$srcdir%g
16334 s%@top_srcdir@%$top_srcdir%g
16335 s%@INSTALL@%$INSTALL%g
16336 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16337 fi; done
16338 rm -f conftest.s*
16339
16340 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16341 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16342 #
16343 # ac_d sets the value in "#define NAME VALUE" lines.
16344 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16345 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16346 ac_dC='\3'
16347 ac_dD='%g'
16348 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16349 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16350 ac_uB='\([      ]\)%\1#\2define\3'
16351 ac_uC=' '
16352 ac_uD='\4%g'
16353 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16354 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16355 ac_eB='$%\1#\2define\3'
16356 ac_eC=' '
16357 ac_eD='%g'
16358
16359 if test "${CONFIG_HEADERS+set}" != set; then
16360 EOF
16361 cat >> $CONFIG_STATUS <<EOF
16362   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16363 EOF
16364 cat >> $CONFIG_STATUS <<\EOF
16365 fi
16366 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16367   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16368   case "$ac_file" in
16369   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16370        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16371   *) ac_file_in="${ac_file}.in" ;;
16372   esac
16373
16374   echo creating $ac_file
16375
16376   rm -f conftest.frag conftest.in conftest.out
16377   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16378   cat $ac_file_inputs > conftest.in
16379
16380 EOF
16381
16382 # Transform confdefs.h into a sed script conftest.vals that substitutes
16383 # the proper values into config.h.in to produce config.h.  And first:
16384 # Protect against being on the right side of a sed subst in config.status.
16385 # Protect against being in an unquoted here document in config.status.
16386 rm -f conftest.vals
16387 cat > conftest.hdr <<\EOF
16388 s/[\\&%]/\\&/g
16389 s%[\\$`]%\\&%g
16390 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16391 s%ac_d%ac_u%gp
16392 s%ac_u%ac_e%gp
16393 EOF
16394 sed -n -f conftest.hdr confdefs.h > conftest.vals
16395 rm -f conftest.hdr
16396
16397 # This sed command replaces #undef with comments.  This is necessary, for
16398 # example, in the case of _POSIX_SOURCE, which is predefined and required
16399 # on some systems where configure will not decide to define it.
16400 cat >> conftest.vals <<\EOF
16401 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16402 EOF
16403
16404 # Break up conftest.vals because some shells have a limit on
16405 # the size of here documents, and old seds have small limits too.
16406
16407 rm -f conftest.tail
16408 while :
16409 do
16410   ac_lines=`grep -c . conftest.vals`
16411   # grep -c gives empty output for an empty file on some AIX systems.
16412   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16413   # Write a limited-size here document to conftest.frag.
16414   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16415   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16416   echo 'CEOF
16417   sed -f conftest.frag conftest.in > conftest.out
16418   rm -f conftest.in
16419   mv conftest.out conftest.in
16420 ' >> $CONFIG_STATUS
16421   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16422   rm -f conftest.vals
16423   mv conftest.tail conftest.vals
16424 done
16425 rm -f conftest.vals
16426
16427 cat >> $CONFIG_STATUS <<\EOF
16428   rm -f conftest.frag conftest.h
16429   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16430   cat conftest.in >> conftest.h
16431   rm -f conftest.in
16432   if cmp -s $ac_file conftest.h 2>/dev/null; then
16433     echo "$ac_file is unchanged"
16434     rm -f conftest.h
16435   else
16436     # Remove last slash and all that follows it.  Not all systems have dirname.
16437       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16438       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16439       # The file is in a subdirectory.
16440       test ! -d "$ac_dir" && mkdir "$ac_dir"
16441     fi
16442     rm -f $ac_file
16443     mv conftest.h $ac_file
16444   fi
16445 fi; done
16446
16447 EOF
16448 cat >> $CONFIG_STATUS <<EOF
16449
16450 EOF
16451 cat >> $CONFIG_STATUS <<\EOF
16452
16453 date > stamp-h
16454 echo Please \"make depend\" to build dependencies
16455
16456 exit 0
16457 EOF
16458 chmod +x $CONFIG_STATUS
16459 rm -fr confdefs* $ac_clean_files
16460 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16461