]> git.sur5r.net Git - openldap/blob - configure
Regenerate with autoconf 2.13.1
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.312 2000/06/08 22:49:09 jsanchez 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 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
45 ac_help="$ac_help
46   --enable-x-compile    enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd        enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext  enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt      enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd    enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers   enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-dnssrv     enable dnssrv backend (no)"
91 ac_help="$ac_help
92       --with-dnssrv-module      module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-perl       enable perl backend (no)"
111 ac_help="$ac_help
112       --with-perl-module        module type (static)"
113 ac_help="$ac_help
114     --enable-shell      enable shell backend (no)"
115 ac_help="$ac_help
116       --with-shell-module       module type (static)"
117 ac_help="$ac_help
118     --enable-sql        enable sql backend (no)"
119 ac_help="$ac_help
120       --with-sql-module module type (static)"
121 ac_help="$ac_help
122     --enable-tcl        enable tcl backend (no)"
123 ac_help="$ac_help
124       --with-tcl-module module type (static)"
125 ac_help="$ac_help
126 SLURPD (Replication Daemon) Options:"
127 ac_help="$ac_help
128   --enable-slurpd       enable building slurpd (auto)"
129 ac_help="$ac_help
130 Library Generation & Linking Options"
131 ac_help="$ac_help
132   --enable-static[=PKGS]  build static libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-shared[=PKGS]  build shared libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
137 ac_help="$ac_help
138   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
139 ac_help="$ac_help
140   --disable-libtool-lock  avoid locking (might break parallel builds)"
141
142 # Initialize some variables set by options.
143 # The variables have the same names as the options, with
144 # dashes changed to underlines.
145 build=NONE
146 cache_file=./config.cache
147 exec_prefix=NONE
148 host=NONE
149 no_create=
150 nonopt=NONE
151 no_recursion=
152 prefix=NONE
153 program_prefix=NONE
154 program_suffix=NONE
155 program_transform_name=s,x,x,
156 silent=
157 site=
158 srcdir=
159 target=NONE
160 verbose=
161 x_includes=NONE
162 x_libraries=NONE
163 bindir='${exec_prefix}/bin'
164 sbindir='${exec_prefix}/sbin'
165 libexecdir='${exec_prefix}/libexec'
166 datadir='${prefix}/share'
167 sysconfdir='${prefix}/etc'
168 sharedstatedir='${prefix}/com'
169 localstatedir='${prefix}/var'
170 libdir='${exec_prefix}/lib'
171 includedir='${prefix}/include'
172 oldincludedir='/usr/include'
173 infodir='${prefix}/info'
174 mandir='${prefix}/man'
175
176 # Initialize some other variables.
177 subdirs=
178 MFLAGS= MAKEFLAGS=
179 SHELL=${CONFIG_SHELL-/bin/sh}
180 # Maximum number of lines to put in a shell here document.
181 ac_max_here_lines=12
182
183 ac_prev=
184 for ac_option
185 do
186
187   # If the previous option needs an argument, assign it.
188   if test -n "$ac_prev"; then
189     eval "$ac_prev=\$ac_option"
190     ac_prev=
191     continue
192   fi
193
194   case "$ac_option" in
195   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
196   *) ac_optarg= ;;
197   esac
198
199   # Accept the important Cygnus configure options, so we can diagnose typos.
200
201   case "$ac_option" in
202
203   -bindir | --bindir | --bindi | --bind | --bin | --bi)
204     ac_prev=bindir ;;
205   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
206     bindir="$ac_optarg" ;;
207
208   -build | --build | --buil | --bui | --bu)
209     ac_prev=build ;;
210   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
211     build="$ac_optarg" ;;
212
213   -cache-file | --cache-file | --cache-fil | --cache-fi \
214   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
215     ac_prev=cache_file ;;
216   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
217   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
218     cache_file="$ac_optarg" ;;
219
220   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
221     ac_prev=datadir ;;
222   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
223   | --da=*)
224     datadir="$ac_optarg" ;;
225
226   -disable-* | --disable-*)
227     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
228     # Reject names that are not valid shell variable names.
229     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
230       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
231     fi
232     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
233     eval "enable_${ac_feature}=no" ;;
234
235   -enable-* | --enable-*)
236     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
237     # Reject names that are not valid shell variable names.
238     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
239       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
240     fi
241     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
242     case "$ac_option" in
243       *=*) ;;
244       *) ac_optarg=yes ;;
245     esac
246     eval "enable_${ac_feature}='$ac_optarg'" ;;
247
248   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
249   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
250   | --exec | --exe | --ex)
251     ac_prev=exec_prefix ;;
252   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
253   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
254   | --exec=* | --exe=* | --ex=*)
255     exec_prefix="$ac_optarg" ;;
256
257   -gas | --gas | --ga | --g)
258     # Obsolete; use --with-gas.
259     with_gas=yes ;;
260
261   -help | --help | --hel | --he)
262     # Omit some internal or obsolete options to make the list less imposing.
263     # This message is too long to be a string in the A/UX 3.1 sh.
264     cat << EOF
265 Usage: configure [options] [host]
266 Options: [defaults in brackets after descriptions]
267 Configuration:
268   --cache-file=FILE       cache test results in FILE
269   --help                  print this message
270   --no-create             do not create output files
271   --quiet, --silent       do not print \`checking...' messages
272   --version               print the version of autoconf that created configure
273 Directory and file names:
274   --prefix=PREFIX         install architecture-independent files in PREFIX
275                           [$ac_default_prefix]
276   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
277                           [same as prefix]
278   --bindir=DIR            user executables in DIR [EPREFIX/bin]
279   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
280   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
281   --datadir=DIR           read-only architecture-independent data in DIR
282                           [PREFIX/share]
283   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
284   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
285                           [PREFIX/com]
286   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
287   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
288   --includedir=DIR        C header files in DIR [PREFIX/include]
289   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
290   --infodir=DIR           info documentation in DIR [PREFIX/info]
291   --mandir=DIR            man documentation in DIR [PREFIX/man]
292   --srcdir=DIR            find the sources in DIR [configure dir or ..]
293   --program-prefix=PREFIX prepend PREFIX to installed program names
294   --program-suffix=SUFFIX append SUFFIX to installed program names
295   --program-transform-name=PROGRAM
296                           run sed PROGRAM on installed program names
297 EOF
298     cat << EOF
299 Host type:
300   --build=BUILD           configure for building on BUILD [BUILD=HOST]
301   --host=HOST             configure for HOST [guessed]
302   --target=TARGET         configure for TARGET [TARGET=HOST]
303 Features and packages:
304   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
305   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
306   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
307   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
308   --x-includes=DIR        X include files are in DIR
309   --x-libraries=DIR       X library files are in DIR
310 EOF
311     if test -n "$ac_help"; then
312       echo "--enable and --with options recognized:$ac_help"
313     fi
314     exit 0 ;;
315
316   -host | --host | --hos | --ho)
317     ac_prev=host ;;
318   -host=* | --host=* | --hos=* | --ho=*)
319     host="$ac_optarg" ;;
320
321   -includedir | --includedir | --includedi | --included | --include \
322   | --includ | --inclu | --incl | --inc)
323     ac_prev=includedir ;;
324   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
325   | --includ=* | --inclu=* | --incl=* | --inc=*)
326     includedir="$ac_optarg" ;;
327
328   -infodir | --infodir | --infodi | --infod | --info | --inf)
329     ac_prev=infodir ;;
330   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
331     infodir="$ac_optarg" ;;
332
333   -libdir | --libdir | --libdi | --libd)
334     ac_prev=libdir ;;
335   -libdir=* | --libdir=* | --libdi=* | --libd=*)
336     libdir="$ac_optarg" ;;
337
338   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
339   | --libexe | --libex | --libe)
340     ac_prev=libexecdir ;;
341   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
342   | --libexe=* | --libex=* | --libe=*)
343     libexecdir="$ac_optarg" ;;
344
345   -localstatedir | --localstatedir | --localstatedi | --localstated \
346   | --localstate | --localstat | --localsta | --localst \
347   | --locals | --local | --loca | --loc | --lo)
348     ac_prev=localstatedir ;;
349   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
350   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
351   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
352     localstatedir="$ac_optarg" ;;
353
354   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
355     ac_prev=mandir ;;
356   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
357     mandir="$ac_optarg" ;;
358
359   -nfp | --nfp | --nf)
360     # Obsolete; use --without-fp.
361     with_fp=no ;;
362
363   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
364   | --no-cr | --no-c)
365     no_create=yes ;;
366
367   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
368   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
369     no_recursion=yes ;;
370
371   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
372   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
373   | --oldin | --oldi | --old | --ol | --o)
374     ac_prev=oldincludedir ;;
375   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
376   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
377   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
378     oldincludedir="$ac_optarg" ;;
379
380   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
381     ac_prev=prefix ;;
382   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
383     prefix="$ac_optarg" ;;
384
385   -program-prefix | --program-prefix | --program-prefi | --program-pref \
386   | --program-pre | --program-pr | --program-p)
387     ac_prev=program_prefix ;;
388   -program-prefix=* | --program-prefix=* | --program-prefi=* \
389   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
390     program_prefix="$ac_optarg" ;;
391
392   -program-suffix | --program-suffix | --program-suffi | --program-suff \
393   | --program-suf | --program-su | --program-s)
394     ac_prev=program_suffix ;;
395   -program-suffix=* | --program-suffix=* | --program-suffi=* \
396   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
397     program_suffix="$ac_optarg" ;;
398
399   -program-transform-name | --program-transform-name \
400   | --program-transform-nam | --program-transform-na \
401   | --program-transform-n | --program-transform- \
402   | --program-transform | --program-transfor \
403   | --program-transfo | --program-transf \
404   | --program-trans | --program-tran \
405   | --progr-tra | --program-tr | --program-t)
406     ac_prev=program_transform_name ;;
407   -program-transform-name=* | --program-transform-name=* \
408   | --program-transform-nam=* | --program-transform-na=* \
409   | --program-transform-n=* | --program-transform-=* \
410   | --program-transform=* | --program-transfor=* \
411   | --program-transfo=* | --program-transf=* \
412   | --program-trans=* | --program-tran=* \
413   | --progr-tra=* | --program-tr=* | --program-t=*)
414     program_transform_name="$ac_optarg" ;;
415
416   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
417   | -silent | --silent | --silen | --sile | --sil)
418     silent=yes ;;
419
420   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
421     ac_prev=sbindir ;;
422   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
423   | --sbi=* | --sb=*)
424     sbindir="$ac_optarg" ;;
425
426   -sharedstatedir | --sharedstatedir | --sharedstatedi \
427   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
428   | --sharedst | --shareds | --shared | --share | --shar \
429   | --sha | --sh)
430     ac_prev=sharedstatedir ;;
431   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
432   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
433   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
434   | --sha=* | --sh=*)
435     sharedstatedir="$ac_optarg" ;;
436
437   -site | --site | --sit)
438     ac_prev=site ;;
439   -site=* | --site=* | --sit=*)
440     site="$ac_optarg" ;;
441
442   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
443     ac_prev=srcdir ;;
444   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
445     srcdir="$ac_optarg" ;;
446
447   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
448   | --syscon | --sysco | --sysc | --sys | --sy)
449     ac_prev=sysconfdir ;;
450   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
451   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
452     sysconfdir="$ac_optarg" ;;
453
454   -target | --target | --targe | --targ | --tar | --ta | --t)
455     ac_prev=target ;;
456   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
457     target="$ac_optarg" ;;
458
459   -v | -verbose | --verbose | --verbos | --verbo | --verb)
460     verbose=yes ;;
461
462   -version | --version | --versio | --versi | --vers)
463     echo "configure generated by autoconf version 2.13.1"
464     exit 0 ;;
465
466   -with-* | --with-*)
467     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
468     # Reject names that are not valid shell variable names.
469     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
470       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
471     fi
472     ac_package=`echo $ac_package| sed 's/-/_/g'`
473     case "$ac_option" in
474       *=*) ;;
475       *) ac_optarg=yes ;;
476     esac
477     eval "with_${ac_package}='$ac_optarg'" ;;
478
479   -without-* | --without-*)
480     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
481     # Reject names that are not valid shell variable names.
482     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
483       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
484     fi
485     ac_package=`echo $ac_package| sed 's/-/_/g'`
486     eval "with_${ac_package}=no" ;;
487
488   --x)
489     # Obsolete; use --with-x.
490     with_x=yes ;;
491
492   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
493   | --x-incl | --x-inc | --x-in | --x-i)
494     ac_prev=x_includes ;;
495   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
496   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
497     x_includes="$ac_optarg" ;;
498
499   -x-libraries | --x-libraries | --x-librarie | --x-librari \
500   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
501     ac_prev=x_libraries ;;
502   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
503   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
504     x_libraries="$ac_optarg" ;;
505
506   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
507     ;;
508
509   *)
510     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
511       echo "configure: warning: $ac_option: invalid host type" 1>&2
512     fi
513     if test "x$nonopt" != xNONE; then
514       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
515     fi
516     nonopt="$ac_option"
517     ;;
518
519   esac
520 done
521
522 if test -n "$ac_prev"; then
523   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
524 fi
525
526 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
527
528 # File descriptor usage:
529 # 0 standard input
530 # 1 file creation
531 # 2 errors and warnings
532 # 3 some systems may open it to /dev/tty
533 # 4 used on the Kubota Titan
534 # 6 checking for... messages and results
535 # 5 compiler messages saved in config.log
536 if test "$silent" = yes; then
537   exec 6>/dev/null
538 else
539   exec 6>&1
540 fi
541 exec 5>./config.log
542
543 echo "\
544 This file contains any messages produced by compilers while
545 running configure, to aid debugging if configure makes a mistake.
546 " 1>&5
547
548 # Strip out --no-create and --no-recursion so they do not pile up.
549 # Also quote any args containing shell metacharacters.
550 ac_configure_args=
551 for ac_arg
552 do
553   case "$ac_arg" in
554   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
555   | --no-cr | --no-c) ;;
556   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
557   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
558   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
559   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
560   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
561   esac
562 done
563
564 # NLS nuisances.
565 # Only set these to C if already set.  These must not be set unconditionally
566 # because not all systems understand e.g. LANG=C (notably SCO).
567 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
568 # Non-C LC_CTYPE values break the ctype check.
569 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
570 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
571 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
572 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
573
574 # confdefs.h avoids OS command line length limits that DEFS can exceed.
575 rm -rf conftest* confdefs.h
576 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
577 echo > confdefs.h
578
579 # A filename unique to this package, relative to the directory that
580 # configure is in, which we can look for to find out if srcdir is correct.
581 ac_unique_file=build/version
582
583 # Find the source files, if location was not specified.
584 if test -z "$srcdir"; then
585   ac_srcdir_defaulted=yes
586   # Try the directory containing this script, then its parent.
587   ac_prog=$0
588   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
589   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
590   srcdir=$ac_confdir
591   if test ! -r $srcdir/$ac_unique_file; then
592     srcdir=..
593   fi
594 else
595   ac_srcdir_defaulted=no
596 fi
597 if test ! -r $srcdir/$ac_unique_file; then
598   if test "$ac_srcdir_defaulted" = yes; then
599     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
600   else
601     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
602   fi
603 fi
604 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
605
606 # Prefer explicitly selected file to automatically selected ones.
607 if test -z "$CONFIG_SITE"; then
608   if test "x$prefix" != xNONE; then
609     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
610   else
611     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
612   fi
613 fi
614 for ac_site_file in $CONFIG_SITE; do
615   if test -r "$ac_site_file"; then
616     echo "loading site script $ac_site_file"
617     . "$ac_site_file"
618   fi
619 done
620
621
622 ac_ext=c
623 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
624 ac_cpp='$CPP $CPPFLAGS'
625 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
626 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
627 cross_compiling=$ac_cv_prog_cc_cross
628
629 ac_exeext=
630 ac_objext=o
631 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
632   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
633   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
634     ac_n= ac_c='
635 ' ac_t='        '
636   else
637     ac_n=-n ac_c= ac_t=
638   fi
639 else
640   ac_n= ac_c='\c' ac_t=
641 fi
642
643
644 # set unset (borrowed from autoconf 2.14a)
645 if (unset FOO) >/dev/null 2>&1; then
646   ol_unset=unset
647 else
648   ol_unset=false
649 fi
650 # unset CDPATH
651 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
652
653 ac_aux_dir=
654 for ac_dir in build $srcdir/build; do
655   if test -f $ac_dir/install-sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install-sh -c"
658     break
659   elif test -f $ac_dir/install.sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install.sh -c"
662     break
663   elif test -f $ac_dir/shtool; then
664     ac_aux_dir=$ac_dir
665     ac_install_sh="$ac_aux_dir/shtool install -c"
666     break
667   fi
668 done
669 if test -z "$ac_aux_dir"; then
670   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
671 fi
672 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
673 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
674 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
675
676 OL_VERSION=`cat $ac_aux_dir/version`
677 if test -z "$OL_VERSION"; then
678         { echo "configure: error: could not determine version" 1>&2; exit 1; }
679 fi
680
681 echo "Configuring OpenLDAP $OL_VERSION ..."
682
683
684 echo $ac_n "checking host system type""... $ac_c" 1>&6
685 echo "configure:686: checking host system type" >&5
686 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
687
688 # Make sure we can run config.sub.
689   if $ac_config_sub sun4 >/dev/null 2>&1; then :
690     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
691   fi
692
693   ac_cv_host_alias=$host
694   case "$ac_cv_host_alias" in
695   NONE)
696     case $nonopt in
697     NONE)
698       if ac_cv_host_alias=`$ac_config_guess`; then :
699       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
700       fi ;;
701     *) ac_cv_host_alias=$nonopt ;;
702     esac ;;
703   esac
704
705   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
706   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
707   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
708   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
709 else
710   echo $ac_n "(cached) $ac_c" 1>&6
711 fi
712
713 echo "$ac_t""$ac_cv_host" 1>&6
714
715 host=$ac_cv_host
716 host_alias=$ac_cv_host_alias
717 host_cpu=$ac_cv_host_cpu
718 host_vendor=$ac_cv_host_vendor
719 host_os=$ac_cv_host_os
720
721
722
723
724
725 echo $ac_n "checking target system type""... $ac_c" 1>&6
726 echo "configure:727: checking target system type" >&5
727 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
728
729 # Make sure we can run config.sub.
730   if $ac_config_sub sun4 >/dev/null 2>&1; then :
731     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
732   fi
733
734   ac_cv_target_alias=$target
735   case "$ac_cv_target_alias" in
736   NONE)
737     case $nonopt in
738     NONE)
739       ac_cv_target_alias=$host_alias ;;
740
741     *) ac_cv_target_alias=$nonopt ;;
742     esac ;;
743   esac
744
745   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
746   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749 else
750   echo $ac_n "(cached) $ac_c" 1>&6
751 fi
752
753 echo "$ac_t""$ac_cv_target" 1>&6
754
755 target=$ac_cv_target
756 target_alias=$ac_cv_target_alias
757 target_cpu=$ac_cv_target_cpu
758 target_vendor=$ac_cv_target_vendor
759 target_os=$ac_cv_target_os
760
761
762
763
764
765 echo $ac_n "checking build system type""... $ac_c" 1>&6
766 echo "configure:767: checking build system type" >&5
767 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
768
769 # Make sure we can run config.sub.
770   if $ac_config_sub sun4 >/dev/null 2>&1; then :
771     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
772   fi
773
774   ac_cv_build_alias=$build
775   case "$ac_cv_build_alias" in
776   NONE)
777     case $nonopt in
778     NONE)
779       ac_cv_build_alias=$host_alias ;;
780
781     *) ac_cv_build_alias=$nonopt ;;
782     esac ;;
783   esac
784
785   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
786   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
787   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
788   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
789 else
790   echo $ac_n "(cached) $ac_c" 1>&6
791 fi
792
793 echo "$ac_t""$ac_cv_build" 1>&6
794
795 build=$ac_cv_build
796 build_alias=$ac_cv_build_alias
797 build_cpu=$ac_cv_build_cpu
798 build_vendor=$ac_cv_build_vendor
799 build_os=$ac_cv_build_os
800
801
802
803
804
805 # Do some error checking and defaulting for the host and target type.
806 # The inputs are:
807 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
808 #
809 # The rules are:
810 # 1. You are not allowed to specify --host, --target, and nonopt at the
811 #    same time.
812 # 2. Host defaults to nonopt.
813 # 3. If nonopt is not specified, then host defaults to the current host,
814 #    as determined by config.guess.
815 # 4. Target and build default to nonopt.
816 # 5. If nonopt is not specified, then target and build default to host.
817
818 # The aliases save the names the user supplied, while $host etc.
819 # will get canonicalized.
820 case $host---$target---$nonopt in
821 NONE---*---* | *---NONE---* | *---*---NONE) ;;
822 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
823 esac
824
825 test "$host_alias" != "$target_alias" &&
826   test "$program_prefix$program_suffix$program_transform_name" = \
827     NONENONEs,x,x, &&
828   program_prefix=${target_alias}-
829
830
831 # Find a good install program.  We prefer a C program (faster),
832 # so one script is as good as another.  But avoid the broken or
833 # incompatible versions:
834 # SysV /etc/install, /usr/sbin/install
835 # SunOS /usr/etc/install
836 # IRIX /sbin/install
837 # AIX /bin/install
838 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
839 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
840 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
841 # ./install, which can be erroneously created by make from ./install.sh.
842 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
843 echo "configure:844: checking for a BSD compatible install" >&5
844 if test -z "$INSTALL"; then
845 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
846   echo $ac_n "(cached) $ac_c" 1>&6
847 else
848     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
849   for ac_dir in $PATH; do
850     # Account for people who put trailing slashes in PATH elements.
851     case "$ac_dir/" in
852     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
853     *)
854       # OSF1 and SCO ODT 3.0 have their own names for install.
855       # Don't use installbsd from OSF since it installs stuff as root
856       # by default.
857       for ac_prog in ginstall scoinst install; do
858         if test -f $ac_dir/$ac_prog; then
859           if test $ac_prog = install &&
860             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
861             # AIX install.  It has an incompatible calling convention.
862             :
863           elif test $ac_prog = install &&
864             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
865             # program-specific install script used by HP pwplus--don't use.
866             :
867           else
868             ac_cv_path_install="$ac_dir/$ac_prog -c"
869             break 2
870           fi
871         fi
872       done
873       ;;
874     esac
875   done
876   IFS="$ac_save_IFS"
877
878 fi
879   if test "${ac_cv_path_install+set}" = set; then
880     INSTALL="$ac_cv_path_install"
881   else
882     # As a last resort, use the slow shell script.  We don't cache a
883     # path for INSTALL within a source directory, because that will
884     # break other packages using the cache if that directory is
885     # removed, or if the path is relative.
886     INSTALL="$ac_install_sh"
887   fi
888 fi
889 echo "$ac_t""$INSTALL" 1>&6
890
891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
892 # It thinks the first close brace ends the variable substitution.
893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
894
895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
896
897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
898
899 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
900 echo "configure:901: checking whether build environment is sane" >&5
901 # Just in case
902 sleep 1
903 echo timestamp > conftestfile
904 # Do `set' in a subshell so we don't clobber the current shell's
905 # arguments.  Must try -L first in case configure is actually a
906 # symlink; some systems play weird games with the mod time of symlinks
907 # (eg FreeBSD returns the mod time of the symlink's containing
908 # directory).
909 if (
910    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911    if test "$*" = "X"; then
912       # -L didn't work.
913       set X `ls -t $srcdir/configure conftestfile`
914    fi
915    if test "$*" != "X $srcdir/configure conftestfile" \
916       && test "$*" != "X conftestfile $srcdir/configure"; then
917
918       # If neither matched, then we have a broken ls.  This can happen
919       # if, for instance, CONFIG_SHELL is bash and it inherits a
920       # broken ls alias from the environment.  This has actually
921       # happened.  Such a system could not be considered "sane".
922       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
923 alias in your environment" 1>&2; exit 1; }
924    fi
925
926    test "$2" = conftestfile
927    )
928 then
929    # Ok.
930    :
931 else
932    { echo "configure: error: newly created file is older than distributed files!
933 Check your system clock" 1>&2; exit 1; }
934 fi
935 rm -f conftest*
936 echo "$ac_t""yes" 1>&6
937 if test "$program_transform_name" = s,x,x,; then
938   program_transform_name=
939 else
940   # Double any \ or $.  echo might interpret backslashes.
941   cat <<\EOF_SED > conftestsed
942 s,\\,\\\\,g; s,\$,$$,g
943 EOF_SED
944   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
945   rm -f conftestsed
946 fi
947 test "$program_prefix" != NONE &&
948   program_transform_name="s,^,${program_prefix},;$program_transform_name"
949 # Use a double $ so make ignores it.
950 test "$program_suffix" != NONE &&
951   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
952
953 # sed with no file args requires a program.
954 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
955
956 for ac_prog in mawk gawk nawk awk
957 do
958 # Extract the first word of "$ac_prog", so it can be a program name with args.
959 set dummy $ac_prog; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$AWK"; then
966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
969   ac_dummy="$PATH"
970   for ac_dir in $ac_dummy; do
971     test -z "$ac_dir" && ac_dir=.
972     if test -f $ac_dir/$ac_word; then
973       ac_cv_prog_AWK="$ac_prog"
974       break
975     fi
976   done
977   IFS="$ac_save_ifs"
978 fi
979 fi
980 AWK="$ac_cv_prog_AWK"
981 if test -n "$AWK"; then
982   echo "$ac_t""$AWK" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987 test -n "$AWK" && break
988 done
989
990 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
991 echo "configure:992: checking whether ${MAKE-make} sets \${MAKE}" >&5
992 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
993 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
994   echo $ac_n "(cached) $ac_c" 1>&6
995 else
996   cat > conftestmake <<\EOF
997 all:
998         @echo 'ac_maketemp="${MAKE}"'
999 EOF
1000 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1001 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1002 if test -n "$ac_maketemp"; then
1003   eval ac_cv_prog_make_${ac_make}_set=yes
1004 else
1005   eval ac_cv_prog_make_${ac_make}_set=no
1006 fi
1007 rm -f conftestmake
1008 fi
1009 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1010   echo "$ac_t""yes" 1>&6
1011   SET_MAKE=
1012 else
1013   echo "$ac_t""no" 1>&6
1014   SET_MAKE="MAKE=${MAKE-make}"
1015 fi
1016
1017
1018
1019 PACKAGE=OpenLDAP
1020
1021 VERSION=$OL_VERSION
1022
1023 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1024   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1025 fi
1026
1027
1028
1029 missing_dir=`cd $ac_aux_dir && pwd`
1030 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1031 echo "configure:1032: checking for working aclocal" >&5
1032 # Run test in a subshell; some versions of sh will print an error if
1033 # an executable is not found, even if stderr is redirected.
1034 # Redirect stdin to placate older versions of autoconf.  Sigh.
1035 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1036    ACLOCAL=aclocal
1037    echo "$ac_t""found" 1>&6
1038 else
1039    ACLOCAL="$missing_dir/missing aclocal"
1040    echo "$ac_t""missing" 1>&6
1041 fi
1042
1043 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1044 echo "configure:1045: checking for working autoconf" >&5
1045 # Run test in a subshell; some versions of sh will print an error if
1046 # an executable is not found, even if stderr is redirected.
1047 # Redirect stdin to placate older versions of autoconf.  Sigh.
1048 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1049    AUTOCONF=autoconf
1050    echo "$ac_t""found" 1>&6
1051 else
1052    AUTOCONF="$missing_dir/missing autoconf"
1053    echo "$ac_t""missing" 1>&6
1054 fi
1055
1056 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1057 echo "configure:1058: checking for working automake" >&5
1058 # Run test in a subshell; some versions of sh will print an error if
1059 # an executable is not found, even if stderr is redirected.
1060 # Redirect stdin to placate older versions of autoconf.  Sigh.
1061 if (automake --version) < /dev/null > /dev/null 2>&1; then
1062    AUTOMAKE=automake
1063    echo "$ac_t""found" 1>&6
1064 else
1065    AUTOMAKE="$missing_dir/missing automake"
1066    echo "$ac_t""missing" 1>&6
1067 fi
1068
1069 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1070 echo "configure:1071: checking for working autoheader" >&5
1071 # Run test in a subshell; some versions of sh will print an error if
1072 # an executable is not found, even if stderr is redirected.
1073 # Redirect stdin to placate older versions of autoconf.  Sigh.
1074 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1075    AUTOHEADER=autoheader
1076    echo "$ac_t""found" 1>&6
1077 else
1078    AUTOHEADER="$missing_dir/missing autoheader"
1079    echo "$ac_t""missing" 1>&6
1080 fi
1081
1082 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1083 echo "configure:1084: checking for working makeinfo" >&5
1084 # Run test in a subshell; some versions of sh will print an error if
1085 # an executable is not found, even if stderr is redirected.
1086 # Redirect stdin to placate older versions of autoconf.  Sigh.
1087 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1088    MAKEINFO=makeinfo
1089    echo "$ac_t""found" 1>&6
1090 else
1091    MAKEINFO="$missing_dir/missing makeinfo"
1092    echo "$ac_t""missing" 1>&6
1093 fi
1094
1095 install_sh="$missing_dir/install-sh"
1096 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1097
1098 for ac_prog in gnutar gtar tar
1099 do
1100 # Extract the first word of "$ac_prog", so it can be a program name with args.
1101 set dummy $ac_prog; ac_word=$2
1102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103 echo "configure:1104: checking for $ac_word" >&5
1104 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   if test -n "$AMTAR"; then
1108   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1109 else
1110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1111   ac_dummy="$PATH"
1112   for ac_dir in $ac_dummy; do
1113     test -z "$ac_dir" && ac_dir=.
1114     if test -f $ac_dir/$ac_word; then
1115       ac_cv_prog_AMTAR="$ac_prog"
1116       break
1117     fi
1118   done
1119   IFS="$ac_save_ifs"
1120 fi
1121 fi
1122 AMTAR="$ac_cv_prog_AMTAR"
1123 if test -n "$AMTAR"; then
1124   echo "$ac_t""$AMTAR" 1>&6
1125 else
1126   echo "$ac_t""no" 1>&6
1127 fi
1128
1129 test -n "$AMTAR" && break
1130 done
1131
1132
1133 AMTARFLAGS=
1134 if test -n "$AMTAR"; then
1135   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1136         AMTARFLAGS=o
1137   fi
1138 fi
1139
1140
1141
1142 cat >> confdefs.h <<EOF
1143 #define OPENLDAP_PACKAGE "$PACKAGE"
1144 EOF
1145
1146 cat >> confdefs.h <<EOF
1147 #define OPENLDAP_VERSION "$VERSION"
1148 EOF
1149
1150
1151
1152
1153 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1154 echo "configure:1155: checking configure arguments" >&5
1155
1156
1157 top_builddir=`pwd`
1158
1159 ldap_subdir="/openldap"
1160
1161 # Check whether --with-subdir or --without-subdir was given.
1162 if test "${with_subdir+set}" = set; then
1163   withval="$with_subdir"
1164   case "$withval" in
1165         no) ldap_subdir=""
1166                 ;;
1167         yes)
1168                 ;;
1169         /*|\\*)
1170                 ldap_subdir="$withval"
1171                 ;;
1172         *)
1173                 ldap_subdir="/$withval"
1174                 ;;
1175 esac
1176
1177 fi
1178
1179
1180 # OpenLDAP --enable-debug
1181         # Check whether --enable-debug or --disable-debug was given.
1182 if test "${enable_debug+set}" = set; then
1183   enableval="$enable_debug"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1193         fi
1194         ol_enable_debug="$ol_arg"
1195
1196 else
1197         ol_enable_debug="yes"
1198 fi
1199 # end --enable-debug
1200 # OpenLDAP --enable-syslog
1201         # Check whether --enable-syslog or --disable-syslog was given.
1202 if test "${enable_syslog+set}" = set; then
1203   enableval="$enable_syslog"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1213         fi
1214         ol_enable_syslog="$ol_arg"
1215
1216 else
1217         ol_enable_syslog="auto"
1218 fi
1219 # end --enable-syslog
1220 # OpenLDAP --enable-proctitle
1221         # Check whether --enable-proctitle or --disable-proctitle was given.
1222 if test "${enable_proctitle+set}" = set; then
1223   enableval="$enable_proctitle"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1233         fi
1234         ol_enable_proctitle="$ol_arg"
1235
1236 else
1237         ol_enable_proctitle="yes"
1238 fi
1239 # end --enable-proctitle
1240 # OpenLDAP --enable-cache
1241         # Check whether --enable-cache or --disable-cache was given.
1242 if test "${enable_cache+set}" = set; then
1243   enableval="$enable_cache"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1253         fi
1254         ol_enable_cache="$ol_arg"
1255
1256 else
1257         ol_enable_cache="yes"
1258 fi
1259 # end --enable-cache
1260 # OpenLDAP --enable-referrals
1261         # Check whether --enable-referrals or --disable-referrals was given.
1262 if test "${enable_referrals+set}" = set; then
1263   enableval="$enable_referrals"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1273         fi
1274         ol_enable_referrals="$ol_arg"
1275
1276 else
1277         ol_enable_referrals="yes"
1278 fi
1279 # end --enable-referrals
1280 # OpenLDAP --enable-kbind
1281         # Check whether --enable-kbind or --disable-kbind was given.
1282 if test "${enable_kbind+set}" = set; then
1283   enableval="$enable_kbind"
1284   
1285         ol_arg=invalid
1286         for ol_val in auto yes no ; do
1287                 if test "$enableval" = "$ol_val" ; then
1288                         ol_arg="$ol_val"
1289                 fi
1290         done
1291         if test "$ol_arg" = "invalid" ; then
1292                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1293         fi
1294         ol_enable_kbind="$ol_arg"
1295
1296 else
1297         ol_enable_kbind="auto"
1298 fi
1299 # end --enable-kbind
1300 # OpenLDAP --enable-cldap
1301         # Check whether --enable-cldap or --disable-cldap was given.
1302 if test "${enable_cldap+set}" = set; then
1303   enableval="$enable_cldap"
1304   
1305         ol_arg=invalid
1306         for ol_val in auto yes no ; do
1307                 if test "$enableval" = "$ol_val" ; then
1308                         ol_arg="$ol_val"
1309                 fi
1310         done
1311         if test "$ol_arg" = "invalid" ; then
1312                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1313         fi
1314         ol_enable_cldap="$ol_arg"
1315
1316 else
1317         ol_enable_cldap="no"
1318 fi
1319 # end --enable-cldap
1320 # OpenLDAP --enable-ldapi
1321         # Check whether --enable-ldapi or --disable-ldapi was given.
1322 if test "${enable_ldapi+set}" = set; then
1323   enableval="$enable_ldapi"
1324   
1325         ol_arg=invalid
1326         for ol_val in auto yes no ; do
1327                 if test "$enableval" = "$ol_val" ; then
1328                         ol_arg="$ol_val"
1329                 fi
1330         done
1331         if test "$ol_arg" = "invalid" ; then
1332                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1333         fi
1334         ol_enable_ldapi="$ol_arg"
1335
1336 else
1337         ol_enable_ldapi="no"
1338 fi
1339 # end --enable-ldapi
1340 # OpenLDAP --enable-x_compile
1341         # Check whether --enable-x_compile or --disable-x_compile was given.
1342 if test "${enable_x_compile+set}" = set; then
1343   enableval="$enable_x_compile"
1344   
1345         ol_arg=invalid
1346         for ol_val in yes no ; do
1347                 if test "$enableval" = "$ol_val" ; then
1348                         ol_arg="$ol_val"
1349                 fi
1350         done
1351         if test "$ol_arg" = "invalid" ; then
1352                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1353         fi
1354         ol_enable_x_compile="$ol_arg"
1355
1356 else
1357         ol_enable_x_compile="no"
1358 fi
1359 # end --enable-x_compile
1360
1361
1362 # OpenLDAP --with-cyrus_sasl
1363         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1364 if test "${with_cyrus_sasl+set}" = set; then
1365   withval="$with_cyrus_sasl"
1366   
1367         ol_arg=invalid
1368         for ol_val in auto yes no  ; do
1369                 if test "$withval" = "$ol_val" ; then
1370                         ol_arg="$ol_val"
1371                 fi
1372         done
1373         if test "$ol_arg" = "invalid" ; then
1374                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1375         fi
1376         ol_with_cyrus_sasl="$ol_arg"
1377
1378 else
1379         ol_with_cyrus_sasl="auto"
1380 fi
1381 # end --with-cyrus_sasl
1382
1383 # OpenLDAP --with-fetch
1384         # Check whether --with-fetch or --without-fetch was given.
1385 if test "${with_fetch+set}" = set; then
1386   withval="$with_fetch"
1387   
1388         ol_arg=invalid
1389         for ol_val in auto yes no  ; do
1390                 if test "$withval" = "$ol_val" ; then
1391                         ol_arg="$ol_val"
1392                 fi
1393         done
1394         if test "$ol_arg" = "invalid" ; then
1395                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1396         fi
1397         ol_with_fetch="$ol_arg"
1398
1399 else
1400         ol_with_fetch="auto"
1401 fi
1402 # end --with-fetch
1403
1404 # OpenLDAP --with-kerberos
1405         # Check whether --with-kerberos or --without-kerberos was given.
1406 if test "${with_kerberos+set}" = set; then
1407   withval="$with_kerberos"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1411                 if test "$withval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1417         fi
1418         ol_with_kerberos="$ol_arg"
1419
1420 else
1421         ol_with_kerberos="auto"
1422 fi
1423 # end --with-kerberos
1424
1425 # OpenLDAP --with-readline
1426         # Check whether --with-readline or --without-readline was given.
1427 if test "${with_readline+set}" = set; then
1428   withval="$with_readline"
1429   
1430         ol_arg=invalid
1431         for ol_val in auto yes no  ; do
1432                 if test "$withval" = "$ol_val" ; then
1433                         ol_arg="$ol_val"
1434                 fi
1435         done
1436         if test "$ol_arg" = "invalid" ; then
1437                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1438         fi
1439         ol_with_readline="$ol_arg"
1440
1441 else
1442         ol_with_readline="auto"
1443 fi
1444 # end --with-readline
1445
1446 # OpenLDAP --with-threads
1447         # Check whether --with-threads or --without-threads was given.
1448 if test "${with_threads+set}" = set; then
1449   withval="$with_threads"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1453                 if test "$withval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1459         fi
1460         ol_with_threads="$ol_arg"
1461
1462 else
1463         ol_with_threads="auto"
1464 fi
1465 # end --with-threads
1466
1467 # OpenLDAP --with-tls
1468         # Check whether --with-tls or --without-tls was given.
1469 if test "${with_tls+set}" = set; then
1470   withval="$with_tls"
1471   
1472         ol_arg=invalid
1473         for ol_val in auto ssleay openssl yes no  ; do
1474                 if test "$withval" = "$ol_val" ; then
1475                         ol_arg="$ol_val"
1476                 fi
1477         done
1478         if test "$ol_arg" = "invalid" ; then
1479                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1480         fi
1481         ol_with_tls="$ol_arg"
1482
1483 else
1484         ol_with_tls="auto"
1485 fi
1486 # end --with-tls
1487
1488 # OpenLDAP --with-yielding_select
1489         # Check whether --with-yielding_select or --without-yielding_select was given.
1490 if test "${with_yielding_select+set}" = set; then
1491   withval="$with_yielding_select"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto yes no manual  ; do
1495                 if test "$withval" = "$ol_val" ; then
1496                         ol_arg="$ol_val"
1497                 fi
1498         done
1499         if test "$ol_arg" = "invalid" ; then
1500                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1501         fi
1502         ol_with_yielding_select="$ol_arg"
1503
1504 else
1505         ol_with_yielding_select="auto"
1506 fi
1507 # end --with-yielding_select
1508
1509
1510
1511 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1512 if test "${with_xxslapdoptions+set}" = set; then
1513   withval="$with_xxslapdoptions"
1514   :
1515 fi
1516
1517 # OpenLDAP --enable-slapd
1518         # Check whether --enable-slapd or --disable-slapd was given.
1519 if test "${enable_slapd+set}" = set; then
1520   enableval="$enable_slapd"
1521   
1522         ol_arg=invalid
1523         for ol_val in auto yes no ; do
1524                 if test "$enableval" = "$ol_val" ; then
1525                         ol_arg="$ol_val"
1526                 fi
1527         done
1528         if test "$ol_arg" = "invalid" ; then
1529                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1530         fi
1531         ol_enable_slapd="$ol_arg"
1532
1533 else
1534         ol_enable_slapd="yes"
1535 fi
1536 # end --enable-slapd
1537 # OpenLDAP --enable-cleartext
1538         # Check whether --enable-cleartext or --disable-cleartext was given.
1539 if test "${enable_cleartext+set}" = set; then
1540   enableval="$enable_cleartext"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no ; do
1544                 if test "$enableval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1550         fi
1551         ol_enable_cleartext="$ol_arg"
1552
1553 else
1554         ol_enable_cleartext="yes"
1555 fi
1556 # end --enable-cleartext
1557 # OpenLDAP --enable-crypt
1558         # Check whether --enable-crypt or --disable-crypt was given.
1559 if test "${enable_crypt+set}" = set; then
1560   enableval="$enable_crypt"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no ; do
1564                 if test "$enableval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1570         fi
1571         ol_enable_crypt="$ol_arg"
1572
1573 else
1574         ol_enable_crypt="auto"
1575 fi
1576 # end --enable-crypt
1577 # OpenLDAP --enable-kpasswd
1578         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1579 if test "${enable_kpasswd+set}" = set; then
1580   enableval="$enable_kpasswd"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto yes no ; do
1584                 if test "$enableval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1590         fi
1591         ol_enable_kpasswd="$ol_arg"
1592
1593 else
1594         ol_enable_kpasswd="no"
1595 fi
1596 # end --enable-kpasswd
1597 # OpenLDAP --enable-spasswd
1598         # Check whether --enable-spasswd or --disable-spasswd was given.
1599 if test "${enable_spasswd+set}" = set; then
1600   enableval="$enable_spasswd"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no ; do
1604                 if test "$enableval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1610         fi
1611         ol_enable_spasswd="$ol_arg"
1612
1613 else
1614         ol_enable_spasswd="no"
1615 fi
1616 # end --enable-spasswd
1617 # OpenLDAP --enable-modules
1618         # Check whether --enable-modules or --disable-modules was given.
1619 if test "${enable_modules+set}" = set; then
1620   enableval="$enable_modules"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no ; do
1624                 if test "$enableval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1630         fi
1631         ol_enable_modules="$ol_arg"
1632
1633 else
1634         ol_enable_modules="no"
1635 fi
1636 # end --enable-modules
1637 # OpenLDAP --enable-multimaster
1638         # Check whether --enable-multimaster or --disable-multimaster was given.
1639 if test "${enable_multimaster+set}" = set; then
1640   enableval="$enable_multimaster"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no ; do
1644                 if test "$enableval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1650         fi
1651         ol_enable_multimaster="$ol_arg"
1652
1653 else
1654         ol_enable_multimaster="no"
1655 fi
1656 # end --enable-multimaster
1657 # OpenLDAP --enable-phonetic
1658         # Check whether --enable-phonetic or --disable-phonetic was given.
1659 if test "${enable_phonetic+set}" = set; then
1660   enableval="$enable_phonetic"
1661   
1662         ol_arg=invalid
1663         for ol_val in auto yes no ; do
1664                 if test "$enableval" = "$ol_val" ; then
1665                         ol_arg="$ol_val"
1666                 fi
1667         done
1668         if test "$ol_arg" = "invalid" ; then
1669                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1670         fi
1671         ol_enable_phonetic="$ol_arg"
1672
1673 else
1674         ol_enable_phonetic="no"
1675 fi
1676 # end --enable-phonetic
1677 # OpenLDAP --enable-quipu
1678         # Check whether --enable-quipu or --disable-quipu was given.
1679 if test "${enable_quipu+set}" = set; then
1680   enableval="$enable_quipu"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto yes no ; do
1684                 if test "$enableval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1690         fi
1691         ol_enable_quipu="$ol_arg"
1692
1693 else
1694         ol_enable_quipu="no"
1695 fi
1696 # end --enable-quipu
1697 # OpenLDAP --enable-rlookups
1698         # Check whether --enable-rlookups or --disable-rlookups was given.
1699 if test "${enable_rlookups+set}" = set; then
1700   enableval="$enable_rlookups"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto yes no ; do
1704                 if test "$enableval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1710         fi
1711         ol_enable_rlookups="$ol_arg"
1712
1713 else
1714         ol_enable_rlookups="auto"
1715 fi
1716 # end --enable-rlookups
1717 # OpenLDAP --enable-aci
1718         # Check whether --enable-aci or --disable-aci was given.
1719 if test "${enable_aci+set}" = set; then
1720   enableval="$enable_aci"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1730         fi
1731         ol_enable_aci="$ol_arg"
1732
1733 else
1734         ol_enable_aci="no"
1735 fi
1736 # end --enable-aci
1737 # OpenLDAP --enable-wrappers
1738         # Check whether --enable-wrappers or --disable-wrappers was given.
1739 if test "${enable_wrappers+set}" = set; then
1740   enableval="$enable_wrappers"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1750         fi
1751         ol_enable_wrappers="$ol_arg"
1752
1753 else
1754         ol_enable_wrappers="no"
1755 fi
1756 # end --enable-wrappers
1757 # OpenLDAP --enable-dynamic
1758         # Check whether --enable-dynamic or --disable-dynamic was given.
1759 if test "${enable_dynamic+set}" = set; then
1760   enableval="$enable_dynamic"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1770         fi
1771         ol_enable_dynamic="$ol_arg"
1772
1773 else
1774         ol_enable_dynamic="no"
1775 fi
1776 # end --enable-dynamic
1777
1778 # OpenLDAP --enable-dnssrv
1779         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1780 if test "${enable_dnssrv+set}" = set; then
1781   enableval="$enable_dnssrv"
1782   
1783         ol_arg=invalid
1784         for ol_val in auto yes no ; do
1785                 if test "$enableval" = "$ol_val" ; then
1786                         ol_arg="$ol_val"
1787                 fi
1788         done
1789         if test "$ol_arg" = "invalid" ; then
1790                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1791         fi
1792         ol_enable_dnssrv="$ol_arg"
1793
1794 else
1795         ol_enable_dnssrv="no"
1796 fi
1797 # end --enable-dnssrv
1798 # OpenLDAP --with-dnssrv_module
1799         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1800 if test "${with_dnssrv_module+set}" = set; then
1801   withval="$with_dnssrv_module"
1802   
1803         ol_arg=invalid
1804         for ol_val in static dynamic ; do
1805                 if test "$withval" = "$ol_val" ; then
1806                         ol_arg="$ol_val"
1807                 fi
1808         done
1809         if test "$ol_arg" = "invalid" ; then
1810                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1811         fi
1812         ol_with_dnssrv_module="$ol_arg"
1813
1814 else
1815         ol_with_dnssrv_module="static"
1816 fi
1817 # end --with-dnssrv_module
1818
1819 # OpenLDAP --enable-ldap
1820         # Check whether --enable-ldap or --disable-ldap was given.
1821 if test "${enable_ldap+set}" = set; then
1822   enableval="$enable_ldap"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1832         fi
1833         ol_enable_ldap="$ol_arg"
1834
1835 else
1836         ol_enable_ldap="no"
1837 fi
1838 # end --enable-ldap
1839 # OpenLDAP --with-ldap_module
1840         # Check whether --with-ldap_module or --without-ldap_module was given.
1841 if test "${with_ldap_module+set}" = set; then
1842   withval="$with_ldap_module"
1843   
1844         ol_arg=invalid
1845         for ol_val in static dynamic ; do
1846                 if test "$withval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1852         fi
1853         ol_with_ldap_module="$ol_arg"
1854
1855 else
1856         ol_with_ldap_module="static"
1857 fi
1858 # end --with-ldap_module
1859
1860 # OpenLDAP --enable-ldbm
1861         # Check whether --enable-ldbm or --disable-ldbm was given.
1862 if test "${enable_ldbm+set}" = set; then
1863   enableval="$enable_ldbm"
1864   
1865         ol_arg=invalid
1866         for ol_val in auto yes no ; do
1867                 if test "$enableval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1873         fi
1874         ol_enable_ldbm="$ol_arg"
1875
1876 else
1877         ol_enable_ldbm="yes"
1878 fi
1879 # end --enable-ldbm
1880 # OpenLDAP --with-ldbm_api
1881         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1882 if test "${with_ldbm_api+set}" = set; then
1883   withval="$with_ldbm_api"
1884   
1885         ol_arg=invalid
1886         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1887                 if test "$withval" = "$ol_val" ; then
1888                         ol_arg="$ol_val"
1889                 fi
1890         done
1891         if test "$ol_arg" = "invalid" ; then
1892                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1893         fi
1894         ol_with_ldbm_api="$ol_arg"
1895
1896 else
1897         ol_with_ldbm_api="auto"
1898 fi
1899 # end --with-ldbm_api
1900
1901 # OpenLDAP --with-ldbm_module
1902         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1903 if test "${with_ldbm_module+set}" = set; then
1904   withval="$with_ldbm_module"
1905   
1906         ol_arg=invalid
1907         for ol_val in static dynamic ; do
1908                 if test "$withval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1914         fi
1915         ol_with_ldbm_module="$ol_arg"
1916
1917 else
1918         ol_with_ldbm_module="static"
1919 fi
1920 # end --with-ldbm_module
1921
1922 # OpenLDAP --with-ldbm_type
1923         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1924 if test "${with_ldbm_type+set}" = set; then
1925   withval="$with_ldbm_type"
1926   
1927         ol_arg=invalid
1928         for ol_val in auto btree hash ; do
1929                 if test "$withval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1935         fi
1936         ol_with_ldbm_type="$ol_arg"
1937
1938 else
1939         ol_with_ldbm_type="auto"
1940 fi
1941 # end --with-ldbm_type
1942
1943 # OpenLDAP --enable-passwd
1944         # Check whether --enable-passwd or --disable-passwd was given.
1945 if test "${enable_passwd+set}" = set; then
1946   enableval="$enable_passwd"
1947   
1948         ol_arg=invalid
1949         for ol_val in auto yes no ; do
1950                 if test "$enableval" = "$ol_val" ; then
1951                         ol_arg="$ol_val"
1952                 fi
1953         done
1954         if test "$ol_arg" = "invalid" ; then
1955                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1956         fi
1957         ol_enable_passwd="$ol_arg"
1958
1959 else
1960         ol_enable_passwd="no"
1961 fi
1962 # end --enable-passwd
1963 # OpenLDAP --with-passwd_module
1964         # Check whether --with-passwd_module or --without-passwd_module was given.
1965 if test "${with_passwd_module+set}" = set; then
1966   withval="$with_passwd_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_passwd_module="$ol_arg"
1978
1979 else
1980         ol_with_passwd_module="static"
1981 fi
1982 # end --with-passwd_module
1983
1984 # OpenLDAP --enable-perl
1985         # Check whether --enable-perl or --disable-perl was given.
1986 if test "${enable_perl+set}" = set; then
1987   enableval="$enable_perl"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto yes no ; do
1991                 if test "$enableval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1997         fi
1998         ol_enable_perl="$ol_arg"
1999
2000 else
2001         ol_enable_perl="no"
2002 fi
2003 # end --enable-perl
2004 # OpenLDAP --with-perl_module
2005         # Check whether --with-perl_module or --without-perl_module was given.
2006 if test "${with_perl_module+set}" = set; then
2007   withval="$with_perl_module"
2008   
2009         ol_arg=invalid
2010         for ol_val in static dynamic ; do
2011                 if test "$withval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2017         fi
2018         ol_with_perl_module="$ol_arg"
2019
2020 else
2021         ol_with_perl_module="static"
2022 fi
2023 # end --with-perl_module
2024
2025 # OpenLDAP --enable-shell
2026         # Check whether --enable-shell or --disable-shell was given.
2027 if test "${enable_shell+set}" = set; then
2028   enableval="$enable_shell"
2029   
2030         ol_arg=invalid
2031         for ol_val in auto yes no ; do
2032                 if test "$enableval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2038         fi
2039         ol_enable_shell="$ol_arg"
2040
2041 else
2042         ol_enable_shell="no"
2043 fi
2044 # end --enable-shell
2045 # OpenLDAP --with-shell_module
2046         # Check whether --with-shell_module or --without-shell_module was given.
2047 if test "${with_shell_module+set}" = set; then
2048   withval="$with_shell_module"
2049   
2050         ol_arg=invalid
2051         for ol_val in static dynamic ; do
2052                 if test "$withval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2058         fi
2059         ol_with_shell_module="$ol_arg"
2060
2061 else
2062         ol_with_shell_module="static"
2063 fi
2064 # end --with-shell_module
2065
2066 # OpenLDAP --enable-sql
2067         # Check whether --enable-sql or --disable-sql was given.
2068 if test "${enable_sql+set}" = set; then
2069   enableval="$enable_sql"
2070   
2071         ol_arg=invalid
2072         for ol_val in auto yes no ; do
2073                 if test "$enableval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2079         fi
2080         ol_enable_sql="$ol_arg"
2081
2082 else
2083         ol_enable_sql="no"
2084 fi
2085 # end --enable-sql
2086 # OpenLDAP --with-sql_module
2087         # Check whether --with-sql_module or --without-sql_module was given.
2088 if test "${with_sql_module+set}" = set; then
2089   withval="$with_sql_module"
2090   
2091         ol_arg=invalid
2092         for ol_val in static dynamic ; do
2093                 if test "$withval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2099         fi
2100         ol_with_sql_module="$ol_arg"
2101
2102 else
2103         ol_with_sql_module="static"
2104 fi
2105 # end --with-sql_module
2106
2107 # OpenLDAP --enable-tcl
2108         # Check whether --enable-tcl or --disable-tcl was given.
2109 if test "${enable_tcl+set}" = set; then
2110   enableval="$enable_tcl"
2111   
2112         ol_arg=invalid
2113         for ol_val in auto yes no ; do
2114                 if test "$enableval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2120         fi
2121         ol_enable_tcl="$ol_arg"
2122
2123 else
2124         ol_enable_tcl="no"
2125 fi
2126 # end --enable-tcl
2127 # OpenLDAP --with-tcl_module
2128         # Check whether --with-tcl_module or --without-tcl_module was given.
2129 if test "${with_tcl_module+set}" = set; then
2130   withval="$with_tcl_module"
2131   
2132         ol_arg=invalid
2133         for ol_val in static dynamic ; do
2134                 if test "$withval" = "$ol_val" ; then
2135                         ol_arg="$ol_val"
2136                 fi
2137         done
2138         if test "$ol_arg" = "invalid" ; then
2139                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2140         fi
2141         ol_with_tcl_module="$ol_arg"
2142
2143 else
2144         ol_with_tcl_module="static"
2145 fi
2146 # end --with-tcl_module
2147
2148
2149 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2150 if test "${with_xxslurpdoptions+set}" = set; then
2151   withval="$with_xxslurpdoptions"
2152   :
2153 fi
2154
2155 # OpenLDAP --enable-slurpd
2156         # Check whether --enable-slurpd or --disable-slurpd was given.
2157 if test "${enable_slurpd+set}" = set; then
2158   enableval="$enable_slurpd"
2159   
2160         ol_arg=invalid
2161         for ol_val in auto yes no ; do
2162                 if test "$enableval" = "$ol_val" ; then
2163                         ol_arg="$ol_val"
2164                 fi
2165         done
2166         if test "$ol_arg" = "invalid" ; then
2167                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2168         fi
2169         ol_enable_slurpd="$ol_arg"
2170
2171 else
2172         ol_enable_slurpd="auto"
2173 fi
2174 # end --enable-slurpd
2175
2176 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2177 if test "${with_xxliboptions+set}" = set; then
2178   withval="$with_xxliboptions"
2179   :
2180 fi
2181
2182 # Check whether --enable-static or --disable-static was given.
2183 if test "${enable_static+set}" = set; then
2184   enableval="$enable_static"
2185   p=${PACKAGE-default}
2186 case "$enableval" in
2187 yes) enable_static=yes ;;
2188 no) enable_static=no ;;
2189 *)
2190   enable_static=no
2191   # Look at the argument we got.  We use all the common list separators.
2192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2193   for pkg in $enableval; do
2194     if test "X$pkg" = "X$p"; then
2195       enable_static=yes
2196     fi
2197   done
2198   IFS="$ac_save_ifs"
2199   ;;
2200 esac
2201 else
2202   enable_static=yes
2203 fi
2204
2205 # Check whether --enable-shared or --disable-shared was given.
2206 if test "${enable_shared+set}" = set; then
2207   enableval="$enable_shared"
2208   p=${PACKAGE-default}
2209 case "$enableval" in
2210 yes) enable_shared=yes ;;
2211 no) enable_shared=no ;;
2212 *)
2213   enable_shared=no
2214   # Look at the argument we got.  We use all the common list separators.
2215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2216   for pkg in $enableval; do
2217     if test "X$pkg" = "X$p"; then
2218       enable_shared=yes
2219     fi
2220   done
2221   IFS="$ac_save_ifs"
2222   ;;
2223 esac
2224 else
2225   enable_shared=yes
2226 fi
2227
2228
2229
2230 # validate options
2231 if test $ol_enable_slapd = no ; then
2232                 if test $ol_enable_dnssrv = yes ; then
2233                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2234         fi
2235         if test $ol_enable_ldap = yes ; then
2236                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2237         fi
2238         if test $ol_enable_ldbm = yes ; then
2239                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2240         fi
2241         if test $ol_enable_passwd = yes ; then
2242                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2243         fi
2244         if test $ol_enable_perl = yes ; then
2245                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2246         fi
2247         if test $ol_enable_shell = yes ; then
2248                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2249         fi
2250         if test $ol_enable_tcl = yes ; then
2251                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2252         fi
2253         if test $ol_enable_sql = yes ; then
2254                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2255         fi
2256         if test $ol_enable_modules = yes ; then
2257                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2258         fi
2259         if test $ol_enable_multimaster = yes ; then
2260                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2261         fi
2262         if test $ol_enable_wrappers = yes ; then
2263                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2264         fi
2265         if test $ol_enable_phonetic = yes ; then
2266                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2267         fi
2268         if test $ol_enable_quipu = yes ; then
2269                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2270         fi
2271         if test $ol_enable_rlookups = yes ; then
2272                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2273         fi
2274         if test $ol_enable_aci = yes ; then
2275                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2276         fi
2277         if test $ol_with_ldbm_api != auto ; then
2278                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2279         fi
2280         if test $ol_with_ldbm_type != auto ; then
2281                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2282         fi
2283         if test $ol_with_dnssrv_module != static ; then
2284                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2285         fi
2286         if test $ol_with_ldap_module != static ; then
2287                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2288         fi
2289         if test $ol_with_ldbm_module != static ; then
2290                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2291         fi
2292         if test $ol_with_passwd_module != static ; then
2293                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2294         fi
2295         if test $ol_with_perl_module != static ; then
2296                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2297         fi
2298         if test $ol_with_shell_module != static ; then
2299                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2300         fi
2301         if test $ol_with_tcl_module != static ; then
2302                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2303         fi
2304         if test $ol_with_sql_module != static ; then
2305                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2306         fi
2307         if test $ol_enable_slurpd = yes ; then
2308                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2309         fi
2310
2311         # force settings to no
2312         ol_enable_dnssrv=no
2313         ol_enable_ldap=no
2314         ol_enable_ldbm=no
2315         ol_enable_passwd=no
2316         ol_enable_perl=no
2317         ol_enable_shell=no
2318         ol_enable_tcl=no
2319         ol_enable_sql=no
2320
2321         ol_enable_modules=no
2322         ol_enable_multimaster=no
2323         ol_enable_phonetic=no
2324         ol_enable_quipu=no
2325         ol_enable_rlookups=no
2326         ol_enable_aci=no
2327         ol_enable_wrappers=no
2328         ol_enable_dynamic=no
2329
2330         ol_with_ldbm_api=no
2331         ol_with_ldbm_type=no
2332
2333         ol_with_dnssrv_module=static
2334         ol_with_ldap_module=static
2335         ol_with_ldbm_module=static
2336         ol_with_passwd_module=static
2337         ol_with_perl_module=static
2338         ol_with_shell_module=static
2339         ol_with_tcl_module=static
2340         ol_with_sql_module=static
2341
2342         ol_enable_slurpd=no
2343
2344 elif test $ol_enable_ldbm = no ; then
2345         
2346         if test $ol_with_ldbm_api != auto ; then
2347                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2348         fi
2349
2350         if test $ol_with_ldbm_type != auto ; then
2351                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2352         fi
2353
2354         if test $ol_with_ldbm_module != static ; then
2355                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2356         fi
2357
2358         if test $ol_enable_modules != yes -a \
2359                 $ol_enable_dnssrv = no -a \
2360                 $ol_enable_ldap = no -a \
2361                 $ol_enable_passwd = no -a \
2362                 $ol_enable_perl = no -a \
2363                 $ol_enable_shell = no -a \
2364                 $ol_enable_sql = no -a \
2365                 $ol_enable_tcl = no ; then
2366                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2367         fi
2368
2369         ol_with_ldbm_api=no
2370         ol_with_ldbm_type=no
2371         ol_with_ldbm_module=static
2372
2373 else
2374                 if test $ol_with_ldbm_api = gdbm -a \
2375                 $ol_with_ldbm_type = btree ; then
2376                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2377         fi
2378         if test $ol_with_ldbm_api = mdbm -a \
2379                 $ol_with_ldbm_type = btree ; then
2380                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2381         fi
2382         if test $ol_with_ldbm_api = ndbm -a \
2383                 $ol_with_ldbm_type = btree ; then
2384                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2385         fi
2386 fi
2387
2388 if test $ol_enable_slurpd = yes ; then
2389                 if test $ol_with_threads = no ; then
2390                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2391         fi
2392 fi
2393
2394 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2395         if test $ol_with_kerberos = no ; then
2396                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2397         fi
2398 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2399         if test $ol_with_kerberos != auto ; then
2400                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2401         else
2402                 ol_with_kerberos=no
2403         fi
2404 fi
2405
2406 if test $ol_enable_spasswd = yes ; then
2407         if test $ol_with_cyrus_sasl = no ; then
2408                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2409         fi
2410         ol_link_spasswd=yes
2411 fi
2412
2413 echo "$ac_t""done" 1>&6
2414
2415 LDAP_LIBS=
2416 LDIF_LIBS=
2417 LDBM_LIBS=
2418 LTHREAD_LIBS=
2419 LUTIL_LIBS=
2420
2421 QUIPU_LIBS=
2422 SLAPD_LIBS=
2423 SLURPD_LIBS=
2424
2425 BUILD_SLAPD=no
2426 BUILD_SLURPD=no
2427
2428 BUILD_QUIPU=no
2429 BUILD_THREAD=no
2430
2431 BUILD_DNSSRV=no
2432 BUILD_LDAP=no
2433 BUILD_LDBM=no
2434 BUILD_PASSWD=no
2435 BUILD_PERL=no
2436 BUILD_SHELL=no
2437 BUILD_SQL=no
2438 BUILD_TCL=no
2439
2440 BUILD_DNSSRV_DYNAMIC=static
2441 BUILD_LDAP_DYNAMIC=static
2442 BUILD_LDBM_DYNAMIC=static
2443 BUILD_PASSWD_DYNAMIC=static
2444 BUILD_PERL_DYNAMIC=static
2445 BUILD_SHELL_DYNAMIC=static
2446 BUILD_TCL_DYNAMIC=static
2447 BUILD_SQL_DYNAMIC=static
2448
2449 SLAPD_MODULES_LDFLAGS=
2450 SLAPD_MODULES_CPPFLAGS=
2451 SLAPD_MODULES_LIST=
2452
2453 SLAPD_PERL_LDFLAGS=
2454 MOD_PERL_LDFLAGS=
2455 PERL_CPPFLAGS=
2456
2457 SLAPD_SQL_LDFLAGS=
2458 SLAPD_SQL_LIBS=
2459 SLAPD_SQL_INCLUDES=
2460
2461 MOD_TCL_LIB=
2462 KRB4_LIBS=
2463 KRB5_LIBS=
2464 READLINE_LIBS=
2465 SASL_LIBS=
2466 TERMCAP_LIBS=
2467 TLS_LIBS=
2468 MODULES_LIBS=
2469 AUTH_LIBS=
2470
2471
2472
2473 cat >> confdefs.h <<\EOF
2474 #define HAVE_MKVERSION 1
2475 EOF
2476
2477
2478
2479
2480 ol_aix_threads=no
2481 case "$target" in
2482 *-*-aix*)       if test -z "$CC" ; then
2483                 case "$ol_with_threads" in
2484                 auto | yes |  posix) ol_aix_threads=yes ;;
2485                 esac
2486         fi
2487 ;;
2488 esac
2489
2490 if test $ol_aix_threads = yes ; then
2491         if test -z "${CC}" ; then
2492                 for ac_prog in cc_r xlc_r cc
2493 do
2494 # Extract the first word of "$ac_prog", so it can be a program name with args.
2495 set dummy $ac_prog; ac_word=$2
2496 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2497 echo "configure:2498: checking for $ac_word" >&5
2498 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2499   echo $ac_n "(cached) $ac_c" 1>&6
2500 else
2501   if test -n "$CC"; then
2502   ac_cv_prog_CC="$CC" # Let the user override the test.
2503 else
2504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2505   ac_dummy="$PATH"
2506   for ac_dir in $ac_dummy; do
2507     test -z "$ac_dir" && ac_dir=.
2508     if test -f $ac_dir/$ac_word; then
2509       ac_cv_prog_CC="$ac_prog"
2510       break
2511     fi
2512   done
2513   IFS="$ac_save_ifs"
2514 fi
2515 fi
2516 CC="$ac_cv_prog_CC"
2517 if test -n "$CC"; then
2518   echo "$ac_t""$CC" 1>&6
2519 else
2520   echo "$ac_t""no" 1>&6
2521 fi
2522
2523 test -n "$CC" && break
2524 done
2525
2526
2527                 if test "$CC" = cc ; then
2528                                                 if test $ol_with_threads != auto ; then
2529                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2530                         else
2531                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2532                         fi
2533                         ol_with_threads=no
2534                 fi
2535         fi
2536
2537         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2538                 ol_with_threads=posix
2539                 ol_cv_pthread_create=yes
2540         fi
2541 fi
2542
2543 if test -z "${CC}"; then
2544         for ac_prog in cc
2545 do
2546 # Extract the first word of "$ac_prog", so it can be a program name with args.
2547 set dummy $ac_prog; ac_word=$2
2548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2549 echo "configure:2550: checking for $ac_word" >&5
2550 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2551   echo $ac_n "(cached) $ac_c" 1>&6
2552 else
2553   if test -n "$CC"; then
2554   ac_cv_prog_CC="$CC" # Let the user override the test.
2555 else
2556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2557   ac_dummy="$PATH"
2558   for ac_dir in $ac_dummy; do
2559     test -z "$ac_dir" && ac_dir=.
2560     if test -f $ac_dir/$ac_word; then
2561       ac_cv_prog_CC="$ac_prog"
2562       break
2563     fi
2564   done
2565   IFS="$ac_save_ifs"
2566 fi
2567 fi
2568 CC="$ac_cv_prog_CC"
2569 if test -n "$CC"; then
2570   echo "$ac_t""$CC" 1>&6
2571 else
2572   echo "$ac_t""no" 1>&6
2573 fi
2574
2575 test -n "$CC" && break
2576 done
2577
2578 fi
2579
2580
2581
2582
2583 # Check whether --enable-fast-install or --disable-fast-install was given.
2584 if test "${enable_fast_install+set}" = set; then
2585   enableval="$enable_fast_install"
2586   p=${PACKAGE-default}
2587 case "$enableval" in
2588 yes) enable_fast_install=yes ;;
2589 no) enable_fast_install=no ;;
2590 *)
2591   enable_fast_install=no
2592   # Look at the argument we got.  We use all the common list separators.
2593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2594   for pkg in $enableval; do
2595     if test "X$pkg" = "X$p"; then
2596       enable_fast_install=yes
2597     fi
2598   done
2599   IFS="$ac_save_ifs"
2600   ;;
2601 esac
2602 else
2603   enable_fast_install=yes
2604 fi
2605
2606 # Extract the first word of "ranlib", so it can be a program name with args.
2607 set dummy ranlib; ac_word=$2
2608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2609 echo "configure:2610: checking for $ac_word" >&5
2610 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2611   echo $ac_n "(cached) $ac_c" 1>&6
2612 else
2613   if test -n "$RANLIB"; then
2614   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2615 else
2616   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2617   ac_dummy="$PATH"
2618   for ac_dir in $ac_dummy; do
2619     test -z "$ac_dir" && ac_dir=.
2620     if test -f $ac_dir/$ac_word; then
2621       ac_cv_prog_RANLIB="ranlib"
2622       break
2623     fi
2624   done
2625   IFS="$ac_save_ifs"
2626   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2627 fi
2628 fi
2629 RANLIB="$ac_cv_prog_RANLIB"
2630 if test -n "$RANLIB"; then
2631   echo "$ac_t""$RANLIB" 1>&6
2632 else
2633   echo "$ac_t""no" 1>&6
2634 fi
2635
2636 # Extract the first word of "gcc", so it can be a program name with args.
2637 set dummy gcc; ac_word=$2
2638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2639 echo "configure:2640: checking for $ac_word" >&5
2640 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2641   echo $ac_n "(cached) $ac_c" 1>&6
2642 else
2643   if test -n "$CC"; then
2644   ac_cv_prog_CC="$CC" # Let the user override the test.
2645 else
2646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2647   ac_dummy="$PATH"
2648   for ac_dir in $ac_dummy; do
2649     test -z "$ac_dir" && ac_dir=.
2650     if test -f $ac_dir/$ac_word; then
2651       ac_cv_prog_CC="gcc"
2652       break
2653     fi
2654   done
2655   IFS="$ac_save_ifs"
2656 fi
2657 fi
2658 CC="$ac_cv_prog_CC"
2659 if test -n "$CC"; then
2660   echo "$ac_t""$CC" 1>&6
2661 else
2662   echo "$ac_t""no" 1>&6
2663 fi
2664
2665 if test -z "$CC"; then
2666   # Extract the first word of "cc", so it can be a program name with args.
2667 set dummy cc; ac_word=$2
2668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_word" >&5
2670 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   if test -n "$CC"; then
2674   ac_cv_prog_CC="$CC" # Let the user override the test.
2675 else
2676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2677   ac_prog_rejected=no
2678   ac_dummy="$PATH"
2679   for ac_dir in $ac_dummy; do
2680     test -z "$ac_dir" && ac_dir=.
2681     if test -f $ac_dir/$ac_word; then
2682       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2683         ac_prog_rejected=yes
2684         continue
2685       fi
2686       ac_cv_prog_CC="cc"
2687       break
2688     fi
2689   done
2690   IFS="$ac_save_ifs"
2691 if test $ac_prog_rejected = yes; then
2692   # We found a bogon in the path, so make sure we never use it.
2693   set dummy $ac_cv_prog_CC
2694   shift
2695   if test $# -gt 0; then
2696     # We chose a different compiler from the bogus one.
2697     # However, it has the same basename, so the bogon will be chosen
2698     # first if we set CC to just the basename; use the full file name.
2699     shift
2700     set dummy "$ac_dir/$ac_word" "$@"
2701     shift
2702     ac_cv_prog_CC="$@"
2703   fi
2704 fi
2705 fi
2706 fi
2707 CC="$ac_cv_prog_CC"
2708 if test -n "$CC"; then
2709   echo "$ac_t""$CC" 1>&6
2710 else
2711   echo "$ac_t""no" 1>&6
2712 fi
2713
2714   if test -z "$CC"; then
2715     case "`uname -s`" in
2716     *win32* | *WIN32* | *CYGWIN*)
2717       # Extract the first word of "cl", so it can be a program name with args.
2718 set dummy cl; ac_word=$2
2719 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2720 echo "configure:2721: checking for $ac_word" >&5
2721 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2722   echo $ac_n "(cached) $ac_c" 1>&6
2723 else
2724   if test -n "$CC"; then
2725   ac_cv_prog_CC="$CC" # Let the user override the test.
2726 else
2727   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2728   ac_dummy="$PATH"
2729   for ac_dir in $ac_dummy; do
2730     test -z "$ac_dir" && ac_dir=.
2731     if test -f $ac_dir/$ac_word; then
2732       ac_cv_prog_CC="cl"
2733       break
2734     fi
2735   done
2736   IFS="$ac_save_ifs"
2737 fi
2738 fi
2739 CC="$ac_cv_prog_CC"
2740 if test -n "$CC"; then
2741   echo "$ac_t""$CC" 1>&6
2742 else
2743   echo "$ac_t""no" 1>&6
2744 fi
2745  ;;
2746     esac
2747   fi
2748   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2749 fi
2750
2751 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2752 echo "configure:2753: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2753
2754 ac_ext=c
2755 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2758 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2759 cross_compiling=$ac_cv_prog_cc_cross
2760
2761 cat > conftest.$ac_ext << EOF
2762
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765
2766 main(){return(0);}
2767 EOF
2768 if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769   ac_cv_prog_cc_works=yes
2770   # If we can't run a trivial program, we are probably using a cross compiler.
2771   if (./conftest; exit) 2>/dev/null; then
2772     ac_cv_prog_cc_cross=no
2773   else
2774     ac_cv_prog_cc_cross=yes
2775   fi
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779   ac_cv_prog_cc_works=no
2780 fi
2781 rm -fr conftest*
2782 ac_ext=c
2783 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2784 ac_cpp='$CPP $CPPFLAGS'
2785 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2786 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2787 cross_compiling=$ac_cv_prog_cc_cross
2788
2789 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2790 if test $ac_cv_prog_cc_works = no; then
2791   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2792 fi
2793 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2794 echo "configure:2795: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2795 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2796 cross_compiling=$ac_cv_prog_cc_cross
2797
2798 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2799 echo "configure:2800: checking whether we are using GNU C" >&5
2800 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   cat > conftest.c <<EOF
2804 #ifdef __GNUC__
2805   yes;
2806 #endif
2807 EOF
2808 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2809   ac_cv_prog_gcc=yes
2810 else
2811   ac_cv_prog_gcc=no
2812 fi
2813 fi
2814
2815 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2816
2817 if test $ac_cv_prog_gcc = yes; then
2818   GCC=yes
2819 else
2820   GCC=
2821 fi
2822
2823 ac_test_CFLAGS="${CFLAGS+set}"
2824 ac_save_CFLAGS="$CFLAGS"
2825 CFLAGS=
2826 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2827 echo "configure:2828: checking whether ${CC-cc} accepts -g" >&5
2828 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2829   echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831   echo 'void f(){}' > conftest.c
2832 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2833   ac_cv_prog_cc_g=yes
2834 else
2835   ac_cv_prog_cc_g=no
2836 fi
2837 rm -f conftest*
2838
2839 fi
2840
2841 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2842 if test "$ac_test_CFLAGS" = set; then
2843   CFLAGS="$ac_save_CFLAGS"
2844 elif test $ac_cv_prog_cc_g = yes; then
2845   if test "$GCC" = yes; then
2846     CFLAGS="-g -O2"
2847   else
2848     CFLAGS="-g"
2849   fi
2850 else
2851   if test "$GCC" = yes; then
2852     CFLAGS="-O2"
2853   else
2854     CFLAGS=
2855   fi
2856 fi
2857
2858 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2859 if test "${with_gnu_ld+set}" = set; then
2860   withval="$with_gnu_ld"
2861   test "$withval" = no || with_gnu_ld=yes
2862 else
2863   with_gnu_ld=no
2864 fi
2865
2866 ac_prog=ld
2867 if test "$ac_cv_prog_gcc" = yes; then
2868   # Check if gcc -print-prog-name=ld gives a path.
2869   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2870 echo "configure:2871: checking for ld used by GCC" >&5
2871   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2872   case "$ac_prog" in
2873     # Accept absolute paths.
2874     [\\/]* | [A-Za-z]:[\\/]*)
2875       re_direlt='/[^/][^/]*/\.\./'
2876       # Canonicalize the path of ld
2877       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2878       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2879         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2880       done
2881       test -z "$LD" && LD="$ac_prog"
2882       ;;
2883   "")
2884     # If it fails, then pretend we aren't using GCC.
2885     ac_prog=ld
2886     ;;
2887   *)
2888     # If it is relative, then search for the first ld in PATH.
2889     with_gnu_ld=unknown
2890     ;;
2891   esac
2892 elif test "$with_gnu_ld" = yes; then
2893   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2894 echo "configure:2895: checking for GNU ld" >&5
2895 else
2896   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2897 echo "configure:2898: checking for non-GNU ld" >&5
2898 fi
2899 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   if test -z "$LD"; then
2903   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2904   for ac_dir in $PATH; do
2905     test -z "$ac_dir" && ac_dir=.
2906     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2907       ac_cv_path_LD="$ac_dir/$ac_prog"
2908       # Check to see if the program is GNU ld.  I'd rather use --version,
2909       # but apparently some GNU ld's only accept -v.
2910       # Break only if it was the GNU/non-GNU ld that we prefer.
2911       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2912         test "$with_gnu_ld" != no && break
2913       else
2914         test "$with_gnu_ld" != yes && break
2915       fi
2916     fi
2917   done
2918   IFS="$ac_save_ifs"
2919 else
2920   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2921 fi
2922 fi
2923
2924 LD="$ac_cv_path_LD"
2925 if test -n "$LD"; then
2926   echo "$ac_t""$LD" 1>&6
2927 else
2928   echo "$ac_t""no" 1>&6
2929 fi
2930 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2931 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2932 echo "configure:2933: checking if the linker ($LD) is GNU ld" >&5
2933 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2937 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2938   ac_cv_prog_gnu_ld=yes
2939 else
2940   ac_cv_prog_gnu_ld=no
2941 fi
2942 fi
2943
2944 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2945
2946
2947 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2948 echo "configure:2949: checking for BSD-compatible nm" >&5
2949 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952   if test -n "$NM"; then
2953   # Let the user override the test.
2954   ac_cv_path_NM="$NM"
2955 else
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2957   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2958     test -z "$ac_dir" && ac_dir=.
2959     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2960       # Check to see if the nm accepts a BSD-compat flag.
2961       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2962       #   nm: unknown option "B" ignored
2963       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2964         ac_cv_path_NM="$ac_dir/nm -B"
2965         break
2966       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2967         ac_cv_path_NM="$ac_dir/nm -p"
2968         break
2969       else
2970         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2971         continue # so that we can try to find one that supports BSD flags
2972       fi
2973     fi
2974   done
2975   IFS="$ac_save_ifs"
2976   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2977 fi
2978 fi
2979
2980 NM="$ac_cv_path_NM"
2981 echo "$ac_t""$NM" 1>&6
2982
2983 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2984 echo "configure:2985: checking whether ln -s works" >&5
2985 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   rm -f conftestdata
2989 if ln -s X conftestdata 2>/dev/null
2990 then
2991   rm -f conftestdata
2992   ac_cv_prog_LN_S="ln -s"
2993 else
2994   ac_cv_prog_LN_S=ln
2995 fi
2996 fi
2997 LN_S="$ac_cv_prog_LN_S"
2998 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2999   echo "$ac_t""yes" 1>&6
3000 else
3001   echo "$ac_t""no" 1>&6
3002 fi
3003
3004 if test $host != $build; then
3005   ac_tool_prefix=${host_alias}-
3006 else
3007   ac_tool_prefix=
3008 fi
3009
3010
3011 case "$target" in
3012 NONE) lt_target="$host" ;;
3013 *) lt_target="$target" ;;
3014 esac
3015
3016 # Check for any special flags to pass to ltconfig.
3017 libtool_flags="--cache-file=$cache_file"
3018 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3019 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3020 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3021 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3022 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3023 libtool_flags="$libtool_flags --enable-dlopen"
3024 libtool_flags="$libtool_flags --enable-win32-dll"
3025 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3026 if test "${enable_libtool_lock+set}" = set; then
3027   enableval="$enable_libtool_lock"
3028   :
3029 fi
3030
3031 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3032 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3033
3034 # Some flags need to be propagated to the compiler or linker for good
3035 # libtool support.
3036 case "$lt_target" in
3037 *-*-irix6*)
3038   # Find out which ABI we are using.
3039   echo '#line 3040 "configure"' > conftest.$ac_ext
3040   if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3041     case "`/usr/bin/file conftest.o`" in
3042     *32-bit*)
3043       LD="${LD-ld} -32"
3044       ;;
3045     *N32*)
3046       LD="${LD-ld} -n32"
3047       ;;
3048     *64-bit*)
3049       LD="${LD-ld} -64"
3050       ;;
3051     esac
3052   fi
3053   rm -rf conftest*
3054   ;;
3055
3056 *-*-sco3.2v5*)
3057   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3058   SAVE_CFLAGS="$CFLAGS"
3059   CFLAGS="$CFLAGS -belf"
3060   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3061 echo "configure:3062: checking whether the C compiler needs -belf" >&5
3062 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   cat > conftest.$ac_ext <<EOF
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068
3069 int main() {
3070
3071 ; return 0; }
3072 EOF
3073 if { (eval echo configure:3074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3074   rm -rf conftest*
3075   lt_cv_cc_needs_belf=yes
3076 else
3077   echo "configure: failed program was:" >&5
3078   cat conftest.$ac_ext >&5
3079   rm -rf conftest*
3080   lt_cv_cc_needs_belf=no
3081 fi
3082 rm -f conftest*
3083 fi
3084
3085 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3086   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3087     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3088     CFLAGS="$SAVE_CFLAGS"
3089   fi
3090   ;;
3091
3092 *-*-cygwin* | *-*-mingw*)
3093   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3094 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3095 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3096 echo "configure:3097: checking for $ac_word" >&5
3097 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3098   echo $ac_n "(cached) $ac_c" 1>&6
3099 else
3100   if test -n "$DLLTOOL"; then
3101   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3102 else
3103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3104   ac_dummy="$PATH"
3105   for ac_dir in $ac_dummy; do
3106     test -z "$ac_dir" && ac_dir=.
3107     if test -f $ac_dir/$ac_word; then
3108       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3109       break
3110     fi
3111   done
3112   IFS="$ac_save_ifs"
3113 fi
3114 fi
3115 DLLTOOL="$ac_cv_prog_DLLTOOL"
3116 if test -n "$DLLTOOL"; then
3117   echo "$ac_t""$DLLTOOL" 1>&6
3118 else
3119   echo "$ac_t""no" 1>&6
3120 fi
3121
3122
3123 if test -z "$ac_cv_prog_DLLTOOL"; then
3124 if test -n "$ac_tool_prefix"; then
3125   # Extract the first word of "dlltool", so it can be a program name with args.
3126 set dummy dlltool; ac_word=$2
3127 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3128 echo "configure:3129: checking for $ac_word" >&5
3129 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3130   echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132   if test -n "$DLLTOOL"; then
3133   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3134 else
3135   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3136   ac_dummy="$PATH"
3137   for ac_dir in $ac_dummy; do
3138     test -z "$ac_dir" && ac_dir=.
3139     if test -f $ac_dir/$ac_word; then
3140       ac_cv_prog_DLLTOOL="dlltool"
3141       break
3142     fi
3143   done
3144   IFS="$ac_save_ifs"
3145   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3146 fi
3147 fi
3148 DLLTOOL="$ac_cv_prog_DLLTOOL"
3149 if test -n "$DLLTOOL"; then
3150   echo "$ac_t""$DLLTOOL" 1>&6
3151 else
3152   echo "$ac_t""no" 1>&6
3153 fi
3154
3155 else
3156   DLLTOOL="false"
3157 fi
3158 fi
3159
3160   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3161 set dummy ${ac_tool_prefix}as; ac_word=$2
3162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3163 echo "configure:3164: checking for $ac_word" >&5
3164 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3165   echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167   if test -n "$AS"; then
3168   ac_cv_prog_AS="$AS" # Let the user override the test.
3169 else
3170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3171   ac_dummy="$PATH"
3172   for ac_dir in $ac_dummy; do
3173     test -z "$ac_dir" && ac_dir=.
3174     if test -f $ac_dir/$ac_word; then
3175       ac_cv_prog_AS="${ac_tool_prefix}as"
3176       break
3177     fi
3178   done
3179   IFS="$ac_save_ifs"
3180 fi
3181 fi
3182 AS="$ac_cv_prog_AS"
3183 if test -n "$AS"; then
3184   echo "$ac_t""$AS" 1>&6
3185 else
3186   echo "$ac_t""no" 1>&6
3187 fi
3188
3189
3190 if test -z "$ac_cv_prog_AS"; then
3191 if test -n "$ac_tool_prefix"; then
3192   # Extract the first word of "as", so it can be a program name with args.
3193 set dummy as; ac_word=$2
3194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3195 echo "configure:3196: checking for $ac_word" >&5
3196 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3197   echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199   if test -n "$AS"; then
3200   ac_cv_prog_AS="$AS" # Let the user override the test.
3201 else
3202   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3203   ac_dummy="$PATH"
3204   for ac_dir in $ac_dummy; do
3205     test -z "$ac_dir" && ac_dir=.
3206     if test -f $ac_dir/$ac_word; then
3207       ac_cv_prog_AS="as"
3208       break
3209     fi
3210   done
3211   IFS="$ac_save_ifs"
3212   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3213 fi
3214 fi
3215 AS="$ac_cv_prog_AS"
3216 if test -n "$AS"; then
3217   echo "$ac_t""$AS" 1>&6
3218 else
3219   echo "$ac_t""no" 1>&6
3220 fi
3221
3222 else
3223   AS="false"
3224 fi
3225 fi
3226
3227   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3228 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3230 echo "configure:3231: checking for $ac_word" >&5
3231 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3232   echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234   if test -n "$OBJDUMP"; then
3235   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3236 else
3237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3238   ac_dummy="$PATH"
3239   for ac_dir in $ac_dummy; do
3240     test -z "$ac_dir" && ac_dir=.
3241     if test -f $ac_dir/$ac_word; then
3242       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3243       break
3244     fi
3245   done
3246   IFS="$ac_save_ifs"
3247 fi
3248 fi
3249 OBJDUMP="$ac_cv_prog_OBJDUMP"
3250 if test -n "$OBJDUMP"; then
3251   echo "$ac_t""$OBJDUMP" 1>&6
3252 else
3253   echo "$ac_t""no" 1>&6
3254 fi
3255
3256
3257 if test -z "$ac_cv_prog_OBJDUMP"; then
3258 if test -n "$ac_tool_prefix"; then
3259   # Extract the first word of "objdump", so it can be a program name with args.
3260 set dummy objdump; ac_word=$2
3261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3262 echo "configure:3263: checking for $ac_word" >&5
3263 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   if test -n "$OBJDUMP"; then
3267   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3268 else
3269   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3270   ac_dummy="$PATH"
3271   for ac_dir in $ac_dummy; do
3272     test -z "$ac_dir" && ac_dir=.
3273     if test -f $ac_dir/$ac_word; then
3274       ac_cv_prog_OBJDUMP="objdump"
3275       break
3276     fi
3277   done
3278   IFS="$ac_save_ifs"
3279   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3280 fi
3281 fi
3282 OBJDUMP="$ac_cv_prog_OBJDUMP"
3283 if test -n "$OBJDUMP"; then
3284   echo "$ac_t""$OBJDUMP" 1>&6
3285 else
3286   echo "$ac_t""no" 1>&6
3287 fi
3288
3289 else
3290   OBJDUMP="false"
3291 fi
3292 fi
3293
3294   ;;
3295
3296 esac
3297
3298
3299 # Save cache, so that ltconfig can load it
3300
3301
3302 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3303 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3304 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3305 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3306 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3307 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3308 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3309 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3310
3311 # Reload cache, that may have been modified by ltconfig
3312
3313
3314 # This can be used to rebuild libtool when needed
3315 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3316
3317 # Always use our own libtool.
3318 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3319
3320 # Redirect the config.log output again, so that the ltconfig log is not
3321 # clobbered by the next message.
3322 exec 5>>./config.log
3323
3324
3325 for ac_prog in mawk gawk nawk awk
3326 do
3327 # Extract the first word of "$ac_prog", so it can be a program name with args.
3328 set dummy $ac_prog; ac_word=$2
3329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3330 echo "configure:3331: checking for $ac_word" >&5
3331 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   if test -n "$AWK"; then
3335   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3336 else
3337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3338   ac_dummy="$PATH"
3339   for ac_dir in $ac_dummy; do
3340     test -z "$ac_dir" && ac_dir=.
3341     if test -f $ac_dir/$ac_word; then
3342       ac_cv_prog_AWK="$ac_prog"
3343       break
3344     fi
3345   done
3346   IFS="$ac_save_ifs"
3347 fi
3348 fi
3349 AWK="$ac_cv_prog_AWK"
3350 if test -n "$AWK"; then
3351   echo "$ac_t""$AWK" 1>&6
3352 else
3353   echo "$ac_t""no" 1>&6
3354 fi
3355
3356 test -n "$AWK" && break
3357 done
3358
3359 # test for ln hardlink support
3360 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3361 echo "configure:3362: checking whether ln works" >&5
3362 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   rm -f conftest.src conftest.dst
3366 echo "conftest" > conftest.src
3367 if ln conftest.src conftest.dst 2>/dev/null
3368 then
3369   ol_cv_prog_LN_H="ln"
3370 else
3371   ol_cv_prog_LN_H="cp"
3372 fi
3373 rm -f conftest.src conftest.dst
3374
3375 fi
3376 LN_H="$ol_cv_prog_LN_H"
3377 if test "$ol_cv_prog_LN_H" = "ln"; then
3378         echo "$ac_t""yes" 1>&6
3379 else
3380         echo "$ac_t""no" 1>&6
3381 fi
3382
3383 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3384 echo "configure:3385: checking whether ln -s works" >&5
3385 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   rm -f conftestdata
3389 if ln -s X conftestdata 2>/dev/null
3390 then
3391   rm -f conftestdata
3392   ac_cv_prog_LN_S="ln -s"
3393 else
3394   ac_cv_prog_LN_S=ln
3395 fi
3396 fi
3397 LN_S="$ac_cv_prog_LN_S"
3398 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3399   echo "$ac_t""yes" 1>&6
3400 else
3401   echo "$ac_t""no" 1>&6
3402 fi
3403
3404
3405 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3406         LN_S="$LN_H"
3407 fi
3408
3409 # Extract the first word of "sendmail", so it can be a program name with args.
3410 set dummy sendmail; ac_word=$2
3411 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3412 echo "configure:3413: checking for $ac_word" >&5
3413 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3414   echo $ac_n "(cached) $ac_c" 1>&6
3415 else
3416   case "$SENDMAIL" in
3417   /*)
3418   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3419   ;;
3420   ?:/*)
3421   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3422   ;;
3423   *)
3424   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3425   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3426   for ac_dir in $ac_dummy; do 
3427     test -z "$ac_dir" && ac_dir=.
3428     if test -f $ac_dir/$ac_word; then
3429       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3430       break
3431     fi
3432   done
3433   IFS="$ac_save_ifs"
3434   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3435   ;;
3436 esac
3437 fi
3438 SENDMAIL="$ac_cv_path_SENDMAIL"
3439 if test -n "$SENDMAIL"; then
3440   echo "$ac_t""$SENDMAIL" 1>&6
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444
3445 # Extract the first word of "vi", so it can be a program name with args.
3446 set dummy vi; ac_word=$2
3447 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3448 echo "configure:3449: checking for $ac_word" >&5
3449 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3450   echo $ac_n "(cached) $ac_c" 1>&6
3451 else
3452   case "$EDITOR" in
3453   /*)
3454   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3455   ;;
3456   ?:/*)
3457   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3458   ;;
3459   *)
3460   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3461   ac_dummy="$PATH:/usr/ucb"
3462   for ac_dir in $ac_dummy; do 
3463     test -z "$ac_dir" && ac_dir=.
3464     if test -f $ac_dir/$ac_word; then
3465       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3466       break
3467     fi
3468   done
3469   IFS="$ac_save_ifs"
3470   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3471   ;;
3472 esac
3473 fi
3474 EDITOR="$ac_cv_path_EDITOR"
3475 if test -n "$EDITOR"; then
3476   echo "$ac_t""$EDITOR" 1>&6
3477 else
3478   echo "$ac_t""no" 1>&6
3479 fi
3480
3481 # Extract the first word of "finger", so it can be a program name with args.
3482 set dummy finger; ac_word=$2
3483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3484 echo "configure:3485: checking for $ac_word" >&5
3485 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3486   echo $ac_n "(cached) $ac_c" 1>&6
3487 else
3488   case "$FINGER" in
3489   /*)
3490   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3491   ;;
3492   ?:/*)
3493   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3494   ;;
3495   *)
3496   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3497   ac_dummy="$PATH:/usr/ucb"
3498   for ac_dir in $ac_dummy; do 
3499     test -z "$ac_dir" && ac_dir=.
3500     if test -f $ac_dir/$ac_word; then
3501       ac_cv_path_FINGER="$ac_dir/$ac_word"
3502       break
3503     fi
3504   done
3505   IFS="$ac_save_ifs"
3506   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3507   ;;
3508 esac
3509 fi
3510 FINGER="$ac_cv_path_FINGER"
3511 if test -n "$FINGER"; then
3512   echo "$ac_t""$FINGER" 1>&6
3513 else
3514   echo "$ac_t""no" 1>&6
3515 fi
3516
3517
3518 ol_link_perl=no
3519 if test $ol_enable_perl != no ; then
3520         # Extract the first word of "perl", so it can be a program name with args.
3521 set dummy perl; ac_word=$2
3522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3523 echo "configure:3524: checking for $ac_word" >&5
3524 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3525   echo $ac_n "(cached) $ac_c" 1>&6
3526 else
3527   case "$PERLBIN" in
3528   /*)
3529   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3530   ;;
3531   ?:/*)
3532   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3533   ;;
3534   *)
3535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3536   ac_dummy="$PATH"
3537   for ac_dir in $ac_dummy; do 
3538     test -z "$ac_dir" && ac_dir=.
3539     if test -f $ac_dir/$ac_word; then
3540       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3541       break
3542     fi
3543   done
3544   IFS="$ac_save_ifs"
3545   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3546   ;;
3547 esac
3548 fi
3549 PERLBIN="$ac_cv_path_PERLBIN"
3550 if test -n "$PERLBIN"; then
3551   echo "$ac_t""$PERLBIN" 1>&6
3552 else
3553   echo "$ac_t""no" 1>&6
3554 fi
3555
3556
3557         if test "no$PERLBIN" = "no" ; then
3558                 if test $ol_enable_perl = yes ; then
3559                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3560                 fi
3561
3562         else
3563                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3564                 if test x"$ol_with_perl_module" = "xstatic" ; then
3565                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3566                 else
3567                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3568                 fi
3569                                 ol_link_perl=yes
3570         fi
3571 fi
3572
3573 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3574 echo "configure:3575: checking how to run the C preprocessor" >&5
3575 # On Suns, sometimes $CPP names a directory.
3576 if test -n "$CPP" && test -d "$CPP"; then
3577   CPP=
3578 fi
3579 if test -z "$CPP"; then
3580 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583     # This must be in double quotes, not single quotes, because CPP may get
3584   # substituted into the Makefile and "${CC-cc}" will confuse make.
3585   CPP="${CC-cc} -E"
3586   # On the NeXT, cc -E runs the code through the compiler's parser,
3587   # not just through cpp.
3588   cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591 #include <assert.h>
3592 Syntax Error
3593 EOF
3594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3595 { (eval echo configure:3596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3597 if test -z "$ac_err"; then
3598   :
3599 else
3600   echo "$ac_err" >&5
3601   echo "configure: failed program was:" >&5
3602   cat conftest.$ac_ext >&5
3603   rm -rf conftest*
3604   CPP="${CC-cc} -E -traditional-cpp"
3605   cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 #include <assert.h>
3609 Syntax Error
3610 EOF
3611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3612 { (eval echo configure:3613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3614 if test -z "$ac_err"; then
3615   :
3616 else
3617   echo "$ac_err" >&5
3618   echo "configure: failed program was:" >&5
3619   cat conftest.$ac_ext >&5
3620   rm -rf conftest*
3621   CPP="${CC-cc} -nologo -E"
3622   cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 #include <assert.h>
3626 Syntax Error
3627 EOF
3628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3629 { (eval echo configure:3630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3631 if test -z "$ac_err"; then
3632   :
3633 else
3634   echo "$ac_err" >&5
3635   echo "configure: failed program was:" >&5
3636   cat conftest.$ac_ext >&5
3637   rm -rf conftest*
3638   CPP=/lib/cpp
3639 fi
3640 rm -f conftest*
3641 fi
3642 rm -f conftest*
3643 fi
3644 rm -f conftest*
3645   ac_cv_prog_CPP="$CPP"
3646 fi
3647   CPP="$ac_cv_prog_CPP"
3648 else
3649   ac_cv_prog_CPP="$CPP"
3650 fi
3651 echo "$ac_t""$CPP" 1>&6
3652
3653
3654 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3655         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3656
3657 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3658         echo "configure: warning: programs compiled here do run here..." 1>&2
3659         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3660
3661 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3662         echo "configure: warning: programs compiled here do not run here..." 1>&2
3663         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3664 fi
3665
3666 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3667 echo "configure:3668: checking for AIX" >&5
3668 cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3671 #ifdef _AIX
3672   yes
3673 #endif
3674
3675 EOF
3676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3677   egrep "yes" >/dev/null 2>&1; then
3678   rm -rf conftest*
3679   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3680 #define _ALL_SOURCE 1
3681 EOF
3682
3683 else
3684   rm -rf conftest*
3685   echo "$ac_t""no" 1>&6
3686 fi
3687 rm -f conftest*
3688
3689
3690 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3691 echo "configure:3692: checking for POSIXized ISC" >&5
3692 if test -d /etc/conf/kconfig.d &&
3693   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3694 then
3695   echo "$ac_t""yes" 1>&6
3696   ISC=yes # If later tests want to check for ISC.
3697   cat >> confdefs.h <<\EOF
3698 #define _POSIX_SOURCE 1
3699 EOF
3700
3701   if test "$GCC" = yes; then
3702     CC="$CC -posix"
3703   else
3704     CC="$CC -Xp"
3705   fi
3706 else
3707   echo "$ac_t""no" 1>&6
3708   ISC=
3709 fi
3710
3711 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3712 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3713 echo "configure:3714: checking for minix/config.h" >&5
3714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3715   echo $ac_n "(cached) $ac_c" 1>&6
3716 else
3717   cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720 #include <minix/config.h>
3721 EOF
3722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3723 { (eval echo configure:3724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3725 if test -z "$ac_err"; then
3726   rm -rf conftest*
3727   eval "ac_cv_header_$ac_safe=yes"
3728 else
3729   echo "$ac_err" >&5
3730   echo "configure: failed program was:" >&5
3731   cat conftest.$ac_ext >&5
3732   rm -rf conftest*
3733   eval "ac_cv_header_$ac_safe=no"
3734 fi
3735 rm -f conftest*
3736 fi
3737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3738   echo "$ac_t""yes" 1>&6
3739   MINIX=yes
3740 else
3741   echo "$ac_t""no" 1>&6
3742 MINIX=
3743 fi
3744
3745 if test "$MINIX" = yes; then
3746   cat >> confdefs.h <<\EOF
3747 #define _POSIX_SOURCE 1
3748 EOF
3749
3750   cat >> confdefs.h <<\EOF
3751 #define _POSIX_1_SOURCE 2
3752 EOF
3753
3754   cat >> confdefs.h <<\EOF
3755 #define _MINIX 1
3756 EOF
3757
3758 fi
3759
3760
3761 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3762 echo "configure:3763: checking for Cygwin environment" >&5
3763 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3764   echo $ac_n "(cached) $ac_c" 1>&6
3765 else
3766   cat > conftest.$ac_ext <<EOF
3767 #line 3768 "configure"
3768 #include "confdefs.h"
3769
3770 int main() {
3771
3772 #ifndef __CYGWIN__
3773 #define __CYGWIN__ __CYGWIN32__
3774 #endif
3775 return __CYGWIN__;
3776 ; return 0; }
3777 EOF
3778 if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3779   rm -rf conftest*
3780   ac_cv_cygwin=yes
3781 else
3782   echo "configure: failed program was:" >&5
3783   cat conftest.$ac_ext >&5
3784   rm -rf conftest*
3785   ac_cv_cygwin=no
3786 fi
3787 rm -f conftest*
3788 fi
3789
3790 echo "$ac_t""$ac_cv_cygwin" 1>&6
3791 CYGWIN=
3792 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3793 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3794 echo "configure:3795: checking for mingw32 environment" >&5
3795 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801
3802 int main() {
3803 return __MINGW32__;
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3807   rm -rf conftest*
3808   ac_cv_mingw32=yes
3809 else
3810   echo "configure: failed program was:" >&5
3811   cat conftest.$ac_ext >&5
3812   rm -rf conftest*
3813   ac_cv_mingw32=no
3814 fi
3815 rm -f conftest*
3816 fi
3817
3818 echo "$ac_t""$ac_cv_mingw32" 1>&6
3819 MINGW32=
3820 test "$ac_cv_mingw32" = yes && MINGW32=yes
3821 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3822 echo "configure:3823: checking for EMX OS/2 environment" >&5
3823 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829
3830 int main() {
3831 return __EMX__;
3832 ; return 0; }
3833 EOF
3834 if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3835   rm -rf conftest*
3836   ac_cv_emxos2=yes
3837 else
3838   echo "configure: failed program was:" >&5
3839   cat conftest.$ac_ext >&5
3840   rm -rf conftest*
3841   ac_cv_emxos2=no
3842 fi
3843 rm -f conftest*
3844 fi
3845
3846 echo "$ac_t""$ac_cv_emxos2" 1>&6
3847 EMXOS2=
3848 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3849
3850
3851
3852 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3853 echo "configure:3854: checking for executable suffix" >&5
3854 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3855   echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3858   ac_cv_exeext=.exe
3859 else
3860   rm -f conftest*
3861   echo 'int main () { return 0; }' > conftest.$ac_ext
3862   ac_cv_exeext=
3863   if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3864     for file in conftest.*; do
3865       case $file in
3866       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3867       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3868       esac
3869     done
3870   else
3871     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3872   fi
3873   rm -f conftest*
3874   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3875 fi
3876 fi
3877
3878 EXEEXT=""
3879 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3880 echo "$ac_t""${ac_cv_exeext}" 1>&6
3881 ac_exeext=$EXEEXT
3882
3883 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3884 echo "configure:3885: checking for object suffix" >&5
3885 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3886   echo $ac_n "(cached) $ac_c" 1>&6
3887 else
3888   rm -f conftest*
3889 echo 'int i = 1;' > conftest.$ac_ext
3890 if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3891   for ac_file in conftest.*; do
3892     case $ac_file in
3893     *.c) ;;
3894     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3895     esac
3896   done
3897 else
3898   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3899 fi
3900 rm -f conftest*
3901 fi
3902
3903 echo "$ac_t""$ac_cv_objext" 1>&6
3904 OBJEXT=$ac_cv_objext
3905 ac_objext=$ac_cv_objext
3906
3907
3908 cat >> confdefs.h <<EOF
3909 #define EXEEXT "${EXEEXT}"
3910 EOF
3911
3912
3913 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3914 echo "configure:3915: checking for be_app in -lbe" >&5
3915 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3917   echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919   ac_save_LIBS="$LIBS"
3920 LIBS="-lbe -lroot -lnet $LIBS"
3921 cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 /* Override any gcc2 internal prototype to avoid an error.  */
3925 /* We use char because int might match the return type of a gcc2
3926     builtin and then its argument prototype would still apply.  */
3927 char be_app();
3928
3929 int main() {
3930 be_app()
3931 ; return 0; }
3932 EOF
3933 if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3934   rm -rf conftest*
3935   eval "ac_cv_lib_$ac_lib_var=yes"
3936 else
3937   echo "configure: failed program was:" >&5
3938   cat conftest.$ac_ext >&5
3939   rm -rf conftest*
3940   eval "ac_cv_lib_$ac_lib_var=no"
3941 fi
3942 rm -f conftest*
3943 LIBS="$ac_save_LIBS"
3944
3945 fi
3946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3947   echo "$ac_t""yes" 1>&6
3948   LIBS="$LIBS -lbe -lroot -lnet"
3949 else
3950   echo "$ac_t""no" 1>&6
3951 :
3952 fi
3953
3954
3955
3956
3957
3958 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3959 echo "configure:3960: checking for ${CC-cc} option to accept ANSI C" >&5
3960 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3961   echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963   am_cv_prog_cc_stdc=no
3964 ac_save_CC="$CC"
3965 # Don't try gcc -ansi; that turns off useful extensions and
3966 # breaks some systems' header files.
3967 # AIX                   -qlanglvl=ansi
3968 # Ultrix and OSF/1      -std1
3969 # HP-UX 10.20 and later -Ae
3970 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3971 # SVR4                  -Xc -D__EXTENSIONS__
3972 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3973 do
3974   CC="$ac_save_CC $ac_arg"
3975   cat > conftest.$ac_ext <<EOF
3976 #line 3977 "configure"
3977 #include "confdefs.h"
3978 #include <stdarg.h>
3979 #include <stdio.h>
3980 #include <sys/types.h>
3981 #include <sys/stat.h>
3982 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3983 struct buf { int x; };
3984 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3985 static char *e (p, i)
3986      char **p;
3987      int i;
3988 {
3989   return p[i];
3990 }
3991 static char *f (char * (*g) (char **, int), char **p, ...)
3992 {
3993   char *s;
3994   va_list v;
3995   va_start (v,p);
3996   s = g (p, va_arg (v,int));
3997   va_end (v);
3998   return s;
3999 }
4000 int test (int i, double x);
4001 struct s1 {int (*f) (int a);};
4002 struct s2 {int (*f) (double a);};
4003 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4004 int argc;
4005 char **argv;
4006
4007 int main() {
4008
4009 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4010
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014   rm -rf conftest*
4015   am_cv_prog_cc_stdc="$ac_arg"; break
4016 else
4017   echo "configure: failed program was:" >&5
4018   cat conftest.$ac_ext >&5
4019 fi
4020 rm -f conftest*
4021 done
4022 CC="$ac_save_CC"
4023
4024 fi
4025
4026 if test -z "$am_cv_prog_cc_stdc"; then
4027   echo "$ac_t""none needed" 1>&6
4028 else
4029   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4030 fi
4031 case "x$am_cv_prog_cc_stdc" in
4032   x|xno) ;;
4033   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4034 esac
4035
4036 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4037         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4038 fi
4039
4040 # test for make depend flag
4041 OL_MKDEP=
4042 OL_MKDEP_FLAGS=
4043 if test -z "${MKDEP}"; then
4044         OL_MKDEP="${CC-cc}"
4045         if test -z "${MKDEP_FLAGS}"; then
4046                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4047 echo "configure:4048: checking for ${OL_MKDEP} depend flag" >&5
4048 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   
4052                         ol_cv_mkdep=no
4053                         for flag in "-M" "-xM"; do
4054                                 cat > conftest.c <<EOF
4055  noCode;
4056 EOF
4057                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4058                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4059                                 then
4060                                         if test ! -f conftest."${ac_object}" ; then
4061                                                 ol_cv_mkdep=$flag
4062                                                 OL_MKDEP_FLAGS="$flag"
4063                                                 break
4064                                         fi
4065                                 fi
4066                         done
4067                         rm -f conftest*
4068                 
4069 fi
4070
4071 echo "$ac_t""$ol_cv_mkdep" 1>&6
4072         else
4073                 cc_cv_mkdep=yes
4074                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4075         fi
4076 else
4077         cc_cv_mkdep=yes
4078         OL_MKDEP="${MKDEP}"
4079         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4080 fi
4081
4082
4083
4084 if test "${ol_cv_mkdep}" = no ; then
4085         # this will soon become an error
4086         echo "configure: warning: do not know how to generate dependencies" 1>&2
4087 fi
4088
4089 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
4090 echo "configure:4091: checking for afopen in -ls" >&5
4091 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
4092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4093   echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095   ac_save_LIBS="$LIBS"
4096 LIBS="-ls  $LIBS"
4097 cat > conftest.$ac_ext <<EOF
4098 #line 4099 "configure"
4099 #include "confdefs.h"
4100 /* Override any gcc2 internal prototype to avoid an error.  */
4101 /* We use char because int might match the return type of a gcc2
4102     builtin and then its argument prototype would still apply.  */
4103 char afopen();
4104
4105 int main() {
4106 afopen()
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4110   rm -rf conftest*
4111   eval "ac_cv_lib_$ac_lib_var=yes"
4112 else
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115   rm -rf conftest*
4116   eval "ac_cv_lib_$ac_lib_var=no"
4117 fi
4118 rm -f conftest*
4119 LIBS="$ac_save_LIBS"
4120
4121 fi
4122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4123   echo "$ac_t""yes" 1>&6
4124   
4125         AUTH_LIBS=-ls
4126         cat >> confdefs.h <<\EOF
4127 #define HAVE_AIX_SECURITY 1
4128 EOF
4129
4130
4131 else
4132   echo "$ac_t""no" 1>&6
4133 fi
4134
4135
4136 ol_link_modules=no
4137 if test $ol_enable_modules != no ; then
4138         for ac_hdr in ltdl.h
4139 do
4140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4141 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4142 echo "configure:4143: checking for $ac_hdr" >&5
4143 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4144   echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146   cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 #include <$ac_hdr>
4150 EOF
4151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4152 { (eval echo configure:4153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4154 if test -z "$ac_err"; then
4155   rm -rf conftest*
4156   eval "ac_cv_header_$ac_safe=yes"
4157 else
4158   echo "$ac_err" >&5
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161   rm -rf conftest*
4162   eval "ac_cv_header_$ac_safe=no"
4163 fi
4164 rm -f conftest*
4165 fi
4166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4167   echo "$ac_t""yes" 1>&6
4168     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4169   cat >> confdefs.h <<EOF
4170 #define $ac_tr_hdr 1
4171 EOF
4172  
4173 else
4174   echo "$ac_t""no" 1>&6
4175 fi
4176 done
4177
4178
4179         if test $ac_cv_header_ltdl_h = no ; then
4180                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4181         fi
4182
4183         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4184 echo "configure:4185: checking for lt_dlinit in -lltdl" >&5
4185 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4187   echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189   ac_save_LIBS="$LIBS"
4190 LIBS="-lltdl  $LIBS"
4191 cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4194 /* Override any gcc2 internal prototype to avoid an error.  */
4195 /* We use char because int might match the return type of a gcc2
4196     builtin and then its argument prototype would still apply.  */
4197 char lt_dlinit();
4198
4199 int main() {
4200 lt_dlinit()
4201 ; return 0; }
4202 EOF
4203 if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4204   rm -rf conftest*
4205   eval "ac_cv_lib_$ac_lib_var=yes"
4206 else
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_lib_$ac_lib_var=no"
4211 fi
4212 rm -f conftest*
4213 LIBS="$ac_save_LIBS"
4214
4215 fi
4216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4217   echo "$ac_t""yes" 1>&6
4218   
4219             MODULES_LIBS=-lltdl
4220             cat >> confdefs.h <<\EOF
4221 #define HAVE_LIBLTDL 1
4222 EOF
4223
4224         
4225 else
4226   echo "$ac_t""no" 1>&6
4227 fi
4228
4229
4230         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4231                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4232         fi
4233         ol_link_modules=yes
4234 else
4235         ol_with_dnssrv_module=static
4236         ol_with_ldap_module=static
4237         ol_with_ldbm_module=static
4238         ol_with_passwd_module=static
4239         ol_with_perl_module=static
4240         ol_with_shell_module=static
4241         ol_with_tcl_module=static
4242         ol_with_sql_module=static
4243 fi
4244
4245 # test for EBCDIC
4246 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4247 echo "configure:4248: checking for EBCDIC" >&5
4248 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   
4252         cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255
4256 #if !('M' == 0xd4)
4257 #include <__ASCII__/generate_error.h>
4258 #endif
4259
4260 EOF
4261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4262 { (eval echo configure:4263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4264 if test -z "$ac_err"; then
4265   rm -rf conftest*
4266   ol_cv_cpp_ebcdic=yes
4267 else
4268   echo "$ac_err" >&5
4269   echo "configure: failed program was:" >&5
4270   cat conftest.$ac_ext >&5
4271   rm -rf conftest*
4272   ol_cv_cpp_ebcdic=no
4273 fi
4274 rm -f conftest*
4275 fi
4276
4277 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4278 if test $ol_cv_cpp_ebcdic = yes ; then
4279         cat >> confdefs.h <<\EOF
4280 #define HAVE_EBCDIC 1
4281 EOF
4282
4283 fi
4284
4285 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4286 echo "configure:4287: checking for ANSI C header files" >&5
4287 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 #include <stdlib.h>
4294 #include <stdarg.h>
4295 #include <string.h>
4296 #include <float.h>
4297 EOF
4298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4299 { (eval echo configure:4300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4301 if test -z "$ac_err"; then
4302   rm -rf conftest*
4303   ol_cv_header_stdc=yes
4304 else
4305   echo "$ac_err" >&5
4306   echo "configure: failed program was:" >&5
4307   cat conftest.$ac_ext >&5
4308   rm -rf conftest*
4309   ol_cv_header_stdc=no
4310 fi
4311 rm -f conftest*
4312
4313 if test $ol_cv_header_stdc = yes; then
4314   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4315 cat > conftest.$ac_ext <<EOF
4316 #line 4317 "configure"
4317 #include "confdefs.h"
4318 #include <string.h>
4319 EOF
4320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4321   egrep "memchr" >/dev/null 2>&1; then
4322   :
4323 else
4324   rm -rf conftest*
4325   ol_cv_header_stdc=no
4326 fi
4327 rm -f conftest*
4328
4329 fi
4330
4331 if test $ol_cv_header_stdc = yes; then
4332   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4333 cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 #include <stdlib.h>
4337 EOF
4338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4339   egrep "free" >/dev/null 2>&1; then
4340   :
4341 else
4342   rm -rf conftest*
4343   ol_cv_header_stdc=no
4344 fi
4345 rm -f conftest*
4346
4347 fi
4348
4349 if test $ol_cv_header_stdc = yes; then
4350   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4351 if test "$cross_compiling" = yes; then
4352   :
4353 else
4354   cat > conftest.$ac_ext <<EOF
4355 #line 4356 "configure"
4356 #include "confdefs.h"
4357 #include <ctype.h>
4358 #ifndef HAVE_EBCDIC
4359 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4360 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4361 #else
4362 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4363                 || ('j' <= (c) && (c) <= 'r') \
4364                 || ('s' <= (c) && (c) <= 'z'))
4365 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4366 #endif
4367 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4368 int main () { int i; for (i = 0; i < 256; i++)
4369 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4370 exit (0); }
4371
4372 EOF
4373 if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4374 then
4375   :
4376 else
4377   echo "configure: failed program was:" >&5
4378   cat conftest.$ac_ext >&5
4379   rm -fr conftest*
4380   ol_cv_header_stdc=no
4381 fi
4382 rm -fr conftest*
4383 fi
4384
4385 fi
4386 fi
4387
4388 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4389 if test $ol_cv_header_stdc = yes; then
4390   cat >> confdefs.h <<\EOF
4391 #define STDC_HEADERS 1
4392 EOF
4393
4394 fi
4395 ac_cv_header_stdc=disable
4396
4397
4398 if test $ol_cv_header_stdc != yes; then
4399         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4400 fi
4401
4402 ac_header_dirent=no
4403 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4404 do
4405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4406 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4407 echo "configure:4408: checking for $ac_hdr that defines DIR" >&5
4408 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414 #include <sys/types.h>
4415 #include <$ac_hdr>
4416 int main() {
4417 DIR *dirp = 0;
4418 ; return 0; }
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4421   rm -rf conftest*
4422   eval "ac_cv_header_dirent_$ac_safe=yes"
4423 else
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -rf conftest*
4427   eval "ac_cv_header_dirent_$ac_safe=no"
4428 fi
4429 rm -f conftest*
4430 fi
4431 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4432   echo "$ac_t""yes" 1>&6
4433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4434   cat >> confdefs.h <<EOF
4435 #define $ac_tr_hdr 1
4436 EOF
4437  ac_header_dirent=$ac_hdr; break
4438 else
4439   echo "$ac_t""no" 1>&6
4440 fi
4441 done
4442 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4443 if test $ac_header_dirent = dirent.h; then
4444 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4445 echo "configure:4446: checking for opendir in -ldir" >&5
4446 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4447 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4448   echo $ac_n "(cached) $ac_c" 1>&6
4449 else
4450   ac_save_LIBS="$LIBS"
4451 LIBS="-ldir  $LIBS"
4452 cat > conftest.$ac_ext <<EOF
4453 #line 4454 "configure"
4454 #include "confdefs.h"
4455 /* Override any gcc2 internal prototype to avoid an error.  */
4456 /* We use char because int might match the return type of a gcc2
4457     builtin and then its argument prototype would still apply.  */
4458 char opendir();
4459
4460 int main() {
4461 opendir()
4462 ; return 0; }
4463 EOF
4464 if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4465   rm -rf conftest*
4466   eval "ac_cv_lib_$ac_lib_var=yes"
4467 else
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470   rm -rf conftest*
4471   eval "ac_cv_lib_$ac_lib_var=no"
4472 fi
4473 rm -f conftest*
4474 LIBS="$ac_save_LIBS"
4475
4476 fi
4477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4478   echo "$ac_t""yes" 1>&6
4479   LIBS="$LIBS -ldir"
4480 else
4481   echo "$ac_t""no" 1>&6
4482 fi
4483
4484 else
4485 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4486 echo "configure:4487: checking for opendir in -lx" >&5
4487 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   ac_save_LIBS="$LIBS"
4492 LIBS="-lx  $LIBS"
4493 cat > conftest.$ac_ext <<EOF
4494 #line 4495 "configure"
4495 #include "confdefs.h"
4496 /* Override any gcc2 internal prototype to avoid an error.  */
4497 /* We use char because int might match the return type of a gcc2
4498     builtin and then its argument prototype would still apply.  */
4499 char opendir();
4500
4501 int main() {
4502 opendir()
4503 ; return 0; }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4506   rm -rf conftest*
4507   eval "ac_cv_lib_$ac_lib_var=yes"
4508 else
4509   echo "configure: failed program was:" >&5
4510   cat conftest.$ac_ext >&5
4511   rm -rf conftest*
4512   eval "ac_cv_lib_$ac_lib_var=no"
4513 fi
4514 rm -f conftest*
4515 LIBS="$ac_save_LIBS"
4516
4517 fi
4518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4519   echo "$ac_t""yes" 1>&6
4520   LIBS="$LIBS -lx"
4521 else
4522   echo "$ac_t""no" 1>&6
4523 fi
4524
4525 fi
4526
4527 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4528 echo "configure:4529: checking for sys/wait.h that is POSIX.1 compatible" >&5
4529 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   cat > conftest.$ac_ext <<EOF
4533 #line 4534 "configure"
4534 #include "confdefs.h"
4535 #include <sys/types.h>
4536 #include <sys/wait.h>
4537 #ifndef WEXITSTATUS
4538 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4539 #endif
4540 #ifndef WIFEXITED
4541 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4542 #endif
4543 int main() {
4544 int s;
4545 wait (&s);
4546 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4547 ; return 0; }
4548 EOF
4549 if { (eval echo configure:4550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4550   rm -rf conftest*
4551   ac_cv_header_sys_wait_h=yes
4552 else
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -rf conftest*
4556   ac_cv_header_sys_wait_h=no
4557 fi
4558 rm -f conftest*
4559 fi
4560
4561 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4562 if test $ac_cv_header_sys_wait_h = yes; then
4563   cat >> confdefs.h <<\EOF
4564 #define HAVE_SYS_WAIT_H 1
4565 EOF
4566
4567 fi
4568
4569 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4570 echo "configure:4571: checking POSIX termios" >&5
4571 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4572   echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574   cat > conftest.$ac_ext <<EOF
4575 #line 4576 "configure"
4576 #include "confdefs.h"
4577 #include <sys/types.h>
4578 #include <unistd.h>
4579 #include <termios.h>
4580 int main() {
4581 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4582    tcgetattr(0, 0);
4583 ; return 0; }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4586   rm -rf conftest*
4587   am_cv_sys_posix_termios=yes
4588 else
4589   echo "configure: failed program was:" >&5
4590   cat conftest.$ac_ext >&5
4591   rm -rf conftest*
4592   am_cv_sys_posix_termios=no
4593 fi
4594 rm -f conftest*
4595 fi
4596
4597 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4598
4599
4600  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4601 echo "configure:4602: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4602 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4606
4607   gwinsz_in_termios_h=no
4608   if test $am_cv_sys_posix_termios = yes; then
4609     cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 #include <sys/types.h>
4613 #     include <termios.h>
4614 #     ifdef TIOCGWINSZ
4615         yes
4616 #     endif
4617     
4618 EOF
4619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4620   egrep "yes" >/dev/null 2>&1; then
4621   rm -rf conftest*
4622   gwinsz_in_termios_h=yes
4623 fi
4624 rm -f conftest*
4625
4626   fi
4627
4628   if test $gwinsz_in_termios_h = no; then
4629     cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 #include <sys/types.h>
4633 #     include <sys/ioctl.h>
4634 #     ifdef TIOCGWINSZ
4635         yes
4636 #     endif
4637     
4638 EOF
4639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4640   egrep "yes" >/dev/null 2>&1; then
4641   rm -rf conftest*
4642   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4643 fi
4644 rm -f conftest*
4645
4646   fi
4647   
4648 fi
4649
4650 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4651   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4652     cat >> confdefs.h <<\EOF
4653 #define GWINSZ_IN_SYS_IOCTL 1
4654 EOF
4655
4656   fi
4657
4658 if test $am_cv_sys_posix_termios = yes ; then
4659         cat >> confdefs.h <<\EOF
4660 #define HAVE_POSIX_TERMIOS 1
4661 EOF
4662
4663 fi
4664
4665 for ac_hdr in \
4666         arpa/inet.h             \
4667         arpa/nameser.h  \
4668         assert.h                \
4669         conio.h                 \
4670         crypt.h                 \
4671         direct.h                \
4672         errno.h                 \
4673         fcntl.h                 \
4674         filio.h                 \
4675         getopt.h                \
4676         grp.h                   \
4677         io.h                    \
4678         libutil.h               \
4679         limits.h                \
4680         locale.h                \
4681         netinet/tcp.h   \
4682         malloc.h                \
4683         memory.h                \
4684         psap.h                  \
4685         pwd.h                   \
4686         process.h               \
4687         resolv.h                \
4688         sgtty.h                 \
4689         shadow.h                \
4690         stddef.h                \
4691         string.h                \
4692         strings.h               \
4693         sysexits.h              \
4694         sys/file.h              \
4695         sys/filio.h             \
4696         sys/errno.h             \
4697         sys/ioctl.h             \
4698         sys/param.h             \
4699         sys/resource.h  \
4700         sys/select.h    \
4701         sys/socket.h    \
4702         sys/syslog.h    \
4703         sys/time.h              \
4704         sys/types.h             \
4705         syslog.h                \
4706         termios.h               \
4707         unistd.h                \
4708         winsock.h               \
4709
4710 do
4711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4713 echo "configure:4714: checking for $ac_hdr" >&5
4714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <$ac_hdr>
4721 EOF
4722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4723 { (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4725 if test -z "$ac_err"; then
4726   rm -rf conftest*
4727   eval "ac_cv_header_$ac_safe=yes"
4728 else
4729   echo "$ac_err" >&5
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   eval "ac_cv_header_$ac_safe=no"
4734 fi
4735 rm -f conftest*
4736 fi
4737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4738   echo "$ac_t""yes" 1>&6
4739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4740   cat >> confdefs.h <<EOF
4741 #define $ac_tr_hdr 1
4742 EOF
4743  
4744 else
4745   echo "$ac_t""no" 1>&6
4746 fi
4747 done
4748
4749
4750
4751
4752 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4753 echo "configure:4754: checking for sigset in -lV3" >&5
4754 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4755 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   ac_save_LIBS="$LIBS"
4759 LIBS="-lV3  $LIBS"
4760 cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4763 /* Override any gcc2 internal prototype to avoid an error.  */
4764 /* We use char because int might match the return type of a gcc2
4765     builtin and then its argument prototype would still apply.  */
4766 char sigset();
4767
4768 int main() {
4769 sigset()
4770 ; return 0; }
4771 EOF
4772 if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773   rm -rf conftest*
4774   eval "ac_cv_lib_$ac_lib_var=yes"
4775 else
4776   echo "configure: failed program was:" >&5
4777   cat conftest.$ac_ext >&5
4778   rm -rf conftest*
4779   eval "ac_cv_lib_$ac_lib_var=no"
4780 fi
4781 rm -f conftest*
4782 LIBS="$ac_save_LIBS"
4783
4784 fi
4785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4786   echo "$ac_t""yes" 1>&6
4787     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4788     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4789   cat >> confdefs.h <<EOF
4790 #define $ac_tr_lib 1
4791 EOF
4792
4793   LIBS="-lV3 $LIBS"
4794
4795 else
4796   echo "$ac_t""no" 1>&6
4797 fi
4798
4799
4800 if test $ac_cv_header_winsock_h = yes; then
4801         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4802 echo "configure:4803: checking for winsock" >&5
4803 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809 #include <winsock.h>
4810 int main() {
4811
4812                         socket(0,0,0);
4813                         select(0,NULL,NULL,NULL,NULL);
4814                         closesocket(0);
4815                         gethostname(NULL,0);
4816         
4817 ; return 0; }
4818 EOF
4819 if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820   rm -rf conftest*
4821   ol_cv_winsock=yes
4822 else
4823   echo "configure: failed program was:" >&5
4824   cat conftest.$ac_ext >&5
4825   rm -rf conftest*
4826   ol_cv_winsock=no
4827 fi
4828 rm -f conftest*]
4829 fi
4830
4831 echo "$ac_t""$ol_cv_winsock" 1>&6
4832
4833         if test $ol_cv_winsock = yes ; then
4834                 cat >> confdefs.h <<\EOF
4835 #define HAVE_WINSOCK 1
4836 EOF
4837
4838                 ac_cv_func_socket=yes
4839                 ac_cv_func_select=yes
4840                 ac_cv_func_closesocket=yes
4841                 ac_cv_func_gethostname=yes
4842         fi
4843 fi
4844
4845
4846 echo $ac_n "checking for socket""... $ac_c" 1>&6
4847 echo "configure:4848: checking for socket" >&5
4848 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851   cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 /* System header to define __stub macros and hopefully few prototypes,
4855     which can conflict with char socket(); below.  */
4856 #include <assert.h>
4857 /* Override any gcc2 internal prototype to avoid an error.  */
4858 /* We use char because int might match the return type of a gcc2
4859     builtin and then its argument prototype would still apply.  */
4860 char socket();
4861 char (*f)();
4862
4863 int main() {
4864
4865 /* The GNU C library defines this for functions which it implements
4866     to always fail with ENOSYS.  Some functions are actually named
4867     something starting with __ and the normal name is an alias.  */
4868 #if defined (__stub_socket) || defined (__stub___socket)
4869 choke me
4870 #else
4871 f = socket;
4872 #endif
4873
4874 ; return 0; }
4875 EOF
4876 if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4877   rm -rf conftest*
4878   eval "ac_cv_func_socket=yes"
4879 else
4880   echo "configure: failed program was:" >&5
4881   cat conftest.$ac_ext >&5
4882   rm -rf conftest*
4883   eval "ac_cv_func_socket=no"
4884 fi
4885 rm -f conftest*
4886 fi
4887
4888 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4889   echo "$ac_t""yes" 1>&6
4890   :
4891 else
4892   echo "$ac_t""no" 1>&6
4893         
4894         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4895 echo "configure:4896: checking for main in -lsocket" >&5
4896 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4898   echo $ac_n "(cached) $ac_c" 1>&6
4899 else
4900   ac_save_LIBS="$LIBS"
4901 LIBS="-lsocket  $LIBS"
4902 cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905
4906 int main() {
4907 main()
4908 ; return 0; }
4909 EOF
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4911   rm -rf conftest*
4912   eval "ac_cv_lib_$ac_lib_var=yes"
4913 else
4914   echo "configure: failed program was:" >&5
4915   cat conftest.$ac_ext >&5
4916   rm -rf conftest*
4917   eval "ac_cv_lib_$ac_lib_var=no"
4918 fi
4919 rm -f conftest*
4920 LIBS="$ac_save_LIBS"
4921
4922 fi
4923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4926     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4927   cat >> confdefs.h <<EOF
4928 #define $ac_tr_lib 1
4929 EOF
4930
4931   LIBS="-lsocket $LIBS"
4932
4933 else
4934   echo "$ac_t""no" 1>&6
4935 fi
4936
4937         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4938 echo "configure:4939: checking for main in -lnet" >&5
4939 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   ac_save_LIBS="$LIBS"
4944 LIBS="-lnet  $LIBS"
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4948
4949 int main() {
4950 main()
4951 ; return 0; }
4952 EOF
4953 if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4954   rm -rf conftest*
4955   eval "ac_cv_lib_$ac_lib_var=yes"
4956 else
4957   echo "configure: failed program was:" >&5
4958   cat conftest.$ac_ext >&5
4959   rm -rf conftest*
4960   eval "ac_cv_lib_$ac_lib_var=no"
4961 fi
4962 rm -f conftest*
4963 LIBS="$ac_save_LIBS"
4964
4965 fi
4966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4969     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4970   cat >> confdefs.h <<EOF
4971 #define $ac_tr_lib 1
4972 EOF
4973
4974   LIBS="-lnet $LIBS"
4975
4976 else
4977   echo "$ac_t""no" 1>&6
4978 fi
4979
4980         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4981 echo "configure:4982: checking for main in -lnsl_s" >&5
4982 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4984   echo $ac_n "(cached) $ac_c" 1>&6
4985 else
4986   ac_save_LIBS="$LIBS"
4987 LIBS="-lnsl_s  $LIBS"
4988 cat > conftest.$ac_ext <<EOF
4989 #line 4990 "configure"
4990 #include "confdefs.h"
4991
4992 int main() {
4993 main()
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=yes"
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=no"
5004 fi
5005 rm -f conftest*
5006 LIBS="$ac_save_LIBS"
5007
5008 fi
5009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5010   echo "$ac_t""yes" 1>&6
5011     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5013   cat >> confdefs.h <<EOF
5014 #define $ac_tr_lib 1
5015 EOF
5016
5017   LIBS="-lnsl_s $LIBS"
5018
5019 else
5020   echo "$ac_t""no" 1>&6
5021 fi
5022
5023         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5024 echo "configure:5025: checking for main in -lnsl" >&5
5025 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5027   echo $ac_n "(cached) $ac_c" 1>&6
5028 else
5029   ac_save_LIBS="$LIBS"
5030 LIBS="-lnsl  $LIBS"
5031 cat > conftest.$ac_ext <<EOF
5032 #line 5033 "configure"
5033 #include "confdefs.h"
5034
5035 int main() {
5036 main()
5037 ; return 0; }
5038 EOF
5039 if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=yes"
5042 else
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   eval "ac_cv_lib_$ac_lib_var=no"
5047 fi
5048 rm -f conftest*
5049 LIBS="$ac_save_LIBS"
5050
5051 fi
5052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5053   echo "$ac_t""yes" 1>&6
5054     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5055     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5056   cat >> confdefs.h <<EOF
5057 #define $ac_tr_lib 1
5058 EOF
5059
5060   LIBS="-lnsl $LIBS"
5061
5062 else
5063   echo "$ac_t""no" 1>&6
5064 fi
5065
5066         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5067 echo "configure:5068: checking for socket in -linet" >&5
5068 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072   ac_save_LIBS="$LIBS"
5073 LIBS="-linet  $LIBS"
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077 /* Override any gcc2 internal prototype to avoid an error.  */
5078 /* We use char because int might match the return type of a gcc2
5079     builtin and then its argument prototype would still apply.  */
5080 char socket();
5081
5082 int main() {
5083 socket()
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087   rm -rf conftest*
5088   eval "ac_cv_lib_$ac_lib_var=yes"
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -rf conftest*
5093   eval "ac_cv_lib_$ac_lib_var=no"
5094 fi
5095 rm -f conftest*
5096 LIBS="$ac_save_LIBS"
5097
5098 fi
5099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5100   echo "$ac_t""yes" 1>&6
5101     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5102     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5103   cat >> confdefs.h <<EOF
5104 #define $ac_tr_lib 1
5105 EOF
5106
5107   LIBS="-linet $LIBS"
5108
5109 else
5110   echo "$ac_t""no" 1>&6
5111 fi
5112
5113         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5114 echo "configure:5115: checking for main in -lgen" >&5
5115 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119   ac_save_LIBS="$LIBS"
5120 LIBS="-lgen  $LIBS"
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124
5125 int main() {
5126 main()
5127 ; return 0; }
5128 EOF
5129 if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5130   rm -rf conftest*
5131   eval "ac_cv_lib_$ac_lib_var=yes"
5132 else
5133   echo "configure: failed program was:" >&5
5134   cat conftest.$ac_ext >&5
5135   rm -rf conftest*
5136   eval "ac_cv_lib_$ac_lib_var=no"
5137 fi
5138 rm -f conftest*
5139 LIBS="$ac_save_LIBS"
5140
5141 fi
5142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5143   echo "$ac_t""yes" 1>&6
5144     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5145     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5146   cat >> confdefs.h <<EOF
5147 #define $ac_tr_lib 1
5148 EOF
5149
5150   LIBS="-lgen $LIBS"
5151
5152 else
5153   echo "$ac_t""no" 1>&6
5154 fi
5155
5156
5157 fi
5158
5159
5160 echo $ac_n "checking for select""... $ac_c" 1>&6
5161 echo "configure:5162: checking for select" >&5
5162 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165   cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168 /* System header to define __stub macros and hopefully few prototypes,
5169     which can conflict with char select(); below.  */
5170 #include <assert.h>
5171 /* Override any gcc2 internal prototype to avoid an error.  */
5172 /* We use char because int might match the return type of a gcc2
5173     builtin and then its argument prototype would still apply.  */
5174 char select();
5175 char (*f)();
5176
5177 int main() {
5178
5179 /* The GNU C library defines this for functions which it implements
5180     to always fail with ENOSYS.  Some functions are actually named
5181     something starting with __ and the normal name is an alias.  */
5182 #if defined (__stub_select) || defined (__stub___select)
5183 choke me
5184 #else
5185 f = select;
5186 #endif
5187
5188 ; return 0; }
5189 EOF
5190 if { (eval echo configure:5191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5191   rm -rf conftest*
5192   eval "ac_cv_func_select=yes"
5193 else
5194   echo "configure: failed program was:" >&5
5195   cat conftest.$ac_ext >&5
5196   rm -rf conftest*
5197   eval "ac_cv_func_select=no"
5198 fi
5199 rm -f conftest*
5200 fi
5201
5202 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5203   echo "$ac_t""yes" 1>&6
5204   :
5205 else
5206   echo "$ac_t""no" 1>&6
5207 { echo "configure: error: select() required." 1>&2; exit 1; }
5208 fi
5209
5210
5211 if test "${ac_cv_header_winsock_h}" != yes; then
5212                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5213 echo "configure:5214: checking types of arguments for select()" >&5
5214  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5215   echo $ac_n "(cached) $ac_c" 1>&6
5216 else
5217    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5218   echo $ac_n "(cached) $ac_c" 1>&6
5219 else
5220     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5224      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5225       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5226        cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229 #ifdef HAVE_SYS_TYPES_H
5230 #include <sys/types.h>
5231 #endif
5232 #ifdef HAVE_SYS_TIME_H
5233 #include <sys/time.h>
5234 #endif
5235 #ifdef HAVE_SYS_SELECT_H
5236 #include <sys/select.h>
5237 #endif
5238 #ifdef HAVE_SYS_SOCKET_H
5239 #include <sys/socket.h>
5240 #endif
5241 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);
5242 int main() {
5243
5244 ; return 0; }
5245 EOF
5246 if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5247   rm -rf conftest*
5248           ac_not_found=no ; break 3
5249 else
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   ac_not_found=yes
5254 fi
5255 rm -f conftest*
5256       done
5257      done
5258     done
5259    
5260 fi
5261   
5262 fi
5263  
5264 fi
5265  if test "$ac_not_found" = yes; then
5266   ac_cv_func_select_arg1=int 
5267   ac_cv_func_select_arg234='int *' 
5268   ac_cv_func_select_arg5='struct timeval *'
5269  fi
5270  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5271  cat >> confdefs.h <<EOF
5272 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5273 EOF
5274
5275  cat >> confdefs.h <<EOF
5276 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5277 EOF
5278
5279  cat >> confdefs.h <<EOF
5280 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5281 EOF
5282
5283
5284 fi
5285
5286
5287 for ac_hdr in regex.h 
5288 do
5289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5291 echo "configure:5292: checking for $ac_hdr" >&5
5292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5293   echo $ac_n "(cached) $ac_c" 1>&6
5294 else
5295   cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298 #include <$ac_hdr>
5299 EOF
5300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5301 { (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5303 if test -z "$ac_err"; then
5304   rm -rf conftest*
5305   eval "ac_cv_header_$ac_safe=yes"
5306 else
5307   echo "$ac_err" >&5
5308   echo "configure: failed program was:" >&5
5309   cat conftest.$ac_ext >&5
5310   rm -rf conftest*
5311   eval "ac_cv_header_$ac_safe=no"
5312 fi
5313 rm -f conftest*
5314 fi
5315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5316   echo "$ac_t""yes" 1>&6
5317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5318   cat >> confdefs.h <<EOF
5319 #define $ac_tr_hdr 1
5320 EOF
5321  
5322 else
5323   echo "$ac_t""no" 1>&6
5324 fi
5325 done
5326
5327 if test "$ac_cv_header_regex_h" != yes ; then
5328         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5329 fi
5330 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5331 echo "configure:5332: checking for regfree" >&5
5332 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5333   echo $ac_n "(cached) $ac_c" 1>&6
5334 else
5335   cat > conftest.$ac_ext <<EOF
5336 #line 5337 "configure"
5337 #include "confdefs.h"
5338 /* System header to define __stub macros and hopefully few prototypes,
5339     which can conflict with char regfree(); below.  */
5340 #include <assert.h>
5341 /* Override any gcc2 internal prototype to avoid an error.  */
5342 /* We use char because int might match the return type of a gcc2
5343     builtin and then its argument prototype would still apply.  */
5344 char regfree();
5345 char (*f)();
5346
5347 int main() {
5348
5349 /* The GNU C library defines this for functions which it implements
5350     to always fail with ENOSYS.  Some functions are actually named
5351     something starting with __ and the normal name is an alias.  */
5352 #if defined (__stub_regfree) || defined (__stub___regfree)
5353 choke me
5354 #else
5355 f = regfree;
5356 #endif
5357
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5361   rm -rf conftest*
5362   eval "ac_cv_func_regfree=yes"
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_func_regfree=no"
5368 fi
5369 rm -f conftest*
5370 fi
5371
5372 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5373   echo "$ac_t""yes" 1>&6
5374   :
5375 else
5376   echo "$ac_t""no" 1>&6
5377 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5378 fi
5379
5380
5381
5382 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5383 echo "configure:5384: checking for compatible POSIX regex" >&5
5384 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5385   echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387   
5388         if test "$cross_compiling" = yes; then
5389   ol_cv_c_posix_regex=cross
5390 else
5391   cat > conftest.$ac_ext <<EOF
5392 #line 5393 "configure"
5393 #include "confdefs.h"
5394
5395 #include <sys/types.h>
5396 #include <regex.h>
5397 static char *pattern, *string;
5398 main()
5399 {
5400         int rc;
5401         regex_t re;
5402
5403         pattern = "^A";
5404
5405         if(regcomp(&re, pattern, 0)) {
5406                 return -1;
5407         }
5408         
5409         string = "ALL MATCH";
5410         
5411         rc = regexec(&re, string, 0, (void*)0, 0);
5412
5413         regfree(&re);
5414
5415         return rc;
5416 }
5417 EOF
5418 if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5419 then
5420   ol_cv_c_posix_regex=yes
5421 else
5422   echo "configure: failed program was:" >&5
5423   cat conftest.$ac_ext >&5
5424   rm -fr conftest*
5425   ol_cv_c_posix_regex=no
5426 fi
5427 rm -fr conftest*
5428 fi
5429
5430 fi
5431
5432 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5433
5434 if test "$ol_cv_c_posix_regex" = no ; then
5435         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5436 fi
5437
5438 ol_link_dnssrv=no
5439 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5440 echo "configure:5441: checking for res_query" >&5
5441 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
5442   echo $ac_n "(cached) $ac_c" 1>&6
5443 else
5444   cat > conftest.$ac_ext <<EOF
5445 #line 5446 "configure"
5446 #include "confdefs.h"
5447 /* System header to define __stub macros and hopefully few prototypes,
5448     which can conflict with char res_query(); below.  */
5449 #include <assert.h>
5450 /* Override any gcc2 internal prototype to avoid an error.  */
5451 /* We use char because int might match the return type of a gcc2
5452     builtin and then its argument prototype would still apply.  */
5453 char res_query();
5454 char (*f)();
5455
5456 int main() {
5457
5458 /* The GNU C library defines this for functions which it implements
5459     to always fail with ENOSYS.  Some functions are actually named
5460     something starting with __ and the normal name is an alias.  */
5461 #if defined (__stub_res_query) || defined (__stub___res_query)
5462 choke me
5463 #else
5464 f = res_query;
5465 #endif
5466
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5470   rm -rf conftest*
5471   eval "ac_cv_func_res_query=yes"
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   eval "ac_cv_func_res_query=no"
5477 fi
5478 rm -f conftest*
5479 fi
5480
5481 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5482   echo "$ac_t""yes" 1>&6
5483   :
5484 else
5485   echo "$ac_t""no" 1>&6
5486 fi
5487
5488 if test $ac_cv_func_res_query = no ; then 
5489         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5490 echo "configure:5491: checking for res_query in -lbind" >&5
5491 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
5492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5493   echo $ac_n "(cached) $ac_c" 1>&6
5494 else
5495   ac_save_LIBS="$LIBS"
5496 LIBS="-lbind  $LIBS"
5497 cat > conftest.$ac_ext <<EOF
5498 #line 5499 "configure"
5499 #include "confdefs.h"
5500 /* Override any gcc2 internal prototype to avoid an error.  */
5501 /* We use char because int might match the return type of a gcc2
5502     builtin and then its argument prototype would still apply.  */
5503 char res_query();
5504
5505 int main() {
5506 res_query()
5507 ; return 0; }
5508 EOF
5509 if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5510   rm -rf conftest*
5511   eval "ac_cv_lib_$ac_lib_var=yes"
5512 else
5513   echo "configure: failed program was:" >&5
5514   cat conftest.$ac_ext >&5
5515   rm -rf conftest*
5516   eval "ac_cv_lib_$ac_lib_var=no"
5517 fi
5518 rm -f conftest*
5519 LIBS="$ac_save_LIBS"
5520
5521 fi
5522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5523   echo "$ac_t""yes" 1>&6
5524     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5525     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5526   cat >> confdefs.h <<EOF
5527 #define $ac_tr_lib 1
5528 EOF
5529
5530   LIBS="-lbind $LIBS"
5531
5532 else
5533   echo "$ac_t""no" 1>&6
5534 fi
5535
5536         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5537 fi
5538
5539 if test $ac_cv_func_res_query = no ; then 
5540         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5541 echo "configure:5542: checking for __res_query in -lbind" >&5
5542 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
5543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5544   echo $ac_n "(cached) $ac_c" 1>&6
5545 else
5546   ac_save_LIBS="$LIBS"
5547 LIBS="-lbind  $LIBS"
5548 cat > conftest.$ac_ext <<EOF
5549 #line 5550 "configure"
5550 #include "confdefs.h"
5551 /* Override any gcc2 internal prototype to avoid an error.  */
5552 /* We use char because int might match the return type of a gcc2
5553     builtin and then its argument prototype would still apply.  */
5554 char __res_query();
5555
5556 int main() {
5557 __res_query()
5558 ; return 0; }
5559 EOF
5560 if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5561   rm -rf conftest*
5562   eval "ac_cv_lib_$ac_lib_var=yes"
5563 else
5564   echo "configure: failed program was:" >&5
5565   cat conftest.$ac_ext >&5
5566   rm -rf conftest*
5567   eval "ac_cv_lib_$ac_lib_var=no"
5568 fi
5569 rm -f conftest*
5570 LIBS="$ac_save_LIBS"
5571
5572 fi
5573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5574   echo "$ac_t""yes" 1>&6
5575     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5576     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5577   cat >> confdefs.h <<EOF
5578 #define $ac_tr_lib 1
5579 EOF
5580
5581   LIBS="-lbind $LIBS"
5582
5583 else
5584   echo "$ac_t""no" 1>&6
5585 fi
5586
5587         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5588 fi
5589
5590 if test $ac_cv_func_res_query = no ; then 
5591         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5592 echo "configure:5593: checking for res_query in -lresolv" >&5
5593 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
5594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5595   echo $ac_n "(cached) $ac_c" 1>&6
5596 else
5597   ac_save_LIBS="$LIBS"
5598 LIBS="-lresolv  $LIBS"
5599 cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602 /* Override any gcc2 internal prototype to avoid an error.  */
5603 /* We use char because int might match the return type of a gcc2
5604     builtin and then its argument prototype would still apply.  */
5605 char res_query();
5606
5607 int main() {
5608 res_query()
5609 ; return 0; }
5610 EOF
5611 if { (eval echo configure:5612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5612   rm -rf conftest*
5613   eval "ac_cv_lib_$ac_lib_var=yes"
5614 else
5615   echo "configure: failed program was:" >&5
5616   cat conftest.$ac_ext >&5
5617   rm -rf conftest*
5618   eval "ac_cv_lib_$ac_lib_var=no"
5619 fi
5620 rm -f conftest*
5621 LIBS="$ac_save_LIBS"
5622
5623 fi
5624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5625   echo "$ac_t""yes" 1>&6
5626     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5628   cat >> confdefs.h <<EOF
5629 #define $ac_tr_lib 1
5630 EOF
5631
5632   LIBS="-lresolv $LIBS"
5633
5634 else
5635   echo "$ac_t""no" 1>&6
5636 fi
5637
5638         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5639 fi
5640
5641 if test "$ac_cv_func_res_query" = yes ; then
5642         cat >> confdefs.h <<\EOF
5643 #define HAVE_RES_QUERY 1
5644 EOF
5645
5646
5647         if test $ol_enable_dnssrv != no ; then
5648                 ol_link_dnssrv=yes
5649         fi
5650 fi
5651
5652 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5653         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5654 fi
5655
5656 if test $ol_enable_quipu != no ; then
5657         for ac_hdr in quipu/commonarg.h
5658 do
5659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5661 echo "configure:5662: checking for $ac_hdr" >&5
5662 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 #include <$ac_hdr>
5669 EOF
5670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5671 { (eval echo configure:5672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5673 if test -z "$ac_err"; then
5674   rm -rf conftest*
5675   eval "ac_cv_header_$ac_safe=yes"
5676 else
5677   echo "$ac_err" >&5
5678   echo "configure: failed program was:" >&5
5679   cat conftest.$ac_ext >&5
5680   rm -rf conftest*
5681   eval "ac_cv_header_$ac_safe=no"
5682 fi
5683 rm -f conftest*
5684 fi
5685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5686   echo "$ac_t""yes" 1>&6
5687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5688   cat >> confdefs.h <<EOF
5689 #define $ac_tr_hdr 1
5690 EOF
5691  
5692 else
5693   echo "$ac_t""no" 1>&6
5694 fi
5695 done
5696
5697
5698         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5699                 BUILD_QUIPU=yes
5700         elif test $ol_enable_quipu = auto ; then
5701                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5702         else
5703                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5704         fi
5705 fi
5706
5707 ol_link_kbind=no
5708 ol_link_kpasswd=no
5709 ol_link_krb5=no
5710 ol_link_krb4=no
5711
5712 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5713         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5714
5715         for ac_hdr in krb5.h
5716 do
5717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5719 echo "configure:5720: checking for $ac_hdr" >&5
5720 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5721   echo $ac_n "(cached) $ac_c" 1>&6
5722 else
5723   cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726 #include <$ac_hdr>
5727 EOF
5728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5729 { (eval echo configure:5730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5731 if test -z "$ac_err"; then
5732   rm -rf conftest*
5733   eval "ac_cv_header_$ac_safe=yes"
5734 else
5735   echo "$ac_err" >&5
5736   echo "configure: failed program was:" >&5
5737   cat conftest.$ac_ext >&5
5738   rm -rf conftest*
5739   eval "ac_cv_header_$ac_safe=no"
5740 fi
5741 rm -f conftest*
5742 fi
5743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5744   echo "$ac_t""yes" 1>&6
5745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5746   cat >> confdefs.h <<EOF
5747 #define $ac_tr_hdr 1
5748 EOF
5749  
5750 else
5751   echo "$ac_t""no" 1>&6
5752 fi
5753 done
5754
5755
5756         if test $ac_cv_header_krb5_h = yes ; then
5757                                 for ac_hdr in heim_err.h
5758 do
5759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_hdr" >&5
5762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 #include <$ac_hdr>
5769 EOF
5770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5771 { (eval echo configure:5772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5773 if test -z "$ac_err"; then
5774   rm -rf conftest*
5775   eval "ac_cv_header_$ac_safe=yes"
5776 else
5777   echo "$ac_err" >&5
5778   echo "configure: failed program was:" >&5
5779   cat conftest.$ac_ext >&5
5780   rm -rf conftest*
5781   eval "ac_cv_header_$ac_safe=no"
5782 fi
5783 rm -f conftest*
5784 fi
5785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5786   echo "$ac_t""yes" 1>&6
5787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5788   cat >> confdefs.h <<EOF
5789 #define $ac_tr_hdr 1
5790 EOF
5791  
5792 else
5793   echo "$ac_t""no" 1>&6
5794 fi
5795 done
5796
5797                 if test $ac_cv_header_heim_err_h = yes ; then
5798                         krb5_impl=heimdal
5799                 else
5800                         krb5_impl=mit
5801                 fi
5802
5803                 if test $krb5_impl = mit; then
5804                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5805 echo "configure:5806: checking for main in -lkrb5" >&5
5806 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5807 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5808   echo $ac_n "(cached) $ac_c" 1>&6
5809 else
5810   ac_save_LIBS="$LIBS"
5811 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5812 cat > conftest.$ac_ext <<EOF
5813 #line 5814 "configure"
5814 #include "confdefs.h"
5815
5816 int main() {
5817 main()
5818 ; return 0; }
5819 EOF
5820 if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821   rm -rf conftest*
5822   eval "ac_cv_lib_$ac_lib_var=yes"
5823 else
5824   echo "configure: failed program was:" >&5
5825   cat conftest.$ac_ext >&5
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=no"
5828 fi
5829 rm -f conftest*
5830 LIBS="$ac_save_LIBS"
5831
5832 fi
5833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5834   echo "$ac_t""yes" 1>&6
5835   have_krb5=yes
5836                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5837 else
5838   echo "$ac_t""no" 1>&6
5839 have_krb5=no
5840 fi
5841
5842
5843                 elif test $krb5_impl = heimdal; then
5844                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5845 echo "configure:5846: checking for main in -lkrb5" >&5
5846 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
5847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5848   echo $ac_n "(cached) $ac_c" 1>&6
5849 else
5850   ac_save_LIBS="$LIBS"
5851 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5852 cat > conftest.$ac_ext <<EOF
5853 #line 5854 "configure"
5854 #include "confdefs.h"
5855
5856 int main() {
5857 main()
5858 ; return 0; }
5859 EOF
5860 if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5861   rm -rf conftest*
5862   eval "ac_cv_lib_$ac_lib_var=yes"
5863 else
5864   echo "configure: failed program was:" >&5
5865   cat conftest.$ac_ext >&5
5866   rm -rf conftest*
5867   eval "ac_cv_lib_$ac_lib_var=no"
5868 fi
5869 rm -f conftest*
5870 LIBS="$ac_save_LIBS"
5871
5872 fi
5873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5874   echo "$ac_t""yes" 1>&6
5875   have_krb5=yes
5876                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5877 else
5878   echo "$ac_t""no" 1>&6
5879 have_krb5=no
5880 fi
5881
5882
5883                         cat >> confdefs.h <<\EOF
5884 #define HAVE_HEIMDAL_KERBEROS 1
5885 EOF
5886
5887                 else
5888                         have_krb5=no
5889                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5890                 fi
5891
5892                 if test $have_krb5 = yes ; then
5893                         ol_link_krb5=yes
5894
5895                         cat >> confdefs.h <<\EOF
5896 #define HAVE_KRB5 1
5897 EOF
5898
5899
5900                         if test $ol_enable_kpasswd != no ; then
5901                                 ol_link_kpasswd=yes;
5902                         fi
5903
5904                         if test $ol_with_kerberos = k5only ; then
5905                                 ol_with_kerberos=found
5906                         fi
5907
5908                 elif test $ol_with_kerberos != auto ; then
5909                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5910                 fi
5911
5912         fi
5913 fi
5914
5915 if test $ol_link_krb5 = yes -a \
5916         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5917
5918         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5919 do
5920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5922 echo "configure:5923: checking for $ac_hdr" >&5
5923 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5924   echo $ac_n "(cached) $ac_c" 1>&6
5925 else
5926   cat > conftest.$ac_ext <<EOF
5927 #line 5928 "configure"
5928 #include "confdefs.h"
5929 #include <$ac_hdr>
5930 EOF
5931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5932 { (eval echo configure:5933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5934 if test -z "$ac_err"; then
5935   rm -rf conftest*
5936   eval "ac_cv_header_$ac_safe=yes"
5937 else
5938   echo "$ac_err" >&5
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_header_$ac_safe=no"
5943 fi
5944 rm -f conftest*
5945 fi
5946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5947   echo "$ac_t""yes" 1>&6
5948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5949   cat >> confdefs.h <<EOF
5950 #define $ac_tr_hdr 1
5951 EOF
5952  
5953 else
5954   echo "$ac_t""no" 1>&6
5955 fi
5956 done
5957
5958
5959         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5960                 if test $krb5_impl = mit; then
5961                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5962 echo "configure:5963: checking for main in -lkrb4" >&5
5963 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5965   echo $ac_n "(cached) $ac_c" 1>&6
5966 else
5967   ac_save_LIBS="$LIBS"
5968 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5969 cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972
5973 int main() {
5974 main()
5975 ; return 0; }
5976 EOF
5977 if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5978   rm -rf conftest*
5979   eval "ac_cv_lib_$ac_lib_var=yes"
5980 else
5981   echo "configure: failed program was:" >&5
5982   cat conftest.$ac_ext >&5
5983   rm -rf conftest*
5984   eval "ac_cv_lib_$ac_lib_var=no"
5985 fi
5986 rm -f conftest*
5987 LIBS="$ac_save_LIBS"
5988
5989 fi
5990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5991   echo "$ac_t""yes" 1>&6
5992   have_k425=yes
5993                                 KRB4_LIBS="-lkrb4 -ldes425"
5994 else
5995   echo "$ac_t""no" 1>&6
5996 have_k425=no
5997 fi
5998
5999
6000                 elif test $krb5_impl = heimdal; then
6001                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6002 echo "configure:6003: checking for main in -lkrb4" >&5
6003 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6004 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6005   echo $ac_n "(cached) $ac_c" 1>&6
6006 else
6007   ac_save_LIBS="$LIBS"
6008 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6009 cat > conftest.$ac_ext <<EOF
6010 #line 6011 "configure"
6011 #include "confdefs.h"
6012
6013 int main() {
6014 main()
6015 ; return 0; }
6016 EOF
6017 if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6018   rm -rf conftest*
6019   eval "ac_cv_lib_$ac_lib_var=yes"
6020 else
6021   echo "configure: failed program was:" >&5
6022   cat conftest.$ac_ext >&5
6023   rm -rf conftest*
6024   eval "ac_cv_lib_$ac_lib_var=no"
6025 fi
6026 rm -f conftest*
6027 LIBS="$ac_save_LIBS"
6028
6029 fi
6030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6031   echo "$ac_t""yes" 1>&6
6032   have_k425=yes
6033                                 KRB4_LIBS="-lkrb4"
6034 else
6035   echo "$ac_t""no" 1>&6
6036 have_k425=no
6037 fi
6038
6039
6040                 else
6041                         have_425=no
6042                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6043                 fi
6044
6045                 if test $have_k425 = yes ; then
6046                         ol_with_kerberos=found
6047                         ol_link_krb4=yes
6048
6049                         cat >> confdefs.h <<\EOF
6050 #define HAVE_KRB425 1
6051 EOF
6052
6053                         cat >> confdefs.h <<\EOF
6054 #define HAVE_KRB4 1
6055 EOF
6056
6057
6058                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6059 echo "configure:6060: checking for des_debug in Kerberos libraries" >&5
6060 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6061   echo $ac_n "(cached) $ac_c" 1>&6
6062 else
6063   
6064                                                                 save_LIBS="$LIBS"
6065                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6066                                 cat > conftest.$ac_ext <<EOF
6067 #line 6068 "configure"
6068 #include "confdefs.h"
6069
6070 #include <kerberosIV/krb.h>
6071 #include <kerberosIV/des.h>
6072 extern int des_debug;
6073
6074 int main() {
6075
6076 des_debug = 1;
6077
6078 ; return 0; }
6079 EOF
6080 if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6081   rm -rf conftest*
6082   ol_cv_var_des_debug=yes
6083 else
6084   echo "configure: failed program was:" >&5
6085   cat conftest.$ac_ext >&5
6086   rm -rf conftest*
6087   ol_cv_var_des_debug=no
6088 fi
6089 rm -f conftest*
6090                                                                 LIBS="$save_LIBS"
6091                         
6092 fi
6093
6094 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6095
6096                         if test $ol_cv_var_des_debug = yes ; then
6097                                 cat >> confdefs.h <<\EOF
6098 #define HAVE_DES_DEBUG 1
6099 EOF
6100
6101                         fi
6102
6103                         LIBS="$save_LIBS"
6104                 fi
6105         fi
6106 fi
6107
6108 if test $ol_link_krb5 = yes ; then
6109         ol_with_kerberos=found
6110 fi
6111
6112 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6113         -o $ol_with_kerberos = kth ; then
6114
6115         for ac_hdr in krb.h des.h krb-archaeology.h 
6116 do
6117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6119 echo "configure:6120: checking for $ac_hdr" >&5
6120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6121   echo $ac_n "(cached) $ac_c" 1>&6
6122 else
6123   cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126 #include <$ac_hdr>
6127 EOF
6128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6129 { (eval echo configure:6130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6131 if test -z "$ac_err"; then
6132   rm -rf conftest*
6133   eval "ac_cv_header_$ac_safe=yes"
6134 else
6135   echo "$ac_err" >&5
6136   echo "configure: failed program was:" >&5
6137   cat conftest.$ac_ext >&5
6138   rm -rf conftest*
6139   eval "ac_cv_header_$ac_safe=no"
6140 fi
6141 rm -f conftest*
6142 fi
6143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6144   echo "$ac_t""yes" 1>&6
6145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6146   cat >> confdefs.h <<EOF
6147 #define $ac_tr_hdr 1
6148 EOF
6149  
6150 else
6151   echo "$ac_t""no" 1>&6
6152 fi
6153 done
6154
6155
6156         if test $ac_cv_header_krb_h = yes ; then
6157                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6158 echo "configure:6159: checking for main in -lkrb" >&5
6159 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6161   echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163   ac_save_LIBS="$LIBS"
6164 LIBS="-lkrb -ldes $LIBS"
6165 cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168
6169 int main() {
6170 main()
6171 ; return 0; }
6172 EOF
6173 if { (eval echo configure:6174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6174   rm -rf conftest*
6175   eval "ac_cv_lib_$ac_lib_var=yes"
6176 else
6177   echo "configure: failed program was:" >&5
6178   cat conftest.$ac_ext >&5
6179   rm -rf conftest*
6180   eval "ac_cv_lib_$ac_lib_var=no"
6181 fi
6182 rm -f conftest*
6183 LIBS="$ac_save_LIBS"
6184
6185 fi
6186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6187   echo "$ac_t""yes" 1>&6
6188   have_k4=yes
6189 else
6190   echo "$ac_t""no" 1>&6
6191 have_k4=no
6192 fi
6193
6194
6195                 if test $have_k4 = yes ; then
6196                         ol_with_kerberos=found
6197                         ol_link_krb4=yes
6198
6199                         cat >> confdefs.h <<\EOF
6200 #define HAVE_KRB4 1
6201 EOF
6202
6203
6204                         KRB4_LIBS="-lkrb -ldes"
6205
6206                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6207                                 cat >> confdefs.h <<\EOF
6208 #define HAVE_KTH_KERBEROS 1
6209 EOF
6210
6211                         fi
6212                 fi
6213         fi
6214 fi
6215
6216 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6217         ol_link_kpasswd=yes;
6218 fi
6219
6220 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6221         cat >> confdefs.h <<\EOF
6222 #define HAVE_KERBEROS 1
6223 EOF
6224
6225
6226 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6227         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6228 fi
6229
6230 ol_link_tls=no
6231 if test $ol_with_tls != no ; then
6232         
6233         for ac_hdr in openssl/ssl.h ssl.h
6234 do
6235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6237 echo "configure:6238: checking for $ac_hdr" >&5
6238 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6239   echo $ac_n "(cached) $ac_c" 1>&6
6240 else
6241   cat > conftest.$ac_ext <<EOF
6242 #line 6243 "configure"
6243 #include "confdefs.h"
6244 #include <$ac_hdr>
6245 EOF
6246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6247 { (eval echo configure:6248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6249 if test -z "$ac_err"; then
6250   rm -rf conftest*
6251   eval "ac_cv_header_$ac_safe=yes"
6252 else
6253   echo "$ac_err" >&5
6254   echo "configure: failed program was:" >&5
6255   cat conftest.$ac_ext >&5
6256   rm -rf conftest*
6257   eval "ac_cv_header_$ac_safe=no"
6258 fi
6259 rm -f conftest*
6260 fi
6261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6264   cat >> confdefs.h <<EOF
6265 #define $ac_tr_hdr 1
6266 EOF
6267  
6268 else
6269   echo "$ac_t""no" 1>&6
6270 fi
6271 done
6272
6273         
6274         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6275                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6276 echo "configure:6277: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6277 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6278 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6279   echo $ac_n "(cached) $ac_c" 1>&6
6280 else
6281   ac_save_LIBS="$LIBS"
6282 LIBS="-lssl -lcrypto $LIBS"
6283 cat > conftest.$ac_ext <<EOF
6284 #line 6285 "configure"
6285 #include "confdefs.h"
6286 /* Override any gcc2 internal prototype to avoid an error.  */
6287 /* We use char because int might match the return type of a gcc2
6288     builtin and then its argument prototype would still apply.  */
6289 char SSLeay_add_ssl_algorithms();
6290
6291 int main() {
6292 SSLeay_add_ssl_algorithms()
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   eval "ac_cv_lib_$ac_lib_var=yes"
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_lib_$ac_lib_var=no"
6303 fi
6304 rm -f conftest*
6305 LIBS="$ac_save_LIBS"
6306
6307 fi
6308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6309   echo "$ac_t""yes" 1>&6
6310   have_ssleay=yes
6311                         need_rsaref=no
6312 else
6313   echo "$ac_t""no" 1>&6
6314 have_ssleay=no
6315 fi
6316
6317                         
6318                 if test $have_ssleay = no ; then
6319                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6320 echo "configure:6321: checking for SSL_library_init in -lssl" >&5
6321 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6323   echo $ac_n "(cached) $ac_c" 1>&6
6324 else
6325   ac_save_LIBS="$LIBS"
6326 LIBS="-lssl -lcrypto $LIBS"
6327 cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330 /* Override any gcc2 internal prototype to avoid an error.  */
6331 /* We use char because int might match the return type of a gcc2
6332     builtin and then its argument prototype would still apply.  */
6333 char SSL_library_init();
6334
6335 int main() {
6336 SSL_library_init()
6337 ; return 0; }
6338 EOF
6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6340   rm -rf conftest*
6341   eval "ac_cv_lib_$ac_lib_var=yes"
6342 else
6343   echo "configure: failed program was:" >&5
6344   cat conftest.$ac_ext >&5
6345   rm -rf conftest*
6346   eval "ac_cv_lib_$ac_lib_var=no"
6347 fi
6348 rm -f conftest*
6349 LIBS="$ac_save_LIBS"
6350
6351 fi
6352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6353   echo "$ac_t""yes" 1>&6
6354   have_ssleay=yes
6355                                 need_rsaref=no
6356 else
6357   echo "$ac_t""no" 1>&6
6358 have_ssleay=no
6359 fi
6360
6361                 fi
6362
6363                 if test $have_ssleay = no ; then
6364                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6365 echo "configure:6366: checking for ssl3_accept in -lssl" >&5
6366 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6368   echo $ac_n "(cached) $ac_c" 1>&6
6369 else
6370   ac_save_LIBS="$LIBS"
6371 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6372 cat > conftest.$ac_ext <<EOF
6373 #line 6374 "configure"
6374 #include "confdefs.h"
6375 /* Override any gcc2 internal prototype to avoid an error.  */
6376 /* We use char because int might match the return type of a gcc2
6377     builtin and then its argument prototype would still apply.  */
6378 char ssl3_accept();
6379
6380 int main() {
6381 ssl3_accept()
6382 ; return 0; }
6383 EOF
6384 if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6385   rm -rf conftest*
6386   eval "ac_cv_lib_$ac_lib_var=yes"
6387 else
6388   echo "configure: failed program was:" >&5
6389   cat conftest.$ac_ext >&5
6390   rm -rf conftest*
6391   eval "ac_cv_lib_$ac_lib_var=no"
6392 fi
6393 rm -f conftest*
6394 LIBS="$ac_save_LIBS"
6395
6396 fi
6397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6398   echo "$ac_t""yes" 1>&6
6399   have_ssleay=yes
6400                                 need_rsaref=yes
6401 else
6402   echo "$ac_t""no" 1>&6
6403 have_ssleay=no
6404 fi
6405
6406                 fi
6407
6408                 if test $have_ssleay = yes ; then
6409                         ol_with_tls=found
6410                         ol_link_tls=yes
6411
6412                         cat >> confdefs.h <<\EOF
6413 #define HAVE_SSLEAY 1
6414 EOF
6415
6416
6417                         if test $need_rsaref = yes; then
6418                                 cat >> confdefs.h <<\EOF
6419 #define HAVE_RSAREF 1
6420 EOF
6421
6422
6423                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6424                         else
6425                                 TLS_LIBS="-lssl -lcrypto"
6426                         fi
6427                 fi
6428         fi
6429 fi
6430
6431 if test $ol_link_tls = yes ; then
6432         cat >> confdefs.h <<\EOF
6433 #define HAVE_TLS 1
6434 EOF
6435
6436 fi      
6437
6438 for ac_func in \
6439         ctime_r                 \
6440         gethostbyname_r gethostbyaddr_r \
6441
6442 do
6443 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6444 echo "configure:6445: checking for $ac_func" >&5
6445 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6446   echo $ac_n "(cached) $ac_c" 1>&6
6447 else
6448   cat > conftest.$ac_ext <<EOF
6449 #line 6450 "configure"
6450 #include "confdefs.h"
6451 /* System header to define __stub macros and hopefully few prototypes,
6452     which can conflict with char $ac_func(); below.  */
6453 #include <assert.h>
6454 /* Override any gcc2 internal prototype to avoid an error.  */
6455 /* We use char because int might match the return type of a gcc2
6456     builtin and then its argument prototype would still apply.  */
6457 char $ac_func();
6458 char (*f)();
6459
6460 int main() {
6461
6462 /* The GNU C library defines this for functions which it implements
6463     to always fail with ENOSYS.  Some functions are actually named
6464     something starting with __ and the normal name is an alias.  */
6465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6466 choke me
6467 #else
6468 f = $ac_func;
6469 #endif
6470
6471 ; return 0; }
6472 EOF
6473 if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6474   rm -rf conftest*
6475   eval "ac_cv_func_$ac_func=yes"
6476 else
6477   echo "configure: failed program was:" >&5
6478   cat conftest.$ac_ext >&5
6479   rm -rf conftest*
6480   eval "ac_cv_func_$ac_func=no"
6481 fi
6482 rm -f conftest*
6483 fi
6484
6485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6486   echo "$ac_t""yes" 1>&6
6487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6488   cat >> confdefs.h <<EOF
6489 #define $ac_tr_func 1
6490 EOF
6491  
6492 else
6493   echo "$ac_t""no" 1>&6
6494 fi
6495 done
6496
6497
6498 if test "$ac_cv_func_ctime_r" = no ; then
6499         ol_cv_func_ctime_r_nargs=0
6500 else
6501         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6502 echo "configure:6503: checking number of arguments of ctime_r" >&5
6503 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6504   echo $ac_n "(cached) $ac_c" 1>&6
6505 else
6506   cat > conftest.$ac_ext <<EOF
6507 #line 6508 "configure"
6508 #include "confdefs.h"
6509 #include <time.h>
6510 int main() {
6511 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6512 ; return 0; }
6513 EOF
6514 if { (eval echo configure:6515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6515   rm -rf conftest*
6516   ol_cv_func_ctime_r_nargs3=yes
6517 else
6518   echo "configure: failed program was:" >&5
6519   cat conftest.$ac_ext >&5
6520   rm -rf conftest*
6521   ol_cv_func_ctime_r_nargs3=no
6522 fi
6523 rm -f conftest*
6524
6525         cat > conftest.$ac_ext <<EOF
6526 #line 6527 "configure"
6527 #include "confdefs.h"
6528 #include <time.h>
6529 int main() {
6530 time_t ti; char *buffer; ctime_r(&ti,buffer);
6531 ; return 0; }
6532 EOF
6533 if { (eval echo configure:6534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6534   rm -rf conftest*
6535   ol_cv_func_ctime_r_nargs2=yes
6536 else
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   ol_cv_func_ctime_r_nargs2=no
6541 fi
6542 rm -f conftest*
6543
6544         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6545                 $ol_cv_func_ctime_r_nargs2 = no ; then
6546
6547                 ol_cv_func_ctime_r_nargs=3
6548
6549         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6550                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6551
6552                 ol_cv_func_ctime_r_nargs=2
6553
6554         else
6555                 ol_cv_func_ctime_r_nargs=0
6556         fi
6557   
6558 fi
6559
6560 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6561
6562   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6563         cat >> confdefs.h <<EOF
6564 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6565 EOF
6566
6567   fi
6568
6569 fi
6570
6571 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6572         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6573 echo "configure:6574: checking number of arguments of gethostbyname_r" >&5
6574 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6575   echo $ac_n "(cached) $ac_c" 1>&6
6576 else
6577   cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 #include <sys/types.h>
6581 #include <sys/socket.h>
6582 #include <netinet/in.h>
6583 #include <netdb.h>
6584 #define BUFSIZE (sizeof(struct hostent)+10)
6585 int main() {
6586 struct hostent hent; char buffer[BUFSIZE];
6587                 int bufsize=BUFSIZE;int h_errno;
6588                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6589                         buffer, bufsize, &h_errno);
6590 ; return 0; }
6591 EOF
6592 if { (eval echo configure:6593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6593   rm -rf conftest*
6594   ol_cv_func_gethostbyname_r_nargs5=yes
6595 else
6596   echo "configure: failed program was:" >&5
6597   cat conftest.$ac_ext >&5
6598   rm -rf conftest*
6599   ol_cv_func_gethostbyname_r_nargs5=no
6600 fi
6601 rm -f conftest*
6602
6603         cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 #include <sys/types.h>
6607 #include <sys/socket.h>
6608 #include <netinet/in.h>
6609 #include <netdb.h>
6610 #define BUFSIZE (sizeof(struct hostent)+10)
6611 int main() {
6612 struct hostent hent;struct hostent *rhent;
6613                 char buffer[BUFSIZE];
6614                 int bufsize=BUFSIZE;int h_errno;
6615                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6616                         &rhent, &h_errno);
6617 ; return 0; }
6618 EOF
6619 if { (eval echo configure:6620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6620   rm -rf conftest*
6621   ol_cv_func_gethostbyname_r_nargs6=yes
6622 else
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   ol_cv_func_gethostbyname_r_nargs6=no
6627 fi
6628 rm -f conftest*
6629
6630         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6631                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6632
6633                 ol_cv_func_gethostbyname_r_nargs=5
6634
6635         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6636                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6637
6638                 ol_cv_func_gethostbyname_r_nargs=6
6639
6640         else
6641                 ol_cv_func_gethostbyname_r_nargs=0
6642         fi
6643   
6644 fi
6645
6646 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6647   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6648         cat >> confdefs.h <<EOF
6649 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6650 EOF
6651
6652   fi
6653
6654 else
6655         ol_cv_func_gethostbyname_r_nargs=0
6656 fi
6657  
6658 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6659         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6660 echo "configure:6661: checking number of arguments of gethostbyaddr_r" >&5
6661 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6662   echo $ac_n "(cached) $ac_c" 1>&6
6663 else
6664   cat > conftest.$ac_ext <<EOF
6665 #line 6666 "configure"
6666 #include "confdefs.h"
6667 #include <sys/types.h>
6668 #include <sys/socket.h>
6669 #include <netinet/in.h>
6670 #include <netdb.h>
6671 #define BUFSIZE (sizeof(struct hostent)+10)
6672 int main() {
6673 struct hostent hent; char buffer[BUFSIZE]; 
6674             struct in_addr add;
6675             size_t alen=sizeof(struct in_addr);
6676             int bufsize=BUFSIZE;int h_errno;
6677                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6678                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6682   rm -rf conftest*
6683   ol_cv_func_gethostbyaddr_r_nargs7=yes
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   ol_cv_func_gethostbyaddr_r_nargs7=no
6689 fi
6690 rm -f conftest*
6691
6692         cat > conftest.$ac_ext <<EOF
6693 #line 6694 "configure"
6694 #include "confdefs.h"
6695 #include <sys/types.h>
6696 #include <sys/socket.h>
6697 #include <netinet/in.h>
6698 #include <netdb.h>
6699 #define BUFSIZE (sizeof(struct hostent)+10)
6700 int main() {
6701 struct hostent hent;
6702                 struct hostent *rhent; char buffer[BUFSIZE]; 
6703                 struct in_addr add;
6704                 size_t alen=sizeof(struct in_addr);
6705                 int bufsize=BUFSIZE;int h_errno;
6706                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6707                         alen, AF_INET, &hent, buffer, bufsize, 
6708                         &rhent, &h_errno);
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6712   rm -rf conftest*
6713   ol_cv_func_gethostbyaddr_r_nargs8=yes
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   ol_cv_func_gethostbyaddr_r_nargs8=no
6719 fi
6720 rm -f conftest*
6721
6722         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6723                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6724
6725                 ol_cv_func_gethostbyaddr_r_nargs=7
6726
6727         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6728                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6729
6730                 ol_cv_func_gethostbyaddr_r_nargs=8
6731
6732         else
6733                 ol_cv_func_gethostbyaddr_r_nargs=0
6734         fi
6735   
6736 fi
6737
6738 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6739   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6740     cat >> confdefs.h <<EOF
6741 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6742 EOF
6743
6744   fi
6745
6746 else
6747         ol_cv_func_gethostbyaddr_r_nargs=0
6748 fi
6749
6750 if test "$ac_cv_func_ctime_r" = yes \
6751         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6752         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6753         -a "$ac_cv_func_gethostbyname_r" = yes \
6754         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6755         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6756         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6757         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6758         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6759         ; then
6760  
6761         cat >> confdefs.h <<\EOF
6762 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6763 EOF
6764
6765 fi
6766
6767 ol_link_threads=no
6768
6769 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6770         -o $ol_with_threads = nt ; then
6771
6772         
6773         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6774 echo "configure:6775: checking for NT Threads" >&5
6775 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6776   echo $ac_n "(cached) $ac_c" 1>&6
6777 else
6778   
6779                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6780 echo "configure:6781: checking for _beginthread" >&5
6781 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6782   echo $ac_n "(cached) $ac_c" 1>&6
6783 else
6784   cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787 /* System header to define __stub macros and hopefully few prototypes,
6788     which can conflict with char _beginthread(); below.  */
6789 #include <assert.h>
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 /* We use char because int might match the return type of a gcc2
6792     builtin and then its argument prototype would still apply.  */
6793 char _beginthread();
6794 char (*f)();
6795
6796 int main() {
6797
6798 /* The GNU C library defines this for functions which it implements
6799     to always fail with ENOSYS.  Some functions are actually named
6800     something starting with __ and the normal name is an alias.  */
6801 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6802 choke me
6803 #else
6804 f = _beginthread;
6805 #endif
6806
6807 ; return 0; }
6808 EOF
6809 if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6810   rm -rf conftest*
6811   eval "ac_cv_func__beginthread=yes"
6812 else
6813   echo "configure: failed program was:" >&5
6814   cat conftest.$ac_ext >&5
6815   rm -rf conftest*
6816   eval "ac_cv_func__beginthread=no"
6817 fi
6818 rm -f conftest*
6819 fi
6820
6821 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6822   echo "$ac_t""yes" 1>&6
6823   ol_cv_nt_threads=yes
6824 else
6825   echo "$ac_t""no" 1>&6
6826 ol_cv_nt_threads=no
6827 fi
6828
6829         
6830 fi
6831
6832 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6833
6834         if test $ol_cv_nt_threads = yes ; then
6835                 cat >> confdefs.h <<\EOF
6836 #define HAVE_NT_THREADS 1
6837 EOF
6838
6839         fi
6840
6841
6842         if test "$ol_cv_nt_threads" = yes ; then
6843         ol_link_threads=nt
6844         ol_with_threads=found
6845         ol_with_yielding_select=yes
6846
6847                 cat >> confdefs.h <<\EOF
6848 #define HAVE_NT_SERVICE_MANAGER 1
6849 EOF
6850
6851                 cat >> confdefs.h <<\EOF
6852 #define HAVE_NT_EVENT_LOG 1
6853 EOF
6854
6855         fi
6856
6857         if test $ol_with_threads = nt ; then
6858                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6859         fi
6860 fi
6861
6862 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6863         -o $ol_with_threads = posix ; then
6864
6865         for ac_hdr in pthread.h
6866 do
6867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6869 echo "configure:6870: checking for $ac_hdr" >&5
6870 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6871   echo $ac_n "(cached) $ac_c" 1>&6
6872 else
6873   cat > conftest.$ac_ext <<EOF
6874 #line 6875 "configure"
6875 #include "confdefs.h"
6876 #include <$ac_hdr>
6877 EOF
6878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6879 { (eval echo configure:6880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6881 if test -z "$ac_err"; then
6882   rm -rf conftest*
6883   eval "ac_cv_header_$ac_safe=yes"
6884 else
6885   echo "$ac_err" >&5
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   eval "ac_cv_header_$ac_safe=no"
6890 fi
6891 rm -f conftest*
6892 fi
6893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6894   echo "$ac_t""yes" 1>&6
6895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6896   cat >> confdefs.h <<EOF
6897 #define $ac_tr_hdr 1
6898 EOF
6899  
6900 else
6901   echo "$ac_t""no" 1>&6
6902 fi
6903 done
6904
6905
6906         if test $ac_cv_header_pthread_h = yes ; then
6907                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6908 echo "configure:6909: checking POSIX thread version" >&5
6909 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6910   echo $ac_n "(cached) $ac_c" 1>&6
6911 else
6912   
6913         cat > conftest.$ac_ext <<EOF
6914 #line 6915 "configure"
6915 #include "confdefs.h"
6916
6917 #               include <pthread.h>
6918                 /* this check could be improved */
6919 #               ifdef PTHREAD_ONCE_INIT
6920                         pthread_version_final;
6921 #               endif
6922         
6923 EOF
6924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6925   egrep "pthread_version_final" >/dev/null 2>&1; then
6926   rm -rf conftest*
6927   ol_pthread_final=yes
6928 else
6929   rm -rf conftest*
6930   ol_pthread_final=no
6931 fi
6932 rm -f conftest*
6933
6934
6935         cat > conftest.$ac_ext <<EOF
6936 #line 6937 "configure"
6937 #include "confdefs.h"
6938
6939 #               include <pthread.h>
6940                 /* this check could be improved */
6941 #               ifdef pthread_once_init
6942                         pthread_version_draft4;
6943 #               endif
6944         
6945 EOF
6946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6947   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6948   rm -rf conftest*
6949   ol_pthread_draft4=yes
6950 else
6951   rm -rf conftest*
6952   ol_pthread_draft4=no
6953 fi
6954 rm -f conftest*
6955
6956
6957         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6958                 ol_cv_pthread_version=final
6959         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6960                 ol_cv_pthread_version=draft4
6961         else
6962                 ol_cv_pthread_version=unknown
6963         fi
6964
6965 fi
6966
6967 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6968
6969
6970                 if test $ol_cv_pthread_version = final ; then
6971                         cat >> confdefs.h <<\EOF
6972 #define HAVE_PTHREADS_FINAL 1
6973 EOF
6974
6975                 elif test $ol_cv_pthread_version = draft4 ; then
6976                         cat >> confdefs.h <<\EOF
6977 #define HAVE_PTHREADS_D4 1
6978 EOF
6979
6980                 else
6981                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6982                 fi
6983
6984                 # consider threads found
6985                 ol_with_threads=found
6986
6987                 
6988         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6989 echo "configure:6990: checking for LinuxThreads pthread.h" >&5
6990 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6991   echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993   cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996 #include <pthread.h>
6997 EOF
6998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6999   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7000   rm -rf conftest*
7001   ol_cv_header_linux_threads=yes
7002 else
7003   rm -rf conftest*
7004   ol_cv_header_linux_threads=no
7005 fi
7006 rm -f conftest*
7007
7008                 
7009 fi
7010
7011 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7012         if test $ol_cv_header_linux_threads = yes; then
7013                 cat >> confdefs.h <<\EOF
7014 #define HAVE_LINUX_THREADS 1
7015 EOF
7016
7017         fi
7018
7019                 
7020         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7021 echo "configure:7022: checking for GNU Pth pthread.h" >&5
7022 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7023   echo $ac_n "(cached) $ac_c" 1>&6
7024 else
7025   cat > conftest.$ac_ext <<EOF
7026 #line 7027 "configure"
7027 #include "confdefs.h"
7028 #include <pthread.h>
7029 #ifdef _POSIX_THREAD_IS_GNU_PTH
7030         __gnu_pth__;
7031 #endif
7032
7033 EOF
7034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7035   egrep "__gnu_pth__" >/dev/null 2>&1; then
7036   rm -rf conftest*
7037   ol_cv_header_gnu_pth_pthread_h=yes
7038 else
7039   rm -rf conftest*
7040   ol_cv_header_gnu_pth_pthread_h=no
7041 fi
7042 rm -f conftest*
7043
7044                 
7045 fi
7046
7047 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7048
7049
7050                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7051                         for ac_hdr in sched.h
7052 do
7053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7055 echo "configure:7056: checking for $ac_hdr" >&5
7056 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7057   echo $ac_n "(cached) $ac_c" 1>&6
7058 else
7059   cat > conftest.$ac_ext <<EOF
7060 #line 7061 "configure"
7061 #include "confdefs.h"
7062 #include <$ac_hdr>
7063 EOF
7064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7065 { (eval echo configure:7066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7067 if test -z "$ac_err"; then
7068   rm -rf conftest*
7069   eval "ac_cv_header_$ac_safe=yes"
7070 else
7071   echo "$ac_err" >&5
7072   echo "configure: failed program was:" >&5
7073   cat conftest.$ac_ext >&5
7074   rm -rf conftest*
7075   eval "ac_cv_header_$ac_safe=no"
7076 fi
7077 rm -f conftest*
7078 fi
7079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7080   echo "$ac_t""yes" 1>&6
7081     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7082   cat >> confdefs.h <<EOF
7083 #define $ac_tr_hdr 1
7084 EOF
7085  
7086 else
7087   echo "$ac_t""no" 1>&6
7088 fi
7089 done
7090
7091                 fi
7092
7093                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7094                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7095 echo "configure:7096: checking for pthread_create in default libraries" >&5
7096 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   
7100                 if test "$cross_compiling" = yes; then
7101   cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* pthread test headers */
7105 #include <pthread.h>
7106 #ifndef NULL
7107 #define NULL (void*)0
7108 #endif
7109
7110 static void *task(p)
7111         void *p;
7112 {
7113         return (void *) (p == NULL);
7114 }
7115
7116 int main() {
7117
7118         /* pthread test function */
7119         pthread_t t;
7120         int status;
7121 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7122         /* This system (e.g. AIX) defaults detached; must override */
7123         pthread_attr_t attr;
7124
7125         status = pthread_attr_init(&attr);
7126         if( status ) exit( status );
7127
7128         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7129         if( status ) exit( status );
7130
7131 #define ATTR    &attr
7132 #else
7133 #if HAVE_PTHREADS_D4
7134 #define ATTR    pthread_attr_default
7135 #else
7136 #define ATTR    NULL
7137 #endif
7138 #endif
7139         /* make sure pthread_create() isn't just a stub */
7140         status = pthread_create(&t, ATTR, task, NULL);
7141         if( status ) exit( status );
7142
7143         /* make sure pthread_detach() isn't just a stub */
7144 #if HAVE_PTHREADS_D4
7145         status = pthread_detach( &t );
7146 #else
7147         status = pthread_detach( t );
7148 #endif
7149
7150 #ifdef HAVE_LINUX_THREADS
7151         pthread_kill_other_threads_np();
7152 #endif
7153
7154         exit( status );
7155
7156 ; return 0; }
7157 EOF
7158 if { (eval echo configure:7159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7159   rm -rf conftest*
7160   ol_cv_pthread_create=yes
7161 else
7162   echo "configure: failed program was:" >&5
7163   cat conftest.$ac_ext >&5
7164   rm -rf conftest*
7165   ol_cv_pthread_create=no
7166 fi
7167 rm -f conftest*
7168 else
7169   cat > conftest.$ac_ext <<EOF
7170 #line 7171 "configure"
7171 #include "confdefs.h"
7172 /* pthread test headers */
7173 #include <pthread.h>
7174 #ifndef NULL
7175 #define NULL (void*)0
7176 #endif
7177
7178 static void *task(p)
7179         void *p;
7180 {
7181         return (void *) (p == NULL);
7182 }
7183
7184
7185 int main(argc, argv)
7186         int argc;
7187         char **argv;
7188 {
7189
7190         /* pthread test function */
7191         pthread_t t;
7192         int status;
7193 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7194         /* This system (e.g. AIX) defaults detached; must override */
7195         pthread_attr_t attr;
7196
7197         status = pthread_attr_init(&attr);
7198         if( status ) exit( status );
7199
7200         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7201         if( status ) exit( status );
7202
7203 #define ATTR    &attr
7204 #else
7205 #if HAVE_PTHREADS_D4
7206 #define ATTR    pthread_attr_default
7207 #else
7208 #define ATTR    NULL
7209 #endif
7210 #endif
7211         /* make sure pthread_create() isn't just a stub */
7212         status = pthread_create(&t, ATTR, task, NULL);
7213         if( status ) exit( status );
7214
7215         /* make sure pthread_detach() isn't just a stub */
7216 #if HAVE_PTHREADS_D4
7217         status = pthread_detach( &t );
7218 #else
7219         status = pthread_detach( t );
7220 #endif
7221
7222 #ifdef HAVE_LINUX_THREADS
7223         pthread_kill_other_threads_np();
7224 #endif
7225
7226         exit( status );
7227
7228 }
7229
7230 EOF
7231 if { (eval echo configure:7232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7232 then
7233   ol_cv_pthread_create=yes
7234 else
7235   echo "configure: failed program was:" >&5
7236   cat conftest.$ac_ext >&5
7237   rm -fr conftest*
7238   ol_cv_pthread_create=no
7239 fi
7240 rm -fr conftest*
7241 fi
7242
7243 fi
7244
7245 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7246
7247                 if test $ol_cv_pthread_create != no ; then
7248                         ol_link_threads=posix
7249                         ol_link_pthreads=""
7250                 fi
7251                 
7252                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7253 if test "$ol_link_threads" = no ; then
7254         # try -kthread
7255         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7256 echo "configure:7257: checking for pthread link with -kthread" >&5
7257 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7258   echo $ac_n "(cached) $ac_c" 1>&6
7259 else
7260   
7261                 # save the flags
7262                 ol_LIBS="$LIBS"
7263                 LIBS="-kthread $LIBS"
7264
7265                 if test "$cross_compiling" = yes; then
7266   cat > conftest.$ac_ext <<EOF
7267 #line 7268 "configure"
7268 #include "confdefs.h"
7269 /* pthread test headers */
7270 #include <pthread.h>
7271 #ifndef NULL
7272 #define NULL (void*)0
7273 #endif
7274
7275 static void *task(p)
7276         void *p;
7277 {
7278         return (void *) (p == NULL);
7279 }
7280
7281 int main() {
7282
7283         /* pthread test function */
7284         pthread_t t;
7285         int status;
7286 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7287         /* This system (e.g. AIX) defaults detached; must override */
7288         pthread_attr_t attr;
7289
7290         status = pthread_attr_init(&attr);
7291         if( status ) exit( status );
7292
7293         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7294         if( status ) exit( status );
7295
7296 #define ATTR    &attr
7297 #else
7298 #if HAVE_PTHREADS_D4
7299 #define ATTR    pthread_attr_default
7300 #else
7301 #define ATTR    NULL
7302 #endif
7303 #endif
7304         /* make sure pthread_create() isn't just a stub */
7305         status = pthread_create(&t, ATTR, task, NULL);
7306         if( status ) exit( status );
7307
7308         /* make sure pthread_detach() isn't just a stub */
7309 #if HAVE_PTHREADS_D4
7310         status = pthread_detach( &t );
7311 #else
7312         status = pthread_detach( t );
7313 #endif
7314
7315 #ifdef HAVE_LINUX_THREADS
7316         pthread_kill_other_threads_np();
7317 #endif
7318
7319         exit( status );
7320
7321 ; return 0; }
7322 EOF
7323 if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7324   rm -rf conftest*
7325   ol_cv_pthread_kthread=yes
7326 else
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   ol_cv_pthread_kthread=no
7331 fi
7332 rm -f conftest*
7333 else
7334   cat > conftest.$ac_ext <<EOF
7335 #line 7336 "configure"
7336 #include "confdefs.h"
7337 /* pthread test headers */
7338 #include <pthread.h>
7339 #ifndef NULL
7340 #define NULL (void*)0
7341 #endif
7342
7343 static void *task(p)
7344         void *p;
7345 {
7346         return (void *) (p == NULL);
7347 }
7348
7349
7350 int main(argc, argv)
7351         int argc;
7352         char **argv;
7353 {
7354
7355         /* pthread test function */
7356         pthread_t t;
7357         int status;
7358 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7359         /* This system (e.g. AIX) defaults detached; must override */
7360         pthread_attr_t attr;
7361
7362         status = pthread_attr_init(&attr);
7363         if( status ) exit( status );
7364
7365         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7366         if( status ) exit( status );
7367
7368 #define ATTR    &attr
7369 #else
7370 #if HAVE_PTHREADS_D4
7371 #define ATTR    pthread_attr_default
7372 #else
7373 #define ATTR    NULL
7374 #endif
7375 #endif
7376         /* make sure pthread_create() isn't just a stub */
7377         status = pthread_create(&t, ATTR, task, NULL);
7378         if( status ) exit( status );
7379
7380         /* make sure pthread_detach() isn't just a stub */
7381 #if HAVE_PTHREADS_D4
7382         status = pthread_detach( &t );
7383 #else
7384         status = pthread_detach( t );
7385 #endif
7386
7387 #ifdef HAVE_LINUX_THREADS
7388         pthread_kill_other_threads_np();
7389 #endif
7390
7391         exit( status );
7392
7393 }
7394
7395 EOF
7396 if { (eval echo configure:7397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7397 then
7398   ol_cv_pthread_kthread=yes
7399 else
7400   echo "configure: failed program was:" >&5
7401   cat conftest.$ac_ext >&5
7402   rm -fr conftest*
7403   ol_cv_pthread_kthread=no
7404 fi
7405 rm -fr conftest*
7406 fi
7407
7408
7409                 # restore the LIBS
7410                 LIBS="$ol_LIBS"
7411         
7412 fi
7413
7414 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7415
7416         if test $ol_cv_pthread_kthread = yes ; then
7417                 ol_link_pthreads="-kthread"
7418                 ol_link_threads=posix
7419         fi
7420 fi
7421
7422                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7423 if test "$ol_link_threads" = no ; then
7424         # try -pthread
7425         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7426 echo "configure:7427: checking for pthread link with -pthread" >&5
7427 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7428   echo $ac_n "(cached) $ac_c" 1>&6
7429 else
7430   
7431                 # save the flags
7432                 ol_LIBS="$LIBS"
7433                 LIBS="-pthread $LIBS"
7434
7435                 if test "$cross_compiling" = yes; then
7436   cat > conftest.$ac_ext <<EOF
7437 #line 7438 "configure"
7438 #include "confdefs.h"
7439 /* pthread test headers */
7440 #include <pthread.h>
7441 #ifndef NULL
7442 #define NULL (void*)0
7443 #endif
7444
7445 static void *task(p)
7446         void *p;
7447 {
7448         return (void *) (p == NULL);
7449 }
7450
7451 int main() {
7452
7453         /* pthread test function */
7454         pthread_t t;
7455         int status;
7456 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7457         /* This system (e.g. AIX) defaults detached; must override */
7458         pthread_attr_t attr;
7459
7460         status = pthread_attr_init(&attr);
7461         if( status ) exit( status );
7462
7463         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7464         if( status ) exit( status );
7465
7466 #define ATTR    &attr
7467 #else
7468 #if HAVE_PTHREADS_D4
7469 #define ATTR    pthread_attr_default
7470 #else
7471 #define ATTR    NULL
7472 #endif
7473 #endif
7474         /* make sure pthread_create() isn't just a stub */
7475         status = pthread_create(&t, ATTR, task, NULL);
7476         if( status ) exit( status );
7477
7478         /* make sure pthread_detach() isn't just a stub */
7479 #if HAVE_PTHREADS_D4
7480         status = pthread_detach( &t );
7481 #else
7482         status = pthread_detach( t );
7483 #endif
7484
7485 #ifdef HAVE_LINUX_THREADS
7486         pthread_kill_other_threads_np();
7487 #endif
7488
7489         exit( status );
7490
7491 ; return 0; }
7492 EOF
7493 if { (eval echo configure:7494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7494   rm -rf conftest*
7495   ol_cv_pthread_pthread=yes
7496 else
7497   echo "configure: failed program was:" >&5
7498   cat conftest.$ac_ext >&5
7499   rm -rf conftest*
7500   ol_cv_pthread_pthread=no
7501 fi
7502 rm -f conftest*
7503 else
7504   cat > conftest.$ac_ext <<EOF
7505 #line 7506 "configure"
7506 #include "confdefs.h"
7507 /* pthread test headers */
7508 #include <pthread.h>
7509 #ifndef NULL
7510 #define NULL (void*)0
7511 #endif
7512
7513 static void *task(p)
7514         void *p;
7515 {
7516         return (void *) (p == NULL);
7517 }
7518
7519
7520 int main(argc, argv)
7521         int argc;
7522         char **argv;
7523 {
7524
7525         /* pthread test function */
7526         pthread_t t;
7527         int status;
7528 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7529         /* This system (e.g. AIX) defaults detached; must override */
7530         pthread_attr_t attr;
7531
7532         status = pthread_attr_init(&attr);
7533         if( status ) exit( status );
7534
7535         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7536         if( status ) exit( status );
7537
7538 #define ATTR    &attr
7539 #else
7540 #if HAVE_PTHREADS_D4
7541 #define ATTR    pthread_attr_default
7542 #else
7543 #define ATTR    NULL
7544 #endif
7545 #endif
7546         /* make sure pthread_create() isn't just a stub */
7547         status = pthread_create(&t, ATTR, task, NULL);
7548         if( status ) exit( status );
7549
7550         /* make sure pthread_detach() isn't just a stub */
7551 #if HAVE_PTHREADS_D4
7552         status = pthread_detach( &t );
7553 #else
7554         status = pthread_detach( t );
7555 #endif
7556
7557 #ifdef HAVE_LINUX_THREADS
7558         pthread_kill_other_threads_np();
7559 #endif
7560
7561         exit( status );
7562
7563 }
7564
7565 EOF
7566 if { (eval echo configure:7567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7567 then
7568   ol_cv_pthread_pthread=yes
7569 else
7570   echo "configure: failed program was:" >&5
7571   cat conftest.$ac_ext >&5
7572   rm -fr conftest*
7573   ol_cv_pthread_pthread=no
7574 fi
7575 rm -fr conftest*
7576 fi
7577
7578
7579                 # restore the LIBS
7580                 LIBS="$ol_LIBS"
7581         
7582 fi
7583
7584 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7585
7586         if test $ol_cv_pthread_pthread = yes ; then
7587                 ol_link_pthreads="-pthread"
7588                 ol_link_threads=posix
7589         fi
7590 fi
7591
7592                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7593 if test "$ol_link_threads" = no ; then
7594         # try -pthreads
7595         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7596 echo "configure:7597: checking for pthread link with -pthreads" >&5
7597 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7598   echo $ac_n "(cached) $ac_c" 1>&6
7599 else
7600   
7601                 # save the flags
7602                 ol_LIBS="$LIBS"
7603                 LIBS="-pthreads $LIBS"
7604
7605                 if test "$cross_compiling" = yes; then
7606   cat > conftest.$ac_ext <<EOF
7607 #line 7608 "configure"
7608 #include "confdefs.h"
7609 /* pthread test headers */
7610 #include <pthread.h>
7611 #ifndef NULL
7612 #define NULL (void*)0
7613 #endif
7614
7615 static void *task(p)
7616         void *p;
7617 {
7618         return (void *) (p == NULL);
7619 }
7620
7621 int main() {
7622
7623         /* pthread test function */
7624         pthread_t t;
7625         int status;
7626 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7627         /* This system (e.g. AIX) defaults detached; must override */
7628         pthread_attr_t attr;
7629
7630         status = pthread_attr_init(&attr);
7631         if( status ) exit( status );
7632
7633         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7634         if( status ) exit( status );
7635
7636 #define ATTR    &attr
7637 #else
7638 #if HAVE_PTHREADS_D4
7639 #define ATTR    pthread_attr_default
7640 #else
7641 #define ATTR    NULL
7642 #endif
7643 #endif
7644         /* make sure pthread_create() isn't just a stub */
7645         status = pthread_create(&t, ATTR, task, NULL);
7646         if( status ) exit( status );
7647
7648         /* make sure pthread_detach() isn't just a stub */
7649 #if HAVE_PTHREADS_D4
7650         status = pthread_detach( &t );
7651 #else
7652         status = pthread_detach( t );
7653 #endif
7654
7655 #ifdef HAVE_LINUX_THREADS
7656         pthread_kill_other_threads_np();
7657 #endif
7658
7659         exit( status );
7660
7661 ; return 0; }
7662 EOF
7663 if { (eval echo configure:7664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7664   rm -rf conftest*
7665   ol_cv_pthread_pthreads=yes
7666 else
7667   echo "configure: failed program was:" >&5
7668   cat conftest.$ac_ext >&5
7669   rm -rf conftest*
7670   ol_cv_pthread_pthreads=no
7671 fi
7672 rm -f conftest*
7673 else
7674   cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* pthread test headers */
7678 #include <pthread.h>
7679 #ifndef NULL
7680 #define NULL (void*)0
7681 #endif
7682
7683 static void *task(p)
7684         void *p;
7685 {
7686         return (void *) (p == NULL);
7687 }
7688
7689
7690 int main(argc, argv)
7691         int argc;
7692         char **argv;
7693 {
7694
7695         /* pthread test function */
7696         pthread_t t;
7697         int status;
7698 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7699         /* This system (e.g. AIX) defaults detached; must override */
7700         pthread_attr_t attr;
7701
7702         status = pthread_attr_init(&attr);
7703         if( status ) exit( status );
7704
7705         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7706         if( status ) exit( status );
7707
7708 #define ATTR    &attr
7709 #else
7710 #if HAVE_PTHREADS_D4
7711 #define ATTR    pthread_attr_default
7712 #else
7713 #define ATTR    NULL
7714 #endif
7715 #endif
7716         /* make sure pthread_create() isn't just a stub */
7717         status = pthread_create(&t, ATTR, task, NULL);
7718         if( status ) exit( status );
7719
7720         /* make sure pthread_detach() isn't just a stub */
7721 #if HAVE_PTHREADS_D4
7722         status = pthread_detach( &t );
7723 #else
7724         status = pthread_detach( t );
7725 #endif
7726
7727 #ifdef HAVE_LINUX_THREADS
7728         pthread_kill_other_threads_np();
7729 #endif
7730
7731         exit( status );
7732
7733 }
7734
7735 EOF
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7737 then
7738   ol_cv_pthread_pthreads=yes
7739 else
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -fr conftest*
7743   ol_cv_pthread_pthreads=no
7744 fi
7745 rm -fr conftest*
7746 fi
7747
7748
7749                 # restore the LIBS
7750                 LIBS="$ol_LIBS"
7751         
7752 fi
7753
7754 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7755
7756         if test $ol_cv_pthread_pthreads = yes ; then
7757                 ol_link_pthreads="-pthreads"
7758                 ol_link_threads=posix
7759         fi
7760 fi
7761
7762                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7763 if test "$ol_link_threads" = no ; then
7764         # try -mthreads
7765         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7766 echo "configure:7767: checking for pthread link with -mthreads" >&5
7767 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7768   echo $ac_n "(cached) $ac_c" 1>&6
7769 else
7770   
7771                 # save the flags
7772                 ol_LIBS="$LIBS"
7773                 LIBS="-mthreads $LIBS"
7774
7775                 if test "$cross_compiling" = yes; then
7776   cat > conftest.$ac_ext <<EOF
7777 #line 7778 "configure"
7778 #include "confdefs.h"
7779 /* pthread test headers */
7780 #include <pthread.h>
7781 #ifndef NULL
7782 #define NULL (void*)0
7783 #endif
7784
7785 static void *task(p)
7786         void *p;
7787 {
7788         return (void *) (p == NULL);
7789 }
7790
7791 int main() {
7792
7793         /* pthread test function */
7794         pthread_t t;
7795         int status;
7796 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7797         /* This system (e.g. AIX) defaults detached; must override */
7798         pthread_attr_t attr;
7799
7800         status = pthread_attr_init(&attr);
7801         if( status ) exit( status );
7802
7803         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7804         if( status ) exit( status );
7805
7806 #define ATTR    &attr
7807 #else
7808 #if HAVE_PTHREADS_D4
7809 #define ATTR    pthread_attr_default
7810 #else
7811 #define ATTR    NULL
7812 #endif
7813 #endif
7814         /* make sure pthread_create() isn't just a stub */
7815         status = pthread_create(&t, ATTR, task, NULL);
7816         if( status ) exit( status );
7817
7818         /* make sure pthread_detach() isn't just a stub */
7819 #if HAVE_PTHREADS_D4
7820         status = pthread_detach( &t );
7821 #else
7822         status = pthread_detach( t );
7823 #endif
7824
7825 #ifdef HAVE_LINUX_THREADS
7826         pthread_kill_other_threads_np();
7827 #endif
7828
7829         exit( status );
7830
7831 ; return 0; }
7832 EOF
7833 if { (eval echo configure:7834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7834   rm -rf conftest*
7835   ol_cv_pthread_mthreads=yes
7836 else
7837   echo "configure: failed program was:" >&5
7838   cat conftest.$ac_ext >&5
7839   rm -rf conftest*
7840   ol_cv_pthread_mthreads=no
7841 fi
7842 rm -f conftest*
7843 else
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 /* pthread test headers */
7848 #include <pthread.h>
7849 #ifndef NULL
7850 #define NULL (void*)0
7851 #endif
7852
7853 static void *task(p)
7854         void *p;
7855 {
7856         return (void *) (p == NULL);
7857 }
7858
7859
7860 int main(argc, argv)
7861         int argc;
7862         char **argv;
7863 {
7864
7865         /* pthread test function */
7866         pthread_t t;
7867         int status;
7868 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7869         /* This system (e.g. AIX) defaults detached; must override */
7870         pthread_attr_t attr;
7871
7872         status = pthread_attr_init(&attr);
7873         if( status ) exit( status );
7874
7875         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7876         if( status ) exit( status );
7877
7878 #define ATTR    &attr
7879 #else
7880 #if HAVE_PTHREADS_D4
7881 #define ATTR    pthread_attr_default
7882 #else
7883 #define ATTR    NULL
7884 #endif
7885 #endif
7886         /* make sure pthread_create() isn't just a stub */
7887         status = pthread_create(&t, ATTR, task, NULL);
7888         if( status ) exit( status );
7889
7890         /* make sure pthread_detach() isn't just a stub */
7891 #if HAVE_PTHREADS_D4
7892         status = pthread_detach( &t );
7893 #else
7894         status = pthread_detach( t );
7895 #endif
7896
7897 #ifdef HAVE_LINUX_THREADS
7898         pthread_kill_other_threads_np();
7899 #endif
7900
7901         exit( status );
7902
7903 }
7904
7905 EOF
7906 if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7907 then
7908   ol_cv_pthread_mthreads=yes
7909 else
7910   echo "configure: failed program was:" >&5
7911   cat conftest.$ac_ext >&5
7912   rm -fr conftest*
7913   ol_cv_pthread_mthreads=no
7914 fi
7915 rm -fr conftest*
7916 fi
7917
7918
7919                 # restore the LIBS
7920                 LIBS="$ol_LIBS"
7921         
7922 fi
7923
7924 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7925
7926         if test $ol_cv_pthread_mthreads = yes ; then
7927                 ol_link_pthreads="-mthreads"
7928                 ol_link_threads=posix
7929         fi
7930 fi
7931
7932                 # Pthread try link: -thread (ol_cv_pthread_thread)
7933 if test "$ol_link_threads" = no ; then
7934         # try -thread
7935         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7936 echo "configure:7937: checking for pthread link with -thread" >&5
7937 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7938   echo $ac_n "(cached) $ac_c" 1>&6
7939 else
7940   
7941                 # save the flags
7942                 ol_LIBS="$LIBS"
7943                 LIBS="-thread $LIBS"
7944
7945                 if test "$cross_compiling" = yes; then
7946   cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949 /* pthread test headers */
7950 #include <pthread.h>
7951 #ifndef NULL
7952 #define NULL (void*)0
7953 #endif
7954
7955 static void *task(p)
7956         void *p;
7957 {
7958         return (void *) (p == NULL);
7959 }
7960
7961 int main() {
7962
7963         /* pthread test function */
7964         pthread_t t;
7965         int status;
7966 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7967         /* This system (e.g. AIX) defaults detached; must override */
7968         pthread_attr_t attr;
7969
7970         status = pthread_attr_init(&attr);
7971         if( status ) exit( status );
7972
7973         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7974         if( status ) exit( status );
7975
7976 #define ATTR    &attr
7977 #else
7978 #if HAVE_PTHREADS_D4
7979 #define ATTR    pthread_attr_default
7980 #else
7981 #define ATTR    NULL
7982 #endif
7983 #endif
7984         /* make sure pthread_create() isn't just a stub */
7985         status = pthread_create(&t, ATTR, task, NULL);
7986         if( status ) exit( status );
7987
7988         /* make sure pthread_detach() isn't just a stub */
7989 #if HAVE_PTHREADS_D4
7990         status = pthread_detach( &t );
7991 #else
7992         status = pthread_detach( t );
7993 #endif
7994
7995 #ifdef HAVE_LINUX_THREADS
7996         pthread_kill_other_threads_np();
7997 #endif
7998
7999         exit( status );
8000
8001 ; return 0; }
8002 EOF
8003 if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8004   rm -rf conftest*
8005   ol_cv_pthread_thread=yes
8006 else
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -rf conftest*
8010   ol_cv_pthread_thread=no
8011 fi
8012 rm -f conftest*
8013 else
8014   cat > conftest.$ac_ext <<EOF
8015 #line 8016 "configure"
8016 #include "confdefs.h"
8017 /* pthread test headers */
8018 #include <pthread.h>
8019 #ifndef NULL
8020 #define NULL (void*)0
8021 #endif
8022
8023 static void *task(p)
8024         void *p;
8025 {
8026         return (void *) (p == NULL);
8027 }
8028
8029
8030 int main(argc, argv)
8031         int argc;
8032         char **argv;
8033 {
8034
8035         /* pthread test function */
8036         pthread_t t;
8037         int status;
8038 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8039         /* This system (e.g. AIX) defaults detached; must override */
8040         pthread_attr_t attr;
8041
8042         status = pthread_attr_init(&attr);
8043         if( status ) exit( status );
8044
8045         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8046         if( status ) exit( status );
8047
8048 #define ATTR    &attr
8049 #else
8050 #if HAVE_PTHREADS_D4
8051 #define ATTR    pthread_attr_default
8052 #else
8053 #define ATTR    NULL
8054 #endif
8055 #endif
8056         /* make sure pthread_create() isn't just a stub */
8057         status = pthread_create(&t, ATTR, task, NULL);
8058         if( status ) exit( status );
8059
8060         /* make sure pthread_detach() isn't just a stub */
8061 #if HAVE_PTHREADS_D4
8062         status = pthread_detach( &t );
8063 #else
8064         status = pthread_detach( t );
8065 #endif
8066
8067 #ifdef HAVE_LINUX_THREADS
8068         pthread_kill_other_threads_np();
8069 #endif
8070
8071         exit( status );
8072
8073 }
8074
8075 EOF
8076 if { (eval echo configure:8077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8077 then
8078   ol_cv_pthread_thread=yes
8079 else
8080   echo "configure: failed program was:" >&5
8081   cat conftest.$ac_ext >&5
8082   rm -fr conftest*
8083   ol_cv_pthread_thread=no
8084 fi
8085 rm -fr conftest*
8086 fi
8087
8088
8089                 # restore the LIBS
8090                 LIBS="$ol_LIBS"
8091         
8092 fi
8093
8094 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8095
8096         if test $ol_cv_pthread_thread = yes ; then
8097                 ol_link_pthreads="-thread"
8098                 ol_link_threads=posix
8099         fi
8100 fi
8101
8102
8103                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8104 if test "$ol_link_threads" = no ; then
8105         # try -lpthread -lmach -lexc -lc_r
8106         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8107 echo "configure:8108: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8108 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8109   echo $ac_n "(cached) $ac_c" 1>&6
8110 else
8111   
8112                 # save the flags
8113                 ol_LIBS="$LIBS"
8114                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8115
8116                 if test "$cross_compiling" = yes; then
8117   cat > conftest.$ac_ext <<EOF
8118 #line 8119 "configure"
8119 #include "confdefs.h"
8120 /* pthread test headers */
8121 #include <pthread.h>
8122 #ifndef NULL
8123 #define NULL (void*)0
8124 #endif
8125
8126 static void *task(p)
8127         void *p;
8128 {
8129         return (void *) (p == NULL);
8130 }
8131
8132 int main() {
8133
8134         /* pthread test function */
8135         pthread_t t;
8136         int status;
8137 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8138         /* This system (e.g. AIX) defaults detached; must override */
8139         pthread_attr_t attr;
8140
8141         status = pthread_attr_init(&attr);
8142         if( status ) exit( status );
8143
8144         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8145         if( status ) exit( status );
8146
8147 #define ATTR    &attr
8148 #else
8149 #if HAVE_PTHREADS_D4
8150 #define ATTR    pthread_attr_default
8151 #else
8152 #define ATTR    NULL
8153 #endif
8154 #endif
8155         /* make sure pthread_create() isn't just a stub */
8156         status = pthread_create(&t, ATTR, task, NULL);
8157         if( status ) exit( status );
8158
8159         /* make sure pthread_detach() isn't just a stub */
8160 #if HAVE_PTHREADS_D4
8161         status = pthread_detach( &t );
8162 #else
8163         status = pthread_detach( t );
8164 #endif
8165
8166 #ifdef HAVE_LINUX_THREADS
8167         pthread_kill_other_threads_np();
8168 #endif
8169
8170         exit( status );
8171
8172 ; return 0; }
8173 EOF
8174 if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8175   rm -rf conftest*
8176   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8177 else
8178   echo "configure: failed program was:" >&5
8179   cat conftest.$ac_ext >&5
8180   rm -rf conftest*
8181   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8182 fi
8183 rm -f conftest*
8184 else
8185   cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 /* pthread test headers */
8189 #include <pthread.h>
8190 #ifndef NULL
8191 #define NULL (void*)0
8192 #endif
8193
8194 static void *task(p)
8195         void *p;
8196 {
8197         return (void *) (p == NULL);
8198 }
8199
8200
8201 int main(argc, argv)
8202         int argc;
8203         char **argv;
8204 {
8205
8206         /* pthread test function */
8207         pthread_t t;
8208         int status;
8209 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8210         /* This system (e.g. AIX) defaults detached; must override */
8211         pthread_attr_t attr;
8212
8213         status = pthread_attr_init(&attr);
8214         if( status ) exit( status );
8215
8216         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8217         if( status ) exit( status );
8218
8219 #define ATTR    &attr
8220 #else
8221 #if HAVE_PTHREADS_D4
8222 #define ATTR    pthread_attr_default
8223 #else
8224 #define ATTR    NULL
8225 #endif
8226 #endif
8227         /* make sure pthread_create() isn't just a stub */
8228         status = pthread_create(&t, ATTR, task, NULL);
8229         if( status ) exit( status );
8230
8231         /* make sure pthread_detach() isn't just a stub */
8232 #if HAVE_PTHREADS_D4
8233         status = pthread_detach( &t );
8234 #else
8235         status = pthread_detach( t );
8236 #endif
8237
8238 #ifdef HAVE_LINUX_THREADS
8239         pthread_kill_other_threads_np();
8240 #endif
8241
8242         exit( status );
8243
8244 }
8245
8246 EOF
8247 if { (eval echo configure:8248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8248 then
8249   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8250 else
8251   echo "configure: failed program was:" >&5
8252   cat conftest.$ac_ext >&5
8253   rm -fr conftest*
8254   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8255 fi
8256 rm -fr conftest*
8257 fi
8258
8259
8260                 # restore the LIBS
8261                 LIBS="$ol_LIBS"
8262         
8263 fi
8264
8265 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8266
8267         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8268                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8269                 ol_link_threads=posix
8270         fi
8271 fi
8272
8273                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8274 if test "$ol_link_threads" = no ; then
8275         # try -lpthread -lmach -lexc
8276         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8277 echo "configure:8278: checking for pthread link with -lpthread -lmach -lexc" >&5
8278 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   
8282                 # save the flags
8283                 ol_LIBS="$LIBS"
8284                 LIBS="-lpthread -lmach -lexc $LIBS"
8285
8286                 if test "$cross_compiling" = yes; then
8287   cat > conftest.$ac_ext <<EOF
8288 #line 8289 "configure"
8289 #include "confdefs.h"
8290 /* pthread test headers */
8291 #include <pthread.h>
8292 #ifndef NULL
8293 #define NULL (void*)0
8294 #endif
8295
8296 static void *task(p)
8297         void *p;
8298 {
8299         return (void *) (p == NULL);
8300 }
8301
8302 int main() {
8303
8304         /* pthread test function */
8305         pthread_t t;
8306         int status;
8307 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8308         /* This system (e.g. AIX) defaults detached; must override */
8309         pthread_attr_t attr;
8310
8311         status = pthread_attr_init(&attr);
8312         if( status ) exit( status );
8313
8314         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8315         if( status ) exit( status );
8316
8317 #define ATTR    &attr
8318 #else
8319 #if HAVE_PTHREADS_D4
8320 #define ATTR    pthread_attr_default
8321 #else
8322 #define ATTR    NULL
8323 #endif
8324 #endif
8325         /* make sure pthread_create() isn't just a stub */
8326         status = pthread_create(&t, ATTR, task, NULL);
8327         if( status ) exit( status );
8328
8329         /* make sure pthread_detach() isn't just a stub */
8330 #if HAVE_PTHREADS_D4
8331         status = pthread_detach( &t );
8332 #else
8333         status = pthread_detach( t );
8334 #endif
8335
8336 #ifdef HAVE_LINUX_THREADS
8337         pthread_kill_other_threads_np();
8338 #endif
8339
8340         exit( status );
8341
8342 ; return 0; }
8343 EOF
8344 if { (eval echo configure:8345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8345   rm -rf conftest*
8346   ol_cv_pthread_lpthread_lmach_lexc=yes
8347 else
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   ol_cv_pthread_lpthread_lmach_lexc=no
8352 fi
8353 rm -f conftest*
8354 else
8355   cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358 /* pthread test headers */
8359 #include <pthread.h>
8360 #ifndef NULL
8361 #define NULL (void*)0
8362 #endif
8363
8364 static void *task(p)
8365         void *p;
8366 {
8367         return (void *) (p == NULL);
8368 }
8369
8370
8371 int main(argc, argv)
8372         int argc;
8373         char **argv;
8374 {
8375
8376         /* pthread test function */
8377         pthread_t t;
8378         int status;
8379 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8380         /* This system (e.g. AIX) defaults detached; must override */
8381         pthread_attr_t attr;
8382
8383         status = pthread_attr_init(&attr);
8384         if( status ) exit( status );
8385
8386         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8387         if( status ) exit( status );
8388
8389 #define ATTR    &attr
8390 #else
8391 #if HAVE_PTHREADS_D4
8392 #define ATTR    pthread_attr_default
8393 #else
8394 #define ATTR    NULL
8395 #endif
8396 #endif
8397         /* make sure pthread_create() isn't just a stub */
8398         status = pthread_create(&t, ATTR, task, NULL);
8399         if( status ) exit( status );
8400
8401         /* make sure pthread_detach() isn't just a stub */
8402 #if HAVE_PTHREADS_D4
8403         status = pthread_detach( &t );
8404 #else
8405         status = pthread_detach( t );
8406 #endif
8407
8408 #ifdef HAVE_LINUX_THREADS
8409         pthread_kill_other_threads_np();
8410 #endif
8411
8412         exit( status );
8413
8414 }
8415
8416 EOF
8417 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8418 then
8419   ol_cv_pthread_lpthread_lmach_lexc=yes
8420 else
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -fr conftest*
8424   ol_cv_pthread_lpthread_lmach_lexc=no
8425 fi
8426 rm -fr conftest*
8427 fi
8428
8429
8430                 # restore the LIBS
8431                 LIBS="$ol_LIBS"
8432         
8433 fi
8434
8435 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8436
8437         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8438                 ol_link_pthreads="-lpthread -lmach -lexc"
8439                 ol_link_threads=posix
8440         fi
8441 fi
8442
8443
8444                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8445 if test "$ol_link_threads" = no ; then
8446         # try -lpthread -Wl,-woff,85
8447         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8448 echo "configure:8449: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8449 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8450   echo $ac_n "(cached) $ac_c" 1>&6
8451 else
8452   
8453                 # save the flags
8454                 ol_LIBS="$LIBS"
8455                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8456
8457                 if test "$cross_compiling" = yes; then
8458   cat > conftest.$ac_ext <<EOF
8459 #line 8460 "configure"
8460 #include "confdefs.h"
8461 /* pthread test headers */
8462 #include <pthread.h>
8463 #ifndef NULL
8464 #define NULL (void*)0
8465 #endif
8466
8467 static void *task(p)
8468         void *p;
8469 {
8470         return (void *) (p == NULL);
8471 }
8472
8473 int main() {
8474
8475         /* pthread test function */
8476         pthread_t t;
8477         int status;
8478 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8479         /* This system (e.g. AIX) defaults detached; must override */
8480         pthread_attr_t attr;
8481
8482         status = pthread_attr_init(&attr);
8483         if( status ) exit( status );
8484
8485         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8486         if( status ) exit( status );
8487
8488 #define ATTR    &attr
8489 #else
8490 #if HAVE_PTHREADS_D4
8491 #define ATTR    pthread_attr_default
8492 #else
8493 #define ATTR    NULL
8494 #endif
8495 #endif
8496         /* make sure pthread_create() isn't just a stub */
8497         status = pthread_create(&t, ATTR, task, NULL);
8498         if( status ) exit( status );
8499
8500         /* make sure pthread_detach() isn't just a stub */
8501 #if HAVE_PTHREADS_D4
8502         status = pthread_detach( &t );
8503 #else
8504         status = pthread_detach( t );
8505 #endif
8506
8507 #ifdef HAVE_LINUX_THREADS
8508         pthread_kill_other_threads_np();
8509 #endif
8510
8511         exit( status );
8512
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   ol_cv_pthread_lib_lpthread_woff=yes
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   ol_cv_pthread_lib_lpthread_woff=no
8523 fi
8524 rm -f conftest*
8525 else
8526   cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529 /* pthread test headers */
8530 #include <pthread.h>
8531 #ifndef NULL
8532 #define NULL (void*)0
8533 #endif
8534
8535 static void *task(p)
8536         void *p;
8537 {
8538         return (void *) (p == NULL);
8539 }
8540
8541
8542 int main(argc, argv)
8543         int argc;
8544         char **argv;
8545 {
8546
8547         /* pthread test function */
8548         pthread_t t;
8549         int status;
8550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8551         /* This system (e.g. AIX) defaults detached; must override */
8552         pthread_attr_t attr;
8553
8554         status = pthread_attr_init(&attr);
8555         if( status ) exit( status );
8556
8557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8558         if( status ) exit( status );
8559
8560 #define ATTR    &attr
8561 #else
8562 #if HAVE_PTHREADS_D4
8563 #define ATTR    pthread_attr_default
8564 #else
8565 #define ATTR    NULL
8566 #endif
8567 #endif
8568         /* make sure pthread_create() isn't just a stub */
8569         status = pthread_create(&t, ATTR, task, NULL);
8570         if( status ) exit( status );
8571
8572         /* make sure pthread_detach() isn't just a stub */
8573 #if HAVE_PTHREADS_D4
8574         status = pthread_detach( &t );
8575 #else
8576         status = pthread_detach( t );
8577 #endif
8578
8579 #ifdef HAVE_LINUX_THREADS
8580         pthread_kill_other_threads_np();
8581 #endif
8582
8583         exit( status );
8584
8585 }
8586
8587 EOF
8588 if { (eval echo configure:8589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8589 then
8590   ol_cv_pthread_lib_lpthread_woff=yes
8591 else
8592   echo "configure: failed program was:" >&5
8593   cat conftest.$ac_ext >&5
8594   rm -fr conftest*
8595   ol_cv_pthread_lib_lpthread_woff=no
8596 fi
8597 rm -fr conftest*
8598 fi
8599
8600
8601                 # restore the LIBS
8602                 LIBS="$ol_LIBS"
8603         
8604 fi
8605
8606 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8607
8608         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8609                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8610                 ol_link_threads=posix
8611         fi
8612 fi
8613
8614
8615                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8616 if test "$ol_link_threads" = no ; then
8617         # try -lpthread
8618         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8619 echo "configure:8620: checking for pthread link with -lpthread" >&5
8620 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8621   echo $ac_n "(cached) $ac_c" 1>&6
8622 else
8623   
8624                 # save the flags
8625                 ol_LIBS="$LIBS"
8626                 LIBS="-lpthread $LIBS"
8627
8628                 if test "$cross_compiling" = yes; then
8629   cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 /* pthread test headers */
8633 #include <pthread.h>
8634 #ifndef NULL
8635 #define NULL (void*)0
8636 #endif
8637
8638 static void *task(p)
8639         void *p;
8640 {
8641         return (void *) (p == NULL);
8642 }
8643
8644 int main() {
8645
8646         /* pthread test function */
8647         pthread_t t;
8648         int status;
8649 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8650         /* This system (e.g. AIX) defaults detached; must override */
8651         pthread_attr_t attr;
8652
8653         status = pthread_attr_init(&attr);
8654         if( status ) exit( status );
8655
8656         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8657         if( status ) exit( status );
8658
8659 #define ATTR    &attr
8660 #else
8661 #if HAVE_PTHREADS_D4
8662 #define ATTR    pthread_attr_default
8663 #else
8664 #define ATTR    NULL
8665 #endif
8666 #endif
8667         /* make sure pthread_create() isn't just a stub */
8668         status = pthread_create(&t, ATTR, task, NULL);
8669         if( status ) exit( status );
8670
8671         /* make sure pthread_detach() isn't just a stub */
8672 #if HAVE_PTHREADS_D4
8673         status = pthread_detach( &t );
8674 #else
8675         status = pthread_detach( t );
8676 #endif
8677
8678 #ifdef HAVE_LINUX_THREADS
8679         pthread_kill_other_threads_np();
8680 #endif
8681
8682         exit( status );
8683
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687   rm -rf conftest*
8688   ol_cv_pthread_lpthread=yes
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   ol_cv_pthread_lpthread=no
8694 fi
8695 rm -f conftest*
8696 else
8697   cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* pthread test headers */
8701 #include <pthread.h>
8702 #ifndef NULL
8703 #define NULL (void*)0
8704 #endif
8705
8706 static void *task(p)
8707         void *p;
8708 {
8709         return (void *) (p == NULL);
8710 }
8711
8712
8713 int main(argc, argv)
8714         int argc;
8715         char **argv;
8716 {
8717
8718         /* pthread test function */
8719         pthread_t t;
8720         int status;
8721 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8722         /* This system (e.g. AIX) defaults detached; must override */
8723         pthread_attr_t attr;
8724
8725         status = pthread_attr_init(&attr);
8726         if( status ) exit( status );
8727
8728         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8729         if( status ) exit( status );
8730
8731 #define ATTR    &attr
8732 #else
8733 #if HAVE_PTHREADS_D4
8734 #define ATTR    pthread_attr_default
8735 #else
8736 #define ATTR    NULL
8737 #endif
8738 #endif
8739         /* make sure pthread_create() isn't just a stub */
8740         status = pthread_create(&t, ATTR, task, NULL);
8741         if( status ) exit( status );
8742
8743         /* make sure pthread_detach() isn't just a stub */
8744 #if HAVE_PTHREADS_D4
8745         status = pthread_detach( &t );
8746 #else
8747         status = pthread_detach( t );
8748 #endif
8749
8750 #ifdef HAVE_LINUX_THREADS
8751         pthread_kill_other_threads_np();
8752 #endif
8753
8754         exit( status );
8755
8756 }
8757
8758 EOF
8759 if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8760 then
8761   ol_cv_pthread_lpthread=yes
8762 else
8763   echo "configure: failed program was:" >&5
8764   cat conftest.$ac_ext >&5
8765   rm -fr conftest*
8766   ol_cv_pthread_lpthread=no
8767 fi
8768 rm -fr conftest*
8769 fi
8770
8771
8772                 # restore the LIBS
8773                 LIBS="$ol_LIBS"
8774         
8775 fi
8776
8777 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8778
8779         if test $ol_cv_pthread_lpthread = yes ; then
8780                 ol_link_pthreads="-lpthread"
8781                 ol_link_threads=posix
8782         fi
8783 fi
8784
8785                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8786 if test "$ol_link_threads" = no ; then
8787         # try -lc_r
8788         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8789 echo "configure:8790: checking for pthread link with -lc_r" >&5
8790 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8791   echo $ac_n "(cached) $ac_c" 1>&6
8792 else
8793   
8794                 # save the flags
8795                 ol_LIBS="$LIBS"
8796                 LIBS="-lc_r $LIBS"
8797
8798                 if test "$cross_compiling" = yes; then
8799   cat > conftest.$ac_ext <<EOF
8800 #line 8801 "configure"
8801 #include "confdefs.h"
8802 /* pthread test headers */
8803 #include <pthread.h>
8804 #ifndef NULL
8805 #define NULL (void*)0
8806 #endif
8807
8808 static void *task(p)
8809         void *p;
8810 {
8811         return (void *) (p == NULL);
8812 }
8813
8814 int main() {
8815
8816         /* pthread test function */
8817         pthread_t t;
8818         int status;
8819 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8820         /* This system (e.g. AIX) defaults detached; must override */
8821         pthread_attr_t attr;
8822
8823         status = pthread_attr_init(&attr);
8824         if( status ) exit( status );
8825
8826         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8827         if( status ) exit( status );
8828
8829 #define ATTR    &attr
8830 #else
8831 #if HAVE_PTHREADS_D4
8832 #define ATTR    pthread_attr_default
8833 #else
8834 #define ATTR    NULL
8835 #endif
8836 #endif
8837         /* make sure pthread_create() isn't just a stub */
8838         status = pthread_create(&t, ATTR, task, NULL);
8839         if( status ) exit( status );
8840
8841         /* make sure pthread_detach() isn't just a stub */
8842 #if HAVE_PTHREADS_D4
8843         status = pthread_detach( &t );
8844 #else
8845         status = pthread_detach( t );
8846 #endif
8847
8848 #ifdef HAVE_LINUX_THREADS
8849         pthread_kill_other_threads_np();
8850 #endif
8851
8852         exit( status );
8853
8854 ; return 0; }
8855 EOF
8856 if { (eval echo configure:8857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8857   rm -rf conftest*
8858   ol_cv_pthread_lc_r=yes
8859 else
8860   echo "configure: failed program was:" >&5
8861   cat conftest.$ac_ext >&5
8862   rm -rf conftest*
8863   ol_cv_pthread_lc_r=no
8864 fi
8865 rm -f conftest*
8866 else
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 /* pthread test headers */
8871 #include <pthread.h>
8872 #ifndef NULL
8873 #define NULL (void*)0
8874 #endif
8875
8876 static void *task(p)
8877         void *p;
8878 {
8879         return (void *) (p == NULL);
8880 }
8881
8882
8883 int main(argc, argv)
8884         int argc;
8885         char **argv;
8886 {
8887
8888         /* pthread test function */
8889         pthread_t t;
8890         int status;
8891 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8892         /* This system (e.g. AIX) defaults detached; must override */
8893         pthread_attr_t attr;
8894
8895         status = pthread_attr_init(&attr);
8896         if( status ) exit( status );
8897
8898         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8899         if( status ) exit( status );
8900
8901 #define ATTR    &attr
8902 #else
8903 #if HAVE_PTHREADS_D4
8904 #define ATTR    pthread_attr_default
8905 #else
8906 #define ATTR    NULL
8907 #endif
8908 #endif
8909         /* make sure pthread_create() isn't just a stub */
8910         status = pthread_create(&t, ATTR, task, NULL);
8911         if( status ) exit( status );
8912
8913         /* make sure pthread_detach() isn't just a stub */
8914 #if HAVE_PTHREADS_D4
8915         status = pthread_detach( &t );
8916 #else
8917         status = pthread_detach( t );
8918 #endif
8919
8920 #ifdef HAVE_LINUX_THREADS
8921         pthread_kill_other_threads_np();
8922 #endif
8923
8924         exit( status );
8925
8926 }
8927
8928 EOF
8929 if { (eval echo configure:8930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8930 then
8931   ol_cv_pthread_lc_r=yes
8932 else
8933   echo "configure: failed program was:" >&5
8934   cat conftest.$ac_ext >&5
8935   rm -fr conftest*
8936   ol_cv_pthread_lc_r=no
8937 fi
8938 rm -fr conftest*
8939 fi
8940
8941
8942                 # restore the LIBS
8943                 LIBS="$ol_LIBS"
8944         
8945 fi
8946
8947 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8948
8949         if test $ol_cv_pthread_lc_r = yes ; then
8950                 ol_link_pthreads="-lc_r"
8951                 ol_link_threads=posix
8952         fi
8953 fi
8954
8955
8956                 # Pthread try link: -threads (ol_cv_pthread_threads)
8957 if test "$ol_link_threads" = no ; then
8958         # try -threads
8959         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8960 echo "configure:8961: checking for pthread link with -threads" >&5
8961 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8962   echo $ac_n "(cached) $ac_c" 1>&6
8963 else
8964   
8965                 # save the flags
8966                 ol_LIBS="$LIBS"
8967                 LIBS="-threads $LIBS"
8968
8969                 if test "$cross_compiling" = yes; then
8970   cat > conftest.$ac_ext <<EOF
8971 #line 8972 "configure"
8972 #include "confdefs.h"
8973 /* pthread test headers */
8974 #include <pthread.h>
8975 #ifndef NULL
8976 #define NULL (void*)0
8977 #endif
8978
8979 static void *task(p)
8980         void *p;
8981 {
8982         return (void *) (p == NULL);
8983 }
8984
8985 int main() {
8986
8987         /* pthread test function */
8988         pthread_t t;
8989         int status;
8990 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8991         /* This system (e.g. AIX) defaults detached; must override */
8992         pthread_attr_t attr;
8993
8994         status = pthread_attr_init(&attr);
8995         if( status ) exit( status );
8996
8997         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8998         if( status ) exit( status );
8999
9000 #define ATTR    &attr
9001 #else
9002 #if HAVE_PTHREADS_D4
9003 #define ATTR    pthread_attr_default
9004 #else
9005 #define ATTR    NULL
9006 #endif
9007 #endif
9008         /* make sure pthread_create() isn't just a stub */
9009         status = pthread_create(&t, ATTR, task, NULL);
9010         if( status ) exit( status );
9011
9012         /* make sure pthread_detach() isn't just a stub */
9013 #if HAVE_PTHREADS_D4
9014         status = pthread_detach( &t );
9015 #else
9016         status = pthread_detach( t );
9017 #endif
9018
9019 #ifdef HAVE_LINUX_THREADS
9020         pthread_kill_other_threads_np();
9021 #endif
9022
9023         exit( status );
9024
9025 ; return 0; }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9028   rm -rf conftest*
9029   ol_cv_pthread_threads=yes
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   ol_cv_pthread_threads=no
9035 fi
9036 rm -f conftest*
9037 else
9038   cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041 /* pthread test headers */
9042 #include <pthread.h>
9043 #ifndef NULL
9044 #define NULL (void*)0
9045 #endif
9046
9047 static void *task(p)
9048         void *p;
9049 {
9050         return (void *) (p == NULL);
9051 }
9052
9053
9054 int main(argc, argv)
9055         int argc;
9056         char **argv;
9057 {
9058
9059         /* pthread test function */
9060         pthread_t t;
9061         int status;
9062 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9063         /* This system (e.g. AIX) defaults detached; must override */
9064         pthread_attr_t attr;
9065
9066         status = pthread_attr_init(&attr);
9067         if( status ) exit( status );
9068
9069         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9070         if( status ) exit( status );
9071
9072 #define ATTR    &attr
9073 #else
9074 #if HAVE_PTHREADS_D4
9075 #define ATTR    pthread_attr_default
9076 #else
9077 #define ATTR    NULL
9078 #endif
9079 #endif
9080         /* make sure pthread_create() isn't just a stub */
9081         status = pthread_create(&t, ATTR, task, NULL);
9082         if( status ) exit( status );
9083
9084         /* make sure pthread_detach() isn't just a stub */
9085 #if HAVE_PTHREADS_D4
9086         status = pthread_detach( &t );
9087 #else
9088         status = pthread_detach( t );
9089 #endif
9090
9091 #ifdef HAVE_LINUX_THREADS
9092         pthread_kill_other_threads_np();
9093 #endif
9094
9095         exit( status );
9096
9097 }
9098
9099 EOF
9100 if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9101 then
9102   ol_cv_pthread_threads=yes
9103 else
9104   echo "configure: failed program was:" >&5
9105   cat conftest.$ac_ext >&5
9106   rm -fr conftest*
9107   ol_cv_pthread_threads=no
9108 fi
9109 rm -fr conftest*
9110 fi
9111
9112
9113                 # restore the LIBS
9114                 LIBS="$ol_LIBS"
9115         
9116 fi
9117
9118 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9119
9120         if test $ol_cv_pthread_threads = yes ; then
9121                 ol_link_pthreads="-threads"
9122                 ol_link_threads=posix
9123         fi
9124 fi
9125
9126
9127                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9128 if test "$ol_link_threads" = no ; then
9129         # try -lpthreads -lmach -lexc -lc_r
9130         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9131 echo "configure:9132: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9132 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   
9136                 # save the flags
9137                 ol_LIBS="$LIBS"
9138                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9139
9140                 if test "$cross_compiling" = yes; then
9141   cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 /* pthread test headers */
9145 #include <pthread.h>
9146 #ifndef NULL
9147 #define NULL (void*)0
9148 #endif
9149
9150 static void *task(p)
9151         void *p;
9152 {
9153         return (void *) (p == NULL);
9154 }
9155
9156 int main() {
9157
9158         /* pthread test function */
9159         pthread_t t;
9160         int status;
9161 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9162         /* This system (e.g. AIX) defaults detached; must override */
9163         pthread_attr_t attr;
9164
9165         status = pthread_attr_init(&attr);
9166         if( status ) exit( status );
9167
9168         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9169         if( status ) exit( status );
9170
9171 #define ATTR    &attr
9172 #else
9173 #if HAVE_PTHREADS_D4
9174 #define ATTR    pthread_attr_default
9175 #else
9176 #define ATTR    NULL
9177 #endif
9178 #endif
9179         /* make sure pthread_create() isn't just a stub */
9180         status = pthread_create(&t, ATTR, task, NULL);
9181         if( status ) exit( status );
9182
9183         /* make sure pthread_detach() isn't just a stub */
9184 #if HAVE_PTHREADS_D4
9185         status = pthread_detach( &t );
9186 #else
9187         status = pthread_detach( t );
9188 #endif
9189
9190 #ifdef HAVE_LINUX_THREADS
9191         pthread_kill_other_threads_np();
9192 #endif
9193
9194         exit( status );
9195
9196 ; return 0; }
9197 EOF
9198 if { (eval echo configure:9199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9199   rm -rf conftest*
9200   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9201 else
9202   echo "configure: failed program was:" >&5
9203   cat conftest.$ac_ext >&5
9204   rm -rf conftest*
9205   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9206 fi
9207 rm -f conftest*
9208 else
9209   cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212 /* pthread test headers */
9213 #include <pthread.h>
9214 #ifndef NULL
9215 #define NULL (void*)0
9216 #endif
9217
9218 static void *task(p)
9219         void *p;
9220 {
9221         return (void *) (p == NULL);
9222 }
9223
9224
9225 int main(argc, argv)
9226         int argc;
9227         char **argv;
9228 {
9229
9230         /* pthread test function */
9231         pthread_t t;
9232         int status;
9233 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9234         /* This system (e.g. AIX) defaults detached; must override */
9235         pthread_attr_t attr;
9236
9237         status = pthread_attr_init(&attr);
9238         if( status ) exit( status );
9239
9240         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9241         if( status ) exit( status );
9242
9243 #define ATTR    &attr
9244 #else
9245 #if HAVE_PTHREADS_D4
9246 #define ATTR    pthread_attr_default
9247 #else
9248 #define ATTR    NULL
9249 #endif
9250 #endif
9251         /* make sure pthread_create() isn't just a stub */
9252         status = pthread_create(&t, ATTR, task, NULL);
9253         if( status ) exit( status );
9254
9255         /* make sure pthread_detach() isn't just a stub */
9256 #if HAVE_PTHREADS_D4
9257         status = pthread_detach( &t );
9258 #else
9259         status = pthread_detach( t );
9260 #endif
9261
9262 #ifdef HAVE_LINUX_THREADS
9263         pthread_kill_other_threads_np();
9264 #endif
9265
9266         exit( status );
9267
9268 }
9269
9270 EOF
9271 if { (eval echo configure:9272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9272 then
9273   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9274 else
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -fr conftest*
9278   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9279 fi
9280 rm -fr conftest*
9281 fi
9282
9283
9284                 # restore the LIBS
9285                 LIBS="$ol_LIBS"
9286         
9287 fi
9288
9289 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9290
9291         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9292                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9293                 ol_link_threads=posix
9294         fi
9295 fi
9296
9297                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9298 if test "$ol_link_threads" = no ; then
9299         # try -lpthreads -lmach -lexc
9300         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9301 echo "configure:9302: checking for pthread link with -lpthreads -lmach -lexc" >&5
9302 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9303   echo $ac_n "(cached) $ac_c" 1>&6
9304 else
9305   
9306                 # save the flags
9307                 ol_LIBS="$LIBS"
9308                 LIBS="-lpthreads -lmach -lexc $LIBS"
9309
9310                 if test "$cross_compiling" = yes; then
9311   cat > conftest.$ac_ext <<EOF
9312 #line 9313 "configure"
9313 #include "confdefs.h"
9314 /* pthread test headers */
9315 #include <pthread.h>
9316 #ifndef NULL
9317 #define NULL (void*)0
9318 #endif
9319
9320 static void *task(p)
9321         void *p;
9322 {
9323         return (void *) (p == NULL);
9324 }
9325
9326 int main() {
9327
9328         /* pthread test function */
9329         pthread_t t;
9330         int status;
9331 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9332         /* This system (e.g. AIX) defaults detached; must override */
9333         pthread_attr_t attr;
9334
9335         status = pthread_attr_init(&attr);
9336         if( status ) exit( status );
9337
9338         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9339         if( status ) exit( status );
9340
9341 #define ATTR    &attr
9342 #else
9343 #if HAVE_PTHREADS_D4
9344 #define ATTR    pthread_attr_default
9345 #else
9346 #define ATTR    NULL
9347 #endif
9348 #endif
9349         /* make sure pthread_create() isn't just a stub */
9350         status = pthread_create(&t, ATTR, task, NULL);
9351         if( status ) exit( status );
9352
9353         /* make sure pthread_detach() isn't just a stub */
9354 #if HAVE_PTHREADS_D4
9355         status = pthread_detach( &t );
9356 #else
9357         status = pthread_detach( t );
9358 #endif
9359
9360 #ifdef HAVE_LINUX_THREADS
9361         pthread_kill_other_threads_np();
9362 #endif
9363
9364         exit( status );
9365
9366 ; return 0; }
9367 EOF
9368 if { (eval echo configure:9369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9369   rm -rf conftest*
9370   ol_cv_pthread_lpthreads_lmach_lexc=yes
9371 else
9372   echo "configure: failed program was:" >&5
9373   cat conftest.$ac_ext >&5
9374   rm -rf conftest*
9375   ol_cv_pthread_lpthreads_lmach_lexc=no
9376 fi
9377 rm -f conftest*
9378 else
9379   cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382 /* pthread test headers */
9383 #include <pthread.h>
9384 #ifndef NULL
9385 #define NULL (void*)0
9386 #endif
9387
9388 static void *task(p)
9389         void *p;
9390 {
9391         return (void *) (p == NULL);
9392 }
9393
9394
9395 int main(argc, argv)
9396         int argc;
9397         char **argv;
9398 {
9399
9400         /* pthread test function */
9401         pthread_t t;
9402         int status;
9403 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9404         /* This system (e.g. AIX) defaults detached; must override */
9405         pthread_attr_t attr;
9406
9407         status = pthread_attr_init(&attr);
9408         if( status ) exit( status );
9409
9410         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9411         if( status ) exit( status );
9412
9413 #define ATTR    &attr
9414 #else
9415 #if HAVE_PTHREADS_D4
9416 #define ATTR    pthread_attr_default
9417 #else
9418 #define ATTR    NULL
9419 #endif
9420 #endif
9421         /* make sure pthread_create() isn't just a stub */
9422         status = pthread_create(&t, ATTR, task, NULL);
9423         if( status ) exit( status );
9424
9425         /* make sure pthread_detach() isn't just a stub */
9426 #if HAVE_PTHREADS_D4
9427         status = pthread_detach( &t );
9428 #else
9429         status = pthread_detach( t );
9430 #endif
9431
9432 #ifdef HAVE_LINUX_THREADS
9433         pthread_kill_other_threads_np();
9434 #endif
9435
9436         exit( status );
9437
9438 }
9439
9440 EOF
9441 if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9442 then
9443   ol_cv_pthread_lpthreads_lmach_lexc=yes
9444 else
9445   echo "configure: failed program was:" >&5
9446   cat conftest.$ac_ext >&5
9447   rm -fr conftest*
9448   ol_cv_pthread_lpthreads_lmach_lexc=no
9449 fi
9450 rm -fr conftest*
9451 fi
9452
9453
9454                 # restore the LIBS
9455                 LIBS="$ol_LIBS"
9456         
9457 fi
9458
9459 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9460
9461         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9462                 ol_link_pthreads="-lpthreads -lmach -lexc"
9463                 ol_link_threads=posix
9464         fi
9465 fi
9466
9467                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9468 if test "$ol_link_threads" = no ; then
9469         # try -lpthreads -lexc
9470         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9471 echo "configure:9472: checking for pthread link with -lpthreads -lexc" >&5
9472 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9473   echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475   
9476                 # save the flags
9477                 ol_LIBS="$LIBS"
9478                 LIBS="-lpthreads -lexc $LIBS"
9479
9480                 if test "$cross_compiling" = yes; then
9481   cat > conftest.$ac_ext <<EOF
9482 #line 9483 "configure"
9483 #include "confdefs.h"
9484 /* pthread test headers */
9485 #include <pthread.h>
9486 #ifndef NULL
9487 #define NULL (void*)0
9488 #endif
9489
9490 static void *task(p)
9491         void *p;
9492 {
9493         return (void *) (p == NULL);
9494 }
9495
9496 int main() {
9497
9498         /* pthread test function */
9499         pthread_t t;
9500         int status;
9501 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9502         /* This system (e.g. AIX) defaults detached; must override */
9503         pthread_attr_t attr;
9504
9505         status = pthread_attr_init(&attr);
9506         if( status ) exit( status );
9507
9508         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9509         if( status ) exit( status );
9510
9511 #define ATTR    &attr
9512 #else
9513 #if HAVE_PTHREADS_D4
9514 #define ATTR    pthread_attr_default
9515 #else
9516 #define ATTR    NULL
9517 #endif
9518 #endif
9519         /* make sure pthread_create() isn't just a stub */
9520         status = pthread_create(&t, ATTR, task, NULL);
9521         if( status ) exit( status );
9522
9523         /* make sure pthread_detach() isn't just a stub */
9524 #if HAVE_PTHREADS_D4
9525         status = pthread_detach( &t );
9526 #else
9527         status = pthread_detach( t );
9528 #endif
9529
9530 #ifdef HAVE_LINUX_THREADS
9531         pthread_kill_other_threads_np();
9532 #endif
9533
9534         exit( status );
9535
9536 ; return 0; }
9537 EOF
9538 if { (eval echo configure:9539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9539   rm -rf conftest*
9540   ol_cv_pthread_lpthreads_lexc=yes
9541 else
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -rf conftest*
9545   ol_cv_pthread_lpthreads_lexc=no
9546 fi
9547 rm -f conftest*
9548 else
9549   cat > conftest.$ac_ext <<EOF
9550 #line 9551 "configure"
9551 #include "confdefs.h"
9552 /* pthread test headers */
9553 #include <pthread.h>
9554 #ifndef NULL
9555 #define NULL (void*)0
9556 #endif
9557
9558 static void *task(p)
9559         void *p;
9560 {
9561         return (void *) (p == NULL);
9562 }
9563
9564
9565 int main(argc, argv)
9566         int argc;
9567         char **argv;
9568 {
9569
9570         /* pthread test function */
9571         pthread_t t;
9572         int status;
9573 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9574         /* This system (e.g. AIX) defaults detached; must override */
9575         pthread_attr_t attr;
9576
9577         status = pthread_attr_init(&attr);
9578         if( status ) exit( status );
9579
9580         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9581         if( status ) exit( status );
9582
9583 #define ATTR    &attr
9584 #else
9585 #if HAVE_PTHREADS_D4
9586 #define ATTR    pthread_attr_default
9587 #else
9588 #define ATTR    NULL
9589 #endif
9590 #endif
9591         /* make sure pthread_create() isn't just a stub */
9592         status = pthread_create(&t, ATTR, task, NULL);
9593         if( status ) exit( status );
9594
9595         /* make sure pthread_detach() isn't just a stub */
9596 #if HAVE_PTHREADS_D4
9597         status = pthread_detach( &t );
9598 #else
9599         status = pthread_detach( t );
9600 #endif
9601
9602 #ifdef HAVE_LINUX_THREADS
9603         pthread_kill_other_threads_np();
9604 #endif
9605
9606         exit( status );
9607
9608 }
9609
9610 EOF
9611 if { (eval echo configure:9612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9612 then
9613   ol_cv_pthread_lpthreads_lexc=yes
9614 else
9615   echo "configure: failed program was:" >&5
9616   cat conftest.$ac_ext >&5
9617   rm -fr conftest*
9618   ol_cv_pthread_lpthreads_lexc=no
9619 fi
9620 rm -fr conftest*
9621 fi
9622
9623
9624                 # restore the LIBS
9625                 LIBS="$ol_LIBS"
9626         
9627 fi
9628
9629 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9630
9631         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9632                 ol_link_pthreads="-lpthreads -lexc"
9633                 ol_link_threads=posix
9634         fi
9635 fi
9636
9637
9638                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9639 if test "$ol_link_threads" = no ; then
9640         # try -lpthreads
9641         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9642 echo "configure:9643: checking for pthread link with -lpthreads" >&5
9643 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9644   echo $ac_n "(cached) $ac_c" 1>&6
9645 else
9646   
9647                 # save the flags
9648                 ol_LIBS="$LIBS"
9649                 LIBS="-lpthreads $LIBS"
9650
9651                 if test "$cross_compiling" = yes; then
9652   cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 /* pthread test headers */
9656 #include <pthread.h>
9657 #ifndef NULL
9658 #define NULL (void*)0
9659 #endif
9660
9661 static void *task(p)
9662         void *p;
9663 {
9664         return (void *) (p == NULL);
9665 }
9666
9667 int main() {
9668
9669         /* pthread test function */
9670         pthread_t t;
9671         int status;
9672 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9673         /* This system (e.g. AIX) defaults detached; must override */
9674         pthread_attr_t attr;
9675
9676         status = pthread_attr_init(&attr);
9677         if( status ) exit( status );
9678
9679         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9680         if( status ) exit( status );
9681
9682 #define ATTR    &attr
9683 #else
9684 #if HAVE_PTHREADS_D4
9685 #define ATTR    pthread_attr_default
9686 #else
9687 #define ATTR    NULL
9688 #endif
9689 #endif
9690         /* make sure pthread_create() isn't just a stub */
9691         status = pthread_create(&t, ATTR, task, NULL);
9692         if( status ) exit( status );
9693
9694         /* make sure pthread_detach() isn't just a stub */
9695 #if HAVE_PTHREADS_D4
9696         status = pthread_detach( &t );
9697 #else
9698         status = pthread_detach( t );
9699 #endif
9700
9701 #ifdef HAVE_LINUX_THREADS
9702         pthread_kill_other_threads_np();
9703 #endif
9704
9705         exit( status );
9706
9707 ; return 0; }
9708 EOF
9709 if { (eval echo configure:9710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9710   rm -rf conftest*
9711   ol_cv_pthread_lib_lpthreads=yes
9712 else
9713   echo "configure: failed program was:" >&5
9714   cat conftest.$ac_ext >&5
9715   rm -rf conftest*
9716   ol_cv_pthread_lib_lpthreads=no
9717 fi
9718 rm -f conftest*
9719 else
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 /* pthread test headers */
9724 #include <pthread.h>
9725 #ifndef NULL
9726 #define NULL (void*)0
9727 #endif
9728
9729 static void *task(p)
9730         void *p;
9731 {
9732         return (void *) (p == NULL);
9733 }
9734
9735
9736 int main(argc, argv)
9737         int argc;
9738         char **argv;
9739 {
9740
9741         /* pthread test function */
9742         pthread_t t;
9743         int status;
9744 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9745         /* This system (e.g. AIX) defaults detached; must override */
9746         pthread_attr_t attr;
9747
9748         status = pthread_attr_init(&attr);
9749         if( status ) exit( status );
9750
9751         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9752         if( status ) exit( status );
9753
9754 #define ATTR    &attr
9755 #else
9756 #if HAVE_PTHREADS_D4
9757 #define ATTR    pthread_attr_default
9758 #else
9759 #define ATTR    NULL
9760 #endif
9761 #endif
9762         /* make sure pthread_create() isn't just a stub */
9763         status = pthread_create(&t, ATTR, task, NULL);
9764         if( status ) exit( status );
9765
9766         /* make sure pthread_detach() isn't just a stub */
9767 #if HAVE_PTHREADS_D4
9768         status = pthread_detach( &t );
9769 #else
9770         status = pthread_detach( t );
9771 #endif
9772
9773 #ifdef HAVE_LINUX_THREADS
9774         pthread_kill_other_threads_np();
9775 #endif
9776
9777         exit( status );
9778
9779 }
9780
9781 EOF
9782 if { (eval echo configure:9783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9783 then
9784   ol_cv_pthread_lib_lpthreads=yes
9785 else
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -fr conftest*
9789   ol_cv_pthread_lib_lpthreads=no
9790 fi
9791 rm -fr conftest*
9792 fi
9793
9794
9795                 # restore the LIBS
9796                 LIBS="$ol_LIBS"
9797         
9798 fi
9799
9800 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9801
9802         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9803                 ol_link_pthreads="-lpthreads"
9804                 ol_link_threads=posix
9805         fi
9806 fi
9807
9808
9809                 if test $ol_link_threads != no ; then
9810                         cat >> confdefs.h <<\EOF
9811 #define HAVE_PTHREADS 1
9812 EOF
9813
9814
9815                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9816
9817                                                 save_CPPFLAGS="$CPPFLAGS"
9818                         save_LIBS="$LIBS"
9819                         LIBS="$LTHREAD_LIBS $LIBS"
9820
9821                                                                                                 for ac_func in sched_yield pthread_yield
9822 do
9823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9824 echo "configure:9825: checking for $ac_func" >&5
9825 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 /* System header to define __stub macros and hopefully few prototypes,
9832     which can conflict with char $ac_func(); below.  */
9833 #include <assert.h>
9834 /* Override any gcc2 internal prototype to avoid an error.  */
9835 /* We use char because int might match the return type of a gcc2
9836     builtin and then its argument prototype would still apply.  */
9837 char $ac_func();
9838 char (*f)();
9839
9840 int main() {
9841
9842 /* The GNU C library defines this for functions which it implements
9843     to always fail with ENOSYS.  Some functions are actually named
9844     something starting with __ and the normal name is an alias.  */
9845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9846 choke me
9847 #else
9848 f = $ac_func;
9849 #endif
9850
9851 ; return 0; }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9854   rm -rf conftest*
9855   eval "ac_cv_func_$ac_func=yes"
9856 else
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   eval "ac_cv_func_$ac_func=no"
9861 fi
9862 rm -f conftest*
9863 fi
9864
9865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9866   echo "$ac_t""yes" 1>&6
9867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9868   cat >> confdefs.h <<EOF
9869 #define $ac_tr_func 1
9870 EOF
9871  
9872 else
9873   echo "$ac_t""no" 1>&6
9874 fi
9875 done
9876
9877
9878                         if test $ac_cv_func_sched_yield = no -a \
9879                                 $ac_cv_func_pthread_yield = no ; then
9880                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9881 echo "configure:9882: checking for sched_yield in -lrt" >&5
9882 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9884   echo $ac_n "(cached) $ac_c" 1>&6
9885 else
9886   ac_save_LIBS="$LIBS"
9887 LIBS="-lrt  $LIBS"
9888 cat > conftest.$ac_ext <<EOF
9889 #line 9890 "configure"
9890 #include "confdefs.h"
9891 /* Override any gcc2 internal prototype to avoid an error.  */
9892 /* We use char because int might match the return type of a gcc2
9893     builtin and then its argument prototype would still apply.  */
9894 char sched_yield();
9895
9896 int main() {
9897 sched_yield()
9898 ; return 0; }
9899 EOF
9900 if { (eval echo configure:9901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9901   rm -rf conftest*
9902   eval "ac_cv_lib_$ac_lib_var=yes"
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906   rm -rf conftest*
9907   eval "ac_cv_lib_$ac_lib_var=no"
9908 fi
9909 rm -f conftest*
9910 LIBS="$ac_save_LIBS"
9911
9912 fi
9913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9914   echo "$ac_t""yes" 1>&6
9915   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9916                                         cat >> confdefs.h <<\EOF
9917 #define HAVE_SCHED_YIELD 1
9918 EOF
9919
9920                                         ac_cv_func_sched_yield=yes
9921 else
9922   echo "$ac_t""no" 1>&6
9923 ac_cv_func_sched_yield=no
9924 fi
9925
9926                         fi
9927                         if test $ac_cv_func_sched_yield = no -a \
9928                                 $ac_cv_func_pthread_yield = no ; then
9929                                                                                                 for ac_func in thr_yield
9930 do
9931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9932 echo "configure:9933: checking for $ac_func" >&5
9933 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 /* System header to define __stub macros and hopefully few prototypes,
9940     which can conflict with char $ac_func(); below.  */
9941 #include <assert.h>
9942 /* Override any gcc2 internal prototype to avoid an error.  */
9943 /* We use char because int might match the return type of a gcc2
9944     builtin and then its argument prototype would still apply.  */
9945 char $ac_func();
9946 char (*f)();
9947
9948 int main() {
9949
9950 /* The GNU C library defines this for functions which it implements
9951     to always fail with ENOSYS.  Some functions are actually named
9952     something starting with __ and the normal name is an alias.  */
9953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9954 choke me
9955 #else
9956 f = $ac_func;
9957 #endif
9958
9959 ; return 0; }
9960 EOF
9961 if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9962   rm -rf conftest*
9963   eval "ac_cv_func_$ac_func=yes"
9964 else
9965   echo "configure: failed program was:" >&5
9966   cat conftest.$ac_ext >&5
9967   rm -rf conftest*
9968   eval "ac_cv_func_$ac_func=no"
9969 fi
9970 rm -f conftest*
9971 fi
9972
9973 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9974   echo "$ac_t""yes" 1>&6
9975     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9976   cat >> confdefs.h <<EOF
9977 #define $ac_tr_func 1
9978 EOF
9979  
9980 else
9981   echo "$ac_t""no" 1>&6
9982 fi
9983 done
9984
9985                         fi
9986                         if test $ac_cv_func_sched_yield = no -a \
9987                                 $ac_cv_func_pthread_yield = no -a \
9988                                 "$ac_cv_func_thr_yield" = no ; then
9989                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9990                         fi
9991
9992                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9993 do
9994 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9995 echo "configure:9996: checking for $ac_func" >&5
9996 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9997   echo $ac_n "(cached) $ac_c" 1>&6
9998 else
9999   cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002 /* System header to define __stub macros and hopefully few prototypes,
10003     which can conflict with char $ac_func(); below.  */
10004 #include <assert.h>
10005 /* Override any gcc2 internal prototype to avoid an error.  */
10006 /* We use char because int might match the return type of a gcc2
10007     builtin and then its argument prototype would still apply.  */
10008 char $ac_func();
10009 char (*f)();
10010
10011 int main() {
10012
10013 /* The GNU C library defines this for functions which it implements
10014     to always fail with ENOSYS.  Some functions are actually named
10015     something starting with __ and the normal name is an alias.  */
10016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10017 choke me
10018 #else
10019 f = $ac_func;
10020 #endif
10021
10022 ; return 0; }
10023 EOF
10024 if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025   rm -rf conftest*
10026   eval "ac_cv_func_$ac_func=yes"
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_func_$ac_func=no"
10032 fi
10033 rm -f conftest*
10034 fi
10035
10036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10037   echo "$ac_t""yes" 1>&6
10038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10039   cat >> confdefs.h <<EOF
10040 #define $ac_tr_func 1
10041 EOF
10042  
10043 else
10044   echo "$ac_t""no" 1>&6
10045 fi
10046 done
10047
10048
10049                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
10050 echo "configure:10051: checking for pthread_detach with <pthread.h>" >&5
10051 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
10052   echo $ac_n "(cached) $ac_c" 1>&6
10053 else
10054   
10055                                                                 cat > conftest.$ac_ext <<EOF
10056 #line 10057 "configure"
10057 #include "confdefs.h"
10058
10059 #include <pthread.h>
10060 #ifndef NULL
10061 #define NULL (void*)0
10062 #endif
10063
10064 int main() {
10065 pthread_detach(NULL);
10066 ; return 0; }
10067 EOF
10068 if { (eval echo configure:10069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10069   rm -rf conftest*
10070   ol_cv_func_pthread_detach=yes
10071 else
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -rf conftest*
10075   ol_cv_func_pthread_detach=no
10076 fi
10077 rm -f conftest*
10078                         
10079 fi
10080
10081 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
10082
10083                         if test $ol_cv_func_pthread_detach = no ; then
10084                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
10085                         fi
10086
10087                         cat >> confdefs.h <<\EOF
10088 #define HAVE_PTHREAD_DETACH 1
10089 EOF
10090
10091
10092                                                 for ac_func in \
10093                                 pthread_setconcurrency \
10094                                 pthread_getconcurrency \
10095                                 thr_setconcurrency \
10096                                 thr_getconcurrency \
10097                         
10098 do
10099 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10100 echo "configure:10101: checking for $ac_func" >&5
10101 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10102   echo $ac_n "(cached) $ac_c" 1>&6
10103 else
10104   cat > conftest.$ac_ext <<EOF
10105 #line 10106 "configure"
10106 #include "confdefs.h"
10107 /* System header to define __stub macros and hopefully few prototypes,
10108     which can conflict with char $ac_func(); below.  */
10109 #include <assert.h>
10110 /* Override any gcc2 internal prototype to avoid an error.  */
10111 /* We use char because int might match the return type of a gcc2
10112     builtin and then its argument prototype would still apply.  */
10113 char $ac_func();
10114 char (*f)();
10115
10116 int main() {
10117
10118 /* The GNU C library defines this for functions which it implements
10119     to always fail with ENOSYS.  Some functions are actually named
10120     something starting with __ and the normal name is an alias.  */
10121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10122 choke me
10123 #else
10124 f = $ac_func;
10125 #endif
10126
10127 ; return 0; }
10128 EOF
10129 if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10130   rm -rf conftest*
10131   eval "ac_cv_func_$ac_func=yes"
10132 else
10133   echo "configure: failed program was:" >&5
10134   cat conftest.$ac_ext >&5
10135   rm -rf conftest*
10136   eval "ac_cv_func_$ac_func=no"
10137 fi
10138 rm -f conftest*
10139 fi
10140
10141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10142   echo "$ac_t""yes" 1>&6
10143     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_func 1
10146 EOF
10147  
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151 done
10152
10153
10154                         
10155         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10156 echo "configure:10157: checking for pthread_kill_other_threads_np" >&5
10157 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10158   echo $ac_n "(cached) $ac_c" 1>&6
10159 else
10160   cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 /* System header to define __stub macros and hopefully few prototypes,
10164     which can conflict with char pthread_kill_other_threads_np(); below.  */
10165 #include <assert.h>
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 /* We use char because int might match the return type of a gcc2
10168     builtin and then its argument prototype would still apply.  */
10169 char pthread_kill_other_threads_np();
10170 char (*f)();
10171
10172 int main() {
10173
10174 /* The GNU C library defines this for functions which it implements
10175     to always fail with ENOSYS.  Some functions are actually named
10176     something starting with __ and the normal name is an alias.  */
10177 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10178 choke me
10179 #else
10180 f = pthread_kill_other_threads_np;
10181 #endif
10182
10183 ; return 0; }
10184 EOF
10185 if { (eval echo configure:10186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10186   rm -rf conftest*
10187   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10188 else
10189   echo "configure: failed program was:" >&5
10190   cat conftest.$ac_ext >&5
10191   rm -rf conftest*
10192   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10193 fi
10194 rm -f conftest*
10195 fi
10196
10197 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10198   echo "$ac_t""yes" 1>&6
10199   :
10200 else
10201   echo "$ac_t""no" 1>&6
10202 fi
10203
10204         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10205 echo "configure:10206: checking for LinuxThreads implementation" >&5
10206 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10207   echo $ac_n "(cached) $ac_c" 1>&6
10208 else
10209   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10210 fi
10211
10212 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10213
10214                         
10215         
10216         
10217         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10218 echo "configure:10219: checking for LinuxThreads consistency" >&5
10219 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10220   echo $ac_n "(cached) $ac_c" 1>&6
10221 else
10222   
10223                 if test $ol_cv_header_linux_threads = yes -a \
10224                         $ol_cv_sys_linux_threads = yes; then
10225                         ol_cv_linux_threads=yes
10226                 elif test $ol_cv_header_linux_threads = no -a \
10227                         $ol_cv_sys_linux_threads = no; then
10228                         ol_cv_linux_threads=no
10229                 else
10230                         ol_cv_linux_threads=error
10231                 fi
10232         
10233 fi
10234
10235 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10236
10237
10238                         if test $ol_cv_linux_threads = error; then
10239                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10240                         fi
10241
10242                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10243 echo "configure:10244: checking if pthread_create() works" >&5
10244 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   
10248                         if test "$cross_compiling" = yes; then
10249                                 ol_cv_pthread_create_works=yes
10250 else
10251   cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254 /* pthread test headers */
10255 #include <pthread.h>
10256 #ifndef NULL
10257 #define NULL (void*)0
10258 #endif
10259
10260 static void *task(p)
10261         void *p;
10262 {
10263         return (void *) (p == NULL);
10264 }
10265
10266
10267 int main(argc, argv)
10268         int argc;
10269         char **argv;
10270 {
10271
10272         /* pthread test function */
10273         pthread_t t;
10274         int status;
10275 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10276         /* This system (e.g. AIX) defaults detached; must override */
10277         pthread_attr_t attr;
10278
10279         status = pthread_attr_init(&attr);
10280         if( status ) exit( status );
10281
10282         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10283         if( status ) exit( status );
10284
10285 #define ATTR    &attr
10286 #else
10287 #if HAVE_PTHREADS_D4
10288 #define ATTR    pthread_attr_default
10289 #else
10290 #define ATTR    NULL
10291 #endif
10292 #endif
10293         /* make sure pthread_create() isn't just a stub */
10294         status = pthread_create(&t, ATTR, task, NULL);
10295         if( status ) exit( status );
10296
10297         /* make sure pthread_detach() isn't just a stub */
10298 #if HAVE_PTHREADS_D4
10299         status = pthread_detach( &t );
10300 #else
10301         status = pthread_detach( t );
10302 #endif
10303
10304 #ifdef HAVE_LINUX_THREADS
10305         pthread_kill_other_threads_np();
10306 #endif
10307
10308         exit( status );
10309
10310 }
10311
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10314 then
10315   ol_cv_pthread_create_works=yes
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -fr conftest*
10320   ol_cv_pthread_create_works=no
10321 fi
10322 rm -fr conftest*
10323 fi
10324
10325 fi
10326
10327 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10328
10329                         if test $ol_cv_pthread_create_works = no ; then
10330                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10331                         fi
10332
10333                                                 if test $ol_with_yielding_select = auto ; then
10334                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10335 echo "configure:10336: checking if select yields when using pthreads" >&5
10336 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10337   echo $ac_n "(cached) $ac_c" 1>&6
10338 else
10339   
10340                                 if test "$cross_compiling" = yes; then
10341   ol_cv_pthread_select_yields=cross
10342 else
10343   cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346
10347 #include <sys/types.h>
10348 #include <sys/time.h>
10349 #include <unistd.h>
10350 #include <pthread.h>
10351 #ifndef NULL
10352 #define NULL (void*) 0
10353 #endif
10354
10355 static int fildes[2];
10356
10357 static void *task(p)
10358         void *p;
10359 {
10360         int i;
10361         struct timeval tv;
10362
10363         fd_set rfds;
10364
10365         tv.tv_sec=10;
10366         tv.tv_usec=0;
10367
10368         FD_ZERO(&rfds);
10369         FD_SET(fildes[0], &rfds);
10370
10371         /* we're not interested in any fds */
10372         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10373
10374         if(i < 0) {
10375                 perror("select");
10376                 exit(10);
10377         }
10378
10379         exit(0); /* if we exit here, the select blocked the whole process */
10380 }
10381
10382 int main(argc, argv)
10383         int argc;
10384         char **argv;
10385 {
10386         pthread_t t;
10387
10388         /* create a pipe to select */
10389         if(pipe(&fildes[0])) {
10390                 perror("select");
10391                 exit(1);
10392         }
10393
10394 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10395         (void) pthread_setconcurrency(2);
10396 #else
10397 #ifdef HAVE_THR_SETCONCURRENCY
10398         /* Set Solaris LWP concurrency to 2 */
10399         thr_setconcurrency(2);
10400 #endif
10401 #endif
10402
10403 #if HAVE_PTHREADS_D4
10404         pthread_create(&t, pthread_attr_default, task, NULL);
10405 #else
10406         pthread_create(&t, NULL, task, NULL);
10407 #endif
10408
10409 #if HAVE_SCHED_YIELD
10410         sched_yield();  /* make sure task runs first */
10411 #else
10412 #ifdef HAVE_PTHREAD_YIELD
10413         pthread_yield();        /* make sure task runs first */
10414 #endif
10415 #endif
10416
10417         exit(2);
10418 }
10419 EOF
10420 if { (eval echo configure:10421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10421 then
10422   ol_cv_pthread_select_yields=no
10423 else
10424   echo "configure: failed program was:" >&5
10425   cat conftest.$ac_ext >&5
10426   rm -fr conftest*
10427   ol_cv_pthread_select_yields=yes
10428 fi
10429 rm -fr conftest*
10430 fi
10431
10432 fi
10433
10434 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10435
10436                                 if test $ol_cv_pthread_select_yields = cross ; then
10437                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10438                                 fi
10439
10440                                 if test $ol_cv_pthread_select_yields = yes ; then
10441                                         ol_with_yielding_select=yes
10442                                 fi
10443                         fi
10444
10445                                                 CPPFLAGS="$save_CPPFLAGS"
10446                         LIBS="$save_LIBS"
10447                 else
10448                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10449                 fi
10450         fi
10451
10452         if test $ol_with_threads = posix ; then
10453                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10454         fi
10455 fi
10456
10457 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10458         -o $ol_with_threads = mach ; then
10459
10460                 for ac_hdr in mach/cthreads.h
10461 do
10462 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10463 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10464 echo "configure:10465: checking for $ac_hdr" >&5
10465 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10466   echo $ac_n "(cached) $ac_c" 1>&6
10467 else
10468   cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471 #include <$ac_hdr>
10472 EOF
10473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10474 { (eval echo configure:10475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10476 if test -z "$ac_err"; then
10477   rm -rf conftest*
10478   eval "ac_cv_header_$ac_safe=yes"
10479 else
10480   echo "$ac_err" >&5
10481   echo "configure: failed program was:" >&5
10482   cat conftest.$ac_ext >&5
10483   rm -rf conftest*
10484   eval "ac_cv_header_$ac_safe=no"
10485 fi
10486 rm -f conftest*
10487 fi
10488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10489   echo "$ac_t""yes" 1>&6
10490     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10491   cat >> confdefs.h <<EOF
10492 #define $ac_tr_hdr 1
10493 EOF
10494  
10495 else
10496   echo "$ac_t""no" 1>&6
10497 fi
10498 done
10499
10500         if test $ac_cv_header_mach_cthreads_h = yes ; then
10501                 ol_with_threads=found
10502
10503                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10504 echo "configure:10505: checking for cthread_fork" >&5
10505 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   cat > conftest.$ac_ext <<EOF
10509 #line 10510 "configure"
10510 #include "confdefs.h"
10511 /* System header to define __stub macros and hopefully few prototypes,
10512     which can conflict with char cthread_fork(); below.  */
10513 #include <assert.h>
10514 /* Override any gcc2 internal prototype to avoid an error.  */
10515 /* We use char because int might match the return type of a gcc2
10516     builtin and then its argument prototype would still apply.  */
10517 char cthread_fork();
10518 char (*f)();
10519
10520 int main() {
10521
10522 /* The GNU C library defines this for functions which it implements
10523     to always fail with ENOSYS.  Some functions are actually named
10524     something starting with __ and the normal name is an alias.  */
10525 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10526 choke me
10527 #else
10528 f = cthread_fork;
10529 #endif
10530
10531 ; return 0; }
10532 EOF
10533 if { (eval echo configure:10534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10534   rm -rf conftest*
10535   eval "ac_cv_func_cthread_fork=yes"
10536 else
10537   echo "configure: failed program was:" >&5
10538   cat conftest.$ac_ext >&5
10539   rm -rf conftest*
10540   eval "ac_cv_func_cthread_fork=no"
10541 fi
10542 rm -f conftest*
10543 fi
10544
10545 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10546   echo "$ac_t""yes" 1>&6
10547   ol_link_threads=yes
10548 else
10549   echo "$ac_t""no" 1>&6
10550 fi
10551
10552
10553                 if test $ol_link_threads = no ; then
10554                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10555 echo "configure:10556: checking for cthread_fork with -all_load" >&5
10556 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   
10560                                                                 save_LIBS="$LIBS"
10561                                 LIBS="-all_load $LIBS"
10562                                 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 #include <mach/cthreads.h>
10566 int main() {
10567
10568                                         cthread_fork((void *)0, (void *)0);
10569                                         
10570 ; return 0; }
10571 EOF
10572 if { (eval echo configure:10573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10573   rm -rf conftest*
10574   ol_cv_cthread_all_load=yes
10575 else
10576   echo "configure: failed program was:" >&5
10577   cat conftest.$ac_ext >&5
10578   rm -rf conftest*
10579   ol_cv_cthread_all_load=no
10580 fi
10581 rm -f conftest*
10582                                                                 LIBS="$save_LIBS"
10583                         
10584 fi
10585
10586 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10587
10588                         if test $ol_cv_cthread_all_load = yes ; then
10589                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10590                                 ol_link_threads=mach
10591                         fi
10592                 fi
10593
10594                 if test $ol_link_threads != no ; then
10595                         : check for cthread specific functionality here
10596                         cat >> confdefs.h <<\EOF
10597 #define HAVE_MACH_CTHREADS 1
10598 EOF
10599
10600                 else
10601                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10602                 fi
10603         fi
10604
10605         if test $ol_with_threads = mach ; then
10606                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10607         fi
10608 fi
10609
10610 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10611         -o $ol_with_threads = pth ; then
10612
10613         for ac_hdr in pth.h
10614 do
10615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10617 echo "configure:10618: checking for $ac_hdr" >&5
10618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10619   echo $ac_n "(cached) $ac_c" 1>&6
10620 else
10621   cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624 #include <$ac_hdr>
10625 EOF
10626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10627 { (eval echo configure:10628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10629 if test -z "$ac_err"; then
10630   rm -rf conftest*
10631   eval "ac_cv_header_$ac_safe=yes"
10632 else
10633   echo "$ac_err" >&5
10634   echo "configure: failed program was:" >&5
10635   cat conftest.$ac_ext >&5
10636   rm -rf conftest*
10637   eval "ac_cv_header_$ac_safe=no"
10638 fi
10639 rm -f conftest*
10640 fi
10641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10644   cat >> confdefs.h <<EOF
10645 #define $ac_tr_hdr 1
10646 EOF
10647  
10648 else
10649   echo "$ac_t""no" 1>&6
10650 fi
10651 done
10652
10653
10654         if test $ac_cv_header_pth_h = yes ; then
10655                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10656 echo "configure:10657: checking for pth_version in -lpth" >&5
10657 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   ac_save_LIBS="$LIBS"
10662 LIBS="-lpth  $LIBS"
10663 cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666 /* Override any gcc2 internal prototype to avoid an error.  */
10667 /* We use char because int might match the return type of a gcc2
10668     builtin and then its argument prototype would still apply.  */
10669 char pth_version();
10670
10671 int main() {
10672 pth_version()
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10676   rm -rf conftest*
10677   eval "ac_cv_lib_$ac_lib_var=yes"
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   eval "ac_cv_lib_$ac_lib_var=no"
10683 fi
10684 rm -f conftest*
10685 LIBS="$ac_save_LIBS"
10686
10687 fi
10688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690   have_pth=yes
10691 else
10692   echo "$ac_t""no" 1>&6
10693 have_pth=no
10694 fi
10695
10696
10697                 if test $have_pth = yes ; then
10698                         cat >> confdefs.h <<\EOF
10699 #define HAVE_GNU_PTH 1
10700 EOF
10701
10702                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10703                         ol_link_threads=pth
10704
10705                         if test $ol_with_yielding_select = auto ; then
10706                                 ol_with_yielding_select=yes
10707                         fi
10708                 fi
10709         fi
10710 fi
10711
10712 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10713         -o $ol_with_threads = lwp ; then
10714
10715                 for ac_hdr in thread.h synch.h
10716 do
10717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10719 echo "configure:10720: checking for $ac_hdr" >&5
10720 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10721   echo $ac_n "(cached) $ac_c" 1>&6
10722 else
10723   cat > conftest.$ac_ext <<EOF
10724 #line 10725 "configure"
10725 #include "confdefs.h"
10726 #include <$ac_hdr>
10727 EOF
10728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10729 { (eval echo configure:10730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10731 if test -z "$ac_err"; then
10732   rm -rf conftest*
10733   eval "ac_cv_header_$ac_safe=yes"
10734 else
10735   echo "$ac_err" >&5
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   eval "ac_cv_header_$ac_safe=no"
10740 fi
10741 rm -f conftest*
10742 fi
10743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10744   echo "$ac_t""yes" 1>&6
10745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10746   cat >> confdefs.h <<EOF
10747 #define $ac_tr_hdr 1
10748 EOF
10749  
10750 else
10751   echo "$ac_t""no" 1>&6
10752 fi
10753 done
10754
10755         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10756                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10757 echo "configure:10758: checking for thr_create in -lthread" >&5
10758 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10759 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10760   echo $ac_n "(cached) $ac_c" 1>&6
10761 else
10762   ac_save_LIBS="$LIBS"
10763 LIBS="-lthread  $LIBS"
10764 cat > conftest.$ac_ext <<EOF
10765 #line 10766 "configure"
10766 #include "confdefs.h"
10767 /* Override any gcc2 internal prototype to avoid an error.  */
10768 /* We use char because int might match the return type of a gcc2
10769     builtin and then its argument prototype would still apply.  */
10770 char thr_create();
10771
10772 int main() {
10773 thr_create()
10774 ; return 0; }
10775 EOF
10776 if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=yes"
10779 else
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_lib_$ac_lib_var=no"
10784 fi
10785 rm -f conftest*
10786 LIBS="$ac_save_LIBS"
10787
10788 fi
10789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10790   echo "$ac_t""yes" 1>&6
10791   have_thr=yes
10792 else
10793   echo "$ac_t""no" 1>&6
10794 have_thr=no
10795 fi
10796
10797
10798                 if test $have_thr = yes ; then
10799                         cat >> confdefs.h <<\EOF
10800 #define HAVE_THR 1
10801 EOF
10802
10803                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10804                         ol_link_threads=thr
10805
10806                         if test $ol_with_yielding_select = auto ; then
10807                                 ol_with_yielding_select=yes
10808                         fi
10809
10810                                                 for ac_func in \
10811                                 thr_setconcurrency \
10812                                 thr_getconcurrency \
10813                         
10814 do
10815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10816 echo "configure:10817: checking for $ac_func" >&5
10817 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10818   echo $ac_n "(cached) $ac_c" 1>&6
10819 else
10820   cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 /* System header to define __stub macros and hopefully few prototypes,
10824     which can conflict with char $ac_func(); below.  */
10825 #include <assert.h>
10826 /* Override any gcc2 internal prototype to avoid an error.  */
10827 /* We use char because int might match the return type of a gcc2
10828     builtin and then its argument prototype would still apply.  */
10829 char $ac_func();
10830 char (*f)();
10831
10832 int main() {
10833
10834 /* The GNU C library defines this for functions which it implements
10835     to always fail with ENOSYS.  Some functions are actually named
10836     something starting with __ and the normal name is an alias.  */
10837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10838 choke me
10839 #else
10840 f = $ac_func;
10841 #endif
10842
10843 ; return 0; }
10844 EOF
10845 if { (eval echo configure:10846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10846   rm -rf conftest*
10847   eval "ac_cv_func_$ac_func=yes"
10848 else
10849   echo "configure: failed program was:" >&5
10850   cat conftest.$ac_ext >&5
10851   rm -rf conftest*
10852   eval "ac_cv_func_$ac_func=no"
10853 fi
10854 rm -f conftest*
10855 fi
10856
10857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10860   cat >> confdefs.h <<EOF
10861 #define $ac_tr_func 1
10862 EOF
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869                 fi
10870         fi
10871
10872                 for ac_hdr in lwp/lwp.h
10873 do
10874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_hdr" >&5
10877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 #include <$ac_hdr>
10884 EOF
10885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10886 { (eval echo configure:10887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10888 if test -z "$ac_err"; then
10889   rm -rf conftest*
10890   eval "ac_cv_header_$ac_safe=yes"
10891 else
10892   echo "$ac_err" >&5
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=no"
10897 fi
10898 rm -f conftest*
10899 fi
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10903   cat >> confdefs.h <<EOF
10904 #define $ac_tr_hdr 1
10905 EOF
10906  
10907 else
10908   echo "$ac_t""no" 1>&6
10909 fi
10910 done
10911
10912         if test $ac_cv_header_lwp_lwp_h = yes ; then
10913                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10914 echo "configure:10915: checking for lwp_create in -llwp" >&5
10915 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10917   echo $ac_n "(cached) $ac_c" 1>&6
10918 else
10919   ac_save_LIBS="$LIBS"
10920 LIBS="-llwp  $LIBS"
10921 cat > conftest.$ac_ext <<EOF
10922 #line 10923 "configure"
10923 #include "confdefs.h"
10924 /* Override any gcc2 internal prototype to avoid an error.  */
10925 /* We use char because int might match the return type of a gcc2
10926     builtin and then its argument prototype would still apply.  */
10927 char lwp_create();
10928
10929 int main() {
10930 lwp_create()
10931 ; return 0; }
10932 EOF
10933 if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10934   rm -rf conftest*
10935   eval "ac_cv_lib_$ac_lib_var=yes"
10936 else
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -rf conftest*
10940   eval "ac_cv_lib_$ac_lib_var=no"
10941 fi
10942 rm -f conftest*
10943 LIBS="$ac_save_LIBS"
10944
10945 fi
10946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10947   echo "$ac_t""yes" 1>&6
10948   have_lwp=yes
10949 else
10950   echo "$ac_t""no" 1>&6
10951 have_lwp=no
10952 fi
10953
10954
10955                 if test $have_lwp = yes ; then
10956                         cat >> confdefs.h <<\EOF
10957 #define HAVE_LWP 1
10958 EOF
10959
10960                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10961                         ol_link_threads=lwp
10962
10963                         if test $ol_with_yielding_select = auto ; then
10964                                 ol_with_yielding_select=no
10965                         fi
10966                 fi
10967         fi
10968 fi
10969
10970 if test $ol_with_yielding_select = yes ; then
10971         cat >> confdefs.h <<\EOF
10972 #define HAVE_YIELDING_SELECT 1
10973 EOF
10974
10975 fi
10976
10977 if test $ol_with_threads = manual ; then
10978                 ol_link_threads=yes
10979
10980         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10981
10982         for ac_hdr in pthread.h sched.h
10983 do
10984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_hdr" >&5
10987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <$ac_hdr>
10994 EOF
10995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10996 { (eval echo configure:10997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10998 if test -z "$ac_err"; then
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=yes"
11001 else
11002   echo "$ac_err" >&5
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=no"
11007 fi
11008 rm -f conftest*
11009 fi
11010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11013   cat >> confdefs.h <<EOF
11014 #define $ac_tr_hdr 1
11015 EOF
11016  
11017 else
11018   echo "$ac_t""no" 1>&6
11019 fi
11020 done
11021
11022         for ac_func in sched_yield pthread_yield
11023 do
11024 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11025 echo "configure:11026: checking for $ac_func" >&5
11026 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11027   echo $ac_n "(cached) $ac_c" 1>&6
11028 else
11029   cat > conftest.$ac_ext <<EOF
11030 #line 11031 "configure"
11031 #include "confdefs.h"
11032 /* System header to define __stub macros and hopefully few prototypes,
11033     which can conflict with char $ac_func(); below.  */
11034 #include <assert.h>
11035 /* Override any gcc2 internal prototype to avoid an error.  */
11036 /* We use char because int might match the return type of a gcc2
11037     builtin and then its argument prototype would still apply.  */
11038 char $ac_func();
11039 char (*f)();
11040
11041 int main() {
11042
11043 /* The GNU C library defines this for functions which it implements
11044     to always fail with ENOSYS.  Some functions are actually named
11045     something starting with __ and the normal name is an alias.  */
11046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11047 choke me
11048 #else
11049 f = $ac_func;
11050 #endif
11051
11052 ; return 0; }
11053 EOF
11054 if { (eval echo configure:11055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11055   rm -rf conftest*
11056   eval "ac_cv_func_$ac_func=yes"
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   eval "ac_cv_func_$ac_func=no"
11062 fi
11063 rm -f conftest*
11064 fi
11065
11066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11067   echo "$ac_t""yes" 1>&6
11068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11069   cat >> confdefs.h <<EOF
11070 #define $ac_tr_func 1
11071 EOF
11072  
11073 else
11074   echo "$ac_t""no" 1>&6
11075 fi
11076 done
11077
11078         
11079         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11080 echo "configure:11081: checking for LinuxThreads pthread.h" >&5
11081 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11082   echo $ac_n "(cached) $ac_c" 1>&6
11083 else
11084   cat > conftest.$ac_ext <<EOF
11085 #line 11086 "configure"
11086 #include "confdefs.h"
11087 #include <pthread.h>
11088 EOF
11089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11090   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11091   rm -rf conftest*
11092   ol_cv_header_linux_threads=yes
11093 else
11094   rm -rf conftest*
11095   ol_cv_header_linux_threads=no
11096 fi
11097 rm -f conftest*
11098
11099                 
11100 fi
11101
11102 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11103         if test $ol_cv_header_linux_threads = yes; then
11104                 cat >> confdefs.h <<\EOF
11105 #define HAVE_LINUX_THREADS 1
11106 EOF
11107
11108         fi
11109
11110
11111         for ac_hdr in mach/cthreads.h
11112 do
11113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11115 echo "configure:11116: checking for $ac_hdr" >&5
11116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   cat > conftest.$ac_ext <<EOF
11120 #line 11121 "configure"
11121 #include "confdefs.h"
11122 #include <$ac_hdr>
11123 EOF
11124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11125 { (eval echo configure:11126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11127 if test -z "$ac_err"; then
11128   rm -rf conftest*
11129   eval "ac_cv_header_$ac_safe=yes"
11130 else
11131   echo "$ac_err" >&5
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   eval "ac_cv_header_$ac_safe=no"
11136 fi
11137 rm -f conftest*
11138 fi
11139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11142   cat >> confdefs.h <<EOF
11143 #define $ac_tr_hdr 1
11144 EOF
11145  
11146 else
11147   echo "$ac_t""no" 1>&6
11148 fi
11149 done
11150
11151         for ac_hdr in lwp/lwp.h
11152 do
11153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11155 echo "configure:11156: checking for $ac_hdr" >&5
11156 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11157   echo $ac_n "(cached) $ac_c" 1>&6
11158 else
11159   cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 #include <$ac_hdr>
11163 EOF
11164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11165 { (eval echo configure:11166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11167 if test -z "$ac_err"; then
11168   rm -rf conftest*
11169   eval "ac_cv_header_$ac_safe=yes"
11170 else
11171   echo "$ac_err" >&5
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174   rm -rf conftest*
11175   eval "ac_cv_header_$ac_safe=no"
11176 fi
11177 rm -f conftest*
11178 fi
11179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11180   echo "$ac_t""yes" 1>&6
11181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11182   cat >> confdefs.h <<EOF
11183 #define $ac_tr_hdr 1
11184 EOF
11185  
11186 else
11187   echo "$ac_t""no" 1>&6
11188 fi
11189 done
11190
11191         for ac_hdr in thread.h synch.h
11192 do
11193 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11194 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11195 echo "configure:11196: checking for $ac_hdr" >&5
11196 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11197   echo $ac_n "(cached) $ac_c" 1>&6
11198 else
11199   cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 #include <$ac_hdr>
11203 EOF
11204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11205 { (eval echo configure:11206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11207 if test -z "$ac_err"; then
11208   rm -rf conftest*
11209   eval "ac_cv_header_$ac_safe=yes"
11210 else
11211   echo "$ac_err" >&5
11212   echo "configure: failed program was:" >&5
11213   cat conftest.$ac_ext >&5
11214   rm -rf conftest*
11215   eval "ac_cv_header_$ac_safe=no"
11216 fi
11217 rm -f conftest*
11218 fi
11219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11220   echo "$ac_t""yes" 1>&6
11221     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11222   cat >> confdefs.h <<EOF
11223 #define $ac_tr_hdr 1
11224 EOF
11225  
11226 else
11227   echo "$ac_t""no" 1>&6
11228 fi
11229 done
11230
11231 fi
11232
11233 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11234                         cat >> confdefs.h <<\EOF
11235 #define REENTRANT 1
11236 EOF
11237
11238         cat >> confdefs.h <<\EOF
11239 #define _REENTRANT 1
11240 EOF
11241
11242         cat >> confdefs.h <<\EOF
11243 #define THREAD_SAFE 1
11244 EOF
11245
11246         cat >> confdefs.h <<\EOF
11247 #define _THREAD_SAFE 1
11248 EOF
11249
11250         cat >> confdefs.h <<\EOF
11251 #define THREADSAFE 1
11252 EOF
11253
11254         cat >> confdefs.h <<\EOF
11255 #define _THREADSAFE 1
11256 EOF
11257
11258         cat >> confdefs.h <<\EOF
11259 #define _SGI_MP_SOURCE 1
11260 EOF
11261
11262
11263                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11264 echo "configure:11265: checking for thread specific errno" >&5
11265 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   
11269                 cat > conftest.$ac_ext <<EOF
11270 #line 11271 "configure"
11271 #include "confdefs.h"
11272 #include <errno.h>
11273 int main() {
11274 errno = 0;
11275 ; return 0; }
11276 EOF
11277 if { (eval echo configure:11278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11278   rm -rf conftest*
11279   ol_cv_errno_thread_specific=yes
11280 else
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   ol_cv_errno_thread_specific=no
11285 fi
11286 rm -f conftest*
11287         
11288 fi
11289
11290 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11291
11292                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11293 echo "configure:11294: checking for thread specific h_errno" >&5
11294 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11295   echo $ac_n "(cached) $ac_c" 1>&6
11296 else
11297   
11298                 cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 #include <netdb.h>
11302 int main() {
11303 h_errno = 0;
11304 ; return 0; }
11305 EOF
11306 if { (eval echo configure:11307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11307   rm -rf conftest*
11308   ol_cv_h_errno_thread_specific=yes
11309 else
11310   echo "configure: failed program was:" >&5
11311   cat conftest.$ac_ext >&5
11312   rm -rf conftest*
11313   ol_cv_h_errno_thread_specific=no
11314 fi
11315 rm -f conftest*
11316         
11317 fi
11318
11319 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11320
11321         if test $ol_cv_errno_thread_specific != yes \
11322                 -o $ol_cv_h_errno_thread_specific != yes ; then
11323                 LIBS="$LTHREAD_LIBS $LIBS"
11324                 LTHREAD_LIBS=""
11325         fi
11326
11327 fi  
11328
11329 if test $ol_link_threads = no ; then
11330         if test $ol_with_threads = yes ; then
11331                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11332         fi
11333
11334         if test $ol_with_threads = auto ; then
11335                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11336                 ol_with_threads=no
11337         fi
11338
11339         cat >> confdefs.h <<\EOF
11340 #define NO_THREADS 1
11341 EOF
11342
11343         LTHREAD_LIBS=""
11344 fi
11345
11346 if test $ol_link_threads != no ; then
11347         cat >> confdefs.h <<\EOF
11348 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11349 EOF
11350
11351 fi
11352
11353 ol_link_ldbm=no 
11354
11355 if test $ol_with_ldbm_api = auto \
11356         -o $ol_with_ldbm_api = berkeley \
11357         -o $ol_with_ldbm_api = bcompat ; then
11358
11359         if test $ol_with_ldbm_api = bcompat; then \
11360                 ol_cv_berkeley_db=no
11361 for ac_hdr in db_185.h db.h
11362 do
11363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11365 echo "configure:11366: checking for $ac_hdr" >&5
11366 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11367   echo $ac_n "(cached) $ac_c" 1>&6
11368 else
11369   cat > conftest.$ac_ext <<EOF
11370 #line 11371 "configure"
11371 #include "confdefs.h"
11372 #include <$ac_hdr>
11373 EOF
11374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11375 { (eval echo configure:11376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11377 if test -z "$ac_err"; then
11378   rm -rf conftest*
11379   eval "ac_cv_header_$ac_safe=yes"
11380 else
11381   echo "$ac_err" >&5
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   eval "ac_cv_header_$ac_safe=no"
11386 fi
11387 rm -f conftest*
11388 fi
11389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11390   echo "$ac_t""yes" 1>&6
11391     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11392   cat >> confdefs.h <<EOF
11393 #define $ac_tr_hdr 1
11394 EOF
11395  
11396 else
11397   echo "$ac_t""no" 1>&6
11398 fi
11399 done
11400
11401 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11402         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11403 echo "configure:11404: checking if Berkeley DB header compatibility" >&5
11404 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   
11408                 cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11411
11412 #if HAVE_DB_185_H
11413 #       include <db_185.h>
11414 #else
11415 #       include <db.h>
11416 #endif
11417
11418  /* this check could be improved */
11419 #ifndef DB_VERSION_MAJOR
11420 #       define DB_VERSION_MAJOR 1
11421 #endif
11422
11423 #if DB_VERSION_MAJOR == 1 
11424         __db_version_1
11425 #endif
11426
11427 EOF
11428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11429   egrep "__db_version_1" >/dev/null 2>&1; then
11430   rm -rf conftest*
11431   ol_cv_header_db1=yes
11432 else
11433   rm -rf conftest*
11434   ol_cv_header_db1=no
11435 fi
11436 rm -f conftest*
11437
11438 fi
11439
11440 echo "$ac_t""$ol_cv_header_db1" 1>&6
11441
11442         if test ol_cv_header_db1=yes ; then
11443                 ol_cv_lib_db=no
11444 if test $ol_cv_lib_db = no ; then
11445         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11446 echo "configure:11447: checking for Berkeley DB link (default)" >&5
11447 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11448   echo $ac_n "(cached) $ac_c" 1>&6
11449 else
11450   
11451         ol_DB_LIB=
11452         ol_LIBS=$LIBS
11453         LIBS="$ol_DB_LIB $LIBS"
11454
11455         cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458
11459 #ifdef HAVE_DB_185_H
11460 # include <db_185.h>
11461 #else
11462 # include <db.h>
11463 #endif
11464
11465 #ifndef DB_VERSION_MAJOR
11466 # define DB_VERSION_MAJOR 1
11467 #endif
11468
11469 #ifndef NULL
11470 #define NULL ((void*)0)
11471 #endif
11472
11473 int main() {
11474
11475 #if DB_VERSION_MAJOR > 2
11476         db_env_create( NULL, 0 );
11477 #elif DB_VERSION_MAJOR > 1
11478         db_appexit( NULL );
11479 #else
11480         (void) dbopen( NULL, 0, 0, 0, NULL);
11481 #endif
11482
11483 ; return 0; }
11484 EOF
11485 if { (eval echo configure:11486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11486   rm -rf conftest*
11487   ol_cv_db_none=yes
11488 else
11489   echo "configure: failed program was:" >&5
11490   cat conftest.$ac_ext >&5
11491   rm -rf conftest*
11492   ol_cv_db_none=no
11493 fi
11494 rm -f conftest*
11495
11496         LIBS="$ol_LIBS"
11497
11498 fi
11499
11500 echo "$ac_t""$ol_cv_db_none" 1>&6
11501
11502         if test $ol_cv_db_none = yes ; then
11503                 ol_cv_lib_db=yes
11504         fi
11505 fi
11506
11507 if test $ol_cv_lib_db = no ; then
11508         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11509 echo "configure:11510: checking for Berkeley DB link (-ldb)" >&5
11510 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11511   echo $ac_n "(cached) $ac_c" 1>&6
11512 else
11513   
11514         ol_DB_LIB=-ldb
11515         ol_LIBS=$LIBS
11516         LIBS="$ol_DB_LIB $LIBS"
11517
11518         cat > conftest.$ac_ext <<EOF
11519 #line 11520 "configure"
11520 #include "confdefs.h"
11521
11522 #ifdef HAVE_DB_185_H
11523 # include <db_185.h>
11524 #else
11525 # include <db.h>
11526 #endif
11527
11528 #ifndef DB_VERSION_MAJOR
11529 # define DB_VERSION_MAJOR 1
11530 #endif
11531
11532 #ifndef NULL
11533 #define NULL ((void*)0)
11534 #endif
11535
11536 int main() {
11537
11538 #if DB_VERSION_MAJOR > 2
11539         db_env_create( NULL, 0 );
11540 #elif DB_VERSION_MAJOR > 1
11541         db_appexit( NULL );
11542 #else
11543         (void) dbopen( NULL, 0, 0, 0, NULL);
11544 #endif
11545
11546 ; return 0; }
11547 EOF
11548 if { (eval echo configure:11549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11549   rm -rf conftest*
11550   ol_cv_db_db=yes
11551 else
11552   echo "configure: failed program was:" >&5
11553   cat conftest.$ac_ext >&5
11554   rm -rf conftest*
11555   ol_cv_db_db=no
11556 fi
11557 rm -f conftest*
11558
11559         LIBS="$ol_LIBS"
11560
11561 fi
11562
11563 echo "$ac_t""$ol_cv_db_db" 1>&6
11564
11565         if test $ol_cv_db_db = yes ; then
11566                 ol_cv_lib_db=-ldb
11567         fi
11568 fi
11569
11570 if test $ol_cv_lib_db = no ; then
11571         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11572 echo "configure:11573: checking for Berkeley DB link (-ldb3)" >&5
11573 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11574   echo $ac_n "(cached) $ac_c" 1>&6
11575 else
11576   
11577         ol_DB_LIB=-ldb3
11578         ol_LIBS=$LIBS
11579         LIBS="$ol_DB_LIB $LIBS"
11580
11581         cat > conftest.$ac_ext <<EOF
11582 #line 11583 "configure"
11583 #include "confdefs.h"
11584
11585 #ifdef HAVE_DB_185_H
11586 # include <db_185.h>
11587 #else
11588 # include <db.h>
11589 #endif
11590
11591 #ifndef DB_VERSION_MAJOR
11592 # define DB_VERSION_MAJOR 1
11593 #endif
11594
11595 #ifndef NULL
11596 #define NULL ((void*)0)
11597 #endif
11598
11599 int main() {
11600
11601 #if DB_VERSION_MAJOR > 2
11602         db_env_create( NULL, 0 );
11603 #elif DB_VERSION_MAJOR > 1
11604         db_appexit( NULL );
11605 #else
11606         (void) dbopen( NULL, 0, 0, 0, NULL);
11607 #endif
11608
11609 ; return 0; }
11610 EOF
11611 if { (eval echo configure:11612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11612   rm -rf conftest*
11613   ol_cv_db_db3=yes
11614 else
11615   echo "configure: failed program was:" >&5
11616   cat conftest.$ac_ext >&5
11617   rm -rf conftest*
11618   ol_cv_db_db3=no
11619 fi
11620 rm -f conftest*
11621
11622         LIBS="$ol_LIBS"
11623
11624 fi
11625
11626 echo "$ac_t""$ol_cv_db_db3" 1>&6
11627
11628         if test $ol_cv_db_db3 = yes ; then
11629                 ol_cv_lib_db=-ldb3
11630         fi
11631 fi
11632
11633 if test $ol_cv_lib_db = no ; then
11634         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11635 echo "configure:11636: checking for Berkeley DB link (-ldb2)" >&5
11636 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
11637   echo $ac_n "(cached) $ac_c" 1>&6
11638 else
11639   
11640         ol_DB_LIB=-ldb2
11641         ol_LIBS=$LIBS
11642         LIBS="$ol_DB_LIB $LIBS"
11643
11644         cat > conftest.$ac_ext <<EOF
11645 #line 11646 "configure"
11646 #include "confdefs.h"
11647
11648 #ifdef HAVE_DB_185_H
11649 # include <db_185.h>
11650 #else
11651 # include <db.h>
11652 #endif
11653
11654 #ifndef DB_VERSION_MAJOR
11655 # define DB_VERSION_MAJOR 1
11656 #endif
11657
11658 #ifndef NULL
11659 #define NULL ((void*)0)
11660 #endif
11661
11662 int main() {
11663
11664 #if DB_VERSION_MAJOR > 2
11665         db_env_create( NULL, 0 );
11666 #elif DB_VERSION_MAJOR > 1
11667         db_appexit( NULL );
11668 #else
11669         (void) dbopen( NULL, 0, 0, 0, NULL);
11670 #endif
11671
11672 ; return 0; }
11673 EOF
11674 if { (eval echo configure:11675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11675   rm -rf conftest*
11676   ol_cv_db_db2=yes
11677 else
11678   echo "configure: failed program was:" >&5
11679   cat conftest.$ac_ext >&5
11680   rm -rf conftest*
11681   ol_cv_db_db2=no
11682 fi
11683 rm -f conftest*
11684
11685         LIBS="$ol_LIBS"
11686
11687 fi
11688
11689 echo "$ac_t""$ol_cv_db_db2" 1>&6
11690
11691         if test $ol_cv_db_db2 = yes ; then
11692                 ol_cv_lib_db=-ldb2
11693         fi
11694 fi
11695
11696 if test $ol_cv_lib_db = no ; then
11697         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11698 echo "configure:11699: checking for Berkeley DB link (-ldb1)" >&5
11699 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
11700   echo $ac_n "(cached) $ac_c" 1>&6
11701 else
11702   
11703         ol_DB_LIB=-ldb1
11704         ol_LIBS=$LIBS
11705         LIBS="$ol_DB_LIB $LIBS"
11706
11707         cat > conftest.$ac_ext <<EOF
11708 #line 11709 "configure"
11709 #include "confdefs.h"
11710
11711 #ifdef HAVE_DB_185_H
11712 # include <db_185.h>
11713 #else
11714 # include <db.h>
11715 #endif
11716
11717 #ifndef DB_VERSION_MAJOR
11718 # define DB_VERSION_MAJOR 1
11719 #endif
11720
11721 #ifndef NULL
11722 #define NULL ((void*)0)
11723 #endif
11724
11725 int main() {
11726
11727 #if DB_VERSION_MAJOR > 2
11728         db_env_create( NULL, 0 );
11729 #elif DB_VERSION_MAJOR > 1
11730         db_appexit( NULL );
11731 #else
11732         (void) dbopen( NULL, 0, 0, 0, NULL);
11733 #endif
11734
11735 ; return 0; }
11736 EOF
11737 if { (eval echo configure:11738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11738   rm -rf conftest*
11739   ol_cv_db_db1=yes
11740 else
11741   echo "configure: failed program was:" >&5
11742   cat conftest.$ac_ext >&5
11743   rm -rf conftest*
11744   ol_cv_db_db1=no
11745 fi
11746 rm -f conftest*
11747
11748         LIBS="$ol_LIBS"
11749
11750 fi
11751
11752 echo "$ac_t""$ol_cv_db_db1" 1>&6
11753
11754         if test $ol_cv_db_db1 = yes ; then
11755                 ol_cv_lib_db=-ldb1
11756         fi
11757 fi
11758
11759
11760                 if test "$ol_cv_lib_db" != no ; then
11761                         ol_cv_berkeley_db=yes
11762                 fi
11763         fi
11764 fi
11765
11766         else
11767                 ol_cv_berkeley_db=no
11768 for ac_hdr in db.h
11769 do
11770 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11771 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11772 echo "configure:11773: checking for $ac_hdr" >&5
11773 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   cat > conftest.$ac_ext <<EOF
11777 #line 11778 "configure"
11778 #include "confdefs.h"
11779 #include <$ac_hdr>
11780 EOF
11781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11782 { (eval echo configure:11783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11784 if test -z "$ac_err"; then
11785   rm -rf conftest*
11786   eval "ac_cv_header_$ac_safe=yes"
11787 else
11788   echo "$ac_err" >&5
11789   echo "configure: failed program was:" >&5
11790   cat conftest.$ac_ext >&5
11791   rm -rf conftest*
11792   eval "ac_cv_header_$ac_safe=no"
11793 fi
11794 rm -f conftest*
11795 fi
11796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11797   echo "$ac_t""yes" 1>&6
11798     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11799   cat >> confdefs.h <<EOF
11800 #define $ac_tr_hdr 1
11801 EOF
11802  
11803 else
11804   echo "$ac_t""no" 1>&6
11805 fi
11806 done
11807
11808 if test $ac_cv_header_db_h = yes; then
11809         ol_cv_lib_db=no
11810 if test $ol_cv_lib_db = no ; then
11811         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11812 echo "configure:11813: checking for Berkeley DB link (default)" >&5
11813 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
11814   echo $ac_n "(cached) $ac_c" 1>&6
11815 else
11816   
11817         ol_DB_LIB=
11818         ol_LIBS=$LIBS
11819         LIBS="$ol_DB_LIB $LIBS"
11820
11821         cat > conftest.$ac_ext <<EOF
11822 #line 11823 "configure"
11823 #include "confdefs.h"
11824
11825 #ifdef HAVE_DB_185_H
11826 # include <db_185.h>
11827 #else
11828 # include <db.h>
11829 #endif
11830
11831 #ifndef DB_VERSION_MAJOR
11832 # define DB_VERSION_MAJOR 1
11833 #endif
11834
11835 #ifndef NULL
11836 #define NULL ((void*)0)
11837 #endif
11838
11839 int main() {
11840
11841 #if DB_VERSION_MAJOR > 2
11842         db_env_create( NULL, 0 );
11843 #elif DB_VERSION_MAJOR > 1
11844         db_appexit( NULL );
11845 #else
11846         (void) dbopen( NULL, 0, 0, 0, NULL);
11847 #endif
11848
11849 ; return 0; }
11850 EOF
11851 if { (eval echo configure:11852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11852   rm -rf conftest*
11853   ol_cv_db_none=yes
11854 else
11855   echo "configure: failed program was:" >&5
11856   cat conftest.$ac_ext >&5
11857   rm -rf conftest*
11858   ol_cv_db_none=no
11859 fi
11860 rm -f conftest*
11861
11862         LIBS="$ol_LIBS"
11863
11864 fi
11865
11866 echo "$ac_t""$ol_cv_db_none" 1>&6
11867
11868         if test $ol_cv_db_none = yes ; then
11869                 ol_cv_lib_db=yes
11870         fi
11871 fi
11872
11873 if test $ol_cv_lib_db = no ; then
11874         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11875 echo "configure:11876: checking for Berkeley DB link (-ldb)" >&5
11876 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
11877   echo $ac_n "(cached) $ac_c" 1>&6
11878 else
11879   
11880         ol_DB_LIB=-ldb
11881         ol_LIBS=$LIBS
11882         LIBS="$ol_DB_LIB $LIBS"
11883
11884         cat > conftest.$ac_ext <<EOF
11885 #line 11886 "configure"
11886 #include "confdefs.h"
11887
11888 #ifdef HAVE_DB_185_H
11889 # include <db_185.h>
11890 #else
11891 # include <db.h>
11892 #endif
11893
11894 #ifndef DB_VERSION_MAJOR
11895 # define DB_VERSION_MAJOR 1
11896 #endif
11897
11898 #ifndef NULL
11899 #define NULL ((void*)0)
11900 #endif
11901
11902 int main() {
11903
11904 #if DB_VERSION_MAJOR > 2
11905         db_env_create( NULL, 0 );
11906 #elif DB_VERSION_MAJOR > 1
11907         db_appexit( NULL );
11908 #else
11909         (void) dbopen( NULL, 0, 0, 0, NULL);
11910 #endif
11911
11912 ; return 0; }
11913 EOF
11914 if { (eval echo configure:11915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11915   rm -rf conftest*
11916   ol_cv_db_db=yes
11917 else
11918   echo "configure: failed program was:" >&5
11919   cat conftest.$ac_ext >&5
11920   rm -rf conftest*
11921   ol_cv_db_db=no
11922 fi
11923 rm -f conftest*
11924
11925         LIBS="$ol_LIBS"
11926
11927 fi
11928
11929 echo "$ac_t""$ol_cv_db_db" 1>&6
11930
11931         if test $ol_cv_db_db = yes ; then
11932                 ol_cv_lib_db=-ldb
11933         fi
11934 fi
11935
11936 if test $ol_cv_lib_db = no ; then
11937         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11938 echo "configure:11939: checking for Berkeley DB link (-ldb3)" >&5
11939 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
11940   echo $ac_n "(cached) $ac_c" 1>&6
11941 else
11942   
11943         ol_DB_LIB=-ldb3
11944         ol_LIBS=$LIBS
11945         LIBS="$ol_DB_LIB $LIBS"
11946
11947         cat > conftest.$ac_ext <<EOF
11948 #line 11949 "configure"
11949 #include "confdefs.h"
11950
11951 #ifdef HAVE_DB_185_H
11952 # include <db_185.h>
11953 #else
11954 # include <db.h>
11955 #endif
11956
11957 #ifndef DB_VERSION_MAJOR
11958 # define DB_VERSION_MAJOR 1
11959 #endif
11960
11961 #ifndef NULL
11962 #define NULL ((void*)0)
11963 #endif
11964
11965 int main() {
11966
11967 #if DB_VERSION_MAJOR > 2
11968         db_env_create( NULL, 0 );
11969 #elif DB_VERSION_MAJOR > 1
11970         db_appexit( NULL );
11971 #else
11972         (void) dbopen( NULL, 0, 0, 0, NULL);
11973 #endif
11974
11975 ; return 0; }
11976 EOF
11977 if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11978   rm -rf conftest*
11979   ol_cv_db_db3=yes
11980 else
11981   echo "configure: failed program was:" >&5
11982   cat conftest.$ac_ext >&5
11983   rm -rf conftest*
11984   ol_cv_db_db3=no
11985 fi
11986 rm -f conftest*
11987
11988         LIBS="$ol_LIBS"
11989
11990 fi
11991
11992 echo "$ac_t""$ol_cv_db_db3" 1>&6
11993
11994         if test $ol_cv_db_db3 = yes ; then
11995                 ol_cv_lib_db=-ldb3
11996         fi
11997 fi
11998
11999 if test $ol_cv_lib_db = no ; then
12000         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
12001 echo "configure:12002: checking for Berkeley DB link (-ldb2)" >&5
12002 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
12003   echo $ac_n "(cached) $ac_c" 1>&6
12004 else
12005   
12006         ol_DB_LIB=-ldb2
12007         ol_LIBS=$LIBS
12008         LIBS="$ol_DB_LIB $LIBS"
12009
12010         cat > conftest.$ac_ext <<EOF
12011 #line 12012 "configure"
12012 #include "confdefs.h"
12013
12014 #ifdef HAVE_DB_185_H
12015 # include <db_185.h>
12016 #else
12017 # include <db.h>
12018 #endif
12019
12020 #ifndef DB_VERSION_MAJOR
12021 # define DB_VERSION_MAJOR 1
12022 #endif
12023
12024 #ifndef NULL
12025 #define NULL ((void*)0)
12026 #endif
12027
12028 int main() {
12029
12030 #if DB_VERSION_MAJOR > 2
12031         db_env_create( NULL, 0 );
12032 #elif DB_VERSION_MAJOR > 1
12033         db_appexit( NULL );
12034 #else
12035         (void) dbopen( NULL, 0, 0, 0, NULL);
12036 #endif
12037
12038 ; return 0; }
12039 EOF
12040 if { (eval echo configure:12041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12041   rm -rf conftest*
12042   ol_cv_db_db2=yes
12043 else
12044   echo "configure: failed program was:" >&5
12045   cat conftest.$ac_ext >&5
12046   rm -rf conftest*
12047   ol_cv_db_db2=no
12048 fi
12049 rm -f conftest*
12050
12051         LIBS="$ol_LIBS"
12052
12053 fi
12054
12055 echo "$ac_t""$ol_cv_db_db2" 1>&6
12056
12057         if test $ol_cv_db_db2 = yes ; then
12058                 ol_cv_lib_db=-ldb2
12059         fi
12060 fi
12061
12062 if test $ol_cv_lib_db = no ; then
12063         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
12064 echo "configure:12065: checking for Berkeley DB link (-ldb1)" >&5
12065 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
12066   echo $ac_n "(cached) $ac_c" 1>&6
12067 else
12068   
12069         ol_DB_LIB=-ldb1
12070         ol_LIBS=$LIBS
12071         LIBS="$ol_DB_LIB $LIBS"
12072
12073         cat > conftest.$ac_ext <<EOF
12074 #line 12075 "configure"
12075 #include "confdefs.h"
12076
12077 #ifdef HAVE_DB_185_H
12078 # include <db_185.h>
12079 #else
12080 # include <db.h>
12081 #endif
12082
12083 #ifndef DB_VERSION_MAJOR
12084 # define DB_VERSION_MAJOR 1
12085 #endif
12086
12087 #ifndef NULL
12088 #define NULL ((void*)0)
12089 #endif
12090
12091 int main() {
12092
12093 #if DB_VERSION_MAJOR > 2
12094         db_env_create( NULL, 0 );
12095 #elif DB_VERSION_MAJOR > 1
12096         db_appexit( NULL );
12097 #else
12098         (void) dbopen( NULL, 0, 0, 0, NULL);
12099 #endif
12100
12101 ; return 0; }
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12104   rm -rf conftest*
12105   ol_cv_db_db1=yes
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -rf conftest*
12110   ol_cv_db_db1=no
12111 fi
12112 rm -f conftest*
12113
12114         LIBS="$ol_LIBS"
12115
12116 fi
12117
12118 echo "$ac_t""$ol_cv_db_db1" 1>&6
12119
12120         if test $ol_cv_db_db1 = yes ; then
12121                 ol_cv_lib_db=-ldb1
12122         fi
12123 fi
12124
12125
12126         if test "$ol_cv_lib_db" != no ; then
12127                 ol_cv_berkeley_db=yes
12128                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12129 echo "configure:12130: checking for Berkeley DB thread support" >&5
12130 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
12131   echo $ac_n "(cached) $ac_c" 1>&6
12132 else
12133   
12134         ol_LIBS="$LIBS"
12135         if test $ol_cv_lib_db != yes ; then
12136                 LIBS="$ol_cv_lib_db"
12137         fi
12138
12139         if test "$cross_compiling" = yes; then
12140   ol_cv_berkeley_db_thread=cross
12141 else
12142   cat > conftest.$ac_ext <<EOF
12143 #line 12144 "configure"
12144 #include "confdefs.h"
12145
12146 #ifdef HAVE_DB_185_H
12147         choke me;
12148 #else
12149 #include <db.h>
12150 #endif
12151 #ifndef NULL
12152 #define NULL ((void *)0)
12153 #endif
12154 main()
12155 {
12156         int rc;
12157         u_int32_t flags = DB_CREATE | DB_THREAD;
12158
12159
12160 #if DB_VERSION_MAJOR > 2
12161         DB_ENV *env = NULL;
12162
12163         rc = db_env_create( &env, 0 );
12164
12165         if( rc == 0 ) {
12166                 rc = env->open( env, NULL, NULL, flags, 0 );
12167         }
12168
12169 #else
12170         DB_ENV env;
12171         memset( &env, '\0', sizeof(env) );
12172
12173         rc = db_appinit( NULL, NULL, &env, flags );
12174
12175         if( rc == 0 ) {
12176                 db_appexit( &env );
12177         }
12178 #endif
12179
12180         return rc;
12181 }
12182 EOF
12183 if { (eval echo configure:12184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12184 then
12185   ol_cv_berkeley_db_thread=yes
12186 else
12187   echo "configure: failed program was:" >&5
12188   cat conftest.$ac_ext >&5
12189   rm -fr conftest*
12190   ol_cv_berkeley_db_thread=no
12191 fi
12192 rm -fr conftest*
12193 fi
12194
12195
12196         LIBS="$ol_LIBS"
12197
12198         if test $ol_cv_berkeley_db_thread != no ; then
12199                 cat >> confdefs.h <<\EOF
12200 #define HAVE_BERKELEY_DB_THREAD 1
12201 EOF
12202
12203         fi
12204
12205 fi
12206
12207 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12208         fi
12209 fi
12210
12211         fi
12212
12213         if test $ol_cv_berkeley_db != no ; then
12214                 cat >> confdefs.h <<\EOF
12215 #define HAVE_BERKELEY_DB 1
12216 EOF
12217
12218
12219                 ol_link_ldbm=berkeley
12220                 ol_with_ldbm_api=db
12221
12222                 if test $ol_with_ldbm_type = hash ; then
12223                         cat >> confdefs.h <<\EOF
12224 #define LDBM_USE_DBHASH 1
12225 EOF
12226
12227                 else
12228                         cat >> confdefs.h <<\EOF
12229 #define LDBM_USE_DBBTREE 1
12230 EOF
12231
12232                 fi
12233
12234                                                 if test $ol_cv_lib_db != yes ; then
12235                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12236                 fi
12237         fi
12238 fi
12239
12240 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12241         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12242         ol_with_ldbm_api=none
12243 fi
12244
12245 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12246         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12247 echo "configure:12248: checking for MDBM library" >&5
12248 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
12249   echo $ac_n "(cached) $ac_c" 1>&6
12250 else
12251         ol_LIBS="$LIBS"
12252         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12253 echo "configure:12254: checking for mdbm_set_chain" >&5
12254 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
12255   echo $ac_n "(cached) $ac_c" 1>&6
12256 else
12257   cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 /* System header to define __stub macros and hopefully few prototypes,
12261     which can conflict with char mdbm_set_chain(); below.  */
12262 #include <assert.h>
12263 /* Override any gcc2 internal prototype to avoid an error.  */
12264 /* We use char because int might match the return type of a gcc2
12265     builtin and then its argument prototype would still apply.  */
12266 char mdbm_set_chain();
12267 char (*f)();
12268
12269 int main() {
12270
12271 /* The GNU C library defines this for functions which it implements
12272     to always fail with ENOSYS.  Some functions are actually named
12273     something starting with __ and the normal name is an alias.  */
12274 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12275 choke me
12276 #else
12277 f = mdbm_set_chain;
12278 #endif
12279
12280 ; return 0; }
12281 EOF
12282 if { (eval echo configure:12283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12283   rm -rf conftest*
12284   eval "ac_cv_func_mdbm_set_chain=yes"
12285 else
12286   echo "configure: failed program was:" >&5
12287   cat conftest.$ac_ext >&5
12288   rm -rf conftest*
12289   eval "ac_cv_func_mdbm_set_chain=no"
12290 fi
12291 rm -f conftest*
12292 fi
12293
12294 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12295   echo "$ac_t""yes" 1>&6
12296   ol_cv_lib_mdbm=yes
12297 else
12298   echo "$ac_t""no" 1>&6
12299
12300                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12301 echo "configure:12302: checking for mdbm_set_chain in -lmdbm" >&5
12302 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
12303 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12304   echo $ac_n "(cached) $ac_c" 1>&6
12305 else
12306   ac_save_LIBS="$LIBS"
12307 LIBS="-lmdbm  $LIBS"
12308 cat > conftest.$ac_ext <<EOF
12309 #line 12310 "configure"
12310 #include "confdefs.h"
12311 /* Override any gcc2 internal prototype to avoid an error.  */
12312 /* We use char because int might match the return type of a gcc2
12313     builtin and then its argument prototype would still apply.  */
12314 char mdbm_set_chain();
12315
12316 int main() {
12317 mdbm_set_chain()
12318 ; return 0; }
12319 EOF
12320 if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12321   rm -rf conftest*
12322   eval "ac_cv_lib_$ac_lib_var=yes"
12323 else
12324   echo "configure: failed program was:" >&5
12325   cat conftest.$ac_ext >&5
12326   rm -rf conftest*
12327   eval "ac_cv_lib_$ac_lib_var=no"
12328 fi
12329 rm -f conftest*
12330 LIBS="$ac_save_LIBS"
12331
12332 fi
12333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12334   echo "$ac_t""yes" 1>&6
12335   ol_cv_lib_mdbm=-lmdbm
12336 else
12337   echo "$ac_t""no" 1>&6
12338 ol_cv_lib_mdbm=no
12339 fi
12340
12341         
12342 fi
12343
12344         LIBS="$ol_LIBS"
12345
12346 fi
12347
12348 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12349
12350
12351  for ac_hdr in mdbm.h
12352 do
12353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12355 echo "configure:12356: checking for $ac_hdr" >&5
12356 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12357   echo $ac_n "(cached) $ac_c" 1>&6
12358 else
12359   cat > conftest.$ac_ext <<EOF
12360 #line 12361 "configure"
12361 #include "confdefs.h"
12362 #include <$ac_hdr>
12363 EOF
12364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12365 { (eval echo configure:12366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12367 if test -z "$ac_err"; then
12368   rm -rf conftest*
12369   eval "ac_cv_header_$ac_safe=yes"
12370 else
12371   echo "$ac_err" >&5
12372   echo "configure: failed program was:" >&5
12373   cat conftest.$ac_ext >&5
12374   rm -rf conftest*
12375   eval "ac_cv_header_$ac_safe=no"
12376 fi
12377 rm -f conftest*
12378 fi
12379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12380   echo "$ac_t""yes" 1>&6
12381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12382   cat >> confdefs.h <<EOF
12383 #define $ac_tr_hdr 1
12384 EOF
12385  
12386 else
12387   echo "$ac_t""no" 1>&6
12388 fi
12389 done
12390
12391  echo $ac_n "checking for db""... $ac_c" 1>&6
12392 echo "configure:12393: checking for db" >&5
12393 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
12394   echo $ac_n "(cached) $ac_c" 1>&6
12395 else
12396   
12397         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12398                 ol_cv_mdbm=no
12399         else
12400                 ol_cv_mdbm=yes
12401         fi
12402
12403 fi
12404
12405 echo "$ac_t""$ol_cv_mdbm" 1>&6
12406  if test $ol_cv_mdbm = yes ; then
12407         cat >> confdefs.h <<\EOF
12408 #define HAVE_MDBM 1
12409 EOF
12410
12411  fi
12412
12413
12414         if test $ol_cv_mdbm = yes ; then
12415                 ol_link_ldbm=mdbm
12416                 ol_with_ldbm_api=mdbm
12417                 if test $ol_cv_lib_mdbm != yes ; then
12418                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12419                 fi
12420         fi
12421 fi
12422
12423 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12424         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12425 echo "configure:12426: checking for GDBM library" >&5
12426 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
12427   echo $ac_n "(cached) $ac_c" 1>&6
12428 else
12429         ol_LIBS="$LIBS"
12430         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12431 echo "configure:12432: checking for gdbm_open" >&5
12432 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
12433   echo $ac_n "(cached) $ac_c" 1>&6
12434 else
12435   cat > conftest.$ac_ext <<EOF
12436 #line 12437 "configure"
12437 #include "confdefs.h"
12438 /* System header to define __stub macros and hopefully few prototypes,
12439     which can conflict with char gdbm_open(); below.  */
12440 #include <assert.h>
12441 /* Override any gcc2 internal prototype to avoid an error.  */
12442 /* We use char because int might match the return type of a gcc2
12443     builtin and then its argument prototype would still apply.  */
12444 char gdbm_open();
12445 char (*f)();
12446
12447 int main() {
12448
12449 /* The GNU C library defines this for functions which it implements
12450     to always fail with ENOSYS.  Some functions are actually named
12451     something starting with __ and the normal name is an alias.  */
12452 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12453 choke me
12454 #else
12455 f = gdbm_open;
12456 #endif
12457
12458 ; return 0; }
12459 EOF
12460 if { (eval echo configure:12461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12461   rm -rf conftest*
12462   eval "ac_cv_func_gdbm_open=yes"
12463 else
12464   echo "configure: failed program was:" >&5
12465   cat conftest.$ac_ext >&5
12466   rm -rf conftest*
12467   eval "ac_cv_func_gdbm_open=no"
12468 fi
12469 rm -f conftest*
12470 fi
12471
12472 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12473   echo "$ac_t""yes" 1>&6
12474   ol_cv_lib_gdbm=yes
12475 else
12476   echo "$ac_t""no" 1>&6
12477
12478                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12479 echo "configure:12480: checking for gdbm_open in -lgdbm" >&5
12480 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12481 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12482   echo $ac_n "(cached) $ac_c" 1>&6
12483 else
12484   ac_save_LIBS="$LIBS"
12485 LIBS="-lgdbm  $LIBS"
12486 cat > conftest.$ac_ext <<EOF
12487 #line 12488 "configure"
12488 #include "confdefs.h"
12489 /* Override any gcc2 internal prototype to avoid an error.  */
12490 /* We use char because int might match the return type of a gcc2
12491     builtin and then its argument prototype would still apply.  */
12492 char gdbm_open();
12493
12494 int main() {
12495 gdbm_open()
12496 ; return 0; }
12497 EOF
12498 if { (eval echo configure:12499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12499   rm -rf conftest*
12500   eval "ac_cv_lib_$ac_lib_var=yes"
12501 else
12502   echo "configure: failed program was:" >&5
12503   cat conftest.$ac_ext >&5
12504   rm -rf conftest*
12505   eval "ac_cv_lib_$ac_lib_var=no"
12506 fi
12507 rm -f conftest*
12508 LIBS="$ac_save_LIBS"
12509
12510 fi
12511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12512   echo "$ac_t""yes" 1>&6
12513   ol_cv_lib_gdbm=-lgdbm
12514 else
12515   echo "$ac_t""no" 1>&6
12516 ol_cv_lib_gdbm=no
12517 fi
12518
12519         
12520 fi
12521
12522         LIBS="$ol_LIBS"
12523
12524 fi
12525
12526 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12527
12528
12529  for ac_hdr in gdbm.h
12530 do
12531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12533 echo "configure:12534: checking for $ac_hdr" >&5
12534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12535   echo $ac_n "(cached) $ac_c" 1>&6
12536 else
12537   cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540 #include <$ac_hdr>
12541 EOF
12542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12543 { (eval echo configure:12544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12545 if test -z "$ac_err"; then
12546   rm -rf conftest*
12547   eval "ac_cv_header_$ac_safe=yes"
12548 else
12549   echo "$ac_err" >&5
12550   echo "configure: failed program was:" >&5
12551   cat conftest.$ac_ext >&5
12552   rm -rf conftest*
12553   eval "ac_cv_header_$ac_safe=no"
12554 fi
12555 rm -f conftest*
12556 fi
12557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12558   echo "$ac_t""yes" 1>&6
12559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12560   cat >> confdefs.h <<EOF
12561 #define $ac_tr_hdr 1
12562 EOF
12563  
12564 else
12565   echo "$ac_t""no" 1>&6
12566 fi
12567 done
12568
12569  echo $ac_n "checking for db""... $ac_c" 1>&6
12570 echo "configure:12571: checking for db" >&5
12571 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12572   echo $ac_n "(cached) $ac_c" 1>&6
12573 else
12574   
12575         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12576                 ol_cv_gdbm=no
12577         else
12578                 ol_cv_gdbm=yes
12579         fi
12580
12581 fi
12582
12583 echo "$ac_t""$ol_cv_gdbm" 1>&6
12584  if test $ol_cv_gdbm = yes ; then
12585         cat >> confdefs.h <<\EOF
12586 #define HAVE_GDBM 1
12587 EOF
12588
12589  fi
12590
12591
12592         if test $ol_cv_gdbm = yes ; then
12593                 ol_link_ldbm=gdbm
12594                 ol_with_ldbm_api=gdbm
12595
12596                 if test $ol_cv_lib_gdbm != yes ; then
12597                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12598                 fi
12599         fi
12600 fi
12601
12602 if test $ol_with_ldbm_api = ndbm ; then
12603         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12604 echo "configure:12605: checking for NDBM library" >&5
12605 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12606   echo $ac_n "(cached) $ac_c" 1>&6
12607 else
12608         ol_LIBS="$LIBS"
12609         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12610 echo "configure:12611: checking for dbm_open" >&5
12611 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12612   echo $ac_n "(cached) $ac_c" 1>&6
12613 else
12614   cat > conftest.$ac_ext <<EOF
12615 #line 12616 "configure"
12616 #include "confdefs.h"
12617 /* System header to define __stub macros and hopefully few prototypes,
12618     which can conflict with char dbm_open(); below.  */
12619 #include <assert.h>
12620 /* Override any gcc2 internal prototype to avoid an error.  */
12621 /* We use char because int might match the return type of a gcc2
12622     builtin and then its argument prototype would still apply.  */
12623 char dbm_open();
12624 char (*f)();
12625
12626 int main() {
12627
12628 /* The GNU C library defines this for functions which it implements
12629     to always fail with ENOSYS.  Some functions are actually named
12630     something starting with __ and the normal name is an alias.  */
12631 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12632 choke me
12633 #else
12634 f = dbm_open;
12635 #endif
12636
12637 ; return 0; }
12638 EOF
12639 if { (eval echo configure:12640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12640   rm -rf conftest*
12641   eval "ac_cv_func_dbm_open=yes"
12642 else
12643   echo "configure: failed program was:" >&5
12644   cat conftest.$ac_ext >&5
12645   rm -rf conftest*
12646   eval "ac_cv_func_dbm_open=no"
12647 fi
12648 rm -f conftest*
12649 fi
12650
12651 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12652   echo "$ac_t""yes" 1>&6
12653   ol_cv_lib_ndbm=yes
12654 else
12655   echo "$ac_t""no" 1>&6
12656
12657                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12658 echo "configure:12659: checking for dbm_open in -lndbm" >&5
12659 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12661   echo $ac_n "(cached) $ac_c" 1>&6
12662 else
12663   ac_save_LIBS="$LIBS"
12664 LIBS="-lndbm  $LIBS"
12665 cat > conftest.$ac_ext <<EOF
12666 #line 12667 "configure"
12667 #include "confdefs.h"
12668 /* Override any gcc2 internal prototype to avoid an error.  */
12669 /* We use char because int might match the return type of a gcc2
12670     builtin and then its argument prototype would still apply.  */
12671 char dbm_open();
12672
12673 int main() {
12674 dbm_open()
12675 ; return 0; }
12676 EOF
12677 if { (eval echo configure:12678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12678   rm -rf conftest*
12679   eval "ac_cv_lib_$ac_lib_var=yes"
12680 else
12681   echo "configure: failed program was:" >&5
12682   cat conftest.$ac_ext >&5
12683   rm -rf conftest*
12684   eval "ac_cv_lib_$ac_lib_var=no"
12685 fi
12686 rm -f conftest*
12687 LIBS="$ac_save_LIBS"
12688
12689 fi
12690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12691   echo "$ac_t""yes" 1>&6
12692   ol_cv_lib_ndbm=-lndbm
12693 else
12694   echo "$ac_t""no" 1>&6
12695
12696                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12697 echo "configure:12698: checking for dbm_open in -ldbm" >&5
12698 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12700   echo $ac_n "(cached) $ac_c" 1>&6
12701 else
12702   ac_save_LIBS="$LIBS"
12703 LIBS="-ldbm  $LIBS"
12704 cat > conftest.$ac_ext <<EOF
12705 #line 12706 "configure"
12706 #include "confdefs.h"
12707 /* Override any gcc2 internal prototype to avoid an error.  */
12708 /* We use char because int might match the return type of a gcc2
12709     builtin and then its argument prototype would still apply.  */
12710 char dbm_open();
12711
12712 int main() {
12713 dbm_open()
12714 ; return 0; }
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12717   rm -rf conftest*
12718   eval "ac_cv_lib_$ac_lib_var=yes"
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   eval "ac_cv_lib_$ac_lib_var=no"
12724 fi
12725 rm -f conftest*
12726 LIBS="$ac_save_LIBS"
12727
12728 fi
12729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12730   echo "$ac_t""yes" 1>&6
12731   ol_cv_lib_ndbm=-ldbm
12732 else
12733   echo "$ac_t""no" 1>&6
12734 ol_cv_lib_ndbm=no
12735 fi
12736                 
12737 fi
12738
12739         
12740 fi
12741
12742         LIBS="$ol_LIBS"
12743
12744 fi
12745
12746 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12747
12748
12749  for ac_hdr in ndbm.h
12750 do
12751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12753 echo "configure:12754: checking for $ac_hdr" >&5
12754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12755   echo $ac_n "(cached) $ac_c" 1>&6
12756 else
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 #include <$ac_hdr>
12761 EOF
12762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12763 { (eval echo configure:12764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12765 if test -z "$ac_err"; then
12766   rm -rf conftest*
12767   eval "ac_cv_header_$ac_safe=yes"
12768 else
12769   echo "$ac_err" >&5
12770   echo "configure: failed program was:" >&5
12771   cat conftest.$ac_ext >&5
12772   rm -rf conftest*
12773   eval "ac_cv_header_$ac_safe=no"
12774 fi
12775 rm -f conftest*
12776 fi
12777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12778   echo "$ac_t""yes" 1>&6
12779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12780   cat >> confdefs.h <<EOF
12781 #define $ac_tr_hdr 1
12782 EOF
12783  
12784 else
12785   echo "$ac_t""no" 1>&6
12786 fi
12787 done
12788
12789  echo $ac_n "checking for db""... $ac_c" 1>&6
12790 echo "configure:12791: checking for db" >&5
12791 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12792   echo $ac_n "(cached) $ac_c" 1>&6
12793 else
12794   
12795         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12796                 ol_cv_ndbm=no
12797         else
12798                 ol_cv_ndbm=yes
12799         fi
12800
12801 fi
12802
12803 echo "$ac_t""$ol_cv_ndbm" 1>&6
12804  if test $ol_cv_ndbm = yes ; then
12805         cat >> confdefs.h <<\EOF
12806 #define HAVE_NDBM 1
12807 EOF
12808
12809  fi
12810
12811
12812         if test $ol_cv_ndbm = yes ; then
12813                 ol_link_ldbm=ndbm
12814                 ol_with_ldbm_api=ndbm
12815
12816                 if test $ol_cv_lib_ndbm != yes ; then
12817                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12818                 fi
12819         fi
12820 fi
12821
12822 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12823         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12824         if test $ol_enable_ldbm = yes ; then
12825                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12826         fi
12827
12828         echo "configure: warning: disabling LDBM" 1>&2
12829         ol_enable_ldbm=no
12830 fi
12831
12832 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12833         LINK_BINS_DYNAMIC="yes"
12834 else
12835         LINK_BINS_DYNAMIC="no"
12836 fi
12837
12838 if test $ol_enable_wrappers != no ; then
12839         for ac_hdr in tcpd.h
12840 do
12841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12843 echo "configure:12844: checking for $ac_hdr" >&5
12844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12845   echo $ac_n "(cached) $ac_c" 1>&6
12846 else
12847   cat > conftest.$ac_ext <<EOF
12848 #line 12849 "configure"
12849 #include "confdefs.h"
12850 #include <$ac_hdr>
12851 EOF
12852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12853 { (eval echo configure:12854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12855 if test -z "$ac_err"; then
12856   rm -rf conftest*
12857   eval "ac_cv_header_$ac_safe=yes"
12858 else
12859   echo "$ac_err" >&5
12860   echo "configure: failed program was:" >&5
12861   cat conftest.$ac_ext >&5
12862   rm -rf conftest*
12863   eval "ac_cv_header_$ac_safe=no"
12864 fi
12865 rm -f conftest*
12866 fi
12867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12868   echo "$ac_t""yes" 1>&6
12869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12870   cat >> confdefs.h <<EOF
12871 #define $ac_tr_hdr 1
12872 EOF
12873  
12874 else
12875   echo "$ac_t""no" 1>&6
12876 fi
12877 done
12878
12879
12880         if test $ac_cv_header_tcpd_h != yes ; then
12881                 have_wrappers=no
12882         else
12883                 cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886
12887 int allow_severity = 0;
12888 int deny_severity  = 0;
12889                 
12890 int main() {
12891 hosts_access()
12892 ; return 0; }
12893 EOF
12894 if { (eval echo configure:12895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12895   rm -rf conftest*
12896   have_wrappers=yes
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   have_wrappers=no
12902 fi
12903 rm -f conftest*
12904         fi
12905
12906         if test $have_wrappers = yes ; then
12907                 cat >> confdefs.h <<\EOF
12908 #define HAVE_TCPD 1
12909 EOF
12910
12911                 WRAP_LIBS="-lwrap"
12912
12913                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12914 echo "configure:12915: checking for main in -lnsl" >&5
12915 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12917   echo $ac_n "(cached) $ac_c" 1>&6
12918 else
12919   ac_save_LIBS="$LIBS"
12920 LIBS="-lnsl  $LIBS"
12921 cat > conftest.$ac_ext <<EOF
12922 #line 12923 "configure"
12923 #include "confdefs.h"
12924
12925 int main() {
12926 main()
12927 ; return 0; }
12928 EOF
12929 if { (eval echo configure:12930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12930   rm -rf conftest*
12931   eval "ac_cv_lib_$ac_lib_var=yes"
12932 else
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   eval "ac_cv_lib_$ac_lib_var=no"
12937 fi
12938 rm -f conftest*
12939 LIBS="$ac_save_LIBS"
12940
12941 fi
12942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12943   echo "$ac_t""yes" 1>&6
12944     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12945     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12946   cat >> confdefs.h <<EOF
12947 #define $ac_tr_lib 1
12948 EOF
12949
12950   LIBS="-lnsl $LIBS"
12951
12952 else
12953   echo "$ac_t""no" 1>&6
12954 fi
12955
12956         else
12957                 echo "configure: warning: could not find -lwrap" 1>&2
12958                 if test $ol_enable_wrappers = yes ; then
12959                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12960                 fi
12961
12962                 echo "configure: warning: disabling wrappers support" 1>&2
12963                 ol_enable_wrappers=no
12964                 WRAP_LIBS=""
12965         fi
12966 fi
12967
12968 if test $ol_enable_syslog != no ; then
12969         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12970 echo "configure:12971: checking for openlog" >&5
12971 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12972   echo $ac_n "(cached) $ac_c" 1>&6
12973 else
12974   cat > conftest.$ac_ext <<EOF
12975 #line 12976 "configure"
12976 #include "confdefs.h"
12977 /* System header to define __stub macros and hopefully few prototypes,
12978     which can conflict with char openlog(); below.  */
12979 #include <assert.h>
12980 /* Override any gcc2 internal prototype to avoid an error.  */
12981 /* We use char because int might match the return type of a gcc2
12982     builtin and then its argument prototype would still apply.  */
12983 char openlog();
12984 char (*f)();
12985
12986 int main() {
12987
12988 /* The GNU C library defines this for functions which it implements
12989     to always fail with ENOSYS.  Some functions are actually named
12990     something starting with __ and the normal name is an alias.  */
12991 #if defined (__stub_openlog) || defined (__stub___openlog)
12992 choke me
12993 #else
12994 f = openlog;
12995 #endif
12996
12997 ; return 0; }
12998 EOF
12999 if { (eval echo configure:13000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13000   rm -rf conftest*
13001   eval "ac_cv_func_openlog=yes"
13002 else
13003   echo "configure: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005   rm -rf conftest*
13006   eval "ac_cv_func_openlog=no"
13007 fi
13008 rm -f conftest*
13009 fi
13010
13011 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
13012   echo "$ac_t""yes" 1>&6
13013   :
13014 else
13015   echo "$ac_t""no" 1>&6
13016 fi
13017
13018         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
13019                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
13020         fi
13021         ol_enable_syslog=$ac_cv_func_openlog
13022 fi
13023
13024 if test $ol_enable_tcl != no ; then
13025         for ac_hdr in tcl.h
13026 do
13027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13029 echo "configure:13030: checking for $ac_hdr" >&5
13030 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13031   echo $ac_n "(cached) $ac_c" 1>&6
13032 else
13033   cat > conftest.$ac_ext <<EOF
13034 #line 13035 "configure"
13035 #include "confdefs.h"
13036 #include <$ac_hdr>
13037 EOF
13038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13039 { (eval echo configure:13040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13041 if test -z "$ac_err"; then
13042   rm -rf conftest*
13043   eval "ac_cv_header_$ac_safe=yes"
13044 else
13045   echo "$ac_err" >&5
13046   echo "configure: failed program was:" >&5
13047   cat conftest.$ac_ext >&5
13048   rm -rf conftest*
13049   eval "ac_cv_header_$ac_safe=no"
13050 fi
13051 rm -f conftest*
13052 fi
13053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13054   echo "$ac_t""yes" 1>&6
13055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13056   cat >> confdefs.h <<EOF
13057 #define $ac_tr_hdr 1
13058 EOF
13059  
13060 else
13061   echo "$ac_t""no" 1>&6
13062 fi
13063 done
13064
13065
13066         if test $ac_cv_header_tcl_h != yes ; then
13067                 have_tcl=no
13068         else
13069                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
13070                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
13071 echo "configure:13072: checking for main in -l$lib" >&5
13072 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
13073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13074   echo $ac_n "(cached) $ac_c" 1>&6
13075 else
13076   ac_save_LIBS="$LIBS"
13077 LIBS="-l$lib  $LIBS"
13078 cat > conftest.$ac_ext <<EOF
13079 #line 13080 "configure"
13080 #include "confdefs.h"
13081
13082 int main() {
13083 main()
13084 ; return 0; }
13085 EOF
13086 if { (eval echo configure:13087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13087   rm -rf conftest*
13088   eval "ac_cv_lib_$ac_lib_var=yes"
13089 else
13090   echo "configure: failed program was:" >&5
13091   cat conftest.$ac_ext >&5
13092   rm -rf conftest*
13093   eval "ac_cv_lib_$ac_lib_var=no"
13094 fi
13095 rm -f conftest*
13096 LIBS="$ac_save_LIBS"
13097
13098 fi
13099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13100   echo "$ac_t""yes" 1>&6
13101   have_tcl=yes
13102                            if test x"$ol_with_tcl_module" = "xstatic" ; then
13103                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
13104                            else
13105                                MOD_TCL_LIB="-l${lib}"
13106                            fi;break
13107 else
13108   echo "$ac_t""no" 1>&6
13109 have_tcl=no
13110 fi
13111
13112                 done
13113         fi
13114
13115         if test $have_tcl != yes ; then
13116                 echo "configure: warning: could not find -ltcl" 1>&2
13117                 if test $ol_enable_tcl = yes ; then
13118                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13119                 fi
13120
13121                 ol_enable_tcl=no
13122         fi
13123 fi
13124
13125 ol_link_termcap=no
13126 for ac_hdr in termcap.h ncurses.h
13127 do
13128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13130 echo "configure:13131: checking for $ac_hdr" >&5
13131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13132   echo $ac_n "(cached) $ac_c" 1>&6
13133 else
13134   cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 #include <$ac_hdr>
13138 EOF
13139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13140 { (eval echo configure:13141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13142 if test -z "$ac_err"; then
13143   rm -rf conftest*
13144   eval "ac_cv_header_$ac_safe=yes"
13145 else
13146   echo "$ac_err" >&5
13147   echo "configure: failed program was:" >&5
13148   cat conftest.$ac_ext >&5
13149   rm -rf conftest*
13150   eval "ac_cv_header_$ac_safe=no"
13151 fi
13152 rm -f conftest*
13153 fi
13154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13155   echo "$ac_t""yes" 1>&6
13156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13157   cat >> confdefs.h <<EOF
13158 #define $ac_tr_hdr 1
13159 EOF
13160  
13161 else
13162   echo "$ac_t""no" 1>&6
13163 fi
13164 done
13165
13166
13167 if test $ol_link_termcap = no ; then
13168         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13169 echo "configure:13170: checking for tputs in -ltermcap" >&5
13170 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
13171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13172   echo $ac_n "(cached) $ac_c" 1>&6
13173 else
13174   ac_save_LIBS="$LIBS"
13175 LIBS="-ltermcap  $LIBS"
13176 cat > conftest.$ac_ext <<EOF
13177 #line 13178 "configure"
13178 #include "confdefs.h"
13179 /* Override any gcc2 internal prototype to avoid an error.  */
13180 /* We use char because int might match the return type of a gcc2
13181     builtin and then its argument prototype would still apply.  */
13182 char tputs();
13183
13184 int main() {
13185 tputs()
13186 ; return 0; }
13187 EOF
13188 if { (eval echo configure:13189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13189   rm -rf conftest*
13190   eval "ac_cv_lib_$ac_lib_var=yes"
13191 else
13192   echo "configure: failed program was:" >&5
13193   cat conftest.$ac_ext >&5
13194   rm -rf conftest*
13195   eval "ac_cv_lib_$ac_lib_var=no"
13196 fi
13197 rm -f conftest*
13198 LIBS="$ac_save_LIBS"
13199
13200 fi
13201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13202   echo "$ac_t""yes" 1>&6
13203   have_termcap=yes
13204 else
13205   echo "$ac_t""no" 1>&6
13206 have_termcap=no
13207 fi
13208
13209         if test $have_termcap = yes ; then
13210                 cat >> confdefs.h <<\EOF
13211 #define HAVE_TERMCAP 1
13212 EOF
13213
13214                 ol_link_termcap=yes
13215                 TERMCAP_LIBS=-ltermcap
13216         fi
13217 fi
13218
13219 if test $ol_link_termcap = no ; then
13220         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13221 echo "configure:13222: checking for initscr in -lncurses" >&5
13222 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
13223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13224   echo $ac_n "(cached) $ac_c" 1>&6
13225 else
13226   ac_save_LIBS="$LIBS"
13227 LIBS="-lncurses  $LIBS"
13228 cat > conftest.$ac_ext <<EOF
13229 #line 13230 "configure"
13230 #include "confdefs.h"
13231 /* Override any gcc2 internal prototype to avoid an error.  */
13232 /* We use char because int might match the return type of a gcc2
13233     builtin and then its argument prototype would still apply.  */
13234 char initscr();
13235
13236 int main() {
13237 initscr()
13238 ; return 0; }
13239 EOF
13240 if { (eval echo configure:13241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13241   rm -rf conftest*
13242   eval "ac_cv_lib_$ac_lib_var=yes"
13243 else
13244   echo "configure: failed program was:" >&5
13245   cat conftest.$ac_ext >&5
13246   rm -rf conftest*
13247   eval "ac_cv_lib_$ac_lib_var=no"
13248 fi
13249 rm -f conftest*
13250 LIBS="$ac_save_LIBS"
13251
13252 fi
13253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13254   echo "$ac_t""yes" 1>&6
13255   have_ncurses=yes
13256 else
13257   echo "$ac_t""no" 1>&6
13258 have_ncurses=no
13259 fi
13260
13261         if test $have_ncurses = yes ; then
13262                 cat >> confdefs.h <<\EOF
13263 #define HAVE_NCURSES 1
13264 EOF
13265
13266                 ol_link_termcap=yes
13267                 TERMCAP_LIBS=-lncurses
13268         fi
13269 fi
13270
13271 if test $ol_link_termcap = no ; then
13272         cat >> confdefs.h <<\EOF
13273 #define NO_TERMCAP 1
13274 EOF
13275
13276         TERMCAP_LIBS=
13277 fi
13278
13279 ol_link_sasl=no
13280 ol_link_spasswd=no
13281 if test $ol_with_cyrus_sasl != no ; then
13282         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13283 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13284 echo "configure:13285: checking for sasl.h" >&5
13285 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13286   echo $ac_n "(cached) $ac_c" 1>&6
13287 else
13288   cat > conftest.$ac_ext <<EOF
13289 #line 13290 "configure"
13290 #include "confdefs.h"
13291 #include <sasl.h>
13292 EOF
13293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13294 { (eval echo configure:13295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13296 if test -z "$ac_err"; then
13297   rm -rf conftest*
13298   eval "ac_cv_header_$ac_safe=yes"
13299 else
13300   echo "$ac_err" >&5
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -rf conftest*
13304   eval "ac_cv_header_$ac_safe=no"
13305 fi
13306 rm -f conftest*
13307 fi
13308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13309   echo "$ac_t""yes" 1>&6
13310   :
13311 else
13312   echo "$ac_t""no" 1>&6
13313 fi
13314
13315
13316         if test $ac_cv_header_sasl_h = yes ; then
13317                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13318 echo "configure:13319: checking for sasl_client_init in -lsasl" >&5
13319 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
13320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13321   echo $ac_n "(cached) $ac_c" 1>&6
13322 else
13323   ac_save_LIBS="$LIBS"
13324 LIBS="-lsasl  $LIBS"
13325 cat > conftest.$ac_ext <<EOF
13326 #line 13327 "configure"
13327 #include "confdefs.h"
13328 /* Override any gcc2 internal prototype to avoid an error.  */
13329 /* We use char because int might match the return type of a gcc2
13330     builtin and then its argument prototype would still apply.  */
13331 char sasl_client_init();
13332
13333 int main() {
13334 sasl_client_init()
13335 ; return 0; }
13336 EOF
13337 if { (eval echo configure:13338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13338   rm -rf conftest*
13339   eval "ac_cv_lib_$ac_lib_var=yes"
13340 else
13341   echo "configure: failed program was:" >&5
13342   cat conftest.$ac_ext >&5
13343   rm -rf conftest*
13344   eval "ac_cv_lib_$ac_lib_var=no"
13345 fi
13346 rm -f conftest*
13347 LIBS="$ac_save_LIBS"
13348
13349 fi
13350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13351   echo "$ac_t""yes" 1>&6
13352   have_cyrus_sasl=yes
13353 else
13354   echo "$ac_t""no" 1>&6
13355 have_cyrus_sasl=no
13356 fi
13357
13358
13359                 if test $have_cyrus_sasl != no ; then
13360                         SASL_LIBS="-lsasl"
13361                         cat >> confdefs.h <<\EOF
13362 #define HAVE_CYRUS_SASL 1
13363 EOF
13364
13365                         ol_link_sasl=yes
13366                 fi
13367         fi
13368
13369         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13370                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13371         fi
13372 fi
13373
13374 if test $cross_compiling != yes ; then
13375         dev=no
13376         if test -r /dev/urandom ; then
13377                 dev="/dev/urandom";
13378         elif test -r /idev/urandom ; then
13379                 dev="/idev/urandom";
13380         elif test -r /dev/srandom ; then
13381                 dev="/dev/srandom";
13382         elif test -r /dev/random ; then
13383                 dev="/dev/random";
13384         elif test -r /idev/random ; then
13385                 dev="/idev/random";
13386         fi
13387
13388         if test $dev != no ; then
13389                 cat >> confdefs.h <<EOF
13390 #define URANDOM_DEVICE "$dev"
13391 EOF
13392
13393         fi
13394 fi
13395
13396 ol_link_fetch=no
13397 if test $ol_with_fetch != no ; then
13398         ol_LIBS=$LIBS
13399 LIBS="-lfetch -lcom_err $LIBS"
13400 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13401 echo "configure:13402: checking fetch(3) library" >&5
13402 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13403   echo $ac_n "(cached) $ac_c" 1>&6
13404 else
13405   
13406         cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409
13410 #include <sys/param.h>
13411 #include <stdio.h>
13412 #include <fetch.h>
13413 int main() {
13414 struct url *u = fetchParseURL("file:///"); 
13415 ; return 0; }
13416 EOF
13417 if { (eval echo configure:13418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13418   rm -rf conftest*
13419   ol_cv_lib_fetch=yes
13420 else
13421   echo "configure: failed program was:" >&5
13422   cat conftest.$ac_ext >&5
13423   rm -rf conftest*
13424   ol_cv_lib_fetch=no
13425 fi
13426 rm -f conftest*
13427 fi
13428
13429 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13430 LIBS=$ol_LIBS
13431 if test $ol_cv_lib_fetch != no ; then
13432         ol_link_fetch="-lfetch -lcom_err"
13433         cat >> confdefs.h <<\EOF
13434 #define HAVE_FETCH 1
13435 EOF
13436
13437 fi
13438
13439
13440         if test $ol_cv_lib_fetch != no ; then
13441                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13442                 ol_link_fetch=freebsd
13443
13444         elif test $ol_with_fetch != auto ; then
13445                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13446         fi 
13447 fi
13448
13449 ol_link_readline=no
13450 if test $ol_with_readline != no ; then
13451         for ac_hdr in readline/readline.h readline/history.h
13452 do
13453 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13454 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13455 echo "configure:13456: checking for $ac_hdr" >&5
13456 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13457   echo $ac_n "(cached) $ac_c" 1>&6
13458 else
13459   cat > conftest.$ac_ext <<EOF
13460 #line 13461 "configure"
13461 #include "confdefs.h"
13462 #include <$ac_hdr>
13463 EOF
13464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13465 { (eval echo configure:13466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13467 if test -z "$ac_err"; then
13468   rm -rf conftest*
13469   eval "ac_cv_header_$ac_safe=yes"
13470 else
13471   echo "$ac_err" >&5
13472   echo "configure: failed program was:" >&5
13473   cat conftest.$ac_ext >&5
13474   rm -rf conftest*
13475   eval "ac_cv_header_$ac_safe=no"
13476 fi
13477 rm -f conftest*
13478 fi
13479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13480   echo "$ac_t""yes" 1>&6
13481     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13482   cat >> confdefs.h <<EOF
13483 #define $ac_tr_hdr 1
13484 EOF
13485  
13486 else
13487   echo "$ac_t""no" 1>&6
13488 fi
13489 done
13490
13491
13492         if test $ac_cv_header_readline_readline_h = yes ; then
13493                 save_LIBS="$LIBS"
13494                 LIBS="$TERMCAP_LIBS $LIBS"
13495                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13496 echo "configure:13497: checking for readline in -lreadline" >&5
13497 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13499   echo $ac_n "(cached) $ac_c" 1>&6
13500 else
13501   ac_save_LIBS="$LIBS"
13502 LIBS="-lreadline  $LIBS"
13503 cat > conftest.$ac_ext <<EOF
13504 #line 13505 "configure"
13505 #include "confdefs.h"
13506 /* Override any gcc2 internal prototype to avoid an error.  */
13507 /* We use char because int might match the return type of a gcc2
13508     builtin and then its argument prototype would still apply.  */
13509 char readline();
13510
13511 int main() {
13512 readline()
13513 ; return 0; }
13514 EOF
13515 if { (eval echo configure:13516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13516   rm -rf conftest*
13517   eval "ac_cv_lib_$ac_lib_var=yes"
13518 else
13519   echo "configure: failed program was:" >&5
13520   cat conftest.$ac_ext >&5
13521   rm -rf conftest*
13522   eval "ac_cv_lib_$ac_lib_var=no"
13523 fi
13524 rm -f conftest*
13525 LIBS="$ac_save_LIBS"
13526
13527 fi
13528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13529   echo "$ac_t""yes" 1>&6
13530   have_readline=yes
13531 else
13532   echo "$ac_t""no" 1>&6
13533 have_readline=no
13534 fi
13535
13536                 LIBS="$save_LIBS"
13537                         
13538                 if test $have_readline = yes ; then
13539                         ol_with_readline=found
13540                         ol_link_readline=yes
13541
13542                         READLINE_LIBS="-lreadline"
13543                 fi
13544         fi
13545 fi
13546
13547 if test $ol_link_readline = yes ; then
13548         cat >> confdefs.h <<\EOF
13549 #define HAVE_READLINE 1
13550 EOF
13551
13552 fi
13553
13554
13555 if test $ol_enable_crypt != no ; then
13556         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13557 echo "configure:13558: checking for crypt" >&5
13558 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13559   echo $ac_n "(cached) $ac_c" 1>&6
13560 else
13561   cat > conftest.$ac_ext <<EOF
13562 #line 13563 "configure"
13563 #include "confdefs.h"
13564 /* System header to define __stub macros and hopefully few prototypes,
13565     which can conflict with char crypt(); below.  */
13566 #include <assert.h>
13567 /* Override any gcc2 internal prototype to avoid an error.  */
13568 /* We use char because int might match the return type of a gcc2
13569     builtin and then its argument prototype would still apply.  */
13570 char crypt();
13571 char (*f)();
13572
13573 int main() {
13574
13575 /* The GNU C library defines this for functions which it implements
13576     to always fail with ENOSYS.  Some functions are actually named
13577     something starting with __ and the normal name is an alias.  */
13578 #if defined (__stub_crypt) || defined (__stub___crypt)
13579 choke me
13580 #else
13581 f = crypt;
13582 #endif
13583
13584 ; return 0; }
13585 EOF
13586 if { (eval echo configure:13587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13587   rm -rf conftest*
13588   eval "ac_cv_func_crypt=yes"
13589 else
13590   echo "configure: failed program was:" >&5
13591   cat conftest.$ac_ext >&5
13592   rm -rf conftest*
13593   eval "ac_cv_func_crypt=no"
13594 fi
13595 rm -f conftest*
13596 fi
13597
13598 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13599   echo "$ac_t""yes" 1>&6
13600   have_crypt=yes
13601 else
13602   echo "$ac_t""no" 1>&6
13603
13604                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13605 echo "configure:13606: checking for crypt in -lcrypt" >&5
13606 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13607 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13608   echo $ac_n "(cached) $ac_c" 1>&6
13609 else
13610   ac_save_LIBS="$LIBS"
13611 LIBS="-lcrypt  $LIBS"
13612 cat > conftest.$ac_ext <<EOF
13613 #line 13614 "configure"
13614 #include "confdefs.h"
13615 /* Override any gcc2 internal prototype to avoid an error.  */
13616 /* We use char because int might match the return type of a gcc2
13617     builtin and then its argument prototype would still apply.  */
13618 char crypt();
13619
13620 int main() {
13621 crypt()
13622 ; return 0; }
13623 EOF
13624 if { (eval echo configure:13625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13625   rm -rf conftest*
13626   eval "ac_cv_lib_$ac_lib_var=yes"
13627 else
13628   echo "configure: failed program was:" >&5
13629   cat conftest.$ac_ext >&5
13630   rm -rf conftest*
13631   eval "ac_cv_lib_$ac_lib_var=no"
13632 fi
13633 rm -f conftest*
13634 LIBS="$ac_save_LIBS"
13635
13636 fi
13637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13638   echo "$ac_t""yes" 1>&6
13639   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13640                         have_crypt=yes
13641 else
13642   echo "$ac_t""no" 1>&6
13643 have_crypt=no
13644 fi
13645
13646 fi
13647
13648
13649         if test $have_crypt = yes ; then
13650                 cat >> confdefs.h <<\EOF
13651 #define HAVE_CRYPT 1
13652 EOF
13653
13654         else
13655                 echo "configure: warning: could not find crypt" 1>&2
13656                 if test $ol_enable_crypt = yes ; then
13657                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13658                 fi
13659
13660                 echo "configure: warning: disabling crypt support" 1>&2
13661                 ol_enable_crypt=no
13662         fi
13663 fi
13664
13665 if test $ol_enable_proctitle != no ; then
13666         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13667 echo "configure:13668: checking for setproctitle" >&5
13668 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13669   echo $ac_n "(cached) $ac_c" 1>&6
13670 else
13671   cat > conftest.$ac_ext <<EOF
13672 #line 13673 "configure"
13673 #include "confdefs.h"
13674 /* System header to define __stub macros and hopefully few prototypes,
13675     which can conflict with char setproctitle(); below.  */
13676 #include <assert.h>
13677 /* Override any gcc2 internal prototype to avoid an error.  */
13678 /* We use char because int might match the return type of a gcc2
13679     builtin and then its argument prototype would still apply.  */
13680 char setproctitle();
13681 char (*f)();
13682
13683 int main() {
13684
13685 /* The GNU C library defines this for functions which it implements
13686     to always fail with ENOSYS.  Some functions are actually named
13687     something starting with __ and the normal name is an alias.  */
13688 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13689 choke me
13690 #else
13691 f = setproctitle;
13692 #endif
13693
13694 ; return 0; }
13695 EOF
13696 if { (eval echo configure:13697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13697   rm -rf conftest*
13698   eval "ac_cv_func_setproctitle=yes"
13699 else
13700   echo "configure: failed program was:" >&5
13701   cat conftest.$ac_ext >&5
13702   rm -rf conftest*
13703   eval "ac_cv_func_setproctitle=no"
13704 fi
13705 rm -f conftest*
13706 fi
13707
13708 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13709   echo "$ac_t""yes" 1>&6
13710   have_setproctitle=yes
13711 else
13712   echo "$ac_t""no" 1>&6
13713
13714                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13715 echo "configure:13716: checking for setproctitle in -lutil" >&5
13716 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13718   echo $ac_n "(cached) $ac_c" 1>&6
13719 else
13720   ac_save_LIBS="$LIBS"
13721 LIBS="-lutil  $LIBS"
13722 cat > conftest.$ac_ext <<EOF
13723 #line 13724 "configure"
13724 #include "confdefs.h"
13725 /* Override any gcc2 internal prototype to avoid an error.  */
13726 /* We use char because int might match the return type of a gcc2
13727     builtin and then its argument prototype would still apply.  */
13728 char setproctitle();
13729
13730 int main() {
13731 setproctitle()
13732 ; return 0; }
13733 EOF
13734 if { (eval echo configure:13735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13735   rm -rf conftest*
13736   eval "ac_cv_lib_$ac_lib_var=yes"
13737 else
13738   echo "configure: failed program was:" >&5
13739   cat conftest.$ac_ext >&5
13740   rm -rf conftest*
13741   eval "ac_cv_lib_$ac_lib_var=no"
13742 fi
13743 rm -f conftest*
13744 LIBS="$ac_save_LIBS"
13745
13746 fi
13747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13748   echo "$ac_t""yes" 1>&6
13749   have_setproctitle=yes
13750                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13751 else
13752   echo "$ac_t""no" 1>&6
13753 have_setproctitle=no
13754                         LIBOBJS="$LIBOBJS setproctitle.o"
13755                         LIBSRCS="$LIBSRCS setproctitle.c"
13756 fi
13757
13758 fi
13759
13760
13761         if test $have_setproctitle = yes ; then
13762                 cat >> confdefs.h <<\EOF
13763 #define HAVE_SETPROCTITLE 1
13764 EOF
13765
13766         fi
13767 fi
13768
13769 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13770 echo "configure:13771: checking for ANSI C header files" >&5
13771 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13772   echo $ac_n "(cached) $ac_c" 1>&6
13773 else
13774   cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 #include <stdlib.h>
13778 #include <stdarg.h>
13779 #include <string.h>
13780 #include <float.h>
13781 EOF
13782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13783 { (eval echo configure:13784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13785 if test -z "$ac_err"; then
13786   rm -rf conftest*
13787   ac_cv_header_stdc=yes
13788 else
13789   echo "$ac_err" >&5
13790   echo "configure: failed program was:" >&5
13791   cat conftest.$ac_ext >&5
13792   rm -rf conftest*
13793   ac_cv_header_stdc=no
13794 fi
13795 rm -f conftest*
13796
13797 if test $ac_cv_header_stdc = yes; then
13798   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13799 cat > conftest.$ac_ext <<EOF
13800 #line 13801 "configure"
13801 #include "confdefs.h"
13802 #include <string.h>
13803 EOF
13804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13805   egrep "memchr" >/dev/null 2>&1; then
13806   :
13807 else
13808   rm -rf conftest*
13809   ac_cv_header_stdc=no
13810 fi
13811 rm -f conftest*
13812
13813 fi
13814
13815 if test $ac_cv_header_stdc = yes; then
13816   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13817 cat > conftest.$ac_ext <<EOF
13818 #line 13819 "configure"
13819 #include "confdefs.h"
13820 #include <stdlib.h>
13821 EOF
13822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13823   egrep "free" >/dev/null 2>&1; then
13824   :
13825 else
13826   rm -rf conftest*
13827   ac_cv_header_stdc=no
13828 fi
13829 rm -f conftest*
13830
13831 fi
13832
13833 if test $ac_cv_header_stdc = yes; then
13834   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13835 if test "$cross_compiling" = yes; then
13836   :
13837 else
13838   cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 #include <ctype.h>
13842 #if ((' ' & 0x0FF) == 0x020)
13843 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13844 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13845 #else
13846 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13847  || ('j' <= (c) && (c) <= 'r') \
13848  || ('s' <= (c) && (c) <= 'z'))
13849 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13850 #endif
13851 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13852 int main () { int i; for (i = 0; i < 256; i++)
13853 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13854 exit (0); }
13855
13856 EOF
13857 if { (eval echo configure:13858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13858 then
13859   :
13860 else
13861   echo "configure: failed program was:" >&5
13862   cat conftest.$ac_ext >&5
13863   rm -fr conftest*
13864   ac_cv_header_stdc=no
13865 fi
13866 rm -fr conftest*
13867 fi
13868
13869 fi
13870 fi
13871
13872 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13873 if test $ac_cv_header_stdc = yes; then
13874   cat >> confdefs.h <<\EOF
13875 #define STDC_HEADERS 1
13876 EOF
13877
13878 fi
13879
13880 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13881 echo "configure:13882: checking for mode_t" >&5
13882 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13883   echo $ac_n "(cached) $ac_c" 1>&6
13884 else
13885   cat > conftest.$ac_ext <<EOF
13886 #line 13887 "configure"
13887 #include "confdefs.h"
13888 #include <sys/types.h>
13889 #if STDC_HEADERS
13890 #include <stdlib.h>
13891 #include <stddef.h>
13892 #endif
13893
13894 EOF
13895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13896   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13897   rm -rf conftest*
13898   eval "ac_cv_type_mode_t=yes"
13899 else
13900   rm -rf conftest*
13901   eval "ac_cv_type_mode_t=no"
13902 fi
13903 rm -f conftest*
13904
13905 fi
13906 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13907   echo "$ac_t""yes" 1>&6
13908 else
13909   echo "$ac_t""no" 1>&6
13910   cat >> confdefs.h <<EOF
13911 #define mode_t int
13912 EOF
13913
13914 fi
13915
13916 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13917 echo "configure:13918: checking for off_t" >&5
13918 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13919   echo $ac_n "(cached) $ac_c" 1>&6
13920 else
13921   cat > conftest.$ac_ext <<EOF
13922 #line 13923 "configure"
13923 #include "confdefs.h"
13924 #include <sys/types.h>
13925 #if STDC_HEADERS
13926 #include <stdlib.h>
13927 #include <stddef.h>
13928 #endif
13929
13930 EOF
13931 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13932   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13933   rm -rf conftest*
13934   eval "ac_cv_type_off_t=yes"
13935 else
13936   rm -rf conftest*
13937   eval "ac_cv_type_off_t=no"
13938 fi
13939 rm -f conftest*
13940
13941 fi
13942 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13943   echo "$ac_t""yes" 1>&6
13944 else
13945   echo "$ac_t""no" 1>&6
13946   cat >> confdefs.h <<EOF
13947 #define off_t long
13948 EOF
13949
13950 fi
13951
13952 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13953 echo "configure:13954: checking for pid_t" >&5
13954 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13955   echo $ac_n "(cached) $ac_c" 1>&6
13956 else
13957   cat > conftest.$ac_ext <<EOF
13958 #line 13959 "configure"
13959 #include "confdefs.h"
13960 #include <sys/types.h>
13961 #if STDC_HEADERS
13962 #include <stdlib.h>
13963 #include <stddef.h>
13964 #endif
13965
13966 EOF
13967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13968   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13969   rm -rf conftest*
13970   eval "ac_cv_type_pid_t=yes"
13971 else
13972   rm -rf conftest*
13973   eval "ac_cv_type_pid_t=no"
13974 fi
13975 rm -f conftest*
13976
13977 fi
13978 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13979   echo "$ac_t""yes" 1>&6
13980 else
13981   echo "$ac_t""no" 1>&6
13982   cat >> confdefs.h <<EOF
13983 #define pid_t int
13984 EOF
13985
13986 fi
13987
13988 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13989 echo "configure:13990: checking for ptrdiff_t" >&5
13990 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13991   echo $ac_n "(cached) $ac_c" 1>&6
13992 else
13993   cat > conftest.$ac_ext <<EOF
13994 #line 13995 "configure"
13995 #include "confdefs.h"
13996 #include <stddef.h>
13997 int main() {
13998 ptrdiff_t p
13999 ; return 0; }
14000 EOF
14001 if { (eval echo configure:14002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14002   rm -rf conftest*
14003   am_cv_type_ptrdiff_t=yes
14004 else
14005   echo "configure: failed program was:" >&5
14006   cat conftest.$ac_ext >&5
14007   rm -rf conftest*
14008   am_cv_type_ptrdiff_t=no
14009 fi
14010 rm -f conftest*
14011 fi
14012
14013 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
14014    if test $am_cv_type_ptrdiff_t = yes; then
14015      cat >> confdefs.h <<\EOF
14016 #define HAVE_PTRDIFF_T 1
14017 EOF
14018
14019    fi
14020
14021 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14022 echo "configure:14023: checking return type of signal handlers" >&5
14023 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
14024   echo $ac_n "(cached) $ac_c" 1>&6
14025 else
14026   cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 #include <sys/types.h>
14030 #include <signal.h>
14031 #ifdef signal
14032 #undef signal
14033 #endif
14034 #ifdef __cplusplus
14035 extern "C" void (*signal (int, void (*)(int)))(int);
14036 #else
14037 void (*signal ()) ();
14038 #endif
14039
14040 int main() {
14041 int i;
14042 ; return 0; }
14043 EOF
14044 if { (eval echo configure:14045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14045   rm -rf conftest*
14046   ac_cv_type_signal=void
14047 else
14048   echo "configure: failed program was:" >&5
14049   cat conftest.$ac_ext >&5
14050   rm -rf conftest*
14051   ac_cv_type_signal=int
14052 fi
14053 rm -f conftest*
14054 fi
14055
14056 echo "$ac_t""$ac_cv_type_signal" 1>&6
14057 cat >> confdefs.h <<EOF
14058 #define RETSIGTYPE $ac_cv_type_signal
14059 EOF
14060
14061
14062 echo $ac_n "checking for size_t""... $ac_c" 1>&6
14063 echo "configure:14064: checking for size_t" >&5
14064 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
14065   echo $ac_n "(cached) $ac_c" 1>&6
14066 else
14067   cat > conftest.$ac_ext <<EOF
14068 #line 14069 "configure"
14069 #include "confdefs.h"
14070 #include <sys/types.h>
14071 #if STDC_HEADERS
14072 #include <stdlib.h>
14073 #include <stddef.h>
14074 #endif
14075
14076 EOF
14077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14078   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14079   rm -rf conftest*
14080   eval "ac_cv_type_size_t=yes"
14081 else
14082   rm -rf conftest*
14083   eval "ac_cv_type_size_t=no"
14084 fi
14085 rm -f conftest*
14086
14087 fi
14088 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
14089   echo "$ac_t""yes" 1>&6
14090 else
14091   echo "$ac_t""no" 1>&6
14092   cat >> confdefs.h <<EOF
14093 #define size_t unsigned
14094 EOF
14095
14096 fi
14097
14098
14099 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
14100 echo "configure:14101: checking for ssize_t" >&5
14101 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
14102   echo $ac_n "(cached) $ac_c" 1>&6
14103 else
14104   cat > conftest.$ac_ext <<EOF
14105 #line 14106 "configure"
14106 #include "confdefs.h"
14107 #include <sys/types.h>
14108 #if STDC_HEADERS
14109 #include <stdlib.h>
14110 #include <stddef.h>
14111 #endif
14112
14113 EOF
14114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14115   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14116   rm -rf conftest*
14117   eval "ac_cv_type_ssize_t=yes"
14118 else
14119   rm -rf conftest*
14120   eval "ac_cv_type_ssize_t=no"
14121 fi
14122 rm -f conftest*
14123
14124 fi
14125 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
14126   echo "$ac_t""yes" 1>&6
14127 else
14128   echo "$ac_t""no" 1>&6
14129   cat >> confdefs.h <<EOF
14130 #define ssize_t signed int
14131 EOF
14132
14133 fi
14134
14135 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14136 echo "configure:14137: checking for caddr_t" >&5
14137 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
14138   echo $ac_n "(cached) $ac_c" 1>&6
14139 else
14140   cat > conftest.$ac_ext <<EOF
14141 #line 14142 "configure"
14142 #include "confdefs.h"
14143 #include <sys/types.h>
14144 #if STDC_HEADERS
14145 #include <stdlib.h>
14146 #include <stddef.h>
14147 #endif
14148
14149 EOF
14150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14151   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14152   rm -rf conftest*
14153   eval "ac_cv_type_caddr_t=yes"
14154 else
14155   rm -rf conftest*
14156   eval "ac_cv_type_caddr_t=no"
14157 fi
14158 rm -f conftest*
14159
14160 fi
14161 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
14162   echo "$ac_t""yes" 1>&6
14163 else
14164   echo "$ac_t""no" 1>&6
14165   cat >> confdefs.h <<EOF
14166 #define caddr_t char *
14167 EOF
14168
14169 fi
14170
14171
14172 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14173 echo "configure:14174: checking for socklen_t" >&5
14174 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
14175   echo $ac_n "(cached) $ac_c" 1>&6
14176 else
14177   cat > conftest.$ac_ext <<EOF
14178 #line 14179 "configure"
14179 #include "confdefs.h"
14180
14181 #ifdef HAVE_SYS_TYPES_H
14182 #include <sys/types.h>
14183 #endif
14184 #ifdef HAVE_SYS_SOCKET_H
14185 #include <sys/socket.h>
14186 #endif
14187
14188 int main() {
14189 socklen_t len;
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14193   rm -rf conftest*
14194   ol_cv_type_socklen_t=yes
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   ol_cv_type_socklen_t=no
14200 fi
14201 rm -f conftest*
14202 fi
14203
14204 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14205   if test $ol_cv_type_socklen_t = no; then
14206     cat >> confdefs.h <<\EOF
14207 #define socklen_t int
14208 EOF
14209
14210   fi
14211  
14212 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
14213 echo "configure:14214: checking for member st_blksize in aggregate type struct stat" >&5
14214 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
14215   echo $ac_n "(cached) $ac_c" 1>&6
14216 else
14217   cat > conftest.$ac_ext <<EOF
14218 #line 14219 "configure"
14219 #include "confdefs.h"
14220 #include <sys/types.h>
14221 #include <sys/stat.h>
14222 int main() {
14223 struct stat foo; foo.st_blksize;
14224 ; return 0; }
14225 EOF
14226 if { (eval echo configure:14227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14227   rm -rf conftest*
14228   ac_cv_c_struct_member_st_blksize=yes
14229 else
14230   echo "configure: failed program was:" >&5
14231   cat conftest.$ac_ext >&5
14232   rm -rf conftest*
14233   ac_cv_c_struct_member_st_blksize=no
14234 fi
14235 rm -f conftest*
14236 fi
14237
14238 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
14239 st_blksize="$ac_cv_c_struct_member_st_blksize"
14240 if test $ac_cv_c_struct_member_st_blksize = yes; then
14241   cat >> confdefs.h <<\EOF
14242 #define HAVE_ST_BLKSIZE 1
14243 EOF
14244
14245 fi
14246
14247 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14248 echo "configure:14249: checking whether time.h and sys/time.h may both be included" >&5
14249 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   cat > conftest.$ac_ext <<EOF
14253 #line 14254 "configure"
14254 #include "confdefs.h"
14255 #include <sys/types.h>
14256 #include <sys/time.h>
14257 #include <time.h>
14258 int main() {
14259 struct tm *tp;
14260 ; return 0; }
14261 EOF
14262 if { (eval echo configure:14263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14263   rm -rf conftest*
14264   ac_cv_header_time=yes
14265 else
14266   echo "configure: failed program was:" >&5
14267   cat conftest.$ac_ext >&5
14268   rm -rf conftest*
14269   ac_cv_header_time=no
14270 fi
14271 rm -f conftest*
14272 fi
14273
14274 echo "$ac_t""$ac_cv_header_time" 1>&6
14275 if test $ac_cv_header_time = yes; then
14276   cat >> confdefs.h <<\EOF
14277 #define TIME_WITH_SYS_TIME 1
14278 EOF
14279
14280 fi
14281
14282 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14283 echo "configure:14284: checking whether struct tm is in sys/time.h or time.h" >&5
14284 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
14285   echo $ac_n "(cached) $ac_c" 1>&6
14286 else
14287   cat > conftest.$ac_ext <<EOF
14288 #line 14289 "configure"
14289 #include "confdefs.h"
14290 #include <sys/types.h>
14291 #include <time.h>
14292 int main() {
14293 struct tm *tp; tp->tm_sec;
14294 ; return 0; }
14295 EOF
14296 if { (eval echo configure:14297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14297   rm -rf conftest*
14298   ac_cv_struct_tm=time.h
14299 else
14300   echo "configure: failed program was:" >&5
14301   cat conftest.$ac_ext >&5
14302   rm -rf conftest*
14303   ac_cv_struct_tm=sys/time.h
14304 fi
14305 rm -f conftest*
14306 fi
14307
14308 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14309 if test $ac_cv_struct_tm = sys/time.h; then
14310   cat >> confdefs.h <<\EOF
14311 #define TM_IN_SYS_TIME 1
14312 EOF
14313
14314 fi
14315
14316 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14317 echo "configure:14318: checking for uid_t in sys/types.h" >&5
14318 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
14319   echo $ac_n "(cached) $ac_c" 1>&6
14320 else
14321   cat > conftest.$ac_ext <<EOF
14322 #line 14323 "configure"
14323 #include "confdefs.h"
14324 #include <sys/types.h>
14325 EOF
14326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14327   egrep "uid_t" >/dev/null 2>&1; then
14328   rm -rf conftest*
14329   ac_cv_type_uid_t=yes
14330 else
14331   rm -rf conftest*
14332   ac_cv_type_uid_t=no
14333 fi
14334 rm -f conftest*
14335
14336 fi
14337
14338 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14339 if test $ac_cv_type_uid_t = no; then
14340   cat >> confdefs.h <<\EOF
14341 #define uid_t int
14342 EOF
14343
14344   cat >> confdefs.h <<\EOF
14345 #define gid_t int
14346 EOF
14347
14348 fi
14349
14350 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14351 echo "configure:14352: checking for sig_atomic_t" >&5
14352 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14353   echo $ac_n "(cached) $ac_c" 1>&6
14354 else
14355   cat > conftest.$ac_ext <<EOF
14356 #line 14357 "configure"
14357 #include "confdefs.h"
14358 #include <signal.h>
14359 int main() {
14360 sig_atomic_t atomic;
14361 ; return 0; }
14362 EOF
14363 if { (eval echo configure:14364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14364   rm -rf conftest*
14365   ol_cv_type_sig_atomic_t=yes
14366 else
14367   echo "configure: failed program was:" >&5
14368   cat conftest.$ac_ext >&5
14369   rm -rf conftest*
14370   ol_cv_type_sig_atomic_t=no
14371 fi
14372 rm -f conftest*
14373 fi
14374
14375 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14376   if test $ol_cv_type_sig_atomic_t = no; then
14377     cat >> confdefs.h <<\EOF
14378 #define sig_atomic_t int
14379 EOF
14380
14381   fi
14382  
14383
14384
14385 # test for pw_gecos in struct passwd
14386 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14387 echo "configure:14388: checking struct passwd for pw_gecos" >&5
14388 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14389   echo $ac_n "(cached) $ac_c" 1>&6
14390 else
14391   
14392         cat > conftest.$ac_ext <<EOF
14393 #line 14394 "configure"
14394 #include "confdefs.h"
14395 #include <pwd.h>
14396 int main() {
14397
14398         struct passwd pwd;
14399         pwd.pw_gecos = pwd.pw_name;
14400
14401 ; return 0; }
14402 EOF
14403 if { (eval echo configure:14404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14404   rm -rf conftest*
14405   ol_cv_struct_passwd_pw_gecos=yes
14406 else
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -rf conftest*
14410   ol_cv_struct_passwd_pw_gecos=no
14411 fi
14412 rm -f conftest*
14413 fi
14414
14415 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14416 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14417         cat >> confdefs.h <<\EOF
14418 #define HAVE_PW_GECOS 1
14419 EOF
14420
14421 fi
14422
14423 # test for pw_passwd in struct passwd
14424 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14425 echo "configure:14426: checking struct passwd for pw_passwd" >&5
14426 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14427   echo $ac_n "(cached) $ac_c" 1>&6
14428 else
14429   
14430         cat > conftest.$ac_ext <<EOF
14431 #line 14432 "configure"
14432 #include "confdefs.h"
14433 #include <pwd.h>
14434 int main() {
14435
14436         struct passwd pwd;
14437         pwd.pw_passwd = pwd.pw_name;
14438
14439 ; return 0; }
14440 EOF
14441 if { (eval echo configure:14442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14442   rm -rf conftest*
14443   ol_cv_struct_passwd_pw_passwd=yes
14444 else
14445   echo "configure: failed program was:" >&5
14446   cat conftest.$ac_ext >&5
14447   rm -rf conftest*
14448   ol_cv_struct_passwd_pw_passwd=no
14449 fi
14450 rm -f conftest*
14451 fi
14452
14453 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14454 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14455         cat >> confdefs.h <<\EOF
14456 #define HAVE_PW_PASSWD 1
14457 EOF
14458
14459 fi
14460
14461
14462 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14463 echo "configure:14464: checking if toupper() requires islower()" >&5
14464 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14465   echo $ac_n "(cached) $ac_c" 1>&6
14466 else
14467   
14468         if test "$cross_compiling" = yes; then
14469   ol_cv_c_upper_lower=safe
14470 else
14471   cat > conftest.$ac_ext <<EOF
14472 #line 14473 "configure"
14473 #include "confdefs.h"
14474
14475 #include <ctype.h>
14476 main()
14477 {
14478         if ('C' == toupper('C'))
14479                 exit(0);
14480         else
14481                 exit(1);
14482 }
14483 EOF
14484 if { (eval echo configure:14485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14485 then
14486   ol_cv_c_upper_lower=no
14487 else
14488   echo "configure: failed program was:" >&5
14489   cat conftest.$ac_ext >&5
14490   rm -fr conftest*
14491   ol_cv_c_upper_lower=yes
14492 fi
14493 rm -fr conftest*
14494 fi
14495
14496 fi
14497
14498 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14499 if test $ol_cv_c_upper_lower != no ; then
14500         cat >> confdefs.h <<\EOF
14501 #define C_UPPER_LOWER 1
14502 EOF
14503
14504 fi
14505
14506 echo $ac_n "checking for working const""... $ac_c" 1>&6
14507 echo "configure:14508: checking for working const" >&5
14508 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14509   echo $ac_n "(cached) $ac_c" 1>&6
14510 else
14511   cat > conftest.$ac_ext <<EOF
14512 #line 14513 "configure"
14513 #include "confdefs.h"
14514
14515 int main() {
14516
14517 /* Ultrix mips cc rejects this.  */
14518 typedef int charset[2]; const charset x;
14519 /* SunOS 4.1.1 cc rejects this.  */
14520 char const *const *ccp;
14521 char **p;
14522 /* NEC SVR4.0.2 mips cc rejects this.  */
14523 struct point {int x, y;};
14524 static struct point const zero = {0,0};
14525 /* AIX XL C 1.02.0.0 rejects this.
14526    It does not let you subtract one const X* pointer from another in an arm
14527    of an if-expression whose if-part is not a constant expression */
14528 const char *g = "string";
14529 ccp = &g + (g ? g-g : 0);
14530 /* HPUX 7.0 cc rejects these. */
14531 ++ccp;
14532 p = (char**) ccp;
14533 ccp = (char const *const *) p;
14534 { /* SCO 3.2v4 cc rejects this.  */
14535   char *t;
14536   char const *s = 0 ? (char *) 0 : (char const *) 0;
14537
14538   *t++ = 0;
14539 }
14540 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14541   int x[] = {25, 17};
14542   const int *foo = &x[0];
14543   ++foo;
14544 }
14545 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14546   typedef const int *iptr;
14547   iptr p = 0;
14548   ++p;
14549 }
14550 { /* AIX XL C 1.02.0.0 rejects this saying
14551      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14552   struct s { int j; const int *ap[3]; };
14553   struct s *b; b->j = 5;
14554 }
14555 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14556   const int foo = 10;
14557 }
14558
14559 ; return 0; }
14560 EOF
14561 if { (eval echo configure:14562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14562   rm -rf conftest*
14563   ac_cv_c_const=yes
14564 else
14565   echo "configure: failed program was:" >&5
14566   cat conftest.$ac_ext >&5
14567   rm -rf conftest*
14568   ac_cv_c_const=no
14569 fi
14570 rm -f conftest*
14571 fi
14572
14573 echo "$ac_t""$ac_cv_c_const" 1>&6
14574 if test $ac_cv_c_const = no; then
14575   cat >> confdefs.h <<\EOF
14576 #define const 
14577 EOF
14578
14579 fi
14580
14581 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14582 echo "configure:14583: checking if compiler understands volatile" >&5
14583 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14584   echo $ac_n "(cached) $ac_c" 1>&6
14585 else
14586   cat > conftest.$ac_ext <<EOF
14587 #line 14588 "configure"
14588 #include "confdefs.h"
14589 int x, y, z;
14590 int main() {
14591 volatile int a; int * volatile b = x ? &y : &z;
14592       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14593       *b = 0;
14594 ; return 0; }
14595 EOF
14596 if { (eval echo configure:14597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14597   rm -rf conftest*
14598   ol_cv_c_volatile=yes
14599 else
14600   echo "configure: failed program was:" >&5
14601   cat conftest.$ac_ext >&5
14602   rm -rf conftest*
14603   ol_cv_c_volatile=no
14604 fi
14605 rm -f conftest*
14606 fi
14607
14608 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14609   if test $ol_cv_c_volatile = yes; then
14610     : 
14611   else
14612     cat >> confdefs.h <<\EOF
14613 #define volatile 
14614 EOF
14615
14616   fi
14617  
14618
14619 if test $cross_compiling = yes ; then
14620         cat >> confdefs.h <<\EOF
14621 #define CROSS_COMPILING 1
14622 EOF
14623
14624 else
14625         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14626 echo "configure:14627: checking whether byte ordering is bigendian" >&5
14627 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14628   echo $ac_n "(cached) $ac_c" 1>&6
14629 else
14630   ac_cv_c_bigendian=unknown
14631 # See if sys/param.h defines the BYTE_ORDER macro.
14632 cat > conftest.$ac_ext <<EOF
14633 #line 14634 "configure"
14634 #include "confdefs.h"
14635 #include <sys/types.h>
14636 #include <sys/param.h>
14637 int main() {
14638
14639 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14640  bogus endian macros
14641 #endif
14642 ; return 0; }
14643 EOF
14644 if { (eval echo configure:14645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14645   rm -rf conftest*
14646   # It does; now see whether it defined to BIG_ENDIAN or not.
14647 cat > conftest.$ac_ext <<EOF
14648 #line 14649 "configure"
14649 #include "confdefs.h"
14650 #include <sys/types.h>
14651 #include <sys/param.h>
14652 int main() {
14653
14654 #if BYTE_ORDER != BIG_ENDIAN
14655  not big endian
14656 #endif
14657 ; return 0; }
14658 EOF
14659 if { (eval echo configure:14660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14660   rm -rf conftest*
14661   ac_cv_c_bigendian=yes
14662 else
14663   echo "configure: failed program was:" >&5
14664   cat conftest.$ac_ext >&5
14665   rm -rf conftest*
14666   ac_cv_c_bigendian=no
14667 fi
14668 rm -f conftest*
14669 else
14670   echo "configure: failed program was:" >&5
14671   cat conftest.$ac_ext >&5
14672 fi
14673 rm -f conftest*
14674 if test $ac_cv_c_bigendian = unknown; then
14675 if test "$cross_compiling" = yes; then
14676     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14677 else
14678   cat > conftest.$ac_ext <<EOF
14679 #line 14680 "configure"
14680 #include "confdefs.h"
14681 main () {
14682   /* Are we little or big endian?  From Harbison&Steele.  */
14683   union
14684   {
14685     long l;
14686     char c[sizeof (long)];
14687   } u;
14688   u.l = 1;
14689   exit (u.c[sizeof (long) - 1] == 1);
14690 }
14691 EOF
14692 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14693 then
14694   ac_cv_c_bigendian=no
14695 else
14696   echo "configure: failed program was:" >&5
14697   cat conftest.$ac_ext >&5
14698   rm -fr conftest*
14699   ac_cv_c_bigendian=yes
14700 fi
14701 rm -fr conftest*
14702 fi
14703
14704 fi
14705 fi
14706
14707 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14708 if test $ac_cv_c_bigendian = yes; then
14709   cat >> confdefs.h <<\EOF
14710 #define WORDS_BIGENDIAN 1
14711 EOF
14712
14713 fi
14714
14715 fi
14716
14717 echo $ac_n "checking size of short""... $ac_c" 1>&6
14718 echo "configure:14719: checking size of short" >&5 
14719 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14720   echo $ac_n "(cached) $ac_c" 1>&6
14721 else
14722   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14723   cat > conftest.$ac_ext <<EOF
14724 #line 14725 "configure"
14725 #include "confdefs.h"
14726 #include "confdefs.h" 
14727 #include <sys/types.h> 
14728  
14729
14730 int main() {
14731 switch (0) case 0: case (sizeof (short) == $ac_size):;
14732 ; return 0; }
14733 EOF
14734 if { (eval echo configure:14735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14735   rm -rf conftest*
14736   ac_cv_sizeof_short=$ac_size
14737 else
14738   echo "configure: failed program was:" >&5
14739   cat conftest.$ac_ext >&5
14740 fi
14741 rm -f conftest* 
14742   if test x$ac_cv_sizeof_short != x ; then break; fi 
14743 done 
14744
14745 fi
14746  
14747 if test x$ac_cv_sizeof_short = x ; then 
14748   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14749 fi 
14750 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14751 cat >> confdefs.h <<EOF
14752 #define SIZEOF_SHORT $ac_cv_sizeof_short
14753 EOF
14754  
14755  
14756 echo $ac_n "checking size of int""... $ac_c" 1>&6
14757 echo "configure:14758: checking size of int" >&5 
14758 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14759   echo $ac_n "(cached) $ac_c" 1>&6
14760 else
14761   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14762   cat > conftest.$ac_ext <<EOF
14763 #line 14764 "configure"
14764 #include "confdefs.h"
14765 #include "confdefs.h" 
14766 #include <sys/types.h> 
14767  
14768
14769 int main() {
14770 switch (0) case 0: case (sizeof (int) == $ac_size):;
14771 ; return 0; }
14772 EOF
14773 if { (eval echo configure:14774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14774   rm -rf conftest*
14775   ac_cv_sizeof_int=$ac_size
14776 else
14777   echo "configure: failed program was:" >&5
14778   cat conftest.$ac_ext >&5
14779 fi
14780 rm -f conftest* 
14781   if test x$ac_cv_sizeof_int != x ; then break; fi 
14782 done 
14783
14784 fi
14785  
14786 if test x$ac_cv_sizeof_int = x ; then 
14787   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14788 fi 
14789 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14790 cat >> confdefs.h <<EOF
14791 #define SIZEOF_INT $ac_cv_sizeof_int
14792 EOF
14793  
14794  
14795 echo $ac_n "checking size of long""... $ac_c" 1>&6
14796 echo "configure:14797: checking size of long" >&5 
14797 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14798   echo $ac_n "(cached) $ac_c" 1>&6
14799 else
14800   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14801   cat > conftest.$ac_ext <<EOF
14802 #line 14803 "configure"
14803 #include "confdefs.h"
14804 #include "confdefs.h" 
14805 #include <sys/types.h> 
14806  
14807
14808 int main() {
14809 switch (0) case 0: case (sizeof (long) == $ac_size):;
14810 ; return 0; }
14811 EOF
14812 if { (eval echo configure:14813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14813   rm -rf conftest*
14814   ac_cv_sizeof_long=$ac_size
14815 else
14816   echo "configure: failed program was:" >&5
14817   cat conftest.$ac_ext >&5
14818 fi
14819 rm -f conftest* 
14820   if test x$ac_cv_sizeof_long != x ; then break; fi 
14821 done 
14822
14823 fi
14824  
14825 if test x$ac_cv_sizeof_long = x ; then 
14826   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14827 fi 
14828 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14829 cat >> confdefs.h <<EOF
14830 #define SIZEOF_LONG $ac_cv_sizeof_long
14831 EOF
14832  
14833
14834
14835 if test "$ac_cv_sizeof_int" -lt 4 ; then
14836         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14837
14838         cat >> confdefs.h <<\EOF
14839 #define LBER_INT_T long
14840 EOF
14841
14842 else
14843         cat >> confdefs.h <<\EOF
14844 #define LBER_INT_T int
14845 EOF
14846
14847 fi
14848
14849 cat >> confdefs.h <<\EOF
14850 #define LBER_LEN_T long
14851 EOF
14852
14853 cat >> confdefs.h <<\EOF
14854 #define LBER_SOCKET_T int
14855 EOF
14856
14857 cat >> confdefs.h <<\EOF
14858 #define LBER_TAG_T long
14859 EOF
14860
14861
14862 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14863 echo "configure:14864: checking for 8-bit clean memcmp" >&5
14864 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14865   echo $ac_n "(cached) $ac_c" 1>&6
14866 else
14867   if test "$cross_compiling" = yes; then
14868   ac_cv_func_memcmp_clean=no
14869 else
14870   cat > conftest.$ac_ext <<EOF
14871 #line 14872 "configure"
14872 #include "confdefs.h"
14873
14874 main()
14875 {
14876   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14877   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14878 }
14879
14880 EOF
14881 if { (eval echo configure:14882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14882 then
14883   ac_cv_func_memcmp_clean=yes
14884 else
14885   echo "configure: failed program was:" >&5
14886   cat conftest.$ac_ext >&5
14887   rm -fr conftest*
14888   ac_cv_func_memcmp_clean=no
14889 fi
14890 rm -fr conftest*
14891 fi
14892
14893 fi
14894
14895 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14896 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14897
14898 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14899 echo "configure:14900: checking for strftime" >&5
14900 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14901   echo $ac_n "(cached) $ac_c" 1>&6
14902 else
14903   cat > conftest.$ac_ext <<EOF
14904 #line 14905 "configure"
14905 #include "confdefs.h"
14906 /* System header to define __stub macros and hopefully few prototypes,
14907     which can conflict with char strftime(); below.  */
14908 #include <assert.h>
14909 /* Override any gcc2 internal prototype to avoid an error.  */
14910 /* We use char because int might match the return type of a gcc2
14911     builtin and then its argument prototype would still apply.  */
14912 char strftime();
14913 char (*f)();
14914
14915 int main() {
14916
14917 /* The GNU C library defines this for functions which it implements
14918     to always fail with ENOSYS.  Some functions are actually named
14919     something starting with __ and the normal name is an alias.  */
14920 #if defined (__stub_strftime) || defined (__stub___strftime)
14921 choke me
14922 #else
14923 f = strftime;
14924 #endif
14925
14926 ; return 0; }
14927 EOF
14928 if { (eval echo configure:14929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14929   rm -rf conftest*
14930   eval "ac_cv_func_strftime=yes"
14931 else
14932   echo "configure: failed program was:" >&5
14933   cat conftest.$ac_ext >&5
14934   rm -rf conftest*
14935   eval "ac_cv_func_strftime=no"
14936 fi
14937 rm -f conftest*
14938 fi
14939
14940 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14941   echo "$ac_t""yes" 1>&6
14942   cat >> confdefs.h <<\EOF
14943 #define HAVE_STRFTIME 1
14944 EOF
14945
14946 else
14947   echo "$ac_t""no" 1>&6
14948 # strftime is in -lintl on SCO UNIX.
14949 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14950 echo "configure:14951: checking for strftime in -lintl" >&5
14951 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14952 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14953   echo $ac_n "(cached) $ac_c" 1>&6
14954 else
14955   ac_save_LIBS="$LIBS"
14956 LIBS="-lintl  $LIBS"
14957 cat > conftest.$ac_ext <<EOF
14958 #line 14959 "configure"
14959 #include "confdefs.h"
14960 /* Override any gcc2 internal prototype to avoid an error.  */
14961 /* We use char because int might match the return type of a gcc2
14962     builtin and then its argument prototype would still apply.  */
14963 char strftime();
14964
14965 int main() {
14966 strftime()
14967 ; return 0; }
14968 EOF
14969 if { (eval echo configure:14970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14970   rm -rf conftest*
14971   eval "ac_cv_lib_$ac_lib_var=yes"
14972 else
14973   echo "configure: failed program was:" >&5
14974   cat conftest.$ac_ext >&5
14975   rm -rf conftest*
14976   eval "ac_cv_lib_$ac_lib_var=no"
14977 fi
14978 rm -f conftest*
14979 LIBS="$ac_save_LIBS"
14980
14981 fi
14982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14983   echo "$ac_t""yes" 1>&6
14984   cat >> confdefs.h <<\EOF
14985 #define HAVE_STRFTIME 1
14986 EOF
14987
14988 LIBS="-lintl $LIBS"
14989 else
14990   echo "$ac_t""no" 1>&6
14991 fi
14992
14993 fi
14994
14995
14996 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14997 echo "configure:14998: checking for inet_aton()" >&5
14998 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14999   echo $ac_n "(cached) $ac_c" 1>&6
15000 else
15001   cat > conftest.$ac_ext <<EOF
15002 #line 15003 "configure"
15003 #include "confdefs.h"
15004
15005 #ifdef HAVE_SYS_TYPES_H
15006 #       include <sys/types.h>
15007 #endif
15008 #ifdef HAVE_SYS_SOCKET_H
15009 #       include <sys/socket.h>
15010 #       ifdef HAVE_SYS_SELECT_H
15011 #               include <sys/select.h>
15012 #       endif
15013 #       include <netinet/in.h>
15014 #       ifdef HAVE_ARPA_INET_H
15015 #               include <arpa/inet.h>
15016 #       endif
15017 #endif
15018
15019 int main() {
15020 struct in_addr in;
15021 int rc = inet_aton( "255.255.255.255", &in );
15022 ; return 0; }
15023 EOF
15024 if { (eval echo configure:15025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15025   rm -rf conftest*
15026   ol_cv_func_inet_aton=yes
15027 else
15028   echo "configure: failed program was:" >&5
15029   cat conftest.$ac_ext >&5
15030   rm -rf conftest*
15031   ol_cv_func_inet_aton=no
15032 fi
15033 rm -f conftest*
15034 fi
15035
15036 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
15037   if test $ol_cv_func_inet_aton != no; then
15038     cat >> confdefs.h <<\EOF
15039 #define HAVE_INET_ATON 1
15040 EOF
15041
15042   fi
15043  
15044
15045 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
15046 echo "configure:15047: checking for _spawnlp" >&5
15047 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
15048   echo $ac_n "(cached) $ac_c" 1>&6
15049 else
15050   cat > conftest.$ac_ext <<EOF
15051 #line 15052 "configure"
15052 #include "confdefs.h"
15053 /* System header to define __stub macros and hopefully few prototypes,
15054     which can conflict with char _spawnlp(); below.  */
15055 #include <assert.h>
15056 /* Override any gcc2 internal prototype to avoid an error.  */
15057 /* We use char because int might match the return type of a gcc2
15058     builtin and then its argument prototype would still apply.  */
15059 char _spawnlp();
15060 char (*f)();
15061
15062 int main() {
15063
15064 /* The GNU C library defines this for functions which it implements
15065     to always fail with ENOSYS.  Some functions are actually named
15066     something starting with __ and the normal name is an alias.  */
15067 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
15068 choke me
15069 #else
15070 f = _spawnlp;
15071 #endif
15072
15073 ; return 0; }
15074 EOF
15075 if { (eval echo configure:15076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15076   rm -rf conftest*
15077   eval "ac_cv_func__spawnlp=yes"
15078 else
15079   echo "configure: failed program was:" >&5
15080   cat conftest.$ac_ext >&5
15081   rm -rf conftest*
15082   eval "ac_cv_func__spawnlp=no"
15083 fi
15084 rm -f conftest*
15085 fi
15086
15087 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
15088   echo "$ac_t""yes" 1>&6
15089   cat >> confdefs.h <<\EOF
15090 #define HAVE_SPAWNLP 1
15091 EOF
15092
15093 else
15094   echo "$ac_t""no" 1>&6
15095 fi
15096
15097
15098 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
15099 echo "configure:15100: checking for _snprintf" >&5
15100 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
15101   echo $ac_n "(cached) $ac_c" 1>&6
15102 else
15103   cat > conftest.$ac_ext <<EOF
15104 #line 15105 "configure"
15105 #include "confdefs.h"
15106 /* System header to define __stub macros and hopefully few prototypes,
15107     which can conflict with char _snprintf(); below.  */
15108 #include <assert.h>
15109 /* Override any gcc2 internal prototype to avoid an error.  */
15110 /* We use char because int might match the return type of a gcc2
15111     builtin and then its argument prototype would still apply.  */
15112 char _snprintf();
15113 char (*f)();
15114
15115 int main() {
15116
15117 /* The GNU C library defines this for functions which it implements
15118     to always fail with ENOSYS.  Some functions are actually named
15119     something starting with __ and the normal name is an alias.  */
15120 #if defined (__stub__snprintf) || defined (__stub____snprintf)
15121 choke me
15122 #else
15123 f = _snprintf;
15124 #endif
15125
15126 ; return 0; }
15127 EOF
15128 if { (eval echo configure:15129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15129   rm -rf conftest*
15130   eval "ac_cv_func__snprintf=yes"
15131 else
15132   echo "configure: failed program was:" >&5
15133   cat conftest.$ac_ext >&5
15134   rm -rf conftest*
15135   eval "ac_cv_func__snprintf=no"
15136 fi
15137 rm -f conftest*
15138 fi
15139
15140 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
15141   echo "$ac_t""yes" 1>&6
15142   ac_cv_func_snprintf=yes
15143         cat >> confdefs.h <<\EOF
15144 #define snprintf _snprintf
15145 EOF
15146
15147
15148 else
15149   echo "$ac_t""no" 1>&6
15150 fi
15151
15152
15153 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15154 echo "configure:15155: checking for _vsnprintf" >&5
15155 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
15156   echo $ac_n "(cached) $ac_c" 1>&6
15157 else
15158   cat > conftest.$ac_ext <<EOF
15159 #line 15160 "configure"
15160 #include "confdefs.h"
15161 /* System header to define __stub macros and hopefully few prototypes,
15162     which can conflict with char _vsnprintf(); below.  */
15163 #include <assert.h>
15164 /* Override any gcc2 internal prototype to avoid an error.  */
15165 /* We use char because int might match the return type of a gcc2
15166     builtin and then its argument prototype would still apply.  */
15167 char _vsnprintf();
15168 char (*f)();
15169
15170 int main() {
15171
15172 /* The GNU C library defines this for functions which it implements
15173     to always fail with ENOSYS.  Some functions are actually named
15174     something starting with __ and the normal name is an alias.  */
15175 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15176 choke me
15177 #else
15178 f = _vsnprintf;
15179 #endif
15180
15181 ; return 0; }
15182 EOF
15183 if { (eval echo configure:15184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15184   rm -rf conftest*
15185   eval "ac_cv_func__vsnprintf=yes"
15186 else
15187   echo "configure: failed program was:" >&5
15188   cat conftest.$ac_ext >&5
15189   rm -rf conftest*
15190   eval "ac_cv_func__vsnprintf=no"
15191 fi
15192 rm -f conftest*
15193 fi
15194
15195 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15196   echo "$ac_t""yes" 1>&6
15197   ac_cv_func_vsnprintf=yes
15198         cat >> confdefs.h <<\EOF
15199 #define vsnprintf _vsnprintf
15200 EOF
15201
15202
15203 else
15204   echo "$ac_t""no" 1>&6
15205 fi
15206
15207
15208 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15209 echo "configure:15210: checking for vprintf" >&5
15210 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
15211   echo $ac_n "(cached) $ac_c" 1>&6
15212 else
15213   cat > conftest.$ac_ext <<EOF
15214 #line 15215 "configure"
15215 #include "confdefs.h"
15216 /* System header to define __stub macros and hopefully few prototypes,
15217     which can conflict with char vprintf(); below.  */
15218 #include <assert.h>
15219 /* Override any gcc2 internal prototype to avoid an error.  */
15220 /* We use char because int might match the return type of a gcc2
15221     builtin and then its argument prototype would still apply.  */
15222 char vprintf();
15223 char (*f)();
15224
15225 int main() {
15226
15227 /* The GNU C library defines this for functions which it implements
15228     to always fail with ENOSYS.  Some functions are actually named
15229     something starting with __ and the normal name is an alias.  */
15230 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15231 choke me
15232 #else
15233 f = vprintf;
15234 #endif
15235
15236 ; return 0; }
15237 EOF
15238 if { (eval echo configure:15239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15239   rm -rf conftest*
15240   eval "ac_cv_func_vprintf=yes"
15241 else
15242   echo "configure: failed program was:" >&5
15243   cat conftest.$ac_ext >&5
15244   rm -rf conftest*
15245   eval "ac_cv_func_vprintf=no"
15246 fi
15247 rm -f conftest*
15248 fi
15249
15250 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15251   echo "$ac_t""yes" 1>&6
15252   cat >> confdefs.h <<\EOF
15253 #define HAVE_VPRINTF 1
15254 EOF
15255
15256 else
15257   echo "$ac_t""no" 1>&6
15258 fi
15259
15260 if test "$ac_cv_func_vprintf" != yes; then
15261 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15262 echo "configure:15263: checking for _doprnt" >&5
15263 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
15264   echo $ac_n "(cached) $ac_c" 1>&6
15265 else
15266   cat > conftest.$ac_ext <<EOF
15267 #line 15268 "configure"
15268 #include "confdefs.h"
15269 /* System header to define __stub macros and hopefully few prototypes,
15270     which can conflict with char _doprnt(); below.  */
15271 #include <assert.h>
15272 /* Override any gcc2 internal prototype to avoid an error.  */
15273 /* We use char because int might match the return type of a gcc2
15274     builtin and then its argument prototype would still apply.  */
15275 char _doprnt();
15276 char (*f)();
15277
15278 int main() {
15279
15280 /* The GNU C library defines this for functions which it implements
15281     to always fail with ENOSYS.  Some functions are actually named
15282     something starting with __ and the normal name is an alias.  */
15283 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15284 choke me
15285 #else
15286 f = _doprnt;
15287 #endif
15288
15289 ; return 0; }
15290 EOF
15291 if { (eval echo configure:15292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15292   rm -rf conftest*
15293   eval "ac_cv_func__doprnt=yes"
15294 else
15295   echo "configure: failed program was:" >&5
15296   cat conftest.$ac_ext >&5
15297   rm -rf conftest*
15298   eval "ac_cv_func__doprnt=no"
15299 fi
15300 rm -f conftest*
15301 fi
15302
15303 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15304   echo "$ac_t""yes" 1>&6
15305   cat >> confdefs.h <<\EOF
15306 #define HAVE_DOPRNT 1
15307 EOF
15308
15309 else
15310   echo "$ac_t""no" 1>&6
15311 fi
15312
15313 fi
15314
15315
15316 if test $ac_cv_func_vprintf = yes ; then
15317                 for ac_func in vsnprintf vsprintf
15318 do
15319 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15320 echo "configure:15321: checking for $ac_func" >&5
15321 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15322   echo $ac_n "(cached) $ac_c" 1>&6
15323 else
15324   cat > conftest.$ac_ext <<EOF
15325 #line 15326 "configure"
15326 #include "confdefs.h"
15327 /* System header to define __stub macros and hopefully few prototypes,
15328     which can conflict with char $ac_func(); below.  */
15329 #include <assert.h>
15330 /* Override any gcc2 internal prototype to avoid an error.  */
15331 /* We use char because int might match the return type of a gcc2
15332     builtin and then its argument prototype would still apply.  */
15333 char $ac_func();
15334 char (*f)();
15335
15336 int main() {
15337
15338 /* The GNU C library defines this for functions which it implements
15339     to always fail with ENOSYS.  Some functions are actually named
15340     something starting with __ and the normal name is an alias.  */
15341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15342 choke me
15343 #else
15344 f = $ac_func;
15345 #endif
15346
15347 ; return 0; }
15348 EOF
15349 if { (eval echo configure:15350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15350   rm -rf conftest*
15351   eval "ac_cv_func_$ac_func=yes"
15352 else
15353   echo "configure: failed program was:" >&5
15354   cat conftest.$ac_ext >&5
15355   rm -rf conftest*
15356   eval "ac_cv_func_$ac_func=no"
15357 fi
15358 rm -f conftest*
15359 fi
15360
15361 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15362   echo "$ac_t""yes" 1>&6
15363     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15364   cat >> confdefs.h <<EOF
15365 #define $ac_tr_func 1
15366 EOF
15367  
15368 else
15369   echo "$ac_t""no" 1>&6
15370 fi
15371 done
15372
15373 fi
15374
15375 for ac_func in \
15376         bcopy                   \
15377         closesocket             \
15378         chroot                  \
15379         endgrent                \
15380         endpwent                \
15381         flock                   \
15382         getdtablesize   \
15383         getgrgid                \
15384         gethostname             \
15385         getpass                 \
15386         getpassphrase   \
15387         getpwuid                \
15388         getpwnam                \
15389         getspnam                \
15390         gettimeofday    \
15391         initgroups              \
15392         lockf                   \
15393         memcpy                  \
15394         memmove                 \
15395         mkstemp                 \
15396         pipe                    \
15397         read                    \
15398         recv                    \
15399         recvfrom                \
15400         setpwfile               \
15401         setgid                  \
15402         setegid                 \
15403         setsid                  \
15404         setuid                  \
15405         seteuid                 \
15406         sigaction               \
15407         signal                  \
15408         sigset                  \
15409         snprintf                \
15410         strdup                  \
15411         strerror                \
15412         strpbrk                 \
15413         strrchr                 \
15414         strsep                  \
15415         strstr                  \
15416         strtol                  \
15417         strtoul                 \
15418         strspn                  \
15419         sysconf                 \
15420         waitpid                 \
15421         wait4                   \
15422         write                   \
15423         send                    \
15424         sendto                  \
15425
15426 do
15427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15428 echo "configure:15429: checking for $ac_func" >&5
15429 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15430   echo $ac_n "(cached) $ac_c" 1>&6
15431 else
15432   cat > conftest.$ac_ext <<EOF
15433 #line 15434 "configure"
15434 #include "confdefs.h"
15435 /* System header to define __stub macros and hopefully few prototypes,
15436     which can conflict with char $ac_func(); below.  */
15437 #include <assert.h>
15438 /* Override any gcc2 internal prototype to avoid an error.  */
15439 /* We use char because int might match the return type of a gcc2
15440     builtin and then its argument prototype would still apply.  */
15441 char $ac_func();
15442 char (*f)();
15443
15444 int main() {
15445
15446 /* The GNU C library defines this for functions which it implements
15447     to always fail with ENOSYS.  Some functions are actually named
15448     something starting with __ and the normal name is an alias.  */
15449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15450 choke me
15451 #else
15452 f = $ac_func;
15453 #endif
15454
15455 ; return 0; }
15456 EOF
15457 if { (eval echo configure:15458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15458   rm -rf conftest*
15459   eval "ac_cv_func_$ac_func=yes"
15460 else
15461   echo "configure: failed program was:" >&5
15462   cat conftest.$ac_ext >&5
15463   rm -rf conftest*
15464   eval "ac_cv_func_$ac_func=no"
15465 fi
15466 rm -f conftest*
15467 fi
15468
15469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15470   echo "$ac_t""yes" 1>&6
15471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15472   cat >> confdefs.h <<EOF
15473 #define $ac_tr_func 1
15474 EOF
15475  
15476 else
15477   echo "$ac_t""no" 1>&6
15478 fi
15479 done
15480
15481
15482 for ac_func in getopt tempnam
15483 do
15484 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15485 echo "configure:15486: checking for $ac_func" >&5
15486 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15487   echo $ac_n "(cached) $ac_c" 1>&6
15488 else
15489   cat > conftest.$ac_ext <<EOF
15490 #line 15491 "configure"
15491 #include "confdefs.h"
15492 /* System header to define __stub macros and hopefully few prototypes,
15493     which can conflict with char $ac_func(); below.  */
15494 #include <assert.h>
15495 /* Override any gcc2 internal prototype to avoid an error.  */
15496 /* We use char because int might match the return type of a gcc2
15497     builtin and then its argument prototype would still apply.  */
15498 char $ac_func();
15499 char (*f)();
15500
15501 int main() {
15502
15503 /* The GNU C library defines this for functions which it implements
15504     to always fail with ENOSYS.  Some functions are actually named
15505     something starting with __ and the normal name is an alias.  */
15506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15507 choke me
15508 #else
15509 f = $ac_func;
15510 #endif
15511
15512 ; return 0; }
15513 EOF
15514 if { (eval echo configure:15515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15515   rm -rf conftest*
15516   eval "ac_cv_func_$ac_func=yes"
15517 else
15518   echo "configure: failed program was:" >&5
15519   cat conftest.$ac_ext >&5
15520   rm -rf conftest*
15521   eval "ac_cv_func_$ac_func=no"
15522 fi
15523 rm -f conftest*
15524 fi
15525
15526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15527   echo "$ac_t""yes" 1>&6
15528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15529   cat >> confdefs.h <<EOF
15530 #define $ac_tr_func 1
15531 EOF
15532  
15533 else
15534   echo "$ac_t""no" 1>&6
15535 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15536 fi
15537 done
15538
15539
15540
15541 if test "$ac_cv_func_getopt" != yes; then
15542     LIBSRCS="$LIBSRCS getopt.c"
15543 fi
15544
15545 if test "$ac_cv_func_tempnam" != yes; then
15546     LIBSRCS="$LIBSRCS tempnam.c"
15547 fi
15548
15549 # Check Configuration
15550 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15551 echo "configure:15552: checking declaration of sys_errlist" >&5
15552 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15553   echo $ac_n "(cached) $ac_c" 1>&6
15554 else
15555   
15556         cat > conftest.$ac_ext <<EOF
15557 #line 15558 "configure"
15558 #include "confdefs.h"
15559
15560 #include <stdio.h>
15561 #include <sys/types.h>
15562 #include <errno.h>
15563 #ifdef WINNT
15564 #include <stdlib.h>
15565 #endif 
15566 int main() {
15567 char *c = (char *) *sys_errlist
15568 ; return 0; }
15569 EOF
15570 if { (eval echo configure:15571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15571   rm -rf conftest*
15572   ol_cv_dcl_sys_errlist=yes
15573         ol_cv_have_sys_errlist=yes
15574 else
15575   echo "configure: failed program was:" >&5
15576   cat conftest.$ac_ext >&5
15577   rm -rf conftest*
15578   ol_cv_dcl_sys_errlist=no
15579 fi
15580 rm -f conftest*
15581 fi
15582
15583 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15584 #
15585 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15586 if test $ol_cv_dcl_sys_errlist = no ; then
15587         cat >> confdefs.h <<\EOF
15588 #define DECL_SYS_ERRLIST 1
15589 EOF
15590
15591
15592         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15593 echo "configure:15594: checking existence of sys_errlist" >&5
15594 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15595   echo $ac_n "(cached) $ac_c" 1>&6
15596 else
15597   
15598                 cat > conftest.$ac_ext <<EOF
15599 #line 15600 "configure"
15600 #include "confdefs.h"
15601 #include <errno.h>
15602 int main() {
15603 char *c = (char *) *sys_errlist
15604 ; return 0; }
15605 EOF
15606 if { (eval echo configure:15607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15607   rm -rf conftest*
15608   ol_cv_have_sys_errlist=yes
15609 else
15610   echo "configure: failed program was:" >&5
15611   cat conftest.$ac_ext >&5
15612   rm -rf conftest*
15613   ol_cv_have_sys_errlist=no
15614 fi
15615 rm -f conftest*
15616 fi
15617
15618 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15619 fi
15620 if test $ol_cv_have_sys_errlist = yes ; then
15621         cat >> confdefs.h <<\EOF
15622 #define HAVE_SYS_ERRLIST 1
15623 EOF
15624
15625 fi
15626
15627
15628
15629 if test "$ol_enable_debug" != no ; then
15630         cat >> confdefs.h <<\EOF
15631 #define LDAP_DEBUG 1
15632 EOF
15633
15634 fi
15635 if test "$ol_enable_syslog" = yes ; then
15636         cat >> confdefs.h <<\EOF
15637 #define LDAP_SYSLOG 1
15638 EOF
15639
15640 fi
15641 if test "$ol_enable_libui" = yes ; then
15642         cat >> confdefs.h <<\EOF
15643 #define LDAP_LIBUI 1
15644 EOF
15645
15646 fi
15647 if test "$ol_enable_cache" = no ; then
15648         cat >> confdefs.h <<\EOF
15649 #define LDAP_NOCACHE 1
15650 EOF
15651
15652 fi
15653 if test "$ol_link_kbind" != no ; then
15654         cat >> confdefs.h <<\EOF
15655 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15656 EOF
15657
15658 fi
15659 if test "$ol_enable_proctitle" != no ; then
15660         cat >> confdefs.h <<\EOF
15661 #define LDAP_PROCTITLE 1
15662 EOF
15663
15664 fi
15665 if test "$ol_enable_referrals" != no ; then
15666         cat >> confdefs.h <<\EOF
15667 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15668 EOF
15669
15670 fi
15671 if test "$ol_enable_cldap" != no ; then
15672         cat >> confdefs.h <<\EOF
15673 #define LDAP_CONNECTIONLESS 1
15674 EOF
15675
15676 fi
15677 if test "$ol_enable_ldapi" != no; then
15678         cat >> confdefs.h <<\EOF
15679 #define USE_PF_LOCAL 1
15680 EOF
15681
15682 fi
15683
15684 if test "$ol_enable_cleartext" != no ; then
15685         cat >> confdefs.h <<\EOF
15686 #define SLAPD_CLEARTEXT 1
15687 EOF
15688
15689 fi
15690 if test "$ol_enable_crypt" != no ; then
15691         cat >> confdefs.h <<\EOF
15692 #define SLAPD_CRYPT 1
15693 EOF
15694
15695 fi
15696 if test "$ol_link_kpasswd" != no ; then
15697         cat >> confdefs.h <<\EOF
15698 #define SLAPD_KPASSWD 1
15699 EOF
15700
15701 fi
15702 if test "$ol_link_spasswd" != no ; then
15703         cat >> confdefs.h <<\EOF
15704 #define SLAPD_SPASSWD 1
15705 EOF
15706
15707 fi
15708 if test "$ol_enable_multimaster" != no ; then
15709         cat >> confdefs.h <<\EOF
15710 #define SLAPD_MULTIMASTER 1
15711 EOF
15712
15713 fi
15714 if test "$ol_enable_phonetic" != no ; then
15715         cat >> confdefs.h <<\EOF
15716 #define SLAPD_PHONETIC 1
15717 EOF
15718
15719 fi
15720 if test "$ol_enable_rlookups" != no ; then
15721         cat >> confdefs.h <<\EOF
15722 #define SLAPD_RLOOKUPS 1
15723 EOF
15724
15725 fi
15726 if test "$ol_enable_aci" != no ; then
15727         cat >> confdefs.h <<\EOF
15728 #define SLAPD_ACI_ENABLED 1
15729 EOF
15730
15731 fi
15732
15733 if test "$ol_link_modules" != no ; then
15734         cat >> confdefs.h <<\EOF
15735 #define SLAPD_MODULES 1
15736 EOF
15737
15738         BUILD_SLAPD=yes
15739         SLAPD_MODULES_LDFLAGS="-dlopen self"
15740 fi
15741
15742 if test "$ol_link_dnssrv" != no ; then
15743         cat >> confdefs.h <<\EOF
15744 #define SLAPD_DNSSRV 1
15745 EOF
15746
15747         BUILD_SLAPD=yes
15748         BUILD_DNSSRV=yes
15749         if test "$ol_with_dnssrv_module" != static ; then
15750                 cat >> confdefs.h <<\EOF
15751 #define SLAPD_DNSSRV_DYNAMIC 1
15752 EOF
15753
15754                 BUILD_DNSSRV=mod
15755                 BUILD_DNSSRV_DYNAMIC=shared
15756                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15757         fi
15758 fi
15759
15760 if test "$ol_enable_ldap" != no ; then
15761         cat >> confdefs.h <<\EOF
15762 #define SLAPD_LDAP 1
15763 EOF
15764
15765         BUILD_SLAPD=yes
15766         BUILD_LDAP=yes
15767         if test "$ol_with_ldap_module" != static ; then
15768                 cat >> confdefs.h <<\EOF
15769 #define SLAPD_LDAP_DYNAMIC 1
15770 EOF
15771
15772                 BUILD_LDAP=mod
15773                 BUILD_LDAP_DYNAMIC=shared
15774                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15775         fi
15776 fi
15777
15778 if test "$ol_link_ldbm" != no ; then
15779         cat >> confdefs.h <<\EOF
15780 #define SLAPD_LDBM 1
15781 EOF
15782
15783         BUILD_SLAPD=yes
15784         BUILD_LDBM=yes
15785         if test "$ol_with_ldbm_module" != static ; then
15786                 cat >> confdefs.h <<\EOF
15787 #define SLAPD_LDBM_DYNAMIC 1
15788 EOF
15789
15790                 BUILD_LDBM=mod
15791                 BUILD_LDBM_DYNAMIC=shared
15792                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15793         fi
15794 fi
15795
15796 if test "$ol_enable_passwd" != no ; then
15797         cat >> confdefs.h <<\EOF
15798 #define SLAPD_PASSWD 1
15799 EOF
15800
15801         BUILD_SLAPD=yes
15802         BUILD_PASSWD=yes
15803         if test "$ol_with_passwd_module" != static ; then
15804                 cat >> confdefs.h <<\EOF
15805 #define SLAPD_PASSWD_DYNAMIC 1
15806 EOF
15807
15808                 BUILD_PASSWD=mod
15809                 BUILD_PASSWD_DYNAMIC=shared
15810                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15811         fi
15812 fi
15813
15814 if test "$ol_link_perl" != no ; then
15815         cat >> confdefs.h <<\EOF
15816 #define SLAPD_PERL 1
15817 EOF
15818
15819         BUILD_SLAPD=yes
15820         BUILD_PERL=yes
15821         if test "$ol_with_perl_module" != static ; then
15822                 cat >> confdefs.h <<\EOF
15823 #define SLAPD_PERL_DYNAMIC 1
15824 EOF
15825
15826                 BUILD_PERL=mod
15827                 BUILD_PERL_DYNAMIC=shared
15828                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15829         fi
15830 fi
15831
15832 if test "$ol_enable_shell" != no ; then
15833         cat >> confdefs.h <<\EOF
15834 #define SLAPD_SHELL 1
15835 EOF
15836
15837         BUILD_SLAPD=yes
15838         BUILD_SHELL=yes
15839         if test "$ol_with_shell_module" != static ; then
15840                 cat >> confdefs.h <<\EOF
15841 #define SLAPD_SHELL_DYNAMIC 1
15842 EOF
15843
15844                 BUILD_SHELL=mod
15845                 BUILD_SHELL_DYNAMIC=shared
15846                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15847         fi
15848 fi
15849
15850 if test "$ol_enable_tcl" != no ; then
15851         cat >> confdefs.h <<\EOF
15852 #define SLAPD_TCL 1
15853 EOF
15854
15855         BUILD_SLAPD=yes
15856         BUILD_TCL=yes
15857         if test "$ol_with_tcl_module" != static; then
15858                 cat >> confdefs.h <<\EOF
15859 #define SLAPD_TCL_DYNAMIC 1
15860 EOF
15861
15862                 BUILD_TCL=mod
15863                 BUILD_TCL_DYNAMIC=shared
15864                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15865         fi
15866 fi
15867
15868 if test "$ol_enable_sql" != no ; then
15869         cat >> confdefs.h <<\EOF
15870 #define SLAPD_SQL 1
15871 EOF
15872
15873         BUILD_SLAPD=yes
15874         BUILD_SQL=yes
15875         SLAPD_SQL_LIBS=-liodbc
15876         if test "$ol_with_sql_module" != static; then
15877                 cat >> confdefs.h <<\EOF
15878 #define SLAPD_SQL_DYNAMIC 1
15879 EOF
15880
15881                 BUILD_SQL=mod
15882                 BUILD_SQL_DYNAMIC=shared
15883                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15884         fi
15885 fi
15886
15887 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15888         $BUILD_SLAPD = yes ; then
15889         BUILD_SLURPD=yes
15890 fi
15891
15892
15893 if test "$LINK_BINS_DYNAMIC" = yes; then
15894     LIB_LINKAGE=DYN
15895     LT_LIB_LINKAGE=shared
15896 else
15897     LIB_LINKAGE=STAT
15898     LT_LIB_LINKAGE=static
15899 fi
15900
15901 if test "$ac_cv_mingw32" = yes ; then
15902     PLAT=NT
15903     DYN_EXT=dll
15904 else
15905     PLAT=UNIX
15906     DYN_EXT=so
15907 fi
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
15964
15965
15966
15967
15968
15969
15970 trap '' 1 2 15
15971
15972 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15973
15974 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15975 # Let make expand exec_prefix.
15976 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15977
15978 # Any assignment to VPATH causes Sun make to only execute
15979 # the first set of double-colon rules, so remove it if not needed.
15980 # If there is a colon in the path, we need to keep it.
15981 if test "x$srcdir" = x.; then
15982   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15983 fi
15984
15985 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15986
15987 DEFS=-DHAVE_CONFIG_H
15988
15989 # Without the "./", some shells look in PATH for config.status.
15990 : ${CONFIG_STATUS=./config.status}
15991
15992 echo creating $CONFIG_STATUS
15993 rm -f $CONFIG_STATUS
15994 cat > $CONFIG_STATUS <<EOF
15995 #! /bin/sh
15996 # Generated automatically by configure.
15997 # Run this file to recreate the current configuration.
15998 # This directory was configured as follows,
15999 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16000 #
16001 # $0 $ac_configure_args
16002 #
16003 # Compiler output produced by configure, useful for debugging
16004 # configure, is in ./config.log if it exists.
16005
16006 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16007 for ac_option
16008 do
16009   case "\$ac_option" in
16010   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16011     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16012     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16013   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16014     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
16015     exit 0 ;;
16016   -help | --help | --hel | --he | --h)
16017     echo "\$ac_cs_usage"; exit 0 ;;
16018   *) echo "\$ac_cs_usage"; exit 1 ;;
16019   esac
16020 done
16021
16022 ac_given_srcdir=$srcdir
16023 ac_given_INSTALL="$INSTALL"
16024
16025 trap 'rm -fr `echo "\
16026 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16027 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16028 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16029 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16030 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16031 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16032 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16033 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16034 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16035 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16036 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16037 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16038 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16039 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16040 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16041 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16042 include/Makefile:build/top.mk:include/Makefile.in \
16043 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16044 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16045 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16046 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16047 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16048 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16049 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16050 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16051 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16052 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16053 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16054 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16055 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16056 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16057 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16058 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16059 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16060 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16061 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16062 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16063 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16064 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16065 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16066 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16067 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16068 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16069 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16070  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16071 EOF
16072 cat >> $CONFIG_STATUS <<EOF
16073
16074 # Protect against being on the right side of a sed subst in config.status.
16075 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16076  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16077 $ac_vpsub
16078 $extrasub
16079 s%@SHELL@%$SHELL%g
16080 s%@CFLAGS@%$CFLAGS%g
16081 s%@CPPFLAGS@%$CPPFLAGS%g
16082 s%@CXXFLAGS@%$CXXFLAGS%g
16083 s%@FFLAGS@%$FFLAGS%g
16084 s%@DEFS@%$DEFS%g
16085 s%@LDFLAGS@%$LDFLAGS%g
16086 s%@LIBS@%$LIBS%g
16087 s%@exec_prefix@%$exec_prefix%g
16088 s%@prefix@%$prefix%g
16089 s%@program_transform_name@%$program_transform_name%g
16090 s%@bindir@%$bindir%g
16091 s%@sbindir@%$sbindir%g
16092 s%@libexecdir@%$libexecdir%g
16093 s%@datadir@%$datadir%g
16094 s%@sysconfdir@%$sysconfdir%g
16095 s%@sharedstatedir@%$sharedstatedir%g
16096 s%@localstatedir@%$localstatedir%g
16097 s%@libdir@%$libdir%g
16098 s%@includedir@%$includedir%g
16099 s%@oldincludedir@%$oldincludedir%g
16100 s%@infodir@%$infodir%g
16101 s%@mandir@%$mandir%g
16102 s%@host@%$host%g
16103 s%@host_alias@%$host_alias%g
16104 s%@host_cpu@%$host_cpu%g
16105 s%@host_vendor@%$host_vendor%g
16106 s%@host_os@%$host_os%g
16107 s%@target@%$target%g
16108 s%@target_alias@%$target_alias%g
16109 s%@target_cpu@%$target_cpu%g
16110 s%@target_vendor@%$target_vendor%g
16111 s%@target_os@%$target_os%g
16112 s%@build@%$build%g
16113 s%@build_alias@%$build_alias%g
16114 s%@build_cpu@%$build_cpu%g
16115 s%@build_vendor@%$build_vendor%g
16116 s%@build_os@%$build_os%g
16117 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16118 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16119 s%@INSTALL_DATA@%$INSTALL_DATA%g
16120 s%@PACKAGE@%$PACKAGE%g
16121 s%@VERSION@%$VERSION%g
16122 s%@ACLOCAL@%$ACLOCAL%g
16123 s%@AUTOCONF@%$AUTOCONF%g
16124 s%@AUTOMAKE@%$AUTOMAKE%g
16125 s%@AUTOHEADER@%$AUTOHEADER%g
16126 s%@MAKEINFO@%$MAKEINFO%g
16127 s%@install_sh@%$install_sh%g
16128 s%@AMTAR@%$AMTAR%g
16129 s%@AWK@%$AWK%g
16130 s%@AMTARFLAGS@%$AMTARFLAGS%g
16131 s%@SET_MAKE@%$SET_MAKE%g
16132 s%@top_builddir@%$top_builddir%g
16133 s%@ldap_subdir@%$ldap_subdir%g
16134 s%@CC@%$CC%g
16135 s%@RANLIB@%$RANLIB%g
16136 s%@LN_S@%$LN_S%g
16137 s%@DLLTOOL@%$DLLTOOL%g
16138 s%@AS@%$AS%g
16139 s%@OBJDUMP@%$OBJDUMP%g
16140 s%@LIBTOOL@%$LIBTOOL%g
16141 s%@LN_H@%$LN_H%g
16142 s%@SENDMAIL@%$SENDMAIL%g
16143 s%@EDITOR@%$EDITOR%g
16144 s%@FINGER@%$FINGER%g
16145 s%@PERLBIN@%$PERLBIN%g
16146 s%@CPP@%$CPP%g
16147 s%@EXEEXT@%$EXEEXT%g
16148 s%@OBJEXT@%$OBJEXT%g
16149 s%@OL_MKDEP@%$OL_MKDEP%g
16150 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16151 s%@LIBOBJS@%$LIBOBJS%g
16152 s%@LIBSRCS@%$LIBSRCS%g
16153 s%@PLAT@%$PLAT%g
16154 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16155 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16156 s%@DYN_EXT@%$DYN_EXT%g
16157 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16158 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16159 s%@BUILD_LDAP@%$BUILD_LDAP%g
16160 s%@BUILD_LDBM@%$BUILD_LDBM%g
16161 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16162 s%@BUILD_PERL@%$BUILD_PERL%g
16163 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16164 s%@BUILD_SHELL@%$BUILD_SHELL%g
16165 s%@BUILD_SQL@%$BUILD_SQL%g
16166 s%@BUILD_TCL@%$BUILD_TCL%g
16167 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16168 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16169 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16170 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16171 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16172 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16173 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16174 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16175 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16176 s%@LDAP_LIBS@%$LDAP_LIBS%g
16177 s%@LDIF_LIBS@%$LDIF_LIBS%g
16178 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16179 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16180 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16181 s%@LDBM_LIBS@%$LDBM_LIBS%g
16182 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16183 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16184 s%@WRAP_LIBS@%$WRAP_LIBS%g
16185 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16186 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16187 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16188 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16189 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16190 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16191 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16192 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16193 s%@KRB4_LIBS@%$KRB4_LIBS%g
16194 s%@KRB5_LIBS@%$KRB5_LIBS%g
16195 s%@READLINE_LIBS@%$READLINE_LIBS%g
16196 s%@SASL_LIBS@%$SASL_LIBS%g
16197 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16198 s%@TLS_LIBS@%$TLS_LIBS%g
16199 s%@MODULES_LIBS@%$MODULES_LIBS%g
16200 s%@AUTH_LIBS@%$AUTH_LIBS%g
16201 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16202 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16203 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16204
16205 CEOF
16206 EOF
16207
16208 cat >> $CONFIG_STATUS <<\EOF
16209
16210 # Split the substitutions into bite-sized pieces for seds with
16211 # small command number limits, like on Digital OSF/1 and HP-UX.
16212 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16213 ac_file=1 # Number of current file.
16214 ac_beg=1 # First line for current file.
16215 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16216 ac_more_lines=:
16217 ac_sed_cmds=""
16218 while $ac_more_lines; do
16219   if test $ac_beg -gt 1; then
16220     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16221   else
16222     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16223   fi
16224   if test ! -s conftest.s$ac_file; then
16225     ac_more_lines=false
16226     rm -f conftest.s$ac_file
16227   else
16228     if test -z "$ac_sed_cmds"; then
16229       ac_sed_cmds="sed -f conftest.s$ac_file"
16230     else
16231       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16232     fi
16233     ac_file=`expr $ac_file + 1`
16234     ac_beg=$ac_end
16235     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16236   fi
16237 done
16238 if test -z "$ac_sed_cmds"; then
16239   ac_sed_cmds=cat
16240 fi
16241 EOF
16242
16243 cat >> $CONFIG_STATUS <<EOF
16244
16245 CONFIG_FILES=\${CONFIG_FILES-"\
16246 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16247 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16248 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16249 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16250 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16251 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16252 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16253 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16254 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16255 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16256 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16257 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16258 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16259 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16260 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16261 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16262 include/Makefile:build/top.mk:include/Makefile.in \
16263 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16264 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16265 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16266 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16267 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16268 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16269 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16270 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16271 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16272 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16273 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16274 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16275 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16276 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16277 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16278 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16279 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16280 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16281 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16282 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16283 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16284 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16285 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16286 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16287 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16288 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16289 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16290 "}
16291 EOF
16292 cat >> $CONFIG_STATUS <<\EOF
16293 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16294   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16295   case "$ac_file" in
16296   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16297        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16298   *) ac_file_in="${ac_file}.in" ;;
16299   esac
16300
16301   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16302
16303   # Remove last slash and all that follows it.  Not all systems have dirname.
16304   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16305   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16306     # The file is in a subdirectory.
16307     test ! -d "$ac_dir" && mkdir "$ac_dir"
16308     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16309     # A "../" for each directory in $ac_dir_suffix.
16310     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16311   else
16312     ac_dir_suffix= ac_dots=
16313   fi
16314
16315   case "$ac_given_srcdir" in
16316   .)  srcdir=.
16317       if test -z "$ac_dots"; then top_srcdir=.
16318       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16319   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16320   *) # Relative path.
16321     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16322     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16323   esac
16324
16325   case "$ac_given_INSTALL" in
16326   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16327   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16328   esac
16329
16330   echo creating "$ac_file"
16331   rm -f "$ac_file"
16332   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16333   case "$ac_file" in
16334   *[Mm]akefile*) ac_comsub="1i\\
16335 # $configure_input" ;;
16336   *) ac_comsub= ;;
16337   esac
16338
16339   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16340   sed -e "$ac_comsub
16341 s%@configure_input@%$configure_input%g
16342 s%@srcdir@%$srcdir%g
16343 s%@top_srcdir@%$top_srcdir%g
16344 s%@INSTALL@%$INSTALL%g
16345 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16346 fi; done
16347 rm -f conftest.s*
16348
16349 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16350 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16351 #
16352 # ac_d sets the value in "#define NAME VALUE" lines.
16353 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16354 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16355 ac_dC='\3'
16356 ac_dD='%g'
16357 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16358 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16359 ac_uB='\([      ]\)%\1#\2define\3'
16360 ac_uC=' '
16361 ac_uD='\4%g'
16362 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16363 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16364 ac_eB='$%\1#\2define\3'
16365 ac_eC=' '
16366 ac_eD='%g'
16367
16368 if test "${CONFIG_HEADERS+set}" != set; then
16369 EOF
16370 cat >> $CONFIG_STATUS <<EOF
16371   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16372 EOF
16373 cat >> $CONFIG_STATUS <<\EOF
16374 fi
16375 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16376   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16377   case "$ac_file" in
16378   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16379        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16380   *) ac_file_in="${ac_file}.in" ;;
16381   esac
16382
16383   echo creating $ac_file
16384
16385   rm -f conftest.frag conftest.in conftest.out
16386   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16387   cat $ac_file_inputs > conftest.in
16388
16389 EOF
16390
16391 # Transform confdefs.h into a sed script conftest.vals that substitutes
16392 # the proper values into config.h.in to produce config.h.  And first:
16393 # Protect against being on the right side of a sed subst in config.status.
16394 # Protect against being in an unquoted here document in config.status.
16395 rm -f conftest.vals
16396 cat > conftest.hdr <<\EOF
16397 s/[\\&%]/\\&/g
16398 s%[\\$`]%\\&%g
16399 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16400 s%ac_d%ac_u%gp
16401 s%ac_u%ac_e%gp
16402 EOF
16403 sed -n -f conftest.hdr confdefs.h > conftest.vals
16404 rm -f conftest.hdr
16405
16406 # This sed command replaces #undef with comments.  This is necessary, for
16407 # example, in the case of _POSIX_SOURCE, which is predefined and required
16408 # on some systems where configure will not decide to define it.
16409 cat >> conftest.vals <<\EOF
16410 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16411 EOF
16412
16413 # Break up conftest.vals because some shells have a limit on
16414 # the size of here documents, and old seds have small limits too.
16415
16416 rm -f conftest.tail
16417 while :
16418 do
16419   ac_lines=`grep -c . conftest.vals`
16420   # grep -c gives empty output for an empty file on some AIX systems.
16421   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16422   # Write a limited-size here document to conftest.frag.
16423   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16424   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16425   echo 'CEOF
16426   sed -f conftest.frag conftest.in > conftest.out
16427   rm -f conftest.in
16428   mv conftest.out conftest.in
16429 ' >> $CONFIG_STATUS
16430   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16431   rm -f conftest.vals
16432   mv conftest.tail conftest.vals
16433 done
16434 rm -f conftest.vals
16435
16436 cat >> $CONFIG_STATUS <<\EOF
16437   rm -f conftest.frag conftest.h
16438   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16439   cat conftest.in >> conftest.h
16440   rm -f conftest.in
16441   if cmp -s $ac_file conftest.h 2>/dev/null; then
16442     echo "$ac_file is unchanged"
16443     rm -f conftest.h
16444   else
16445     # Remove last slash and all that follows it.  Not all systems have dirname.
16446       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16447       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16448       # The file is in a subdirectory.
16449       test ! -d "$ac_dir" && mkdir "$ac_dir"
16450     fi
16451     rm -f $ac_file
16452     mv conftest.h $ac_file
16453   fi
16454 fi; done
16455
16456 EOF
16457 cat >> $CONFIG_STATUS <<EOF
16458
16459 EOF
16460 cat >> $CONFIG_STATUS <<\EOF
16461
16462 date > stamp-h
16463 echo Please \"make depend\" to build dependencies
16464
16465 exit 0
16466 EOF
16467 chmod +x $CONFIG_STATUS
16468 rm -fr confdefs* $ac_clean_files
16469 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16470