]> git.sur5r.net Git - openldap/blob - configure
Merge in all devel changes since 2.0-alpha2.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.256 1999/09/10 00:10:20 kdz Exp  
4
5 # Copyright 1998,1999 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 # Guess values for system-dependent variables and create Makefiles.
13 # Generated automatically using autoconf version 2.13.1 
14 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
15 #
16 # This configure script is free software; the Free Software Foundation
17 # gives unlimited permission to copy, distribute and modify it.
18
19 # Defaults:
20 ac_help=
21 ac_default_prefix=/usr/local
22 # Any additions from configure.in:
23 ac_default_prefix=/usr/local
24 ac_help="$ac_help
25   --with-subdir=DIR change default subdirectory used for installs"
26 ac_help="$ac_help
27   --enable-debug        enable debugging (yes)"
28 ac_help="$ac_help
29   --enable-syslog       enable syslog support (auto)"
30 ac_help="$ac_help
31   --enable-proctitle    enable proctitle support (yes)"
32 ac_help="$ac_help
33   --enable-cache        enable caching (yes)"
34 ac_help="$ac_help
35   --enable-dns          enable V2 DX Referrals extension (no)"
36 ac_help="$ac_help
37   --enable-referrals    enable V2 Referrals extension (yes)"
38 ac_help="$ac_help
39   --enable-cldap        enable connectionless ldap (no)"
40 ac_help="$ac_help
41   --enable-x-compile    enable cross compiling (no)"
42 ac_help="$ac_help
43   --enable-dmalloc      enable debug malloc support (no)"
44 ac_help="$ac_help
45   --with-cyrus-sasl     with Cyrus SASL support (auto)"
46 ac_help="$ac_help
47   --with-fetch          with fetch URL support (auto)"
48 ac_help="$ac_help
49   --with-kerberos       with Kerberos support (auto)"
50 ac_help="$ac_help
51   --with-readline       with readline support (auto)"
52 ac_help="$ac_help
53   --with-threads        use threads (auto)"
54 ac_help="$ac_help
55   --with-tls            with TLS/SSL support (auto)"
56 ac_help="$ac_help
57   --with-yielding-select        with implicitly yielding select (auto)"
58 ac_help="$ac_help
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd        enable building slapd (yes)"
62 ac_help="$ac_help
63     --enable-cleartext  enable cleartext passwords (yes)"
64 ac_help="$ac_help
65     --enable-crypt      enable crypt(3) passwords (auto)"
66 ac_help="$ac_help
67     --enable-modules    enable dynamic module support (no)"
68 ac_help="$ac_help
69     --enable-multimaster        enable multimaster replication (no)"
70 ac_help="$ac_help
71     --enable-phonetic   enable phonetic/soundex (no)"
72 ac_help="$ac_help
73     --enable-quipu      build quipu migration tools (no)"
74 ac_help="$ac_help
75     --enable-rlookups   enable reverse lookups (auto)"
76 ac_help="$ac_help
77     --enable-aci        enable per-object ACIs (no)"
78 ac_help="$ac_help
79     --enable-discreteaci        enable discrete rights in ACIs (no)"
80 ac_help="$ac_help
81     --enable-wrappers   enable tcp wrapper support (no)"
82 ac_help="$ac_help
83     --enable-bdb2       enable bdb2 backend (no)"
84 ac_help="$ac_help
85       --with-bdb2-module        module type (static)"
86 ac_help="$ac_help
87     --enable-ldap       enable ldap backend (no)"
88 ac_help="$ac_help
89       --with-ldap-module        module type (static)"
90 ac_help="$ac_help
91     --enable-ldbm       enable ldbm backend (yes)"
92 ac_help="$ac_help
93       --with-ldbm-api   use LDBM API (auto)"
94 ac_help="$ac_help
95       --with-ldbm-module        module type (static)"
96 ac_help="$ac_help
97       --with-ldbm-type  use LDBM type (auto)"
98 ac_help="$ac_help
99     --enable-passwd     enable passwd backend (no)"
100 ac_help="$ac_help
101       --with-passwd-module      module type (static)"
102 ac_help="$ac_help
103     --enable-perl       enable perl backend (no)"
104 ac_help="$ac_help
105       --with-perl-module        module type (static)"
106 ac_help="$ac_help
107     --enable-shell      enable shell backend (no)"
108 ac_help="$ac_help
109       --with-shell-module       module type (static)"
110 ac_help="$ac_help
111     --enable-tcl        enable tcl backend (no)"
112 ac_help="$ac_help
113       --with-tcl-module module type (static)"
114 ac_help="$ac_help
115 SLURPD (Replication Daemon) Options:"
116 ac_help="$ac_help
117   --enable-slurpd       enable building slurpd (auto)"
118 ac_help="$ac_help
119 Library Generation & Linking Options"
120 ac_help="$ac_help
121   --enable-static[=PKGS]  build static libraries [default=yes]"
122 ac_help="$ac_help
123   --enable-shared[=PKGS]  build shared libraries [default=yes]"
124 ac_help="$ac_help
125   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
126 ac_help="$ac_help
127   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
128 ac_help="$ac_help
129   --disable-libtool-lock  avoid locking (might break parallel builds)"
130
131 # Initialize some variables set by options.
132 # The variables have the same names as the options, with
133 # dashes changed to underlines.
134 build=NONE
135 cache_file=./config.cache
136 exec_prefix=NONE
137 host=NONE
138 no_create=
139 nonopt=NONE
140 no_recursion=
141 prefix=NONE
142 program_prefix=NONE
143 program_suffix=NONE
144 program_transform_name=s,x,x,
145 silent=
146 site=
147 srcdir=
148 target=NONE
149 verbose=
150 x_includes=NONE
151 x_libraries=NONE
152 bindir='${exec_prefix}/bin'
153 sbindir='${exec_prefix}/sbin'
154 libexecdir='${exec_prefix}/libexec'
155 datadir='${prefix}/share'
156 sysconfdir='${prefix}/etc'
157 sharedstatedir='${prefix}/com'
158 localstatedir='${prefix}/var'
159 libdir='${exec_prefix}/lib'
160 includedir='${prefix}/include'
161 oldincludedir='/usr/include'
162 infodir='${prefix}/info'
163 mandir='${prefix}/man'
164
165 # Initialize some other variables.
166 subdirs=
167 MFLAGS= MAKEFLAGS=
168 SHELL=${CONFIG_SHELL-/bin/sh}
169 # Maximum number of lines to put in a shell here document.
170 ac_max_here_lines=12
171
172 ac_prev=
173 for ac_option
174 do
175
176   # If the previous option needs an argument, assign it.
177   if test -n "$ac_prev"; then
178     eval "$ac_prev=\$ac_option"
179     ac_prev=
180     continue
181   fi
182
183   case "$ac_option" in
184   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
185   *) ac_optarg= ;;
186   esac
187
188   # Accept the important Cygnus configure options, so we can diagnose typos.
189
190   case "$ac_option" in
191
192   -bindir | --bindir | --bindi | --bind | --bin | --bi)
193     ac_prev=bindir ;;
194   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
195     bindir="$ac_optarg" ;;
196
197   -build | --build | --buil | --bui | --bu)
198     ac_prev=build ;;
199   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
200     build="$ac_optarg" ;;
201
202   -cache-file | --cache-file | --cache-fil | --cache-fi \
203   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
204     ac_prev=cache_file ;;
205   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
206   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
207     cache_file="$ac_optarg" ;;
208
209   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
210     ac_prev=datadir ;;
211   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
212   | --da=*)
213     datadir="$ac_optarg" ;;
214
215   -disable-* | --disable-*)
216     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
217     # Reject names that are not valid shell variable names.
218     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
219       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
220     fi
221     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
222     eval "enable_${ac_feature}=no" ;;
223
224   -enable-* | --enable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     case "$ac_option" in
232       *=*) ;;
233       *) ac_optarg=yes ;;
234     esac
235     eval "enable_${ac_feature}='$ac_optarg'" ;;
236
237   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
238   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
239   | --exec | --exe | --ex)
240     ac_prev=exec_prefix ;;
241   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
242   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
243   | --exec=* | --exe=* | --ex=*)
244     exec_prefix="$ac_optarg" ;;
245
246   -gas | --gas | --ga | --g)
247     # Obsolete; use --with-gas.
248     with_gas=yes ;;
249
250   -help | --help | --hel | --he)
251     # Omit some internal or obsolete options to make the list less imposing.
252     # This message is too long to be a string in the A/UX 3.1 sh.
253     cat << EOF
254 Usage: configure [options] [host]
255 Options: [defaults in brackets after descriptions]
256 Configuration:
257   --cache-file=FILE       cache test results in FILE
258   --help                  print this message
259   --no-create             do not create output files
260   --quiet, --silent       do not print \`checking...' messages
261   --version               print the version of autoconf that created configure
262 Directory and file names:
263   --prefix=PREFIX         install architecture-independent files in PREFIX
264                           [$ac_default_prefix]
265   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
266                           [same as prefix]
267   --bindir=DIR            user executables in DIR [EPREFIX/bin]
268   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
269   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
270   --datadir=DIR           read-only architecture-independent data in DIR
271                           [PREFIX/share]
272   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
273   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
274                           [PREFIX/com]
275   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
276   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
277   --includedir=DIR        C header files in DIR [PREFIX/include]
278   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
279   --infodir=DIR           info documentation in DIR [PREFIX/info]
280   --mandir=DIR            man documentation in DIR [PREFIX/man]
281   --srcdir=DIR            find the sources in DIR [configure dir or ..]
282   --program-prefix=PREFIX prepend PREFIX to installed program names
283   --program-suffix=SUFFIX append SUFFIX to installed program names
284   --program-transform-name=PROGRAM
285                           run sed PROGRAM on installed program names
286 EOF
287     cat << EOF
288 Host type:
289   --build=BUILD           configure for building on BUILD [BUILD=HOST]
290   --host=HOST             configure for HOST [guessed]
291   --target=TARGET         configure for TARGET [TARGET=HOST]
292 Features and packages:
293   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
294   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
295   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
296   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
297   --x-includes=DIR        X include files are in DIR
298   --x-libraries=DIR       X library files are in DIR
299 EOF
300     if test -n "$ac_help"; then
301       echo "--enable and --with options recognized:$ac_help"
302     fi
303     exit 0 ;;
304
305   -host | --host | --hos | --ho)
306     ac_prev=host ;;
307   -host=* | --host=* | --hos=* | --ho=*)
308     host="$ac_optarg" ;;
309
310   -includedir | --includedir | --includedi | --included | --include \
311   | --includ | --inclu | --incl | --inc)
312     ac_prev=includedir ;;
313   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
314   | --includ=* | --inclu=* | --incl=* | --inc=*)
315     includedir="$ac_optarg" ;;
316
317   -infodir | --infodir | --infodi | --infod | --info | --inf)
318     ac_prev=infodir ;;
319   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
320     infodir="$ac_optarg" ;;
321
322   -libdir | --libdir | --libdi | --libd)
323     ac_prev=libdir ;;
324   -libdir=* | --libdir=* | --libdi=* | --libd=*)
325     libdir="$ac_optarg" ;;
326
327   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
328   | --libexe | --libex | --libe)
329     ac_prev=libexecdir ;;
330   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
331   | --libexe=* | --libex=* | --libe=*)
332     libexecdir="$ac_optarg" ;;
333
334   -localstatedir | --localstatedir | --localstatedi | --localstated \
335   | --localstate | --localstat | --localsta | --localst \
336   | --locals | --local | --loca | --loc | --lo)
337     ac_prev=localstatedir ;;
338   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
339   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
340   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
341     localstatedir="$ac_optarg" ;;
342
343   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
344     ac_prev=mandir ;;
345   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
346     mandir="$ac_optarg" ;;
347
348   -nfp | --nfp | --nf)
349     # Obsolete; use --without-fp.
350     with_fp=no ;;
351
352   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
353   | --no-cr | --no-c)
354     no_create=yes ;;
355
356   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
357   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
358     no_recursion=yes ;;
359
360   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
361   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
362   | --oldin | --oldi | --old | --ol | --o)
363     ac_prev=oldincludedir ;;
364   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
365   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
366   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
367     oldincludedir="$ac_optarg" ;;
368
369   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
370     ac_prev=prefix ;;
371   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
372     prefix="$ac_optarg" ;;
373
374   -program-prefix | --program-prefix | --program-prefi | --program-pref \
375   | --program-pre | --program-pr | --program-p)
376     ac_prev=program_prefix ;;
377   -program-prefix=* | --program-prefix=* | --program-prefi=* \
378   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
379     program_prefix="$ac_optarg" ;;
380
381   -program-suffix | --program-suffix | --program-suffi | --program-suff \
382   | --program-suf | --program-su | --program-s)
383     ac_prev=program_suffix ;;
384   -program-suffix=* | --program-suffix=* | --program-suffi=* \
385   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
386     program_suffix="$ac_optarg" ;;
387
388   -program-transform-name | --program-transform-name \
389   | --program-transform-nam | --program-transform-na \
390   | --program-transform-n | --program-transform- \
391   | --program-transform | --program-transfor \
392   | --program-transfo | --program-transf \
393   | --program-trans | --program-tran \
394   | --progr-tra | --program-tr | --program-t)
395     ac_prev=program_transform_name ;;
396   -program-transform-name=* | --program-transform-name=* \
397   | --program-transform-nam=* | --program-transform-na=* \
398   | --program-transform-n=* | --program-transform-=* \
399   | --program-transform=* | --program-transfor=* \
400   | --program-transfo=* | --program-transf=* \
401   | --program-trans=* | --program-tran=* \
402   | --progr-tra=* | --program-tr=* | --program-t=*)
403     program_transform_name="$ac_optarg" ;;
404
405   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
406   | -silent | --silent | --silen | --sile | --sil)
407     silent=yes ;;
408
409   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
410     ac_prev=sbindir ;;
411   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
412   | --sbi=* | --sb=*)
413     sbindir="$ac_optarg" ;;
414
415   -sharedstatedir | --sharedstatedir | --sharedstatedi \
416   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
417   | --sharedst | --shareds | --shared | --share | --shar \
418   | --sha | --sh)
419     ac_prev=sharedstatedir ;;
420   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
421   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
422   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
423   | --sha=* | --sh=*)
424     sharedstatedir="$ac_optarg" ;;
425
426   -site | --site | --sit)
427     ac_prev=site ;;
428   -site=* | --site=* | --sit=*)
429     site="$ac_optarg" ;;
430
431   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
432     ac_prev=srcdir ;;
433   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
434     srcdir="$ac_optarg" ;;
435
436   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
437   | --syscon | --sysco | --sysc | --sys | --sy)
438     ac_prev=sysconfdir ;;
439   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
440   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
441     sysconfdir="$ac_optarg" ;;
442
443   -target | --target | --targe | --targ | --tar | --ta | --t)
444     ac_prev=target ;;
445   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
446     target="$ac_optarg" ;;
447
448   -v | -verbose | --verbose | --verbos | --verbo | --verb)
449     verbose=yes ;;
450
451   -version | --version | --versio | --versi | --vers)
452     echo "configure generated by autoconf version 2.13.1"
453     exit 0 ;;
454
455   -with-* | --with-*)
456     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
457     # Reject names that are not valid shell variable names.
458     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
459       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
460     fi
461     ac_package=`echo $ac_package| sed 's/-/_/g'`
462     case "$ac_option" in
463       *=*) ;;
464       *) ac_optarg=yes ;;
465     esac
466     eval "with_${ac_package}='$ac_optarg'" ;;
467
468   -without-* | --without-*)
469     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
470     # Reject names that are not valid shell variable names.
471     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
472       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
473     fi
474     ac_package=`echo $ac_package| sed 's/-/_/g'`
475     eval "with_${ac_package}=no" ;;
476
477   --x)
478     # Obsolete; use --with-x.
479     with_x=yes ;;
480
481   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
482   | --x-incl | --x-inc | --x-in | --x-i)
483     ac_prev=x_includes ;;
484   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
485   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
486     x_includes="$ac_optarg" ;;
487
488   -x-libraries | --x-libraries | --x-librarie | --x-librari \
489   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
490     ac_prev=x_libraries ;;
491   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
492   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
493     x_libraries="$ac_optarg" ;;
494
495   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
496     ;;
497
498   *)
499     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
500       echo "configure: warning: $ac_option: invalid host type" 1>&2
501     fi
502     if test "x$nonopt" != xNONE; then
503       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
504     fi
505     nonopt="$ac_option"
506     ;;
507
508   esac
509 done
510
511 if test -n "$ac_prev"; then
512   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
513 fi
514
515 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
516
517 # File descriptor usage:
518 # 0 standard input
519 # 1 file creation
520 # 2 errors and warnings
521 # 3 some systems may open it to /dev/tty
522 # 4 used on the Kubota Titan
523 # 6 checking for... messages and results
524 # 5 compiler messages saved in config.log
525 if test "$silent" = yes; then
526   exec 6>/dev/null
527 else
528   exec 6>&1
529 fi
530 exec 5>./config.log
531
532 echo "\
533 This file contains any messages produced by compilers while
534 running configure, to aid debugging if configure makes a mistake.
535 " 1>&5
536
537 # Strip out --no-create and --no-recursion so they do not pile up.
538 # Also quote any args containing shell metacharacters.
539 ac_configure_args=
540 for ac_arg
541 do
542   case "$ac_arg" in
543   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
544   | --no-cr | --no-c) ;;
545   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
547   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
548   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
549   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
550   esac
551 done
552
553 # NLS nuisances.
554 # Only set these to C if already set.  These must not be set unconditionally
555 # because not all systems understand e.g. LANG=C (notably SCO).
556 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
557 # Non-C LC_CTYPE values break the ctype check.
558 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
559 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
560 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
561 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
562
563 # confdefs.h avoids OS command line length limits that DEFS can exceed.
564 rm -rf conftest* confdefs.h
565 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
566 echo > confdefs.h
567
568 # A filename unique to this package, relative to the directory that
569 # configure is in, which we can look for to find out if srcdir is correct.
570 ac_unique_file=build/version
571
572 # Find the source files, if location was not specified.
573 if test -z "$srcdir"; then
574   ac_srcdir_defaulted=yes
575   # Try the directory containing this script, then its parent.
576   ac_prog=$0
577   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
578   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
579   srcdir=$ac_confdir
580   if test ! -r $srcdir/$ac_unique_file; then
581     srcdir=..
582   fi
583 else
584   ac_srcdir_defaulted=no
585 fi
586 if test ! -r $srcdir/$ac_unique_file; then
587   if test "$ac_srcdir_defaulted" = yes; then
588     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
589   else
590     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
591   fi
592 fi
593 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
594
595 # Prefer explicitly selected file to automatically selected ones.
596 if test -z "$CONFIG_SITE"; then
597   if test "x$prefix" != xNONE; then
598     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
599   else
600     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
601   fi
602 fi
603 for ac_site_file in $CONFIG_SITE; do
604   if test -r "$ac_site_file"; then
605     echo "loading site script $ac_site_file"
606     . "$ac_site_file"
607   fi
608 done
609
610
611 ac_ext=c
612 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
613 ac_cpp='$CPP $CPPFLAGS'
614 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
615 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
616 cross_compiling=$ac_cv_prog_cc_cross
617
618 ac_exeext=
619 ac_objext=o
620 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
621   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
622   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
623     ac_n= ac_c='
624 ' ac_t='        '
625   else
626     ac_n=-n ac_c= ac_t=
627   fi
628 else
629   ac_n= ac_c='\c' ac_t=
630 fi
631
632 ac_aux_dir=
633 for ac_dir in build $srcdir/build; do
634   if test -f $ac_dir/install-sh; then
635     ac_aux_dir=$ac_dir
636     ac_install_sh="$ac_aux_dir/install-sh -c"
637     break
638   elif test -f $ac_dir/install.sh; then
639     ac_aux_dir=$ac_dir
640     ac_install_sh="$ac_aux_dir/install.sh -c"
641     break
642   fi
643 done
644 if test -z "$ac_aux_dir"; then
645   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
646 fi
647 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
648 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
649 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
650
651 OL_VERSION=`cat $ac_aux_dir/version`
652 if test -z "$OL_VERSION"; then
653         { echo "configure: error: could not determine version" 1>&2; exit 1; }
654 fi
655
656
657 echo $ac_n "checking host system type""... $ac_c" 1>&6
658 echo "configure:659: checking host system type" >&5
659 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
660
661 # Make sure we can run config.sub.
662   if $ac_config_sub sun4 >/dev/null 2>&1; then :
663     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
664   fi
665
666   ac_cv_host_alias=$host
667   case "$ac_cv_host_alias" in
668   NONE)
669     case $nonopt in
670     NONE)
671       if ac_cv_host_alias=`$ac_config_guess`; then :
672       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
673       fi ;;
674     *) ac_cv_host_alias=$nonopt ;;
675     esac ;;
676   esac
677
678   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
679   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
680   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
681   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
682 else
683   echo $ac_n "(cached) $ac_c" 1>&6
684 fi
685
686 echo "$ac_t""$ac_cv_host" 1>&6
687
688 host=$ac_cv_host
689 host_alias=$ac_cv_host_alias
690 host_cpu=$ac_cv_host_cpu
691 host_vendor=$ac_cv_host_vendor
692 host_os=$ac_cv_host_os
693
694
695
696
697
698 echo $ac_n "checking target system type""... $ac_c" 1>&6
699 echo "configure:700: checking target system type" >&5
700 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
701
702 # Make sure we can run config.sub.
703   if $ac_config_sub sun4 >/dev/null 2>&1; then :
704     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
705   fi
706
707   ac_cv_target_alias=$target
708   case "$ac_cv_target_alias" in
709   NONE)
710     case $nonopt in
711     NONE)
712       ac_cv_target_alias=$host_alias ;;
713
714     *) ac_cv_target_alias=$nonopt ;;
715     esac ;;
716   esac
717
718   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
719   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722 else
723   echo $ac_n "(cached) $ac_c" 1>&6
724 fi
725
726 echo "$ac_t""$ac_cv_target" 1>&6
727
728 target=$ac_cv_target
729 target_alias=$ac_cv_target_alias
730 target_cpu=$ac_cv_target_cpu
731 target_vendor=$ac_cv_target_vendor
732 target_os=$ac_cv_target_os
733
734
735
736
737
738 echo $ac_n "checking build system type""... $ac_c" 1>&6
739 echo "configure:740: checking build system type" >&5
740 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
741
742 # Make sure we can run config.sub.
743   if $ac_config_sub sun4 >/dev/null 2>&1; then :
744     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
745   fi
746
747   ac_cv_build_alias=$build
748   case "$ac_cv_build_alias" in
749   NONE)
750     case $nonopt in
751     NONE)
752       ac_cv_build_alias=$host_alias ;;
753
754     *) ac_cv_build_alias=$nonopt ;;
755     esac ;;
756   esac
757
758   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
759   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
760   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
761   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
762 else
763   echo $ac_n "(cached) $ac_c" 1>&6
764 fi
765
766 echo "$ac_t""$ac_cv_build" 1>&6
767
768 build=$ac_cv_build
769 build_alias=$ac_cv_build_alias
770 build_cpu=$ac_cv_build_cpu
771 build_vendor=$ac_cv_build_vendor
772 build_os=$ac_cv_build_os
773
774
775
776
777
778 # Do some error checking and defaulting for the host and target type.
779 # The inputs are:
780 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
781 #
782 # The rules are:
783 # 1. You are not allowed to specify --host, --target, and nonopt at the
784 #    same time.
785 # 2. Host defaults to nonopt.
786 # 3. If nonopt is not specified, then host defaults to the current host,
787 #    as determined by config.guess.
788 # 4. Target and build default to nonopt.
789 # 5. If nonopt is not specified, then target and build default to host.
790
791 # The aliases save the names the user supplied, while $host etc.
792 # will get canonicalized.
793 case $host---$target---$nonopt in
794 NONE---*---* | *---NONE---* | *---*---NONE) ;;
795 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
796 esac
797
798 test "$host_alias" != "$target_alias" &&
799   test "$program_prefix$program_suffix$program_transform_name" = \
800     NONENONEs,x,x, &&
801   program_prefix=${target_alias}-
802
803
804 # Find a good install program.  We prefer a C program (faster),
805 # so one script is as good as another.  But avoid the broken or
806 # incompatible versions:
807 # SysV /etc/install, /usr/sbin/install
808 # SunOS /usr/etc/install
809 # IRIX /sbin/install
810 # AIX /bin/install
811 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
812 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
813 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
814 # ./install, which can be erroneously created by make from ./install.sh.
815 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
816 echo "configure:817: checking for a BSD compatible install" >&5
817 if test -z "$INSTALL"; then
818 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
819   echo $ac_n "(cached) $ac_c" 1>&6
820 else
821     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
822   for ac_dir in $PATH; do
823     # Account for people who put trailing slashes in PATH elements.
824     case "$ac_dir/" in
825     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
826     *)
827       # OSF1 and SCO ODT 3.0 have their own names for install.
828       # Don't use installbsd from OSF since it installs stuff as root
829       # by default.
830       for ac_prog in ginstall scoinst install; do
831         if test -f $ac_dir/$ac_prog; then
832           if test $ac_prog = install &&
833             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
834             # AIX install.  It has an incompatible calling convention.
835             :
836           elif test $ac_prog = install &&
837             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
838             # program-specific install script used by HP pwplus--don't use.
839             :
840           else
841             ac_cv_path_install="$ac_dir/$ac_prog -c"
842             break 2
843           fi
844         fi
845       done
846       ;;
847     esac
848   done
849   IFS="$ac_save_IFS"
850
851 fi
852   if test "${ac_cv_path_install+set}" = set; then
853     INSTALL="$ac_cv_path_install"
854   else
855     # As a last resort, use the slow shell script.  We don't cache a
856     # path for INSTALL within a source directory, because that will
857     # break other packages using the cache if that directory is
858     # removed, or if the path is relative.
859     INSTALL="$ac_install_sh"
860   fi
861 fi
862 echo "$ac_t""$INSTALL" 1>&6
863
864 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
865 # It thinks the first close brace ends the variable substitution.
866 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
867
868 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
869
870 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
871
872 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
873 echo "configure:874: checking whether build environment is sane" >&5
874 # Just in case
875 sleep 1
876 echo timestamp > conftestfile
877 # Do `set' in a subshell so we don't clobber the current shell's
878 # arguments.  Must try -L first in case configure is actually a
879 # symlink; some systems play weird games with the mod time of symlinks
880 # (eg FreeBSD returns the mod time of the symlink's containing
881 # directory).
882 if (
883    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
884    if test "$*" = "X"; then
885       # -L didn't work.
886       set X `ls -t $srcdir/configure conftestfile`
887    fi
888    if test "$*" != "X $srcdir/configure conftestfile" \
889       && test "$*" != "X conftestfile $srcdir/configure"; then
890
891       # If neither matched, then we have a broken ls.  This can happen
892       # if, for instance, CONFIG_SHELL is bash and it inherits a
893       # broken ls alias from the environment.  This has actually
894       # happened.  Such a system could not be considered "sane".
895       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
896 alias in your environment" 1>&2; exit 1; }
897    fi
898
899    test "$2" = conftestfile
900    )
901 then
902    # Ok.
903    :
904 else
905    { echo "configure: error: newly created file is older than distributed files!
906 Check your system clock" 1>&2; exit 1; }
907 fi
908 rm -f conftest*
909 echo "$ac_t""yes" 1>&6
910 if test "$program_transform_name" = s,x,x,; then
911   program_transform_name=
912 else
913   # Double any \ or $.  echo might interpret backslashes.
914   cat <<\EOF_SED > conftestsed
915 s,\\,\\\\,g; s,\$,$$,g
916 EOF_SED
917   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
918   rm -f conftestsed
919 fi
920 test "$program_prefix" != NONE &&
921   program_transform_name="s,^,${program_prefix},;$program_transform_name"
922 # Use a double $ so make ignores it.
923 test "$program_suffix" != NONE &&
924   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
925
926 # sed with no file args requires a program.
927 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
928
929 for ac_prog in mawk gawk nawk awk
930 do
931 # Extract the first word of "$ac_prog", so it can be a program name with args.
932 set dummy $ac_prog; ac_word=$2
933 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
934 echo "configure:935: checking for $ac_word" >&5
935 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
936   echo $ac_n "(cached) $ac_c" 1>&6
937 else
938   if test -n "$AWK"; then
939   ac_cv_prog_AWK="$AWK" # Let the user override the test.
940 else
941   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
942   ac_dummy="$PATH"
943   for ac_dir in $ac_dummy; do
944     test -z "$ac_dir" && ac_dir=.
945     if test -f $ac_dir/$ac_word; then
946       ac_cv_prog_AWK="$ac_prog"
947       break
948     fi
949   done
950   IFS="$ac_save_ifs"
951 fi
952 fi
953 AWK="$ac_cv_prog_AWK"
954 if test -n "$AWK"; then
955   echo "$ac_t""$AWK" 1>&6
956 else
957   echo "$ac_t""no" 1>&6
958 fi
959
960 test -n "$AWK" && break
961 done
962
963 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
964 echo "configure:965: checking whether ${MAKE-make} sets \${MAKE}" >&5
965 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
966 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
967   echo $ac_n "(cached) $ac_c" 1>&6
968 else
969   cat > conftestmake <<\EOF
970 all:
971         @echo 'ac_maketemp="${MAKE}"'
972 EOF
973 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
974 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
975 if test -n "$ac_maketemp"; then
976   eval ac_cv_prog_make_${ac_make}_set=yes
977 else
978   eval ac_cv_prog_make_${ac_make}_set=no
979 fi
980 rm -f conftestmake
981 fi
982 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
983   echo "$ac_t""yes" 1>&6
984   SET_MAKE=
985 else
986   echo "$ac_t""no" 1>&6
987   SET_MAKE="MAKE=${MAKE-make}"
988 fi
989
990
991
992 PACKAGE=OpenLDAP
993
994 VERSION=$OL_VERSION
995
996 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
997   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
998 fi
999
1000
1001
1002 missing_dir=`cd $ac_aux_dir && pwd`
1003 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1004 echo "configure:1005: checking for working aclocal" >&5
1005 # Run test in a subshell; some versions of sh will print an error if
1006 # an executable is not found, even if stderr is redirected.
1007 # Redirect stdin to placate older versions of autoconf.  Sigh.
1008 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1009    ACLOCAL=aclocal
1010    echo "$ac_t""found" 1>&6
1011 else
1012    ACLOCAL="$missing_dir/missing aclocal"
1013    echo "$ac_t""missing" 1>&6
1014 fi
1015
1016 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1017 echo "configure:1018: checking for working autoconf" >&5
1018 # Run test in a subshell; some versions of sh will print an error if
1019 # an executable is not found, even if stderr is redirected.
1020 # Redirect stdin to placate older versions of autoconf.  Sigh.
1021 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1022    AUTOCONF=autoconf
1023    echo "$ac_t""found" 1>&6
1024 else
1025    AUTOCONF="$missing_dir/missing autoconf"
1026    echo "$ac_t""missing" 1>&6
1027 fi
1028
1029 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1030 echo "configure:1031: checking for working automake" >&5
1031 # Run test in a subshell; some versions of sh will print an error if
1032 # an executable is not found, even if stderr is redirected.
1033 # Redirect stdin to placate older versions of autoconf.  Sigh.
1034 if (automake --version) < /dev/null > /dev/null 2>&1; then
1035    AUTOMAKE=automake
1036    echo "$ac_t""found" 1>&6
1037 else
1038    AUTOMAKE="$missing_dir/missing automake"
1039    echo "$ac_t""missing" 1>&6
1040 fi
1041
1042 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1043 echo "configure:1044: checking for working autoheader" >&5
1044 # Run test in a subshell; some versions of sh will print an error if
1045 # an executable is not found, even if stderr is redirected.
1046 # Redirect stdin to placate older versions of autoconf.  Sigh.
1047 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1048    AUTOHEADER=autoheader
1049    echo "$ac_t""found" 1>&6
1050 else
1051    AUTOHEADER="$missing_dir/missing autoheader"
1052    echo "$ac_t""missing" 1>&6
1053 fi
1054
1055 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1056 echo "configure:1057: checking for working makeinfo" >&5
1057 # Run test in a subshell; some versions of sh will print an error if
1058 # an executable is not found, even if stderr is redirected.
1059 # Redirect stdin to placate older versions of autoconf.  Sigh.
1060 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1061    MAKEINFO=makeinfo
1062    echo "$ac_t""found" 1>&6
1063 else
1064    MAKEINFO="$missing_dir/missing makeinfo"
1065    echo "$ac_t""missing" 1>&6
1066 fi
1067
1068 install_sh="$missing_dir/install-sh"
1069 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1070
1071 for ac_prog in gnutar gtar tar
1072 do
1073 # Extract the first word of "$ac_prog", so it can be a program name with args.
1074 set dummy $ac_prog; ac_word=$2
1075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1076 echo "configure:1077: checking for $ac_word" >&5
1077 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1078   echo $ac_n "(cached) $ac_c" 1>&6
1079 else
1080   if test -n "$AMTAR"; then
1081   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1082 else
1083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1084   ac_dummy="$PATH"
1085   for ac_dir in $ac_dummy; do
1086     test -z "$ac_dir" && ac_dir=.
1087     if test -f $ac_dir/$ac_word; then
1088       ac_cv_prog_AMTAR="$ac_prog"
1089       break
1090     fi
1091   done
1092   IFS="$ac_save_ifs"
1093 fi
1094 fi
1095 AMTAR="$ac_cv_prog_AMTAR"
1096 if test -n "$AMTAR"; then
1097   echo "$ac_t""$AMTAR" 1>&6
1098 else
1099   echo "$ac_t""no" 1>&6
1100 fi
1101
1102 test -n "$AMTAR" && break
1103 done
1104
1105
1106 AMTARFLAGS=
1107 if test -n "$AMTAR"; then
1108   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1109         AMTARFLAGS=o
1110   fi
1111 fi
1112
1113
1114
1115 cat >> confdefs.h <<EOF
1116 #define OPENLDAP_PACKAGE "$PACKAGE"
1117 EOF
1118
1119 cat >> confdefs.h <<EOF
1120 #define OPENLDAP_VERSION "$VERSION"
1121 EOF
1122
1123
1124
1125
1126 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1127 echo "configure:1128: checking configure arguments" >&5
1128
1129
1130 top_builddir=`pwd`
1131
1132 ldap_subdir="/openldap"
1133
1134 # Check whether --with-subdir or --without-subdir was given.
1135 if test "${with_subdir+set}" = set; then
1136   withval="$with_subdir"
1137   case "$withval" in
1138         no) ldap_subdir=""
1139                 ;;
1140         yes)
1141                 ;;
1142         /*|\\*)
1143                 ldap_subdir="$withval"
1144                 ;;
1145         *)
1146                 ldap_subdir="/$withval"
1147                 ;;
1148 esac
1149
1150 fi
1151
1152
1153 # OpenLDAP --enable-debug
1154         # Check whether --enable-debug or --disable-debug was given.
1155 if test "${enable_debug+set}" = set; then
1156   enableval="$enable_debug"
1157   
1158         ol_arg=invalid
1159         for ol_val in auto yes no ; do
1160                 if test "$enableval" = "$ol_val" ; then
1161                         ol_arg="$ol_val"
1162                 fi
1163         done
1164         if test "$ol_arg" = "invalid" ; then
1165                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1166         fi
1167         ol_enable_debug="$ol_arg"
1168
1169 else
1170         ol_enable_debug="yes"
1171 fi
1172 # end --enable-debug
1173 # OpenLDAP --enable-syslog
1174         # Check whether --enable-syslog or --disable-syslog was given.
1175 if test "${enable_syslog+set}" = set; then
1176   enableval="$enable_syslog"
1177   
1178         ol_arg=invalid
1179         for ol_val in auto yes no ; do
1180                 if test "$enableval" = "$ol_val" ; then
1181                         ol_arg="$ol_val"
1182                 fi
1183         done
1184         if test "$ol_arg" = "invalid" ; then
1185                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1186         fi
1187         ol_enable_syslog="$ol_arg"
1188
1189 else
1190         ol_enable_syslog="auto"
1191 fi
1192 # end --enable-syslog
1193 # OpenLDAP --enable-proctitle
1194         # Check whether --enable-proctitle or --disable-proctitle was given.
1195 if test "${enable_proctitle+set}" = set; then
1196   enableval="$enable_proctitle"
1197   
1198         ol_arg=invalid
1199         for ol_val in auto yes no ; do
1200                 if test "$enableval" = "$ol_val" ; then
1201                         ol_arg="$ol_val"
1202                 fi
1203         done
1204         if test "$ol_arg" = "invalid" ; then
1205                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1206         fi
1207         ol_enable_proctitle="$ol_arg"
1208
1209 else
1210         ol_enable_proctitle="yes"
1211 fi
1212 # end --enable-proctitle
1213 # OpenLDAP --enable-cache
1214         # Check whether --enable-cache or --disable-cache was given.
1215 if test "${enable_cache+set}" = set; then
1216   enableval="$enable_cache"
1217   
1218         ol_arg=invalid
1219         for ol_val in auto yes no ; do
1220                 if test "$enableval" = "$ol_val" ; then
1221                         ol_arg="$ol_val"
1222                 fi
1223         done
1224         if test "$ol_arg" = "invalid" ; then
1225                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1226         fi
1227         ol_enable_cache="$ol_arg"
1228
1229 else
1230         ol_enable_cache="yes"
1231 fi
1232 # end --enable-cache
1233 # OpenLDAP --enable-dns
1234         # Check whether --enable-dns or --disable-dns was given.
1235 if test "${enable_dns+set}" = set; then
1236   enableval="$enable_dns"
1237   
1238         ol_arg=invalid
1239         for ol_val in auto yes no ; do
1240                 if test "$enableval" = "$ol_val" ; then
1241                         ol_arg="$ol_val"
1242                 fi
1243         done
1244         if test "$ol_arg" = "invalid" ; then
1245                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1246         fi
1247         ol_enable_dns="$ol_arg"
1248
1249 else
1250         ol_enable_dns="no"
1251 fi
1252 # end --enable-dns
1253 # OpenLDAP --enable-referrals
1254         # Check whether --enable-referrals or --disable-referrals was given.
1255 if test "${enable_referrals+set}" = set; then
1256   enableval="$enable_referrals"
1257   
1258         ol_arg=invalid
1259         for ol_val in auto yes no ; do
1260                 if test "$enableval" = "$ol_val" ; then
1261                         ol_arg="$ol_val"
1262                 fi
1263         done
1264         if test "$ol_arg" = "invalid" ; then
1265                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1266         fi
1267         ol_enable_referrals="$ol_arg"
1268
1269 else
1270         ol_enable_referrals="yes"
1271 fi
1272 # end --enable-referrals
1273 # OpenLDAP --enable-cldap
1274         # Check whether --enable-cldap or --disable-cldap was given.
1275 if test "${enable_cldap+set}" = set; then
1276   enableval="$enable_cldap"
1277   
1278         ol_arg=invalid
1279         for ol_val in auto yes no ; do
1280                 if test "$enableval" = "$ol_val" ; then
1281                         ol_arg="$ol_val"
1282                 fi
1283         done
1284         if test "$ol_arg" = "invalid" ; then
1285                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1286         fi
1287         ol_enable_cldap="$ol_arg"
1288
1289 else
1290         ol_enable_cldap="no"
1291 fi
1292 # end --enable-cldap
1293 # OpenLDAP --enable-x_compile
1294         # Check whether --enable-x_compile or --disable-x_compile was given.
1295 if test "${enable_x_compile+set}" = set; then
1296   enableval="$enable_x_compile"
1297   
1298         ol_arg=invalid
1299         for ol_val in yes no ; do
1300                 if test "$enableval" = "$ol_val" ; then
1301                         ol_arg="$ol_val"
1302                 fi
1303         done
1304         if test "$ol_arg" = "invalid" ; then
1305                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1306         fi
1307         ol_enable_x_compile="$ol_arg"
1308
1309 else
1310         ol_enable_x_compile="no"
1311 fi
1312 # end --enable-x_compile
1313
1314 # OpenLDAP --enable-dmalloc
1315         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1316 if test "${enable_dmalloc+set}" = set; then
1317   enableval="$enable_dmalloc"
1318   
1319         ol_arg=invalid
1320         for ol_val in auto yes no ; do
1321                 if test "$enableval" = "$ol_val" ; then
1322                         ol_arg="$ol_val"
1323                 fi
1324         done
1325         if test "$ol_arg" = "invalid" ; then
1326                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1327         fi
1328         ol_enable_dmalloc="$ol_arg"
1329
1330 else
1331         ol_enable_dmalloc="no"
1332 fi
1333 # end --enable-dmalloc
1334
1335 # OpenLDAP --with-cyrus_sasl
1336         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1337 if test "${with_cyrus_sasl+set}" = set; then
1338   withval="$with_cyrus_sasl"
1339   
1340         ol_arg=invalid
1341         for ol_val in auto yes no  ; do
1342                 if test "$withval" = "$ol_val" ; then
1343                         ol_arg="$ol_val"
1344                 fi
1345         done
1346         if test "$ol_arg" = "invalid" ; then
1347                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1348         fi
1349         ol_with_cyrus_sasl="$ol_arg"
1350
1351 else
1352         ol_with_cyrus_sasl="auto"
1353 fi
1354 # end --with-cyrus_sasl
1355
1356 # OpenLDAP --with-fetch
1357         # Check whether --with-fetch or --without-fetch was given.
1358 if test "${with_fetch+set}" = set; then
1359   withval="$with_fetch"
1360   
1361         ol_arg=invalid
1362         for ol_val in auto yes no  ; do
1363                 if test "$withval" = "$ol_val" ; then
1364                         ol_arg="$ol_val"
1365                 fi
1366         done
1367         if test "$ol_arg" = "invalid" ; then
1368                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1369         fi
1370         ol_with_fetch="$ol_arg"
1371
1372 else
1373         ol_with_fetch="auto"
1374 fi
1375 # end --with-fetch
1376
1377 # OpenLDAP --with-kerberos
1378         # Check whether --with-kerberos or --without-kerberos was given.
1379 if test "${with_kerberos+set}" = set; then
1380   withval="$with_kerberos"
1381   
1382         ol_arg=invalid
1383         for ol_val in auto k5 k4 afs yes no ; do
1384                 if test "$withval" = "$ol_val" ; then
1385                         ol_arg="$ol_val"
1386                 fi
1387         done
1388         if test "$ol_arg" = "invalid" ; then
1389                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1390         fi
1391         ol_with_kerberos="$ol_arg"
1392
1393 else
1394         ol_with_kerberos="auto"
1395 fi
1396 # end --with-kerberos
1397
1398 # OpenLDAP --with-readline
1399         # Check whether --with-readline or --without-readline was given.
1400 if test "${with_readline+set}" = set; then
1401   withval="$with_readline"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto yes no  ; do
1405                 if test "$withval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1411         fi
1412         ol_with_readline="$ol_arg"
1413
1414 else
1415         ol_with_readline="auto"
1416 fi
1417 # end --with-readline
1418
1419 # OpenLDAP --with-threads
1420         # Check whether --with-threads or --without-threads was given.
1421 if test "${with_threads+set}" = set; then
1422   withval="$with_threads"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto posix mach pth lwp yes no manual  ; do
1426                 if test "$withval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1432         fi
1433         ol_with_threads="$ol_arg"
1434
1435 else
1436         ol_with_threads="auto"
1437 fi
1438 # end --with-threads
1439
1440 # OpenLDAP --with-tls
1441         # Check whether --with-tls or --without-tls was given.
1442 if test "${with_tls+set}" = set; then
1443   withval="$with_tls"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto ssleay openssl yes no  ; do
1447                 if test "$withval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1453         fi
1454         ol_with_tls="$ol_arg"
1455
1456 else
1457         ol_with_tls="auto"
1458 fi
1459 # end --with-tls
1460
1461 # OpenLDAP --with-yielding_select
1462         # Check whether --with-yielding_select or --without-yielding_select was given.
1463 if test "${with_yielding_select+set}" = set; then
1464   withval="$with_yielding_select"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no manual  ; do
1468                 if test "$withval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1474         fi
1475         ol_with_yielding_select="$ol_arg"
1476
1477 else
1478         ol_with_yielding_select="auto"
1479 fi
1480 # end --with-yielding_select
1481
1482
1483
1484 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1485 if test "${with_xxslapdoptions+set}" = set; then
1486   withval="$with_xxslapdoptions"
1487   :
1488 fi
1489
1490 # OpenLDAP --enable-slapd
1491         # Check whether --enable-slapd or --disable-slapd was given.
1492 if test "${enable_slapd+set}" = set; then
1493   enableval="$enable_slapd"
1494   
1495         ol_arg=invalid
1496         for ol_val in auto yes no ; do
1497                 if test "$enableval" = "$ol_val" ; then
1498                         ol_arg="$ol_val"
1499                 fi
1500         done
1501         if test "$ol_arg" = "invalid" ; then
1502                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1503         fi
1504         ol_enable_slapd="$ol_arg"
1505
1506 else
1507         ol_enable_slapd="yes"
1508 fi
1509 # end --enable-slapd
1510 # OpenLDAP --enable-cleartext
1511         # Check whether --enable-cleartext or --disable-cleartext was given.
1512 if test "${enable_cleartext+set}" = set; then
1513   enableval="$enable_cleartext"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no ; do
1517                 if test "$enableval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1523         fi
1524         ol_enable_cleartext="$ol_arg"
1525
1526 else
1527         ol_enable_cleartext="yes"
1528 fi
1529 # end --enable-cleartext
1530 # OpenLDAP --enable-crypt
1531         # Check whether --enable-crypt or --disable-crypt was given.
1532 if test "${enable_crypt+set}" = set; then
1533   enableval="$enable_crypt"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no ; do
1537                 if test "$enableval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1543         fi
1544         ol_enable_crypt="$ol_arg"
1545
1546 else
1547         ol_enable_crypt="auto"
1548 fi
1549 # end --enable-crypt
1550 # OpenLDAP --enable-modules
1551         # Check whether --enable-modules or --disable-modules was given.
1552 if test "${enable_modules+set}" = set; then
1553   enableval="$enable_modules"
1554   
1555         ol_arg=invalid
1556         for ol_val in auto yes no ; do
1557                 if test "$enableval" = "$ol_val" ; then
1558                         ol_arg="$ol_val"
1559                 fi
1560         done
1561         if test "$ol_arg" = "invalid" ; then
1562                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1563         fi
1564         ol_enable_modules="$ol_arg"
1565
1566 else
1567         ol_enable_modules="no"
1568 fi
1569 # end --enable-modules
1570 # OpenLDAP --enable-multimaster
1571         # Check whether --enable-multimaster or --disable-multimaster was given.
1572 if test "${enable_multimaster+set}" = set; then
1573   enableval="$enable_multimaster"
1574   
1575         ol_arg=invalid
1576         for ol_val in auto yes no ; do
1577                 if test "$enableval" = "$ol_val" ; then
1578                         ol_arg="$ol_val"
1579                 fi
1580         done
1581         if test "$ol_arg" = "invalid" ; then
1582                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1583         fi
1584         ol_enable_multimaster="$ol_arg"
1585
1586 else
1587         ol_enable_multimaster="no"
1588 fi
1589 # end --enable-multimaster
1590 # OpenLDAP --enable-phonetic
1591         # Check whether --enable-phonetic or --disable-phonetic was given.
1592 if test "${enable_phonetic+set}" = set; then
1593   enableval="$enable_phonetic"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto yes no ; do
1597                 if test "$enableval" = "$ol_val" ; then
1598                         ol_arg="$ol_val"
1599                 fi
1600         done
1601         if test "$ol_arg" = "invalid" ; then
1602                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1603         fi
1604         ol_enable_phonetic="$ol_arg"
1605
1606 else
1607         ol_enable_phonetic="no"
1608 fi
1609 # end --enable-phonetic
1610 # OpenLDAP --enable-quipu
1611         # Check whether --enable-quipu or --disable-quipu was given.
1612 if test "${enable_quipu+set}" = set; then
1613   enableval="$enable_quipu"
1614   
1615         ol_arg=invalid
1616         for ol_val in auto yes no ; do
1617                 if test "$enableval" = "$ol_val" ; then
1618                         ol_arg="$ol_val"
1619                 fi
1620         done
1621         if test "$ol_arg" = "invalid" ; then
1622                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1623         fi
1624         ol_enable_quipu="$ol_arg"
1625
1626 else
1627         ol_enable_quipu="no"
1628 fi
1629 # end --enable-quipu
1630 # OpenLDAP --enable-rlookups
1631         # Check whether --enable-rlookups or --disable-rlookups was given.
1632 if test "${enable_rlookups+set}" = set; then
1633   enableval="$enable_rlookups"
1634   
1635         ol_arg=invalid
1636         for ol_val in auto yes no ; do
1637                 if test "$enableval" = "$ol_val" ; then
1638                         ol_arg="$ol_val"
1639                 fi
1640         done
1641         if test "$ol_arg" = "invalid" ; then
1642                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1643         fi
1644         ol_enable_rlookups="$ol_arg"
1645
1646 else
1647         ol_enable_rlookups="auto"
1648 fi
1649 # end --enable-rlookups
1650 # OpenLDAP --enable-aci
1651         # Check whether --enable-aci or --disable-aci was given.
1652 if test "${enable_aci+set}" = set; then
1653   enableval="$enable_aci"
1654   
1655         ol_arg=invalid
1656         for ol_val in auto yes no ; do
1657                 if test "$enableval" = "$ol_val" ; then
1658                         ol_arg="$ol_val"
1659                 fi
1660         done
1661         if test "$ol_arg" = "invalid" ; then
1662                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1663         fi
1664         ol_enable_aci="$ol_arg"
1665
1666 else
1667         ol_enable_aci="no"
1668 fi
1669 # end --enable-aci
1670 # OpenLDAP --enable-discreteaci
1671         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1672 if test "${enable_discreteaci+set}" = set; then
1673   enableval="$enable_discreteaci"
1674   
1675         ol_arg=invalid
1676         for ol_val in auto yes no ; do
1677                 if test "$enableval" = "$ol_val" ; then
1678                         ol_arg="$ol_val"
1679                 fi
1680         done
1681         if test "$ol_arg" = "invalid" ; then
1682                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1683         fi
1684         ol_enable_discreteaci="$ol_arg"
1685
1686 else
1687         ol_enable_discreteaci="no"
1688 fi
1689 # end --enable-discreteaci
1690 # OpenLDAP --enable-wrappers
1691         # Check whether --enable-wrappers or --disable-wrappers was given.
1692 if test "${enable_wrappers+set}" = set; then
1693   enableval="$enable_wrappers"
1694   
1695         ol_arg=invalid
1696         for ol_val in auto yes no ; do
1697                 if test "$enableval" = "$ol_val" ; then
1698                         ol_arg="$ol_val"
1699                 fi
1700         done
1701         if test "$ol_arg" = "invalid" ; then
1702                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1703         fi
1704         ol_enable_wrappers="$ol_arg"
1705
1706 else
1707         ol_enable_wrappers="no"
1708 fi
1709 # end --enable-wrappers
1710
1711 # OpenLDAP --enable-bdb2
1712         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1713 if test "${enable_bdb2+set}" = set; then
1714   enableval="$enable_bdb2"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1724         fi
1725         ol_enable_bdb2="$ol_arg"
1726
1727 else
1728         ol_enable_bdb2="no"
1729 fi
1730 # end --enable-bdb2
1731 # OpenLDAP --with-bdb2_module
1732         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1733 if test "${with_bdb2_module+set}" = set; then
1734   withval="$with_bdb2_module"
1735   
1736         ol_arg=invalid
1737         for ol_val in static dynamic ; do
1738                 if test "$withval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1744         fi
1745         ol_with_bdb2_module="$ol_arg"
1746
1747 else
1748         ol_with_bdb2_module="static"
1749 fi
1750 # end --with-bdb2_module
1751
1752 # OpenLDAP --enable-ldap
1753         # Check whether --enable-ldap or --disable-ldap was given.
1754 if test "${enable_ldap+set}" = set; then
1755   enableval="$enable_ldap"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1765         fi
1766         ol_enable_ldap="$ol_arg"
1767
1768 else
1769         ol_enable_ldap="no"
1770 fi
1771 # end --enable-ldap
1772 # OpenLDAP --with-ldap_module
1773         # Check whether --with-ldap_module or --without-ldap_module was given.
1774 if test "${with_ldap_module+set}" = set; then
1775   withval="$with_ldap_module"
1776   
1777         ol_arg=invalid
1778         for ol_val in static dynamic ; do
1779                 if test "$withval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1785         fi
1786         ol_with_ldap_module="$ol_arg"
1787
1788 else
1789         ol_with_ldap_module="static"
1790 fi
1791 # end --with-ldap_module
1792
1793 # OpenLDAP --enable-ldbm
1794         # Check whether --enable-ldbm or --disable-ldbm was given.
1795 if test "${enable_ldbm+set}" = set; then
1796   enableval="$enable_ldbm"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1806         fi
1807         ol_enable_ldbm="$ol_arg"
1808
1809 else
1810         ol_enable_ldbm="yes"
1811 fi
1812 # end --enable-ldbm
1813 # OpenLDAP --with-ldbm_api
1814         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1815 if test "${with_ldbm_api+set}" = set; then
1816   withval="$with_ldbm_api"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1820                 if test "$withval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1826         fi
1827         ol_with_ldbm_api="$ol_arg"
1828
1829 else
1830         ol_with_ldbm_api="auto"
1831 fi
1832 # end --with-ldbm_api
1833
1834 # OpenLDAP --with-ldbm_module
1835         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1836 if test "${with_ldbm_module+set}" = set; then
1837   withval="$with_ldbm_module"
1838   
1839         ol_arg=invalid
1840         for ol_val in static dynamic ; do
1841                 if test "$withval" = "$ol_val" ; then
1842                         ol_arg="$ol_val"
1843                 fi
1844         done
1845         if test "$ol_arg" = "invalid" ; then
1846                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1847         fi
1848         ol_with_ldbm_module="$ol_arg"
1849
1850 else
1851         ol_with_ldbm_module="static"
1852 fi
1853 # end --with-ldbm_module
1854
1855 # OpenLDAP --with-ldbm_type
1856         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1857 if test "${with_ldbm_type+set}" = set; then
1858   withval="$with_ldbm_type"
1859   
1860         ol_arg=invalid
1861         for ol_val in auto btree hash ; do
1862                 if test "$withval" = "$ol_val" ; then
1863                         ol_arg="$ol_val"
1864                 fi
1865         done
1866         if test "$ol_arg" = "invalid" ; then
1867                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1868         fi
1869         ol_with_ldbm_type="$ol_arg"
1870
1871 else
1872         ol_with_ldbm_type="auto"
1873 fi
1874 # end --with-ldbm_type
1875
1876
1877 # OpenLDAP --enable-passwd
1878         # Check whether --enable-passwd or --disable-passwd was given.
1879 if test "${enable_passwd+set}" = set; then
1880   enableval="$enable_passwd"
1881   
1882         ol_arg=invalid
1883         for ol_val in auto yes no ; do
1884                 if test "$enableval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1890         fi
1891         ol_enable_passwd="$ol_arg"
1892
1893 else
1894         ol_enable_passwd="no"
1895 fi
1896 # end --enable-passwd
1897 # OpenLDAP --with-passwd_module
1898         # Check whether --with-passwd_module or --without-passwd_module was given.
1899 if test "${with_passwd_module+set}" = set; then
1900   withval="$with_passwd_module"
1901   
1902         ol_arg=invalid
1903         for ol_val in static dynamic ; do
1904                 if test "$withval" = "$ol_val" ; then
1905                         ol_arg="$ol_val"
1906                 fi
1907         done
1908         if test "$ol_arg" = "invalid" ; then
1909                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1910         fi
1911         ol_with_passwd_module="$ol_arg"
1912
1913 else
1914         ol_with_passwd_module="static"
1915 fi
1916 # end --with-passwd_module
1917
1918 # OpenLDAP --enable-perl
1919         # Check whether --enable-perl or --disable-perl was given.
1920 if test "${enable_perl+set}" = set; then
1921   enableval="$enable_perl"
1922   
1923         ol_arg=invalid
1924         for ol_val in auto yes no ; do
1925                 if test "$enableval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1931         fi
1932         ol_enable_perl="$ol_arg"
1933
1934 else
1935         ol_enable_perl="no"
1936 fi
1937 # end --enable-perl
1938 # OpenLDAP --with-perl_module
1939         # Check whether --with-perl_module or --without-perl_module was given.
1940 if test "${with_perl_module+set}" = set; then
1941   withval="$with_perl_module"
1942   
1943         ol_arg=invalid
1944         for ol_val in static dynamic ; do
1945                 if test "$withval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1951         fi
1952         ol_with_perl_module="$ol_arg"
1953
1954 else
1955         ol_with_perl_module="static"
1956 fi
1957 # end --with-perl_module
1958
1959 # OpenLDAP --enable-shell
1960         # Check whether --enable-shell or --disable-shell was given.
1961 if test "${enable_shell+set}" = set; then
1962   enableval="$enable_shell"
1963   
1964         ol_arg=invalid
1965         for ol_val in auto yes no ; do
1966                 if test "$enableval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1972         fi
1973         ol_enable_shell="$ol_arg"
1974
1975 else
1976         ol_enable_shell="no"
1977 fi
1978 # end --enable-shell
1979 # OpenLDAP --with-shell_module
1980         # Check whether --with-shell_module or --without-shell_module was given.
1981 if test "${with_shell_module+set}" = set; then
1982   withval="$with_shell_module"
1983   
1984         ol_arg=invalid
1985         for ol_val in static dynamic ; do
1986                 if test "$withval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1992         fi
1993         ol_with_shell_module="$ol_arg"
1994
1995 else
1996         ol_with_shell_module="static"
1997 fi
1998 # end --with-shell_module
1999
2000 # OpenLDAP --enable-tcl
2001         # Check whether --enable-tcl or --disable-tcl was given.
2002 if test "${enable_tcl+set}" = set; then
2003   enableval="$enable_tcl"
2004   
2005         ol_arg=invalid
2006         for ol_val in auto yes no ; do
2007                 if test "$enableval" = "$ol_val" ; then
2008                         ol_arg="$ol_val"
2009                 fi
2010         done
2011         if test "$ol_arg" = "invalid" ; then
2012                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2013         fi
2014         ol_enable_tcl="$ol_arg"
2015
2016 else
2017         ol_enable_tcl="no"
2018 fi
2019 # end --enable-tcl
2020 # OpenLDAP --with-tcl_module
2021         # Check whether --with-tcl_module or --without-tcl_module was given.
2022 if test "${with_tcl_module+set}" = set; then
2023   withval="$with_tcl_module"
2024   
2025         ol_arg=invalid
2026         for ol_val in static dynamic ; do
2027                 if test "$withval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2033         fi
2034         ol_with_tcl_module="$ol_arg"
2035
2036 else
2037         ol_with_tcl_module="static"
2038 fi
2039 # end --with-tcl_module
2040
2041
2042 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2043 if test "${with_xxslurpdoptions+set}" = set; then
2044   withval="$with_xxslurpdoptions"
2045   :
2046 fi
2047
2048 # OpenLDAP --enable-slurpd
2049         # Check whether --enable-slurpd or --disable-slurpd was given.
2050 if test "${enable_slurpd+set}" = set; then
2051   enableval="$enable_slurpd"
2052   
2053         ol_arg=invalid
2054         for ol_val in auto yes no ; do
2055                 if test "$enableval" = "$ol_val" ; then
2056                         ol_arg="$ol_val"
2057                 fi
2058         done
2059         if test "$ol_arg" = "invalid" ; then
2060                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2061         fi
2062         ol_enable_slurpd="$ol_arg"
2063
2064 else
2065         ol_enable_slurpd="auto"
2066 fi
2067 # end --enable-slurpd
2068
2069 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2070 if test "${with_xxliboptions+set}" = set; then
2071   withval="$with_xxliboptions"
2072   :
2073 fi
2074
2075 # Check whether --enable-static or --disable-static was given.
2076 if test "${enable_static+set}" = set; then
2077   enableval="$enable_static"
2078   p=${PACKAGE-default}
2079 case "$enableval" in
2080 yes) enable_static=yes ;;
2081 no) enable_static=no ;;
2082 *)
2083   enable_static=no
2084   # Look at the argument we got.  We use all the common list separators.
2085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2086   for pkg in $enableval; do
2087     if test "X$pkg" = "X$p"; then
2088       enable_static=yes
2089     fi
2090   done
2091   IFS="$ac_save_ifs"
2092   ;;
2093 esac
2094 else
2095   enable_static=yes
2096 fi
2097
2098 # Check whether --enable-shared or --disable-shared was given.
2099 if test "${enable_shared+set}" = set; then
2100   enableval="$enable_shared"
2101   p=${PACKAGE-default}
2102 case "$enableval" in
2103 yes) enable_shared=yes ;;
2104 no) enable_shared=no ;;
2105 *)
2106   enable_shared=no
2107   # Look at the argument we got.  We use all the common list separators.
2108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2109   for pkg in $enableval; do
2110     if test "X$pkg" = "X$p"; then
2111       enable_shared=yes
2112     fi
2113   done
2114   IFS="$ac_save_ifs"
2115   ;;
2116 esac
2117 else
2118   enable_shared=yes
2119 fi
2120
2121
2122 # validate options
2123 if test $ol_enable_dns = yes ; then
2124         if test $ol_enable_referrals = no ; then
2125                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2126         fi
2127         if test $ol_enable_referrals = auto ; then
2128                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2129                 ol_enable_referrals=yes
2130         fi
2131 fi
2132
2133 if test $ol_enable_slapd = no ; then
2134                 if test $ol_enable_bdb2 = yes ; then
2135                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2136         fi
2137         if test $ol_enable_ldap = yes ; then
2138                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2139         fi
2140         if test $ol_enable_ldbm = yes ; then
2141                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2142         fi
2143         if test $ol_enable_passwd = yes ; then
2144                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2145         fi
2146         if test $ol_enable_perl = yes ; then
2147                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2148         fi
2149         if test $ol_enable_shell = yes ; then
2150                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2151         fi
2152         if test $ol_enable_tcl = yes ; then
2153                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2154         fi
2155         if test $ol_enable_modules = yes ; then
2156                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2157         fi
2158         if test $ol_enable_multimaster = yes ; then
2159                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2160         fi
2161         if test $ol_enable_wrappers = yes ; then
2162                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2163         fi
2164         if test $ol_enable_phonetic = yes ; then
2165                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2166         fi
2167         if test $ol_enable_quipu = yes ; then
2168                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2169         fi
2170         if test $ol_enable_rlookups = yes ; then
2171                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2172         fi
2173         if test $ol_enable_aci = yes ; then
2174                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2175         fi
2176         if test $ol_enable_discreteaci = yes ; then
2177                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2178         fi
2179         if test $ol_with_ldbm_api != auto ; then
2180                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2181         fi
2182         if test $ol_with_ldbm_type != auto ; then
2183                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2184         fi
2185         if test $ol_with_bdb2_module != static ; then
2186                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2187         fi
2188         if test $ol_with_ldap_module != static ; then
2189                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2190         fi
2191         if test $ol_with_ldbm_module != static ; then
2192                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2193         fi
2194         if test $ol_with_passwd_module != static ; then
2195                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2196         fi
2197         if test $ol_with_perl_module != static ; then
2198                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2199         fi
2200         if test $ol_with_shell_module != static ; then
2201                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2202         fi
2203         if test $ol_with_tcl_module != static ; then
2204                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2205         fi
2206         if test $ol_enable_slurpd = yes ; then
2207                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2208         fi
2209
2210         # force settings to no
2211         ol_enable_bdb2=no
2212         ol_enable_ldap=no
2213         ol_enable_ldbm=no
2214         ol_enable_passwd=no
2215         ol_enable_perl=no
2216         ol_enable_shell=no
2217         ol_enable_tcl=no
2218
2219         ol_enable_modules=no
2220         ol_enable_multimaster=no
2221         ol_enable_phonetic=no
2222         ol_enable_quipu=no
2223         ol_enable_rlookups=no
2224         ol_enable_aci=no
2225         ol_enable_discreteaci=no
2226         ol_enable_wrappers=no
2227
2228         ol_with_ldbm_api=no
2229         ol_with_ldbm_type=no
2230
2231         ol_with_bdb2_module=static
2232         ol_with_ldap_module=static
2233         ol_with_ldbm_module=static
2234         ol_with_passwd_module=static
2235         ol_with_perl_module=static
2236         ol_with_shell_module=static
2237         ol_with_tcl_module=static
2238
2239         ol_enable_slurpd=no
2240
2241 elif test $ol_enable_ldbm = no ; then
2242         
2243         if test $ol_with_ldbm_api != auto ; then
2244                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2245         fi
2246
2247         if test $ol_with_ldbm_type != auto ; then
2248                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2249         fi
2250
2251         if test $ol_with_ldbm_module != static ; then
2252                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2253         fi
2254
2255         if test $ol_enable_bdb2 = yes ; then
2256                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2257         fi
2258
2259         if test $ol_enable_modules != yes -a \
2260                 $ol_enable_ldap = no -a \
2261                 $ol_enable_passwd = no -a \
2262                 $ol_enable_perl = no -a \
2263                 $ol_enable_shell = no -a \
2264                 $ol_enable_tcl = no ; then
2265                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2266         fi
2267
2268         ol_with_ldbm_api=no
2269         ol_with_ldbm_type=no
2270         ol_with_ldbm_module=static
2271
2272 elif test $ol_enable_bdb2 = yes ; then
2273         
2274         if test $ol_with_ldbm_api != auto -a \
2275                 $ol_with_ldbm_api != db2 ; then
2276                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2277         fi
2278
2279         ol_with_ldbm_api=db2
2280
2281 else
2282         
2283         if test $ol_enable_bdb2 != no ; then
2284                 if test $ol_with_ldbm_api != auto -a \
2285                         $ol_with_ldbm_api != db2 ; then
2286                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2287                         ol_enable_bdb2=no
2288                 fi
2289         fi
2290
2291         if test $ol_with_ldbm_api = gdbm -a \
2292                 $ol_with_ldbm_type = btree ; then
2293                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2294         fi
2295         if test $ol_with_ldbm_api = mdbm -a \
2296                 $ol_with_ldbm_type = btree ; then
2297                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2298         fi
2299         if test $ol_with_ldbm_api = ndbm -a \
2300                 $ol_with_ldbm_type = btree ; then
2301                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2302         fi
2303 fi
2304
2305 if test $ol_enable_slurpd = yes ; then
2306                 if test $ol_with_threads = no ; then
2307                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2308         fi
2309 fi
2310
2311 echo "$ac_t""done" 1>&6
2312
2313 ## Initialize vars
2314 LDAP_LIBS=
2315 LDIF_LIBS=
2316 LDBM_LIBS=
2317 LTHREAD_LIBS=
2318 LUTIL_LIBS=
2319
2320 SLAPD_LIBS=
2321 SLURPD_LIBS=
2322
2323 BUILD_SLAPD=no
2324 BUILD_SLURPD=no
2325
2326 BUILD_BDB2=no
2327 BUILD_LDAP=no
2328 BUILD_LDBM=no
2329 BUILD_PASSWD=no
2330 BUILD_PERL=no
2331 BUILD_QUIPU=no
2332 BUILD_SHELL=no
2333 BUILD_TCL=no
2334 BUILD_THREAD=no
2335
2336 BUILD_BDB2_DYNAMIC=static
2337 BUILD_LDAP_DYNAMIC=static
2338 BUILD_LDBM_DYNAMIC=static
2339 BUILD_PASSWD_DYNAMIC=static
2340 BUILD_PERL_DYNAMIC=static
2341 BUILD_SHELL_DYNAMIC=static
2342 BUILD_TCL_DYNAMIC=static
2343
2344 SLAPD_MODULES_LDFLAGS=
2345 SLAPD_MODULES_CPPFLAGS=
2346 SLAPD_MODULES_LIST=
2347
2348 SLAPD_PERL_LDFLAGS=
2349 SLAPD_PERL_CPPFLAGS=
2350
2351 KRB_LIBS=
2352 READLINE_LIBS=
2353 SASL_LIBS=
2354 TERMCAP_LIBS=
2355 TLS_LIBS=
2356 MODULES_LIBS=
2357
2358
2359
2360 cat >> confdefs.h <<\EOF
2361 #define HAVE_MKVERSION 1
2362 EOF
2363
2364
2365
2366
2367 ol_aix_threads=no
2368 case "$target" in
2369 *-*-aix*)       if test -z "$CC" ; then
2370                 case "$ol_with_threads" in
2371                 auto | yes |  posix) ol_aix_threads=yes ;;
2372                 esac
2373         fi
2374 ;;
2375 esac
2376
2377 if test $ol_aix_threads = yes ; then
2378         if test -z "${CC}" ; then
2379                 for ac_prog in cc_r xlc_r cc
2380 do
2381 # Extract the first word of "$ac_prog", so it can be a program name with args.
2382 set dummy $ac_prog; ac_word=$2
2383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2384 echo "configure:2385: checking for $ac_word" >&5
2385 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2386   echo $ac_n "(cached) $ac_c" 1>&6
2387 else
2388   if test -n "$CC"; then
2389   ac_cv_prog_CC="$CC" # Let the user override the test.
2390 else
2391   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2392   ac_dummy="$PATH"
2393   for ac_dir in $ac_dummy; do
2394     test -z "$ac_dir" && ac_dir=.
2395     if test -f $ac_dir/$ac_word; then
2396       ac_cv_prog_CC="$ac_prog"
2397       break
2398     fi
2399   done
2400   IFS="$ac_save_ifs"
2401 fi
2402 fi
2403 CC="$ac_cv_prog_CC"
2404 if test -n "$CC"; then
2405   echo "$ac_t""$CC" 1>&6
2406 else
2407   echo "$ac_t""no" 1>&6
2408 fi
2409
2410 test -n "$CC" && break
2411 done
2412
2413
2414                 if test "$CC" = cc ; then
2415                                                 if test $ol_with_threads != auto ; then
2416                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2417                         else
2418                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2419                         fi
2420                         ol_with_threads=no
2421                 fi
2422         fi
2423
2424         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2425                 ol_with_threads=posix
2426                 ol_cv_pthread_create=yes
2427         fi
2428 fi
2429
2430 if test -z "${CC}"; then
2431         for ac_prog in cc
2432 do
2433 # Extract the first word of "$ac_prog", so it can be a program name with args.
2434 set dummy $ac_prog; ac_word=$2
2435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_word" >&5
2437 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   if test -n "$CC"; then
2441   ac_cv_prog_CC="$CC" # Let the user override the test.
2442 else
2443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2444   ac_dummy="$PATH"
2445   for ac_dir in $ac_dummy; do
2446     test -z "$ac_dir" && ac_dir=.
2447     if test -f $ac_dir/$ac_word; then
2448       ac_cv_prog_CC="$ac_prog"
2449       break
2450     fi
2451   done
2452   IFS="$ac_save_ifs"
2453 fi
2454 fi
2455 CC="$ac_cv_prog_CC"
2456 if test -n "$CC"; then
2457   echo "$ac_t""$CC" 1>&6
2458 else
2459   echo "$ac_t""no" 1>&6
2460 fi
2461
2462 test -n "$CC" && break
2463 done
2464
2465 fi
2466
2467
2468
2469 # Check whether --enable-fast-install or --disable-fast-install was given.
2470 if test "${enable_fast_install+set}" = set; then
2471   enableval="$enable_fast_install"
2472   p=${PACKAGE-default}
2473 case "$enableval" in
2474 yes) enable_fast_install=yes ;;
2475 no) enable_fast_install=no ;;
2476 *)
2477   enable_fast_install=no
2478   # Look at the argument we got.  We use all the common list separators.
2479   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2480   for pkg in $enableval; do
2481     if test "X$pkg" = "X$p"; then
2482       enable_fast_install=yes
2483     fi
2484   done
2485   IFS="$ac_save_ifs"
2486   ;;
2487 esac
2488 else
2489   enable_fast_install=yes
2490 fi
2491
2492 # Extract the first word of "ranlib", so it can be a program name with args.
2493 set dummy ranlib; ac_word=$2
2494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2495 echo "configure:2496: checking for $ac_word" >&5
2496 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2497   echo $ac_n "(cached) $ac_c" 1>&6
2498 else
2499   if test -n "$RANLIB"; then
2500   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2501 else
2502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2503   ac_dummy="$PATH"
2504   for ac_dir in $ac_dummy; do
2505     test -z "$ac_dir" && ac_dir=.
2506     if test -f $ac_dir/$ac_word; then
2507       ac_cv_prog_RANLIB="ranlib"
2508       break
2509     fi
2510   done
2511   IFS="$ac_save_ifs"
2512   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2513 fi
2514 fi
2515 RANLIB="$ac_cv_prog_RANLIB"
2516 if test -n "$RANLIB"; then
2517   echo "$ac_t""$RANLIB" 1>&6
2518 else
2519   echo "$ac_t""no" 1>&6
2520 fi
2521
2522 # Extract the first word of "gcc", so it can be a program name with args.
2523 set dummy gcc; ac_word=$2
2524 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2525 echo "configure:2526: checking for $ac_word" >&5
2526 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2527   echo $ac_n "(cached) $ac_c" 1>&6
2528 else
2529   if test -n "$CC"; then
2530   ac_cv_prog_CC="$CC" # Let the user override the test.
2531 else
2532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2533   ac_dummy="$PATH"
2534   for ac_dir in $ac_dummy; do
2535     test -z "$ac_dir" && ac_dir=.
2536     if test -f $ac_dir/$ac_word; then
2537       ac_cv_prog_CC="gcc"
2538       break
2539     fi
2540   done
2541   IFS="$ac_save_ifs"
2542 fi
2543 fi
2544 CC="$ac_cv_prog_CC"
2545 if test -n "$CC"; then
2546   echo "$ac_t""$CC" 1>&6
2547 else
2548   echo "$ac_t""no" 1>&6
2549 fi
2550
2551 if test -z "$CC"; then
2552   # Extract the first word of "cc", so it can be a program name with args.
2553 set dummy cc; ac_word=$2
2554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2555 echo "configure:2556: checking for $ac_word" >&5
2556 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2557   echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559   if test -n "$CC"; then
2560   ac_cv_prog_CC="$CC" # Let the user override the test.
2561 else
2562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2563   ac_prog_rejected=no
2564   ac_dummy="$PATH"
2565   for ac_dir in $ac_dummy; do
2566     test -z "$ac_dir" && ac_dir=.
2567     if test -f $ac_dir/$ac_word; then
2568       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2569         ac_prog_rejected=yes
2570         continue
2571       fi
2572       ac_cv_prog_CC="cc"
2573       break
2574     fi
2575   done
2576   IFS="$ac_save_ifs"
2577 if test $ac_prog_rejected = yes; then
2578   # We found a bogon in the path, so make sure we never use it.
2579   set dummy $ac_cv_prog_CC
2580   shift
2581   if test $# -gt 0; then
2582     # We chose a different compiler from the bogus one.
2583     # However, it has the same basename, so the bogon will be chosen
2584     # first if we set CC to just the basename; use the full file name.
2585     shift
2586     set dummy "$ac_dir/$ac_word" "$@"
2587     shift
2588     ac_cv_prog_CC="$@"
2589   fi
2590 fi
2591 fi
2592 fi
2593 CC="$ac_cv_prog_CC"
2594 if test -n "$CC"; then
2595   echo "$ac_t""$CC" 1>&6
2596 else
2597   echo "$ac_t""no" 1>&6
2598 fi
2599
2600   if test -z "$CC"; then
2601     case "`uname -s`" in
2602     *win32* | *WIN32* | *CYGWIN*)
2603       # Extract the first word of "cl", so it can be a program name with args.
2604 set dummy cl; ac_word=$2
2605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2606 echo "configure:2607: checking for $ac_word" >&5
2607 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2608   echo $ac_n "(cached) $ac_c" 1>&6
2609 else
2610   if test -n "$CC"; then
2611   ac_cv_prog_CC="$CC" # Let the user override the test.
2612 else
2613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2614   ac_dummy="$PATH"
2615   for ac_dir in $ac_dummy; do
2616     test -z "$ac_dir" && ac_dir=.
2617     if test -f $ac_dir/$ac_word; then
2618       ac_cv_prog_CC="cl"
2619       break
2620     fi
2621   done
2622   IFS="$ac_save_ifs"
2623 fi
2624 fi
2625 CC="$ac_cv_prog_CC"
2626 if test -n "$CC"; then
2627   echo "$ac_t""$CC" 1>&6
2628 else
2629   echo "$ac_t""no" 1>&6
2630 fi
2631  ;;
2632     esac
2633   fi
2634   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2635 fi
2636
2637 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2638 echo "configure:2639: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2639
2640 ac_ext=c
2641 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2642 ac_cpp='$CPP $CPPFLAGS'
2643 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2644 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2645 cross_compiling=$ac_cv_prog_cc_cross
2646
2647 cat > conftest.$ac_ext << EOF
2648
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651
2652 main(){return(0);}
2653 EOF
2654 if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2655   ac_cv_prog_cc_works=yes
2656   # If we can't run a trivial program, we are probably using a cross compiler.
2657   if (./conftest; exit) 2>/dev/null; then
2658     ac_cv_prog_cc_cross=no
2659   else
2660     ac_cv_prog_cc_cross=yes
2661   fi
2662 else
2663   echo "configure: failed program was:" >&5
2664   cat conftest.$ac_ext >&5
2665   ac_cv_prog_cc_works=no
2666 fi
2667 rm -fr conftest*
2668 ac_ext=c
2669 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2670 ac_cpp='$CPP $CPPFLAGS'
2671 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2672 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2673 cross_compiling=$ac_cv_prog_cc_cross
2674
2675 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2676 if test $ac_cv_prog_cc_works = no; then
2677   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2678 fi
2679 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2680 echo "configure:2681: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2681 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2682 cross_compiling=$ac_cv_prog_cc_cross
2683
2684 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2685 echo "configure:2686: checking whether we are using GNU C" >&5
2686 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2687   echo $ac_n "(cached) $ac_c" 1>&6
2688 else
2689   cat > conftest.c <<EOF
2690 #ifdef __GNUC__
2691   yes;
2692 #endif
2693 EOF
2694 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2695   ac_cv_prog_gcc=yes
2696 else
2697   ac_cv_prog_gcc=no
2698 fi
2699 fi
2700
2701 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2702
2703 if test $ac_cv_prog_gcc = yes; then
2704   GCC=yes
2705 else
2706   GCC=
2707 fi
2708
2709 ac_test_CFLAGS="${CFLAGS+set}"
2710 ac_save_CFLAGS="$CFLAGS"
2711 CFLAGS=
2712 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2713 echo "configure:2714: checking whether ${CC-cc} accepts -g" >&5
2714 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2715   echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717   echo 'void f(){}' > conftest.c
2718 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2719   ac_cv_prog_cc_g=yes
2720 else
2721   ac_cv_prog_cc_g=no
2722 fi
2723 rm -f conftest*
2724
2725 fi
2726
2727 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2728 if test "$ac_test_CFLAGS" = set; then
2729   CFLAGS="$ac_save_CFLAGS"
2730 elif test $ac_cv_prog_cc_g = yes; then
2731   if test "$GCC" = yes; then
2732     CFLAGS="-g -O2"
2733   else
2734     CFLAGS="-g"
2735   fi
2736 else
2737   if test "$GCC" = yes; then
2738     CFLAGS="-O2"
2739   else
2740     CFLAGS=
2741   fi
2742 fi
2743
2744 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2745 if test "${with_gnu_ld+set}" = set; then
2746   withval="$with_gnu_ld"
2747   test "$withval" = no || with_gnu_ld=yes
2748 else
2749   with_gnu_ld=no
2750 fi
2751
2752 ac_prog=ld
2753 if test "$ac_cv_prog_gcc" = yes; then
2754   # Check if gcc -print-prog-name=ld gives a path.
2755   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2756 echo "configure:2757: checking for ld used by GCC" >&5
2757   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2758   case "$ac_prog" in
2759     # Accept absolute paths.
2760     [\\/]* | [A-Za-z]:[\\/]*)
2761       re_direlt='/[^/][^/]*/\.\./'
2762       # Canonicalize the path of ld
2763       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2764       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2765         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2766       done
2767       test -z "$LD" && LD="$ac_prog"
2768       ;;
2769   "")
2770     # If it fails, then pretend we aren't using GCC.
2771     ac_prog=ld
2772     ;;
2773   *)
2774     # If it is relative, then search for the first ld in PATH.
2775     with_gnu_ld=unknown
2776     ;;
2777   esac
2778 elif test "$with_gnu_ld" = yes; then
2779   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2780 echo "configure:2781: checking for GNU ld" >&5
2781 else
2782   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2783 echo "configure:2784: checking for non-GNU ld" >&5
2784 fi
2785 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2786   echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788   if test -z "$LD"; then
2789   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2790   for ac_dir in $PATH; do
2791     test -z "$ac_dir" && ac_dir=.
2792     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2793       ac_cv_path_LD="$ac_dir/$ac_prog"
2794       # Check to see if the program is GNU ld.  I'd rather use --version,
2795       # but apparently some GNU ld's only accept -v.
2796       # Break only if it was the GNU/non-GNU ld that we prefer.
2797       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2798         test "$with_gnu_ld" != no && break
2799       else
2800         test "$with_gnu_ld" != yes && break
2801       fi
2802     fi
2803   done
2804   IFS="$ac_save_ifs"
2805 else
2806   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2807 fi
2808 fi
2809
2810 LD="$ac_cv_path_LD"
2811 if test -n "$LD"; then
2812   echo "$ac_t""$LD" 1>&6
2813 else
2814   echo "$ac_t""no" 1>&6
2815 fi
2816 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2817
2818 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2819 echo "configure:2820: checking if the linker ($LD) is GNU ld" >&5
2820 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2821   echo $ac_n "(cached) $ac_c" 1>&6
2822 else
2823   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2824 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2825   ac_cv_prog_gnu_ld=yes
2826 else
2827   ac_cv_prog_gnu_ld=no
2828 fi
2829 fi
2830
2831 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2832
2833
2834 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2835 echo "configure:2836: checking for BSD-compatible nm" >&5
2836 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2837   echo $ac_n "(cached) $ac_c" 1>&6
2838 else
2839   if test -n "$NM"; then
2840   # Let the user override the test.
2841   ac_cv_path_NM="$NM"
2842 else
2843   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2844   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2845     test -z "$ac_dir" && ac_dir=.
2846     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2847       # Check to see if the nm accepts a BSD-compat flag.
2848       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2849       #   nm: unknown option "B" ignored
2850       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2851         ac_cv_path_NM="$ac_dir/nm -B"
2852         break
2853       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2854         ac_cv_path_NM="$ac_dir/nm -p"
2855         break
2856       else
2857         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2858         continue # so that we can try to find one that supports BSD flags
2859       fi
2860     fi
2861   done
2862   IFS="$ac_save_ifs"
2863   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2864 fi
2865 fi
2866
2867 NM="$ac_cv_path_NM"
2868 echo "$ac_t""$NM" 1>&6
2869
2870
2871 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2872 echo "configure:2873: checking whether ln -s works" >&5
2873 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2874   echo $ac_n "(cached) $ac_c" 1>&6
2875 else
2876   rm -f conftestdata
2877 if ln -s X conftestdata 2>/dev/null
2878 then
2879   rm -f conftestdata
2880   ac_cv_prog_LN_S="ln -s"
2881 else
2882   ac_cv_prog_LN_S=ln
2883 fi
2884 fi
2885 LN_S="$ac_cv_prog_LN_S"
2886 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2887   echo "$ac_t""yes" 1>&6
2888 else
2889   echo "$ac_t""no" 1>&6
2890 fi
2891
2892
2893 # Check for any special flags to pass to ltconfig.
2894 libtool_flags="--cache-file=$cache_file"
2895 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2896 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2897 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2898 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2899 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2900 libtool_flags="$libtool_flags --enable-dlopen"
2901
2902 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2903 if test "${enable_libtool_lock+set}" = set; then
2904   enableval="$enable_libtool_lock"
2905   :
2906 fi
2907
2908 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2909 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2910
2911 # Some flags need to be propagated to the compiler or linker for good
2912 # libtool support.
2913 case "$host" in
2914 *-*-irix6*)
2915   # Find out which ABI we are using.
2916   echo '#line 2917 "configure"' > conftest.$ac_ext
2917   if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918     case "`/usr/bin/file conftest.o`" in
2919     *32-bit*)
2920       LD="${LD-ld} -32"
2921       ;;
2922     *N32*)
2923       LD="${LD-ld} -n32"
2924       ;;
2925     *64-bit*)
2926       LD="${LD-ld} -64"
2927       ;;
2928     esac
2929   fi
2930   rm -rf conftest*
2931   ;;
2932
2933 *-*-sco3.2v5*)
2934   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2935   SAVE_CFLAGS="$CFLAGS"
2936   CFLAGS="$CFLAGS -belf"
2937   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2938 echo "configure:2939: checking whether the C compiler needs -belf" >&5
2939 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2940   echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942   cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945
2946 int main() {
2947
2948 ; return 0; }
2949 EOF
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2951   rm -rf conftest*
2952   lt_cv_cc_needs_belf=yes
2953 else
2954   echo "configure: failed program was:" >&5
2955   cat conftest.$ac_ext >&5
2956   rm -rf conftest*
2957   lt_cv_cc_needs_belf=no
2958 fi
2959 rm -f conftest*
2960 fi
2961
2962 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2963   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2964     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2965     CFLAGS="$SAVE_CFLAGS"
2966   fi
2967   ;;
2968
2969
2970 esac
2971
2972
2973 # Save cache, so that ltconfig can load it
2974
2975
2976 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2977 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2978 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2979 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2980 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2981 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2982 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2983 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2984
2985 # Reload cache, that may have been modified by ltconfig
2986
2987
2988 # This can be used to rebuild libtool when needed
2989 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2990
2991 # Always use our own libtool.
2992 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2993
2994 # Redirect the config.log output again, so that the ltconfig log is not
2995 # clobbered by the next message.
2996 exec 5>>./config.log
2997
2998
2999 for ac_prog in mawk gawk nawk awk
3000 do
3001 # Extract the first word of "$ac_prog", so it can be a program name with args.
3002 set dummy $ac_prog; ac_word=$2
3003 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3004 echo "configure:3005: checking for $ac_word" >&5
3005 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3006   echo $ac_n "(cached) $ac_c" 1>&6
3007 else
3008   if test -n "$AWK"; then
3009   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3010 else
3011   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3012   ac_dummy="$PATH"
3013   for ac_dir in $ac_dummy; do
3014     test -z "$ac_dir" && ac_dir=.
3015     if test -f $ac_dir/$ac_word; then
3016       ac_cv_prog_AWK="$ac_prog"
3017       break
3018     fi
3019   done
3020   IFS="$ac_save_ifs"
3021 fi
3022 fi
3023 AWK="$ac_cv_prog_AWK"
3024 if test -n "$AWK"; then
3025   echo "$ac_t""$AWK" 1>&6
3026 else
3027   echo "$ac_t""no" 1>&6
3028 fi
3029
3030 test -n "$AWK" && break
3031 done
3032
3033 # test for ln hardlink support
3034 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3035 echo "configure:3036: checking whether ln works" >&5
3036 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3037   echo $ac_n "(cached) $ac_c" 1>&6
3038 else
3039   rm -f conftest.src conftest.dst
3040 echo "conftest" > conftest.src
3041 if ln conftest.src conftest.dst 2>/dev/null
3042 then
3043   ol_cv_prog_LN_H="ln"
3044 else
3045   ol_cv_prog_LN_H="cp"
3046 fi
3047 rm -f conftest.src conftest.dst
3048
3049 fi
3050 LN_H="$ol_cv_prog_LN_H"
3051 if test "$ol_cv_prog_LN_H" = "ln"; then
3052         echo "$ac_t""yes" 1>&6
3053 else
3054         echo "$ac_t""no" 1>&6
3055 fi
3056
3057 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3058 echo "configure:3059: checking whether ln -s works" >&5
3059 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   rm -f conftestdata
3063 if ln -s X conftestdata 2>/dev/null
3064 then
3065   rm -f conftestdata
3066   ac_cv_prog_LN_S="ln -s"
3067 else
3068   ac_cv_prog_LN_S=ln
3069 fi
3070 fi
3071 LN_S="$ac_cv_prog_LN_S"
3072 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3073   echo "$ac_t""yes" 1>&6
3074 else
3075   echo "$ac_t""no" 1>&6
3076 fi
3077
3078
3079 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3080         LN_S="$LN_H"
3081 fi
3082
3083 # Extract the first word of "sendmail", so it can be a program name with args.
3084 set dummy sendmail; ac_word=$2
3085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3086 echo "configure:3087: checking for $ac_word" >&5
3087 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   case "$SENDMAIL" in
3091   /*)
3092   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3093   ;;
3094   ?:/*)                  
3095   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3096   ;;
3097   *)
3098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3099   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3100   for ac_dir in $ac_dummy; do 
3101     test -z "$ac_dir" && ac_dir=.
3102     if test -f $ac_dir/$ac_word; then
3103       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3104       break
3105     fi
3106   done
3107   IFS="$ac_save_ifs"
3108   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3109   ;;
3110 esac
3111 fi
3112 SENDMAIL="$ac_cv_path_SENDMAIL"
3113 if test -n "$SENDMAIL"; then
3114   echo "$ac_t""$SENDMAIL" 1>&6
3115 else
3116   echo "$ac_t""no" 1>&6
3117 fi
3118
3119 # Extract the first word of "vi", so it can be a program name with args.
3120 set dummy vi; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   case "$EDITOR" in
3127   /*)
3128   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3129   ;;
3130   ?:/*)                  
3131   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3132   ;;
3133   *)
3134   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3135   ac_dummy="$PATH:/usr/ucb"
3136   for ac_dir in $ac_dummy; do 
3137     test -z "$ac_dir" && ac_dir=.
3138     if test -f $ac_dir/$ac_word; then
3139       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3140       break
3141     fi
3142   done
3143   IFS="$ac_save_ifs"
3144   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3145   ;;
3146 esac
3147 fi
3148 EDITOR="$ac_cv_path_EDITOR"
3149 if test -n "$EDITOR"; then
3150   echo "$ac_t""$EDITOR" 1>&6
3151 else
3152   echo "$ac_t""no" 1>&6
3153 fi
3154
3155 # Extract the first word of "finger", so it can be a program name with args.
3156 set dummy finger; ac_word=$2
3157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3158 echo "configure:3159: checking for $ac_word" >&5
3159 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3160   echo $ac_n "(cached) $ac_c" 1>&6
3161 else
3162   case "$FINGER" in
3163   /*)
3164   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3165   ;;
3166   ?:/*)                  
3167   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3168   ;;
3169   *)
3170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3171   ac_dummy="$PATH:/usr/ucb"
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_path_FINGER="$ac_dir/$ac_word"
3176       break
3177     fi
3178   done
3179   IFS="$ac_save_ifs"
3180   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3181   ;;
3182 esac
3183 fi
3184 FINGER="$ac_cv_path_FINGER"
3185 if test -n "$FINGER"; then
3186   echo "$ac_t""$FINGER" 1>&6
3187 else
3188   echo "$ac_t""no" 1>&6
3189 fi
3190
3191
3192 ol_link_perl=no
3193 if test $ol_enable_perl != no ; then
3194         # Extract the first word of "perl", so it can be a program name with args.
3195 set dummy perl; ac_word=$2
3196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3197 echo "configure:3198: checking for $ac_word" >&5
3198 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3199   echo $ac_n "(cached) $ac_c" 1>&6
3200 else
3201   case "$PERLBIN" in
3202   /*)
3203   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3204   ;;
3205   ?:/*)                  
3206   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3207   ;;
3208   *)
3209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3210   ac_dummy="$PATH"
3211   for ac_dir in $ac_dummy; do 
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3215       break
3216     fi
3217   done
3218   IFS="$ac_save_ifs"
3219   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3220   ;;
3221 esac
3222 fi
3223 PERLBIN="$ac_cv_path_PERLBIN"
3224 if test -n "$PERLBIN"; then
3225   echo "$ac_t""$PERLBIN" 1>&6
3226 else
3227   echo "$ac_t""no" 1>&6
3228 fi
3229
3230
3231         if test "no$PERLBIN" = "no" ; then
3232                 if test $ol_enable_perl = yes ; then
3233                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3234                 fi
3235
3236         else
3237                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3238                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3239
3240                                 ol_link_perl=yes
3241         fi
3242 fi
3243
3244 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3245 echo "configure:3246: checking how to run the C preprocessor" >&5
3246 # On Suns, sometimes $CPP names a directory.
3247 if test -n "$CPP" && test -d "$CPP"; then
3248   CPP=
3249 fi
3250 if test -z "$CPP"; then
3251 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254     # This must be in double quotes, not single quotes, because CPP may get
3255   # substituted into the Makefile and "${CC-cc}" will confuse make.
3256   CPP="${CC-cc} -E"
3257   # On the NeXT, cc -E runs the code through the compiler's parser,
3258   # not just through cpp.
3259   cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 #include <assert.h>
3263 Syntax Error
3264 EOF
3265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3266 { (eval echo configure:3267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3268 if test -z "$ac_err"; then
3269   :
3270 else
3271   echo "$ac_err" >&5
3272   echo "configure: failed program was:" >&5
3273   cat conftest.$ac_ext >&5
3274   rm -rf conftest*
3275   CPP="${CC-cc} -E -traditional-cpp"
3276   cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 #include <assert.h>
3280 Syntax Error
3281 EOF
3282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3283 { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3285 if test -z "$ac_err"; then
3286   :
3287 else
3288   echo "$ac_err" >&5
3289   echo "configure: failed program was:" >&5
3290   cat conftest.$ac_ext >&5
3291   rm -rf conftest*
3292   CPP="${CC-cc} -nologo -E"
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <assert.h>
3297 Syntax Error
3298 EOF
3299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3300 { (eval echo configure:3301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3302 if test -z "$ac_err"; then
3303   :
3304 else
3305   echo "$ac_err" >&5
3306   echo "configure: failed program was:" >&5
3307   cat conftest.$ac_ext >&5
3308   rm -rf conftest*
3309   CPP=/lib/cpp
3310 fi
3311 rm -f conftest*
3312 fi
3313 rm -f conftest*
3314 fi
3315 rm -f conftest*
3316   ac_cv_prog_CPP="$CPP"
3317 fi
3318   CPP="$ac_cv_prog_CPP"
3319 else
3320   ac_cv_prog_CPP="$CPP"
3321 fi
3322 echo "$ac_t""$CPP" 1>&6
3323
3324
3325 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3326         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3327
3328 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3329         echo "configure: warning: programs compiled here do run here..." 1>&2
3330         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3331
3332 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3333         echo "configure: warning: programs compiled here do not run here..." 1>&2
3334         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3335 fi
3336
3337 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3338 echo "configure:3339: checking for AIX" >&5
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 #ifdef _AIX
3343   yes
3344 #endif
3345
3346 EOF
3347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3348   egrep "yes" >/dev/null 2>&1; then
3349   rm -rf conftest*
3350   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3351 #define _ALL_SOURCE 1
3352 EOF
3353
3354 else
3355   rm -rf conftest*
3356   echo "$ac_t""no" 1>&6
3357 fi
3358 rm -f conftest*
3359
3360
3361 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3362 echo "configure:3363: checking for POSIXized ISC" >&5
3363 if test -d /etc/conf/kconfig.d &&
3364   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3365 then
3366   echo "$ac_t""yes" 1>&6
3367   ISC=yes # If later tests want to check for ISC.
3368   cat >> confdefs.h <<\EOF
3369 #define _POSIX_SOURCE 1
3370 EOF
3371
3372   if test "$GCC" = yes; then
3373     CC="$CC -posix"
3374   else
3375     CC="$CC -Xp"
3376   fi
3377 else
3378   echo "$ac_t""no" 1>&6
3379   ISC=
3380 fi
3381
3382 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3383 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3384 echo "configure:3385: checking for minix/config.h" >&5
3385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <minix/config.h>
3392 EOF
3393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3394 { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3396 if test -z "$ac_err"; then
3397   rm -rf conftest*
3398   eval "ac_cv_header_$ac_safe=yes"
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   eval "ac_cv_header_$ac_safe=no"
3405 fi
3406 rm -f conftest*
3407 fi
3408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3409   echo "$ac_t""yes" 1>&6
3410   MINIX=yes
3411 else
3412   echo "$ac_t""no" 1>&6
3413 MINIX=
3414 fi
3415
3416 if test "$MINIX" = yes; then
3417   cat >> confdefs.h <<\EOF
3418 #define _POSIX_SOURCE 1
3419 EOF
3420
3421   cat >> confdefs.h <<\EOF
3422 #define _POSIX_1_SOURCE 2
3423 EOF
3424
3425   cat >> confdefs.h <<\EOF
3426 #define _MINIX 1
3427 EOF
3428
3429 fi
3430
3431
3432 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3433 echo "configure:3434: checking for Cygwin environment" >&5
3434 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3435   echo $ac_n "(cached) $ac_c" 1>&6
3436 else
3437   cat > conftest.$ac_ext <<EOF
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440
3441 int main() {
3442
3443 #ifndef __CYGWIN__
3444 #define __CYGWIN__ __CYGWIN32__
3445 #endif
3446 return __CYGWIN__;
3447 ; return 0; }
3448 EOF
3449 if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3450   rm -rf conftest*
3451   ac_cv_cygwin=yes
3452 else
3453   echo "configure: failed program was:" >&5
3454   cat conftest.$ac_ext >&5
3455   rm -rf conftest*
3456   ac_cv_cygwin=no
3457 fi
3458 rm -f conftest*
3459 fi
3460
3461 echo "$ac_t""$ac_cv_cygwin" 1>&6
3462 CYGWIN=
3463 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3464 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3465 echo "configure:3466: checking for mingw32 environment" >&5
3466 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3467   echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469   cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3472
3473 int main() {
3474 return __MINGW32__;
3475 ; return 0; }
3476 EOF
3477 if { (eval echo configure:3478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3478   rm -rf conftest*
3479   ac_cv_mingw32=yes
3480 else
3481   echo "configure: failed program was:" >&5
3482   cat conftest.$ac_ext >&5
3483   rm -rf conftest*
3484   ac_cv_mingw32=no
3485 fi
3486 rm -f conftest*
3487 fi
3488
3489 echo "$ac_t""$ac_cv_mingw32" 1>&6
3490 MINGW32=
3491 test "$ac_cv_mingw32" = yes && MINGW32=yes
3492 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3493 echo "configure:3494: checking for EMX OS/2 environment" >&5
3494 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3495   echo $ac_n "(cached) $ac_c" 1>&6
3496 else
3497   cat > conftest.$ac_ext <<EOF
3498 #line 3499 "configure"
3499 #include "confdefs.h"
3500
3501 int main() {
3502 return __EMX__;
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506   rm -rf conftest*
3507   ac_cv_emxos2=yes
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   ac_cv_emxos2=no
3513 fi
3514 rm -f conftest*
3515 fi
3516
3517 echo "$ac_t""$ac_cv_emxos2" 1>&6
3518 EMXOS2=
3519 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3520
3521
3522
3523 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3524 echo "configure:3525: checking for executable suffix" >&5
3525 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3529   ac_cv_exeext=.exe
3530 else
3531   rm -f conftest*
3532   echo 'int main () { return 0; }' > conftest.$ac_ext
3533   ac_cv_exeext=
3534   if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3535     for file in conftest.*; do
3536       case $file in
3537       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3538       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3539       esac
3540     done
3541   else
3542     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3543   fi
3544   rm -f conftest*
3545   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3546 fi
3547 fi
3548
3549 EXEEXT=""
3550 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3551 echo "$ac_t""${ac_cv_exeext}" 1>&6
3552 ac_exeext=$EXEEXT
3553
3554 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3555 echo "configure:3556: checking for object suffix" >&5
3556 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3557   echo $ac_n "(cached) $ac_c" 1>&6
3558 else
3559   rm -f conftest*
3560 echo 'int i = 1;' > conftest.$ac_ext
3561 if { (eval echo configure:3562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3562   for ac_file in conftest.*; do
3563     case $ac_file in
3564     *.c) ;;
3565     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3566     esac
3567   done
3568 else
3569   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3570 fi
3571 rm -f conftest*
3572 fi
3573
3574 echo "$ac_t""$ac_cv_objext" 1>&6
3575 OBJEXT=$ac_cv_objext
3576 ac_objext=$ac_cv_objext
3577
3578
3579 cat >> confdefs.h <<EOF
3580 #define EXEEXT "${EXEEXT}"
3581 EOF
3582
3583
3584 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3585 echo "configure:3586: checking for be_app in -lbe" >&5
3586 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3588   echo $ac_n "(cached) $ac_c" 1>&6
3589 else
3590   ac_save_LIBS="$LIBS"
3591 LIBS="-lbe -lroot -lnet $LIBS"
3592 cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 /* Override any gcc2 internal prototype to avoid an error.  */
3596 /* We use char because int might match the return type of a gcc2
3597     builtin and then its argument prototype would still apply.  */
3598 char be_app();
3599
3600 int main() {
3601 be_app()
3602 ; return 0; }
3603 EOF
3604 if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3605   rm -rf conftest*
3606   eval "ac_cv_lib_$ac_lib_var=yes"
3607 else
3608   echo "configure: failed program was:" >&5
3609   cat conftest.$ac_ext >&5
3610   rm -rf conftest*
3611   eval "ac_cv_lib_$ac_lib_var=no"
3612 fi
3613 rm -f conftest*
3614 LIBS="$ac_save_LIBS"
3615
3616 fi
3617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3618   echo "$ac_t""yes" 1>&6
3619   LIBS="$LIBS -lbe -lroot -lnet"
3620 else
3621   echo "$ac_t""no" 1>&6
3622 :
3623 fi
3624
3625
3626
3627
3628
3629 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3630 echo "configure:3631: checking for ${CC-cc} option to accept ANSI C" >&5
3631 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   am_cv_prog_cc_stdc=no
3635 ac_save_CC="$CC"
3636 # Don't try gcc -ansi; that turns off useful extensions and
3637 # breaks some systems' header files.
3638 # AIX                   -qlanglvl=ansi
3639 # Ultrix and OSF/1      -std1
3640 # HP-UX 10.20 and later -Ae
3641 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3642 # SVR4                  -Xc -D__EXTENSIONS__
3643 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3644 do
3645   CC="$ac_save_CC $ac_arg"
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 #include <stdarg.h>
3650 #include <stdio.h>
3651 #include <sys/types.h>
3652 #include <sys/stat.h>
3653 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3654 struct buf { int x; };
3655 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3656 static char *e (p, i)
3657      char **p;
3658      int i;
3659 {
3660   return p[i];
3661 }
3662 static char *f (char * (*g) (char **, int), char **p, ...)
3663 {
3664   char *s;
3665   va_list v;
3666   va_start (v,p);
3667   s = g (p, va_arg (v,int));
3668   va_end (v);
3669   return s;
3670 }
3671 int test (int i, double x);
3672 struct s1 {int (*f) (int a);};
3673 struct s2 {int (*f) (double a);};
3674 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3675 int argc;
3676 char **argv;
3677
3678 int main() {
3679
3680 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3681
3682 ; return 0; }
3683 EOF
3684 if { (eval echo configure:3685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3685   rm -rf conftest*
3686   am_cv_prog_cc_stdc="$ac_arg"; break
3687 else
3688   echo "configure: failed program was:" >&5
3689   cat conftest.$ac_ext >&5
3690 fi
3691 rm -f conftest*
3692 done
3693 CC="$ac_save_CC"
3694
3695 fi
3696
3697 if test -z "$am_cv_prog_cc_stdc"; then
3698   echo "$ac_t""none needed" 1>&6
3699 else
3700   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3701 fi
3702 case "x$am_cv_prog_cc_stdc" in
3703   x|xno) ;;
3704   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3705 esac
3706
3707 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3708         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3709 fi
3710
3711 # test for make depend flag
3712 OL_MKDEP=
3713 OL_MKDEP_FLAGS=
3714 if test -z "${MKDEP}"; then
3715         OL_MKDEP="${CC-cc}"
3716         if test -z "${MKDEP_FLAGS}"; then
3717                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3718 echo "configure:3719: checking for ${OL_MKDEP} depend flag" >&5
3719 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3720   echo $ac_n "(cached) $ac_c" 1>&6
3721 else
3722   
3723                         ol_cv_mkdep=no
3724                         for flag in "-M" "-xM"; do
3725                                 cat > conftest.c <<EOF
3726  noCode;
3727 EOF
3728                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3729                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3730                                 then
3731                                         if test ! -f conftest."${ac_object}" ; then
3732                                                 ol_cv_mkdep=$flag
3733                                                 OL_MKDEP_FLAGS="$flag"
3734                                                 break
3735                                         fi
3736                                 fi
3737                         done
3738                         rm -f conftest*
3739                 
3740 fi
3741
3742 echo "$ac_t""$ol_cv_mkdep" 1>&6
3743         else
3744                 cc_cv_mkdep=yes
3745                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3746         fi
3747 else
3748         cc_cv_mkdep=yes
3749         OL_MKDEP="${MKDEP}"
3750         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3751 fi
3752
3753
3754
3755 if test "${ol_cv_mkdep}" = no ; then
3756         # this will soon become an error
3757         echo "configure: warning: do not know how to generate dependencies" 1>&2
3758 fi
3759
3760 ol_link_modules=no
3761 if test $ol_enable_modules != no ; then
3762         for ac_hdr in ltdl.h
3763 do
3764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3766 echo "configure:3767: checking for $ac_hdr" >&5
3767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773 #include <$ac_hdr>
3774 EOF
3775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3776 { (eval echo configure:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3778 if test -z "$ac_err"; then
3779   rm -rf conftest*
3780   eval "ac_cv_header_$ac_safe=yes"
3781 else
3782   echo "$ac_err" >&5
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   eval "ac_cv_header_$ac_safe=no"
3787 fi
3788 rm -f conftest*
3789 fi
3790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3791   echo "$ac_t""yes" 1>&6
3792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3793   cat >> confdefs.h <<EOF
3794 #define $ac_tr_hdr 1
3795 EOF
3796  
3797 else
3798   echo "$ac_t""no" 1>&6
3799 fi
3800 done
3801
3802
3803         if test $ac_cv_header_ltdl_h = no ; then
3804                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3805
3806         fi
3807
3808         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3809 echo "configure:3810: checking for lt_dlinit in -lltdl" >&5
3810 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   ac_save_LIBS="$LIBS"
3815 LIBS="-lltdl  $LIBS"
3816 cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819 /* Override any gcc2 internal prototype to avoid an error.  */
3820 /* We use char because int might match the return type of a gcc2
3821     builtin and then its argument prototype would still apply.  */
3822 char lt_dlinit();
3823
3824 int main() {
3825 lt_dlinit()
3826 ; return 0; }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3829   rm -rf conftest*
3830   eval "ac_cv_lib_$ac_lib_var=yes"
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   eval "ac_cv_lib_$ac_lib_var=no"
3836 fi
3837 rm -f conftest*
3838 LIBS="$ac_save_LIBS"
3839
3840 fi
3841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3844     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3845   cat >> confdefs.h <<EOF
3846 #define $ac_tr_lib 1
3847 EOF
3848
3849   LIBS="-lltdl $LIBS"
3850
3851 else
3852   echo "$ac_t""no" 1>&6
3853 fi
3854
3855         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3856                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3857         fi
3858         ol_link_modules=yes
3859 else
3860         ol_with_bdb2_module=static
3861         ol_with_ldap_module=static
3862         ol_with_ldbm_module=static
3863         ol_with_passwd_module=static
3864         ol_with_perl_module=static
3865         ol_with_shell_module=static
3866         ol_with_tcl_module=static
3867 fi
3868
3869 # test for EBCDIC
3870 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3871 echo "configure:3872: checking for EBCDIC" >&5
3872 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3873   echo $ac_n "(cached) $ac_c" 1>&6
3874 else
3875   
3876         cat > conftest.$ac_ext <<EOF
3877 #line 3878 "configure"
3878 #include "confdefs.h"
3879
3880 #if !('M' == 0xd4)
3881 #include <__ASCII__/generate_error.h>
3882 #endif
3883
3884 EOF
3885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3886 { (eval echo configure:3887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3888 if test -z "$ac_err"; then
3889   rm -rf conftest*
3890   ol_cv_cpp_ebcdic=yes
3891 else
3892   echo "$ac_err" >&5
3893   echo "configure: failed program was:" >&5
3894   cat conftest.$ac_ext >&5
3895   rm -rf conftest*
3896   ol_cv_cpp_ebcdic=no
3897 fi
3898 rm -f conftest*
3899 fi
3900
3901 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3902 if test $ol_cv_cpp_ebcdic = yes ; then
3903         cat >> confdefs.h <<\EOF
3904 #define HAVE_EBCDIC 1
3905 EOF
3906
3907 fi
3908
3909 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3910 echo "configure:3911: checking for ANSI C header files" >&5
3911 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 #include <stdlib.h>
3918 #include <stdarg.h>
3919 #include <string.h>
3920 #include <float.h>
3921 EOF
3922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3923 { (eval echo configure:3924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3925 if test -z "$ac_err"; then
3926   rm -rf conftest*
3927   ol_cv_header_stdc=yes
3928 else
3929   echo "$ac_err" >&5
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   ol_cv_header_stdc=no
3934 fi
3935 rm -f conftest*
3936
3937 if test $ol_cv_header_stdc = yes; then
3938   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3939 cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <string.h>
3943 EOF
3944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3945   egrep "memchr" >/dev/null 2>&1; then
3946   :
3947 else
3948   rm -rf conftest*
3949   ol_cv_header_stdc=no
3950 fi
3951 rm -f conftest*
3952
3953 fi
3954
3955 if test $ol_cv_header_stdc = yes; then
3956   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 #include <stdlib.h>
3961 EOF
3962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3963   egrep "free" >/dev/null 2>&1; then
3964   :
3965 else
3966   rm -rf conftest*
3967   ol_cv_header_stdc=no
3968 fi
3969 rm -f conftest*
3970
3971 fi
3972
3973 if test $ol_cv_header_stdc = yes; then
3974   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3975 if test "$cross_compiling" = yes; then
3976   :
3977 else
3978   cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 #include <ctype.h>
3982 #ifndef HAVE_EBCDIC
3983 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3984 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3985 #else
3986 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3987                 || ('j' <= (c) && (c) <= 'r') \
3988                 || ('s' <= (c) && (c) <= 'z'))
3989 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3990 #endif
3991 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3992 int main () { int i; for (i = 0; i < 256; i++)
3993 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3994 exit (0); }
3995
3996 EOF
3997 if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3998 then
3999   :
4000 else
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003   rm -fr conftest*
4004   ol_cv_header_stdc=no
4005 fi
4006 rm -fr conftest*
4007 fi
4008
4009 fi
4010 fi
4011
4012 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4013 if test $ol_cv_header_stdc = yes; then
4014   cat >> confdefs.h <<\EOF
4015 #define STDC_HEADERS 1
4016 EOF
4017
4018 fi
4019 ac_cv_header_stdc=disable
4020
4021
4022 if test $ol_cv_header_stdc != yes; then
4023         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4024 fi
4025
4026 ac_header_dirent=no
4027 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4028 do
4029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4030 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4031 echo "configure:4032: checking for $ac_hdr that defines DIR" >&5
4032 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4033   echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035   cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <sys/types.h>
4039 #include <$ac_hdr>
4040 int main() {
4041 DIR *dirp = 0;
4042 ; return 0; }
4043 EOF
4044 if { (eval echo configure:4045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4045   rm -rf conftest*
4046   eval "ac_cv_header_dirent_$ac_safe=yes"
4047 else
4048   echo "configure: failed program was:" >&5
4049   cat conftest.$ac_ext >&5
4050   rm -rf conftest*
4051   eval "ac_cv_header_dirent_$ac_safe=no"
4052 fi
4053 rm -f conftest*
4054 fi
4055 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4056   echo "$ac_t""yes" 1>&6
4057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4058   cat >> confdefs.h <<EOF
4059 #define $ac_tr_hdr 1
4060 EOF
4061  ac_header_dirent=$ac_hdr; break
4062 else
4063   echo "$ac_t""no" 1>&6
4064 fi
4065 done
4066 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4067 if test $ac_header_dirent = dirent.h; then
4068 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4069 echo "configure:4070: checking for opendir in -ldir" >&5
4070 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4072   echo $ac_n "(cached) $ac_c" 1>&6
4073 else
4074   ac_save_LIBS="$LIBS"
4075 LIBS="-ldir  $LIBS"
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 /* Override any gcc2 internal prototype to avoid an error.  */
4080 /* We use char because int might match the return type of a gcc2
4081     builtin and then its argument prototype would still apply.  */
4082 char opendir();
4083
4084 int main() {
4085 opendir()
4086 ; return 0; }
4087 EOF
4088 if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4089   rm -rf conftest*
4090   eval "ac_cv_lib_$ac_lib_var=yes"
4091 else
4092   echo "configure: failed program was:" >&5
4093   cat conftest.$ac_ext >&5
4094   rm -rf conftest*
4095   eval "ac_cv_lib_$ac_lib_var=no"
4096 fi
4097 rm -f conftest*
4098 LIBS="$ac_save_LIBS"
4099
4100 fi
4101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4102   echo "$ac_t""yes" 1>&6
4103   LIBS="$LIBS -ldir"
4104 else
4105   echo "$ac_t""no" 1>&6
4106 fi
4107
4108 else
4109 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4110 echo "configure:4111: checking for opendir in -lx" >&5
4111 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   ac_save_LIBS="$LIBS"
4116 LIBS="-lx  $LIBS"
4117 cat > conftest.$ac_ext <<EOF
4118 #line 4119 "configure"
4119 #include "confdefs.h"
4120 /* Override any gcc2 internal prototype to avoid an error.  */
4121 /* We use char because int might match the return type of a gcc2
4122     builtin and then its argument prototype would still apply.  */
4123 char opendir();
4124
4125 int main() {
4126 opendir()
4127 ; return 0; }
4128 EOF
4129 if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4130   rm -rf conftest*
4131   eval "ac_cv_lib_$ac_lib_var=yes"
4132 else
4133   echo "configure: failed program was:" >&5
4134   cat conftest.$ac_ext >&5
4135   rm -rf conftest*
4136   eval "ac_cv_lib_$ac_lib_var=no"
4137 fi
4138 rm -f conftest*
4139 LIBS="$ac_save_LIBS"
4140
4141 fi
4142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4143   echo "$ac_t""yes" 1>&6
4144   LIBS="$LIBS -lx"
4145 else
4146   echo "$ac_t""no" 1>&6
4147 fi
4148
4149 fi
4150
4151 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4152 echo "configure:4153: checking for sys/wait.h that is POSIX.1 compatible" >&5
4153 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4154   echo $ac_n "(cached) $ac_c" 1>&6
4155 else
4156   cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 #include <sys/types.h>
4160 #include <sys/wait.h>
4161 #ifndef WEXITSTATUS
4162 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4163 #endif
4164 #ifndef WIFEXITED
4165 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4166 #endif
4167 int main() {
4168 int s;
4169 wait (&s);
4170 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4171 ; return 0; }
4172 EOF
4173 if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4174   rm -rf conftest*
4175   ac_cv_header_sys_wait_h=yes
4176 else
4177   echo "configure: failed program was:" >&5
4178   cat conftest.$ac_ext >&5
4179   rm -rf conftest*
4180   ac_cv_header_sys_wait_h=no
4181 fi
4182 rm -f conftest*
4183 fi
4184
4185 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4186 if test $ac_cv_header_sys_wait_h = yes; then
4187   cat >> confdefs.h <<\EOF
4188 #define HAVE_SYS_WAIT_H 1
4189 EOF
4190
4191 fi
4192
4193 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4194 echo "configure:4195: checking POSIX termios" >&5
4195 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4196   echo $ac_n "(cached) $ac_c" 1>&6
4197 else
4198   cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201 #include <sys/types.h>
4202 #include <unistd.h>
4203 #include <termios.h>
4204 int main() {
4205 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4206    tcgetattr(0, 0);
4207 ; return 0; }
4208 EOF
4209 if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4210   rm -rf conftest*
4211   am_cv_sys_posix_termios=yes
4212 else
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -rf conftest*
4216   am_cv_sys_posix_termios=no
4217 fi
4218 rm -f conftest*
4219 fi
4220
4221 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4222
4223
4224  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4225 echo "configure:4226: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4226 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4227   echo $ac_n "(cached) $ac_c" 1>&6
4228 else
4229   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4230
4231   gwinsz_in_termios_h=no
4232   if test $am_cv_sys_posix_termios = yes; then
4233     cat > conftest.$ac_ext <<EOF
4234 #line 4235 "configure"
4235 #include "confdefs.h"
4236 #include <sys/types.h>
4237 #     include <termios.h>
4238 #     ifdef TIOCGWINSZ
4239         yes
4240 #     endif
4241     
4242 EOF
4243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4244   egrep "yes" >/dev/null 2>&1; then
4245   rm -rf conftest*
4246   gwinsz_in_termios_h=yes
4247 fi
4248 rm -f conftest*
4249
4250   fi
4251
4252   if test $gwinsz_in_termios_h = no; then
4253     cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <sys/types.h>
4257 #     include <sys/ioctl.h>
4258 #     ifdef TIOCGWINSZ
4259         yes
4260 #     endif
4261     
4262 EOF
4263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4264   egrep "yes" >/dev/null 2>&1; then
4265   rm -rf conftest*
4266   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4267 fi
4268 rm -f conftest*
4269
4270   fi
4271   
4272 fi
4273
4274 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4275   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4276     cat >> confdefs.h <<\EOF
4277 #define GWINSZ_IN_SYS_IOCTL 1
4278 EOF
4279
4280   fi
4281
4282 if test $am_cv_sys_posix_termios = yes ; then
4283         cat >> confdefs.h <<\EOF
4284 #define HAVE_POSIX_TERMIOS 1
4285 EOF
4286
4287 fi
4288
4289 for ac_hdr in \
4290         arpa/inet.h             \
4291         arpa/nameser.h  \
4292         assert.h                \
4293         crypt.h                 \
4294         errno.h                 \
4295         fcntl.h                 \
4296         filio.h                 \
4297         getopt.h                \
4298         grp.h                   \
4299         libutil.h               \
4300         limits.h                \
4301         locale.h                \
4302         netinet/tcp.h   \
4303         malloc.h                \
4304         memory.h                \
4305         psap.h                  \
4306         pwd.h                   \
4307         resolv.h                \
4308         sgtty.h                 \
4309         shadow.h                \
4310         stddef.h                \
4311         string.h                \
4312         strings.h               \
4313         sysexits.h              \
4314         sys/file.h              \
4315         sys/filio.h             \
4316         sys/errno.h             \
4317         sys/ioctl.h             \
4318         sys/param.h             \
4319         sys/resource.h  \
4320         sys/select.h    \
4321         sys/socket.h    \
4322         sys/syslog.h    \
4323         sys/time.h              \
4324         sys/types.h             \
4325         syslog.h                \
4326         termios.h               \
4327         unistd.h                \
4328
4329 do
4330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4332 echo "configure:4333: checking for $ac_hdr" >&5
4333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339 #include <$ac_hdr>
4340 EOF
4341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4342 { (eval echo configure:4343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4344 if test -z "$ac_err"; then
4345   rm -rf conftest*
4346   eval "ac_cv_header_$ac_safe=yes"
4347 else
4348   echo "$ac_err" >&5
4349   echo "configure: failed program was:" >&5
4350   cat conftest.$ac_ext >&5
4351   rm -rf conftest*
4352   eval "ac_cv_header_$ac_safe=no"
4353 fi
4354 rm -f conftest*
4355 fi
4356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4357   echo "$ac_t""yes" 1>&6
4358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4359   cat >> confdefs.h <<EOF
4360 #define $ac_tr_hdr 1
4361 EOF
4362  
4363 else
4364   echo "$ac_t""no" 1>&6
4365 fi
4366 done
4367
4368
4369
4370
4371 echo $ac_n "checking for socket""... $ac_c" 1>&6
4372 echo "configure:4373: checking for socket" >&5
4373 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4374   echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376   cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379 /* System header to define __stub macros and hopefully few prototypes,
4380     which can conflict with char socket(); below.  */
4381 #include <assert.h>
4382 /* Override any gcc2 internal prototype to avoid an error.  */
4383 /* We use char because int might match the return type of a gcc2
4384     builtin and then its argument prototype would still apply.  */
4385 char socket();
4386 char (*f)();
4387
4388 int main() {
4389
4390 /* The GNU C library defines this for functions which it implements
4391     to always fail with ENOSYS.  Some functions are actually named
4392     something starting with __ and the normal name is an alias.  */
4393 #if defined (__stub_socket) || defined (__stub___socket)
4394 choke me
4395 #else
4396 f = socket;
4397 #endif
4398
4399 ; return 0; }
4400 EOF
4401 if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4402   rm -rf conftest*
4403   eval "ac_cv_func_socket=yes"
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407   rm -rf conftest*
4408   eval "ac_cv_func_socket=no"
4409 fi
4410 rm -f conftest*
4411 fi
4412
4413 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4414   echo "$ac_t""yes" 1>&6
4415   :
4416 else
4417   echo "$ac_t""no" 1>&6
4418         
4419         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4420 echo "configure:4421: checking for main in -lsocket" >&5
4421 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4423   echo $ac_n "(cached) $ac_c" 1>&6
4424 else
4425   ac_save_LIBS="$LIBS"
4426 LIBS="-lsocket  $LIBS"
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430
4431 int main() {
4432 main()
4433 ; return 0; }
4434 EOF
4435 if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=yes"
4438 else
4439   echo "configure: failed program was:" >&5
4440   cat conftest.$ac_ext >&5
4441   rm -rf conftest*
4442   eval "ac_cv_lib_$ac_lib_var=no"
4443 fi
4444 rm -f conftest*
4445 LIBS="$ac_save_LIBS"
4446
4447 fi
4448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449   echo "$ac_t""yes" 1>&6
4450     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4451     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4452   cat >> confdefs.h <<EOF
4453 #define $ac_tr_lib 1
4454 EOF
4455
4456   LIBS="-lsocket $LIBS"
4457
4458 else
4459   echo "$ac_t""no" 1>&6
4460 fi
4461
4462         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4463 echo "configure:4464: checking for main in -lnet" >&5
4464 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4465 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4466   echo $ac_n "(cached) $ac_c" 1>&6
4467 else
4468   ac_save_LIBS="$LIBS"
4469 LIBS="-lnet  $LIBS"
4470 cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
4472 #include "confdefs.h"
4473
4474 int main() {
4475 main()
4476 ; return 0; }
4477 EOF
4478 if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479   rm -rf conftest*
4480   eval "ac_cv_lib_$ac_lib_var=yes"
4481 else
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -rf conftest*
4485   eval "ac_cv_lib_$ac_lib_var=no"
4486 fi
4487 rm -f conftest*
4488 LIBS="$ac_save_LIBS"
4489
4490 fi
4491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4492   echo "$ac_t""yes" 1>&6
4493     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4494     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4495   cat >> confdefs.h <<EOF
4496 #define $ac_tr_lib 1
4497 EOF
4498
4499   LIBS="-lnet $LIBS"
4500
4501 else
4502   echo "$ac_t""no" 1>&6
4503 fi
4504
4505         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4506 echo "configure:4507: checking for socket in -lnet" >&5
4507 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4509   echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511   ac_save_LIBS="$LIBS"
4512 LIBS="-lnet  $LIBS"
4513 cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 /* Override any gcc2 internal prototype to avoid an error.  */
4517 /* We use char because int might match the return type of a gcc2
4518     builtin and then its argument prototype would still apply.  */
4519 char socket();
4520
4521 int main() {
4522 socket()
4523 ; return 0; }
4524 EOF
4525 if { (eval echo configure:4526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4526   rm -rf conftest*
4527   eval "ac_cv_lib_$ac_lib_var=yes"
4528 else
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -rf conftest*
4532   eval "ac_cv_lib_$ac_lib_var=no"
4533 fi
4534 rm -f conftest*
4535 LIBS="$ac_save_LIBS"
4536
4537 fi
4538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4539   echo "$ac_t""yes" 1>&6
4540     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4541     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4542   cat >> confdefs.h <<EOF
4543 #define $ac_tr_lib 1
4544 EOF
4545
4546   LIBS="-lnet $LIBS"
4547
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4553 echo "configure:4554: checking for main in -lnsl_s" >&5
4554 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   ac_save_LIBS="$LIBS"
4559 LIBS="-lnsl_s  $LIBS"
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563
4564 int main() {
4565 main()
4566 ; return 0; }
4567 EOF
4568 if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4569   rm -rf conftest*
4570   eval "ac_cv_lib_$ac_lib_var=yes"
4571 else
4572   echo "configure: failed program was:" >&5
4573   cat conftest.$ac_ext >&5
4574   rm -rf conftest*
4575   eval "ac_cv_lib_$ac_lib_var=no"
4576 fi
4577 rm -f conftest*
4578 LIBS="$ac_save_LIBS"
4579
4580 fi
4581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4582   echo "$ac_t""yes" 1>&6
4583     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4584     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4585   cat >> confdefs.h <<EOF
4586 #define $ac_tr_lib 1
4587 EOF
4588
4589   LIBS="-lnsl_s $LIBS"
4590
4591 else
4592   echo "$ac_t""no" 1>&6
4593 fi
4594
4595         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4596 echo "configure:4597: checking for main in -lnsl" >&5
4597 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4598 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4599   echo $ac_n "(cached) $ac_c" 1>&6
4600 else
4601   ac_save_LIBS="$LIBS"
4602 LIBS="-lnsl  $LIBS"
4603 cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606
4607 int main() {
4608 main()
4609 ; return 0; }
4610 EOF
4611 if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4612   rm -rf conftest*
4613   eval "ac_cv_lib_$ac_lib_var=yes"
4614 else
4615   echo "configure: failed program was:" >&5
4616   cat conftest.$ac_ext >&5
4617   rm -rf conftest*
4618   eval "ac_cv_lib_$ac_lib_var=no"
4619 fi
4620 rm -f conftest*
4621 LIBS="$ac_save_LIBS"
4622
4623 fi
4624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4625   echo "$ac_t""yes" 1>&6
4626     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4628   cat >> confdefs.h <<EOF
4629 #define $ac_tr_lib 1
4630 EOF
4631
4632   LIBS="-lnsl $LIBS"
4633
4634 else
4635   echo "$ac_t""no" 1>&6
4636 fi
4637
4638         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4639 echo "configure:4640: checking for socket in -linet" >&5
4640 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   ac_save_LIBS="$LIBS"
4645 LIBS="-linet  $LIBS"
4646 cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 /* Override any gcc2 internal prototype to avoid an error.  */
4650 /* We use char because int might match the return type of a gcc2
4651     builtin and then its argument prototype would still apply.  */
4652 char socket();
4653
4654 int main() {
4655 socket()
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   eval "ac_cv_lib_$ac_lib_var=yes"
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   eval "ac_cv_lib_$ac_lib_var=no"
4666 fi
4667 rm -f conftest*
4668 LIBS="$ac_save_LIBS"
4669
4670 fi
4671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4674     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4675   cat >> confdefs.h <<EOF
4676 #define $ac_tr_lib 1
4677 EOF
4678
4679   LIBS="-linet $LIBS"
4680
4681 else
4682   echo "$ac_t""no" 1>&6
4683 fi
4684
4685         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4686 echo "configure:4687: checking for main in -lgen" >&5
4687 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   ac_save_LIBS="$LIBS"
4692 LIBS="-lgen  $LIBS"
4693 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696
4697 int main() {
4698 main()
4699 ; return 0; }
4700 EOF
4701 if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=yes"
4704 else
4705   echo "configure: failed program was:" >&5
4706   cat conftest.$ac_ext >&5
4707   rm -rf conftest*
4708   eval "ac_cv_lib_$ac_lib_var=no"
4709 fi
4710 rm -f conftest*
4711 LIBS="$ac_save_LIBS"
4712
4713 fi
4714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4715   echo "$ac_t""yes" 1>&6
4716     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4717     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4718   cat >> confdefs.h <<EOF
4719 #define $ac_tr_lib 1
4720 EOF
4721
4722   LIBS="-lgen $LIBS"
4723
4724 else
4725   echo "$ac_t""no" 1>&6
4726 fi
4727
4728
4729 fi
4730
4731
4732 echo $ac_n "checking for select""... $ac_c" 1>&6
4733 echo "configure:4734: checking for select" >&5
4734 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4735   echo $ac_n "(cached) $ac_c" 1>&6
4736 else
4737   cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 /* System header to define __stub macros and hopefully few prototypes,
4741     which can conflict with char select(); below.  */
4742 #include <assert.h>
4743 /* Override any gcc2 internal prototype to avoid an error.  */
4744 /* We use char because int might match the return type of a gcc2
4745     builtin and then its argument prototype would still apply.  */
4746 char select();
4747 char (*f)();
4748
4749 int main() {
4750
4751 /* The GNU C library defines this for functions which it implements
4752     to always fail with ENOSYS.  Some functions are actually named
4753     something starting with __ and the normal name is an alias.  */
4754 #if defined (__stub_select) || defined (__stub___select)
4755 choke me
4756 #else
4757 f = select;
4758 #endif
4759
4760 ; return 0; }
4761 EOF
4762 if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4763   rm -rf conftest*
4764   eval "ac_cv_func_select=yes"
4765 else
4766   echo "configure: failed program was:" >&5
4767   cat conftest.$ac_ext >&5
4768   rm -rf conftest*
4769   eval "ac_cv_func_select=no"
4770 fi
4771 rm -f conftest*
4772 fi
4773
4774 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4775   echo "$ac_t""yes" 1>&6
4776   :
4777 else
4778   echo "$ac_t""no" 1>&6
4779 { echo "configure: error: select() required." 1>&2; exit 1; }
4780 fi
4781
4782
4783 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4784 echo "configure:4785: checking types of arguments for select()" >&5
4785  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4786   echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4789   echo $ac_n "(cached) $ac_c" 1>&6
4790 else
4791     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4792   echo $ac_n "(cached) $ac_c" 1>&6
4793 else
4794      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4795      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4796       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4797        cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 #ifdef HAVE_SYS_TYPES_H
4801 #include <sys/types.h>
4802 #endif
4803 #ifdef HAVE_SYS_TIME_H
4804 #include <sys/time.h>
4805 #endif
4806 #ifdef HAVE_SYS_SELECT_H
4807 #include <sys/select.h>
4808 #endif
4809 #ifdef HAVE_SYS_SOCKET_H
4810 #include <sys/socket.h>
4811 #endif
4812 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);
4813 int main() {
4814
4815 ; return 0; }
4816 EOF
4817 if { (eval echo configure:4818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4818   rm -rf conftest*
4819           ac_not_found=no ; break 3
4820 else
4821   echo "configure: failed program was:" >&5
4822   cat conftest.$ac_ext >&5
4823   rm -rf conftest*
4824   ac_not_found=yes
4825 fi
4826 rm -f conftest*
4827       done
4828      done
4829     done
4830    
4831 fi
4832   
4833 fi
4834  
4835 fi
4836  if test "$ac_not_found" = yes; then
4837   ac_cv_func_select_arg1=int 
4838   ac_cv_func_select_arg234='int *' 
4839   ac_cv_func_select_arg5='struct timeval *'
4840  fi
4841  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4842  cat >> confdefs.h <<EOF
4843 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4844 EOF
4845
4846  cat >> confdefs.h <<EOF
4847 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4848 EOF
4849
4850  cat >> confdefs.h <<EOF
4851 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4852 EOF
4853
4854
4855
4856
4857 for ac_hdr in regex.h 
4858 do
4859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4861 echo "configure:4862: checking for $ac_hdr" >&5
4862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4863   echo $ac_n "(cached) $ac_c" 1>&6
4864 else
4865   cat > conftest.$ac_ext <<EOF
4866 #line 4867 "configure"
4867 #include "confdefs.h"
4868 #include <$ac_hdr>
4869 EOF
4870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4871 { (eval echo configure:4872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4873 if test -z "$ac_err"; then
4874   rm -rf conftest*
4875   eval "ac_cv_header_$ac_safe=yes"
4876 else
4877   echo "$ac_err" >&5
4878   echo "configure: failed program was:" >&5
4879   cat conftest.$ac_ext >&5
4880   rm -rf conftest*
4881   eval "ac_cv_header_$ac_safe=no"
4882 fi
4883 rm -f conftest*
4884 fi
4885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4886   echo "$ac_t""yes" 1>&6
4887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4888   cat >> confdefs.h <<EOF
4889 #define $ac_tr_hdr 1
4890 EOF
4891  
4892 else
4893   echo "$ac_t""no" 1>&6
4894 fi
4895 done
4896
4897 if test "$ac_cv_header_regex_h" != yes ; then
4898         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4899 fi
4900 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4901 echo "configure:4902: checking for regfree" >&5
4902 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4903   echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905   cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908 /* System header to define __stub macros and hopefully few prototypes,
4909     which can conflict with char regfree(); below.  */
4910 #include <assert.h>
4911 /* Override any gcc2 internal prototype to avoid an error.  */
4912 /* We use char because int might match the return type of a gcc2
4913     builtin and then its argument prototype would still apply.  */
4914 char regfree();
4915 char (*f)();
4916
4917 int main() {
4918
4919 /* The GNU C library defines this for functions which it implements
4920     to always fail with ENOSYS.  Some functions are actually named
4921     something starting with __ and the normal name is an alias.  */
4922 #if defined (__stub_regfree) || defined (__stub___regfree)
4923 choke me
4924 #else
4925 f = regfree;
4926 #endif
4927
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_func_regfree=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_func_regfree=no"
4938 fi
4939 rm -f conftest*
4940 fi
4941
4942 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4943   echo "$ac_t""yes" 1>&6
4944   :
4945 else
4946   echo "$ac_t""no" 1>&6
4947 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4948 fi
4949
4950
4951
4952 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4953 echo "configure:4954: checking for compatible POSIX regex" >&5
4954 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4955   echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957   
4958         if test "$cross_compiling" = yes; then
4959   ol_cv_c_posix_regex=cross
4960 else
4961   cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964
4965 #include <sys/types.h>
4966 #include <regex.h>
4967 static char *pattern, *string;
4968 main()
4969 {
4970         int rc;
4971         regex_t re;
4972
4973         pattern = "^A";
4974
4975         if(regcomp(&re, pattern, 0)) {
4976                 return -1;
4977         }
4978         
4979         string = "ALL MATCH";
4980         
4981         rc = regexec(&re, string, 0, (void*)0, 0);
4982
4983         regfree(&re);
4984
4985         return rc;
4986 }
4987 EOF
4988 if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4989 then
4990   ol_cv_c_posix_regex=yes
4991 else
4992   echo "configure: failed program was:" >&5
4993   cat conftest.$ac_ext >&5
4994   rm -fr conftest*
4995   ol_cv_c_posix_regex=no
4996 fi
4997 rm -fr conftest*
4998 fi
4999
5000 fi
5001
5002 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5003
5004 if test "$ol_cv_c_posix_regex" = no ; then
5005         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5006 fi
5007
5008 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5009 echo "configure:5010: checking for sigset in -lV3" >&5
5010 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   ac_save_LIBS="$LIBS"
5015 LIBS="-lV3  $LIBS"
5016 cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019 /* Override any gcc2 internal prototype to avoid an error.  */
5020 /* We use char because int might match the return type of a gcc2
5021     builtin and then its argument prototype would still apply.  */
5022 char sigset();
5023
5024 int main() {
5025 sigset()
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_lib_$ac_lib_var=no"
5036 fi
5037 rm -f conftest*
5038 LIBS="$ac_save_LIBS"
5039
5040 fi
5041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5045   cat >> confdefs.h <<EOF
5046 #define $ac_tr_lib 1
5047 EOF
5048
5049   LIBS="-lV3 $LIBS"
5050
5051 else
5052   echo "$ac_t""no" 1>&6
5053 fi
5054
5055
5056 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5057 echo "configure:5058: checking for res_search" >&5
5058 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5059   echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061   cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064 /* System header to define __stub macros and hopefully few prototypes,
5065     which can conflict with char res_search(); below.  */
5066 #include <assert.h>
5067 /* Override any gcc2 internal prototype to avoid an error.  */
5068 /* We use char because int might match the return type of a gcc2
5069     builtin and then its argument prototype would still apply.  */
5070 char res_search();
5071 char (*f)();
5072
5073 int main() {
5074
5075 /* The GNU C library defines this for functions which it implements
5076     to always fail with ENOSYS.  Some functions are actually named
5077     something starting with __ and the normal name is an alias.  */
5078 #if defined (__stub_res_search) || defined (__stub___res_search)
5079 choke me
5080 #else
5081 f = res_search;
5082 #endif
5083
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_func_res_search=yes"
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -rf conftest*
5093   eval "ac_cv_func_res_search=no"
5094 fi
5095 rm -f conftest*
5096 fi
5097
5098 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5099   echo "$ac_t""yes" 1>&6
5100   :
5101 else
5102   echo "$ac_t""no" 1>&6
5103 fi
5104
5105 if test $ac_cv_func_res_search = no ; then 
5106         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5107 echo "configure:5108: checking for res_search in -lbind" >&5
5108 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5110   echo $ac_n "(cached) $ac_c" 1>&6
5111 else
5112   ac_save_LIBS="$LIBS"
5113 LIBS="-lbind  $LIBS"
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 /* Override any gcc2 internal prototype to avoid an error.  */
5118 /* We use char because int might match the return type of a gcc2
5119     builtin and then its argument prototype would still apply.  */
5120 char res_search();
5121
5122 int main() {
5123 res_search()
5124 ; return 0; }
5125 EOF
5126 if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5127   rm -rf conftest*
5128   eval "ac_cv_lib_$ac_lib_var=yes"
5129 else
5130   echo "configure: failed program was:" >&5
5131   cat conftest.$ac_ext >&5
5132   rm -rf conftest*
5133   eval "ac_cv_lib_$ac_lib_var=no"
5134 fi
5135 rm -f conftest*
5136 LIBS="$ac_save_LIBS"
5137
5138 fi
5139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5140   echo "$ac_t""yes" 1>&6
5141     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5143   cat >> confdefs.h <<EOF
5144 #define $ac_tr_lib 1
5145 EOF
5146
5147   LIBS="-lbind $LIBS"
5148
5149 else
5150   echo "$ac_t""no" 1>&6
5151 fi
5152
5153         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5154 fi
5155
5156 if test $ac_cv_func_res_search = no ; then 
5157         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5158 echo "configure:5159: checking for __res_search in -lbind" >&5
5159 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5161   echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163   ac_save_LIBS="$LIBS"
5164 LIBS="-lbind  $LIBS"
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168 /* Override any gcc2 internal prototype to avoid an error.  */
5169 /* We use char because int might match the return type of a gcc2
5170     builtin and then its argument prototype would still apply.  */
5171 char __res_search();
5172
5173 int main() {
5174 __res_search()
5175 ; return 0; }
5176 EOF
5177 if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5178   rm -rf conftest*
5179   eval "ac_cv_lib_$ac_lib_var=yes"
5180 else
5181   echo "configure: failed program was:" >&5
5182   cat conftest.$ac_ext >&5
5183   rm -rf conftest*
5184   eval "ac_cv_lib_$ac_lib_var=no"
5185 fi
5186 rm -f conftest*
5187 LIBS="$ac_save_LIBS"
5188
5189 fi
5190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5191   echo "$ac_t""yes" 1>&6
5192     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5193     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5194   cat >> confdefs.h <<EOF
5195 #define $ac_tr_lib 1
5196 EOF
5197
5198   LIBS="-lbind $LIBS"
5199
5200 else
5201   echo "$ac_t""no" 1>&6
5202 fi
5203
5204         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5205 fi
5206
5207 if test $ac_cv_func_res_search = no ; then 
5208         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5209 echo "configure:5210: checking for res_search in -lresolv" >&5
5210 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5212   echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5214   ac_save_LIBS="$LIBS"
5215 LIBS="-lresolv  $LIBS"
5216 cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5219 /* Override any gcc2 internal prototype to avoid an error.  */
5220 /* We use char because int might match the return type of a gcc2
5221     builtin and then its argument prototype would still apply.  */
5222 char res_search();
5223
5224 int main() {
5225 res_search()
5226 ; return 0; }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229   rm -rf conftest*
5230   eval "ac_cv_lib_$ac_lib_var=yes"
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -rf conftest*
5235   eval "ac_cv_lib_$ac_lib_var=no"
5236 fi
5237 rm -f conftest*
5238 LIBS="$ac_save_LIBS"
5239
5240 fi
5241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5242   echo "$ac_t""yes" 1>&6
5243     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5244     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5245   cat >> confdefs.h <<EOF
5246 #define $ac_tr_lib 1
5247 EOF
5248
5249   LIBS="-lresolv $LIBS"
5250
5251 else
5252   echo "$ac_t""no" 1>&6
5253 fi
5254
5255         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5256 fi
5257
5258 if test "$ac_cv_func_res_search" = yes ; then
5259         cat >> confdefs.h <<\EOF
5260 #define HAVE_RES_SEARCH 1
5261 EOF
5262
5263 elif test $ol_enable_dns = yes ; then
5264         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5265 elif test $ol_enable_dns != no ; then
5266         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5267 fi
5268
5269
5270 # QUIPU
5271 if test $ol_enable_quipu != no ; then
5272         for ac_hdr in quipu/commonarg.h
5273 do
5274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5276 echo "configure:5277: checking for $ac_hdr" >&5
5277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5278   echo $ac_n "(cached) $ac_c" 1>&6
5279 else
5280   cat > conftest.$ac_ext <<EOF
5281 #line 5282 "configure"
5282 #include "confdefs.h"
5283 #include <$ac_hdr>
5284 EOF
5285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5286 { (eval echo configure:5287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5288 if test -z "$ac_err"; then
5289   rm -rf conftest*
5290   eval "ac_cv_header_$ac_safe=yes"
5291 else
5292   echo "$ac_err" >&5
5293   echo "configure: failed program was:" >&5
5294   cat conftest.$ac_ext >&5
5295   rm -rf conftest*
5296   eval "ac_cv_header_$ac_safe=no"
5297 fi
5298 rm -f conftest*
5299 fi
5300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5301   echo "$ac_t""yes" 1>&6
5302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5303   cat >> confdefs.h <<EOF
5304 #define $ac_tr_hdr 1
5305 EOF
5306  
5307 else
5308   echo "$ac_t""no" 1>&6
5309 fi
5310 done
5311
5312
5313         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5314                 BUILD_QUIPU=yes
5315         elif test $ol_enable_quipu = auto ; then
5316                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5317         else
5318                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5319         fi
5320 fi
5321
5322 ol_link_kerberos=no
5323
5324 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5325         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5326 do
5327 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5328 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5329 echo "configure:5330: checking for $ac_hdr" >&5
5330 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5331   echo $ac_n "(cached) $ac_c" 1>&6
5332 else
5333   cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336 #include <$ac_hdr>
5337 EOF
5338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5339 { (eval echo configure:5340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5341 if test -z "$ac_err"; then
5342   rm -rf conftest*
5343   eval "ac_cv_header_$ac_safe=yes"
5344 else
5345   echo "$ac_err" >&5
5346   echo "configure: failed program was:" >&5
5347   cat conftest.$ac_ext >&5
5348   rm -rf conftest*
5349   eval "ac_cv_header_$ac_safe=no"
5350 fi
5351 rm -f conftest*
5352 fi
5353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5354   echo "$ac_t""yes" 1>&6
5355     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5356   cat >> confdefs.h <<EOF
5357 #define $ac_tr_hdr 1
5358 EOF
5359  
5360 else
5361   echo "$ac_t""no" 1>&6
5362 fi
5363 done
5364
5365
5366         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5367                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5368 echo "configure:5369: checking for main in -lkrb4" >&5
5369 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373   ac_save_LIBS="$LIBS"
5374 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378
5379 int main() {
5380 main()
5381 ; return 0; }
5382 EOF
5383 if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5384   rm -rf conftest*
5385   eval "ac_cv_lib_$ac_lib_var=yes"
5386 else
5387   echo "configure: failed program was:" >&5
5388   cat conftest.$ac_ext >&5
5389   rm -rf conftest*
5390   eval "ac_cv_lib_$ac_lib_var=no"
5391 fi
5392 rm -f conftest*
5393 LIBS="$ac_save_LIBS"
5394
5395 fi
5396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5397   echo "$ac_t""yes" 1>&6
5398   have_k5=yes
5399 else
5400   echo "$ac_t""no" 1>&6
5401 have_k5=no
5402 fi
5403
5404
5405                 if test $have_k5 = yes ; then
5406                         ol_with_kerberos=found
5407                         ol_link_kerberos=yes
5408
5409                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5410
5411                         LIBS="$KRB_LIBS $LIBS"
5412
5413                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5414 echo "configure:5415: checking for des_debug in Kerberos libraries" >&5
5415 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5416   echo $ac_n "(cached) $ac_c" 1>&6
5417 else
5418   
5419                                                                 save_LIBS="$LIBS"
5420                                 LIBS="$KRB_LIBS $LIBS"
5421                                 cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424
5425 #include <kerberosIV/krb.h>
5426 #include <kerberosIV/des.h>
5427 extern int des_debug;
5428
5429 int main() {
5430
5431 des_debug = 1;
5432
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5436   rm -rf conftest*
5437   ol_cv_var_des_debug=yes
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   ol_cv_var_des_debug=no
5443 fi
5444 rm -f conftest*
5445                                                                 LIBS="$save_LIBS"
5446                         
5447 fi
5448
5449 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5450
5451                         if test $ol_cv_var_des_debug = yes ; then
5452                                 cat >> confdefs.h <<\EOF
5453 #define HAVE_DES_DEBUG 1
5454 EOF
5455
5456                         fi
5457
5458                         LIBS="$save_LIBS"
5459                 fi
5460         fi
5461 fi
5462
5463 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5464         for ac_hdr in krb.h des.h
5465 do
5466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5468 echo "configure:5469: checking for $ac_hdr" >&5
5469 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5470   echo $ac_n "(cached) $ac_c" 1>&6
5471 else
5472   cat > conftest.$ac_ext <<EOF
5473 #line 5474 "configure"
5474 #include "confdefs.h"
5475 #include <$ac_hdr>
5476 EOF
5477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5478 { (eval echo configure:5479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5480 if test -z "$ac_err"; then
5481   rm -rf conftest*
5482   eval "ac_cv_header_$ac_safe=yes"
5483 else
5484   echo "$ac_err" >&5
5485   echo "configure: failed program was:" >&5
5486   cat conftest.$ac_ext >&5
5487   rm -rf conftest*
5488   eval "ac_cv_header_$ac_safe=no"
5489 fi
5490 rm -f conftest*
5491 fi
5492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5493   echo "$ac_t""yes" 1>&6
5494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5495   cat >> confdefs.h <<EOF
5496 #define $ac_tr_hdr 1
5497 EOF
5498  
5499 else
5500   echo "$ac_t""no" 1>&6
5501 fi
5502 done
5503
5504
5505         if test $ac_cv_header_krb_h = yes ; then
5506                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5507 echo "configure:5508: checking for main in -lkrb" >&5
5508 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5510   echo $ac_n "(cached) $ac_c" 1>&6
5511 else
5512   ac_save_LIBS="$LIBS"
5513 LIBS="-lkrb -ldes $LIBS"
5514 cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5517
5518 int main() {
5519 main()
5520 ; return 0; }
5521 EOF
5522 if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5523   rm -rf conftest*
5524   eval "ac_cv_lib_$ac_lib_var=yes"
5525 else
5526   echo "configure: failed program was:" >&5
5527   cat conftest.$ac_ext >&5
5528   rm -rf conftest*
5529   eval "ac_cv_lib_$ac_lib_var=no"
5530 fi
5531 rm -f conftest*
5532 LIBS="$ac_save_LIBS"
5533
5534 fi
5535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5536   echo "$ac_t""yes" 1>&6
5537   have_k4=yes
5538 else
5539   echo "$ac_t""no" 1>&6
5540 have_k4=no
5541 fi
5542
5543
5544                 if test $have_k4 = yes ; then
5545                         ol_with_kerberos=found
5546                         ol_link_kerberos=yes
5547
5548                         KRB_LIBS="-lkrb -ldes"
5549                 fi
5550         fi
5551 fi
5552
5553 if test $ol_link_kerberos = yes ; then
5554         cat >> confdefs.h <<\EOF
5555 #define HAVE_KERBEROS 1
5556 EOF
5557
5558 fi
5559
5560 ol_link_tls=no
5561 if test $ol_with_tls != no ; then
5562         
5563         for ac_hdr in openssl/ssl.h ssl.h
5564 do
5565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5567 echo "configure:5568: checking for $ac_hdr" >&5
5568 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5569   echo $ac_n "(cached) $ac_c" 1>&6
5570 else
5571   cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574 #include <$ac_hdr>
5575 EOF
5576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5577 { (eval echo configure:5578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5579 if test -z "$ac_err"; then
5580   rm -rf conftest*
5581   eval "ac_cv_header_$ac_safe=yes"
5582 else
5583   echo "$ac_err" >&5
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_header_$ac_safe=no"
5588 fi
5589 rm -f conftest*
5590 fi
5591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5592   echo "$ac_t""yes" 1>&6
5593     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5594   cat >> confdefs.h <<EOF
5595 #define $ac_tr_hdr 1
5596 EOF
5597  
5598 else
5599   echo "$ac_t""no" 1>&6
5600 fi
5601 done
5602
5603         
5604         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5605                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5606 echo "configure:5607: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5607 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5608 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611   ac_save_LIBS="$LIBS"
5612 LIBS="-lssl -lcrypto $LIBS"
5613 cat > conftest.$ac_ext <<EOF
5614 #line 5615 "configure"
5615 #include "confdefs.h"
5616 /* Override any gcc2 internal prototype to avoid an error.  */
5617 /* We use char because int might match the return type of a gcc2
5618     builtin and then its argument prototype would still apply.  */
5619 char SSLeay_add_ssl_algorithms();
5620
5621 int main() {
5622 SSLeay_add_ssl_algorithms()
5623 ; return 0; }
5624 EOF
5625 if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5626   rm -rf conftest*
5627   eval "ac_cv_lib_$ac_lib_var=yes"
5628 else
5629   echo "configure: failed program was:" >&5
5630   cat conftest.$ac_ext >&5
5631   rm -rf conftest*
5632   eval "ac_cv_lib_$ac_lib_var=no"
5633 fi
5634 rm -f conftest*
5635 LIBS="$ac_save_LIBS"
5636
5637 fi
5638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5639   echo "$ac_t""yes" 1>&6
5640   have_ssleay=yes
5641                         need_rsaref=no
5642 else
5643   echo "$ac_t""no" 1>&6
5644 have_ssleay=no
5645 fi
5646
5647                         
5648                 if test $have_ssleay = no ; then
5649                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5650 echo "configure:5651: checking for SSL_library_init in -lssl" >&5
5651 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5653   echo $ac_n "(cached) $ac_c" 1>&6
5654 else
5655   ac_save_LIBS="$LIBS"
5656 LIBS="-lssl -lcrypto $LIBS"
5657 cat > conftest.$ac_ext <<EOF
5658 #line 5659 "configure"
5659 #include "confdefs.h"
5660 /* Override any gcc2 internal prototype to avoid an error.  */
5661 /* We use char because int might match the return type of a gcc2
5662     builtin and then its argument prototype would still apply.  */
5663 char SSL_library_init();
5664
5665 int main() {
5666 SSL_library_init()
5667 ; return 0; }
5668 EOF
5669 if { (eval echo configure:5670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5670   rm -rf conftest*
5671   eval "ac_cv_lib_$ac_lib_var=yes"
5672 else
5673   echo "configure: failed program was:" >&5
5674   cat conftest.$ac_ext >&5
5675   rm -rf conftest*
5676   eval "ac_cv_lib_$ac_lib_var=no"
5677 fi
5678 rm -f conftest*
5679 LIBS="$ac_save_LIBS"
5680
5681 fi
5682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5683   echo "$ac_t""yes" 1>&6
5684   have_ssleay=yes
5685                                 need_rsaref=no
5686 else
5687   echo "$ac_t""no" 1>&6
5688 have_ssleay=no
5689 fi
5690
5691                 fi
5692
5693                 if test $have_ssleay = no ; then
5694                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5695 echo "configure:5696: checking for ssl3_accept in -lssl" >&5
5696 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5698   echo $ac_n "(cached) $ac_c" 1>&6
5699 else
5700   ac_save_LIBS="$LIBS"
5701 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5702 cat > conftest.$ac_ext <<EOF
5703 #line 5704 "configure"
5704 #include "confdefs.h"
5705 /* Override any gcc2 internal prototype to avoid an error.  */
5706 /* We use char because int might match the return type of a gcc2
5707     builtin and then its argument prototype would still apply.  */
5708 char ssl3_accept();
5709
5710 int main() {
5711 ssl3_accept()
5712 ; return 0; }
5713 EOF
5714 if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5715   rm -rf conftest*
5716   eval "ac_cv_lib_$ac_lib_var=yes"
5717 else
5718   echo "configure: failed program was:" >&5
5719   cat conftest.$ac_ext >&5
5720   rm -rf conftest*
5721   eval "ac_cv_lib_$ac_lib_var=no"
5722 fi
5723 rm -f conftest*
5724 LIBS="$ac_save_LIBS"
5725
5726 fi
5727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5728   echo "$ac_t""yes" 1>&6
5729   have_ssleay=yes
5730                                 need_rsaref=yes
5731 else
5732   echo "$ac_t""no" 1>&6
5733 have_ssleay=no
5734 fi
5735
5736                 fi
5737
5738                 if test $have_ssleay = yes ; then
5739                         ol_with_tls=found
5740                         ol_link_tls=yes
5741
5742                         cat >> confdefs.h <<\EOF
5743 #define HAVE_SSLEAY 1
5744 EOF
5745
5746
5747                         if test $need_rsaref = yes; then
5748                                 cat >> confdefs.h <<\EOF
5749 #define HAVE_RSAREF 1
5750 EOF
5751
5752
5753                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5754                         else
5755                                 TLS_LIBS="-lssl -lcrypto"
5756                         fi
5757                 fi
5758         fi
5759 fi
5760
5761 if test $ol_link_tls = yes ; then
5762         cat >> confdefs.h <<\EOF
5763 #define HAVE_TLS 1
5764 EOF
5765
5766 fi      
5767
5768 for ac_func in \
5769         ctime_r                 \
5770         gethostbyname_r gethostbyaddr_r \
5771
5772 do
5773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5774 echo "configure:5775: checking for $ac_func" >&5
5775 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5776   echo $ac_n "(cached) $ac_c" 1>&6
5777 else
5778   cat > conftest.$ac_ext <<EOF
5779 #line 5780 "configure"
5780 #include "confdefs.h"
5781 /* System header to define __stub macros and hopefully few prototypes,
5782     which can conflict with char $ac_func(); below.  */
5783 #include <assert.h>
5784 /* Override any gcc2 internal prototype to avoid an error.  */
5785 /* We use char because int might match the return type of a gcc2
5786     builtin and then its argument prototype would still apply.  */
5787 char $ac_func();
5788 char (*f)();
5789
5790 int main() {
5791
5792 /* The GNU C library defines this for functions which it implements
5793     to always fail with ENOSYS.  Some functions are actually named
5794     something starting with __ and the normal name is an alias.  */
5795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5796 choke me
5797 #else
5798 f = $ac_func;
5799 #endif
5800
5801 ; return 0; }
5802 EOF
5803 if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5804   rm -rf conftest*
5805   eval "ac_cv_func_$ac_func=yes"
5806 else
5807   echo "configure: failed program was:" >&5
5808   cat conftest.$ac_ext >&5
5809   rm -rf conftest*
5810   eval "ac_cv_func_$ac_func=no"
5811 fi
5812 rm -f conftest*
5813 fi
5814
5815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5816   echo "$ac_t""yes" 1>&6
5817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5818   cat >> confdefs.h <<EOF
5819 #define $ac_tr_func 1
5820 EOF
5821  
5822 else
5823   echo "$ac_t""no" 1>&6
5824 fi
5825 done
5826
5827
5828 if test "$ac_cv_func_ctime_r" = no ; then
5829         ol_cv_func_ctime_r_nargs=0
5830 else
5831         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5832 echo "configure:5833: checking number of arguments of ctime_r" >&5
5833 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5834   echo $ac_n "(cached) $ac_c" 1>&6
5835 else
5836   cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 #include <time.h>
5840 int main() {
5841 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5842 ; return 0; }
5843 EOF
5844 if { (eval echo configure:5845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5845   rm -rf conftest*
5846   ol_cv_func_ctime_r_nargs=3
5847 else
5848   echo "configure: failed program was:" >&5
5849   cat conftest.$ac_ext >&5
5850   rm -rf conftest*
5851   cat > conftest.$ac_ext <<EOF
5852 #line 5853 "configure"
5853 #include "confdefs.h"
5854 #include <time.h>
5855 int main() {
5856 time_t ti; char *buffer; ctime_r(&ti,buffer);
5857 ; return 0; }
5858 EOF
5859 if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5860   rm -rf conftest*
5861   ol_cv_func_ctime_r_nargs=2
5862 else
5863   echo "configure: failed program was:" >&5
5864   cat conftest.$ac_ext >&5
5865   rm -rf conftest*
5866   ol_cv_func_ctime_r_nargs=0
5867 fi
5868 rm -f conftest*
5869 fi
5870 rm -f conftest*
5871 fi
5872
5873 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5874   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5875     cat >> confdefs.h <<EOF
5876 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5877 EOF
5878
5879   fi
5880
5881 fi
5882
5883 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5884         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5885 echo "configure:5886: checking number of arguments of gethostbyname_r" >&5
5886 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5887   echo $ac_n "(cached) $ac_c" 1>&6
5888 else
5889   cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 #include <sys/types.h>
5893 #include <sys/socket.h>
5894 #include <netinet/in.h>
5895 #include <netdb.h>
5896 #define BUFSIZE (sizeof(struct hostent)+10)
5897 int main() {
5898 struct hostent hent; char buffer[BUFSIZE];
5899                 int bufsize=BUFSIZE;int h_errno;
5900                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5901                         buffer, bufsize, &h_errno);
5902 ; return 0; }
5903 EOF
5904 if { (eval echo configure:5905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5905   rm -rf conftest*
5906   ol_cv_func_gethostbyname_r_nargs=5
5907 else
5908   echo "configure: failed program was:" >&5
5909   cat conftest.$ac_ext >&5
5910   rm -rf conftest*
5911   cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 #include <sys/types.h>
5915 #include <sys/socket.h>
5916 #include <netinet/in.h>
5917 #include <netdb.h>
5918 #define BUFSIZE (sizeof(struct hostent)+10)
5919 int main() {
5920 struct hostent hent;struct hostent *rhent;
5921                         char buffer[BUFSIZE];
5922                         int bufsize=BUFSIZE;int h_errno;
5923                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5924                                 &rhent, &h_errno);
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5928   rm -rf conftest*
5929   ol_cv_func_gethostbyname_r_nargs=6
5930 else
5931   echo "configure: failed program was:" >&5
5932   cat conftest.$ac_ext >&5
5933   rm -rf conftest*
5934   ol_cv_func_gethostbyname_r_nargs=0
5935 fi
5936 rm -f conftest*
5937 fi
5938 rm -f conftest*
5939 fi
5940
5941 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5942   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5943         cat >> confdefs.h <<EOF
5944 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5945 EOF
5946
5947   fi
5948
5949 else
5950         ol_cv_func_gethostbyname_r_nargs=0
5951 fi
5952  
5953 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5954         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5955 echo "configure:5956: checking number of arguments of gethostbyaddr_r" >&5
5956 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5957   echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959   cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 #include <sys/types.h>
5963 #include <sys/socket.h>
5964 #include <netinet/in.h>
5965 #include <netdb.h>
5966 #define BUFSIZE (sizeof(struct hostent)+10)
5967 int main() {
5968 struct hostent hent; char buffer[BUFSIZE]; 
5969             struct in_addr add;
5970             size_t alen=sizeof(struct in_addr);
5971             int bufsize=BUFSIZE;int h_errno;
5972                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5973                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5974 ; return 0; }
5975 EOF
5976 if { (eval echo configure:5977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5977   rm -rf conftest*
5978   ol_cv_func_gethostbyaddr_r_nargs=7
5979 else
5980   echo "configure: failed program was:" >&5
5981   cat conftest.$ac_ext >&5
5982   rm -rf conftest*
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 #include <sys/types.h>
5987 #include <sys/socket.h>
5988 #include <netinet/in.h>
5989 #include <netdb.h>
5990 #define BUFSIZE (sizeof(struct hostent)+10)
5991 int main() {
5992 struct hostent hent;
5993                         struct hostent *rhent; char buffer[BUFSIZE]; 
5994                         struct in_addr add;
5995                         size_t alen=sizeof(struct in_addr);
5996                         int bufsize=BUFSIZE;int h_errno;
5997                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5998                                 alen, AF_INET, &hent, buffer, bufsize, 
5999                                 &rhent, &h_errno);
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6003   rm -rf conftest*
6004   ol_cv_func_gethostbyaddr_r_nargs=8
6005 else
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008   rm -rf conftest*
6009   ol_cv_func_gethostbyaddr_r_nargs=0
6010 fi
6011 rm -f conftest*
6012 fi
6013 rm -f conftest*
6014 fi
6015
6016 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6017   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6018     cat >> confdefs.h <<EOF
6019 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6020 EOF
6021
6022   fi
6023
6024 else
6025         ol_cv_func_gethostbyaddr_r_nargs=0
6026 fi
6027
6028 if test "$ac_cv_func_ctime_r" = yes \
6029         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6030         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6031         -a "$ac_cv_func_gethostbyname_r" = yes \
6032         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6033         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6034         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6035         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6036         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6037         ; then
6038  
6039         cat >> confdefs.h <<\EOF
6040 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6041 EOF
6042
6043 fi
6044
6045 ol_link_threads=no
6046 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6047         -o $ol_with_threads = posix ; then
6048
6049         for ac_hdr in pthread.h
6050 do
6051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6053 echo "configure:6054: checking for $ac_hdr" >&5
6054 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060 #include <$ac_hdr>
6061 EOF
6062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6063 { (eval echo configure:6064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6065 if test -z "$ac_err"; then
6066   rm -rf conftest*
6067   eval "ac_cv_header_$ac_safe=yes"
6068 else
6069   echo "$ac_err" >&5
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   eval "ac_cv_header_$ac_safe=no"
6074 fi
6075 rm -f conftest*
6076 fi
6077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6078   echo "$ac_t""yes" 1>&6
6079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6080   cat >> confdefs.h <<EOF
6081 #define $ac_tr_hdr 1
6082 EOF
6083  
6084 else
6085   echo "$ac_t""no" 1>&6
6086 fi
6087 done
6088
6089
6090         if test $ac_cv_header_pthread_h = yes ; then
6091                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6092 echo "configure:6093: checking POSIX thread version" >&5
6093 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6094   echo $ac_n "(cached) $ac_c" 1>&6
6095 else
6096   
6097         cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100
6101 #               include <pthread.h>
6102                 /* this check could be improved */
6103 #               ifdef PTHREAD_ONCE_INIT
6104                         pthread_version_final
6105 #               endif
6106         
6107 EOF
6108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6109   egrep "pthread_version_final" >/dev/null 2>&1; then
6110   rm -rf conftest*
6111   ol_pthread_final=yes
6112 else
6113   rm -rf conftest*
6114   ol_pthread_final=no
6115 fi
6116 rm -f conftest*
6117
6118
6119         cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6122
6123 #               include <pthread.h>
6124                 /* this check could be improved */
6125 #               ifdef pthread_once_init
6126                         pthread_version_draft4
6127 #               endif
6128         
6129 EOF
6130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6131   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6132   rm -rf conftest*
6133   ol_pthread_draft4=yes
6134 else
6135   rm -rf conftest*
6136   ol_pthread_draft4=no
6137 fi
6138 rm -f conftest*
6139
6140
6141         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6142                 ol_cv_pthread_version=final
6143         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6144                 ol_cv_pthread_version=draft4
6145         else
6146                 ol_cv_pthread_version=unknown
6147         fi
6148
6149 fi
6150
6151 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6152
6153
6154                 if test $ol_cv_pthread_version = final ; then
6155                         cat >> confdefs.h <<\EOF
6156 #define HAVE_PTHREADS_FINAL 1
6157 EOF
6158
6159                 elif test $ol_cv_pthread_version = draft4 ; then
6160                         cat >> confdefs.h <<\EOF
6161 #define HAVE_PTHREADS_D4 1
6162 EOF
6163
6164                 else
6165                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6166                 fi
6167
6168                 # consider threads found
6169                 ol_with_threads=found
6170
6171                 
6172         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6173 echo "configure:6174: checking for LinuxThreads pthread.h" >&5
6174 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6175   echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6177   cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 #include <pthread.h>
6181 EOF
6182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6183   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6184   rm -rf conftest*
6185   ol_cv_header_linux_threads=yes
6186 else
6187   rm -rf conftest*
6188   ol_cv_header_linux_threads=no
6189 fi
6190 rm -f conftest*
6191
6192                 
6193 fi
6194
6195 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6196         if test $ol_cv_header_linux_threads = yes; then
6197                 cat >> confdefs.h <<\EOF
6198 #define HAVE_LINUX_THREADS 1
6199 EOF
6200
6201         fi
6202
6203                 
6204         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6205 echo "configure:6206: checking for GNU Pth pthread.h" >&5
6206 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6207   echo $ac_n "(cached) $ac_c" 1>&6
6208 else
6209   cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 #include <pthread.h>
6213 #ifdef _POSIX_THREAD_IS_GNU_PTH
6214         __gnu_pth__
6215 #endif
6216
6217 EOF
6218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6219   egrep "__gnu_pth__" >/dev/null 2>&1; then
6220   rm -rf conftest*
6221   ol_cv_header_gnu_pth_pthread_h=yes
6222 else
6223   rm -rf conftest*
6224   ol_cv_header_gnu_pth_pthread_h=no
6225 fi
6226 rm -f conftest*
6227
6228                 
6229 fi
6230
6231 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6232
6233
6234                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6235                         for ac_hdr in sched.h
6236 do
6237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6239 echo "configure:6240: checking for $ac_hdr" >&5
6240 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6241   echo $ac_n "(cached) $ac_c" 1>&6
6242 else
6243   cat > conftest.$ac_ext <<EOF
6244 #line 6245 "configure"
6245 #include "confdefs.h"
6246 #include <$ac_hdr>
6247 EOF
6248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6249 { (eval echo configure:6250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6251 if test -z "$ac_err"; then
6252   rm -rf conftest*
6253   eval "ac_cv_header_$ac_safe=yes"
6254 else
6255   echo "$ac_err" >&5
6256   echo "configure: failed program was:" >&5
6257   cat conftest.$ac_ext >&5
6258   rm -rf conftest*
6259   eval "ac_cv_header_$ac_safe=no"
6260 fi
6261 rm -f conftest*
6262 fi
6263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6264   echo "$ac_t""yes" 1>&6
6265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6266   cat >> confdefs.h <<EOF
6267 #define $ac_tr_hdr 1
6268 EOF
6269  
6270 else
6271   echo "$ac_t""no" 1>&6
6272 fi
6273 done
6274
6275                 fi
6276
6277                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6278                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6279 echo "configure:6280: checking for pthread_create in default libraries" >&5
6280 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6281   echo $ac_n "(cached) $ac_c" 1>&6
6282 else
6283   
6284                 if test "$cross_compiling" = yes; then
6285   cat > conftest.$ac_ext <<EOF
6286 #line 6287 "configure"
6287 #include "confdefs.h"
6288 /* pthread test headers */
6289 #include <pthread.h>
6290 #ifndef NULL
6291 #define NULL (void*)0
6292 #endif
6293
6294 static void *task(p)
6295         void *p;
6296 {
6297         return (void *) (p == NULL);
6298 }
6299
6300 int main() {
6301
6302         /* pthread test function */
6303         pthread_t t;
6304         int status;
6305
6306         /* make sure pthread_create() isn't just a stub */
6307 #if HAVE_PTHREADS_D4
6308         status = pthread_create(&t, pthread_attr_default, task, NULL);
6309 #else
6310         status = pthread_create(&t, NULL, task, NULL);
6311 #endif
6312
6313         if( status ) exit( status );
6314
6315         /* make sure pthread_detach() isn't just a stub */
6316 #if HAVE_PTHREADS_D4
6317         status = pthread_detach( &t );
6318 #else
6319         status = pthread_detach( t );
6320 #endif
6321
6322 #ifdef HAVE_LINUX_THREADS
6323         pthread_kill_other_threads_np();
6324 #endif
6325
6326         exit( status );
6327
6328 ; return 0; }
6329 EOF
6330 if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6331   rm -rf conftest*
6332   ol_cv_pthread_create=yes
6333 else
6334   echo "configure: failed program was:" >&5
6335   cat conftest.$ac_ext >&5
6336   rm -rf conftest*
6337   ol_cv_pthread_create=no
6338 fi
6339 rm -f conftest*
6340 else
6341   cat > conftest.$ac_ext <<EOF
6342 #line 6343 "configure"
6343 #include "confdefs.h"
6344 /* pthread test headers */
6345 #include <pthread.h>
6346 #ifndef NULL
6347 #define NULL (void*)0
6348 #endif
6349
6350 static void *task(p)
6351         void *p;
6352 {
6353         return (void *) (p == NULL);
6354 }
6355
6356
6357 int main(argc, argv)
6358         int argc;
6359         char **argv;
6360 {
6361
6362         /* pthread test function */
6363         pthread_t t;
6364         int status;
6365
6366         /* make sure pthread_create() isn't just a stub */
6367 #if HAVE_PTHREADS_D4
6368         status = pthread_create(&t, pthread_attr_default, task, NULL);
6369 #else
6370         status = pthread_create(&t, NULL, task, NULL);
6371 #endif
6372
6373         if( status ) exit( status );
6374
6375         /* make sure pthread_detach() isn't just a stub */
6376 #if HAVE_PTHREADS_D4
6377         status = pthread_detach( &t );
6378 #else
6379         status = pthread_detach( t );
6380 #endif
6381
6382 #ifdef HAVE_LINUX_THREADS
6383         pthread_kill_other_threads_np();
6384 #endif
6385
6386         exit( status );
6387
6388 }
6389
6390 EOF
6391 if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6392 then
6393   ol_cv_pthread_create=yes
6394 else
6395   echo "configure: failed program was:" >&5
6396   cat conftest.$ac_ext >&5
6397   rm -fr conftest*
6398   ol_cv_pthread_create=no
6399 fi
6400 rm -fr conftest*
6401 fi
6402
6403 fi
6404
6405 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6406
6407                 if test $ol_cv_pthread_create != no ; then
6408                         ol_link_threads=posix
6409                         ol_link_pthreads=""
6410                 fi
6411                 
6412                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6413 if test "$ol_link_threads" = no ; then
6414         # try -kthread
6415         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6416 echo "configure:6417: checking for pthread link with -kthread" >&5
6417 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6418   echo $ac_n "(cached) $ac_c" 1>&6
6419 else
6420   
6421                 # save the flags
6422                 ol_LIBS="$LIBS"
6423                 LIBS="-kthread $LIBS"
6424
6425                 if test "$cross_compiling" = yes; then
6426   cat > conftest.$ac_ext <<EOF
6427 #line 6428 "configure"
6428 #include "confdefs.h"
6429 /* pthread test headers */
6430 #include <pthread.h>
6431 #ifndef NULL
6432 #define NULL (void*)0
6433 #endif
6434
6435 static void *task(p)
6436         void *p;
6437 {
6438         return (void *) (p == NULL);
6439 }
6440
6441 int main() {
6442
6443         /* pthread test function */
6444         pthread_t t;
6445         int status;
6446
6447         /* make sure pthread_create() isn't just a stub */
6448 #if HAVE_PTHREADS_D4
6449         status = pthread_create(&t, pthread_attr_default, task, NULL);
6450 #else
6451         status = pthread_create(&t, NULL, task, NULL);
6452 #endif
6453
6454         if( status ) exit( status );
6455
6456         /* make sure pthread_detach() isn't just a stub */
6457 #if HAVE_PTHREADS_D4
6458         status = pthread_detach( &t );
6459 #else
6460         status = pthread_detach( t );
6461 #endif
6462
6463 #ifdef HAVE_LINUX_THREADS
6464         pthread_kill_other_threads_np();
6465 #endif
6466
6467         exit( status );
6468
6469 ; return 0; }
6470 EOF
6471 if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6472   rm -rf conftest*
6473   ol_cv_pthread_kthread=yes
6474 else
6475   echo "configure: failed program was:" >&5
6476   cat conftest.$ac_ext >&5
6477   rm -rf conftest*
6478   ol_cv_pthread_kthread=no
6479 fi
6480 rm -f conftest*
6481 else
6482   cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* pthread test headers */
6486 #include <pthread.h>
6487 #ifndef NULL
6488 #define NULL (void*)0
6489 #endif
6490
6491 static void *task(p)
6492         void *p;
6493 {
6494         return (void *) (p == NULL);
6495 }
6496
6497
6498 int main(argc, argv)
6499         int argc;
6500         char **argv;
6501 {
6502
6503         /* pthread test function */
6504         pthread_t t;
6505         int status;
6506
6507         /* make sure pthread_create() isn't just a stub */
6508 #if HAVE_PTHREADS_D4
6509         status = pthread_create(&t, pthread_attr_default, task, NULL);
6510 #else
6511         status = pthread_create(&t, NULL, task, NULL);
6512 #endif
6513
6514         if( status ) exit( status );
6515
6516         /* make sure pthread_detach() isn't just a stub */
6517 #if HAVE_PTHREADS_D4
6518         status = pthread_detach( &t );
6519 #else
6520         status = pthread_detach( t );
6521 #endif
6522
6523 #ifdef HAVE_LINUX_THREADS
6524         pthread_kill_other_threads_np();
6525 #endif
6526
6527         exit( status );
6528
6529 }
6530
6531 EOF
6532 if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6533 then
6534   ol_cv_pthread_kthread=yes
6535 else
6536   echo "configure: failed program was:" >&5
6537   cat conftest.$ac_ext >&5
6538   rm -fr conftest*
6539   ol_cv_pthread_kthread=no
6540 fi
6541 rm -fr conftest*
6542 fi
6543
6544
6545                 # restore the LIBS
6546                 LIBS="$ol_LIBS"
6547         
6548 fi
6549
6550 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6551
6552         if test $ol_cv_pthread_kthread = yes ; then
6553                 ol_link_pthreads="-kthread"
6554                 ol_link_threads=posix
6555         fi
6556 fi
6557
6558                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6559 if test "$ol_link_threads" = no ; then
6560         # try -pthread
6561         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6562 echo "configure:6563: checking for pthread link with -pthread" >&5
6563 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6564   echo $ac_n "(cached) $ac_c" 1>&6
6565 else
6566   
6567                 # save the flags
6568                 ol_LIBS="$LIBS"
6569                 LIBS="-pthread $LIBS"
6570
6571                 if test "$cross_compiling" = yes; then
6572   cat > conftest.$ac_ext <<EOF
6573 #line 6574 "configure"
6574 #include "confdefs.h"
6575 /* pthread test headers */
6576 #include <pthread.h>
6577 #ifndef NULL
6578 #define NULL (void*)0
6579 #endif
6580
6581 static void *task(p)
6582         void *p;
6583 {
6584         return (void *) (p == NULL);
6585 }
6586
6587 int main() {
6588
6589         /* pthread test function */
6590         pthread_t t;
6591         int status;
6592
6593         /* make sure pthread_create() isn't just a stub */
6594 #if HAVE_PTHREADS_D4
6595         status = pthread_create(&t, pthread_attr_default, task, NULL);
6596 #else
6597         status = pthread_create(&t, NULL, task, NULL);
6598 #endif
6599
6600         if( status ) exit( status );
6601
6602         /* make sure pthread_detach() isn't just a stub */
6603 #if HAVE_PTHREADS_D4
6604         status = pthread_detach( &t );
6605 #else
6606         status = pthread_detach( t );
6607 #endif
6608
6609 #ifdef HAVE_LINUX_THREADS
6610         pthread_kill_other_threads_np();
6611 #endif
6612
6613         exit( status );
6614
6615 ; return 0; }
6616 EOF
6617 if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6618   rm -rf conftest*
6619   ol_cv_pthread_pthread=yes
6620 else
6621   echo "configure: failed program was:" >&5
6622   cat conftest.$ac_ext >&5
6623   rm -rf conftest*
6624   ol_cv_pthread_pthread=no
6625 fi
6626 rm -f conftest*
6627 else
6628   cat > conftest.$ac_ext <<EOF
6629 #line 6630 "configure"
6630 #include "confdefs.h"
6631 /* pthread test headers */
6632 #include <pthread.h>
6633 #ifndef NULL
6634 #define NULL (void*)0
6635 #endif
6636
6637 static void *task(p)
6638         void *p;
6639 {
6640         return (void *) (p == NULL);
6641 }
6642
6643
6644 int main(argc, argv)
6645         int argc;
6646         char **argv;
6647 {
6648
6649         /* pthread test function */
6650         pthread_t t;
6651         int status;
6652
6653         /* make sure pthread_create() isn't just a stub */
6654 #if HAVE_PTHREADS_D4
6655         status = pthread_create(&t, pthread_attr_default, task, NULL);
6656 #else
6657         status = pthread_create(&t, NULL, task, NULL);
6658 #endif
6659
6660         if( status ) exit( status );
6661
6662         /* make sure pthread_detach() isn't just a stub */
6663 #if HAVE_PTHREADS_D4
6664         status = pthread_detach( &t );
6665 #else
6666         status = pthread_detach( t );
6667 #endif
6668
6669 #ifdef HAVE_LINUX_THREADS
6670         pthread_kill_other_threads_np();
6671 #endif
6672
6673         exit( status );
6674
6675 }
6676
6677 EOF
6678 if { (eval echo configure:6679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6679 then
6680   ol_cv_pthread_pthread=yes
6681 else
6682   echo "configure: failed program was:" >&5
6683   cat conftest.$ac_ext >&5
6684   rm -fr conftest*
6685   ol_cv_pthread_pthread=no
6686 fi
6687 rm -fr conftest*
6688 fi
6689
6690
6691                 # restore the LIBS
6692                 LIBS="$ol_LIBS"
6693         
6694 fi
6695
6696 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6697
6698         if test $ol_cv_pthread_pthread = yes ; then
6699                 ol_link_pthreads="-pthread"
6700                 ol_link_threads=posix
6701         fi
6702 fi
6703
6704                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6705 if test "$ol_link_threads" = no ; then
6706         # try -pthreads
6707         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6708 echo "configure:6709: checking for pthread link with -pthreads" >&5
6709 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6710   echo $ac_n "(cached) $ac_c" 1>&6
6711 else
6712   
6713                 # save the flags
6714                 ol_LIBS="$LIBS"
6715                 LIBS="-pthreads $LIBS"
6716
6717                 if test "$cross_compiling" = yes; then
6718   cat > conftest.$ac_ext <<EOF
6719 #line 6720 "configure"
6720 #include "confdefs.h"
6721 /* pthread test headers */
6722 #include <pthread.h>
6723 #ifndef NULL
6724 #define NULL (void*)0
6725 #endif
6726
6727 static void *task(p)
6728         void *p;
6729 {
6730         return (void *) (p == NULL);
6731 }
6732
6733 int main() {
6734
6735         /* pthread test function */
6736         pthread_t t;
6737         int status;
6738
6739         /* make sure pthread_create() isn't just a stub */
6740 #if HAVE_PTHREADS_D4
6741         status = pthread_create(&t, pthread_attr_default, task, NULL);
6742 #else
6743         status = pthread_create(&t, NULL, task, NULL);
6744 #endif
6745
6746         if( status ) exit( status );
6747
6748         /* make sure pthread_detach() isn't just a stub */
6749 #if HAVE_PTHREADS_D4
6750         status = pthread_detach( &t );
6751 #else
6752         status = pthread_detach( t );
6753 #endif
6754
6755 #ifdef HAVE_LINUX_THREADS
6756         pthread_kill_other_threads_np();
6757 #endif
6758
6759         exit( status );
6760
6761 ; return 0; }
6762 EOF
6763 if { (eval echo configure:6764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6764   rm -rf conftest*
6765   ol_cv_pthread_pthreads=yes
6766 else
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   ol_cv_pthread_pthreads=no
6771 fi
6772 rm -f conftest*
6773 else
6774   cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 /* pthread test headers */
6778 #include <pthread.h>
6779 #ifndef NULL
6780 #define NULL (void*)0
6781 #endif
6782
6783 static void *task(p)
6784         void *p;
6785 {
6786         return (void *) (p == NULL);
6787 }
6788
6789
6790 int main(argc, argv)
6791         int argc;
6792         char **argv;
6793 {
6794
6795         /* pthread test function */
6796         pthread_t t;
6797         int status;
6798
6799         /* make sure pthread_create() isn't just a stub */
6800 #if HAVE_PTHREADS_D4
6801         status = pthread_create(&t, pthread_attr_default, task, NULL);
6802 #else
6803         status = pthread_create(&t, NULL, task, NULL);
6804 #endif
6805
6806         if( status ) exit( status );
6807
6808         /* make sure pthread_detach() isn't just a stub */
6809 #if HAVE_PTHREADS_D4
6810         status = pthread_detach( &t );
6811 #else
6812         status = pthread_detach( t );
6813 #endif
6814
6815 #ifdef HAVE_LINUX_THREADS
6816         pthread_kill_other_threads_np();
6817 #endif
6818
6819         exit( status );
6820
6821 }
6822
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6825 then
6826   ol_cv_pthread_pthreads=yes
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -fr conftest*
6831   ol_cv_pthread_pthreads=no
6832 fi
6833 rm -fr conftest*
6834 fi
6835
6836
6837                 # restore the LIBS
6838                 LIBS="$ol_LIBS"
6839         
6840 fi
6841
6842 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
6843
6844         if test $ol_cv_pthread_pthreads = yes ; then
6845                 ol_link_pthreads="-pthreads"
6846                 ol_link_threads=posix
6847         fi
6848 fi
6849
6850                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
6851 if test "$ol_link_threads" = no ; then
6852         # try -mthreads
6853         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
6854 echo "configure:6855: checking for pthread link with -mthreads" >&5
6855 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
6856   echo $ac_n "(cached) $ac_c" 1>&6
6857 else
6858   
6859                 # save the flags
6860                 ol_LIBS="$LIBS"
6861                 LIBS="-mthreads $LIBS"
6862
6863                 if test "$cross_compiling" = yes; then
6864   cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 /* pthread test headers */
6868 #include <pthread.h>
6869 #ifndef NULL
6870 #define NULL (void*)0
6871 #endif
6872
6873 static void *task(p)
6874         void *p;
6875 {
6876         return (void *) (p == NULL);
6877 }
6878
6879 int main() {
6880
6881         /* pthread test function */
6882         pthread_t t;
6883         int status;
6884
6885         /* make sure pthread_create() isn't just a stub */
6886 #if HAVE_PTHREADS_D4
6887         status = pthread_create(&t, pthread_attr_default, task, NULL);
6888 #else
6889         status = pthread_create(&t, NULL, task, NULL);
6890 #endif
6891
6892         if( status ) exit( status );
6893
6894         /* make sure pthread_detach() isn't just a stub */
6895 #if HAVE_PTHREADS_D4
6896         status = pthread_detach( &t );
6897 #else
6898         status = pthread_detach( t );
6899 #endif
6900
6901 #ifdef HAVE_LINUX_THREADS
6902         pthread_kill_other_threads_np();
6903 #endif
6904
6905         exit( status );
6906
6907 ; return 0; }
6908 EOF
6909 if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6910   rm -rf conftest*
6911   ol_cv_pthread_mthreads=yes
6912 else
6913   echo "configure: failed program was:" >&5
6914   cat conftest.$ac_ext >&5
6915   rm -rf conftest*
6916   ol_cv_pthread_mthreads=no
6917 fi
6918 rm -f conftest*
6919 else
6920   cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 /* pthread test headers */
6924 #include <pthread.h>
6925 #ifndef NULL
6926 #define NULL (void*)0
6927 #endif
6928
6929 static void *task(p)
6930         void *p;
6931 {
6932         return (void *) (p == NULL);
6933 }
6934
6935
6936 int main(argc, argv)
6937         int argc;
6938         char **argv;
6939 {
6940
6941         /* pthread test function */
6942         pthread_t t;
6943         int status;
6944
6945         /* make sure pthread_create() isn't just a stub */
6946 #if HAVE_PTHREADS_D4
6947         status = pthread_create(&t, pthread_attr_default, task, NULL);
6948 #else
6949         status = pthread_create(&t, NULL, task, NULL);
6950 #endif
6951
6952         if( status ) exit( status );
6953
6954         /* make sure pthread_detach() isn't just a stub */
6955 #if HAVE_PTHREADS_D4
6956         status = pthread_detach( &t );
6957 #else
6958         status = pthread_detach( t );
6959 #endif
6960
6961 #ifdef HAVE_LINUX_THREADS
6962         pthread_kill_other_threads_np();
6963 #endif
6964
6965         exit( status );
6966
6967 }
6968
6969 EOF
6970 if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6971 then
6972   ol_cv_pthread_mthreads=yes
6973 else
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -fr conftest*
6977   ol_cv_pthread_mthreads=no
6978 fi
6979 rm -fr conftest*
6980 fi
6981
6982
6983                 # restore the LIBS
6984                 LIBS="$ol_LIBS"
6985         
6986 fi
6987
6988 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
6989
6990         if test $ol_cv_pthread_mthreads = yes ; then
6991                 ol_link_pthreads="-mthreads"
6992                 ol_link_threads=posix
6993         fi
6994 fi
6995
6996                 # Pthread try link: -thread (ol_cv_pthread_thread)
6997 if test "$ol_link_threads" = no ; then
6998         # try -thread
6999         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7000 echo "configure:7001: checking for pthread link with -thread" >&5
7001 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7002   echo $ac_n "(cached) $ac_c" 1>&6
7003 else
7004   
7005                 # save the flags
7006                 ol_LIBS="$LIBS"
7007                 LIBS="-thread $LIBS"
7008
7009                 if test "$cross_compiling" = yes; then
7010   cat > conftest.$ac_ext <<EOF
7011 #line 7012 "configure"
7012 #include "confdefs.h"
7013 /* pthread test headers */
7014 #include <pthread.h>
7015 #ifndef NULL
7016 #define NULL (void*)0
7017 #endif
7018
7019 static void *task(p)
7020         void *p;
7021 {
7022         return (void *) (p == NULL);
7023 }
7024
7025 int main() {
7026
7027         /* pthread test function */
7028         pthread_t t;
7029         int status;
7030
7031         /* make sure pthread_create() isn't just a stub */
7032 #if HAVE_PTHREADS_D4
7033         status = pthread_create(&t, pthread_attr_default, task, NULL);
7034 #else
7035         status = pthread_create(&t, NULL, task, NULL);
7036 #endif
7037
7038         if( status ) exit( status );
7039
7040         /* make sure pthread_detach() isn't just a stub */
7041 #if HAVE_PTHREADS_D4
7042         status = pthread_detach( &t );
7043 #else
7044         status = pthread_detach( t );
7045 #endif
7046
7047 #ifdef HAVE_LINUX_THREADS
7048         pthread_kill_other_threads_np();
7049 #endif
7050
7051         exit( status );
7052
7053 ; return 0; }
7054 EOF
7055 if { (eval echo configure:7056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7056   rm -rf conftest*
7057   ol_cv_pthread_thread=yes
7058 else
7059   echo "configure: failed program was:" >&5
7060   cat conftest.$ac_ext >&5
7061   rm -rf conftest*
7062   ol_cv_pthread_thread=no
7063 fi
7064 rm -f conftest*
7065 else
7066   cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 /* pthread test headers */
7070 #include <pthread.h>
7071 #ifndef NULL
7072 #define NULL (void*)0
7073 #endif
7074
7075 static void *task(p)
7076         void *p;
7077 {
7078         return (void *) (p == NULL);
7079 }
7080
7081
7082 int main(argc, argv)
7083         int argc;
7084         char **argv;
7085 {
7086
7087         /* pthread test function */
7088         pthread_t t;
7089         int status;
7090
7091         /* make sure pthread_create() isn't just a stub */
7092 #if HAVE_PTHREADS_D4
7093         status = pthread_create(&t, pthread_attr_default, task, NULL);
7094 #else
7095         status = pthread_create(&t, NULL, task, NULL);
7096 #endif
7097
7098         if( status ) exit( status );
7099
7100         /* make sure pthread_detach() isn't just a stub */
7101 #if HAVE_PTHREADS_D4
7102         status = pthread_detach( &t );
7103 #else
7104         status = pthread_detach( t );
7105 #endif
7106
7107 #ifdef HAVE_LINUX_THREADS
7108         pthread_kill_other_threads_np();
7109 #endif
7110
7111         exit( status );
7112
7113 }
7114
7115 EOF
7116 if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7117 then
7118   ol_cv_pthread_thread=yes
7119 else
7120   echo "configure: failed program was:" >&5
7121   cat conftest.$ac_ext >&5
7122   rm -fr conftest*
7123   ol_cv_pthread_thread=no
7124 fi
7125 rm -fr conftest*
7126 fi
7127
7128
7129                 # restore the LIBS
7130                 LIBS="$ol_LIBS"
7131         
7132 fi
7133
7134 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7135
7136         if test $ol_cv_pthread_thread = yes ; then
7137                 ol_link_pthreads="-thread"
7138                 ol_link_threads=posix
7139         fi
7140 fi
7141
7142
7143                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7144 if test "$ol_link_threads" = no ; then
7145         # try -lpthread -lmach -lexc -lc_r
7146         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7147 echo "configure:7148: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7148 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151   
7152                 # save the flags
7153                 ol_LIBS="$LIBS"
7154                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7155
7156                 if test "$cross_compiling" = yes; then
7157   cat > conftest.$ac_ext <<EOF
7158 #line 7159 "configure"
7159 #include "confdefs.h"
7160 /* pthread test headers */
7161 #include <pthread.h>
7162 #ifndef NULL
7163 #define NULL (void*)0
7164 #endif
7165
7166 static void *task(p)
7167         void *p;
7168 {
7169         return (void *) (p == NULL);
7170 }
7171
7172 int main() {
7173
7174         /* pthread test function */
7175         pthread_t t;
7176         int status;
7177
7178         /* make sure pthread_create() isn't just a stub */
7179 #if HAVE_PTHREADS_D4
7180         status = pthread_create(&t, pthread_attr_default, task, NULL);
7181 #else
7182         status = pthread_create(&t, NULL, task, NULL);
7183 #endif
7184
7185         if( status ) exit( status );
7186
7187         /* make sure pthread_detach() isn't just a stub */
7188 #if HAVE_PTHREADS_D4
7189         status = pthread_detach( &t );
7190 #else
7191         status = pthread_detach( t );
7192 #endif
7193
7194 #ifdef HAVE_LINUX_THREADS
7195         pthread_kill_other_threads_np();
7196 #endif
7197
7198         exit( status );
7199
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203   rm -rf conftest*
7204   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7210 fi
7211 rm -f conftest*
7212 else
7213   cat > conftest.$ac_ext <<EOF
7214 #line 7215 "configure"
7215 #include "confdefs.h"
7216 /* pthread test headers */
7217 #include <pthread.h>
7218 #ifndef NULL
7219 #define NULL (void*)0
7220 #endif
7221
7222 static void *task(p)
7223         void *p;
7224 {
7225         return (void *) (p == NULL);
7226 }
7227
7228
7229 int main(argc, argv)
7230         int argc;
7231         char **argv;
7232 {
7233
7234         /* pthread test function */
7235         pthread_t t;
7236         int status;
7237
7238         /* make sure pthread_create() isn't just a stub */
7239 #if HAVE_PTHREADS_D4
7240         status = pthread_create(&t, pthread_attr_default, task, NULL);
7241 #else
7242         status = pthread_create(&t, NULL, task, NULL);
7243 #endif
7244
7245         if( status ) exit( status );
7246
7247         /* make sure pthread_detach() isn't just a stub */
7248 #if HAVE_PTHREADS_D4
7249         status = pthread_detach( &t );
7250 #else
7251         status = pthread_detach( t );
7252 #endif
7253
7254 #ifdef HAVE_LINUX_THREADS
7255         pthread_kill_other_threads_np();
7256 #endif
7257
7258         exit( status );
7259
7260 }
7261
7262 EOF
7263 if { (eval echo configure:7264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7264 then
7265   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7266 else
7267   echo "configure: failed program was:" >&5
7268   cat conftest.$ac_ext >&5
7269   rm -fr conftest*
7270   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7271 fi
7272 rm -fr conftest*
7273 fi
7274
7275
7276                 # restore the LIBS
7277                 LIBS="$ol_LIBS"
7278         
7279 fi
7280
7281 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7282
7283         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7284                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7285                 ol_link_threads=posix
7286         fi
7287 fi
7288
7289                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7290 if test "$ol_link_threads" = no ; then
7291         # try -lpthread -lmach -lexc
7292         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7293 echo "configure:7294: checking for pthread link with -lpthread -lmach -lexc" >&5
7294 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7295   echo $ac_n "(cached) $ac_c" 1>&6
7296 else
7297   
7298                 # save the flags
7299                 ol_LIBS="$LIBS"
7300                 LIBS="-lpthread -lmach -lexc $LIBS"
7301
7302                 if test "$cross_compiling" = yes; then
7303   cat > conftest.$ac_ext <<EOF
7304 #line 7305 "configure"
7305 #include "confdefs.h"
7306 /* pthread test headers */
7307 #include <pthread.h>
7308 #ifndef NULL
7309 #define NULL (void*)0
7310 #endif
7311
7312 static void *task(p)
7313         void *p;
7314 {
7315         return (void *) (p == NULL);
7316 }
7317
7318 int main() {
7319
7320         /* pthread test function */
7321         pthread_t t;
7322         int status;
7323
7324         /* make sure pthread_create() isn't just a stub */
7325 #if HAVE_PTHREADS_D4
7326         status = pthread_create(&t, pthread_attr_default, task, NULL);
7327 #else
7328         status = pthread_create(&t, NULL, task, NULL);
7329 #endif
7330
7331         if( status ) exit( status );
7332
7333         /* make sure pthread_detach() isn't just a stub */
7334 #if HAVE_PTHREADS_D4
7335         status = pthread_detach( &t );
7336 #else
7337         status = pthread_detach( t );
7338 #endif
7339
7340 #ifdef HAVE_LINUX_THREADS
7341         pthread_kill_other_threads_np();
7342 #endif
7343
7344         exit( status );
7345
7346 ; return 0; }
7347 EOF
7348 if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7349   rm -rf conftest*
7350   ol_cv_pthread_lpthread_lmach_lexc=yes
7351 else
7352   echo "configure: failed program was:" >&5
7353   cat conftest.$ac_ext >&5
7354   rm -rf conftest*
7355   ol_cv_pthread_lpthread_lmach_lexc=no
7356 fi
7357 rm -f conftest*
7358 else
7359   cat > conftest.$ac_ext <<EOF
7360 #line 7361 "configure"
7361 #include "confdefs.h"
7362 /* pthread test headers */
7363 #include <pthread.h>
7364 #ifndef NULL
7365 #define NULL (void*)0
7366 #endif
7367
7368 static void *task(p)
7369         void *p;
7370 {
7371         return (void *) (p == NULL);
7372 }
7373
7374
7375 int main(argc, argv)
7376         int argc;
7377         char **argv;
7378 {
7379
7380         /* pthread test function */
7381         pthread_t t;
7382         int status;
7383
7384         /* make sure pthread_create() isn't just a stub */
7385 #if HAVE_PTHREADS_D4
7386         status = pthread_create(&t, pthread_attr_default, task, NULL);
7387 #else
7388         status = pthread_create(&t, NULL, task, NULL);
7389 #endif
7390
7391         if( status ) exit( status );
7392
7393         /* make sure pthread_detach() isn't just a stub */
7394 #if HAVE_PTHREADS_D4
7395         status = pthread_detach( &t );
7396 #else
7397         status = pthread_detach( t );
7398 #endif
7399
7400 #ifdef HAVE_LINUX_THREADS
7401         pthread_kill_other_threads_np();
7402 #endif
7403
7404         exit( status );
7405
7406 }
7407
7408 EOF
7409 if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7410 then
7411   ol_cv_pthread_lpthread_lmach_lexc=yes
7412 else
7413   echo "configure: failed program was:" >&5
7414   cat conftest.$ac_ext >&5
7415   rm -fr conftest*
7416   ol_cv_pthread_lpthread_lmach_lexc=no
7417 fi
7418 rm -fr conftest*
7419 fi
7420
7421
7422                 # restore the LIBS
7423                 LIBS="$ol_LIBS"
7424         
7425 fi
7426
7427 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7428
7429         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7430                 ol_link_pthreads="-lpthread -lmach -lexc"
7431                 ol_link_threads=posix
7432         fi
7433 fi
7434
7435
7436                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7437 if test "$ol_link_threads" = no ; then
7438         # try -lpthread -Wl,-woff,85
7439         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7440 echo "configure:7441: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7441 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7442   echo $ac_n "(cached) $ac_c" 1>&6
7443 else
7444   
7445                 # save the flags
7446                 ol_LIBS="$LIBS"
7447                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7448
7449                 if test "$cross_compiling" = yes; then
7450   cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 /* pthread test headers */
7454 #include <pthread.h>
7455 #ifndef NULL
7456 #define NULL (void*)0
7457 #endif
7458
7459 static void *task(p)
7460         void *p;
7461 {
7462         return (void *) (p == NULL);
7463 }
7464
7465 int main() {
7466
7467         /* pthread test function */
7468         pthread_t t;
7469         int status;
7470
7471         /* make sure pthread_create() isn't just a stub */
7472 #if HAVE_PTHREADS_D4
7473         status = pthread_create(&t, pthread_attr_default, task, NULL);
7474 #else
7475         status = pthread_create(&t, NULL, task, NULL);
7476 #endif
7477
7478         if( status ) exit( status );
7479
7480         /* make sure pthread_detach() isn't just a stub */
7481 #if HAVE_PTHREADS_D4
7482         status = pthread_detach( &t );
7483 #else
7484         status = pthread_detach( t );
7485 #endif
7486
7487 #ifdef HAVE_LINUX_THREADS
7488         pthread_kill_other_threads_np();
7489 #endif
7490
7491         exit( status );
7492
7493 ; return 0; }
7494 EOF
7495 if { (eval echo configure:7496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7496   rm -rf conftest*
7497   ol_cv_pthread_lib_lpthread_woff=yes
7498 else
7499   echo "configure: failed program was:" >&5
7500   cat conftest.$ac_ext >&5
7501   rm -rf conftest*
7502   ol_cv_pthread_lib_lpthread_woff=no
7503 fi
7504 rm -f conftest*
7505 else
7506   cat > conftest.$ac_ext <<EOF
7507 #line 7508 "configure"
7508 #include "confdefs.h"
7509 /* pthread test headers */
7510 #include <pthread.h>
7511 #ifndef NULL
7512 #define NULL (void*)0
7513 #endif
7514
7515 static void *task(p)
7516         void *p;
7517 {
7518         return (void *) (p == NULL);
7519 }
7520
7521
7522 int main(argc, argv)
7523         int argc;
7524         char **argv;
7525 {
7526
7527         /* pthread test function */
7528         pthread_t t;
7529         int status;
7530
7531         /* make sure pthread_create() isn't just a stub */
7532 #if HAVE_PTHREADS_D4
7533         status = pthread_create(&t, pthread_attr_default, task, NULL);
7534 #else
7535         status = pthread_create(&t, NULL, task, NULL);
7536 #endif
7537
7538         if( status ) exit( status );
7539
7540         /* make sure pthread_detach() isn't just a stub */
7541 #if HAVE_PTHREADS_D4
7542         status = pthread_detach( &t );
7543 #else
7544         status = pthread_detach( t );
7545 #endif
7546
7547 #ifdef HAVE_LINUX_THREADS
7548         pthread_kill_other_threads_np();
7549 #endif
7550
7551         exit( status );
7552
7553 }
7554
7555 EOF
7556 if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7557 then
7558   ol_cv_pthread_lib_lpthread_woff=yes
7559 else
7560   echo "configure: failed program was:" >&5
7561   cat conftest.$ac_ext >&5
7562   rm -fr conftest*
7563   ol_cv_pthread_lib_lpthread_woff=no
7564 fi
7565 rm -fr conftest*
7566 fi
7567
7568
7569                 # restore the LIBS
7570                 LIBS="$ol_LIBS"
7571         
7572 fi
7573
7574 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7575
7576         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7577                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7578                 ol_link_threads=posix
7579         fi
7580 fi
7581
7582
7583                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7584 if test "$ol_link_threads" = no ; then
7585         # try -lpthread
7586         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7587 echo "configure:7588: checking for pthread link with -lpthread" >&5
7588 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7589   echo $ac_n "(cached) $ac_c" 1>&6
7590 else
7591   
7592                 # save the flags
7593                 ol_LIBS="$LIBS"
7594                 LIBS="-lpthread $LIBS"
7595
7596                 if test "$cross_compiling" = yes; then
7597   cat > conftest.$ac_ext <<EOF
7598 #line 7599 "configure"
7599 #include "confdefs.h"
7600 /* pthread test headers */
7601 #include <pthread.h>
7602 #ifndef NULL
7603 #define NULL (void*)0
7604 #endif
7605
7606 static void *task(p)
7607         void *p;
7608 {
7609         return (void *) (p == NULL);
7610 }
7611
7612 int main() {
7613
7614         /* pthread test function */
7615         pthread_t t;
7616         int status;
7617
7618         /* make sure pthread_create() isn't just a stub */
7619 #if HAVE_PTHREADS_D4
7620         status = pthread_create(&t, pthread_attr_default, task, NULL);
7621 #else
7622         status = pthread_create(&t, NULL, task, NULL);
7623 #endif
7624
7625         if( status ) exit( status );
7626
7627         /* make sure pthread_detach() isn't just a stub */
7628 #if HAVE_PTHREADS_D4
7629         status = pthread_detach( &t );
7630 #else
7631         status = pthread_detach( t );
7632 #endif
7633
7634 #ifdef HAVE_LINUX_THREADS
7635         pthread_kill_other_threads_np();
7636 #endif
7637
7638         exit( status );
7639
7640 ; return 0; }
7641 EOF
7642 if { (eval echo configure:7643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7643   rm -rf conftest*
7644   ol_cv_pthread_lpthread=yes
7645 else
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   ol_cv_pthread_lpthread=no
7650 fi
7651 rm -f conftest*
7652 else
7653   cat > conftest.$ac_ext <<EOF
7654 #line 7655 "configure"
7655 #include "confdefs.h"
7656 /* pthread test headers */
7657 #include <pthread.h>
7658 #ifndef NULL
7659 #define NULL (void*)0
7660 #endif
7661
7662 static void *task(p)
7663         void *p;
7664 {
7665         return (void *) (p == NULL);
7666 }
7667
7668
7669 int main(argc, argv)
7670         int argc;
7671         char **argv;
7672 {
7673
7674         /* pthread test function */
7675         pthread_t t;
7676         int status;
7677
7678         /* make sure pthread_create() isn't just a stub */
7679 #if HAVE_PTHREADS_D4
7680         status = pthread_create(&t, pthread_attr_default, task, NULL);
7681 #else
7682         status = pthread_create(&t, NULL, task, NULL);
7683 #endif
7684
7685         if( status ) exit( status );
7686
7687         /* make sure pthread_detach() isn't just a stub */
7688 #if HAVE_PTHREADS_D4
7689         status = pthread_detach( &t );
7690 #else
7691         status = pthread_detach( t );
7692 #endif
7693
7694 #ifdef HAVE_LINUX_THREADS
7695         pthread_kill_other_threads_np();
7696 #endif
7697
7698         exit( status );
7699
7700 }
7701
7702 EOF
7703 if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7704 then
7705   ol_cv_pthread_lpthread=yes
7706 else
7707   echo "configure: failed program was:" >&5
7708   cat conftest.$ac_ext >&5
7709   rm -fr conftest*
7710   ol_cv_pthread_lpthread=no
7711 fi
7712 rm -fr conftest*
7713 fi
7714
7715
7716                 # restore the LIBS
7717                 LIBS="$ol_LIBS"
7718         
7719 fi
7720
7721 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7722
7723         if test $ol_cv_pthread_lpthread = yes ; then
7724                 ol_link_pthreads="-lpthread"
7725                 ol_link_threads=posix
7726         fi
7727 fi
7728
7729                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7730 if test "$ol_link_threads" = no ; then
7731         # try -lc_r
7732         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7733 echo "configure:7734: checking for pthread link with -lc_r" >&5
7734 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7735   echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737   
7738                 # save the flags
7739                 ol_LIBS="$LIBS"
7740                 LIBS="-lc_r $LIBS"
7741
7742                 if test "$cross_compiling" = yes; then
7743   cat > conftest.$ac_ext <<EOF
7744 #line 7745 "configure"
7745 #include "confdefs.h"
7746 /* pthread test headers */
7747 #include <pthread.h>
7748 #ifndef NULL
7749 #define NULL (void*)0
7750 #endif
7751
7752 static void *task(p)
7753         void *p;
7754 {
7755         return (void *) (p == NULL);
7756 }
7757
7758 int main() {
7759
7760         /* pthread test function */
7761         pthread_t t;
7762         int status;
7763
7764         /* make sure pthread_create() isn't just a stub */
7765 #if HAVE_PTHREADS_D4
7766         status = pthread_create(&t, pthread_attr_default, task, NULL);
7767 #else
7768         status = pthread_create(&t, NULL, task, NULL);
7769 #endif
7770
7771         if( status ) exit( status );
7772
7773         /* make sure pthread_detach() isn't just a stub */
7774 #if HAVE_PTHREADS_D4
7775         status = pthread_detach( &t );
7776 #else
7777         status = pthread_detach( t );
7778 #endif
7779
7780 #ifdef HAVE_LINUX_THREADS
7781         pthread_kill_other_threads_np();
7782 #endif
7783
7784         exit( status );
7785
7786 ; return 0; }
7787 EOF
7788 if { (eval echo configure:7789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7789   rm -rf conftest*
7790   ol_cv_pthread_lc_r=yes
7791 else
7792   echo "configure: failed program was:" >&5
7793   cat conftest.$ac_ext >&5
7794   rm -rf conftest*
7795   ol_cv_pthread_lc_r=no
7796 fi
7797 rm -f conftest*
7798 else
7799   cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 /* pthread test headers */
7803 #include <pthread.h>
7804 #ifndef NULL
7805 #define NULL (void*)0
7806 #endif
7807
7808 static void *task(p)
7809         void *p;
7810 {
7811         return (void *) (p == NULL);
7812 }
7813
7814
7815 int main(argc, argv)
7816         int argc;
7817         char **argv;
7818 {
7819
7820         /* pthread test function */
7821         pthread_t t;
7822         int status;
7823
7824         /* make sure pthread_create() isn't just a stub */
7825 #if HAVE_PTHREADS_D4
7826         status = pthread_create(&t, pthread_attr_default, task, NULL);
7827 #else
7828         status = pthread_create(&t, NULL, task, NULL);
7829 #endif
7830
7831         if( status ) exit( status );
7832
7833         /* make sure pthread_detach() isn't just a stub */
7834 #if HAVE_PTHREADS_D4
7835         status = pthread_detach( &t );
7836 #else
7837         status = pthread_detach( t );
7838 #endif
7839
7840 #ifdef HAVE_LINUX_THREADS
7841         pthread_kill_other_threads_np();
7842 #endif
7843
7844         exit( status );
7845
7846 }
7847
7848 EOF
7849 if { (eval echo configure:7850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7850 then
7851   ol_cv_pthread_lc_r=yes
7852 else
7853   echo "configure: failed program was:" >&5
7854   cat conftest.$ac_ext >&5
7855   rm -fr conftest*
7856   ol_cv_pthread_lc_r=no
7857 fi
7858 rm -fr conftest*
7859 fi
7860
7861
7862                 # restore the LIBS
7863                 LIBS="$ol_LIBS"
7864         
7865 fi
7866
7867 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
7868
7869         if test $ol_cv_pthread_lc_r = yes ; then
7870                 ol_link_pthreads="-lc_r"
7871                 ol_link_threads=posix
7872         fi
7873 fi
7874
7875
7876                 # Pthread try link: -threads (ol_cv_pthread_threads)
7877 if test "$ol_link_threads" = no ; then
7878         # try -threads
7879         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
7880 echo "configure:7881: checking for pthread link with -threads" >&5
7881 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
7882   echo $ac_n "(cached) $ac_c" 1>&6
7883 else
7884   
7885                 # save the flags
7886                 ol_LIBS="$LIBS"
7887                 LIBS="-threads $LIBS"
7888
7889                 if test "$cross_compiling" = yes; then
7890   cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893 /* pthread test headers */
7894 #include <pthread.h>
7895 #ifndef NULL
7896 #define NULL (void*)0
7897 #endif
7898
7899 static void *task(p)
7900         void *p;
7901 {
7902         return (void *) (p == NULL);
7903 }
7904
7905 int main() {
7906
7907         /* pthread test function */
7908         pthread_t t;
7909         int status;
7910
7911         /* make sure pthread_create() isn't just a stub */
7912 #if HAVE_PTHREADS_D4
7913         status = pthread_create(&t, pthread_attr_default, task, NULL);
7914 #else
7915         status = pthread_create(&t, NULL, task, NULL);
7916 #endif
7917
7918         if( status ) exit( status );
7919
7920         /* make sure pthread_detach() isn't just a stub */
7921 #if HAVE_PTHREADS_D4
7922         status = pthread_detach( &t );
7923 #else
7924         status = pthread_detach( t );
7925 #endif
7926
7927 #ifdef HAVE_LINUX_THREADS
7928         pthread_kill_other_threads_np();
7929 #endif
7930
7931         exit( status );
7932
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7936   rm -rf conftest*
7937   ol_cv_pthread_threads=yes
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   ol_cv_pthread_threads=no
7943 fi
7944 rm -f conftest*
7945 else
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
7962 int main(argc, argv)
7963         int argc;
7964         char **argv;
7965 {
7966
7967         /* pthread test function */
7968         pthread_t t;
7969         int status;
7970
7971         /* make sure pthread_create() isn't just a stub */
7972 #if HAVE_PTHREADS_D4
7973         status = pthread_create(&t, pthread_attr_default, task, NULL);
7974 #else
7975         status = pthread_create(&t, NULL, task, NULL);
7976 #endif
7977
7978         if( status ) exit( status );
7979
7980         /* make sure pthread_detach() isn't just a stub */
7981 #if HAVE_PTHREADS_D4
7982         status = pthread_detach( &t );
7983 #else
7984         status = pthread_detach( t );
7985 #endif
7986
7987 #ifdef HAVE_LINUX_THREADS
7988         pthread_kill_other_threads_np();
7989 #endif
7990
7991         exit( status );
7992
7993 }
7994
7995 EOF
7996 if { (eval echo configure:7997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7997 then
7998   ol_cv_pthread_threads=yes
7999 else
8000   echo "configure: failed program was:" >&5
8001   cat conftest.$ac_ext >&5
8002   rm -fr conftest*
8003   ol_cv_pthread_threads=no
8004 fi
8005 rm -fr conftest*
8006 fi
8007
8008
8009                 # restore the LIBS
8010                 LIBS="$ol_LIBS"
8011         
8012 fi
8013
8014 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8015
8016         if test $ol_cv_pthread_threads = yes ; then
8017                 ol_link_pthreads="-threads"
8018                 ol_link_threads=posix
8019         fi
8020 fi
8021
8022
8023                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8024 if test "$ol_link_threads" = no ; then
8025         # try -lpthreads -lmach -lexc -lc_r
8026         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8027 echo "configure:8028: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8028 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8029   echo $ac_n "(cached) $ac_c" 1>&6
8030 else
8031   
8032                 # save the flags
8033                 ol_LIBS="$LIBS"
8034                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8035
8036                 if test "$cross_compiling" = yes; then
8037   cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* pthread test headers */
8041 #include <pthread.h>
8042 #ifndef NULL
8043 #define NULL (void*)0
8044 #endif
8045
8046 static void *task(p)
8047         void *p;
8048 {
8049         return (void *) (p == NULL);
8050 }
8051
8052 int main() {
8053
8054         /* pthread test function */
8055         pthread_t t;
8056         int status;
8057
8058         /* make sure pthread_create() isn't just a stub */
8059 #if HAVE_PTHREADS_D4
8060         status = pthread_create(&t, pthread_attr_default, task, NULL);
8061 #else
8062         status = pthread_create(&t, NULL, task, NULL);
8063 #endif
8064
8065         if( status ) exit( status );
8066
8067         /* make sure pthread_detach() isn't just a stub */
8068 #if HAVE_PTHREADS_D4
8069         status = pthread_detach( &t );
8070 #else
8071         status = pthread_detach( t );
8072 #endif
8073
8074 #ifdef HAVE_LINUX_THREADS
8075         pthread_kill_other_threads_np();
8076 #endif
8077
8078         exit( status );
8079
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8083   rm -rf conftest*
8084   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8090 fi
8091 rm -f conftest*
8092 else
8093   cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 /* pthread test headers */
8097 #include <pthread.h>
8098 #ifndef NULL
8099 #define NULL (void*)0
8100 #endif
8101
8102 static void *task(p)
8103         void *p;
8104 {
8105         return (void *) (p == NULL);
8106 }
8107
8108
8109 int main(argc, argv)
8110         int argc;
8111         char **argv;
8112 {
8113
8114         /* pthread test function */
8115         pthread_t t;
8116         int status;
8117
8118         /* make sure pthread_create() isn't just a stub */
8119 #if HAVE_PTHREADS_D4
8120         status = pthread_create(&t, pthread_attr_default, task, NULL);
8121 #else
8122         status = pthread_create(&t, NULL, task, NULL);
8123 #endif
8124
8125         if( status ) exit( status );
8126
8127         /* make sure pthread_detach() isn't just a stub */
8128 #if HAVE_PTHREADS_D4
8129         status = pthread_detach( &t );
8130 #else
8131         status = pthread_detach( t );
8132 #endif
8133
8134 #ifdef HAVE_LINUX_THREADS
8135         pthread_kill_other_threads_np();
8136 #endif
8137
8138         exit( status );
8139
8140 }
8141
8142 EOF
8143 if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8144 then
8145   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8146 else
8147   echo "configure: failed program was:" >&5
8148   cat conftest.$ac_ext >&5
8149   rm -fr conftest*
8150   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8151 fi
8152 rm -fr conftest*
8153 fi
8154
8155
8156                 # restore the LIBS
8157                 LIBS="$ol_LIBS"
8158         
8159 fi
8160
8161 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8162
8163         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8164                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8165                 ol_link_threads=posix
8166         fi
8167 fi
8168
8169                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8170 if test "$ol_link_threads" = no ; then
8171         # try -lpthreads -lmach -lexc
8172         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8173 echo "configure:8174: checking for pthread link with -lpthreads -lmach -lexc" >&5
8174 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   
8178                 # save the flags
8179                 ol_LIBS="$LIBS"
8180                 LIBS="-lpthreads -lmach -lexc $LIBS"
8181
8182                 if test "$cross_compiling" = yes; then
8183   cat > conftest.$ac_ext <<EOF
8184 #line 8185 "configure"
8185 #include "confdefs.h"
8186 /* pthread test headers */
8187 #include <pthread.h>
8188 #ifndef NULL
8189 #define NULL (void*)0
8190 #endif
8191
8192 static void *task(p)
8193         void *p;
8194 {
8195         return (void *) (p == NULL);
8196 }
8197
8198 int main() {
8199
8200         /* pthread test function */
8201         pthread_t t;
8202         int status;
8203
8204         /* make sure pthread_create() isn't just a stub */
8205 #if HAVE_PTHREADS_D4
8206         status = pthread_create(&t, pthread_attr_default, task, NULL);
8207 #else
8208         status = pthread_create(&t, NULL, task, NULL);
8209 #endif
8210
8211         if( status ) exit( status );
8212
8213         /* make sure pthread_detach() isn't just a stub */
8214 #if HAVE_PTHREADS_D4
8215         status = pthread_detach( &t );
8216 #else
8217         status = pthread_detach( t );
8218 #endif
8219
8220 #ifdef HAVE_LINUX_THREADS
8221         pthread_kill_other_threads_np();
8222 #endif
8223
8224         exit( status );
8225
8226 ; return 0; }
8227 EOF
8228 if { (eval echo configure:8229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8229   rm -rf conftest*
8230   ol_cv_pthread_lpthreads_lmach_lexc=yes
8231 else
8232   echo "configure: failed program was:" >&5
8233   cat conftest.$ac_ext >&5
8234   rm -rf conftest*
8235   ol_cv_pthread_lpthreads_lmach_lexc=no
8236 fi
8237 rm -f conftest*
8238 else
8239   cat > conftest.$ac_ext <<EOF
8240 #line 8241 "configure"
8241 #include "confdefs.h"
8242 /* pthread test headers */
8243 #include <pthread.h>
8244 #ifndef NULL
8245 #define NULL (void*)0
8246 #endif
8247
8248 static void *task(p)
8249         void *p;
8250 {
8251         return (void *) (p == NULL);
8252 }
8253
8254
8255 int main(argc, argv)
8256         int argc;
8257         char **argv;
8258 {
8259
8260         /* pthread test function */
8261         pthread_t t;
8262         int status;
8263
8264         /* make sure pthread_create() isn't just a stub */
8265 #if HAVE_PTHREADS_D4
8266         status = pthread_create(&t, pthread_attr_default, task, NULL);
8267 #else
8268         status = pthread_create(&t, NULL, task, NULL);
8269 #endif
8270
8271         if( status ) exit( status );
8272
8273         /* make sure pthread_detach() isn't just a stub */
8274 #if HAVE_PTHREADS_D4
8275         status = pthread_detach( &t );
8276 #else
8277         status = pthread_detach( t );
8278 #endif
8279
8280 #ifdef HAVE_LINUX_THREADS
8281         pthread_kill_other_threads_np();
8282 #endif
8283
8284         exit( status );
8285
8286 }
8287
8288 EOF
8289 if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8290 then
8291   ol_cv_pthread_lpthreads_lmach_lexc=yes
8292 else
8293   echo "configure: failed program was:" >&5
8294   cat conftest.$ac_ext >&5
8295   rm -fr conftest*
8296   ol_cv_pthread_lpthreads_lmach_lexc=no
8297 fi
8298 rm -fr conftest*
8299 fi
8300
8301
8302                 # restore the LIBS
8303                 LIBS="$ol_LIBS"
8304         
8305 fi
8306
8307 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8308
8309         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8310                 ol_link_pthreads="-lpthreads -lmach -lexc"
8311                 ol_link_threads=posix
8312         fi
8313 fi
8314
8315                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8316 if test "$ol_link_threads" = no ; then
8317         # try -lpthreads -lexc
8318         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8319 echo "configure:8320: checking for pthread link with -lpthreads -lexc" >&5
8320 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8321   echo $ac_n "(cached) $ac_c" 1>&6
8322 else
8323   
8324                 # save the flags
8325                 ol_LIBS="$LIBS"
8326                 LIBS="-lpthreads -lexc $LIBS"
8327
8328                 if test "$cross_compiling" = yes; then
8329   cat > conftest.$ac_ext <<EOF
8330 #line 8331 "configure"
8331 #include "confdefs.h"
8332 /* pthread test headers */
8333 #include <pthread.h>
8334 #ifndef NULL
8335 #define NULL (void*)0
8336 #endif
8337
8338 static void *task(p)
8339         void *p;
8340 {
8341         return (void *) (p == NULL);
8342 }
8343
8344 int main() {
8345
8346         /* pthread test function */
8347         pthread_t t;
8348         int status;
8349
8350         /* make sure pthread_create() isn't just a stub */
8351 #if HAVE_PTHREADS_D4
8352         status = pthread_create(&t, pthread_attr_default, task, NULL);
8353 #else
8354         status = pthread_create(&t, NULL, task, NULL);
8355 #endif
8356
8357         if( status ) exit( status );
8358
8359         /* make sure pthread_detach() isn't just a stub */
8360 #if HAVE_PTHREADS_D4
8361         status = pthread_detach( &t );
8362 #else
8363         status = pthread_detach( t );
8364 #endif
8365
8366 #ifdef HAVE_LINUX_THREADS
8367         pthread_kill_other_threads_np();
8368 #endif
8369
8370         exit( status );
8371
8372 ; return 0; }
8373 EOF
8374 if { (eval echo configure:8375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8375   rm -rf conftest*
8376   ol_cv_pthread_lpthreads_lexc=yes
8377 else
8378   echo "configure: failed program was:" >&5
8379   cat conftest.$ac_ext >&5
8380   rm -rf conftest*
8381   ol_cv_pthread_lpthreads_lexc=no
8382 fi
8383 rm -f conftest*
8384 else
8385   cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388 /* pthread test headers */
8389 #include <pthread.h>
8390 #ifndef NULL
8391 #define NULL (void*)0
8392 #endif
8393
8394 static void *task(p)
8395         void *p;
8396 {
8397         return (void *) (p == NULL);
8398 }
8399
8400
8401 int main(argc, argv)
8402         int argc;
8403         char **argv;
8404 {
8405
8406         /* pthread test function */
8407         pthread_t t;
8408         int status;
8409
8410         /* make sure pthread_create() isn't just a stub */
8411 #if HAVE_PTHREADS_D4
8412         status = pthread_create(&t, pthread_attr_default, task, NULL);
8413 #else
8414         status = pthread_create(&t, NULL, task, NULL);
8415 #endif
8416
8417         if( status ) exit( status );
8418
8419         /* make sure pthread_detach() isn't just a stub */
8420 #if HAVE_PTHREADS_D4
8421         status = pthread_detach( &t );
8422 #else
8423         status = pthread_detach( t );
8424 #endif
8425
8426 #ifdef HAVE_LINUX_THREADS
8427         pthread_kill_other_threads_np();
8428 #endif
8429
8430         exit( status );
8431
8432 }
8433
8434 EOF
8435 if { (eval echo configure:8436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8436 then
8437   ol_cv_pthread_lpthreads_lexc=yes
8438 else
8439   echo "configure: failed program was:" >&5
8440   cat conftest.$ac_ext >&5
8441   rm -fr conftest*
8442   ol_cv_pthread_lpthreads_lexc=no
8443 fi
8444 rm -fr conftest*
8445 fi
8446
8447
8448                 # restore the LIBS
8449                 LIBS="$ol_LIBS"
8450         
8451 fi
8452
8453 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8454
8455         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8456                 ol_link_pthreads="-lpthreads -lexc"
8457                 ol_link_threads=posix
8458         fi
8459 fi
8460
8461
8462                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8463 if test "$ol_link_threads" = no ; then
8464         # try -lpthreads
8465         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8466 echo "configure:8467: checking for pthread link with -lpthreads" >&5
8467 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8468   echo $ac_n "(cached) $ac_c" 1>&6
8469 else
8470   
8471                 # save the flags
8472                 ol_LIBS="$LIBS"
8473                 LIBS="-lpthreads $LIBS"
8474
8475                 if test "$cross_compiling" = yes; then
8476   cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 /* pthread test headers */
8480 #include <pthread.h>
8481 #ifndef NULL
8482 #define NULL (void*)0
8483 #endif
8484
8485 static void *task(p)
8486         void *p;
8487 {
8488         return (void *) (p == NULL);
8489 }
8490
8491 int main() {
8492
8493         /* pthread test function */
8494         pthread_t t;
8495         int status;
8496
8497         /* make sure pthread_create() isn't just a stub */
8498 #if HAVE_PTHREADS_D4
8499         status = pthread_create(&t, pthread_attr_default, task, NULL);
8500 #else
8501         status = pthread_create(&t, NULL, task, NULL);
8502 #endif
8503
8504         if( status ) exit( status );
8505
8506         /* make sure pthread_detach() isn't just a stub */
8507 #if HAVE_PTHREADS_D4
8508         status = pthread_detach( &t );
8509 #else
8510         status = pthread_detach( t );
8511 #endif
8512
8513 #ifdef HAVE_LINUX_THREADS
8514         pthread_kill_other_threads_np();
8515 #endif
8516
8517         exit( status );
8518
8519 ; return 0; }
8520 EOF
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522   rm -rf conftest*
8523   ol_cv_pthread_lib_lpthreads=yes
8524 else
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   ol_cv_pthread_lib_lpthreads=no
8529 fi
8530 rm -f conftest*
8531 else
8532   cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 /* pthread test headers */
8536 #include <pthread.h>
8537 #ifndef NULL
8538 #define NULL (void*)0
8539 #endif
8540
8541 static void *task(p)
8542         void *p;
8543 {
8544         return (void *) (p == NULL);
8545 }
8546
8547
8548 int main(argc, argv)
8549         int argc;
8550         char **argv;
8551 {
8552
8553         /* pthread test function */
8554         pthread_t t;
8555         int status;
8556
8557         /* make sure pthread_create() isn't just a stub */
8558 #if HAVE_PTHREADS_D4
8559         status = pthread_create(&t, pthread_attr_default, task, NULL);
8560 #else
8561         status = pthread_create(&t, NULL, task, NULL);
8562 #endif
8563
8564         if( status ) exit( status );
8565
8566         /* make sure pthread_detach() isn't just a stub */
8567 #if HAVE_PTHREADS_D4
8568         status = pthread_detach( &t );
8569 #else
8570         status = pthread_detach( t );
8571 #endif
8572
8573 #ifdef HAVE_LINUX_THREADS
8574         pthread_kill_other_threads_np();
8575 #endif
8576
8577         exit( status );
8578
8579 }
8580
8581 EOF
8582 if { (eval echo configure:8583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8583 then
8584   ol_cv_pthread_lib_lpthreads=yes
8585 else
8586   echo "configure: failed program was:" >&5
8587   cat conftest.$ac_ext >&5
8588   rm -fr conftest*
8589   ol_cv_pthread_lib_lpthreads=no
8590 fi
8591 rm -fr conftest*
8592 fi
8593
8594
8595                 # restore the LIBS
8596                 LIBS="$ol_LIBS"
8597         
8598 fi
8599
8600 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8601
8602         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8603                 ol_link_pthreads="-lpthreads"
8604                 ol_link_threads=posix
8605         fi
8606 fi
8607
8608
8609                 if test $ol_link_threads != no ; then
8610                         cat >> confdefs.h <<\EOF
8611 #define HAVE_PTHREADS 1
8612 EOF
8613
8614
8615                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8616
8617                                                 save_CPPFLAGS="$CPPFLAGS"
8618                         save_LIBS="$LIBS"
8619                         LIBS="$LTHREAD_LIBS $LIBS"
8620
8621                                                                                                 for ac_func in sched_yield pthread_yield
8622 do
8623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8624 echo "configure:8625: checking for $ac_func" >&5
8625 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 /* System header to define __stub macros and hopefully few prototypes,
8632     which can conflict with char $ac_func(); below.  */
8633 #include <assert.h>
8634 /* Override any gcc2 internal prototype to avoid an error.  */
8635 /* We use char because int might match the return type of a gcc2
8636     builtin and then its argument prototype would still apply.  */
8637 char $ac_func();
8638 char (*f)();
8639
8640 int main() {
8641
8642 /* The GNU C library defines this for functions which it implements
8643     to always fail with ENOSYS.  Some functions are actually named
8644     something starting with __ and the normal name is an alias.  */
8645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8646 choke me
8647 #else
8648 f = $ac_func;
8649 #endif
8650
8651 ; return 0; }
8652 EOF
8653 if { (eval echo configure:8654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8654   rm -rf conftest*
8655   eval "ac_cv_func_$ac_func=yes"
8656 else
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -rf conftest*
8660   eval "ac_cv_func_$ac_func=no"
8661 fi
8662 rm -f conftest*
8663 fi
8664
8665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8666   echo "$ac_t""yes" 1>&6
8667     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8668   cat >> confdefs.h <<EOF
8669 #define $ac_tr_func 1
8670 EOF
8671  
8672 else
8673   echo "$ac_t""no" 1>&6
8674 fi
8675 done
8676
8677
8678                         if test $ac_cv_func_sched_yield = no -a \
8679                                 $ac_cv_func_pthread_yield = no ; then
8680                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8681 echo "configure:8682: checking for sched_yield in -lrt" >&5
8682 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8683 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8684   echo $ac_n "(cached) $ac_c" 1>&6
8685 else
8686   ac_save_LIBS="$LIBS"
8687 LIBS="-lrt  $LIBS"
8688 cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691 /* Override any gcc2 internal prototype to avoid an error.  */
8692 /* We use char because int might match the return type of a gcc2
8693     builtin and then its argument prototype would still apply.  */
8694 char sched_yield();
8695
8696 int main() {
8697 sched_yield()
8698 ; return 0; }
8699 EOF
8700 if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8701   rm -rf conftest*
8702   eval "ac_cv_lib_$ac_lib_var=yes"
8703 else
8704   echo "configure: failed program was:" >&5
8705   cat conftest.$ac_ext >&5
8706   rm -rf conftest*
8707   eval "ac_cv_lib_$ac_lib_var=no"
8708 fi
8709 rm -f conftest*
8710 LIBS="$ac_save_LIBS"
8711
8712 fi
8713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8714   echo "$ac_t""yes" 1>&6
8715   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8716                                         cat >> confdefs.h <<\EOF
8717 #define HAVE_SCHED_YIELD 1
8718 EOF
8719
8720                                         ac_cv_func_sched_yield=yes
8721 else
8722   echo "$ac_t""no" 1>&6
8723 ac_cv_func_sched_yield=no
8724 fi
8725
8726                         fi
8727                         if test $ac_cv_func_sched_yield = no -a \
8728                                 $ac_cv_func_pthread_yield = no ; then
8729                                                                                                 for ac_func in thr_yield
8730 do
8731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8732 echo "configure:8733: checking for $ac_func" >&5
8733 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8734   echo $ac_n "(cached) $ac_c" 1>&6
8735 else
8736   cat > conftest.$ac_ext <<EOF
8737 #line 8738 "configure"
8738 #include "confdefs.h"
8739 /* System header to define __stub macros and hopefully few prototypes,
8740     which can conflict with char $ac_func(); below.  */
8741 #include <assert.h>
8742 /* Override any gcc2 internal prototype to avoid an error.  */
8743 /* We use char because int might match the return type of a gcc2
8744     builtin and then its argument prototype would still apply.  */
8745 char $ac_func();
8746 char (*f)();
8747
8748 int main() {
8749
8750 /* The GNU C library defines this for functions which it implements
8751     to always fail with ENOSYS.  Some functions are actually named
8752     something starting with __ and the normal name is an alias.  */
8753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8754 choke me
8755 #else
8756 f = $ac_func;
8757 #endif
8758
8759 ; return 0; }
8760 EOF
8761 if { (eval echo configure:8762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8762   rm -rf conftest*
8763   eval "ac_cv_func_$ac_func=yes"
8764 else
8765   echo "configure: failed program was:" >&5
8766   cat conftest.$ac_ext >&5
8767   rm -rf conftest*
8768   eval "ac_cv_func_$ac_func=no"
8769 fi
8770 rm -f conftest*
8771 fi
8772
8773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8774   echo "$ac_t""yes" 1>&6
8775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8776   cat >> confdefs.h <<EOF
8777 #define $ac_tr_func 1
8778 EOF
8779  
8780 else
8781   echo "$ac_t""no" 1>&6
8782 fi
8783 done
8784
8785                         fi
8786                         if test $ac_cv_func_sched_yield = no -a \
8787                                 $ac_cv_func_pthread_yield = no -a \
8788                                 "$ac_cv_func_thr_yield" = no ; then
8789                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
8790                         fi
8791
8792                                                 for ac_func in pthread_kill
8793 do
8794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8795 echo "configure:8796: checking for $ac_func" >&5
8796 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8797   echo $ac_n "(cached) $ac_c" 1>&6
8798 else
8799   cat > conftest.$ac_ext <<EOF
8800 #line 8801 "configure"
8801 #include "confdefs.h"
8802 /* System header to define __stub macros and hopefully few prototypes,
8803     which can conflict with char $ac_func(); below.  */
8804 #include <assert.h>
8805 /* Override any gcc2 internal prototype to avoid an error.  */
8806 /* We use char because int might match the return type of a gcc2
8807     builtin and then its argument prototype would still apply.  */
8808 char $ac_func();
8809 char (*f)();
8810
8811 int main() {
8812
8813 /* The GNU C library defines this for functions which it implements
8814     to always fail with ENOSYS.  Some functions are actually named
8815     something starting with __ and the normal name is an alias.  */
8816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8817 choke me
8818 #else
8819 f = $ac_func;
8820 #endif
8821
8822 ; return 0; }
8823 EOF
8824 if { (eval echo configure:8825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8825   rm -rf conftest*
8826   eval "ac_cv_func_$ac_func=yes"
8827 else
8828   echo "configure: failed program was:" >&5
8829   cat conftest.$ac_ext >&5
8830   rm -rf conftest*
8831   eval "ac_cv_func_$ac_func=no"
8832 fi
8833 rm -f conftest*
8834 fi
8835
8836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8837   echo "$ac_t""yes" 1>&6
8838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8839   cat >> confdefs.h <<EOF
8840 #define $ac_tr_func 1
8841 EOF
8842  
8843 else
8844   echo "$ac_t""no" 1>&6
8845 fi
8846 done
8847
8848
8849                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
8850 echo "configure:8851: checking for pthread_detach with <pthread.h>" >&5
8851 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
8852   echo $ac_n "(cached) $ac_c" 1>&6
8853 else
8854   
8855                                                                 cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858
8859 #include <pthread.h>
8860 #ifndef NULL
8861 #define NULL (void*)0
8862 #endif
8863
8864 int main() {
8865 pthread_detach(NULL);
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8869   rm -rf conftest*
8870   ol_cv_func_pthread_detach=yes
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   ol_cv_func_pthread_detach=no
8876 fi
8877 rm -f conftest*
8878                         
8879 fi
8880
8881 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
8882
8883                         if test $ol_cv_func_pthread_detach = no ; then
8884                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
8885                         fi
8886
8887                         cat >> confdefs.h <<\EOF
8888 #define HAVE_PTHREAD_DETACH 1
8889 EOF
8890
8891
8892                                                 for ac_func in \
8893                                 pthread_setconcurrency \
8894                                 pthread_getconcurrency \
8895                                 thr_setconcurrency \
8896                                 thr_getconcurrency \
8897                         
8898 do
8899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8900 echo "configure:8901: checking for $ac_func" >&5
8901 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8902   echo $ac_n "(cached) $ac_c" 1>&6
8903 else
8904   cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907 /* System header to define __stub macros and hopefully few prototypes,
8908     which can conflict with char $ac_func(); below.  */
8909 #include <assert.h>
8910 /* Override any gcc2 internal prototype to avoid an error.  */
8911 /* We use char because int might match the return type of a gcc2
8912     builtin and then its argument prototype would still apply.  */
8913 char $ac_func();
8914 char (*f)();
8915
8916 int main() {
8917
8918 /* The GNU C library defines this for functions which it implements
8919     to always fail with ENOSYS.  Some functions are actually named
8920     something starting with __ and the normal name is an alias.  */
8921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8922 choke me
8923 #else
8924 f = $ac_func;
8925 #endif
8926
8927 ; return 0; }
8928 EOF
8929 if { (eval echo configure:8930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8930   rm -rf conftest*
8931   eval "ac_cv_func_$ac_func=yes"
8932 else
8933   echo "configure: failed program was:" >&5
8934   cat conftest.$ac_ext >&5
8935   rm -rf conftest*
8936   eval "ac_cv_func_$ac_func=no"
8937 fi
8938 rm -f conftest*
8939 fi
8940
8941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8944   cat >> confdefs.h <<EOF
8945 #define $ac_tr_func 1
8946 EOF
8947  
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951 done
8952
8953
8954                         
8955         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
8956 echo "configure:8957: checking for pthread_kill_other_threads_np" >&5
8957 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 /* System header to define __stub macros and hopefully few prototypes,
8964     which can conflict with char pthread_kill_other_threads_np(); below.  */
8965 #include <assert.h>
8966 /* Override any gcc2 internal prototype to avoid an error.  */
8967 /* We use char because int might match the return type of a gcc2
8968     builtin and then its argument prototype would still apply.  */
8969 char pthread_kill_other_threads_np();
8970 char (*f)();
8971
8972 int main() {
8973
8974 /* The GNU C library defines this for functions which it implements
8975     to always fail with ENOSYS.  Some functions are actually named
8976     something starting with __ and the normal name is an alias.  */
8977 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
8978 choke me
8979 #else
8980 f = pthread_kill_other_threads_np;
8981 #endif
8982
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8986   rm -rf conftest*
8987   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   eval "ac_cv_func_pthread_kill_other_threads_np=no"
8993 fi
8994 rm -f conftest*
8995 fi
8996
8997 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
8998   echo "$ac_t""yes" 1>&6
8999   :
9000 else
9001   echo "$ac_t""no" 1>&6
9002 fi
9003
9004         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9005 echo "configure:9006: checking for LinuxThreads implementation" >&5
9006 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9007   echo $ac_n "(cached) $ac_c" 1>&6
9008 else
9009   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9010 fi
9011
9012 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9013
9014                         
9015         
9016         
9017         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9018 echo "configure:9019: checking for LinuxThreads consistency" >&5
9019 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9020   echo $ac_n "(cached) $ac_c" 1>&6
9021 else
9022   
9023                 if test $ol_cv_header_linux_threads = yes -a \
9024                         $ol_cv_sys_linux_threads = yes; then
9025                         ol_cv_linux_threads=yes
9026                 elif test $ol_cv_header_linux_threads = no -a \
9027                         $ol_cv_sys_linux_threads = no; then
9028                         ol_cv_linux_threads=no
9029                 else
9030                         ol_cv_linux_threads=error
9031                 fi
9032         
9033 fi
9034
9035 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9036
9037
9038                         if test $ol_cv_linux_threads = error; then
9039                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9040                         fi
9041
9042                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9043 echo "configure:9044: checking if pthread_create() works" >&5
9044 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9045   echo $ac_n "(cached) $ac_c" 1>&6
9046 else
9047   
9048                         if test "$cross_compiling" = yes; then
9049                                 ol_cv_pthread_create_works=yes
9050 else
9051   cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 /* pthread test headers */
9055 #include <pthread.h>
9056 #ifndef NULL
9057 #define NULL (void*)0
9058 #endif
9059
9060 static void *task(p)
9061         void *p;
9062 {
9063         return (void *) (p == NULL);
9064 }
9065
9066
9067 int main(argc, argv)
9068         int argc;
9069         char **argv;
9070 {
9071
9072         /* pthread test function */
9073         pthread_t t;
9074         int status;
9075
9076         /* make sure pthread_create() isn't just a stub */
9077 #if HAVE_PTHREADS_D4
9078         status = pthread_create(&t, pthread_attr_default, task, NULL);
9079 #else
9080         status = pthread_create(&t, NULL, task, NULL);
9081 #endif
9082
9083         if( status ) exit( status );
9084
9085         /* make sure pthread_detach() isn't just a stub */
9086 #if HAVE_PTHREADS_D4
9087         status = pthread_detach( &t );
9088 #else
9089         status = pthread_detach( t );
9090 #endif
9091
9092 #ifdef HAVE_LINUX_THREADS
9093         pthread_kill_other_threads_np();
9094 #endif
9095
9096         exit( status );
9097
9098 }
9099
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9102 then
9103   ol_cv_pthread_create_works=yes
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -fr conftest*
9108   ol_cv_pthread_create_works=no
9109 fi
9110 rm -fr conftest*
9111 fi
9112
9113 fi
9114
9115 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9116
9117                         if test $ol_cv_pthread_create_works = no ; then
9118                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9119                         fi
9120
9121                                                 if test $ol_with_yielding_select = auto ; then
9122                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9123 echo "configure:9124: checking if select yields when using pthreads" >&5
9124 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128                                 if test "$cross_compiling" = yes; then
9129   ol_cv_pthread_select_yields=cross
9130 else
9131   cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134
9135 #include <sys/types.h>
9136 #include <sys/time.h>
9137 #include <unistd.h>
9138 #include <pthread.h>
9139 #ifndef NULL
9140 #define NULL (void*) 0
9141 #endif
9142
9143 static int fildes[2];
9144
9145 static void *task(p)
9146         void *p;
9147 {
9148         int i;
9149         struct timeval tv;
9150
9151         fd_set rfds;
9152
9153         tv.tv_sec=10;
9154         tv.tv_usec=0;
9155
9156         FD_ZERO(&rfds);
9157         FD_SET(fildes[0], &rfds);
9158
9159         /* we're not interested in any fds */
9160         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9161
9162         if(i < 0) {
9163                 perror("select");
9164                 exit(10);
9165         }
9166
9167         exit(0); /* if we exit here, the select blocked the whole process */
9168 }
9169
9170 int main(argc, argv)
9171         int argc;
9172         char **argv;
9173 {
9174         pthread_t t;
9175
9176         /* create a pipe to select */
9177         if(pipe(&fildes[0])) {
9178                 perror("select");
9179                 exit(1);
9180         }
9181
9182 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9183         (void) pthread_setconcurrency(2);
9184 #else
9185 #ifdef HAVE_THR_SETCONCURRENCY
9186         /* Set Solaris LWP concurrency to 2 */
9187         thr_setconcurrency(2);
9188 #endif
9189 #endif
9190
9191 #if HAVE_PTHREADS_D4
9192         pthread_create(&t, pthread_attr_default, task, NULL);
9193 #else
9194         pthread_create(&t, NULL, task, NULL);
9195 #endif
9196
9197 #if HAVE_SCHED_YIELD
9198         sched_yield();  /* make sure task runs first */
9199 #else
9200 #ifdef HAVE_PTHREAD_YIELD
9201         pthread_yield();        /* make sure task runs first */
9202 #endif
9203 #endif
9204
9205         exit(2);
9206 }
9207 EOF
9208 if { (eval echo configure:9209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9209 then
9210   ol_cv_pthread_select_yields=no
9211 else
9212   echo "configure: failed program was:" >&5
9213   cat conftest.$ac_ext >&5
9214   rm -fr conftest*
9215   ol_cv_pthread_select_yields=yes
9216 fi
9217 rm -fr conftest*
9218 fi
9219
9220 fi
9221
9222 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9223
9224                                 if test $ol_cv_pthread_select_yields = cross ; then
9225                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9226                                 fi
9227
9228                                 if test $ol_cv_pthread_select_yields = yes ; then
9229                                         ol_with_yielding_select=yes
9230                                 fi
9231                         fi
9232
9233                                                 CPPFLAGS="$save_CPPFLAGS"
9234                         LIBS="$save_LIBS"
9235                 else
9236                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9237                 fi
9238         fi
9239
9240         if test $ol_with_threads = posix ; then
9241                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9242         fi
9243 fi
9244
9245 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9246         -o $ol_with_threads = mach ; then
9247
9248                 for ac_hdr in mach/cthreads.h
9249 do
9250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9252 echo "configure:9253: checking for $ac_hdr" >&5
9253 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9254   echo $ac_n "(cached) $ac_c" 1>&6
9255 else
9256   cat > conftest.$ac_ext <<EOF
9257 #line 9258 "configure"
9258 #include "confdefs.h"
9259 #include <$ac_hdr>
9260 EOF
9261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9262 { (eval echo configure:9263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9264 if test -z "$ac_err"; then
9265   rm -rf conftest*
9266   eval "ac_cv_header_$ac_safe=yes"
9267 else
9268   echo "$ac_err" >&5
9269   echo "configure: failed program was:" >&5
9270   cat conftest.$ac_ext >&5
9271   rm -rf conftest*
9272   eval "ac_cv_header_$ac_safe=no"
9273 fi
9274 rm -f conftest*
9275 fi
9276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9277   echo "$ac_t""yes" 1>&6
9278     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9279   cat >> confdefs.h <<EOF
9280 #define $ac_tr_hdr 1
9281 EOF
9282  
9283 else
9284   echo "$ac_t""no" 1>&6
9285 fi
9286 done
9287
9288         if test $ac_cv_header_mach_cthreads_h = yes ; then
9289                 ol_with_threads=found
9290
9291                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9292 echo "configure:9293: checking for cthread_fork" >&5
9293 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9294   echo $ac_n "(cached) $ac_c" 1>&6
9295 else
9296   cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 /* System header to define __stub macros and hopefully few prototypes,
9300     which can conflict with char cthread_fork(); below.  */
9301 #include <assert.h>
9302 /* Override any gcc2 internal prototype to avoid an error.  */
9303 /* We use char because int might match the return type of a gcc2
9304     builtin and then its argument prototype would still apply.  */
9305 char cthread_fork();
9306 char (*f)();
9307
9308 int main() {
9309
9310 /* The GNU C library defines this for functions which it implements
9311     to always fail with ENOSYS.  Some functions are actually named
9312     something starting with __ and the normal name is an alias.  */
9313 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9314 choke me
9315 #else
9316 f = cthread_fork;
9317 #endif
9318
9319 ; return 0; }
9320 EOF
9321 if { (eval echo configure:9322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9322   rm -rf conftest*
9323   eval "ac_cv_func_cthread_fork=yes"
9324 else
9325   echo "configure: failed program was:" >&5
9326   cat conftest.$ac_ext >&5
9327   rm -rf conftest*
9328   eval "ac_cv_func_cthread_fork=no"
9329 fi
9330 rm -f conftest*
9331 fi
9332
9333 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9334   echo "$ac_t""yes" 1>&6
9335   ol_link_threads=yes
9336 else
9337   echo "$ac_t""no" 1>&6
9338 fi
9339
9340
9341                 if test $ol_link_threads = no ; then
9342                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9343 echo "configure:9344: checking for cthread_fork with -all_load" >&5
9344 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9345   echo $ac_n "(cached) $ac_c" 1>&6
9346 else
9347   
9348                                                                 save_LIBS="$LIBS"
9349                                 LIBS="-all_load $LIBS"
9350                                 cat > conftest.$ac_ext <<EOF
9351 #line 9352 "configure"
9352 #include "confdefs.h"
9353 #include <mach/cthreads.h>
9354 int main() {
9355
9356                                         cthread_fork((void *)0, (void *)0);
9357                                         
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9361   rm -rf conftest*
9362   ol_cv_cthread_all_load=yes
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   ol_cv_cthread_all_load=no
9368 fi
9369 rm -f conftest*
9370                                                                 LIBS="$save_LIBS"
9371                         
9372 fi
9373
9374 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9375
9376                         if test $ol_cv_cthread_all_load = yes ; then
9377                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9378                                 ol_link_threads=mach
9379                         fi
9380                 fi
9381
9382                 if test $ol_link_threads != no ; then
9383                         : check for cthread specific functionality here
9384                         cat >> confdefs.h <<\EOF
9385 #define HAVE_MACH_CTHREADS 1
9386 EOF
9387
9388                 else
9389                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9390                 fi
9391         fi
9392
9393         if test $ol_with_threads = mach ; then
9394                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9395         fi
9396 fi
9397
9398 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9399         -o $ol_with_threads = pth ; then
9400
9401         for ac_hdr in pth.h
9402 do
9403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9405 echo "configure:9406: checking for $ac_hdr" >&5
9406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 #include <$ac_hdr>
9413 EOF
9414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9415 { (eval echo configure:9416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9417 if test -z "$ac_err"; then
9418   rm -rf conftest*
9419   eval "ac_cv_header_$ac_safe=yes"
9420 else
9421   echo "$ac_err" >&5
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_header_$ac_safe=no"
9426 fi
9427 rm -f conftest*
9428 fi
9429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9430   echo "$ac_t""yes" 1>&6
9431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9432   cat >> confdefs.h <<EOF
9433 #define $ac_tr_hdr 1
9434 EOF
9435  
9436 else
9437   echo "$ac_t""no" 1>&6
9438 fi
9439 done
9440
9441
9442         if test $ac_cv_header_pth_h = yes ; then
9443                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9444 echo "configure:9445: checking for pth_version in -lpth" >&5
9445 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9446 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9447   echo $ac_n "(cached) $ac_c" 1>&6
9448 else
9449   ac_save_LIBS="$LIBS"
9450 LIBS="-lpth  $LIBS"
9451 cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454 /* Override any gcc2 internal prototype to avoid an error.  */
9455 /* We use char because int might match the return type of a gcc2
9456     builtin and then its argument prototype would still apply.  */
9457 char pth_version();
9458
9459 int main() {
9460 pth_version()
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9464   rm -rf conftest*
9465   eval "ac_cv_lib_$ac_lib_var=yes"
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   eval "ac_cv_lib_$ac_lib_var=no"
9471 fi
9472 rm -f conftest*
9473 LIBS="$ac_save_LIBS"
9474
9475 fi
9476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9477   echo "$ac_t""yes" 1>&6
9478   have_pth=yes
9479 else
9480   echo "$ac_t""no" 1>&6
9481 have_pth=no
9482 fi
9483
9484
9485                 if test $have_pth = yes ; then
9486                         cat >> confdefs.h <<\EOF
9487 #define HAVE_GNU_PTH 1
9488 EOF
9489
9490                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9491                         ol_link_threads=pth
9492
9493                         if test $ol_with_yielding_select = auto ; then
9494                                 ol_with_yielding_select=yes
9495                         fi
9496                 fi
9497         fi
9498 fi
9499
9500 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9501         -o $ol_with_threads = lwp ; then
9502
9503                 for ac_hdr in thread.h synch.h
9504 do
9505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9507 echo "configure:9508: checking for $ac_hdr" >&5
9508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511   cat > conftest.$ac_ext <<EOF
9512 #line 9513 "configure"
9513 #include "confdefs.h"
9514 #include <$ac_hdr>
9515 EOF
9516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9517 { (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9519 if test -z "$ac_err"; then
9520   rm -rf conftest*
9521   eval "ac_cv_header_$ac_safe=yes"
9522 else
9523   echo "$ac_err" >&5
9524   echo "configure: failed program was:" >&5
9525   cat conftest.$ac_ext >&5
9526   rm -rf conftest*
9527   eval "ac_cv_header_$ac_safe=no"
9528 fi
9529 rm -f conftest*
9530 fi
9531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9532   echo "$ac_t""yes" 1>&6
9533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9534   cat >> confdefs.h <<EOF
9535 #define $ac_tr_hdr 1
9536 EOF
9537  
9538 else
9539   echo "$ac_t""no" 1>&6
9540 fi
9541 done
9542
9543         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9544                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9545 echo "configure:9546: checking for thr_create in -lthread" >&5
9546 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9548   echo $ac_n "(cached) $ac_c" 1>&6
9549 else
9550   ac_save_LIBS="$LIBS"
9551 LIBS="-lthread  $LIBS"
9552 cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 /* Override any gcc2 internal prototype to avoid an error.  */
9556 /* We use char because int might match the return type of a gcc2
9557     builtin and then its argument prototype would still apply.  */
9558 char thr_create();
9559
9560 int main() {
9561 thr_create()
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9565   rm -rf conftest*
9566   eval "ac_cv_lib_$ac_lib_var=yes"
9567 else
9568   echo "configure: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   rm -rf conftest*
9571   eval "ac_cv_lib_$ac_lib_var=no"
9572 fi
9573 rm -f conftest*
9574 LIBS="$ac_save_LIBS"
9575
9576 fi
9577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9578   echo "$ac_t""yes" 1>&6
9579   have_thr=yes
9580 else
9581   echo "$ac_t""no" 1>&6
9582 have_thr=no
9583 fi
9584
9585
9586                 if test $have_thr = yes ; then
9587                         cat >> confdefs.h <<\EOF
9588 #define HAVE_THR 1
9589 EOF
9590
9591                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9592                         ol_link_threads=thr
9593
9594                         if test $ol_with_yielding_select = auto ; then
9595                                 ol_with_yielding_select=yes
9596                         fi
9597
9598                                                 for ac_func in \
9599                                 thr_setconcurrency \
9600                                 thr_getconcurrency \
9601                         
9602 do
9603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9604 echo "configure:9605: checking for $ac_func" >&5
9605 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608   cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 /* System header to define __stub macros and hopefully few prototypes,
9612     which can conflict with char $ac_func(); below.  */
9613 #include <assert.h>
9614 /* Override any gcc2 internal prototype to avoid an error.  */
9615 /* We use char because int might match the return type of a gcc2
9616     builtin and then its argument prototype would still apply.  */
9617 char $ac_func();
9618 char (*f)();
9619
9620 int main() {
9621
9622 /* The GNU C library defines this for functions which it implements
9623     to always fail with ENOSYS.  Some functions are actually named
9624     something starting with __ and the normal name is an alias.  */
9625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9626 choke me
9627 #else
9628 f = $ac_func;
9629 #endif
9630
9631 ; return 0; }
9632 EOF
9633 if { (eval echo configure:9634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9634   rm -rf conftest*
9635   eval "ac_cv_func_$ac_func=yes"
9636 else
9637   echo "configure: failed program was:" >&5
9638   cat conftest.$ac_ext >&5
9639   rm -rf conftest*
9640   eval "ac_cv_func_$ac_func=no"
9641 fi
9642 rm -f conftest*
9643 fi
9644
9645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9646   echo "$ac_t""yes" 1>&6
9647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9648   cat >> confdefs.h <<EOF
9649 #define $ac_tr_func 1
9650 EOF
9651  
9652 else
9653   echo "$ac_t""no" 1>&6
9654 fi
9655 done
9656
9657                 fi
9658         fi
9659
9660                 for ac_hdr in lwp/lwp.h
9661 do
9662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9664 echo "configure:9665: checking for $ac_hdr" >&5
9665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668   cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671 #include <$ac_hdr>
9672 EOF
9673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9674 { (eval echo configure:9675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9676 if test -z "$ac_err"; then
9677   rm -rf conftest*
9678   eval "ac_cv_header_$ac_safe=yes"
9679 else
9680   echo "$ac_err" >&5
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -rf conftest*
9684   eval "ac_cv_header_$ac_safe=no"
9685 fi
9686 rm -f conftest*
9687 fi
9688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9689   echo "$ac_t""yes" 1>&6
9690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9691   cat >> confdefs.h <<EOF
9692 #define $ac_tr_hdr 1
9693 EOF
9694  
9695 else
9696   echo "$ac_t""no" 1>&6
9697 fi
9698 done
9699
9700         if test $ac_cv_header_lwp_lwp_h = yes ; then
9701                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9702 echo "configure:9703: checking for lwp_create in -llwp" >&5
9703 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   ac_save_LIBS="$LIBS"
9708 LIBS="-llwp  $LIBS"
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* Override any gcc2 internal prototype to avoid an error.  */
9713 /* We use char because int might match the return type of a gcc2
9714     builtin and then its argument prototype would still apply.  */
9715 char lwp_create();
9716
9717 int main() {
9718 lwp_create()
9719 ; return 0; }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9722   rm -rf conftest*
9723   eval "ac_cv_lib_$ac_lib_var=yes"
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -rf conftest*
9728   eval "ac_cv_lib_$ac_lib_var=no"
9729 fi
9730 rm -f conftest*
9731 LIBS="$ac_save_LIBS"
9732
9733 fi
9734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9735   echo "$ac_t""yes" 1>&6
9736   have_lwp=yes
9737 else
9738   echo "$ac_t""no" 1>&6
9739 have_lwp=no
9740 fi
9741
9742
9743                 if test $have_lwp = yes ; then
9744                         cat >> confdefs.h <<\EOF
9745 #define HAVE_LWP 1
9746 EOF
9747
9748                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9749                         ol_link_threads=lwp
9750
9751                         if test $ol_with_yielding_select = auto ; then
9752                                 ol_with_yielding_select=no
9753                         fi
9754                 fi
9755         fi
9756 fi
9757
9758 if test $ol_with_yielding_select = yes ; then
9759         cat >> confdefs.h <<\EOF
9760 #define HAVE_YIELDING_SELECT 1
9761 EOF
9762
9763 fi
9764
9765 if test $ol_with_threads = manual ; then
9766                 ol_link_threads=yes
9767
9768         echo "configure: warning: thread defines and link options must be set manually" 1>&2
9769
9770         for ac_hdr in pthread.h sched.h
9771 do
9772 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9773 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9774 echo "configure:9775: checking for $ac_hdr" >&5
9775 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9776   echo $ac_n "(cached) $ac_c" 1>&6
9777 else
9778   cat > conftest.$ac_ext <<EOF
9779 #line 9780 "configure"
9780 #include "confdefs.h"
9781 #include <$ac_hdr>
9782 EOF
9783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9784 { (eval echo configure:9785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9786 if test -z "$ac_err"; then
9787   rm -rf conftest*
9788   eval "ac_cv_header_$ac_safe=yes"
9789 else
9790   echo "$ac_err" >&5
9791   echo "configure: failed program was:" >&5
9792   cat conftest.$ac_ext >&5
9793   rm -rf conftest*
9794   eval "ac_cv_header_$ac_safe=no"
9795 fi
9796 rm -f conftest*
9797 fi
9798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9799   echo "$ac_t""yes" 1>&6
9800     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9801   cat >> confdefs.h <<EOF
9802 #define $ac_tr_hdr 1
9803 EOF
9804  
9805 else
9806   echo "$ac_t""no" 1>&6
9807 fi
9808 done
9809
9810         for ac_func in sched_yield pthread_yield
9811 do
9812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9813 echo "configure:9814: checking for $ac_func" >&5
9814 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9815   echo $ac_n "(cached) $ac_c" 1>&6
9816 else
9817   cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* System header to define __stub macros and hopefully few prototypes,
9821     which can conflict with char $ac_func(); below.  */
9822 #include <assert.h>
9823 /* Override any gcc2 internal prototype to avoid an error.  */
9824 /* We use char because int might match the return type of a gcc2
9825     builtin and then its argument prototype would still apply.  */
9826 char $ac_func();
9827 char (*f)();
9828
9829 int main() {
9830
9831 /* The GNU C library defines this for functions which it implements
9832     to always fail with ENOSYS.  Some functions are actually named
9833     something starting with __ and the normal name is an alias.  */
9834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9835 choke me
9836 #else
9837 f = $ac_func;
9838 #endif
9839
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9843   rm -rf conftest*
9844   eval "ac_cv_func_$ac_func=yes"
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   eval "ac_cv_func_$ac_func=no"
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9855   echo "$ac_t""yes" 1>&6
9856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9857   cat >> confdefs.h <<EOF
9858 #define $ac_tr_func 1
9859 EOF
9860  
9861 else
9862   echo "$ac_t""no" 1>&6
9863 fi
9864 done
9865
9866         
9867         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
9868 echo "configure:9869: checking for LinuxThreads pthread.h" >&5
9869 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 #include <pthread.h>
9876 EOF
9877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9878   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
9879   rm -rf conftest*
9880   ol_cv_header_linux_threads=yes
9881 else
9882   rm -rf conftest*
9883   ol_cv_header_linux_threads=no
9884 fi
9885 rm -f conftest*
9886
9887                 
9888 fi
9889
9890 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
9891         if test $ol_cv_header_linux_threads = yes; then
9892                 cat >> confdefs.h <<\EOF
9893 #define HAVE_LINUX_THREADS 1
9894 EOF
9895
9896         fi
9897
9898
9899         for ac_hdr in mach/cthreads.h
9900 do
9901 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9902 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9903 echo "configure:9904: checking for $ac_hdr" >&5
9904 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9905   echo $ac_n "(cached) $ac_c" 1>&6
9906 else
9907   cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 #include <$ac_hdr>
9911 EOF
9912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9913 { (eval echo configure:9914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9915 if test -z "$ac_err"; then
9916   rm -rf conftest*
9917   eval "ac_cv_header_$ac_safe=yes"
9918 else
9919   echo "$ac_err" >&5
9920   echo "configure: failed program was:" >&5
9921   cat conftest.$ac_ext >&5
9922   rm -rf conftest*
9923   eval "ac_cv_header_$ac_safe=no"
9924 fi
9925 rm -f conftest*
9926 fi
9927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9928   echo "$ac_t""yes" 1>&6
9929     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9930   cat >> confdefs.h <<EOF
9931 #define $ac_tr_hdr 1
9932 EOF
9933  
9934 else
9935   echo "$ac_t""no" 1>&6
9936 fi
9937 done
9938
9939         for ac_hdr in lwp/lwp.h
9940 do
9941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9943 echo "configure:9944: checking for $ac_hdr" >&5
9944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9945   echo $ac_n "(cached) $ac_c" 1>&6
9946 else
9947   cat > conftest.$ac_ext <<EOF
9948 #line 9949 "configure"
9949 #include "confdefs.h"
9950 #include <$ac_hdr>
9951 EOF
9952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9953 { (eval echo configure:9954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9955 if test -z "$ac_err"; then
9956   rm -rf conftest*
9957   eval "ac_cv_header_$ac_safe=yes"
9958 else
9959   echo "$ac_err" >&5
9960   echo "configure: failed program was:" >&5
9961   cat conftest.$ac_ext >&5
9962   rm -rf conftest*
9963   eval "ac_cv_header_$ac_safe=no"
9964 fi
9965 rm -f conftest*
9966 fi
9967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9968   echo "$ac_t""yes" 1>&6
9969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9970   cat >> confdefs.h <<EOF
9971 #define $ac_tr_hdr 1
9972 EOF
9973  
9974 else
9975   echo "$ac_t""no" 1>&6
9976 fi
9977 done
9978
9979         for ac_hdr in thread.h synch.h
9980 do
9981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9983 echo "configure:9984: checking for $ac_hdr" >&5
9984 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 #include <$ac_hdr>
9991 EOF
9992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9993 { (eval echo configure:9994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9995 if test -z "$ac_err"; then
9996   rm -rf conftest*
9997   eval "ac_cv_header_$ac_safe=yes"
9998 else
9999   echo "$ac_err" >&5
10000   echo "configure: failed program was:" >&5
10001   cat conftest.$ac_ext >&5
10002   rm -rf conftest*
10003   eval "ac_cv_header_$ac_safe=no"
10004 fi
10005 rm -f conftest*
10006 fi
10007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10008   echo "$ac_t""yes" 1>&6
10009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10010   cat >> confdefs.h <<EOF
10011 #define $ac_tr_hdr 1
10012 EOF
10013  
10014 else
10015   echo "$ac_t""no" 1>&6
10016 fi
10017 done
10018
10019 fi
10020
10021 if test $ol_link_threads != no ; then  
10022                         cat >> confdefs.h <<\EOF
10023 #define REENTRANT 1
10024 EOF
10025
10026         cat >> confdefs.h <<\EOF
10027 #define _REENTRANT 1
10028 EOF
10029
10030         cat >> confdefs.h <<\EOF
10031 #define THREAD_SAFE 1
10032 EOF
10033
10034         cat >> confdefs.h <<\EOF
10035 #define _THREAD_SAFE 1
10036 EOF
10037
10038         cat >> confdefs.h <<\EOF
10039 #define THREADSAFE 1
10040 EOF
10041
10042         cat >> confdefs.h <<\EOF
10043 #define _THREADSAFE 1
10044 EOF
10045
10046         cat >> confdefs.h <<\EOF
10047 #define _SGI_MP_SOURCE 1
10048 EOF
10049
10050
10051                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10052 echo "configure:10053: checking for thread specific errno" >&5
10053 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   
10057                 cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 #include <errno.h>
10061 int main() {
10062 errno = 0;
10063 ; return 0; }
10064 EOF
10065 if { (eval echo configure:10066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10066   rm -rf conftest*
10067   ol_cv_errno_thread_specific=yes
10068 else
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -rf conftest*
10072   ol_cv_errno_thread_specific=no
10073 fi
10074 rm -f conftest*
10075         
10076 fi
10077
10078 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10079
10080                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10081 echo "configure:10082: checking for thread specific h_errno" >&5
10082 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10083   echo $ac_n "(cached) $ac_c" 1>&6
10084 else
10085   
10086                 cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089 #include <netdb.h>
10090 int main() {
10091 h_errno = 0;
10092 ; return 0; }
10093 EOF
10094 if { (eval echo configure:10095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10095   rm -rf conftest*
10096   ol_cv_h_errno_thread_specific=yes
10097 else
10098   echo "configure: failed program was:" >&5
10099   cat conftest.$ac_ext >&5
10100   rm -rf conftest*
10101   ol_cv_h_errno_thread_specific=no
10102 fi
10103 rm -f conftest*
10104         
10105 fi
10106
10107 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10108
10109         if test $ol_cv_errno_thread_specific != yes \
10110                 -o $ol_cv_h_errno_thread_specific != yes ; then
10111                 LIBS="$LTHREAD_LIBS $LIBS"
10112                 LTHREAD_LIBS=""
10113         fi
10114
10115 fi  
10116
10117 if test $ol_link_threads = no ; then
10118         if test $ol_with_threads = yes ; then
10119                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10120         fi
10121
10122         if test $ol_with_threads = auto ; then
10123                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10124                 ol_with_threads=no
10125         fi
10126
10127         cat >> confdefs.h <<\EOF
10128 #define NO_THREADS 1
10129 EOF
10130
10131         LTHREAD_LIBS=""
10132 fi
10133
10134 if test $ol_link_threads != no ; then
10135         cat >> confdefs.h <<\EOF
10136 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10137 EOF
10138
10139 fi
10140
10141
10142 ol_link_ldbm=no 
10143 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10144         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10145 echo "configure:10146: checking for DB2 library" >&5
10146 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149         ol_LIBS="$LIBS"
10150         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10151 echo "configure:10152: checking for db_open in -ldb" >&5
10152 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10154   echo $ac_n "(cached) $ac_c" 1>&6
10155 else
10156   ac_save_LIBS="$LIBS"
10157 LIBS="-ldb  $LIBS"
10158 cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10161 /* Override any gcc2 internal prototype to avoid an error.  */
10162 /* We use char because int might match the return type of a gcc2
10163     builtin and then its argument prototype would still apply.  */
10164 char db_open();
10165
10166 int main() {
10167 db_open()
10168 ; return 0; }
10169 EOF
10170 if { (eval echo configure:10171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10171   rm -rf conftest*
10172   eval "ac_cv_lib_$ac_lib_var=yes"
10173 else
10174   echo "configure: failed program was:" >&5
10175   cat conftest.$ac_ext >&5
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=no"
10178 fi
10179 rm -f conftest*
10180 LIBS="$ac_save_LIBS"
10181
10182 fi
10183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10184   echo "$ac_t""yes" 1>&6
10185   ol_cv_lib_db2=-ldb
10186 else
10187   echo "$ac_t""no" 1>&6
10188 ol_cv_lib_db2=no
10189 fi
10190
10191         LIBS="$ol_LIBS"
10192
10193 fi
10194
10195 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10196
10197 for ac_hdr in db.h
10198 do
10199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10201 echo "configure:10202: checking for $ac_hdr" >&5
10202 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   cat > conftest.$ac_ext <<EOF
10206 #line 10207 "configure"
10207 #include "confdefs.h"
10208 #include <$ac_hdr>
10209 EOF
10210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10211 { (eval echo configure:10212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10213 if test -z "$ac_err"; then
10214   rm -rf conftest*
10215   eval "ac_cv_header_$ac_safe=yes"
10216 else
10217   echo "$ac_err" >&5
10218   echo "configure: failed program was:" >&5
10219   cat conftest.$ac_ext >&5
10220   rm -rf conftest*
10221   eval "ac_cv_header_$ac_safe=no"
10222 fi
10223 rm -f conftest*
10224 fi
10225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10228   cat >> confdefs.h <<EOF
10229 #define $ac_tr_hdr 1
10230 EOF
10231  
10232 else
10233   echo "$ac_t""no" 1>&6
10234 fi
10235 done
10236
10237 if test $ac_cv_header_db_h = yes ; then
10238         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10239 echo "configure:10240: checking if db.h is DB2" >&5
10240 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   
10244                 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247
10248 #                       include <db.h>
10249                         /* this check could be improved */
10250 #                       ifdef DB_VERSION_MAJOR
10251 #                               if DB_VERSION_MAJOR == 2
10252                                         __db_version_2
10253 #                               endif
10254 #                       endif
10255                 
10256 EOF
10257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10258   egrep "__db_version_2" >/dev/null 2>&1; then
10259   rm -rf conftest*
10260   ol_cv_header_db2=yes
10261 else
10262   rm -rf conftest*
10263   ol_cv_header_db2=no
10264 fi
10265 rm -f conftest*
10266
10267 fi
10268
10269 echo "$ac_t""$ol_cv_header_db2" 1>&6
10270 else
10271         ol_cv_header_db2=no
10272 fi
10273
10274
10275  
10276  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10277 echo "configure:10278: checking for Berkeley DB2" >&5
10278 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10279   echo $ac_n "(cached) $ac_c" 1>&6
10280 else
10281   
10282         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10283                 ol_cv_berkeley_db2=no
10284         else
10285                 ol_cv_berkeley_db2=yes
10286         fi
10287
10288 fi
10289
10290 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10291  if test $ol_cv_berkeley_db2 = yes ; then
10292         cat >> confdefs.h <<\EOF
10293 #define HAVE_BERKELEY_DB2 1
10294 EOF
10295
10296  fi
10297
10298
10299         if test $ol_cv_berkeley_db2 = yes ; then
10300                 ol_link_ldbm=db2
10301                 ol_with_ldbm_api=db2
10302
10303                 if test $ol_with_ldbm_type = hash ; then
10304                         cat >> confdefs.h <<\EOF
10305 #define LDBM_USE_DBHASH 1
10306 EOF
10307
10308                 else
10309                         cat >> confdefs.h <<\EOF
10310 #define LDBM_USE_DBBTREE 1
10311 EOF
10312
10313                 fi
10314
10315                                                 if test $ol_cv_lib_db2 != yes ; then
10316                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10317                 fi
10318         fi
10319 fi
10320
10321 ol_link_bdb2=no
10322 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10323         ol_link_bdb2=yes
10324 fi
10325
10326 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10327         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10328 echo "configure:10329: checking for Berkeley DB library" >&5
10329 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10330   echo $ac_n "(cached) $ac_c" 1>&6
10331 else
10332   
10333         for ac_hdr in db1/db.h
10334 do
10335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10337 echo "configure:10338: checking for $ac_hdr" >&5
10338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10339   echo $ac_n "(cached) $ac_c" 1>&6
10340 else
10341   cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 #include <$ac_hdr>
10345 EOF
10346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10347 { (eval echo configure:10348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10349 if test -z "$ac_err"; then
10350   rm -rf conftest*
10351   eval "ac_cv_header_$ac_safe=yes"
10352 else
10353   echo "$ac_err" >&5
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=no"
10358 fi
10359 rm -f conftest*
10360 fi
10361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10362   echo "$ac_t""yes" 1>&6
10363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10364   cat >> confdefs.h <<EOF
10365 #define $ac_tr_hdr 1
10366 EOF
10367  
10368 else
10369   echo "$ac_t""no" 1>&6
10370 fi
10371 done
10372
10373         ol_LIBS="$LIBS"
10374         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10375 echo "configure:10376: checking for dbopen" >&5
10376 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382 /* System header to define __stub macros and hopefully few prototypes,
10383     which can conflict with char dbopen(); below.  */
10384 #include <assert.h>
10385 /* Override any gcc2 internal prototype to avoid an error.  */
10386 /* We use char because int might match the return type of a gcc2
10387     builtin and then its argument prototype would still apply.  */
10388 char dbopen();
10389 char (*f)();
10390
10391 int main() {
10392
10393 /* The GNU C library defines this for functions which it implements
10394     to always fail with ENOSYS.  Some functions are actually named
10395     something starting with __ and the normal name is an alias.  */
10396 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10397 choke me
10398 #else
10399 f = dbopen;
10400 #endif
10401
10402 ; return 0; }
10403 EOF
10404 if { (eval echo configure:10405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10405   rm -rf conftest*
10406   eval "ac_cv_func_dbopen=yes"
10407 else
10408   echo "configure: failed program was:" >&5
10409   cat conftest.$ac_ext >&5
10410   rm -rf conftest*
10411   eval "ac_cv_func_dbopen=no"
10412 fi
10413 rm -f conftest*
10414 fi
10415
10416 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10417   echo "$ac_t""yes" 1>&6
10418   ol_cv_lib_db=yes
10419 else
10420   echo "$ac_t""no" 1>&6
10421
10422                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10423 echo "configure:10424: checking for dbopen in -ldb1" >&5
10424 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   ac_save_LIBS="$LIBS"
10429 LIBS="-ldb1  $LIBS"
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433 /* Override any gcc2 internal prototype to avoid an error.  */
10434 /* We use char because int might match the return type of a gcc2
10435     builtin and then its argument prototype would still apply.  */
10436 char dbopen();
10437
10438 int main() {
10439 dbopen()
10440 ; return 0; }
10441 EOF
10442 if { (eval echo configure:10443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10443   rm -rf conftest*
10444   eval "ac_cv_lib_$ac_lib_var=yes"
10445 else
10446   echo "configure: failed program was:" >&5
10447   cat conftest.$ac_ext >&5
10448   rm -rf conftest*
10449   eval "ac_cv_lib_$ac_lib_var=no"
10450 fi
10451 rm -f conftest*
10452 LIBS="$ac_save_LIBS"
10453
10454 fi
10455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10456   echo "$ac_t""yes" 1>&6
10457   ol_cv_lib_db=-ldb1
10458 else
10459   echo "$ac_t""no" 1>&6
10460
10461                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10462 echo "configure:10463: checking for dbopen in -ldb" >&5
10463 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10464 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   ac_save_LIBS="$LIBS"
10468 LIBS="-ldb  $LIBS"
10469 cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 /* Override any gcc2 internal prototype to avoid an error.  */
10473 /* We use char because int might match the return type of a gcc2
10474     builtin and then its argument prototype would still apply.  */
10475 char dbopen();
10476
10477 int main() {
10478 dbopen()
10479 ; return 0; }
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=yes"
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -rf conftest*
10488   eval "ac_cv_lib_$ac_lib_var=no"
10489 fi
10490 rm -f conftest*
10491 LIBS="$ac_save_LIBS"
10492
10493 fi
10494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10495   echo "$ac_t""yes" 1>&6
10496   ol_cv_lib_db=-ldb
10497 else
10498   echo "$ac_t""no" 1>&6
10499 ol_cv_lib_db=no
10500 fi
10501
10502                 
10503 fi
10504
10505         
10506 fi
10507
10508         LIBS="$ol_LIBS"
10509
10510 fi
10511
10512 echo "$ac_t""$ol_cv_lib_db" 1>&6
10513
10514
10515 for ac_hdr in db_185.h
10516 do
10517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10519 echo "configure:10520: checking for $ac_hdr" >&5
10520 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10521   echo $ac_n "(cached) $ac_c" 1>&6
10522 else
10523   cat > conftest.$ac_ext <<EOF
10524 #line 10525 "configure"
10525 #include "confdefs.h"
10526 #include <$ac_hdr>
10527 EOF
10528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10529 { (eval echo configure:10530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10531 if test -z "$ac_err"; then
10532   rm -rf conftest*
10533   eval "ac_cv_header_$ac_safe=yes"
10534 else
10535   echo "$ac_err" >&5
10536   echo "configure: failed program was:" >&5
10537   cat conftest.$ac_ext >&5
10538   rm -rf conftest*
10539   eval "ac_cv_header_$ac_safe=no"
10540 fi
10541 rm -f conftest*
10542 fi
10543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10544   echo "$ac_t""yes" 1>&6
10545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10546   cat >> confdefs.h <<EOF
10547 #define $ac_tr_hdr 1
10548 EOF
10549  
10550 else
10551   echo "$ac_t""no" 1>&6
10552 fi
10553 done
10554
10555 if test "$ol_cv_header_db2" = yes ; then
10556         
10557         ol_cv_header_db=$ac_cv_header_db_185_h
10558 else
10559         ol_cv_header_db=$ac_cv_header_db_h
10560 fi
10561
10562
10563  
10564  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10565 echo "configure:10566: checking for Berkeley DB" >&5
10566 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   
10570         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10571                 ol_cv_berkeley_db=no
10572         else
10573                 ol_cv_berkeley_db=yes
10574         fi
10575
10576 fi
10577
10578 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10579  if test $ol_cv_berkeley_db = yes ; then
10580         cat >> confdefs.h <<\EOF
10581 #define HAVE_BERKELEY_DB 1
10582 EOF
10583
10584  fi
10585
10586
10587         if test $ol_cv_berkeley_db = yes ; then
10588                 ol_link_ldbm=db
10589                 ol_with_ldbm_api=db
10590
10591                 if test $ol_with_ldbm_type = hash ; then
10592                         cat >> confdefs.h <<\EOF
10593 #define LDBM_USE_DBHASH 1
10594 EOF
10595
10596                 else
10597                         cat >> confdefs.h <<\EOF
10598 #define LDBM_USE_DBBTREE 1
10599 EOF
10600
10601                 fi
10602
10603                                                 if test $ol_cv_lib_db != yes ; then
10604                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10605                 fi
10606         fi
10607 fi
10608
10609 if test $ol_with_ldbm_api = manual ; then
10610                 ol_link_ldbm=yes
10611
10612         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10613
10614         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10615 do
10616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10618 echo "configure:10619: checking for $ac_hdr" >&5
10619 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10620   echo $ac_n "(cached) $ac_c" 1>&6
10621 else
10622   cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625 #include <$ac_hdr>
10626 EOF
10627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10628 { (eval echo configure:10629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10630 if test -z "$ac_err"; then
10631   rm -rf conftest*
10632   eval "ac_cv_header_$ac_safe=yes"
10633 else
10634   echo "$ac_err" >&5
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=no"
10639 fi
10640 rm -f conftest*
10641 fi
10642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10643   echo "$ac_t""yes" 1>&6
10644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10645   cat >> confdefs.h <<EOF
10646 #define $ac_tr_hdr 1
10647 EOF
10648  
10649 else
10650   echo "$ac_t""no" 1>&6
10651 fi
10652 done
10653
10654 fi
10655
10656 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10657         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10658         ol_with_ldbm_api=none
10659 fi
10660
10661 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10662         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10663 echo "configure:10664: checking for MDBM library" >&5
10664 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667         ol_LIBS="$LIBS"
10668         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10669 echo "configure:10670: checking for mdbm_set_chain" >&5
10670 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10671   echo $ac_n "(cached) $ac_c" 1>&6
10672 else
10673   cat > conftest.$ac_ext <<EOF
10674 #line 10675 "configure"
10675 #include "confdefs.h"
10676 /* System header to define __stub macros and hopefully few prototypes,
10677     which can conflict with char mdbm_set_chain(); below.  */
10678 #include <assert.h>
10679 /* Override any gcc2 internal prototype to avoid an error.  */
10680 /* We use char because int might match the return type of a gcc2
10681     builtin and then its argument prototype would still apply.  */
10682 char mdbm_set_chain();
10683 char (*f)();
10684
10685 int main() {
10686
10687 /* The GNU C library defines this for functions which it implements
10688     to always fail with ENOSYS.  Some functions are actually named
10689     something starting with __ and the normal name is an alias.  */
10690 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10691 choke me
10692 #else
10693 f = mdbm_set_chain;
10694 #endif
10695
10696 ; return 0; }
10697 EOF
10698 if { (eval echo configure:10699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10699   rm -rf conftest*
10700   eval "ac_cv_func_mdbm_set_chain=yes"
10701 else
10702   echo "configure: failed program was:" >&5
10703   cat conftest.$ac_ext >&5
10704   rm -rf conftest*
10705   eval "ac_cv_func_mdbm_set_chain=no"
10706 fi
10707 rm -f conftest*
10708 fi
10709
10710 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10711   echo "$ac_t""yes" 1>&6
10712   ol_cv_lib_mdbm=yes
10713 else
10714   echo "$ac_t""no" 1>&6
10715
10716                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10717 echo "configure:10718: checking for mdbm_set_chain in -lmdbm" >&5
10718 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   ac_save_LIBS="$LIBS"
10723 LIBS="-lmdbm  $LIBS"
10724 cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727 /* Override any gcc2 internal prototype to avoid an error.  */
10728 /* We use char because int might match the return type of a gcc2
10729     builtin and then its argument prototype would still apply.  */
10730 char mdbm_set_chain();
10731
10732 int main() {
10733 mdbm_set_chain()
10734 ; return 0; }
10735 EOF
10736 if { (eval echo configure:10737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10737   rm -rf conftest*
10738   eval "ac_cv_lib_$ac_lib_var=yes"
10739 else
10740   echo "configure: failed program was:" >&5
10741   cat conftest.$ac_ext >&5
10742   rm -rf conftest*
10743   eval "ac_cv_lib_$ac_lib_var=no"
10744 fi
10745 rm -f conftest*
10746 LIBS="$ac_save_LIBS"
10747
10748 fi
10749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10750   echo "$ac_t""yes" 1>&6
10751   ol_cv_lib_mdbm=-lmdbm
10752 else
10753   echo "$ac_t""no" 1>&6
10754 ol_cv_lib_mdbm=no
10755 fi
10756
10757         
10758 fi
10759
10760         LIBS="$ol_LIBS"
10761
10762 fi
10763
10764 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
10765
10766
10767  for ac_hdr in mdbm.h
10768 do
10769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10771 echo "configure:10772: checking for $ac_hdr" >&5
10772 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10773   echo $ac_n "(cached) $ac_c" 1>&6
10774 else
10775   cat > conftest.$ac_ext <<EOF
10776 #line 10777 "configure"
10777 #include "confdefs.h"
10778 #include <$ac_hdr>
10779 EOF
10780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10781 { (eval echo configure:10782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10783 if test -z "$ac_err"; then
10784   rm -rf conftest*
10785   eval "ac_cv_header_$ac_safe=yes"
10786 else
10787   echo "$ac_err" >&5
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=no"
10792 fi
10793 rm -f conftest*
10794 fi
10795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10796   echo "$ac_t""yes" 1>&6
10797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10798   cat >> confdefs.h <<EOF
10799 #define $ac_tr_hdr 1
10800 EOF
10801  
10802 else
10803   echo "$ac_t""no" 1>&6
10804 fi
10805 done
10806
10807  echo $ac_n "checking for db""... $ac_c" 1>&6
10808 echo "configure:10809: checking for db" >&5
10809 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
10810   echo $ac_n "(cached) $ac_c" 1>&6
10811 else
10812   
10813         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
10814                 ol_cv_mdbm=no
10815         else
10816                 ol_cv_mdbm=yes
10817         fi
10818
10819 fi
10820
10821 echo "$ac_t""$ol_cv_mdbm" 1>&6
10822  if test $ol_cv_mdbm = yes ; then
10823         cat >> confdefs.h <<\EOF
10824 #define HAVE_MDBM 1
10825 EOF
10826
10827  fi
10828
10829
10830         if test $ol_cv_mdbm = yes ; then
10831                 ol_link_ldbm=mdbm
10832                 ol_with_ldbm_api=mdbm
10833                 if test $ol_cv_lib_mdbm != yes ; then
10834                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
10835                 fi
10836         fi
10837 fi
10838
10839 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
10840         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
10841 echo "configure:10842: checking for GDBM library" >&5
10842 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
10843   echo $ac_n "(cached) $ac_c" 1>&6
10844 else
10845         ol_LIBS="$LIBS"
10846         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
10847 echo "configure:10848: checking for gdbm_open" >&5
10848 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
10849   echo $ac_n "(cached) $ac_c" 1>&6
10850 else
10851   cat > conftest.$ac_ext <<EOF
10852 #line 10853 "configure"
10853 #include "confdefs.h"
10854 /* System header to define __stub macros and hopefully few prototypes,
10855     which can conflict with char gdbm_open(); below.  */
10856 #include <assert.h>
10857 /* Override any gcc2 internal prototype to avoid an error.  */
10858 /* We use char because int might match the return type of a gcc2
10859     builtin and then its argument prototype would still apply.  */
10860 char gdbm_open();
10861 char (*f)();
10862
10863 int main() {
10864
10865 /* The GNU C library defines this for functions which it implements
10866     to always fail with ENOSYS.  Some functions are actually named
10867     something starting with __ and the normal name is an alias.  */
10868 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
10869 choke me
10870 #else
10871 f = gdbm_open;
10872 #endif
10873
10874 ; return 0; }
10875 EOF
10876 if { (eval echo configure:10877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10877   rm -rf conftest*
10878   eval "ac_cv_func_gdbm_open=yes"
10879 else
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   eval "ac_cv_func_gdbm_open=no"
10884 fi
10885 rm -f conftest*
10886 fi
10887
10888 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
10889   echo "$ac_t""yes" 1>&6
10890   ol_cv_lib_gdbm=yes
10891 else
10892   echo "$ac_t""no" 1>&6
10893
10894                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
10895 echo "configure:10896: checking for gdbm_open in -lgdbm" >&5
10896 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
10897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   ac_save_LIBS="$LIBS"
10901 LIBS="-lgdbm  $LIBS"
10902 cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 /* Override any gcc2 internal prototype to avoid an error.  */
10906 /* We use char because int might match the return type of a gcc2
10907     builtin and then its argument prototype would still apply.  */
10908 char gdbm_open();
10909
10910 int main() {
10911 gdbm_open()
10912 ; return 0; }
10913 EOF
10914 if { (eval echo configure:10915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10915   rm -rf conftest*
10916   eval "ac_cv_lib_$ac_lib_var=yes"
10917 else
10918   echo "configure: failed program was:" >&5
10919   cat conftest.$ac_ext >&5
10920   rm -rf conftest*
10921   eval "ac_cv_lib_$ac_lib_var=no"
10922 fi
10923 rm -f conftest*
10924 LIBS="$ac_save_LIBS"
10925
10926 fi
10927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10928   echo "$ac_t""yes" 1>&6
10929   ol_cv_lib_gdbm=-lgdbm
10930 else
10931   echo "$ac_t""no" 1>&6
10932 ol_cv_lib_gdbm=no
10933 fi
10934
10935         
10936 fi
10937
10938         LIBS="$ol_LIBS"
10939
10940 fi
10941
10942 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
10943
10944
10945  for ac_hdr in gdbm.h
10946 do
10947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10949 echo "configure:10950: checking for $ac_hdr" >&5
10950 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10951   echo $ac_n "(cached) $ac_c" 1>&6
10952 else
10953   cat > conftest.$ac_ext <<EOF
10954 #line 10955 "configure"
10955 #include "confdefs.h"
10956 #include <$ac_hdr>
10957 EOF
10958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10959 { (eval echo configure:10960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10961 if test -z "$ac_err"; then
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=yes"
10964 else
10965   echo "$ac_err" >&5
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_header_$ac_safe=no"
10970 fi
10971 rm -f conftest*
10972 fi
10973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10974   echo "$ac_t""yes" 1>&6
10975     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10976   cat >> confdefs.h <<EOF
10977 #define $ac_tr_hdr 1
10978 EOF
10979  
10980 else
10981   echo "$ac_t""no" 1>&6
10982 fi
10983 done
10984
10985  echo $ac_n "checking for db""... $ac_c" 1>&6
10986 echo "configure:10987: checking for db" >&5
10987 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   
10991         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
10992                 ol_cv_gdbm=no
10993         else
10994                 ol_cv_gdbm=yes
10995         fi
10996
10997 fi
10998
10999 echo "$ac_t""$ol_cv_gdbm" 1>&6
11000  if test $ol_cv_gdbm = yes ; then
11001         cat >> confdefs.h <<\EOF
11002 #define HAVE_GDBM 1
11003 EOF
11004
11005  fi
11006
11007
11008         if test $ol_cv_gdbm = yes ; then
11009                 ol_link_ldbm=gdbm
11010                 ol_with_ldbm_api=gdbm
11011
11012                 if test $ol_cv_lib_gdbm != yes ; then
11013                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11014                 fi
11015         fi
11016 fi
11017
11018 if test $ol_with_ldbm_api = auto ; then
11019         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11020 elif test $ol_with_ldbm_api = ndbm ; then
11021         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11022 echo "configure:11023: checking for NDBM library" >&5
11023 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026         ol_LIBS="$LIBS"
11027         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11028 echo "configure:11029: checking for dbm_open" >&5
11029 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11030   echo $ac_n "(cached) $ac_c" 1>&6
11031 else
11032   cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 /* System header to define __stub macros and hopefully few prototypes,
11036     which can conflict with char dbm_open(); below.  */
11037 #include <assert.h>
11038 /* Override any gcc2 internal prototype to avoid an error.  */
11039 /* We use char because int might match the return type of a gcc2
11040     builtin and then its argument prototype would still apply.  */
11041 char dbm_open();
11042 char (*f)();
11043
11044 int main() {
11045
11046 /* The GNU C library defines this for functions which it implements
11047     to always fail with ENOSYS.  Some functions are actually named
11048     something starting with __ and the normal name is an alias.  */
11049 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11050 choke me
11051 #else
11052 f = dbm_open;
11053 #endif
11054
11055 ; return 0; }
11056 EOF
11057 if { (eval echo configure:11058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11058   rm -rf conftest*
11059   eval "ac_cv_func_dbm_open=yes"
11060 else
11061   echo "configure: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   rm -rf conftest*
11064   eval "ac_cv_func_dbm_open=no"
11065 fi
11066 rm -f conftest*
11067 fi
11068
11069 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071   ol_cv_lib_ndbm=yes
11072 else
11073   echo "$ac_t""no" 1>&6
11074
11075                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11076 echo "configure:11077: checking for dbm_open in -lndbm" >&5
11077 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   ac_save_LIBS="$LIBS"
11082 LIBS="-lndbm  $LIBS"
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char dbm_open();
11090
11091 int main() {
11092 dbm_open()
11093 ; return 0; }
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11096   rm -rf conftest*
11097   eval "ac_cv_lib_$ac_lib_var=yes"
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=no"
11103 fi
11104 rm -f conftest*
11105 LIBS="$ac_save_LIBS"
11106
11107 fi
11108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110   ol_cv_lib_ndbm=-lndbm
11111 else
11112   echo "$ac_t""no" 1>&6
11113
11114                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11115 echo "configure:11116: checking for dbm_open in -ldbm" >&5
11116 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11117 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11118   echo $ac_n "(cached) $ac_c" 1>&6
11119 else
11120   ac_save_LIBS="$LIBS"
11121 LIBS="-ldbm  $LIBS"
11122 cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 /* Override any gcc2 internal prototype to avoid an error.  */
11126 /* We use char because int might match the return type of a gcc2
11127     builtin and then its argument prototype would still apply.  */
11128 char dbm_open();
11129
11130 int main() {
11131 dbm_open()
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11135   rm -rf conftest*
11136   eval "ac_cv_lib_$ac_lib_var=yes"
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   eval "ac_cv_lib_$ac_lib_var=no"
11142 fi
11143 rm -f conftest*
11144 LIBS="$ac_save_LIBS"
11145
11146 fi
11147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11148   echo "$ac_t""yes" 1>&6
11149   ol_cv_lib_ndbm=-ldbm
11150 else
11151   echo "$ac_t""no" 1>&6
11152 ol_cv_lib_ndbm=no
11153 fi
11154                 
11155 fi
11156
11157         
11158 fi
11159
11160         LIBS="$ol_LIBS"
11161
11162 fi
11163
11164 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11165
11166
11167  for ac_hdr in ndbm.h
11168 do
11169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11171 echo "configure:11172: checking for $ac_hdr" >&5
11172 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11173   echo $ac_n "(cached) $ac_c" 1>&6
11174 else
11175   cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 #include <$ac_hdr>
11179 EOF
11180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11181 { (eval echo configure:11182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11183 if test -z "$ac_err"; then
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=yes"
11186 else
11187   echo "$ac_err" >&5
11188   echo "configure: failed program was:" >&5
11189   cat conftest.$ac_ext >&5
11190   rm -rf conftest*
11191   eval "ac_cv_header_$ac_safe=no"
11192 fi
11193 rm -f conftest*
11194 fi
11195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11196   echo "$ac_t""yes" 1>&6
11197     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11198   cat >> confdefs.h <<EOF
11199 #define $ac_tr_hdr 1
11200 EOF
11201  
11202 else
11203   echo "$ac_t""no" 1>&6
11204 fi
11205 done
11206
11207  echo $ac_n "checking for db""... $ac_c" 1>&6
11208 echo "configure:11209: checking for db" >&5
11209 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11210   echo $ac_n "(cached) $ac_c" 1>&6
11211 else
11212   
11213         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11214                 ol_cv_ndbm=no
11215         else
11216                 ol_cv_ndbm=yes
11217         fi
11218
11219 fi
11220
11221 echo "$ac_t""$ol_cv_ndbm" 1>&6
11222  if test $ol_cv_ndbm = yes ; then
11223         cat >> confdefs.h <<\EOF
11224 #define HAVE_NDBM 1
11225 EOF
11226
11227  fi
11228
11229
11230         if test $ol_cv_ndbm = yes ; then
11231                 ol_link_ldbm=ndbm
11232                 ol_with_ldbm_api=ndbm
11233
11234                 if test $ol_cv_lib_ndbm != yes ; then
11235                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11236                 fi
11237         fi
11238 fi
11239
11240 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11241         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11242         if test $ol_enable_ldbm = yes ; then
11243                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11244         fi
11245
11246         echo "configure: warning: disabling LDBM" 1>&2
11247         ol_enable_ldbm=no
11248 fi
11249
11250 if test $ol_enable_wrappers != no ; then
11251         for ac_hdr in tcpd.h
11252 do
11253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11255 echo "configure:11256: checking for $ac_hdr" >&5
11256 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11257   echo $ac_n "(cached) $ac_c" 1>&6
11258 else
11259   cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 #include <$ac_hdr>
11263 EOF
11264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11265 { (eval echo configure:11266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11267 if test -z "$ac_err"; then
11268   rm -rf conftest*
11269   eval "ac_cv_header_$ac_safe=yes"
11270 else
11271   echo "$ac_err" >&5
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_header_$ac_safe=no"
11276 fi
11277 rm -f conftest*
11278 fi
11279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11280   echo "$ac_t""yes" 1>&6
11281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11282   cat >> confdefs.h <<EOF
11283 #define $ac_tr_hdr 1
11284 EOF
11285  
11286 else
11287   echo "$ac_t""no" 1>&6
11288 fi
11289 done
11290
11291
11292         if test $ac_cv_header_tcpd_h != yes ; then
11293                 have_wrappers=no
11294         else
11295                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11296 echo "configure:11297: checking for main in -lwrap" >&5
11297 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   ac_save_LIBS="$LIBS"
11302 LIBS="-lwrap  $LIBS"
11303 cat > conftest.$ac_ext <<EOF
11304 #line 11305 "configure"
11305 #include "confdefs.h"
11306
11307 int main() {
11308 main()
11309 ; return 0; }
11310 EOF
11311 if { (eval echo configure:11312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11312   rm -rf conftest*
11313   eval "ac_cv_lib_$ac_lib_var=yes"
11314 else
11315   echo "configure: failed program was:" >&5
11316   cat conftest.$ac_ext >&5
11317   rm -rf conftest*
11318   eval "ac_cv_lib_$ac_lib_var=no"
11319 fi
11320 rm -f conftest*
11321 LIBS="$ac_save_LIBS"
11322
11323 fi
11324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11325   echo "$ac_t""yes" 1>&6
11326   have_wrappers=yes
11327 else
11328   echo "$ac_t""no" 1>&6
11329 have_wrappers=no
11330 fi
11331
11332         fi
11333
11334         if test $have_wrappers = yes ; then
11335                 cat >> confdefs.h <<\EOF
11336 #define HAVE_TCPD 1
11337 EOF
11338
11339                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11340
11341                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11342 echo "configure:11343: checking for main in -lnsl" >&5
11343 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   ac_save_LIBS="$LIBS"
11348 LIBS="-lnsl  $LIBS"
11349 cat > conftest.$ac_ext <<EOF
11350 #line 11351 "configure"
11351 #include "confdefs.h"
11352
11353 int main() {
11354 main()
11355 ; return 0; }
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11358   rm -rf conftest*
11359   eval "ac_cv_lib_$ac_lib_var=yes"
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_lib_$ac_lib_var=no"
11365 fi
11366 rm -f conftest*
11367 LIBS="$ac_save_LIBS"
11368
11369 fi
11370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11371   echo "$ac_t""yes" 1>&6
11372     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11373     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11374   cat >> confdefs.h <<EOF
11375 #define $ac_tr_lib 1
11376 EOF
11377
11378   LIBS="-lnsl $LIBS"
11379
11380 else
11381   echo "$ac_t""no" 1>&6
11382 fi
11383
11384         else
11385                 echo "configure: warning: could not find -lwrap" 1>&2
11386                 if test $ol_enable_wrappers = yes ; then
11387                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11388                 fi
11389
11390                 echo "configure: warning: disabling wrappers support" 1>&2
11391                 ol_enable_wrappers=no
11392         fi
11393 fi
11394
11395 if test $ol_enable_syslog != no ; then
11396         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11397 echo "configure:11398: checking for openlog" >&5
11398 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11399   echo $ac_n "(cached) $ac_c" 1>&6
11400 else
11401   cat > conftest.$ac_ext <<EOF
11402 #line 11403 "configure"
11403 #include "confdefs.h"
11404 /* System header to define __stub macros and hopefully few prototypes,
11405     which can conflict with char openlog(); below.  */
11406 #include <assert.h>
11407 /* Override any gcc2 internal prototype to avoid an error.  */
11408 /* We use char because int might match the return type of a gcc2
11409     builtin and then its argument prototype would still apply.  */
11410 char openlog();
11411 char (*f)();
11412
11413 int main() {
11414
11415 /* The GNU C library defines this for functions which it implements
11416     to always fail with ENOSYS.  Some functions are actually named
11417     something starting with __ and the normal name is an alias.  */
11418 #if defined (__stub_openlog) || defined (__stub___openlog)
11419 choke me
11420 #else
11421 f = openlog;
11422 #endif
11423
11424 ; return 0; }
11425 EOF
11426 if { (eval echo configure:11427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11427   rm -rf conftest*
11428   eval "ac_cv_func_openlog=yes"
11429 else
11430   echo "configure: failed program was:" >&5
11431   cat conftest.$ac_ext >&5
11432   rm -rf conftest*
11433   eval "ac_cv_func_openlog=no"
11434 fi
11435 rm -f conftest*
11436 fi
11437
11438 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11439   echo "$ac_t""yes" 1>&6
11440   :
11441 else
11442   echo "$ac_t""no" 1>&6
11443 fi
11444
11445         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11446                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11447         fi
11448         ol_enable_syslog=$ac_cv_func_openlog
11449 fi
11450
11451 if test $ol_enable_dmalloc != no ; then
11452         for ac_hdr in dmalloc.h
11453 do
11454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11456 echo "configure:11457: checking for $ac_hdr" >&5
11457 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11458   echo $ac_n "(cached) $ac_c" 1>&6
11459 else
11460   cat > conftest.$ac_ext <<EOF
11461 #line 11462 "configure"
11462 #include "confdefs.h"
11463 #include <$ac_hdr>
11464 EOF
11465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11466 { (eval echo configure:11467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11468 if test -z "$ac_err"; then
11469   rm -rf conftest*
11470   eval "ac_cv_header_$ac_safe=yes"
11471 else
11472   echo "$ac_err" >&5
11473   echo "configure: failed program was:" >&5
11474   cat conftest.$ac_ext >&5
11475   rm -rf conftest*
11476   eval "ac_cv_header_$ac_safe=no"
11477 fi
11478 rm -f conftest*
11479 fi
11480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11481   echo "$ac_t""yes" 1>&6
11482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11483   cat >> confdefs.h <<EOF
11484 #define $ac_tr_hdr 1
11485 EOF
11486  
11487 else
11488   echo "$ac_t""no" 1>&6
11489 fi
11490 done
11491
11492         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11493 echo "configure:11494: checking for dmalloc_shutdown in -ldmalloc" >&5
11494 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11495 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11496   echo $ac_n "(cached) $ac_c" 1>&6
11497 else
11498   ac_save_LIBS="$LIBS"
11499 LIBS="-ldmalloc  $LIBS"
11500 cat > conftest.$ac_ext <<EOF
11501 #line 11502 "configure"
11502 #include "confdefs.h"
11503 /* Override any gcc2 internal prototype to avoid an error.  */
11504 /* We use char because int might match the return type of a gcc2
11505     builtin and then its argument prototype would still apply.  */
11506 char dmalloc_shutdown();
11507
11508 int main() {
11509 dmalloc_shutdown()
11510 ; return 0; }
11511 EOF
11512 if { (eval echo configure:11513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11513   rm -rf conftest*
11514   eval "ac_cv_lib_$ac_lib_var=yes"
11515 else
11516   echo "configure: failed program was:" >&5
11517   cat conftest.$ac_ext >&5
11518   rm -rf conftest*
11519   eval "ac_cv_lib_$ac_lib_var=no"
11520 fi
11521 rm -f conftest*
11522 LIBS="$ac_save_LIBS"
11523
11524 fi
11525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11526   echo "$ac_t""yes" 1>&6
11527     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11528     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11529   cat >> confdefs.h <<EOF
11530 #define $ac_tr_lib 1
11531 EOF
11532
11533   LIBS="-ldmalloc $LIBS"
11534
11535 else
11536   echo "$ac_t""no" 1>&6
11537 fi
11538
11539 fi
11540
11541 if test $ol_enable_tcl != no ; then
11542         for ac_hdr in tcl.h
11543 do
11544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11546 echo "configure:11547: checking for $ac_hdr" >&5
11547 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11548   echo $ac_n "(cached) $ac_c" 1>&6
11549 else
11550   cat > conftest.$ac_ext <<EOF
11551 #line 11552 "configure"
11552 #include "confdefs.h"
11553 #include <$ac_hdr>
11554 EOF
11555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11556 { (eval echo configure:11557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11558 if test -z "$ac_err"; then
11559   rm -rf conftest*
11560   eval "ac_cv_header_$ac_safe=yes"
11561 else
11562   echo "$ac_err" >&5
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -rf conftest*
11566   eval "ac_cv_header_$ac_safe=no"
11567 fi
11568 rm -f conftest*
11569 fi
11570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11571   echo "$ac_t""yes" 1>&6
11572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11573   cat >> confdefs.h <<EOF
11574 #define $ac_tr_hdr 1
11575 EOF
11576  
11577 else
11578   echo "$ac_t""no" 1>&6
11579 fi
11580 done
11581
11582
11583         if test $ac_cv_header_tcl_h != yes ; then
11584                 have_tcl=no
11585         else
11586                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11587 echo "configure:11588: checking for main in -ltcl" >&5
11588 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11589 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   ac_save_LIBS="$LIBS"
11593 LIBS="-ltcl  $LIBS"
11594 cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597
11598 int main() {
11599 main()
11600 ; return 0; }
11601 EOF
11602 if { (eval echo configure:11603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11603   rm -rf conftest*
11604   eval "ac_cv_lib_$ac_lib_var=yes"
11605 else
11606   echo "configure: failed program was:" >&5
11607   cat conftest.$ac_ext >&5
11608   rm -rf conftest*
11609   eval "ac_cv_lib_$ac_lib_var=no"
11610 fi
11611 rm -f conftest*
11612 LIBS="$ac_save_LIBS"
11613
11614 fi
11615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11616   echo "$ac_t""yes" 1>&6
11617   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11618 else
11619   echo "$ac_t""no" 1>&6
11620 have_tcl=no
11621 fi
11622
11623
11624                 if test $have_tcl != yes; then
11625                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11626 echo "configure:11627: checking for main in -ltcl7.6" >&5
11627 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11629   echo $ac_n "(cached) $ac_c" 1>&6
11630 else
11631   ac_save_LIBS="$LIBS"
11632 LIBS="-ltcl7.6  $LIBS"
11633 cat > conftest.$ac_ext <<EOF
11634 #line 11635 "configure"
11635 #include "confdefs.h"
11636
11637 int main() {
11638 main()
11639 ; return 0; }
11640 EOF
11641 if { (eval echo configure:11642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11642   rm -rf conftest*
11643   eval "ac_cv_lib_$ac_lib_var=yes"
11644 else
11645   echo "configure: failed program was:" >&5
11646   cat conftest.$ac_ext >&5
11647   rm -rf conftest*
11648   eval "ac_cv_lib_$ac_lib_var=no"
11649 fi
11650 rm -f conftest*
11651 LIBS="$ac_save_LIBS"
11652
11653 fi
11654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11655   echo "$ac_t""yes" 1>&6
11656   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11657 else
11658   echo "$ac_t""no" 1>&6
11659 have_tcl=no
11660 fi
11661
11662                 fi
11663
11664                 if test $have_tcl != yes; then
11665                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11666 echo "configure:11667: checking for main in -ltcl8.0" >&5
11667 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11669   echo $ac_n "(cached) $ac_c" 1>&6
11670 else
11671   ac_save_LIBS="$LIBS"
11672 LIBS="-ltcl8.0  $LIBS"
11673 cat > conftest.$ac_ext <<EOF
11674 #line 11675 "configure"
11675 #include "confdefs.h"
11676
11677 int main() {
11678 main()
11679 ; return 0; }
11680 EOF
11681 if { (eval echo configure:11682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11682   rm -rf conftest*
11683   eval "ac_cv_lib_$ac_lib_var=yes"
11684 else
11685   echo "configure: failed program was:" >&5
11686   cat conftest.$ac_ext >&5
11687   rm -rf conftest*
11688   eval "ac_cv_lib_$ac_lib_var=no"
11689 fi
11690 rm -f conftest*
11691 LIBS="$ac_save_LIBS"
11692
11693 fi
11694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11695   echo "$ac_t""yes" 1>&6
11696   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11697 else
11698   echo "$ac_t""no" 1>&6
11699 have_tcl=no
11700 fi
11701
11702                 fi
11703         fi
11704
11705         if test $have_tcl != yes ; then
11706                 echo "configure: warning: could not find -ltcl" 1>&2
11707                 if test $ol_enable_tcl = yes ; then
11708                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11709                 fi
11710
11711                 ol_enable_tcl=no
11712         fi
11713 fi
11714
11715 # ud needs termcap (should insert check here)
11716 ol_link_termcap=no
11717 for ac_hdr in termcap.h ncurses.h
11718 do
11719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11721 echo "configure:11722: checking for $ac_hdr" >&5
11722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11723   echo $ac_n "(cached) $ac_c" 1>&6
11724 else
11725   cat > conftest.$ac_ext <<EOF
11726 #line 11727 "configure"
11727 #include "confdefs.h"
11728 #include <$ac_hdr>
11729 EOF
11730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11731 { (eval echo configure:11732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11733 if test -z "$ac_err"; then
11734   rm -rf conftest*
11735   eval "ac_cv_header_$ac_safe=yes"
11736 else
11737   echo "$ac_err" >&5
11738   echo "configure: failed program was:" >&5
11739   cat conftest.$ac_ext >&5
11740   rm -rf conftest*
11741   eval "ac_cv_header_$ac_safe=no"
11742 fi
11743 rm -f conftest*
11744 fi
11745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11746   echo "$ac_t""yes" 1>&6
11747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11748   cat >> confdefs.h <<EOF
11749 #define $ac_tr_hdr 1
11750 EOF
11751  
11752 else
11753   echo "$ac_t""no" 1>&6
11754 fi
11755 done
11756
11757
11758 if test $ol_link_termcap = no ; then
11759         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
11760 echo "configure:11761: checking for tputs in -ltermcap" >&5
11761 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
11762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11763   echo $ac_n "(cached) $ac_c" 1>&6
11764 else
11765   ac_save_LIBS="$LIBS"
11766 LIBS="-ltermcap  $LIBS"
11767 cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770 /* Override any gcc2 internal prototype to avoid an error.  */
11771 /* We use char because int might match the return type of a gcc2
11772     builtin and then its argument prototype would still apply.  */
11773 char tputs();
11774
11775 int main() {
11776 tputs()
11777 ; return 0; }
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11780   rm -rf conftest*
11781   eval "ac_cv_lib_$ac_lib_var=yes"
11782 else
11783   echo "configure: failed program was:" >&5
11784   cat conftest.$ac_ext >&5
11785   rm -rf conftest*
11786   eval "ac_cv_lib_$ac_lib_var=no"
11787 fi
11788 rm -f conftest*
11789 LIBS="$ac_save_LIBS"
11790
11791 fi
11792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11793   echo "$ac_t""yes" 1>&6
11794   have_termcap=yes
11795 else
11796   echo "$ac_t""no" 1>&6
11797 have_termcap=no
11798 fi
11799
11800         if test $have_termcap = yes ; then
11801                 cat >> confdefs.h <<\EOF
11802 #define HAVE_TERMCAP 1
11803 EOF
11804
11805                 ol_link_termcap=yes
11806                 TERMCAP_LIBS=-ltermcap
11807         fi
11808 fi
11809
11810 if test $ol_link_termcap = no ; then
11811         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
11812 echo "configure:11813: checking for initscr in -lncurses" >&5
11813 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
11814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11815   echo $ac_n "(cached) $ac_c" 1>&6
11816 else
11817   ac_save_LIBS="$LIBS"
11818 LIBS="-lncurses  $LIBS"
11819 cat > conftest.$ac_ext <<EOF
11820 #line 11821 "configure"
11821 #include "confdefs.h"
11822 /* Override any gcc2 internal prototype to avoid an error.  */
11823 /* We use char because int might match the return type of a gcc2
11824     builtin and then its argument prototype would still apply.  */
11825 char initscr();
11826
11827 int main() {
11828 initscr()
11829 ; return 0; }
11830 EOF
11831 if { (eval echo configure:11832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11832   rm -rf conftest*
11833   eval "ac_cv_lib_$ac_lib_var=yes"
11834 else
11835   echo "configure: failed program was:" >&5
11836   cat conftest.$ac_ext >&5
11837   rm -rf conftest*
11838   eval "ac_cv_lib_$ac_lib_var=no"
11839 fi
11840 rm -f conftest*
11841 LIBS="$ac_save_LIBS"
11842
11843 fi
11844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11845   echo "$ac_t""yes" 1>&6
11846   have_ncurses=yes
11847 else
11848   echo "$ac_t""no" 1>&6
11849 have_ncurses=no
11850 fi
11851
11852         if test $have_ncurses = yes ; then
11853                 cat >> confdefs.h <<\EOF
11854 #define HAVE_NCURSES 1
11855 EOF
11856
11857                 ol_link_termcap=yes
11858                 TERMCAP_LIBS=-lncurses
11859         fi
11860 fi
11861
11862 if test $ol_link_termcap = no ; then
11863         cat >> confdefs.h <<\EOF
11864 #define NO_TERMCAP 1
11865 EOF
11866
11867         TERMCAP_LIBS=
11868 fi
11869
11870 ol_link_sasl=no
11871 if test $ol_with_cyrus_sasl != no ; then
11872         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
11873 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
11874 echo "configure:11875: checking for sasl.h" >&5
11875 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11876   echo $ac_n "(cached) $ac_c" 1>&6
11877 else
11878   cat > conftest.$ac_ext <<EOF
11879 #line 11880 "configure"
11880 #include "confdefs.h"
11881 #include <sasl.h>
11882 EOF
11883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11884 { (eval echo configure:11885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11886 if test -z "$ac_err"; then
11887   rm -rf conftest*
11888   eval "ac_cv_header_$ac_safe=yes"
11889 else
11890   echo "$ac_err" >&5
11891   echo "configure: failed program was:" >&5
11892   cat conftest.$ac_ext >&5
11893   rm -rf conftest*
11894   eval "ac_cv_header_$ac_safe=no"
11895 fi
11896 rm -f conftest*
11897 fi
11898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11899   echo "$ac_t""yes" 1>&6
11900   :
11901 else
11902   echo "$ac_t""no" 1>&6
11903 fi
11904
11905
11906         if test $ac_cv_header_sasl_h = yes ; then
11907                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
11908 echo "configure:11909: checking for sasl_client_init in -lsasl" >&5
11909 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
11910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11911   echo $ac_n "(cached) $ac_c" 1>&6
11912 else
11913   ac_save_LIBS="$LIBS"
11914 LIBS="-lsasl  $LIBS"
11915 cat > conftest.$ac_ext <<EOF
11916 #line 11917 "configure"
11917 #include "confdefs.h"
11918 /* Override any gcc2 internal prototype to avoid an error.  */
11919 /* We use char because int might match the return type of a gcc2
11920     builtin and then its argument prototype would still apply.  */
11921 char sasl_client_init();
11922
11923 int main() {
11924 sasl_client_init()
11925 ; return 0; }
11926 EOF
11927 if { (eval echo configure:11928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11928   rm -rf conftest*
11929   eval "ac_cv_lib_$ac_lib_var=yes"
11930 else
11931   echo "configure: failed program was:" >&5
11932   cat conftest.$ac_ext >&5
11933   rm -rf conftest*
11934   eval "ac_cv_lib_$ac_lib_var=no"
11935 fi
11936 rm -f conftest*
11937 LIBS="$ac_save_LIBS"
11938
11939 fi
11940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11941   echo "$ac_t""yes" 1>&6
11942   have_cyrus_sasl=yes
11943 else
11944   echo "$ac_t""no" 1>&6
11945 have_cyrus_sasl=no
11946 fi
11947
11948
11949                 if test $have_cyrus_sasl != no ; then
11950                         SASL_LIBS="-lsasl"
11951                         cat >> confdefs.h <<\EOF
11952 #define HAVE_CYRUS_SASL 1
11953 EOF
11954
11955                         ol_link_sasl=yes
11956                 fi
11957         fi
11958
11959         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
11960                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
11961         fi
11962 fi
11963
11964 ol_link_fetch=no
11965 if test $ol_with_fetch != no ; then
11966         ol=$LIBS
11967 LIBS="-lfetch -lcom_err $LIBS"
11968 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
11969 echo "configure:11970: checking fetch(3) library" >&5
11970 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
11971   echo $ac_n "(cached) $ac_c" 1>&6
11972 else
11973   
11974         cat > conftest.$ac_ext <<EOF
11975 #line 11976 "configure"
11976 #include "confdefs.h"
11977
11978 #include <sys/param.h>
11979 #include <stdio.h>
11980 #include <fetch.h>
11981 int main() {
11982 struct url *u = fetchParseURL("file:///"); 
11983 ; return 0; }
11984 EOF
11985 if { (eval echo configure:11986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11986   rm -rf conftest*
11987   ol_cv_lib_fetch=yes
11988 else
11989   echo "configure: failed program was:" >&5
11990   cat conftest.$ac_ext >&5
11991   rm -rf conftest*
11992   ol_cv_lib_fetch=no
11993 fi
11994 rm -f conftest*
11995 fi
11996
11997 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
11998 LIBS=$ol_LIBS
11999 if test $ol_cv_lib_fetch != no ; then
12000         ol_link_fetch="-lfetch -lcom_err"
12001         cat >> confdefs.h <<\EOF
12002 #define HAVE_FETCH 1
12003 EOF
12004
12005 fi
12006
12007
12008         if test $ol_cv_lib_fetch != no ; then
12009                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12010                 ol_link_fetch=freebsd
12011
12012         elif test $ol_with_fetch != auto ; then
12013                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12014         fi 
12015 fi
12016
12017 ol_link_readline=no
12018 if test $ol_with_readline != no ; then
12019         for ac_hdr in readline/readline.h readline/history.h
12020 do
12021 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12022 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12023 echo "configure:12024: checking for $ac_hdr" >&5
12024 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12025   echo $ac_n "(cached) $ac_c" 1>&6
12026 else
12027   cat > conftest.$ac_ext <<EOF
12028 #line 12029 "configure"
12029 #include "confdefs.h"
12030 #include <$ac_hdr>
12031 EOF
12032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12033 { (eval echo configure:12034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12035 if test -z "$ac_err"; then
12036   rm -rf conftest*
12037   eval "ac_cv_header_$ac_safe=yes"
12038 else
12039   echo "$ac_err" >&5
12040   echo "configure: failed program was:" >&5
12041   cat conftest.$ac_ext >&5
12042   rm -rf conftest*
12043   eval "ac_cv_header_$ac_safe=no"
12044 fi
12045 rm -f conftest*
12046 fi
12047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12048   echo "$ac_t""yes" 1>&6
12049     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12050   cat >> confdefs.h <<EOF
12051 #define $ac_tr_hdr 1
12052 EOF
12053  
12054 else
12055   echo "$ac_t""no" 1>&6
12056 fi
12057 done
12058
12059
12060         if test $ac_cv_header_readline_readline_h = yes ; then
12061                 save_LIBS="$LIBS"
12062                 LIBS="$TERMCAP_LIBS $LIBS"
12063                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12064 echo "configure:12065: checking for readline in -lreadline" >&5
12065 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12066 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12067   echo $ac_n "(cached) $ac_c" 1>&6
12068 else
12069   ac_save_LIBS="$LIBS"
12070 LIBS="-lreadline  $LIBS"
12071 cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 /* Override any gcc2 internal prototype to avoid an error.  */
12075 /* We use char because int might match the return type of a gcc2
12076     builtin and then its argument prototype would still apply.  */
12077 char readline();
12078
12079 int main() {
12080 readline()
12081 ; return 0; }
12082 EOF
12083 if { (eval echo configure:12084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12084   rm -rf conftest*
12085   eval "ac_cv_lib_$ac_lib_var=yes"
12086 else
12087   echo "configure: failed program was:" >&5
12088   cat conftest.$ac_ext >&5
12089   rm -rf conftest*
12090   eval "ac_cv_lib_$ac_lib_var=no"
12091 fi
12092 rm -f conftest*
12093 LIBS="$ac_save_LIBS"
12094
12095 fi
12096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12097   echo "$ac_t""yes" 1>&6
12098   have_readline=yes
12099 else
12100   echo "$ac_t""no" 1>&6
12101 have_readline=no
12102 fi
12103
12104                 LIBS="$save_LIBS"
12105                         
12106                 if test $have_readline = yes ; then
12107                         ol_with_readline=found
12108                         ol_link_readline=yes
12109
12110                         READLINE_LIBS="-lreadline"
12111                 fi
12112         fi
12113 fi
12114
12115 if test $ol_link_readline = yes ; then
12116         cat >> confdefs.h <<\EOF
12117 #define HAVE_READLINE 1
12118 EOF
12119
12120 fi
12121
12122
12123 # FreeBSD (and others) have crypt(3) in -lcrypt
12124 if test $ol_enable_crypt != no ; then
12125         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12126 echo "configure:12127: checking for crypt" >&5
12127 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* System header to define __stub macros and hopefully few prototypes,
12134     which can conflict with char crypt(); below.  */
12135 #include <assert.h>
12136 /* Override any gcc2 internal prototype to avoid an error.  */
12137 /* We use char because int might match the return type of a gcc2
12138     builtin and then its argument prototype would still apply.  */
12139 char crypt();
12140 char (*f)();
12141
12142 int main() {
12143
12144 /* The GNU C library defines this for functions which it implements
12145     to always fail with ENOSYS.  Some functions are actually named
12146     something starting with __ and the normal name is an alias.  */
12147 #if defined (__stub_crypt) || defined (__stub___crypt)
12148 choke me
12149 #else
12150 f = crypt;
12151 #endif
12152
12153 ; return 0; }
12154 EOF
12155 if { (eval echo configure:12156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12156   rm -rf conftest*
12157   eval "ac_cv_func_crypt=yes"
12158 else
12159   echo "configure: failed program was:" >&5
12160   cat conftest.$ac_ext >&5
12161   rm -rf conftest*
12162   eval "ac_cv_func_crypt=no"
12163 fi
12164 rm -f conftest*
12165 fi
12166
12167 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12168   echo "$ac_t""yes" 1>&6
12169   have_crypt=yes
12170 else
12171   echo "$ac_t""no" 1>&6
12172
12173                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12174 echo "configure:12175: checking for crypt in -lcrypt" >&5
12175 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12177   echo $ac_n "(cached) $ac_c" 1>&6
12178 else
12179   ac_save_LIBS="$LIBS"
12180 LIBS="-lcrypt  $LIBS"
12181 cat > conftest.$ac_ext <<EOF
12182 #line 12183 "configure"
12183 #include "confdefs.h"
12184 /* Override any gcc2 internal prototype to avoid an error.  */
12185 /* We use char because int might match the return type of a gcc2
12186     builtin and then its argument prototype would still apply.  */
12187 char crypt();
12188
12189 int main() {
12190 crypt()
12191 ; return 0; }
12192 EOF
12193 if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12194   rm -rf conftest*
12195   eval "ac_cv_lib_$ac_lib_var=yes"
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -rf conftest*
12200   eval "ac_cv_lib_$ac_lib_var=no"
12201 fi
12202 rm -f conftest*
12203 LIBS="$ac_save_LIBS"
12204
12205 fi
12206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12207   echo "$ac_t""yes" 1>&6
12208   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12209                         have_crypt=yes
12210 else
12211   echo "$ac_t""no" 1>&6
12212 have_crypt=no
12213 fi
12214
12215 fi
12216
12217
12218         if test $have_crypt = yes ; then
12219                 cat >> confdefs.h <<\EOF
12220 #define HAVE_CRYPT 1
12221 EOF
12222
12223         else
12224                 echo "configure: warning: could not find crypt" 1>&2
12225                 if test $ol_enable_crypt = yes ; then
12226                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12227                 fi
12228
12229                 echo "configure: warning: disabling crypt support" 1>&2
12230                 ol_enable_crypt=no
12231         fi
12232 fi
12233
12234 # FreeBSD (and others) have setproctitle(3) in -lutil
12235 if test $ol_enable_proctitle != no ; then
12236         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12237 echo "configure:12238: checking for setproctitle" >&5
12238 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12239   echo $ac_n "(cached) $ac_c" 1>&6
12240 else
12241   cat > conftest.$ac_ext <<EOF
12242 #line 12243 "configure"
12243 #include "confdefs.h"
12244 /* System header to define __stub macros and hopefully few prototypes,
12245     which can conflict with char setproctitle(); below.  */
12246 #include <assert.h>
12247 /* Override any gcc2 internal prototype to avoid an error.  */
12248 /* We use char because int might match the return type of a gcc2
12249     builtin and then its argument prototype would still apply.  */
12250 char setproctitle();
12251 char (*f)();
12252
12253 int main() {
12254
12255 /* The GNU C library defines this for functions which it implements
12256     to always fail with ENOSYS.  Some functions are actually named
12257     something starting with __ and the normal name is an alias.  */
12258 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12259 choke me
12260 #else
12261 f = setproctitle;
12262 #endif
12263
12264 ; return 0; }
12265 EOF
12266 if { (eval echo configure:12267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12267   rm -rf conftest*
12268   eval "ac_cv_func_setproctitle=yes"
12269 else
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -rf conftest*
12273   eval "ac_cv_func_setproctitle=no"
12274 fi
12275 rm -f conftest*
12276 fi
12277
12278 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12279   echo "$ac_t""yes" 1>&6
12280   have_setproctitle=yes
12281 else
12282   echo "$ac_t""no" 1>&6
12283
12284                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12285 echo "configure:12286: checking for setproctitle in -lutil" >&5
12286 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12288   echo $ac_n "(cached) $ac_c" 1>&6
12289 else
12290   ac_save_LIBS="$LIBS"
12291 LIBS="-lutil  $LIBS"
12292 cat > conftest.$ac_ext <<EOF
12293 #line 12294 "configure"
12294 #include "confdefs.h"
12295 /* Override any gcc2 internal prototype to avoid an error.  */
12296 /* We use char because int might match the return type of a gcc2
12297     builtin and then its argument prototype would still apply.  */
12298 char setproctitle();
12299
12300 int main() {
12301 setproctitle()
12302 ; return 0; }
12303 EOF
12304 if { (eval echo configure:12305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12305   rm -rf conftest*
12306   eval "ac_cv_lib_$ac_lib_var=yes"
12307 else
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -rf conftest*
12311   eval "ac_cv_lib_$ac_lib_var=no"
12312 fi
12313 rm -f conftest*
12314 LIBS="$ac_save_LIBS"
12315
12316 fi
12317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12318   echo "$ac_t""yes" 1>&6
12319   have_setproctitle=yes
12320                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12321 else
12322   echo "$ac_t""no" 1>&6
12323 have_setproctitle=no
12324                         LIBOBJS="$LIBOBJS setproctitle.o"
12325 fi
12326
12327 fi
12328
12329
12330         if test $have_setproctitle = yes ; then
12331                 cat >> confdefs.h <<\EOF
12332 #define HAVE_SETPROCTITLE 1
12333 EOF
12334
12335         fi
12336 fi
12337
12338 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12339 echo "configure:12340: checking for uid_t in sys/types.h" >&5
12340 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12341   echo $ac_n "(cached) $ac_c" 1>&6
12342 else
12343   cat > conftest.$ac_ext <<EOF
12344 #line 12345 "configure"
12345 #include "confdefs.h"
12346 #include <sys/types.h>
12347 EOF
12348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12349   egrep "uid_t" >/dev/null 2>&1; then
12350   rm -rf conftest*
12351   ac_cv_type_uid_t=yes
12352 else
12353   rm -rf conftest*
12354   ac_cv_type_uid_t=no
12355 fi
12356 rm -f conftest*
12357
12358 fi
12359
12360 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12361 if test $ac_cv_type_uid_t = no; then
12362   cat >> confdefs.h <<\EOF
12363 #define uid_t int
12364 EOF
12365
12366   cat >> confdefs.h <<\EOF
12367 #define gid_t int
12368 EOF
12369
12370 fi
12371
12372 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12373 echo "configure:12374: checking type of array argument to getgroups" >&5
12374 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12375   echo $ac_n "(cached) $ac_c" 1>&6
12376 else
12377   if test "$cross_compiling" = yes; then
12378   ac_cv_type_getgroups=cross
12379 else
12380   cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383
12384 /* Thanks to Mike Rendell for this test.  */
12385 #include <sys/types.h>
12386 #define NGID 256
12387 #undef MAX
12388 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12389 main()
12390 {
12391   gid_t gidset[NGID];
12392   int i, n;
12393   union { gid_t gval; long lval; }  val;
12394
12395   val.lval = -1;
12396   for (i = 0; i < NGID; i++)
12397     gidset[i] = val.gval;
12398   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12399                  gidset);
12400   /* Exit non-zero if getgroups seems to require an array of ints.  This
12401      happens when gid_t is short but getgroups modifies an array of ints.  */
12402   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12403 }
12404
12405 EOF
12406 if { (eval echo configure:12407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12407 then
12408     ac_cv_type_getgroups=gid_t
12409 else
12410   echo "configure: failed program was:" >&5
12411   cat conftest.$ac_ext >&5
12412   rm -fr conftest*
12413   ac_cv_type_getgroups=int
12414 fi
12415 rm -fr conftest*
12416 fi
12417
12418 if test $ac_cv_type_getgroups = cross; then
12419         cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 #include <unistd.h>
12423 EOF
12424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12425   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12426   rm -rf conftest*
12427   ac_cv_type_getgroups=gid_t
12428 else
12429   rm -rf conftest*
12430   ac_cv_type_getgroups=int
12431 fi
12432 rm -f conftest*
12433
12434 fi
12435 fi
12436
12437 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12438 cat >> confdefs.h <<EOF
12439 #define GETGROUPS_T $ac_cv_type_getgroups
12440 EOF
12441
12442  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12443 echo "configure:12444: checking for ANSI C header files" >&5
12444 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12445   echo $ac_n "(cached) $ac_c" 1>&6
12446 else
12447   cat > conftest.$ac_ext <<EOF
12448 #line 12449 "configure"
12449 #include "confdefs.h"
12450 #include <stdlib.h>
12451 #include <stdarg.h>
12452 #include <string.h>
12453 #include <float.h>
12454 EOF
12455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12456 { (eval echo configure:12457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12458 if test -z "$ac_err"; then
12459   rm -rf conftest*
12460   ac_cv_header_stdc=yes
12461 else
12462   echo "$ac_err" >&5
12463   echo "configure: failed program was:" >&5
12464   cat conftest.$ac_ext >&5
12465   rm -rf conftest*
12466   ac_cv_header_stdc=no
12467 fi
12468 rm -f conftest*
12469
12470 if test $ac_cv_header_stdc = yes; then
12471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12472 cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 #include <string.h>
12476 EOF
12477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12478   egrep "memchr" >/dev/null 2>&1; then
12479   :
12480 else
12481   rm -rf conftest*
12482   ac_cv_header_stdc=no
12483 fi
12484 rm -f conftest*
12485
12486 fi
12487
12488 if test $ac_cv_header_stdc = yes; then
12489   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12490 cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 #include <stdlib.h>
12494 EOF
12495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12496   egrep "free" >/dev/null 2>&1; then
12497   :
12498 else
12499   rm -rf conftest*
12500   ac_cv_header_stdc=no
12501 fi
12502 rm -f conftest*
12503
12504 fi
12505
12506 if test $ac_cv_header_stdc = yes; then
12507   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12508 if test "$cross_compiling" = yes; then
12509   :
12510 else
12511   cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514 #include <ctype.h>
12515 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12516 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12517 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12518 int main () { int i; for (i = 0; i < 256; i++)
12519 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12520 exit (0); }
12521
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12524 then
12525   :
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -fr conftest*
12530   ac_cv_header_stdc=no
12531 fi
12532 rm -fr conftest*
12533 fi
12534
12535 fi
12536 fi
12537
12538 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12539 if test $ac_cv_header_stdc = yes; then
12540   cat >> confdefs.h <<\EOF
12541 #define STDC_HEADERS 1
12542 EOF
12543
12544 fi
12545
12546 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12547 echo "configure:12548: checking for mode_t" >&5
12548 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12549   echo $ac_n "(cached) $ac_c" 1>&6
12550 else
12551   cat > conftest.$ac_ext <<EOF
12552 #line 12553 "configure"
12553 #include "confdefs.h"
12554 #include <sys/types.h>
12555 #if STDC_HEADERS
12556 #include <stdlib.h>
12557 #include <stddef.h>
12558 #endif
12559 EOF
12560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12561   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12562   rm -rf conftest*
12563   eval "ac_cv_type_mode_t=yes"
12564 else
12565   rm -rf conftest*
12566   eval "ac_cv_type_mode_t=no"
12567 fi
12568 rm -f conftest*
12569
12570 fi
12571 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12572   echo "$ac_t""yes" 1>&6
12573 else
12574   echo "$ac_t""no" 1>&6
12575   cat >> confdefs.h <<EOF
12576 #define mode_t int
12577 EOF
12578
12579 fi
12580
12581 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12582 echo "configure:12583: checking for off_t" >&5
12583 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12584   echo $ac_n "(cached) $ac_c" 1>&6
12585 else
12586   cat > conftest.$ac_ext <<EOF
12587 #line 12588 "configure"
12588 #include "confdefs.h"
12589 #include <sys/types.h>
12590 #if STDC_HEADERS
12591 #include <stdlib.h>
12592 #include <stddef.h>
12593 #endif
12594 EOF
12595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12596   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12597   rm -rf conftest*
12598   eval "ac_cv_type_off_t=yes"
12599 else
12600   rm -rf conftest*
12601   eval "ac_cv_type_off_t=no"
12602 fi
12603 rm -f conftest*
12604
12605 fi
12606 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12607   echo "$ac_t""yes" 1>&6
12608 else
12609   echo "$ac_t""no" 1>&6
12610   cat >> confdefs.h <<EOF
12611 #define off_t long
12612 EOF
12613
12614 fi
12615
12616 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12617 echo "configure:12618: checking for pid_t" >&5
12618 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12619   echo $ac_n "(cached) $ac_c" 1>&6
12620 else
12621   cat > conftest.$ac_ext <<EOF
12622 #line 12623 "configure"
12623 #include "confdefs.h"
12624 #include <sys/types.h>
12625 #if STDC_HEADERS
12626 #include <stdlib.h>
12627 #include <stddef.h>
12628 #endif
12629 EOF
12630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12631   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12632   rm -rf conftest*
12633   eval "ac_cv_type_pid_t=yes"
12634 else
12635   rm -rf conftest*
12636   eval "ac_cv_type_pid_t=no"
12637 fi
12638 rm -f conftest*
12639
12640 fi
12641 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12642   echo "$ac_t""yes" 1>&6
12643 else
12644   echo "$ac_t""no" 1>&6
12645   cat >> confdefs.h <<EOF
12646 #define pid_t int
12647 EOF
12648
12649 fi
12650
12651 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12652 echo "configure:12653: checking for ptrdiff_t" >&5
12653 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12654   echo $ac_n "(cached) $ac_c" 1>&6
12655 else
12656   cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 #include <stddef.h>
12660 int main() {
12661 ptrdiff_t p
12662 ; return 0; }
12663 EOF
12664 if { (eval echo configure:12665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12665   rm -rf conftest*
12666   am_cv_type_ptrdiff_t=yes
12667 else
12668   echo "configure: failed program was:" >&5
12669   cat conftest.$ac_ext >&5
12670   rm -rf conftest*
12671   am_cv_type_ptrdiff_t=no
12672 fi
12673 rm -f conftest*
12674 fi
12675
12676 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12677    if test $am_cv_type_ptrdiff_t = yes; then
12678      cat >> confdefs.h <<\EOF
12679 #define HAVE_PTRDIFF_T 1
12680 EOF
12681
12682    fi
12683
12684 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12685 echo "configure:12686: checking return type of signal handlers" >&5
12686 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12687   echo $ac_n "(cached) $ac_c" 1>&6
12688 else
12689   cat > conftest.$ac_ext <<EOF
12690 #line 12691 "configure"
12691 #include "confdefs.h"
12692 #include <sys/types.h>
12693 #include <signal.h>
12694 #ifdef signal
12695 #undef signal
12696 #endif
12697 #ifdef __cplusplus
12698 extern "C" void (*signal (int, void (*)(int)))(int);
12699 #else
12700 void (*signal ()) ();
12701 #endif
12702
12703 int main() {
12704 int i;
12705 ; return 0; }
12706 EOF
12707 if { (eval echo configure:12708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12708   rm -rf conftest*
12709   ac_cv_type_signal=void
12710 else
12711   echo "configure: failed program was:" >&5
12712   cat conftest.$ac_ext >&5
12713   rm -rf conftest*
12714   ac_cv_type_signal=int
12715 fi
12716 rm -f conftest*
12717 fi
12718
12719 echo "$ac_t""$ac_cv_type_signal" 1>&6
12720 cat >> confdefs.h <<EOF
12721 #define RETSIGTYPE $ac_cv_type_signal
12722 EOF
12723
12724
12725 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12726 echo "configure:12727: checking for sig_atomic_t" >&5
12727 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12728   echo $ac_n "(cached) $ac_c" 1>&6
12729 else
12730   cat > conftest.$ac_ext <<EOF
12731 #line 12732 "configure"
12732 #include "confdefs.h"
12733 #include <signal.h>
12734 int main() {
12735 sig_atomic_t atomic;
12736 ; return 0; }
12737 EOF
12738 if { (eval echo configure:12739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12739   rm -rf conftest*
12740   ol_cv_type_sig_atomic_t=yes
12741 else
12742   echo "configure: failed program was:" >&5
12743   cat conftest.$ac_ext >&5
12744   rm -rf conftest*
12745   ol_cv_type_sig_atomic_t=no
12746 fi
12747 rm -f conftest*
12748 fi
12749
12750 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12751   if test $ol_cv_type_sig_atomic_t = no; then
12752     cat >> confdefs.h <<\EOF
12753 #define sig_atomic_t int
12754 EOF
12755
12756   fi
12757  
12758 echo $ac_n "checking for size_t""... $ac_c" 1>&6
12759 echo "configure:12760: checking for size_t" >&5
12760 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
12761   echo $ac_n "(cached) $ac_c" 1>&6
12762 else
12763   cat > conftest.$ac_ext <<EOF
12764 #line 12765 "configure"
12765 #include "confdefs.h"
12766 #include <sys/types.h>
12767 #if STDC_HEADERS
12768 #include <stdlib.h>
12769 #include <stddef.h>
12770 #endif
12771 EOF
12772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12773   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12774   rm -rf conftest*
12775   eval "ac_cv_type_size_t=yes"
12776 else
12777   rm -rf conftest*
12778   eval "ac_cv_type_size_t=no"
12779 fi
12780 rm -f conftest*
12781
12782 fi
12783 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
12784   echo "$ac_t""yes" 1>&6
12785 else
12786   echo "$ac_t""no" 1>&6
12787   cat >> confdefs.h <<EOF
12788 #define size_t unsigned
12789 EOF
12790
12791 fi
12792
12793 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
12794 echo "configure:12795: checking for socklen_t" >&5
12795 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
12796   echo $ac_n "(cached) $ac_c" 1>&6
12797 else
12798   cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801
12802 #ifdef HAVE_SYS_TYPES_H
12803 #include <sys/types.h>
12804 #endif
12805 #ifdef HAVE_SYS_SOCKET_H
12806 #include <sys/socket.h>
12807 #endif
12808
12809 int main() {
12810 socklen_t len;
12811 ; return 0; }
12812 EOF
12813 if { (eval echo configure:12814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12814   rm -rf conftest*
12815   ol_cv_type_socklen_t=yes
12816 else
12817   echo "configure: failed program was:" >&5
12818   cat conftest.$ac_ext >&5
12819   rm -rf conftest*
12820   ol_cv_type_socklen_t=no
12821 fi
12822 rm -f conftest*
12823 fi
12824
12825 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
12826   if test $ol_cv_type_socklen_t = no; then
12827     cat >> confdefs.h <<\EOF
12828 #define socklen_t int
12829 EOF
12830
12831   fi
12832  
12833 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
12834 echo "configure:12835: checking for member st_blksize in aggregate type struct stat" >&5
12835 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
12836   echo $ac_n "(cached) $ac_c" 1>&6
12837 else
12838   cat > conftest.$ac_ext <<EOF
12839 #line 12840 "configure"
12840 #include "confdefs.h"
12841 #include <sys/types.h>
12842 #include <sys/stat.h>
12843 int main() {
12844 struct stat foo; foo.st_blksize;
12845 ; return 0; }
12846 EOF
12847 if { (eval echo configure:12848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12848   rm -rf conftest*
12849   ac_cv_c_struct_member_st_blksize=yes
12850 else
12851   echo "configure: failed program was:" >&5
12852   cat conftest.$ac_ext >&5
12853   rm -rf conftest*
12854   ac_cv_c_struct_member_st_blksize=no
12855 fi
12856 rm -f conftest*
12857 fi
12858
12859 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
12860 st_blksize="$ac_cv_c_struct_member_st_blksize"
12861 if test $ac_cv_c_struct_member_st_blksize = yes; then
12862   cat >> confdefs.h <<\EOF
12863 #define HAVE_ST_BLKSIZE 1
12864 EOF
12865
12866 fi
12867
12868 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
12869 echo "configure:12870: checking whether time.h and sys/time.h may both be included" >&5
12870 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
12871   echo $ac_n "(cached) $ac_c" 1>&6
12872 else
12873   cat > conftest.$ac_ext <<EOF
12874 #line 12875 "configure"
12875 #include "confdefs.h"
12876 #include <sys/types.h>
12877 #include <sys/time.h>
12878 #include <time.h>
12879 int main() {
12880 struct tm *tp;
12881 ; return 0; }
12882 EOF
12883 if { (eval echo configure:12884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12884   rm -rf conftest*
12885   ac_cv_header_time=yes
12886 else
12887   echo "configure: failed program was:" >&5
12888   cat conftest.$ac_ext >&5
12889   rm -rf conftest*
12890   ac_cv_header_time=no
12891 fi
12892 rm -f conftest*
12893 fi
12894
12895 echo "$ac_t""$ac_cv_header_time" 1>&6
12896 if test $ac_cv_header_time = yes; then
12897   cat >> confdefs.h <<\EOF
12898 #define TIME_WITH_SYS_TIME 1
12899 EOF
12900
12901 fi
12902
12903 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
12904 echo "configure:12905: checking whether struct tm is in sys/time.h or time.h" >&5
12905 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
12906   echo $ac_n "(cached) $ac_c" 1>&6
12907 else
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 #include <sys/types.h>
12912 #include <time.h>
12913 int main() {
12914 struct tm *tp; tp->tm_sec;
12915 ; return 0; }
12916 EOF
12917 if { (eval echo configure:12918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12918   rm -rf conftest*
12919   ac_cv_struct_tm=time.h
12920 else
12921   echo "configure: failed program was:" >&5
12922   cat conftest.$ac_ext >&5
12923   rm -rf conftest*
12924   ac_cv_struct_tm=sys/time.h
12925 fi
12926 rm -f conftest*
12927 fi
12928
12929 echo "$ac_t""$ac_cv_struct_tm" 1>&6
12930 if test $ac_cv_struct_tm = sys/time.h; then
12931   cat >> confdefs.h <<\EOF
12932 #define TM_IN_SYS_TIME 1
12933 EOF
12934
12935 fi
12936
12937 # test for pw_gecos in struct passwd
12938 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
12939 echo "configure:12940: checking struct passwd for pw_gecos" >&5
12940 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
12941   echo $ac_n "(cached) $ac_c" 1>&6
12942 else
12943   
12944         cat > conftest.$ac_ext <<EOF
12945 #line 12946 "configure"
12946 #include "confdefs.h"
12947 #include <pwd.h>
12948 int main() {
12949
12950         struct passwd pwd;
12951         pwd.pw_gecos = pwd.pw_name;
12952
12953 ; return 0; }
12954 EOF
12955 if { (eval echo configure:12956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12956   rm -rf conftest*
12957   ol_cv_struct_passwd_pw_gecos=yes
12958 else
12959   echo "configure: failed program was:" >&5
12960   cat conftest.$ac_ext >&5
12961   rm -rf conftest*
12962   ol_cv_struct_passwd_pw_gecos=no
12963 fi
12964 rm -f conftest*
12965 fi
12966
12967 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
12968 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
12969         cat >> confdefs.h <<\EOF
12970 #define HAVE_PW_GECOS 1
12971 EOF
12972
12973 fi
12974
12975 # test for pw_passwd in struct passwd
12976 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
12977 echo "configure:12978: checking struct passwd for pw_passwd" >&5
12978 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
12979   echo $ac_n "(cached) $ac_c" 1>&6
12980 else
12981   
12982         cat > conftest.$ac_ext <<EOF
12983 #line 12984 "configure"
12984 #include "confdefs.h"
12985 #include <pwd.h>
12986 int main() {
12987
12988         struct passwd pwd;
12989         pwd.pw_passwd = pwd.pw_name;
12990
12991 ; return 0; }
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12994   rm -rf conftest*
12995   ol_cv_struct_passwd_pw_passwd=yes
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -rf conftest*
13000   ol_cv_struct_passwd_pw_passwd=no
13001 fi
13002 rm -f conftest*
13003 fi
13004
13005 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13006 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13007         cat >> confdefs.h <<\EOF
13008 #define HAVE_PW_PASSWD 1
13009 EOF
13010
13011 fi
13012
13013
13014 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13015 echo "configure:13016: checking if toupper() requires islower()" >&5
13016 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13017   echo $ac_n "(cached) $ac_c" 1>&6
13018 else
13019   
13020         if test "$cross_compiling" = yes; then
13021   ol_cv_c_upper_lower=safe
13022 else
13023   cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026
13027 #include <ctype.h>
13028 main()
13029 {
13030         if ('C' == toupper('C'))
13031                 exit(0);
13032         else
13033                 exit(1);
13034 }
13035 EOF
13036 if { (eval echo configure:13037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13037 then
13038   ol_cv_c_upper_lower=no
13039 else
13040   echo "configure: failed program was:" >&5
13041   cat conftest.$ac_ext >&5
13042   rm -fr conftest*
13043   ol_cv_c_upper_lower=yes
13044 fi
13045 rm -fr conftest*
13046 fi
13047
13048 fi
13049
13050 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13051 if test $ol_cv_c_upper_lower != no ; then
13052         cat >> confdefs.h <<\EOF
13053 #define C_UPPER_LOWER 1
13054 EOF
13055
13056 fi
13057
13058 echo $ac_n "checking for working const""... $ac_c" 1>&6
13059 echo "configure:13060: checking for working const" >&5
13060 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13061   echo $ac_n "(cached) $ac_c" 1>&6
13062 else
13063   cat > conftest.$ac_ext <<EOF
13064 #line 13065 "configure"
13065 #include "confdefs.h"
13066
13067 int main() {
13068
13069 /* Ultrix mips cc rejects this.  */
13070 typedef int charset[2]; const charset x;
13071 /* SunOS 4.1.1 cc rejects this.  */
13072 char const *const *ccp;
13073 char **p;
13074 /* NEC SVR4.0.2 mips cc rejects this.  */
13075 struct point {int x, y;};
13076 static struct point const zero = {0,0};
13077 /* AIX XL C 1.02.0.0 rejects this.
13078    It does not let you subtract one const X* pointer from another in an arm
13079    of an if-expression whose if-part is not a constant expression */
13080 const char *g = "string";
13081 ccp = &g + (g ? g-g : 0);
13082 /* HPUX 7.0 cc rejects these. */
13083 ++ccp;
13084 p = (char**) ccp;
13085 ccp = (char const *const *) p;
13086 { /* SCO 3.2v4 cc rejects this.  */
13087   char *t;
13088   char const *s = 0 ? (char *) 0 : (char const *) 0;
13089
13090   *t++ = 0;
13091 }
13092 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13093   int x[] = {25, 17};
13094   const int *foo = &x[0];
13095   ++foo;
13096 }
13097 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13098   typedef const int *iptr;
13099   iptr p = 0;
13100   ++p;
13101 }
13102 { /* AIX XL C 1.02.0.0 rejects this saying
13103      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13104   struct s { int j; const int *ap[3]; };
13105   struct s *b; b->j = 5;
13106 }
13107 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13108   const int foo = 10;
13109 }
13110
13111 ; return 0; }
13112 EOF
13113 if { (eval echo configure:13114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13114   rm -rf conftest*
13115   ac_cv_c_const=yes
13116 else
13117   echo "configure: failed program was:" >&5
13118   cat conftest.$ac_ext >&5
13119   rm -rf conftest*
13120   ac_cv_c_const=no
13121 fi
13122 rm -f conftest*
13123 fi
13124
13125 echo "$ac_t""$ac_cv_c_const" 1>&6
13126 if test $ac_cv_c_const = no; then
13127   cat >> confdefs.h <<\EOF
13128 #define const 
13129 EOF
13130
13131 fi
13132
13133 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13134 echo "configure:13135: checking if compiler understands volatile" >&5
13135 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13136   echo $ac_n "(cached) $ac_c" 1>&6
13137 else
13138   cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 int x, y, z;
13142 int main() {
13143 volatile int a; int * volatile b = x ? &y : &z;
13144       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13145       *b = 0;
13146 ; return 0; }
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13149   rm -rf conftest*
13150   ol_cv_c_volatile=yes
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -rf conftest*
13155   ol_cv_c_volatile=no
13156 fi
13157 rm -f conftest*
13158 fi
13159
13160 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13161   if test $ol_cv_c_volatile = yes; then
13162     : 
13163   else
13164     cat >> confdefs.h <<\EOF
13165 #define volatile 
13166 EOF
13167
13168   fi
13169  
13170
13171 if test $cross_compiling = yes ; then
13172         cat >> confdefs.h <<\EOF
13173 #define CROSS_COMPILING 1
13174 EOF
13175
13176
13177         cat >> confdefs.h <<\EOF
13178 #define LBER_INT_T long
13179 EOF
13180
13181         cat >> confdefs.h <<\EOF
13182 #define LBER_TAG_T long
13183 EOF
13184
13185         cat >> confdefs.h <<\EOF
13186 #define LBER_SOCKET_T int
13187 EOF
13188
13189
13190 else
13191         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13192 echo "configure:13193: checking whether byte ordering is bigendian" >&5
13193 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13194   echo $ac_n "(cached) $ac_c" 1>&6
13195 else
13196   ac_cv_c_bigendian=unknown
13197 # See if sys/param.h defines the BYTE_ORDER macro.
13198 cat > conftest.$ac_ext <<EOF
13199 #line 13200 "configure"
13200 #include "confdefs.h"
13201 #include <sys/types.h>
13202 #include <sys/param.h>
13203 int main() {
13204
13205 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13206  bogus endian macros
13207 #endif
13208 ; return 0; }
13209 EOF
13210 if { (eval echo configure:13211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13211   rm -rf conftest*
13212   # It does; now see whether it defined to BIG_ENDIAN or not.
13213 cat > conftest.$ac_ext <<EOF
13214 #line 13215 "configure"
13215 #include "confdefs.h"
13216 #include <sys/types.h>
13217 #include <sys/param.h>
13218 int main() {
13219
13220 #if BYTE_ORDER != BIG_ENDIAN
13221  not big endian
13222 #endif
13223 ; return 0; }
13224 EOF
13225 if { (eval echo configure:13226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13226   rm -rf conftest*
13227   ac_cv_c_bigendian=yes
13228 else
13229   echo "configure: failed program was:" >&5
13230   cat conftest.$ac_ext >&5
13231   rm -rf conftest*
13232   ac_cv_c_bigendian=no
13233 fi
13234 rm -f conftest*
13235 else
13236   echo "configure: failed program was:" >&5
13237   cat conftest.$ac_ext >&5
13238 fi
13239 rm -f conftest*
13240 if test $ac_cv_c_bigendian = unknown; then
13241 if test "$cross_compiling" = yes; then
13242     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13243 else
13244   cat > conftest.$ac_ext <<EOF
13245 #line 13246 "configure"
13246 #include "confdefs.h"
13247 main () {
13248   /* Are we little or big endian?  From Harbison&Steele.  */
13249   union
13250   {
13251     long l;
13252     char c[sizeof (long)];
13253   } u;
13254   u.l = 1;
13255   exit (u.c[sizeof (long) - 1] == 1);
13256 }
13257 EOF
13258 if { (eval echo configure:13259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13259 then
13260   ac_cv_c_bigendian=no
13261 else
13262   echo "configure: failed program was:" >&5
13263   cat conftest.$ac_ext >&5
13264   rm -fr conftest*
13265   ac_cv_c_bigendian=yes
13266 fi
13267 rm -fr conftest*
13268 fi
13269
13270 fi
13271 fi
13272
13273 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13274 if test $ac_cv_c_bigendian = yes; then
13275   cat >> confdefs.h <<\EOF
13276 #define WORDS_BIGENDIAN 1
13277 EOF
13278
13279 fi
13280
13281         echo $ac_n "checking size of short""... $ac_c" 1>&6
13282 echo "configure:13283: checking size of short" >&5
13283 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13284   echo $ac_n "(cached) $ac_c" 1>&6
13285 else
13286   if test "$cross_compiling" = yes; then
13287     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13288 else
13289   cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 #include <stdio.h>
13293 main()
13294 {
13295   FILE *f=fopen("conftestval", "w");
13296   if (!f) exit(1);
13297   fprintf(f, "%d\n", sizeof(short));
13298   exit(0);
13299 }
13300 EOF
13301 if { (eval echo configure:13302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13302 then
13303   ac_cv_sizeof_short=`cat conftestval`
13304 else
13305   echo "configure: failed program was:" >&5
13306   cat conftest.$ac_ext >&5
13307   rm -fr conftest*
13308   ac_cv_sizeof_short=0
13309 fi
13310 rm -fr conftest*
13311 fi
13312
13313 fi
13314 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13315 cat >> confdefs.h <<EOF
13316 #define SIZEOF_SHORT $ac_cv_sizeof_short
13317 EOF
13318
13319  
13320         echo $ac_n "checking size of int""... $ac_c" 1>&6
13321 echo "configure:13322: checking size of int" >&5
13322 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13323   echo $ac_n "(cached) $ac_c" 1>&6
13324 else
13325   if test "$cross_compiling" = yes; then
13326     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13327 else
13328   cat > conftest.$ac_ext <<EOF
13329 #line 13330 "configure"
13330 #include "confdefs.h"
13331 #include <stdio.h>
13332 main()
13333 {
13334   FILE *f=fopen("conftestval", "w");
13335   if (!f) exit(1);
13336   fprintf(f, "%d\n", sizeof(int));
13337   exit(0);
13338 }
13339 EOF
13340 if { (eval echo configure:13341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13341 then
13342   ac_cv_sizeof_int=`cat conftestval`
13343 else
13344   echo "configure: failed program was:" >&5
13345   cat conftest.$ac_ext >&5
13346   rm -fr conftest*
13347   ac_cv_sizeof_int=0
13348 fi
13349 rm -fr conftest*
13350 fi
13351
13352 fi
13353 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13354 cat >> confdefs.h <<EOF
13355 #define SIZEOF_INT $ac_cv_sizeof_int
13356 EOF
13357
13358  
13359         echo $ac_n "checking size of long""... $ac_c" 1>&6
13360 echo "configure:13361: checking size of long" >&5
13361 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13362   echo $ac_n "(cached) $ac_c" 1>&6
13363 else
13364   if test "$cross_compiling" = yes; then
13365     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13366 else
13367   cat > conftest.$ac_ext <<EOF
13368 #line 13369 "configure"
13369 #include "confdefs.h"
13370 #include <stdio.h>
13371 main()
13372 {
13373   FILE *f=fopen("conftestval", "w");
13374   if (!f) exit(1);
13375   fprintf(f, "%d\n", sizeof(long));
13376   exit(0);
13377 }
13378 EOF
13379 if { (eval echo configure:13380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13380 then
13381   ac_cv_sizeof_long=`cat conftestval`
13382 else
13383   echo "configure: failed program was:" >&5
13384   cat conftest.$ac_ext >&5
13385   rm -fr conftest*
13386   ac_cv_sizeof_long=0
13387 fi
13388 rm -fr conftest*
13389 fi
13390
13391 fi
13392 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13393 cat >> confdefs.h <<EOF
13394 #define SIZEOF_LONG $ac_cv_sizeof_long
13395 EOF
13396
13397
13398
13399         if test "$ac_cv_sizeof_int" -lt 4 ; then
13400                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13401
13402                 cat >> confdefs.h <<\EOF
13403 #define LBER_INT_T long
13404 EOF
13405
13406                 cat >> confdefs.h <<\EOF
13407 #define LBER_TAG_T long
13408 EOF
13409
13410                 cat >> confdefs.h <<\EOF
13411 #define LBER_SOCKET_T int
13412 EOF
13413
13414         else
13415                 cat >> confdefs.h <<\EOF
13416 #define LBER_INT_T int
13417 EOF
13418
13419                 cat >> confdefs.h <<\EOF
13420 #define LBER_TAG_T long
13421 EOF
13422
13423                 cat >> confdefs.h <<\EOF
13424 #define LBER_SOCKET_T int
13425 EOF
13426
13427         fi
13428 fi
13429
13430 cat >> confdefs.h <<\EOF
13431 #define LBER_LEN_T long
13432 EOF
13433
13434
13435 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13436 echo "configure:13437: checking for 8-bit clean memcmp" >&5
13437 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13438   echo $ac_n "(cached) $ac_c" 1>&6
13439 else
13440   if test "$cross_compiling" = yes; then
13441   ac_cv_func_memcmp_clean=no
13442 else
13443   cat > conftest.$ac_ext <<EOF
13444 #line 13445 "configure"
13445 #include "confdefs.h"
13446
13447 main()
13448 {
13449   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13450   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13451 }
13452
13453 EOF
13454 if { (eval echo configure:13455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13455 then
13456   ac_cv_func_memcmp_clean=yes
13457 else
13458   echo "configure: failed program was:" >&5
13459   cat conftest.$ac_ext >&5
13460   rm -fr conftest*
13461   ac_cv_func_memcmp_clean=no
13462 fi
13463 rm -fr conftest*
13464 fi
13465
13466 fi
13467
13468 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13469 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13470
13471 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13472 echo "configure:13473: checking for strftime" >&5
13473 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13474   echo $ac_n "(cached) $ac_c" 1>&6
13475 else
13476   cat > conftest.$ac_ext <<EOF
13477 #line 13478 "configure"
13478 #include "confdefs.h"
13479 /* System header to define __stub macros and hopefully few prototypes,
13480     which can conflict with char strftime(); below.  */
13481 #include <assert.h>
13482 /* Override any gcc2 internal prototype to avoid an error.  */
13483 /* We use char because int might match the return type of a gcc2
13484     builtin and then its argument prototype would still apply.  */
13485 char strftime();
13486 char (*f)();
13487
13488 int main() {
13489
13490 /* The GNU C library defines this for functions which it implements
13491     to always fail with ENOSYS.  Some functions are actually named
13492     something starting with __ and the normal name is an alias.  */
13493 #if defined (__stub_strftime) || defined (__stub___strftime)
13494 choke me
13495 #else
13496 f = strftime;
13497 #endif
13498
13499 ; return 0; }
13500 EOF
13501 if { (eval echo configure:13502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13502   rm -rf conftest*
13503   eval "ac_cv_func_strftime=yes"
13504 else
13505   echo "configure: failed program was:" >&5
13506   cat conftest.$ac_ext >&5
13507   rm -rf conftest*
13508   eval "ac_cv_func_strftime=no"
13509 fi
13510 rm -f conftest*
13511 fi
13512
13513 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13514   echo "$ac_t""yes" 1>&6
13515   cat >> confdefs.h <<\EOF
13516 #define HAVE_STRFTIME 1
13517 EOF
13518
13519 else
13520   echo "$ac_t""no" 1>&6
13521 # strftime is in -lintl on SCO UNIX.
13522 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13523 echo "configure:13524: checking for strftime in -lintl" >&5
13524 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13525 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13526   echo $ac_n "(cached) $ac_c" 1>&6
13527 else
13528   ac_save_LIBS="$LIBS"
13529 LIBS="-lintl  $LIBS"
13530 cat > conftest.$ac_ext <<EOF
13531 #line 13532 "configure"
13532 #include "confdefs.h"
13533 /* Override any gcc2 internal prototype to avoid an error.  */
13534 /* We use char because int might match the return type of a gcc2
13535     builtin and then its argument prototype would still apply.  */
13536 char strftime();
13537
13538 int main() {
13539 strftime()
13540 ; return 0; }
13541 EOF
13542 if { (eval echo configure:13543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13543   rm -rf conftest*
13544   eval "ac_cv_lib_$ac_lib_var=yes"
13545 else
13546   echo "configure: failed program was:" >&5
13547   cat conftest.$ac_ext >&5
13548   rm -rf conftest*
13549   eval "ac_cv_lib_$ac_lib_var=no"
13550 fi
13551 rm -f conftest*
13552 LIBS="$ac_save_LIBS"
13553
13554 fi
13555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13556   echo "$ac_t""yes" 1>&6
13557   cat >> confdefs.h <<\EOF
13558 #define HAVE_STRFTIME 1
13559 EOF
13560
13561 LIBS="-lintl $LIBS"
13562 else
13563   echo "$ac_t""no" 1>&6
13564 fi
13565
13566 fi
13567
13568
13569 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13570 echo "configure:13571: checking for inet_aton()" >&5
13571 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13572   echo $ac_n "(cached) $ac_c" 1>&6
13573 else
13574   cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577
13578 #ifdef HAVE_SYS_TYPES_H
13579 #       include <sys/types.h>
13580 #endif
13581 #ifdef HAVE_SYS_SOCKET_H
13582 #       include <sys/socket.h>
13583 #       ifdef HAVE_SYS_SELECT_H
13584 #               include <sys/select.h>
13585 #       endif
13586 #       include <netinet/in.h>
13587 #       ifdef HAVE_ARPA_INET_H
13588 #               include <arpa/inet.h>
13589 #       endif
13590 #endif
13591
13592 int main() {
13593 struct in_addr in;
13594 int rc = inet_aton( "255.255.255.255", &in );
13595 ; return 0; }
13596 EOF
13597 if { (eval echo configure:13598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13598   rm -rf conftest*
13599   ol_cv_func_inet_aton=yes
13600 else
13601   echo "configure: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   rm -rf conftest*
13604   ol_cv_func_inet_aton=no
13605 fi
13606 rm -f conftest*
13607 fi
13608
13609 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13610   if test $ol_cv_func_inet_aton != no; then
13611     cat >> confdefs.h <<\EOF
13612 #define HAVE_INET_ATON 1
13613 EOF
13614
13615   fi
13616  
13617
13618 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13619 echo "configure:13620: checking for vprintf" >&5
13620 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13621   echo $ac_n "(cached) $ac_c" 1>&6
13622 else
13623   cat > conftest.$ac_ext <<EOF
13624 #line 13625 "configure"
13625 #include "confdefs.h"
13626 /* System header to define __stub macros and hopefully few prototypes,
13627     which can conflict with char vprintf(); below.  */
13628 #include <assert.h>
13629 /* Override any gcc2 internal prototype to avoid an error.  */
13630 /* We use char because int might match the return type of a gcc2
13631     builtin and then its argument prototype would still apply.  */
13632 char vprintf();
13633 char (*f)();
13634
13635 int main() {
13636
13637 /* The GNU C library defines this for functions which it implements
13638     to always fail with ENOSYS.  Some functions are actually named
13639     something starting with __ and the normal name is an alias.  */
13640 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13641 choke me
13642 #else
13643 f = vprintf;
13644 #endif
13645
13646 ; return 0; }
13647 EOF
13648 if { (eval echo configure:13649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13649   rm -rf conftest*
13650   eval "ac_cv_func_vprintf=yes"
13651 else
13652   echo "configure: failed program was:" >&5
13653   cat conftest.$ac_ext >&5
13654   rm -rf conftest*
13655   eval "ac_cv_func_vprintf=no"
13656 fi
13657 rm -f conftest*
13658 fi
13659
13660 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13661   echo "$ac_t""yes" 1>&6
13662   cat >> confdefs.h <<\EOF
13663 #define HAVE_VPRINTF 1
13664 EOF
13665
13666 else
13667   echo "$ac_t""no" 1>&6
13668 fi
13669
13670 if test "$ac_cv_func_vprintf" != yes; then
13671 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13672 echo "configure:13673: checking for _doprnt" >&5
13673 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13674   echo $ac_n "(cached) $ac_c" 1>&6
13675 else
13676   cat > conftest.$ac_ext <<EOF
13677 #line 13678 "configure"
13678 #include "confdefs.h"
13679 /* System header to define __stub macros and hopefully few prototypes,
13680     which can conflict with char _doprnt(); below.  */
13681 #include <assert.h>
13682 /* Override any gcc2 internal prototype to avoid an error.  */
13683 /* We use char because int might match the return type of a gcc2
13684     builtin and then its argument prototype would still apply.  */
13685 char _doprnt();
13686 char (*f)();
13687
13688 int main() {
13689
13690 /* The GNU C library defines this for functions which it implements
13691     to always fail with ENOSYS.  Some functions are actually named
13692     something starting with __ and the normal name is an alias.  */
13693 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13694 choke me
13695 #else
13696 f = _doprnt;
13697 #endif
13698
13699 ; return 0; }
13700 EOF
13701 if { (eval echo configure:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13702   rm -rf conftest*
13703   eval "ac_cv_func__doprnt=yes"
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -rf conftest*
13708   eval "ac_cv_func__doprnt=no"
13709 fi
13710 rm -f conftest*
13711 fi
13712
13713 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13714   echo "$ac_t""yes" 1>&6
13715   cat >> confdefs.h <<\EOF
13716 #define HAVE_DOPRNT 1
13717 EOF
13718
13719 else
13720   echo "$ac_t""no" 1>&6
13721 fi
13722
13723 fi
13724
13725
13726 if test $ac_cv_func_vprintf = yes ; then
13727                 for ac_func in vsnprintf vsprintf
13728 do
13729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13730 echo "configure:13731: checking for $ac_func" >&5
13731 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13732   echo $ac_n "(cached) $ac_c" 1>&6
13733 else
13734   cat > conftest.$ac_ext <<EOF
13735 #line 13736 "configure"
13736 #include "confdefs.h"
13737 /* System header to define __stub macros and hopefully few prototypes,
13738     which can conflict with char $ac_func(); below.  */
13739 #include <assert.h>
13740 /* Override any gcc2 internal prototype to avoid an error.  */
13741 /* We use char because int might match the return type of a gcc2
13742     builtin and then its argument prototype would still apply.  */
13743 char $ac_func();
13744 char (*f)();
13745
13746 int main() {
13747
13748 /* The GNU C library defines this for functions which it implements
13749     to always fail with ENOSYS.  Some functions are actually named
13750     something starting with __ and the normal name is an alias.  */
13751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13752 choke me
13753 #else
13754 f = $ac_func;
13755 #endif
13756
13757 ; return 0; }
13758 EOF
13759 if { (eval echo configure:13760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13760   rm -rf conftest*
13761   eval "ac_cv_func_$ac_func=yes"
13762 else
13763   echo "configure: failed program was:" >&5
13764   cat conftest.$ac_ext >&5
13765   rm -rf conftest*
13766   eval "ac_cv_func_$ac_func=no"
13767 fi
13768 rm -f conftest*
13769 fi
13770
13771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13772   echo "$ac_t""yes" 1>&6
13773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13774   cat >> confdefs.h <<EOF
13775 #define $ac_tr_func 1
13776 EOF
13777  
13778 else
13779   echo "$ac_t""no" 1>&6
13780 fi
13781 done
13782
13783 fi
13784
13785 for ac_func in \
13786         bcopy                   \
13787         closesocket             \
13788         endgrent                \
13789         endpwent                \
13790         flock                   \
13791         getdtablesize   \
13792         getgrgid                \
13793         gethostname             \
13794         getpass                 \
13795         getpwuid                \
13796         getpwnam                \
13797         getspnam                \
13798         gettimeofday    \
13799         initgroups              \
13800         lockf                   \
13801         memcpy                  \
13802         memmove                 \
13803         mkstemp                 \
13804         pipe                    \
13805         read                    \
13806         recv                    \
13807         recvfrom                \
13808         setpwfile               \
13809         setgid                  \
13810         setegid                 \
13811         setsid                  \
13812         setuid                  \
13813         seteuid                 \
13814         sigaction               \
13815         signal                  \
13816         sigset                  \
13817         snprintf                \
13818         strdup                  \
13819         strerror                \
13820         strpbrk                 \
13821         strrchr                 \
13822         strsep                  \
13823         strstr                  \
13824         strtol                  \
13825         strtoul                 \
13826         strspn                  \
13827         sysconf                 \
13828         waitpid                 \
13829         wait4                   \
13830         write                   \
13831         send                    \
13832         sendto                  \
13833
13834 do
13835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13836 echo "configure:13837: checking for $ac_func" >&5
13837 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13838   echo $ac_n "(cached) $ac_c" 1>&6
13839 else
13840   cat > conftest.$ac_ext <<EOF
13841 #line 13842 "configure"
13842 #include "confdefs.h"
13843 /* System header to define __stub macros and hopefully few prototypes,
13844     which can conflict with char $ac_func(); below.  */
13845 #include <assert.h>
13846 /* Override any gcc2 internal prototype to avoid an error.  */
13847 /* We use char because int might match the return type of a gcc2
13848     builtin and then its argument prototype would still apply.  */
13849 char $ac_func();
13850 char (*f)();
13851
13852 int main() {
13853
13854 /* The GNU C library defines this for functions which it implements
13855     to always fail with ENOSYS.  Some functions are actually named
13856     something starting with __ and the normal name is an alias.  */
13857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13858 choke me
13859 #else
13860 f = $ac_func;
13861 #endif
13862
13863 ; return 0; }
13864 EOF
13865 if { (eval echo configure:13866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13866   rm -rf conftest*
13867   eval "ac_cv_func_$ac_func=yes"
13868 else
13869   echo "configure: failed program was:" >&5
13870   cat conftest.$ac_ext >&5
13871   rm -rf conftest*
13872   eval "ac_cv_func_$ac_func=no"
13873 fi
13874 rm -f conftest*
13875 fi
13876
13877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13878   echo "$ac_t""yes" 1>&6
13879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13880   cat >> confdefs.h <<EOF
13881 #define $ac_tr_func 1
13882 EOF
13883  
13884 else
13885   echo "$ac_t""no" 1>&6
13886 fi
13887 done
13888
13889
13890 for ac_func in getopt tempnam
13891 do
13892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13893 echo "configure:13894: checking for $ac_func" >&5
13894 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13895   echo $ac_n "(cached) $ac_c" 1>&6
13896 else
13897   cat > conftest.$ac_ext <<EOF
13898 #line 13899 "configure"
13899 #include "confdefs.h"
13900 /* System header to define __stub macros and hopefully few prototypes,
13901     which can conflict with char $ac_func(); below.  */
13902 #include <assert.h>
13903 /* Override any gcc2 internal prototype to avoid an error.  */
13904 /* We use char because int might match the return type of a gcc2
13905     builtin and then its argument prototype would still apply.  */
13906 char $ac_func();
13907 char (*f)();
13908
13909 int main() {
13910
13911 /* The GNU C library defines this for functions which it implements
13912     to always fail with ENOSYS.  Some functions are actually named
13913     something starting with __ and the normal name is an alias.  */
13914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13915 choke me
13916 #else
13917 f = $ac_func;
13918 #endif
13919
13920 ; return 0; }
13921 EOF
13922 if { (eval echo configure:13923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13923   rm -rf conftest*
13924   eval "ac_cv_func_$ac_func=yes"
13925 else
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -rf conftest*
13929   eval "ac_cv_func_$ac_func=no"
13930 fi
13931 rm -f conftest*
13932 fi
13933
13934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13935   echo "$ac_t""yes" 1>&6
13936     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13937   cat >> confdefs.h <<EOF
13938 #define $ac_tr_func 1
13939 EOF
13940  
13941 else
13942   echo "$ac_t""no" 1>&6
13943 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
13944 fi
13945 done
13946
13947
13948
13949 # Check Configuration
13950 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
13951 echo "configure:13952: checking declaration of sys_errlist" >&5
13952 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
13953   echo $ac_n "(cached) $ac_c" 1>&6
13954 else
13955   
13956         cat > conftest.$ac_ext <<EOF
13957 #line 13958 "configure"
13958 #include "confdefs.h"
13959
13960 #include <stdio.h>
13961 #include <sys/types.h>
13962 #include <errno.h> 
13963 int main() {
13964 char *c = (char *) *sys_errlist
13965 ; return 0; }
13966 EOF
13967 if { (eval echo configure:13968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13968   rm -rf conftest*
13969   ol_cv_dcl_sys_errlist=yes
13970         ol_cv_have_sys_errlist=yes
13971 else
13972   echo "configure: failed program was:" >&5
13973   cat conftest.$ac_ext >&5
13974   rm -rf conftest*
13975   ol_cv_dcl_sys_errlist=no
13976 fi
13977 rm -f conftest*
13978 fi
13979
13980 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
13981 #
13982 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
13983 if test $ol_cv_dcl_sys_errlist = no ; then
13984         cat >> confdefs.h <<\EOF
13985 #define DECL_SYS_ERRLIST 1
13986 EOF
13987
13988
13989         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
13990 echo "configure:13991: checking existence of sys_errlist" >&5
13991 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
13992   echo $ac_n "(cached) $ac_c" 1>&6
13993 else
13994   
13995                 cat > conftest.$ac_ext <<EOF
13996 #line 13997 "configure"
13997 #include "confdefs.h"
13998 #include <errno.h>
13999 int main() {
14000 char *c = (char *) *sys_errlist
14001 ; return 0; }
14002 EOF
14003 if { (eval echo configure:14004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14004   rm -rf conftest*
14005   ol_cv_have_sys_errlist=yes
14006 else
14007   echo "configure: failed program was:" >&5
14008   cat conftest.$ac_ext >&5
14009   rm -rf conftest*
14010   ol_cv_have_sys_errlist=no
14011 fi
14012 rm -f conftest*
14013 fi
14014
14015 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14016 fi
14017 if test $ol_cv_have_sys_errlist = yes ; then
14018         cat >> confdefs.h <<\EOF
14019 #define HAVE_SYS_ERRLIST 1
14020 EOF
14021
14022 fi
14023
14024
14025
14026 if test "$ol_enable_debug" != no ; then
14027         cat >> confdefs.h <<\EOF
14028 #define LDAP_DEBUG 1
14029 EOF
14030
14031 fi
14032 if test "$ol_enable_syslog" = yes ; then
14033         cat >> confdefs.h <<\EOF
14034 #define LDAP_SYSLOG 1
14035 EOF
14036
14037 fi
14038 if test "$ol_enable_libui" = yes ; then
14039         cat >> confdefs.h <<\EOF
14040 #define LDAP_LIBUI 1
14041 EOF
14042
14043 fi
14044 if test "$ol_enable_cache" = no ; then
14045         cat >> confdefs.h <<\EOF
14046 #define LDAP_NOCACHE 1
14047 EOF
14048
14049 fi
14050 if test "$ol_enable_dns" != no ; then
14051         cat >> confdefs.h <<\EOF
14052 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14053 EOF
14054
14055 fi
14056 if test "$ol_enable_proctitle" != no ; then
14057         cat >> confdefs.h <<\EOF
14058 #define LDAP_PROCTITLE 1
14059 EOF
14060
14061 fi
14062 if test "$ol_enable_referrals" != no ; then
14063         cat >> confdefs.h <<\EOF
14064 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14065 EOF
14066
14067 fi
14068 if test "$ol_enable_cldap" != no ; then
14069         cat >> confdefs.h <<\EOF
14070 #define LDAP_CONNECTIONLESS 1
14071 EOF
14072
14073 fi
14074
14075 if test "$ol_enable_crypt" != no ; then
14076         cat >> confdefs.h <<\EOF
14077 #define SLAPD_CRYPT 1
14078 EOF
14079
14080 fi
14081 if test "$ol_enable_cleartext" != no ; then
14082         cat >> confdefs.h <<\EOF
14083 #define SLAPD_CLEARTEXT 1
14084 EOF
14085
14086 fi
14087 if test "$ol_enable_multimaster" != no ; then
14088         cat >> confdefs.h <<\EOF
14089 #define SLAPD_MULTIMASTER 1
14090 EOF
14091
14092 fi
14093 if test "$ol_enable_phonetic" != no ; then
14094         cat >> confdefs.h <<\EOF
14095 #define SLAPD_PHONETIC 1
14096 EOF
14097
14098 fi
14099 if test "$ol_enable_rlookups" != no ; then
14100         cat >> confdefs.h <<\EOF
14101 #define SLAPD_RLOOKUPS 1
14102 EOF
14103
14104 fi
14105 if test "$ol_enable_aci" != no ; then
14106         cat >> confdefs.h <<\EOF
14107 #define SLAPD_ACI_ENABLED 1
14108 EOF
14109
14110 fi
14111 if test "$ol_enable_discreteaci" != no ; then
14112         cat >> confdefs.h <<\EOF
14113 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14114 EOF
14115
14116 fi
14117
14118 if test "$ol_link_modules" != no ; then
14119         cat >> confdefs.h <<\EOF
14120 #define SLAPD_MODULES 1
14121 EOF
14122
14123         BUILD_SLAPD=yes
14124         MODULES_LIBS=-lltdl
14125         SLAPD_MODULES_LDFLAGS="-dlopen self"
14126 fi
14127
14128 if test "$ol_link_bdb2" != no ; then
14129         cat >> confdefs.h <<\EOF
14130 #define SLAPD_BDB2 1
14131 EOF
14132
14133         BUILD_SLAPD=yes
14134         BUILD_BDB2=yes
14135         if test "$ol_with_bdb2_module" != static ; then
14136                 cat >> confdefs.h <<\EOF
14137 #define SLAPD_BDB2_DYNAMIC 1
14138 EOF
14139
14140                 BUILD_BDB2=mod
14141                 BUILD_BDB2_DYNAMIC=shared
14142                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14143         fi
14144 fi
14145
14146 if test "$ol_enable_ldap" != no ; then
14147         cat >> confdefs.h <<\EOF
14148 #define SLAPD_LDAP 1
14149 EOF
14150
14151         BUILD_SLAPD=yes
14152         BUILD_LDAP=yes
14153         if test "$ol_with_ldap_module" != static ; then
14154                 cat >> confdefs.h <<\EOF
14155 #define SLAPD_LDAP_DYNAMIC 1
14156 EOF
14157
14158                 BUILD_LDAP=mod
14159                 BUILD_LDAP_DYNAMIC=shared
14160                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14161         fi
14162 fi
14163
14164 if test "$ol_link_ldbm" != no ; then
14165         cat >> confdefs.h <<\EOF
14166 #define SLAPD_LDBM 1
14167 EOF
14168
14169         BUILD_SLAPD=yes
14170         BUILD_LDBM=yes
14171         if test "$ol_with_ldbm_module" != static ; then
14172                 cat >> confdefs.h <<\EOF
14173 #define SLAPD_LDBM_DYNAMIC 1
14174 EOF
14175
14176                 BUILD_LDBM=mod
14177                 BUILD_LDBM_DYNAMIC=shared
14178                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14179         fi
14180 fi
14181
14182 if test "$ol_enable_passwd" != no ; then
14183         cat >> confdefs.h <<\EOF
14184 #define SLAPD_PASSWD 1
14185 EOF
14186
14187         BUILD_SLAPD=yes
14188         BUILD_PASSWD=yes
14189         if test "$ol_with_passwd_module" != static ; then
14190                 cat >> confdefs.h <<\EOF
14191 #define SLAPD_PASSWD_DYNAMIC 1
14192 EOF
14193
14194                 BUILD_PASSWD=mod
14195                 BUILD_PASSWD_DYNAMIC=shared
14196                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14197         fi
14198 fi
14199
14200 if test "$ol_link_perl" != no ; then
14201         cat >> confdefs.h <<\EOF
14202 #define SLAPD_PERL 1
14203 EOF
14204
14205         BUILD_SLAPD=yes
14206         BUILD_PERL=yes
14207         if test "$ol_with_perl_module" != static ; then
14208                 cat >> confdefs.h <<\EOF
14209 #define SLAPD_PERL_DYNAMIC 1
14210 EOF
14211
14212                 BUILD_PERL=mod
14213                 BUILD_PERL_DYNAMIC=shared
14214                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14215         fi
14216 fi
14217
14218 if test "$ol_enable_shell" != no ; then
14219         cat >> confdefs.h <<\EOF
14220 #define SLAPD_SHELL 1
14221 EOF
14222
14223         BUILD_SLAPD=yes
14224         BUILD_SHELL=yes
14225         if test "$ol_with_shell_module" != static ; then
14226                 cat >> confdefs.h <<\EOF
14227 #define SLAPD_SHELL_DYNAMIC 1
14228 EOF
14229
14230                 BUILD_SHELL=mod
14231                 BUILD_SHELL_DYNAMIC=shared
14232                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14233         fi
14234 fi
14235
14236 if test "$ol_enable_tcl" != no ; then
14237         cat >> confdefs.h <<\EOF
14238 #define SLAPD_TCL 1
14239 EOF
14240
14241         BUILD_SLAPD=yes
14242         BUILD_TCL=yes
14243         if test "$ol_with_tcl_module" != static; then
14244                 cat >> confdefs.h <<\EOF
14245 #define SLAPD_TCL_DYNAMIC 1
14246 EOF
14247
14248                 BUILD_TCL=mod
14249                 BUILD_TCL_DYNAMIC=shared
14250                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14251         fi
14252 fi
14253
14254 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14255         $BUILD_SLAPD = yes ; then
14256         BUILD_SLURPD=yes
14257 fi
14258
14259
14260
14261   
14262   
14263   
14264   
14265   
14266   
14267   
14268   
14269   
14270   
14271   
14272   
14273   
14274   
14275   
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301 trap '' 1 2 15
14302
14303 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14304
14305 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14306 # Let make expand exec_prefix.
14307 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14308
14309 # Any assignment to VPATH causes Sun make to only execute
14310 # the first set of double-colon rules, so remove it if not needed.
14311 # If there is a colon in the path, we need to keep it.
14312 if test "x$srcdir" = x.; then
14313   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14314 fi
14315
14316 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14317
14318 DEFS=-DHAVE_CONFIG_H
14319
14320 # Without the "./", some shells look in PATH for config.status.
14321 : ${CONFIG_STATUS=./config.status}
14322
14323 echo creating $CONFIG_STATUS
14324 rm -f $CONFIG_STATUS
14325 cat > $CONFIG_STATUS <<EOF
14326 #! /bin/sh
14327 # Generated automatically by configure.
14328 # Run this file to recreate the current configuration.
14329 # This directory was configured as follows,
14330 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14331 #
14332 # $0 $ac_configure_args
14333 #
14334 # Compiler output produced by configure, useful for debugging
14335 # configure, is in ./config.log if it exists.
14336
14337 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14338 for ac_option
14339 do
14340   case "\$ac_option" in
14341   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14342     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14343     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14344   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14345     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14346     exit 0 ;;
14347   -help | --help | --hel | --he | --h)
14348     echo "\$ac_cs_usage"; exit 0 ;;
14349   *) echo "\$ac_cs_usage"; exit 1 ;;
14350   esac
14351 done
14352
14353 ac_given_srcdir=$srcdir
14354 ac_given_INSTALL="$INSTALL"
14355
14356 trap 'rm -fr `echo "\
14357 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14358 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14359 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14360 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14361 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14362 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14363 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14364 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14365 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14366 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14367 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14368 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14369 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14370 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14371 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14372 include/Makefile:build/top.mk:include/Makefile.in \
14373 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14374 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14375 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14376 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14377 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14378 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14379 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14380 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14381 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14382 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14383 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14384 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14385 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14386 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14387 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14388 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14389 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14390 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14391 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14392 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14393 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14394 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14395 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14396 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14397 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14398  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14399 EOF
14400 cat >> $CONFIG_STATUS <<EOF
14401
14402 # Protect against being on the right side of a sed subst in config.status.
14403 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14404  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14405 $ac_vpsub
14406 $extrasub
14407 s%@SHELL@%$SHELL%g
14408 s%@CFLAGS@%$CFLAGS%g
14409 s%@CPPFLAGS@%$CPPFLAGS%g
14410 s%@CXXFLAGS@%$CXXFLAGS%g
14411 s%@FFLAGS@%$FFLAGS%g
14412 s%@DEFS@%$DEFS%g
14413 s%@LDFLAGS@%$LDFLAGS%g
14414 s%@LIBS@%$LIBS%g
14415 s%@exec_prefix@%$exec_prefix%g
14416 s%@prefix@%$prefix%g
14417 s%@program_transform_name@%$program_transform_name%g
14418 s%@bindir@%$bindir%g
14419 s%@sbindir@%$sbindir%g
14420 s%@libexecdir@%$libexecdir%g
14421 s%@datadir@%$datadir%g
14422 s%@sysconfdir@%$sysconfdir%g
14423 s%@sharedstatedir@%$sharedstatedir%g
14424 s%@localstatedir@%$localstatedir%g
14425 s%@libdir@%$libdir%g
14426 s%@includedir@%$includedir%g
14427 s%@oldincludedir@%$oldincludedir%g
14428 s%@infodir@%$infodir%g
14429 s%@mandir@%$mandir%g
14430 s%@host@%$host%g
14431 s%@host_alias@%$host_alias%g
14432 s%@host_cpu@%$host_cpu%g
14433 s%@host_vendor@%$host_vendor%g
14434 s%@host_os@%$host_os%g
14435 s%@target@%$target%g
14436 s%@target_alias@%$target_alias%g
14437 s%@target_cpu@%$target_cpu%g
14438 s%@target_vendor@%$target_vendor%g
14439 s%@target_os@%$target_os%g
14440 s%@build@%$build%g
14441 s%@build_alias@%$build_alias%g
14442 s%@build_cpu@%$build_cpu%g
14443 s%@build_vendor@%$build_vendor%g
14444 s%@build_os@%$build_os%g
14445 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14446 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14447 s%@INSTALL_DATA@%$INSTALL_DATA%g
14448 s%@PACKAGE@%$PACKAGE%g
14449 s%@VERSION@%$VERSION%g
14450 s%@ACLOCAL@%$ACLOCAL%g
14451 s%@AUTOCONF@%$AUTOCONF%g
14452 s%@AUTOMAKE@%$AUTOMAKE%g
14453 s%@AUTOHEADER@%$AUTOHEADER%g
14454 s%@MAKEINFO@%$MAKEINFO%g
14455 s%@install_sh@%$install_sh%g
14456 s%@AMTAR@%$AMTAR%g
14457 s%@AWK@%$AWK%g
14458 s%@AMTARFLAGS@%$AMTARFLAGS%g
14459 s%@SET_MAKE@%$SET_MAKE%g
14460 s%@top_builddir@%$top_builddir%g
14461 s%@ldap_subdir@%$ldap_subdir%g
14462 s%@CC@%$CC%g
14463 s%@RANLIB@%$RANLIB%g
14464 s%@LD@%$LD%g
14465 s%@NM@%$NM%g
14466 s%@LN_S@%$LN_S%g
14467 s%@LIBTOOL@%$LIBTOOL%g
14468 s%@LN_H@%$LN_H%g
14469 s%@SENDMAIL@%$SENDMAIL%g
14470 s%@EDITOR@%$EDITOR%g
14471 s%@FINGER@%$FINGER%g
14472 s%@PERLBIN@%$PERLBIN%g
14473 s%@CPP@%$CPP%g
14474 s%@EXEEXT@%$EXEEXT%g
14475 s%@OBJEXT@%$OBJEXT%g
14476 s%@OL_MKDEP@%$OL_MKDEP%g
14477 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14478 s%@LIBOBJS@%$LIBOBJS%g
14479 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14480 s%@BUILD_BDB2@%$BUILD_BDB2%g
14481 s%@BUILD_LDAP@%$BUILD_LDAP%g
14482 s%@BUILD_LDBM@%$BUILD_LDBM%g
14483 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14484 s%@BUILD_PERL@%$BUILD_PERL%g
14485 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14486 s%@BUILD_SHELL@%$BUILD_SHELL%g
14487 s%@BUILD_TCL@%$BUILD_TCL%g
14488 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14489 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14490 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14491 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14492 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14493 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14494 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14495 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14496 s%@LDAP_LIBS@%$LDAP_LIBS%g
14497 s%@LDIF_LIBS@%$LDIF_LIBS%g
14498 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14499 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14500 s%@LDBM_LIBS@%$LDBM_LIBS%g
14501 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14502 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14503 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14504 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14505 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14506 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14507 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14508 s%@KRB_LIBS@%$KRB_LIBS%g
14509 s%@READLINE_LIBS@%$READLINE_LIBS%g
14510 s%@SASL_LIBS@%$SASL_LIBS%g
14511 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14512 s%@TLS_LIBS@%$TLS_LIBS%g
14513 s%@MODULES_LIBS@%$MODULES_LIBS%g
14514
14515 CEOF
14516 EOF
14517
14518 cat >> $CONFIG_STATUS <<\EOF
14519
14520 # Split the substitutions into bite-sized pieces for seds with
14521 # small command number limits, like on Digital OSF/1 and HP-UX.
14522 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14523 ac_file=1 # Number of current file.
14524 ac_beg=1 # First line for current file.
14525 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14526 ac_more_lines=:
14527 ac_sed_cmds=""
14528 while $ac_more_lines; do
14529   if test $ac_beg -gt 1; then
14530     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14531   else
14532     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14533   fi
14534   if test ! -s conftest.s$ac_file; then
14535     ac_more_lines=false
14536     rm -f conftest.s$ac_file
14537   else
14538     if test -z "$ac_sed_cmds"; then
14539       ac_sed_cmds="sed -f conftest.s$ac_file"
14540     else
14541       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14542     fi
14543     ac_file=`expr $ac_file + 1`
14544     ac_beg=$ac_end
14545     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14546   fi
14547 done
14548 if test -z "$ac_sed_cmds"; then
14549   ac_sed_cmds=cat
14550 fi
14551 EOF
14552
14553 cat >> $CONFIG_STATUS <<EOF
14554
14555 CONFIG_FILES=\${CONFIG_FILES-"\
14556 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14557 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14558 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14559 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14560 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14561 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14562 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14563 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14564 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14565 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14566 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14567 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14568 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14569 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14570 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14571 include/Makefile:build/top.mk:include/Makefile.in \
14572 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14573 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14574 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14575 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14576 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14577 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14578 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14579 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14580 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14581 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14582 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14583 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14584 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14585 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14586 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14587 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14588 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14589 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14590 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14591 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14592 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14593 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14594 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14595 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14596 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14597 "}
14598 EOF
14599 cat >> $CONFIG_STATUS <<\EOF
14600 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14601   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14602   case "$ac_file" in
14603   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14604        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14605   *) ac_file_in="${ac_file}.in" ;;
14606   esac
14607
14608   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14609
14610   # Remove last slash and all that follows it.  Not all systems have dirname.
14611   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14612   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14613     # The file is in a subdirectory.
14614     test ! -d "$ac_dir" && mkdir "$ac_dir"
14615     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14616     # A "../" for each directory in $ac_dir_suffix.
14617     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14618   else
14619     ac_dir_suffix= ac_dots=
14620   fi
14621
14622   case "$ac_given_srcdir" in
14623   .)  srcdir=.
14624       if test -z "$ac_dots"; then top_srcdir=.
14625       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14626   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14627   *) # Relative path.
14628     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14629     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14630   esac
14631
14632   case "$ac_given_INSTALL" in
14633   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14634   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14635   esac
14636
14637   echo creating "$ac_file"
14638   rm -f "$ac_file"
14639   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14640   case "$ac_file" in
14641   *Makefile*) ac_comsub="1i\\
14642 # $configure_input" ;;
14643   *) ac_comsub= ;;
14644   esac
14645
14646   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14647   sed -e "$ac_comsub
14648 s%@configure_input@%$configure_input%g
14649 s%@srcdir@%$srcdir%g
14650 s%@top_srcdir@%$top_srcdir%g
14651 s%@INSTALL@%$INSTALL%g
14652 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14653 fi; done
14654 rm -f conftest.s*
14655
14656 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14657 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14658 #
14659 # ac_d sets the value in "#define NAME VALUE" lines.
14660 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14661 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14662 ac_dC='\3'
14663 ac_dD='%g'
14664 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14665 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14666 ac_uB='\([      ]\)%\1#\2define\3'
14667 ac_uC=' '
14668 ac_uD='\4%g'
14669 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14670 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14671 ac_eB='$%\1#\2define\3'
14672 ac_eC=' '
14673 ac_eD='%g'
14674
14675 if test "${CONFIG_HEADERS+set}" != set; then
14676 EOF
14677 cat >> $CONFIG_STATUS <<EOF
14678   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14679 EOF
14680 cat >> $CONFIG_STATUS <<\EOF
14681 fi
14682 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14683   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14684   case "$ac_file" in
14685   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14686        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14687   *) ac_file_in="${ac_file}.in" ;;
14688   esac
14689
14690   echo creating $ac_file
14691
14692   rm -f conftest.frag conftest.in conftest.out
14693   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14694   cat $ac_file_inputs > conftest.in
14695
14696 EOF
14697
14698 # Transform confdefs.h into a sed script conftest.vals that substitutes
14699 # the proper values into config.h.in to produce config.h.  And first:
14700 # Protect against being on the right side of a sed subst in config.status.
14701 # Protect against being in an unquoted here document in config.status.
14702 rm -f conftest.vals
14703 cat > conftest.hdr <<\EOF
14704 s/[\\&%]/\\&/g
14705 s%[\\$`]%\\&%g
14706 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14707 s%ac_d%ac_u%gp
14708 s%ac_u%ac_e%gp
14709 EOF
14710 sed -n -f conftest.hdr confdefs.h > conftest.vals
14711 rm -f conftest.hdr
14712
14713 # This sed command replaces #undef with comments.  This is necessary, for
14714 # example, in the case of _POSIX_SOURCE, which is predefined and required
14715 # on some systems where configure will not decide to define it.
14716 cat >> conftest.vals <<\EOF
14717 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14718 EOF
14719
14720 # Break up conftest.vals because some shells have a limit on
14721 # the size of here documents, and old seds have small limits too.
14722
14723 rm -f conftest.tail
14724 while :
14725 do
14726   ac_lines=`grep -c . conftest.vals`
14727   # grep -c gives empty output for an empty file on some AIX systems.
14728   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14729   # Write a limited-size here document to conftest.frag.
14730   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14731   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14732   echo 'CEOF
14733   sed -f conftest.frag conftest.in > conftest.out
14734   rm -f conftest.in
14735   mv conftest.out conftest.in
14736 ' >> $CONFIG_STATUS
14737   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14738   rm -f conftest.vals
14739   mv conftest.tail conftest.vals
14740 done
14741 rm -f conftest.vals
14742
14743 cat >> $CONFIG_STATUS <<\EOF
14744   rm -f conftest.frag conftest.h
14745   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14746   cat conftest.in >> conftest.h
14747   rm -f conftest.in
14748   if cmp -s $ac_file conftest.h 2>/dev/null; then
14749     echo "$ac_file is unchanged"
14750     rm -f conftest.h
14751   else
14752     # Remove last slash and all that follows it.  Not all systems have dirname.
14753       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14754       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14755       # The file is in a subdirectory.
14756       test ! -d "$ac_dir" && mkdir "$ac_dir"
14757     fi
14758     rm -f $ac_file
14759     mv conftest.h $ac_file
14760   fi
14761 fi; done
14762
14763 EOF
14764 cat >> $CONFIG_STATUS <<EOF
14765
14766 EOF
14767 cat >> $CONFIG_STATUS <<\EOF
14768
14769 date > stamp-h
14770 echo Please \"make depend\" to build dependencies
14771
14772 exit 0
14773 EOF
14774 chmod +x $CONFIG_STATUS
14775 rm -fr confdefs* $ac_clean_files
14776 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
14777