]> git.sur5r.net Git - openldap/blob - configure
1221e5f3d511bde2945d3134ea2eb9918f5b5705
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.259 1999/09/20 18:55:55 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 echo "Copyright 1998-1999 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-x-compile    enable cross compiling (no)"
45 ac_help="$ac_help
46   --enable-dmalloc      enable debug malloc support (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with Kerberos support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 LDAPD (X.500-to-LDAP Gateway) Options:"
63 ac_help="$ac_help
64   --enable-ldapd        enable building ldapd (no)"
65 ac_help="$ac_help
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd        enable building slapd (yes)"
69 ac_help="$ac_help
70     --enable-cleartext  enable cleartext passwords (yes)"
71 ac_help="$ac_help
72     --enable-crypt      enable crypt(3) passwords (auto)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-discreteaci        enable discrete rights in ACIs (no)"
87 ac_help="$ac_help
88     --enable-wrappers   enable tcp wrapper support (no)"
89 ac_help="$ac_help
90     --enable-bdb2       enable bdb2 backend (no)"
91 ac_help="$ac_help
92       --with-bdb2-module        module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-perl       enable perl backend (no)"
111 ac_help="$ac_help
112       --with-perl-module        module type (static)"
113 ac_help="$ac_help
114     --enable-shell      enable shell backend (no)"
115 ac_help="$ac_help
116       --with-shell-module       module type (static)"
117 ac_help="$ac_help
118     --enable-tcl        enable tcl backend (no)"
119 ac_help="$ac_help
120       --with-tcl-module module type (static)"
121 ac_help="$ac_help
122 SLURPD (Replication Daemon) Options:"
123 ac_help="$ac_help
124   --enable-slurpd       enable building slurpd (auto)"
125 ac_help="$ac_help
126 Library Generation & Linking Options"
127 ac_help="$ac_help
128   --enable-static[=PKGS]  build static libraries [default=yes]"
129 ac_help="$ac_help
130   --enable-shared[=PKGS]  build shared libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
133 ac_help="$ac_help
134   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
135 ac_help="$ac_help
136   --disable-libtool-lock  avoid locking (might break parallel builds)"
137
138 # Initialize some variables set by options.
139 # The variables have the same names as the options, with
140 # dashes changed to underlines.
141 build=NONE
142 cache_file=./config.cache
143 exec_prefix=NONE
144 host=NONE
145 no_create=
146 nonopt=NONE
147 no_recursion=
148 prefix=NONE
149 program_prefix=NONE
150 program_suffix=NONE
151 program_transform_name=s,x,x,
152 silent=
153 site=
154 srcdir=
155 target=NONE
156 verbose=
157 x_includes=NONE
158 x_libraries=NONE
159 bindir='${exec_prefix}/bin'
160 sbindir='${exec_prefix}/sbin'
161 libexecdir='${exec_prefix}/libexec'
162 datadir='${prefix}/share'
163 sysconfdir='${prefix}/etc'
164 sharedstatedir='${prefix}/com'
165 localstatedir='${prefix}/var'
166 libdir='${exec_prefix}/lib'
167 includedir='${prefix}/include'
168 oldincludedir='/usr/include'
169 infodir='${prefix}/info'
170 mandir='${prefix}/man'
171
172 # Initialize some other variables.
173 subdirs=
174 MFLAGS= MAKEFLAGS=
175 SHELL=${CONFIG_SHELL-/bin/sh}
176 # Maximum number of lines to put in a shell here document.
177 ac_max_here_lines=12
178
179 ac_prev=
180 for ac_option
181 do
182
183   # If the previous option needs an argument, assign it.
184   if test -n "$ac_prev"; then
185     eval "$ac_prev=\$ac_option"
186     ac_prev=
187     continue
188   fi
189
190   case "$ac_option" in
191   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
192   *) ac_optarg= ;;
193   esac
194
195   # Accept the important Cygnus configure options, so we can diagnose typos.
196
197   case "$ac_option" in
198
199   -bindir | --bindir | --bindi | --bind | --bin | --bi)
200     ac_prev=bindir ;;
201   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
202     bindir="$ac_optarg" ;;
203
204   -build | --build | --buil | --bui | --bu)
205     ac_prev=build ;;
206   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
207     build="$ac_optarg" ;;
208
209   -cache-file | --cache-file | --cache-fil | --cache-fi \
210   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
211     ac_prev=cache_file ;;
212   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
213   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
214     cache_file="$ac_optarg" ;;
215
216   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
217     ac_prev=datadir ;;
218   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
219   | --da=*)
220     datadir="$ac_optarg" ;;
221
222   -disable-* | --disable-*)
223     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
224     # Reject names that are not valid shell variable names.
225     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
226       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
227     fi
228     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
229     eval "enable_${ac_feature}=no" ;;
230
231   -enable-* | --enable-*)
232     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
233     # Reject names that are not valid shell variable names.
234     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
235       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
236     fi
237     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
238     case "$ac_option" in
239       *=*) ;;
240       *) ac_optarg=yes ;;
241     esac
242     eval "enable_${ac_feature}='$ac_optarg'" ;;
243
244   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
245   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
246   | --exec | --exe | --ex)
247     ac_prev=exec_prefix ;;
248   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
249   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
250   | --exec=* | --exe=* | --ex=*)
251     exec_prefix="$ac_optarg" ;;
252
253   -gas | --gas | --ga | --g)
254     # Obsolete; use --with-gas.
255     with_gas=yes ;;
256
257   -help | --help | --hel | --he)
258     # Omit some internal or obsolete options to make the list less imposing.
259     # This message is too long to be a string in the A/UX 3.1 sh.
260     cat << EOF
261 Usage: configure [options] [host]
262 Options: [defaults in brackets after descriptions]
263 Configuration:
264   --cache-file=FILE       cache test results in FILE
265   --help                  print this message
266   --no-create             do not create output files
267   --quiet, --silent       do not print \`checking...' messages
268   --version               print the version of autoconf that created configure
269 Directory and file names:
270   --prefix=PREFIX         install architecture-independent files in PREFIX
271                           [$ac_default_prefix]
272   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
273                           [same as prefix]
274   --bindir=DIR            user executables in DIR [EPREFIX/bin]
275   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
276   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
277   --datadir=DIR           read-only architecture-independent data in DIR
278                           [PREFIX/share]
279   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
280   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
281                           [PREFIX/com]
282   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
283   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
284   --includedir=DIR        C header files in DIR [PREFIX/include]
285   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
286   --infodir=DIR           info documentation in DIR [PREFIX/info]
287   --mandir=DIR            man documentation in DIR [PREFIX/man]
288   --srcdir=DIR            find the sources in DIR [configure dir or ..]
289   --program-prefix=PREFIX prepend PREFIX to installed program names
290   --program-suffix=SUFFIX append SUFFIX to installed program names
291   --program-transform-name=PROGRAM
292                           run sed PROGRAM on installed program names
293 EOF
294     cat << EOF
295 Host type:
296   --build=BUILD           configure for building on BUILD [BUILD=HOST]
297   --host=HOST             configure for HOST [guessed]
298   --target=TARGET         configure for TARGET [TARGET=HOST]
299 Features and packages:
300   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
301   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
302   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
303   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
304   --x-includes=DIR        X include files are in DIR
305   --x-libraries=DIR       X library files are in DIR
306 EOF
307     if test -n "$ac_help"; then
308       echo "--enable and --with options recognized:$ac_help"
309     fi
310     exit 0 ;;
311
312   -host | --host | --hos | --ho)
313     ac_prev=host ;;
314   -host=* | --host=* | --hos=* | --ho=*)
315     host="$ac_optarg" ;;
316
317   -includedir | --includedir | --includedi | --included | --include \
318   | --includ | --inclu | --incl | --inc)
319     ac_prev=includedir ;;
320   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
321   | --includ=* | --inclu=* | --incl=* | --inc=*)
322     includedir="$ac_optarg" ;;
323
324   -infodir | --infodir | --infodi | --infod | --info | --inf)
325     ac_prev=infodir ;;
326   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
327     infodir="$ac_optarg" ;;
328
329   -libdir | --libdir | --libdi | --libd)
330     ac_prev=libdir ;;
331   -libdir=* | --libdir=* | --libdi=* | --libd=*)
332     libdir="$ac_optarg" ;;
333
334   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
335   | --libexe | --libex | --libe)
336     ac_prev=libexecdir ;;
337   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
338   | --libexe=* | --libex=* | --libe=*)
339     libexecdir="$ac_optarg" ;;
340
341   -localstatedir | --localstatedir | --localstatedi | --localstated \
342   | --localstate | --localstat | --localsta | --localst \
343   | --locals | --local | --loca | --loc | --lo)
344     ac_prev=localstatedir ;;
345   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
346   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
347   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
348     localstatedir="$ac_optarg" ;;
349
350   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
351     ac_prev=mandir ;;
352   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
353     mandir="$ac_optarg" ;;
354
355   -nfp | --nfp | --nf)
356     # Obsolete; use --without-fp.
357     with_fp=no ;;
358
359   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
360   | --no-cr | --no-c)
361     no_create=yes ;;
362
363   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
364   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
365     no_recursion=yes ;;
366
367   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
368   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
369   | --oldin | --oldi | --old | --ol | --o)
370     ac_prev=oldincludedir ;;
371   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
372   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
373   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
374     oldincludedir="$ac_optarg" ;;
375
376   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
377     ac_prev=prefix ;;
378   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
379     prefix="$ac_optarg" ;;
380
381   -program-prefix | --program-prefix | --program-prefi | --program-pref \
382   | --program-pre | --program-pr | --program-p)
383     ac_prev=program_prefix ;;
384   -program-prefix=* | --program-prefix=* | --program-prefi=* \
385   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
386     program_prefix="$ac_optarg" ;;
387
388   -program-suffix | --program-suffix | --program-suffi | --program-suff \
389   | --program-suf | --program-su | --program-s)
390     ac_prev=program_suffix ;;
391   -program-suffix=* | --program-suffix=* | --program-suffi=* \
392   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
393     program_suffix="$ac_optarg" ;;
394
395   -program-transform-name | --program-transform-name \
396   | --program-transform-nam | --program-transform-na \
397   | --program-transform-n | --program-transform- \
398   | --program-transform | --program-transfor \
399   | --program-transfo | --program-transf \
400   | --program-trans | --program-tran \
401   | --progr-tra | --program-tr | --program-t)
402     ac_prev=program_transform_name ;;
403   -program-transform-name=* | --program-transform-name=* \
404   | --program-transform-nam=* | --program-transform-na=* \
405   | --program-transform-n=* | --program-transform-=* \
406   | --program-transform=* | --program-transfor=* \
407   | --program-transfo=* | --program-transf=* \
408   | --program-trans=* | --program-tran=* \
409   | --progr-tra=* | --program-tr=* | --program-t=*)
410     program_transform_name="$ac_optarg" ;;
411
412   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
413   | -silent | --silent | --silen | --sile | --sil)
414     silent=yes ;;
415
416   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
417     ac_prev=sbindir ;;
418   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
419   | --sbi=* | --sb=*)
420     sbindir="$ac_optarg" ;;
421
422   -sharedstatedir | --sharedstatedir | --sharedstatedi \
423   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
424   | --sharedst | --shareds | --shared | --share | --shar \
425   | --sha | --sh)
426     ac_prev=sharedstatedir ;;
427   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
428   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
429   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
430   | --sha=* | --sh=*)
431     sharedstatedir="$ac_optarg" ;;
432
433   -site | --site | --sit)
434     ac_prev=site ;;
435   -site=* | --site=* | --sit=*)
436     site="$ac_optarg" ;;
437
438   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
439     ac_prev=srcdir ;;
440   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
441     srcdir="$ac_optarg" ;;
442
443   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
444   | --syscon | --sysco | --sysc | --sys | --sy)
445     ac_prev=sysconfdir ;;
446   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
447   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
448     sysconfdir="$ac_optarg" ;;
449
450   -target | --target | --targe | --targ | --tar | --ta | --t)
451     ac_prev=target ;;
452   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
453     target="$ac_optarg" ;;
454
455   -v | -verbose | --verbose | --verbos | --verbo | --verb)
456     verbose=yes ;;
457
458   -version | --version | --versio | --versi | --vers)
459     echo "configure generated by autoconf version 2.13"
460     exit 0 ;;
461
462   -with-* | --with-*)
463     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
464     # Reject names that are not valid shell variable names.
465     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
466       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
467     fi
468     ac_package=`echo $ac_package| sed 's/-/_/g'`
469     case "$ac_option" in
470       *=*) ;;
471       *) ac_optarg=yes ;;
472     esac
473     eval "with_${ac_package}='$ac_optarg'" ;;
474
475   -without-* | --without-*)
476     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
477     # Reject names that are not valid shell variable names.
478     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
479       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
480     fi
481     ac_package=`echo $ac_package| sed 's/-/_/g'`
482     eval "with_${ac_package}=no" ;;
483
484   --x)
485     # Obsolete; use --with-x.
486     with_x=yes ;;
487
488   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
489   | --x-incl | --x-inc | --x-in | --x-i)
490     ac_prev=x_includes ;;
491   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
492   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
493     x_includes="$ac_optarg" ;;
494
495   -x-libraries | --x-libraries | --x-librarie | --x-librari \
496   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
497     ac_prev=x_libraries ;;
498   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
499   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
500     x_libraries="$ac_optarg" ;;
501
502   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
503     ;;
504
505   *)
506     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
507       echo "configure: warning: $ac_option: invalid host type" 1>&2
508     fi
509     if test "x$nonopt" != xNONE; then
510       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
511     fi
512     nonopt="$ac_option"
513     ;;
514
515   esac
516 done
517
518 if test -n "$ac_prev"; then
519   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
520 fi
521
522 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
523
524 # File descriptor usage:
525 # 0 standard input
526 # 1 file creation
527 # 2 errors and warnings
528 # 3 some systems may open it to /dev/tty
529 # 4 used on the Kubota Titan
530 # 6 checking for... messages and results
531 # 5 compiler messages saved in config.log
532 if test "$silent" = yes; then
533   exec 6>/dev/null
534 else
535   exec 6>&1
536 fi
537 exec 5>./config.log
538
539 echo "\
540 This file contains any messages produced by compilers while
541 running configure, to aid debugging if configure makes a mistake.
542 " 1>&5
543
544 # Strip out --no-create and --no-recursion so they do not pile up.
545 # Also quote any args containing shell metacharacters.
546 ac_configure_args=
547 for ac_arg
548 do
549   case "$ac_arg" in
550   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551   | --no-cr | --no-c) ;;
552   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
553   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
554   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
555   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
556   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
557   esac
558 done
559
560 # NLS nuisances.
561 # Only set these to C if already set.  These must not be set unconditionally
562 # because not all systems understand e.g. LANG=C (notably SCO).
563 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
564 # Non-C LC_CTYPE values break the ctype check.
565 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
566 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
567 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
568 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
569
570 # confdefs.h avoids OS command line length limits that DEFS can exceed.
571 rm -rf conftest* confdefs.h
572 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
573 echo > confdefs.h
574
575 # A filename unique to this package, relative to the directory that
576 # configure is in, which we can look for to find out if srcdir is correct.
577 ac_unique_file=build/version
578
579 # Find the source files, if location was not specified.
580 if test -z "$srcdir"; then
581   ac_srcdir_defaulted=yes
582   # Try the directory containing this script, then its parent.
583   ac_prog=$0
584   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
585   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
586   srcdir=$ac_confdir
587   if test ! -r $srcdir/$ac_unique_file; then
588     srcdir=..
589   fi
590 else
591   ac_srcdir_defaulted=no
592 fi
593 if test ! -r $srcdir/$ac_unique_file; then
594   if test "$ac_srcdir_defaulted" = yes; then
595     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
596   else
597     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
598   fi
599 fi
600 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
601
602 # Prefer explicitly selected file to automatically selected ones.
603 if test -z "$CONFIG_SITE"; then
604   if test "x$prefix" != xNONE; then
605     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
606   else
607     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
608   fi
609 fi
610 for ac_site_file in $CONFIG_SITE; do
611   if test -r "$ac_site_file"; then
612     echo "loading site script $ac_site_file"
613     . "$ac_site_file"
614   fi
615 done
616
617
618 ac_ext=c
619 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
620 ac_cpp='$CPP $CPPFLAGS'
621 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
622 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
623 cross_compiling=$ac_cv_prog_cc_cross
624
625 ac_exeext=
626 ac_objext=o
627 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
628   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
629   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
630     ac_n= ac_c='
631 ' ac_t='        '
632   else
633     ac_n=-n ac_c= ac_t=
634   fi
635 else
636   ac_n= ac_c='\c' ac_t=
637 fi
638
639 ac_aux_dir=
640 for ac_dir in build $srcdir/build; do
641   if test -f $ac_dir/install-sh; then
642     ac_aux_dir=$ac_dir
643     ac_install_sh="$ac_aux_dir/install-sh -c"
644     break
645   elif test -f $ac_dir/install.sh; then
646     ac_aux_dir=$ac_dir
647     ac_install_sh="$ac_aux_dir/install.sh -c"
648     break
649   fi
650 done
651 if test -z "$ac_aux_dir"; then
652   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
653 fi
654 ac_config_guess=$ac_aux_dir/config.guess
655 ac_config_sub=$ac_aux_dir/config.sub
656 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
657
658 OL_VERSION=`cat $ac_aux_dir/version`
659 if test -z "$OL_VERSION"; then
660         { echo "configure: error: could not determine version" 1>&2; exit 1; }
661 fi
662
663 echo "Configuring OpenLDAP $OL_VERSION ..."
664
665
666 # Do some error checking and defaulting for the host and target type.
667 # The inputs are:
668 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
669 #
670 # The rules are:
671 # 1. You are not allowed to specify --host, --target, and nonopt at the
672 #    same time.
673 # 2. Host defaults to nonopt.
674 # 3. If nonopt is not specified, then host defaults to the current host,
675 #    as determined by config.guess.
676 # 4. Target and build default to nonopt.
677 # 5. If nonopt is not specified, then target and build default to host.
678
679 # The aliases save the names the user supplied, while $host etc.
680 # will get canonicalized.
681 case $host---$target---$nonopt in
682 NONE---*---* | *---NONE---* | *---*---NONE) ;;
683 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
684 esac
685
686
687 # Make sure we can run config.sub.
688 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
689 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
690 fi
691
692 echo $ac_n "checking host system type""... $ac_c" 1>&6
693 echo "configure:694: checking host system type" >&5
694
695 host_alias=$host
696 case "$host_alias" in
697 NONE)
698   case $nonopt in
699   NONE)
700     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
701     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
702     fi ;;
703   *) host_alias=$nonopt ;;
704   esac ;;
705 esac
706
707 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
708 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
709 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
710 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
711 echo "$ac_t""$host" 1>&6
712
713 echo $ac_n "checking target system type""... $ac_c" 1>&6
714 echo "configure:715: checking target system type" >&5
715
716 target_alias=$target
717 case "$target_alias" in
718 NONE)
719   case $nonopt in
720   NONE) target_alias=$host_alias ;;
721   *) target_alias=$nonopt ;;
722   esac ;;
723 esac
724
725 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
726 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729 echo "$ac_t""$target" 1>&6
730
731 echo $ac_n "checking build system type""... $ac_c" 1>&6
732 echo "configure:733: checking build system type" >&5
733
734 build_alias=$build
735 case "$build_alias" in
736 NONE)
737   case $nonopt in
738   NONE) build_alias=$host_alias ;;
739   *) build_alias=$nonopt ;;
740   esac ;;
741 esac
742
743 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
744 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
745 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
746 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
747 echo "$ac_t""$build" 1>&6
748
749 test "$host_alias" != "$target_alias" &&
750   test "$program_prefix$program_suffix$program_transform_name" = \
751     NONENONEs,x,x, &&
752   program_prefix=${target_alias}-
753
754
755 # Find a good install program.  We prefer a C program (faster),
756 # so one script is as good as another.  But avoid the broken or
757 # incompatible versions:
758 # SysV /etc/install, /usr/sbin/install
759 # SunOS /usr/etc/install
760 # IRIX /sbin/install
761 # AIX /bin/install
762 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
763 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
764 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
765 # ./install, which can be erroneously created by make from ./install.sh.
766 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
767 echo "configure:768: checking for a BSD compatible install" >&5
768 if test -z "$INSTALL"; then
769 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
770   echo $ac_n "(cached) $ac_c" 1>&6
771 else
772     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
773   for ac_dir in $PATH; do
774     # Account for people who put trailing slashes in PATH elements.
775     case "$ac_dir/" in
776     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
777     *)
778       # OSF1 and SCO ODT 3.0 have their own names for install.
779       # Don't use installbsd from OSF since it installs stuff as root
780       # by default.
781       for ac_prog in ginstall scoinst install; do
782         if test -f $ac_dir/$ac_prog; then
783           if test $ac_prog = install &&
784             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
785             # AIX install.  It has an incompatible calling convention.
786             :
787           else
788             ac_cv_path_install="$ac_dir/$ac_prog -c"
789             break 2
790           fi
791         fi
792       done
793       ;;
794     esac
795   done
796   IFS="$ac_save_IFS"
797
798 fi
799   if test "${ac_cv_path_install+set}" = set; then
800     INSTALL="$ac_cv_path_install"
801   else
802     # As a last resort, use the slow shell script.  We don't cache a
803     # path for INSTALL within a source directory, because that will
804     # break other packages using the cache if that directory is
805     # removed, or if the path is relative.
806     INSTALL="$ac_install_sh"
807   fi
808 fi
809 echo "$ac_t""$INSTALL" 1>&6
810
811 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
812 # It thinks the first close brace ends the variable substitution.
813 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
814
815 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
816
817 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
818
819 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
820 echo "configure:821: checking whether build environment is sane" >&5
821 # Just in case
822 sleep 1
823 echo timestamp > conftestfile
824 # Do `set' in a subshell so we don't clobber the current shell's
825 # arguments.  Must try -L first in case configure is actually a
826 # symlink; some systems play weird games with the mod time of symlinks
827 # (eg FreeBSD returns the mod time of the symlink's containing
828 # directory).
829 if (
830    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
831    if test "$*" = "X"; then
832       # -L didn't work.
833       set X `ls -t $srcdir/configure conftestfile`
834    fi
835    if test "$*" != "X $srcdir/configure conftestfile" \
836       && test "$*" != "X conftestfile $srcdir/configure"; then
837
838       # If neither matched, then we have a broken ls.  This can happen
839       # if, for instance, CONFIG_SHELL is bash and it inherits a
840       # broken ls alias from the environment.  This has actually
841       # happened.  Such a system could not be considered "sane".
842       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
843 alias in your environment" 1>&2; exit 1; }
844    fi
845
846    test "$2" = conftestfile
847    )
848 then
849    # Ok.
850    :
851 else
852    { echo "configure: error: newly created file is older than distributed files!
853 Check your system clock" 1>&2; exit 1; }
854 fi
855 rm -f conftest*
856 echo "$ac_t""yes" 1>&6
857 if test "$program_transform_name" = s,x,x,; then
858   program_transform_name=
859 else
860   # Double any \ or $.  echo might interpret backslashes.
861   cat <<\EOF_SED > conftestsed
862 s,\\,\\\\,g; s,\$,$$,g
863 EOF_SED
864   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
865   rm -f conftestsed
866 fi
867 test "$program_prefix" != NONE &&
868   program_transform_name="s,^,${program_prefix},; $program_transform_name"
869 # Use a double $ so make ignores it.
870 test "$program_suffix" != NONE &&
871   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
872
873 # sed with no file args requires a program.
874 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
875
876 for ac_prog in mawk gawk nawk awk
877 do
878 # Extract the first word of "$ac_prog", so it can be a program name with args.
879 set dummy $ac_prog; ac_word=$2
880 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
881 echo "configure:882: checking for $ac_word" >&5
882 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
883   echo $ac_n "(cached) $ac_c" 1>&6
884 else
885   if test -n "$AWK"; then
886   ac_cv_prog_AWK="$AWK" # Let the user override the test.
887 else
888   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
889   ac_dummy="$PATH"
890   for ac_dir in $ac_dummy; do
891     test -z "$ac_dir" && ac_dir=.
892     if test -f $ac_dir/$ac_word; then
893       ac_cv_prog_AWK="$ac_prog"
894       break
895     fi
896   done
897   IFS="$ac_save_ifs"
898 fi
899 fi
900 AWK="$ac_cv_prog_AWK"
901 if test -n "$AWK"; then
902   echo "$ac_t""$AWK" 1>&6
903 else
904   echo "$ac_t""no" 1>&6
905 fi
906
907 test -n "$AWK" && break
908 done
909
910 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
911 echo "configure:912: checking whether ${MAKE-make} sets \${MAKE}" >&5
912 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
913 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
914   echo $ac_n "(cached) $ac_c" 1>&6
915 else
916   cat > conftestmake <<\EOF
917 all:
918         @echo 'ac_maketemp="${MAKE}"'
919 EOF
920 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
921 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
922 if test -n "$ac_maketemp"; then
923   eval ac_cv_prog_make_${ac_make}_set=yes
924 else
925   eval ac_cv_prog_make_${ac_make}_set=no
926 fi
927 rm -f conftestmake
928 fi
929 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
930   echo "$ac_t""yes" 1>&6
931   SET_MAKE=
932 else
933   echo "$ac_t""no" 1>&6
934   SET_MAKE="MAKE=${MAKE-make}"
935 fi
936
937
938
939 PACKAGE=OpenLDAP
940
941 VERSION=$OL_VERSION
942
943 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
944   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
945 fi
946
947
948
949 missing_dir=`cd $ac_aux_dir && pwd`
950 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
951 echo "configure:952: checking for working aclocal" >&5
952 # Run test in a subshell; some versions of sh will print an error if
953 # an executable is not found, even if stderr is redirected.
954 # Redirect stdin to placate older versions of autoconf.  Sigh.
955 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
956    ACLOCAL=aclocal
957    echo "$ac_t""found" 1>&6
958 else
959    ACLOCAL="$missing_dir/missing aclocal"
960    echo "$ac_t""missing" 1>&6
961 fi
962
963 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
964 echo "configure:965: checking for working autoconf" >&5
965 # Run test in a subshell; some versions of sh will print an error if
966 # an executable is not found, even if stderr is redirected.
967 # Redirect stdin to placate older versions of autoconf.  Sigh.
968 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
969    AUTOCONF=autoconf
970    echo "$ac_t""found" 1>&6
971 else
972    AUTOCONF="$missing_dir/missing autoconf"
973    echo "$ac_t""missing" 1>&6
974 fi
975
976 echo $ac_n "checking for working automake""... $ac_c" 1>&6
977 echo "configure:978: checking for working automake" >&5
978 # Run test in a subshell; some versions of sh will print an error if
979 # an executable is not found, even if stderr is redirected.
980 # Redirect stdin to placate older versions of autoconf.  Sigh.
981 if (automake --version) < /dev/null > /dev/null 2>&1; then
982    AUTOMAKE=automake
983    echo "$ac_t""found" 1>&6
984 else
985    AUTOMAKE="$missing_dir/missing automake"
986    echo "$ac_t""missing" 1>&6
987 fi
988
989 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
990 echo "configure:991: checking for working autoheader" >&5
991 # Run test in a subshell; some versions of sh will print an error if
992 # an executable is not found, even if stderr is redirected.
993 # Redirect stdin to placate older versions of autoconf.  Sigh.
994 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
995    AUTOHEADER=autoheader
996    echo "$ac_t""found" 1>&6
997 else
998    AUTOHEADER="$missing_dir/missing autoheader"
999    echo "$ac_t""missing" 1>&6
1000 fi
1001
1002 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1003 echo "configure:1004: checking for working makeinfo" >&5
1004 # Run test in a subshell; some versions of sh will print an error if
1005 # an executable is not found, even if stderr is redirected.
1006 # Redirect stdin to placate older versions of autoconf.  Sigh.
1007 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1008    MAKEINFO=makeinfo
1009    echo "$ac_t""found" 1>&6
1010 else
1011    MAKEINFO="$missing_dir/missing makeinfo"
1012    echo "$ac_t""missing" 1>&6
1013 fi
1014
1015 install_sh="$missing_dir/install-sh"
1016 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1017
1018 for ac_prog in gnutar gtar tar
1019 do
1020 # Extract the first word of "$ac_prog", so it can be a program name with args.
1021 set dummy $ac_prog; ac_word=$2
1022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1023 echo "configure:1024: checking for $ac_word" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   if test -n "$AMTAR"; then
1028   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1029 else
1030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1031   ac_dummy="$PATH"
1032   for ac_dir in $ac_dummy; do
1033     test -z "$ac_dir" && ac_dir=.
1034     if test -f $ac_dir/$ac_word; then
1035       ac_cv_prog_AMTAR="$ac_prog"
1036       break
1037     fi
1038   done
1039   IFS="$ac_save_ifs"
1040 fi
1041 fi
1042 AMTAR="$ac_cv_prog_AMTAR"
1043 if test -n "$AMTAR"; then
1044   echo "$ac_t""$AMTAR" 1>&6
1045 else
1046   echo "$ac_t""no" 1>&6
1047 fi
1048
1049 test -n "$AMTAR" && break
1050 done
1051
1052
1053 AMTARFLAGS=
1054 if test -n "$AMTAR"; then
1055   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1056         AMTARFLAGS=o
1057   fi
1058 fi
1059
1060
1061
1062 cat >> confdefs.h <<EOF
1063 #define OPENLDAP_PACKAGE "$PACKAGE"
1064 EOF
1065
1066 cat >> confdefs.h <<EOF
1067 #define OPENLDAP_VERSION "$VERSION"
1068 EOF
1069
1070
1071
1072
1073 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1074 echo "configure:1075: checking configure arguments" >&5
1075
1076
1077 top_builddir=`pwd`
1078
1079 ldap_subdir="/openldap"
1080
1081 # Check whether --with-subdir or --without-subdir was given.
1082 if test "${with_subdir+set}" = set; then
1083   withval="$with_subdir"
1084   case "$withval" in
1085         no) ldap_subdir=""
1086                 ;;
1087         yes)
1088                 ;;
1089         /*|\\*)
1090                 ldap_subdir="$withval"
1091                 ;;
1092         *)
1093                 ldap_subdir="/$withval"
1094                 ;;
1095 esac
1096
1097 fi
1098
1099
1100 # OpenLDAP --enable-debug
1101         # Check whether --enable-debug or --disable-debug was given.
1102 if test "${enable_debug+set}" = set; then
1103   enableval="$enable_debug"
1104   
1105         ol_arg=invalid
1106         for ol_val in auto yes no ; do
1107                 if test "$enableval" = "$ol_val" ; then
1108                         ol_arg="$ol_val"
1109                 fi
1110         done
1111         if test "$ol_arg" = "invalid" ; then
1112                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1113         fi
1114         ol_enable_debug="$ol_arg"
1115
1116 else
1117         ol_enable_debug="yes"
1118 fi
1119 # end --enable-debug
1120 # OpenLDAP --enable-syslog
1121         # Check whether --enable-syslog or --disable-syslog was given.
1122 if test "${enable_syslog+set}" = set; then
1123   enableval="$enable_syslog"
1124   
1125         ol_arg=invalid
1126         for ol_val in auto yes no ; do
1127                 if test "$enableval" = "$ol_val" ; then
1128                         ol_arg="$ol_val"
1129                 fi
1130         done
1131         if test "$ol_arg" = "invalid" ; then
1132                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1133         fi
1134         ol_enable_syslog="$ol_arg"
1135
1136 else
1137         ol_enable_syslog="auto"
1138 fi
1139 # end --enable-syslog
1140 # OpenLDAP --enable-proctitle
1141         # Check whether --enable-proctitle or --disable-proctitle was given.
1142 if test "${enable_proctitle+set}" = set; then
1143   enableval="$enable_proctitle"
1144   
1145         ol_arg=invalid
1146         for ol_val in auto yes no ; do
1147                 if test "$enableval" = "$ol_val" ; then
1148                         ol_arg="$ol_val"
1149                 fi
1150         done
1151         if test "$ol_arg" = "invalid" ; then
1152                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1153         fi
1154         ol_enable_proctitle="$ol_arg"
1155
1156 else
1157         ol_enable_proctitle="yes"
1158 fi
1159 # end --enable-proctitle
1160 # OpenLDAP --enable-cache
1161         # Check whether --enable-cache or --disable-cache was given.
1162 if test "${enable_cache+set}" = set; then
1163   enableval="$enable_cache"
1164   
1165         ol_arg=invalid
1166         for ol_val in auto yes no ; do
1167                 if test "$enableval" = "$ol_val" ; then
1168                         ol_arg="$ol_val"
1169                 fi
1170         done
1171         if test "$ol_arg" = "invalid" ; then
1172                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1173         fi
1174         ol_enable_cache="$ol_arg"
1175
1176 else
1177         ol_enable_cache="yes"
1178 fi
1179 # end --enable-cache
1180 # OpenLDAP --enable-dns
1181         # Check whether --enable-dns or --disable-dns was given.
1182 if test "${enable_dns+set}" = set; then
1183   enableval="$enable_dns"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1193         fi
1194         ol_enable_dns="$ol_arg"
1195
1196 else
1197         ol_enable_dns="no"
1198 fi
1199 # end --enable-dns
1200 # OpenLDAP --enable-referrals
1201         # Check whether --enable-referrals or --disable-referrals was given.
1202 if test "${enable_referrals+set}" = set; then
1203   enableval="$enable_referrals"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1213         fi
1214         ol_enable_referrals="$ol_arg"
1215
1216 else
1217         ol_enable_referrals="yes"
1218 fi
1219 # end --enable-referrals
1220 # OpenLDAP --enable-cldap
1221         # Check whether --enable-cldap or --disable-cldap was given.
1222 if test "${enable_cldap+set}" = set; then
1223   enableval="$enable_cldap"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1233         fi
1234         ol_enable_cldap="$ol_arg"
1235
1236 else
1237         ol_enable_cldap="no"
1238 fi
1239 # end --enable-cldap
1240 # OpenLDAP --enable-x_compile
1241         # Check whether --enable-x_compile or --disable-x_compile was given.
1242 if test "${enable_x_compile+set}" = set; then
1243   enableval="$enable_x_compile"
1244   
1245         ol_arg=invalid
1246         for ol_val in yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1253         fi
1254         ol_enable_x_compile="$ol_arg"
1255
1256 else
1257         ol_enable_x_compile="no"
1258 fi
1259 # end --enable-x_compile
1260
1261 # OpenLDAP --enable-dmalloc
1262         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1263 if test "${enable_dmalloc+set}" = set; then
1264   enableval="$enable_dmalloc"
1265   
1266         ol_arg=invalid
1267         for ol_val in auto yes no ; do
1268                 if test "$enableval" = "$ol_val" ; then
1269                         ol_arg="$ol_val"
1270                 fi
1271         done
1272         if test "$ol_arg" = "invalid" ; then
1273                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1274         fi
1275         ol_enable_dmalloc="$ol_arg"
1276
1277 else
1278         ol_enable_dmalloc="no"
1279 fi
1280 # end --enable-dmalloc
1281
1282 # OpenLDAP --with-cyrus_sasl
1283         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1284 if test "${with_cyrus_sasl+set}" = set; then
1285   withval="$with_cyrus_sasl"
1286   
1287         ol_arg=invalid
1288         for ol_val in auto yes no  ; do
1289                 if test "$withval" = "$ol_val" ; then
1290                         ol_arg="$ol_val"
1291                 fi
1292         done
1293         if test "$ol_arg" = "invalid" ; then
1294                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1295         fi
1296         ol_with_cyrus_sasl="$ol_arg"
1297
1298 else
1299         ol_with_cyrus_sasl="auto"
1300 fi
1301 # end --with-cyrus_sasl
1302
1303 # OpenLDAP --with-fetch
1304         # Check whether --with-fetch or --without-fetch was given.
1305 if test "${with_fetch+set}" = set; then
1306   withval="$with_fetch"
1307   
1308         ol_arg=invalid
1309         for ol_val in auto yes no  ; do
1310                 if test "$withval" = "$ol_val" ; then
1311                         ol_arg="$ol_val"
1312                 fi
1313         done
1314         if test "$ol_arg" = "invalid" ; then
1315                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1316         fi
1317         ol_with_fetch="$ol_arg"
1318
1319 else
1320         ol_with_fetch="auto"
1321 fi
1322 # end --with-fetch
1323
1324 # OpenLDAP --with-kerberos
1325         # Check whether --with-kerberos or --without-kerberos was given.
1326 if test "${with_kerberos+set}" = set; then
1327   withval="$with_kerberos"
1328   
1329         ol_arg=invalid
1330         for ol_val in auto k5 k4 afs yes no ; do
1331                 if test "$withval" = "$ol_val" ; then
1332                         ol_arg="$ol_val"
1333                 fi
1334         done
1335         if test "$ol_arg" = "invalid" ; then
1336                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1337         fi
1338         ol_with_kerberos="$ol_arg"
1339
1340 else
1341         ol_with_kerberos="auto"
1342 fi
1343 # end --with-kerberos
1344
1345 # OpenLDAP --with-readline
1346         # Check whether --with-readline or --without-readline was given.
1347 if test "${with_readline+set}" = set; then
1348   withval="$with_readline"
1349   
1350         ol_arg=invalid
1351         for ol_val in auto yes no  ; do
1352                 if test "$withval" = "$ol_val" ; then
1353                         ol_arg="$ol_val"
1354                 fi
1355         done
1356         if test "$ol_arg" = "invalid" ; then
1357                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1358         fi
1359         ol_with_readline="$ol_arg"
1360
1361 else
1362         ol_with_readline="auto"
1363 fi
1364 # end --with-readline
1365
1366 # OpenLDAP --with-threads
1367         # Check whether --with-threads or --without-threads was given.
1368 if test "${with_threads+set}" = set; then
1369   withval="$with_threads"
1370   
1371         ol_arg=invalid
1372         for ol_val in auto posix mach pth lwp yes no manual  ; do
1373                 if test "$withval" = "$ol_val" ; then
1374                         ol_arg="$ol_val"
1375                 fi
1376         done
1377         if test "$ol_arg" = "invalid" ; then
1378                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1379         fi
1380         ol_with_threads="$ol_arg"
1381
1382 else
1383         ol_with_threads="auto"
1384 fi
1385 # end --with-threads
1386
1387 # OpenLDAP --with-tls
1388         # Check whether --with-tls or --without-tls was given.
1389 if test "${with_tls+set}" = set; then
1390   withval="$with_tls"
1391   
1392         ol_arg=invalid
1393         for ol_val in auto ssleay openssl yes no  ; do
1394                 if test "$withval" = "$ol_val" ; then
1395                         ol_arg="$ol_val"
1396                 fi
1397         done
1398         if test "$ol_arg" = "invalid" ; then
1399                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1400         fi
1401         ol_with_tls="$ol_arg"
1402
1403 else
1404         ol_with_tls="auto"
1405 fi
1406 # end --with-tls
1407
1408 # OpenLDAP --with-yielding_select
1409         # Check whether --with-yielding_select or --without-yielding_select was given.
1410 if test "${with_yielding_select+set}" = set; then
1411   withval="$with_yielding_select"
1412   
1413         ol_arg=invalid
1414         for ol_val in auto yes no manual  ; do
1415                 if test "$withval" = "$ol_val" ; then
1416                         ol_arg="$ol_val"
1417                 fi
1418         done
1419         if test "$ol_arg" = "invalid" ; then
1420                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1421         fi
1422         ol_with_yielding_select="$ol_arg"
1423
1424 else
1425         ol_with_yielding_select="auto"
1426 fi
1427 # end --with-yielding_select
1428
1429
1430 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1431 if test "${with_xxldapdoptions+set}" = set; then
1432   withval="$with_xxldapdoptions"
1433   :
1434 fi
1435
1436 # OpenLDAP --enable-ldapd
1437         # Check whether --enable-ldapd or --disable-ldapd was given.
1438 if test "${enable_ldapd+set}" = set; then
1439   enableval="$enable_ldapd"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto yes no ; do
1443                 if test "$enableval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1449         fi
1450         ol_enable_ldapd="$ol_arg"
1451
1452 else
1453         ol_enable_ldapd="no"
1454 fi
1455 # end --enable-ldapd
1456
1457 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1458 if test "${with_xxslapdoptions+set}" = set; then
1459   withval="$with_xxslapdoptions"
1460   :
1461 fi
1462
1463 # OpenLDAP --enable-slapd
1464         # Check whether --enable-slapd or --disable-slapd was given.
1465 if test "${enable_slapd+set}" = set; then
1466   enableval="$enable_slapd"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no ; do
1470                 if test "$enableval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1476         fi
1477         ol_enable_slapd="$ol_arg"
1478
1479 else
1480         ol_enable_slapd="yes"
1481 fi
1482 # end --enable-slapd
1483 # OpenLDAP --enable-cleartext
1484         # Check whether --enable-cleartext or --disable-cleartext was given.
1485 if test "${enable_cleartext+set}" = set; then
1486   enableval="$enable_cleartext"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto yes no ; do
1490                 if test "$enableval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1496         fi
1497         ol_enable_cleartext="$ol_arg"
1498
1499 else
1500         ol_enable_cleartext="yes"
1501 fi
1502 # end --enable-cleartext
1503 # OpenLDAP --enable-crypt
1504         # Check whether --enable-crypt or --disable-crypt was given.
1505 if test "${enable_crypt+set}" = set; then
1506   enableval="$enable_crypt"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1516         fi
1517         ol_enable_crypt="$ol_arg"
1518
1519 else
1520         ol_enable_crypt="auto"
1521 fi
1522 # end --enable-crypt
1523 # OpenLDAP --enable-modules
1524         # Check whether --enable-modules or --disable-modules was given.
1525 if test "${enable_modules+set}" = set; then
1526   enableval="$enable_modules"
1527   
1528         ol_arg=invalid
1529         for ol_val in auto yes no ; do
1530                 if test "$enableval" = "$ol_val" ; then
1531                         ol_arg="$ol_val"
1532                 fi
1533         done
1534         if test "$ol_arg" = "invalid" ; then
1535                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1536         fi
1537         ol_enable_modules="$ol_arg"
1538
1539 else
1540         ol_enable_modules="no"
1541 fi
1542 # end --enable-modules
1543 # OpenLDAP --enable-multimaster
1544         # Check whether --enable-multimaster or --disable-multimaster was given.
1545 if test "${enable_multimaster+set}" = set; then
1546   enableval="$enable_multimaster"
1547   
1548         ol_arg=invalid
1549         for ol_val in auto yes no ; do
1550                 if test "$enableval" = "$ol_val" ; then
1551                         ol_arg="$ol_val"
1552                 fi
1553         done
1554         if test "$ol_arg" = "invalid" ; then
1555                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1556         fi
1557         ol_enable_multimaster="$ol_arg"
1558
1559 else
1560         ol_enable_multimaster="no"
1561 fi
1562 # end --enable-multimaster
1563 # OpenLDAP --enable-phonetic
1564         # Check whether --enable-phonetic or --disable-phonetic was given.
1565 if test "${enable_phonetic+set}" = set; then
1566   enableval="$enable_phonetic"
1567   
1568         ol_arg=invalid
1569         for ol_val in auto yes no ; do
1570                 if test "$enableval" = "$ol_val" ; then
1571                         ol_arg="$ol_val"
1572                 fi
1573         done
1574         if test "$ol_arg" = "invalid" ; then
1575                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1576         fi
1577         ol_enable_phonetic="$ol_arg"
1578
1579 else
1580         ol_enable_phonetic="no"
1581 fi
1582 # end --enable-phonetic
1583 # OpenLDAP --enable-quipu
1584         # Check whether --enable-quipu or --disable-quipu was given.
1585 if test "${enable_quipu+set}" = set; then
1586   enableval="$enable_quipu"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no ; do
1590                 if test "$enableval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1596         fi
1597         ol_enable_quipu="$ol_arg"
1598
1599 else
1600         ol_enable_quipu="no"
1601 fi
1602 # end --enable-quipu
1603 # OpenLDAP --enable-rlookups
1604         # Check whether --enable-rlookups or --disable-rlookups was given.
1605 if test "${enable_rlookups+set}" = set; then
1606   enableval="$enable_rlookups"
1607   
1608         ol_arg=invalid
1609         for ol_val in auto yes no ; do
1610                 if test "$enableval" = "$ol_val" ; then
1611                         ol_arg="$ol_val"
1612                 fi
1613         done
1614         if test "$ol_arg" = "invalid" ; then
1615                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1616         fi
1617         ol_enable_rlookups="$ol_arg"
1618
1619 else
1620         ol_enable_rlookups="auto"
1621 fi
1622 # end --enable-rlookups
1623 # OpenLDAP --enable-aci
1624         # Check whether --enable-aci or --disable-aci was given.
1625 if test "${enable_aci+set}" = set; then
1626   enableval="$enable_aci"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no ; do
1630                 if test "$enableval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1636         fi
1637         ol_enable_aci="$ol_arg"
1638
1639 else
1640         ol_enable_aci="no"
1641 fi
1642 # end --enable-aci
1643 # OpenLDAP --enable-discreteaci
1644         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1645 if test "${enable_discreteaci+set}" = set; then
1646   enableval="$enable_discreteaci"
1647   
1648         ol_arg=invalid
1649         for ol_val in auto yes no ; do
1650                 if test "$enableval" = "$ol_val" ; then
1651                         ol_arg="$ol_val"
1652                 fi
1653         done
1654         if test "$ol_arg" = "invalid" ; then
1655                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1656         fi
1657         ol_enable_discreteaci="$ol_arg"
1658
1659 else
1660         ol_enable_discreteaci="no"
1661 fi
1662 # end --enable-discreteaci
1663 # OpenLDAP --enable-wrappers
1664         # Check whether --enable-wrappers or --disable-wrappers was given.
1665 if test "${enable_wrappers+set}" = set; then
1666   enableval="$enable_wrappers"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1676         fi
1677         ol_enable_wrappers="$ol_arg"
1678
1679 else
1680         ol_enable_wrappers="no"
1681 fi
1682 # end --enable-wrappers
1683
1684 # OpenLDAP --enable-bdb2
1685         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1686 if test "${enable_bdb2+set}" = set; then
1687   enableval="$enable_bdb2"
1688   
1689         ol_arg=invalid
1690         for ol_val in auto yes no ; do
1691                 if test "$enableval" = "$ol_val" ; then
1692                         ol_arg="$ol_val"
1693                 fi
1694         done
1695         if test "$ol_arg" = "invalid" ; then
1696                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1697         fi
1698         ol_enable_bdb2="$ol_arg"
1699
1700 else
1701         ol_enable_bdb2="no"
1702 fi
1703 # end --enable-bdb2
1704 # OpenLDAP --with-bdb2_module
1705         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1706 if test "${with_bdb2_module+set}" = set; then
1707   withval="$with_bdb2_module"
1708   
1709         ol_arg=invalid
1710         for ol_val in static dynamic ; do
1711                 if test "$withval" = "$ol_val" ; then
1712                         ol_arg="$ol_val"
1713                 fi
1714         done
1715         if test "$ol_arg" = "invalid" ; then
1716                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1717         fi
1718         ol_with_bdb2_module="$ol_arg"
1719
1720 else
1721         ol_with_bdb2_module="static"
1722 fi
1723 # end --with-bdb2_module
1724
1725 # OpenLDAP --enable-ldap
1726         # Check whether --enable-ldap or --disable-ldap was given.
1727 if test "${enable_ldap+set}" = set; then
1728   enableval="$enable_ldap"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1738         fi
1739         ol_enable_ldap="$ol_arg"
1740
1741 else
1742         ol_enable_ldap="no"
1743 fi
1744 # end --enable-ldap
1745 # OpenLDAP --with-ldap_module
1746         # Check whether --with-ldap_module or --without-ldap_module was given.
1747 if test "${with_ldap_module+set}" = set; then
1748   withval="$with_ldap_module"
1749   
1750         ol_arg=invalid
1751         for ol_val in static dynamic ; do
1752                 if test "$withval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1758         fi
1759         ol_with_ldap_module="$ol_arg"
1760
1761 else
1762         ol_with_ldap_module="static"
1763 fi
1764 # end --with-ldap_module
1765
1766 # OpenLDAP --enable-ldbm
1767         # Check whether --enable-ldbm or --disable-ldbm was given.
1768 if test "${enable_ldbm+set}" = set; then
1769   enableval="$enable_ldbm"
1770   
1771         ol_arg=invalid
1772         for ol_val in auto yes no ; do
1773                 if test "$enableval" = "$ol_val" ; then
1774                         ol_arg="$ol_val"
1775                 fi
1776         done
1777         if test "$ol_arg" = "invalid" ; then
1778                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1779         fi
1780         ol_enable_ldbm="$ol_arg"
1781
1782 else
1783         ol_enable_ldbm="yes"
1784 fi
1785 # end --enable-ldbm
1786 # OpenLDAP --with-ldbm_api
1787         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1788 if test "${with_ldbm_api+set}" = set; then
1789   withval="$with_ldbm_api"
1790   
1791         ol_arg=invalid
1792         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1793                 if test "$withval" = "$ol_val" ; then
1794                         ol_arg="$ol_val"
1795                 fi
1796         done
1797         if test "$ol_arg" = "invalid" ; then
1798                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1799         fi
1800         ol_with_ldbm_api="$ol_arg"
1801
1802 else
1803         ol_with_ldbm_api="auto"
1804 fi
1805 # end --with-ldbm_api
1806
1807 # OpenLDAP --with-ldbm_module
1808         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1809 if test "${with_ldbm_module+set}" = set; then
1810   withval="$with_ldbm_module"
1811   
1812         ol_arg=invalid
1813         for ol_val in static dynamic ; do
1814                 if test "$withval" = "$ol_val" ; then
1815                         ol_arg="$ol_val"
1816                 fi
1817         done
1818         if test "$ol_arg" = "invalid" ; then
1819                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1820         fi
1821         ol_with_ldbm_module="$ol_arg"
1822
1823 else
1824         ol_with_ldbm_module="static"
1825 fi
1826 # end --with-ldbm_module
1827
1828 # OpenLDAP --with-ldbm_type
1829         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1830 if test "${with_ldbm_type+set}" = set; then
1831   withval="$with_ldbm_type"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto btree hash ; do
1835                 if test "$withval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1841         fi
1842         ol_with_ldbm_type="$ol_arg"
1843
1844 else
1845         ol_with_ldbm_type="auto"
1846 fi
1847 # end --with-ldbm_type
1848
1849
1850 # OpenLDAP --enable-passwd
1851         # Check whether --enable-passwd or --disable-passwd was given.
1852 if test "${enable_passwd+set}" = set; then
1853   enableval="$enable_passwd"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1863         fi
1864         ol_enable_passwd="$ol_arg"
1865
1866 else
1867         ol_enable_passwd="no"
1868 fi
1869 # end --enable-passwd
1870 # OpenLDAP --with-passwd_module
1871         # Check whether --with-passwd_module or --without-passwd_module was given.
1872 if test "${with_passwd_module+set}" = set; then
1873   withval="$with_passwd_module"
1874   
1875         ol_arg=invalid
1876         for ol_val in static dynamic ; do
1877                 if test "$withval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1883         fi
1884         ol_with_passwd_module="$ol_arg"
1885
1886 else
1887         ol_with_passwd_module="static"
1888 fi
1889 # end --with-passwd_module
1890
1891 # OpenLDAP --enable-perl
1892         # Check whether --enable-perl or --disable-perl was given.
1893 if test "${enable_perl+set}" = set; then
1894   enableval="$enable_perl"
1895   
1896         ol_arg=invalid
1897         for ol_val in auto yes no ; do
1898                 if test "$enableval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1904         fi
1905         ol_enable_perl="$ol_arg"
1906
1907 else
1908         ol_enable_perl="no"
1909 fi
1910 # end --enable-perl
1911 # OpenLDAP --with-perl_module
1912         # Check whether --with-perl_module or --without-perl_module was given.
1913 if test "${with_perl_module+set}" = set; then
1914   withval="$with_perl_module"
1915   
1916         ol_arg=invalid
1917         for ol_val in static dynamic ; do
1918                 if test "$withval" = "$ol_val" ; then
1919                         ol_arg="$ol_val"
1920                 fi
1921         done
1922         if test "$ol_arg" = "invalid" ; then
1923                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1924         fi
1925         ol_with_perl_module="$ol_arg"
1926
1927 else
1928         ol_with_perl_module="static"
1929 fi
1930 # end --with-perl_module
1931
1932 # OpenLDAP --enable-shell
1933         # Check whether --enable-shell or --disable-shell was given.
1934 if test "${enable_shell+set}" = set; then
1935   enableval="$enable_shell"
1936   
1937         ol_arg=invalid
1938         for ol_val in auto yes no ; do
1939                 if test "$enableval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1945         fi
1946         ol_enable_shell="$ol_arg"
1947
1948 else
1949         ol_enable_shell="no"
1950 fi
1951 # end --enable-shell
1952 # OpenLDAP --with-shell_module
1953         # Check whether --with-shell_module or --without-shell_module was given.
1954 if test "${with_shell_module+set}" = set; then
1955   withval="$with_shell_module"
1956   
1957         ol_arg=invalid
1958         for ol_val in static dynamic ; do
1959                 if test "$withval" = "$ol_val" ; then
1960                         ol_arg="$ol_val"
1961                 fi
1962         done
1963         if test "$ol_arg" = "invalid" ; then
1964                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1965         fi
1966         ol_with_shell_module="$ol_arg"
1967
1968 else
1969         ol_with_shell_module="static"
1970 fi
1971 # end --with-shell_module
1972
1973 # OpenLDAP --enable-tcl
1974         # Check whether --enable-tcl or --disable-tcl was given.
1975 if test "${enable_tcl+set}" = set; then
1976   enableval="$enable_tcl"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto yes no ; do
1980                 if test "$enableval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1986         fi
1987         ol_enable_tcl="$ol_arg"
1988
1989 else
1990         ol_enable_tcl="no"
1991 fi
1992 # end --enable-tcl
1993 # OpenLDAP --with-tcl_module
1994         # Check whether --with-tcl_module or --without-tcl_module was given.
1995 if test "${with_tcl_module+set}" = set; then
1996   withval="$with_tcl_module"
1997   
1998         ol_arg=invalid
1999         for ol_val in static dynamic ; do
2000                 if test "$withval" = "$ol_val" ; then
2001                         ol_arg="$ol_val"
2002                 fi
2003         done
2004         if test "$ol_arg" = "invalid" ; then
2005                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2006         fi
2007         ol_with_tcl_module="$ol_arg"
2008
2009 else
2010         ol_with_tcl_module="static"
2011 fi
2012 # end --with-tcl_module
2013
2014
2015 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2016 if test "${with_xxslurpdoptions+set}" = set; then
2017   withval="$with_xxslurpdoptions"
2018   :
2019 fi
2020
2021 # OpenLDAP --enable-slurpd
2022         # Check whether --enable-slurpd or --disable-slurpd was given.
2023 if test "${enable_slurpd+set}" = set; then
2024   enableval="$enable_slurpd"
2025   
2026         ol_arg=invalid
2027         for ol_val in auto yes no ; do
2028                 if test "$enableval" = "$ol_val" ; then
2029                         ol_arg="$ol_val"
2030                 fi
2031         done
2032         if test "$ol_arg" = "invalid" ; then
2033                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2034         fi
2035         ol_enable_slurpd="$ol_arg"
2036
2037 else
2038         ol_enable_slurpd="auto"
2039 fi
2040 # end --enable-slurpd
2041
2042 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2043 if test "${with_xxliboptions+set}" = set; then
2044   withval="$with_xxliboptions"
2045   :
2046 fi
2047
2048 # Check whether --enable-static or --disable-static was given.
2049 if test "${enable_static+set}" = set; then
2050   enableval="$enable_static"
2051   p=${PACKAGE-default}
2052 case "$enableval" in
2053 yes) enable_static=yes ;;
2054 no) enable_static=no ;;
2055 *)
2056   enable_static=no
2057   # Look at the argument we got.  We use all the common list separators.
2058   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2059   for pkg in $enableval; do
2060     if test "X$pkg" = "X$p"; then
2061       enable_static=yes
2062     fi
2063   done
2064   IFS="$ac_save_ifs"
2065   ;;
2066 esac
2067 else
2068   enable_static=yes
2069 fi
2070
2071 # Check whether --enable-shared or --disable-shared was given.
2072 if test "${enable_shared+set}" = set; then
2073   enableval="$enable_shared"
2074   p=${PACKAGE-default}
2075 case "$enableval" in
2076 yes) enable_shared=yes ;;
2077 no) enable_shared=no ;;
2078 *)
2079   enable_shared=no
2080   # Look at the argument we got.  We use all the common list separators.
2081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2082   for pkg in $enableval; do
2083     if test "X$pkg" = "X$p"; then
2084       enable_shared=yes
2085     fi
2086   done
2087   IFS="$ac_save_ifs"
2088   ;;
2089 esac
2090 else
2091   enable_shared=yes
2092 fi
2093
2094
2095
2096 # validate options
2097 if test $ol_enable_dns = yes ; then
2098         if test $ol_enable_referrals = no ; then
2099                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2100         fi
2101         if test $ol_enable_referrals = auto ; then
2102                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2103                 ol_enable_referrals=yes
2104         fi
2105 fi
2106
2107 if test $ol_enable_slapd = no ; then
2108                 if test $ol_enable_bdb2 = yes ; then
2109                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2110         fi
2111         if test $ol_enable_ldap = yes ; then
2112                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2113         fi
2114         if test $ol_enable_ldbm = yes ; then
2115                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2116         fi
2117         if test $ol_enable_passwd = yes ; then
2118                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2119         fi
2120         if test $ol_enable_perl = yes ; then
2121                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2122         fi
2123         if test $ol_enable_shell = yes ; then
2124                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2125         fi
2126         if test $ol_enable_tcl = yes ; then
2127                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2128         fi
2129         if test $ol_enable_modules = yes ; then
2130                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2131         fi
2132         if test $ol_enable_multimaster = yes ; then
2133                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2134         fi
2135         if test $ol_enable_wrappers = yes ; then
2136                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2137         fi
2138         if test $ol_enable_phonetic = yes ; then
2139                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2140         fi
2141         if test $ol_enable_quipu = yes ; then
2142                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2143         fi
2144         if test $ol_enable_rlookups = yes ; then
2145                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2146         fi
2147         if test $ol_enable_aci = yes ; then
2148                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2149         fi
2150         if test $ol_enable_discreteaci = yes ; then
2151                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2152         fi
2153         if test $ol_with_ldbm_api != auto ; then
2154                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2155         fi
2156         if test $ol_with_ldbm_type != auto ; then
2157                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2158         fi
2159         if test $ol_with_bdb2_module != static ; then
2160                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2161         fi
2162         if test $ol_with_ldap_module != static ; then
2163                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2164         fi
2165         if test $ol_with_ldbm_module != static ; then
2166                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2167         fi
2168         if test $ol_with_passwd_module != static ; then
2169                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2170         fi
2171         if test $ol_with_perl_module != static ; then
2172                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2173         fi
2174         if test $ol_with_shell_module != static ; then
2175                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2176         fi
2177         if test $ol_with_tcl_module != static ; then
2178                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2179         fi
2180         if test $ol_enable_slurpd = yes ; then
2181                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2182         fi
2183
2184         # force settings to no
2185         ol_enable_bdb2=no
2186         ol_enable_ldap=no
2187         ol_enable_ldbm=no
2188         ol_enable_passwd=no
2189         ol_enable_perl=no
2190         ol_enable_shell=no
2191         ol_enable_tcl=no
2192
2193         ol_enable_modules=no
2194         ol_enable_multimaster=no
2195         ol_enable_phonetic=no
2196         ol_enable_quipu=no
2197         ol_enable_rlookups=no
2198         ol_enable_aci=no
2199         ol_enable_discreteaci=no
2200         ol_enable_wrappers=no
2201
2202         ol_with_ldbm_api=no
2203         ol_with_ldbm_type=no
2204
2205         ol_with_bdb2_module=static
2206         ol_with_ldap_module=static
2207         ol_with_ldbm_module=static
2208         ol_with_passwd_module=static
2209         ol_with_perl_module=static
2210         ol_with_shell_module=static
2211         ol_with_tcl_module=static
2212
2213         ol_enable_slurpd=no
2214
2215 elif test $ol_enable_ldbm = no ; then
2216         
2217         if test $ol_with_ldbm_api != auto ; then
2218                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2219         fi
2220
2221         if test $ol_with_ldbm_type != auto ; then
2222                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2223         fi
2224
2225         if test $ol_with_ldbm_module != static ; then
2226                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2227         fi
2228
2229         if test $ol_enable_bdb2 = yes ; then
2230                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2231         fi
2232
2233         if test $ol_enable_modules != yes -a \
2234                 $ol_enable_ldap = no -a \
2235                 $ol_enable_passwd = no -a \
2236                 $ol_enable_perl = no -a \
2237                 $ol_enable_shell = no -a \
2238                 $ol_enable_tcl = no ; then
2239                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2240         fi
2241
2242         ol_with_ldbm_api=no
2243         ol_with_ldbm_type=no
2244         ol_with_ldbm_module=static
2245
2246 elif test $ol_enable_bdb2 = yes ; then
2247         
2248         if test $ol_with_ldbm_api != auto -a \
2249                 $ol_with_ldbm_api != db2 ; then
2250                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2251         fi
2252
2253         ol_with_ldbm_api=db2
2254
2255 else
2256         
2257         if test $ol_enable_bdb2 != no ; then
2258                 if test $ol_with_ldbm_api != auto -a \
2259                         $ol_with_ldbm_api != db2 ; then
2260                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2261                         ol_enable_bdb2=no
2262                 fi
2263         fi
2264
2265         if test $ol_with_ldbm_api = gdbm -a \
2266                 $ol_with_ldbm_type = btree ; then
2267                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2268         fi
2269         if test $ol_with_ldbm_api = mdbm -a \
2270                 $ol_with_ldbm_type = btree ; then
2271                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2272         fi
2273         if test $ol_with_ldbm_api = ndbm -a \
2274                 $ol_with_ldbm_type = btree ; then
2275                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2276         fi
2277 fi
2278
2279 if test $ol_enable_slurpd = yes ; then
2280                 if test $ol_with_threads = no ; then
2281                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2282         fi
2283 fi
2284
2285 echo "$ac_t""done" 1>&6
2286
2287 LDAP_LIBS=
2288 LDIF_LIBS=
2289 LDBM_LIBS=
2290 LTHREAD_LIBS=
2291 LUTIL_LIBS=
2292
2293 LDAPD_LIBS=
2294 SLAPD_LIBS=
2295 SLURPD_LIBS=
2296
2297 BUILD_LDAPD=no
2298 BUILD_SLAPD=no
2299 BUILD_SLURPD=no
2300
2301 BUILD_BDB2=no
2302 BUILD_LDAP=no
2303 BUILD_LDBM=no
2304 BUILD_PASSWD=no
2305 BUILD_PERL=no
2306 BUILD_QUIPU=no
2307 BUILD_SHELL=no
2308 BUILD_TCL=no
2309 BUILD_THREAD=no
2310
2311 BUILD_BDB2_DYNAMIC=static
2312 BUILD_LDAP_DYNAMIC=static
2313 BUILD_LDBM_DYNAMIC=static
2314 BUILD_PASSWD_DYNAMIC=static
2315 BUILD_PERL_DYNAMIC=static
2316 BUILD_SHELL_DYNAMIC=static
2317 BUILD_TCL_DYNAMIC=static
2318
2319 SLAPD_MODULES_LDFLAGS=
2320 SLAPD_MODULES_CPPFLAGS=
2321 SLAPD_MODULES_LIST=
2322
2323 SLAPD_PERL_LDFLAGS=
2324 SLAPD_PERL_CPPFLAGS=
2325
2326 KRB_LIBS=
2327 READLINE_LIBS=
2328 SASL_LIBS=
2329 TERMCAP_LIBS=
2330 TLS_LIBS=
2331 MODULES_LIBS=
2332
2333
2334
2335 cat >> confdefs.h <<\EOF
2336 #define HAVE_MKVERSION 1
2337 EOF
2338
2339
2340
2341
2342 ol_aix_threads=no
2343 case "$target" in
2344 *-*-aix*)       if test -z "$CC" ; then
2345                 case "$ol_with_threads" in
2346                 auto | yes |  posix) ol_aix_threads=yes ;;
2347                 esac
2348         fi
2349 ;;
2350 esac
2351
2352 if test $ol_aix_threads = yes ; then
2353         if test -z "${CC}" ; then
2354                 for ac_prog in cc_r xlc_r cc
2355 do
2356 # Extract the first word of "$ac_prog", so it can be a program name with args.
2357 set dummy $ac_prog; ac_word=$2
2358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359 echo "configure:2360: checking for $ac_word" >&5
2360 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2361   echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363   if test -n "$CC"; then
2364   ac_cv_prog_CC="$CC" # Let the user override the test.
2365 else
2366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2367   ac_dummy="$PATH"
2368   for ac_dir in $ac_dummy; do
2369     test -z "$ac_dir" && ac_dir=.
2370     if test -f $ac_dir/$ac_word; then
2371       ac_cv_prog_CC="$ac_prog"
2372       break
2373     fi
2374   done
2375   IFS="$ac_save_ifs"
2376 fi
2377 fi
2378 CC="$ac_cv_prog_CC"
2379 if test -n "$CC"; then
2380   echo "$ac_t""$CC" 1>&6
2381 else
2382   echo "$ac_t""no" 1>&6
2383 fi
2384
2385 test -n "$CC" && break
2386 done
2387
2388
2389                 if test "$CC" = cc ; then
2390                                                 if test $ol_with_threads != auto ; then
2391                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2392                         else
2393                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2394                         fi
2395                         ol_with_threads=no
2396                 fi
2397         fi
2398
2399         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2400                 ol_with_threads=posix
2401                 ol_cv_pthread_create=yes
2402         fi
2403 fi
2404
2405 if test -z "${CC}"; then
2406         for ac_prog in cc
2407 do
2408 # Extract the first word of "$ac_prog", so it can be a program name with args.
2409 set dummy $ac_prog; ac_word=$2
2410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2411 echo "configure:2412: checking for $ac_word" >&5
2412 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2413   echo $ac_n "(cached) $ac_c" 1>&6
2414 else
2415   if test -n "$CC"; then
2416   ac_cv_prog_CC="$CC" # Let the user override the test.
2417 else
2418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2419   ac_dummy="$PATH"
2420   for ac_dir in $ac_dummy; do
2421     test -z "$ac_dir" && ac_dir=.
2422     if test -f $ac_dir/$ac_word; then
2423       ac_cv_prog_CC="$ac_prog"
2424       break
2425     fi
2426   done
2427   IFS="$ac_save_ifs"
2428 fi
2429 fi
2430 CC="$ac_cv_prog_CC"
2431 if test -n "$CC"; then
2432   echo "$ac_t""$CC" 1>&6
2433 else
2434   echo "$ac_t""no" 1>&6
2435 fi
2436
2437 test -n "$CC" && break
2438 done
2439
2440 fi
2441
2442
2443
2444 # Check whether --enable-fast-install or --disable-fast-install was given.
2445 if test "${enable_fast_install+set}" = set; then
2446   enableval="$enable_fast_install"
2447   p=${PACKAGE-default}
2448 case "$enableval" in
2449 yes) enable_fast_install=yes ;;
2450 no) enable_fast_install=no ;;
2451 *)
2452   enable_fast_install=no
2453   # Look at the argument we got.  We use all the common list separators.
2454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2455   for pkg in $enableval; do
2456     if test "X$pkg" = "X$p"; then
2457       enable_fast_install=yes
2458     fi
2459   done
2460   IFS="$ac_save_ifs"
2461   ;;
2462 esac
2463 else
2464   enable_fast_install=yes
2465 fi
2466
2467 # Extract the first word of "ranlib", so it can be a program name with args.
2468 set dummy ranlib; ac_word=$2
2469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2470 echo "configure:2471: checking for $ac_word" >&5
2471 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2472   echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474   if test -n "$RANLIB"; then
2475   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2476 else
2477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2478   ac_dummy="$PATH"
2479   for ac_dir in $ac_dummy; do
2480     test -z "$ac_dir" && ac_dir=.
2481     if test -f $ac_dir/$ac_word; then
2482       ac_cv_prog_RANLIB="ranlib"
2483       break
2484     fi
2485   done
2486   IFS="$ac_save_ifs"
2487   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2488 fi
2489 fi
2490 RANLIB="$ac_cv_prog_RANLIB"
2491 if test -n "$RANLIB"; then
2492   echo "$ac_t""$RANLIB" 1>&6
2493 else
2494   echo "$ac_t""no" 1>&6
2495 fi
2496
2497 # Extract the first word of "gcc", so it can be a program name with args.
2498 set dummy gcc; ac_word=$2
2499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2500 echo "configure:2501: checking for $ac_word" >&5
2501 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2502   echo $ac_n "(cached) $ac_c" 1>&6
2503 else
2504   if test -n "$CC"; then
2505   ac_cv_prog_CC="$CC" # Let the user override the test.
2506 else
2507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2508   ac_dummy="$PATH"
2509   for ac_dir in $ac_dummy; do
2510     test -z "$ac_dir" && ac_dir=.
2511     if test -f $ac_dir/$ac_word; then
2512       ac_cv_prog_CC="gcc"
2513       break
2514     fi
2515   done
2516   IFS="$ac_save_ifs"
2517 fi
2518 fi
2519 CC="$ac_cv_prog_CC"
2520 if test -n "$CC"; then
2521   echo "$ac_t""$CC" 1>&6
2522 else
2523   echo "$ac_t""no" 1>&6
2524 fi
2525
2526 if test -z "$CC"; then
2527   # Extract the first word of "cc", so it can be a program name with args.
2528 set dummy cc; ac_word=$2
2529 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2530 echo "configure:2531: checking for $ac_word" >&5
2531 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2532   echo $ac_n "(cached) $ac_c" 1>&6
2533 else
2534   if test -n "$CC"; then
2535   ac_cv_prog_CC="$CC" # Let the user override the test.
2536 else
2537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2538   ac_prog_rejected=no
2539   ac_dummy="$PATH"
2540   for ac_dir in $ac_dummy; do
2541     test -z "$ac_dir" && ac_dir=.
2542     if test -f $ac_dir/$ac_word; then
2543       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2544         ac_prog_rejected=yes
2545         continue
2546       fi
2547       ac_cv_prog_CC="cc"
2548       break
2549     fi
2550   done
2551   IFS="$ac_save_ifs"
2552 if test $ac_prog_rejected = yes; then
2553   # We found a bogon in the path, so make sure we never use it.
2554   set dummy $ac_cv_prog_CC
2555   shift
2556   if test $# -gt 0; then
2557     # We chose a different compiler from the bogus one.
2558     # However, it has the same basename, so the bogon will be chosen
2559     # first if we set CC to just the basename; use the full file name.
2560     shift
2561     set dummy "$ac_dir/$ac_word" "$@"
2562     shift
2563     ac_cv_prog_CC="$@"
2564   fi
2565 fi
2566 fi
2567 fi
2568 CC="$ac_cv_prog_CC"
2569 if test -n "$CC"; then
2570   echo "$ac_t""$CC" 1>&6
2571 else
2572   echo "$ac_t""no" 1>&6
2573 fi
2574
2575   if test -z "$CC"; then
2576     case "`uname -s`" in
2577     *win32* | *WIN32*)
2578       # Extract the first word of "cl", so it can be a program name with args.
2579 set dummy cl; ac_word=$2
2580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2581 echo "configure:2582: checking for $ac_word" >&5
2582 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2583   echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585   if test -n "$CC"; then
2586   ac_cv_prog_CC="$CC" # Let the user override the test.
2587 else
2588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2589   ac_dummy="$PATH"
2590   for ac_dir in $ac_dummy; do
2591     test -z "$ac_dir" && ac_dir=.
2592     if test -f $ac_dir/$ac_word; then
2593       ac_cv_prog_CC="cl"
2594       break
2595     fi
2596   done
2597   IFS="$ac_save_ifs"
2598 fi
2599 fi
2600 CC="$ac_cv_prog_CC"
2601 if test -n "$CC"; then
2602   echo "$ac_t""$CC" 1>&6
2603 else
2604   echo "$ac_t""no" 1>&6
2605 fi
2606  ;;
2607     esac
2608   fi
2609   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2610 fi
2611
2612 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2613 echo "configure:2614: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2614
2615 ac_ext=c
2616 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2617 ac_cpp='$CPP $CPPFLAGS'
2618 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2619 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2620 cross_compiling=$ac_cv_prog_cc_cross
2621
2622 cat > conftest.$ac_ext << EOF
2623
2624 #line 2625 "configure"
2625 #include "confdefs.h"
2626
2627 main(){return(0);}
2628 EOF
2629 if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2630   ac_cv_prog_cc_works=yes
2631   # If we can't run a trivial program, we are probably using a cross compiler.
2632   if (./conftest; exit) 2>/dev/null; then
2633     ac_cv_prog_cc_cross=no
2634   else
2635     ac_cv_prog_cc_cross=yes
2636   fi
2637 else
2638   echo "configure: failed program was:" >&5
2639   cat conftest.$ac_ext >&5
2640   ac_cv_prog_cc_works=no
2641 fi
2642 rm -fr conftest*
2643 ac_ext=c
2644 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2645 ac_cpp='$CPP $CPPFLAGS'
2646 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2647 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2648 cross_compiling=$ac_cv_prog_cc_cross
2649
2650 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2651 if test $ac_cv_prog_cc_works = no; then
2652   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2653 fi
2654 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2655 echo "configure:2656: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2656 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2657 cross_compiling=$ac_cv_prog_cc_cross
2658
2659 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2660 echo "configure:2661: checking whether we are using GNU C" >&5
2661 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2662   echo $ac_n "(cached) $ac_c" 1>&6
2663 else
2664   cat > conftest.c <<EOF
2665 #ifdef __GNUC__
2666   yes;
2667 #endif
2668 EOF
2669 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2670   ac_cv_prog_gcc=yes
2671 else
2672   ac_cv_prog_gcc=no
2673 fi
2674 fi
2675
2676 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2677
2678 if test $ac_cv_prog_gcc = yes; then
2679   GCC=yes
2680 else
2681   GCC=
2682 fi
2683
2684 ac_test_CFLAGS="${CFLAGS+set}"
2685 ac_save_CFLAGS="$CFLAGS"
2686 CFLAGS=
2687 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2688 echo "configure:2689: checking whether ${CC-cc} accepts -g" >&5
2689 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2690   echo $ac_n "(cached) $ac_c" 1>&6
2691 else
2692   echo 'void f(){}' > conftest.c
2693 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2694   ac_cv_prog_cc_g=yes
2695 else
2696   ac_cv_prog_cc_g=no
2697 fi
2698 rm -f conftest*
2699
2700 fi
2701
2702 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2703 if test "$ac_test_CFLAGS" = set; then
2704   CFLAGS="$ac_save_CFLAGS"
2705 elif test $ac_cv_prog_cc_g = yes; then
2706   if test "$GCC" = yes; then
2707     CFLAGS="-g -O2"
2708   else
2709     CFLAGS="-g"
2710   fi
2711 else
2712   if test "$GCC" = yes; then
2713     CFLAGS="-O2"
2714   else
2715     CFLAGS=
2716   fi
2717 fi
2718
2719 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2720 if test "${with_gnu_ld+set}" = set; then
2721   withval="$with_gnu_ld"
2722   test "$withval" = no || with_gnu_ld=yes
2723 else
2724   with_gnu_ld=no
2725 fi
2726
2727 ac_prog=ld
2728 if test "$ac_cv_prog_gcc" = yes; then
2729   # Check if gcc -print-prog-name=ld gives a path.
2730   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2731 echo "configure:2732: checking for ld used by GCC" >&5
2732   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2733   case "$ac_prog" in
2734     # Accept absolute paths.
2735     [\\/]* | [A-Za-z]:[\\/]*)
2736       re_direlt='/[^/][^/]*/\.\./'
2737       # Canonicalize the path of ld
2738       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2739       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2740         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2741       done
2742       test -z "$LD" && LD="$ac_prog"
2743       ;;
2744   "")
2745     # If it fails, then pretend we aren't using GCC.
2746     ac_prog=ld
2747     ;;
2748   *)
2749     # If it is relative, then search for the first ld in PATH.
2750     with_gnu_ld=unknown
2751     ;;
2752   esac
2753 elif test "$with_gnu_ld" = yes; then
2754   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2755 echo "configure:2756: checking for GNU ld" >&5
2756 else
2757   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2758 echo "configure:2759: checking for non-GNU ld" >&5
2759 fi
2760 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   if test -z "$LD"; then
2764   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2765   for ac_dir in $PATH; do
2766     test -z "$ac_dir" && ac_dir=.
2767     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2768       ac_cv_path_LD="$ac_dir/$ac_prog"
2769       # Check to see if the program is GNU ld.  I'd rather use --version,
2770       # but apparently some GNU ld's only accept -v.
2771       # Break only if it was the GNU/non-GNU ld that we prefer.
2772       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2773         test "$with_gnu_ld" != no && break
2774       else
2775         test "$with_gnu_ld" != yes && break
2776       fi
2777     fi
2778   done
2779   IFS="$ac_save_ifs"
2780 else
2781   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2782 fi
2783 fi
2784
2785 LD="$ac_cv_path_LD"
2786 if test -n "$LD"; then
2787   echo "$ac_t""$LD" 1>&6
2788 else
2789   echo "$ac_t""no" 1>&6
2790 fi
2791 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2792
2793 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2794 echo "configure:2795: checking if the linker ($LD) is GNU ld" >&5
2795 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2796   echo $ac_n "(cached) $ac_c" 1>&6
2797 else
2798   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2799 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2800   ac_cv_prog_gnu_ld=yes
2801 else
2802   ac_cv_prog_gnu_ld=no
2803 fi
2804 fi
2805
2806 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2807
2808
2809 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2810 echo "configure:2811: checking for BSD-compatible nm" >&5
2811 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2812   echo $ac_n "(cached) $ac_c" 1>&6
2813 else
2814   if test -n "$NM"; then
2815   # Let the user override the test.
2816   ac_cv_path_NM="$NM"
2817 else
2818   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2819   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2820     test -z "$ac_dir" && ac_dir=.
2821     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2822       # Check to see if the nm accepts a BSD-compat flag.
2823       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2824       #   nm: unknown option "B" ignored
2825       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2826         ac_cv_path_NM="$ac_dir/nm -B"
2827         break
2828       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2829         ac_cv_path_NM="$ac_dir/nm -p"
2830         break
2831       else
2832         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2833         continue # so that we can try to find one that supports BSD flags
2834       fi
2835     fi
2836   done
2837   IFS="$ac_save_ifs"
2838   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2839 fi
2840 fi
2841
2842 NM="$ac_cv_path_NM"
2843 echo "$ac_t""$NM" 1>&6
2844
2845
2846 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2847 echo "configure:2848: checking whether ln -s works" >&5
2848 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   rm -f conftestdata
2852 if ln -s X conftestdata 2>/dev/null
2853 then
2854   rm -f conftestdata
2855   ac_cv_prog_LN_S="ln -s"
2856 else
2857   ac_cv_prog_LN_S=ln
2858 fi
2859 fi
2860 LN_S="$ac_cv_prog_LN_S"
2861 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2862   echo "$ac_t""yes" 1>&6
2863 else
2864   echo "$ac_t""no" 1>&6
2865 fi
2866
2867
2868 # Check for any special flags to pass to ltconfig.
2869 libtool_flags="--cache-file=$cache_file"
2870 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2871 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2872 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2873 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2874 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2875 libtool_flags="$libtool_flags --enable-dlopen"
2876
2877 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2878 if test "${enable_libtool_lock+set}" = set; then
2879   enableval="$enable_libtool_lock"
2880   :
2881 fi
2882
2883 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2884 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2885
2886 # Some flags need to be propagated to the compiler or linker for good
2887 # libtool support.
2888 case "$host" in
2889 *-*-irix6*)
2890   # Find out which ABI we are using.
2891   echo '#line 2892 "configure"' > conftest.$ac_ext
2892   if { (eval echo configure:2893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2893     case "`/usr/bin/file conftest.o`" in
2894     *32-bit*)
2895       LD="${LD-ld} -32"
2896       ;;
2897     *N32*)
2898       LD="${LD-ld} -n32"
2899       ;;
2900     *64-bit*)
2901       LD="${LD-ld} -64"
2902       ;;
2903     esac
2904   fi
2905   rm -rf conftest*
2906   ;;
2907
2908 *-*-sco3.2v5*)
2909   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2910   SAVE_CFLAGS="$CFLAGS"
2911   CFLAGS="$CFLAGS -belf"
2912   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2913 echo "configure:2914: checking whether the C compiler needs -belf" >&5
2914 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2915   echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917   cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920
2921 int main() {
2922
2923 ; return 0; }
2924 EOF
2925 if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2926   rm -rf conftest*
2927   lt_cv_cc_needs_belf=yes
2928 else
2929   echo "configure: failed program was:" >&5
2930   cat conftest.$ac_ext >&5
2931   rm -rf conftest*
2932   lt_cv_cc_needs_belf=no
2933 fi
2934 rm -f conftest*
2935 fi
2936
2937 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2938   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2939     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2940     CFLAGS="$SAVE_CFLAGS"
2941   fi
2942   ;;
2943
2944
2945 esac
2946
2947
2948 # Save cache, so that ltconfig can load it
2949
2950
2951 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2952 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2953 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2954 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
2955 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
2956 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2957 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2958 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2959
2960 # Reload cache, that may have been modified by ltconfig
2961
2962
2963 # This can be used to rebuild libtool when needed
2964 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
2965
2966 # Always use our own libtool.
2967 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2968
2969 # Redirect the config.log output again, so that the ltconfig log is not
2970 # clobbered by the next message.
2971 exec 5>>./config.log
2972
2973
2974 for ac_prog in mawk gawk nawk awk
2975 do
2976 # Extract the first word of "$ac_prog", so it can be a program name with args.
2977 set dummy $ac_prog; ac_word=$2
2978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_word" >&5
2980 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   if test -n "$AWK"; then
2984   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2985 else
2986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2987   ac_dummy="$PATH"
2988   for ac_dir in $ac_dummy; do
2989     test -z "$ac_dir" && ac_dir=.
2990     if test -f $ac_dir/$ac_word; then
2991       ac_cv_prog_AWK="$ac_prog"
2992       break
2993     fi
2994   done
2995   IFS="$ac_save_ifs"
2996 fi
2997 fi
2998 AWK="$ac_cv_prog_AWK"
2999 if test -n "$AWK"; then
3000   echo "$ac_t""$AWK" 1>&6
3001 else
3002   echo "$ac_t""no" 1>&6
3003 fi
3004
3005 test -n "$AWK" && break
3006 done
3007
3008 # test for ln hardlink support
3009 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3010 echo "configure:3011: checking whether ln works" >&5
3011 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
3012   echo $ac_n "(cached) $ac_c" 1>&6
3013 else
3014   rm -f conftest.src conftest.dst
3015 echo "conftest" > conftest.src
3016 if ln conftest.src conftest.dst 2>/dev/null
3017 then
3018   ol_cv_prog_LN_H="ln"
3019 else
3020   ol_cv_prog_LN_H="cp"
3021 fi
3022 rm -f conftest.src conftest.dst
3023
3024 fi
3025 LN_H="$ol_cv_prog_LN_H"
3026 if test "$ol_cv_prog_LN_H" = "ln"; then
3027         echo "$ac_t""yes" 1>&6
3028 else
3029         echo "$ac_t""no" 1>&6
3030 fi
3031
3032 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3033 echo "configure:3034: checking whether ln -s works" >&5
3034 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   rm -f conftestdata
3038 if ln -s X conftestdata 2>/dev/null
3039 then
3040   rm -f conftestdata
3041   ac_cv_prog_LN_S="ln -s"
3042 else
3043   ac_cv_prog_LN_S=ln
3044 fi
3045 fi
3046 LN_S="$ac_cv_prog_LN_S"
3047 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3048   echo "$ac_t""yes" 1>&6
3049 else
3050   echo "$ac_t""no" 1>&6
3051 fi
3052
3053
3054 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3055         LN_S="$LN_H"
3056 fi
3057
3058 # Extract the first word of "sendmail", so it can be a program name with args.
3059 set dummy sendmail; ac_word=$2
3060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3061 echo "configure:3062: checking for $ac_word" >&5
3062 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   case "$SENDMAIL" in
3066   /*)
3067   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3068   ;;
3069   ?:/*)                  
3070   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3071   ;;
3072   *)
3073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3074   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3075   for ac_dir in $ac_dummy; do 
3076     test -z "$ac_dir" && ac_dir=.
3077     if test -f $ac_dir/$ac_word; then
3078       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3079       break
3080     fi
3081   done
3082   IFS="$ac_save_ifs"
3083   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3084   ;;
3085 esac
3086 fi
3087 SENDMAIL="$ac_cv_path_SENDMAIL"
3088 if test -n "$SENDMAIL"; then
3089   echo "$ac_t""$SENDMAIL" 1>&6
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093
3094 # Extract the first word of "vi", so it can be a program name with args.
3095 set dummy vi; ac_word=$2
3096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3097 echo "configure:3098: checking for $ac_word" >&5
3098 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   case "$EDITOR" in
3102   /*)
3103   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3104   ;;
3105   ?:/*)                  
3106   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3107   ;;
3108   *)
3109   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3110   ac_dummy="$PATH:/usr/ucb"
3111   for ac_dir in $ac_dummy; do 
3112     test -z "$ac_dir" && ac_dir=.
3113     if test -f $ac_dir/$ac_word; then
3114       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3115       break
3116     fi
3117   done
3118   IFS="$ac_save_ifs"
3119   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3120   ;;
3121 esac
3122 fi
3123 EDITOR="$ac_cv_path_EDITOR"
3124 if test -n "$EDITOR"; then
3125   echo "$ac_t""$EDITOR" 1>&6
3126 else
3127   echo "$ac_t""no" 1>&6
3128 fi
3129
3130 # Extract the first word of "finger", so it can be a program name with args.
3131 set dummy finger; ac_word=$2
3132 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3133 echo "configure:3134: checking for $ac_word" >&5
3134 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
3135   echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137   case "$FINGER" in
3138   /*)
3139   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3140   ;;
3141   ?:/*)                  
3142   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3143   ;;
3144   *)
3145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3146   ac_dummy="$PATH:/usr/ucb"
3147   for ac_dir in $ac_dummy; do 
3148     test -z "$ac_dir" && ac_dir=.
3149     if test -f $ac_dir/$ac_word; then
3150       ac_cv_path_FINGER="$ac_dir/$ac_word"
3151       break
3152     fi
3153   done
3154   IFS="$ac_save_ifs"
3155   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3156   ;;
3157 esac
3158 fi
3159 FINGER="$ac_cv_path_FINGER"
3160 if test -n "$FINGER"; then
3161   echo "$ac_t""$FINGER" 1>&6
3162 else
3163   echo "$ac_t""no" 1>&6
3164 fi
3165
3166
3167 ol_link_perl=no
3168 if test $ol_enable_perl != no ; then
3169         # Extract the first word of "perl", so it can be a program name with args.
3170 set dummy perl; ac_word=$2
3171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172 echo "configure:3173: checking for $ac_word" >&5
3173 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   case "$PERLBIN" in
3177   /*)
3178   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3179   ;;
3180   ?:/*)                  
3181   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3182   ;;
3183   *)
3184   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3185   ac_dummy="$PATH"
3186   for ac_dir in $ac_dummy; do 
3187     test -z "$ac_dir" && ac_dir=.
3188     if test -f $ac_dir/$ac_word; then
3189       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3190       break
3191     fi
3192   done
3193   IFS="$ac_save_ifs"
3194   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3195   ;;
3196 esac
3197 fi
3198 PERLBIN="$ac_cv_path_PERLBIN"
3199 if test -n "$PERLBIN"; then
3200   echo "$ac_t""$PERLBIN" 1>&6
3201 else
3202   echo "$ac_t""no" 1>&6
3203 fi
3204
3205
3206         if test "no$PERLBIN" = "no" ; then
3207                 if test $ol_enable_perl = yes ; then
3208                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3209                 fi
3210
3211         else
3212                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3213                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3214
3215                                 ol_link_perl=yes
3216         fi
3217 fi
3218
3219 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3220 echo "configure:3221: checking how to run the C preprocessor" >&5
3221 # On Suns, sometimes $CPP names a directory.
3222 if test -n "$CPP" && test -d "$CPP"; then
3223   CPP=
3224 fi
3225 if test -z "$CPP"; then
3226 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229     # This must be in double quotes, not single quotes, because CPP may get
3230   # substituted into the Makefile and "${CC-cc}" will confuse make.
3231   CPP="${CC-cc} -E"
3232   # On the NeXT, cc -E runs the code through the compiler's parser,
3233   # not just through cpp.
3234   cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 #include <assert.h>
3238 Syntax Error
3239 EOF
3240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3241 { (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3243 if test -z "$ac_err"; then
3244   :
3245 else
3246   echo "$ac_err" >&5
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   CPP="${CC-cc} -E -traditional-cpp"
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <assert.h>
3255 Syntax Error
3256 EOF
3257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3258 { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3260 if test -z "$ac_err"; then
3261   :
3262 else
3263   echo "$ac_err" >&5
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   CPP="${CC-cc} -nologo -E"
3268   cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3271 #include <assert.h>
3272 Syntax Error
3273 EOF
3274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3275 { (eval echo configure:3276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3277 if test -z "$ac_err"; then
3278   :
3279 else
3280   echo "$ac_err" >&5
3281   echo "configure: failed program was:" >&5
3282   cat conftest.$ac_ext >&5
3283   rm -rf conftest*
3284   CPP=/lib/cpp
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289 fi
3290 rm -f conftest*
3291   ac_cv_prog_CPP="$CPP"
3292 fi
3293   CPP="$ac_cv_prog_CPP"
3294 else
3295   ac_cv_prog_CPP="$CPP"
3296 fi
3297 echo "$ac_t""$CPP" 1>&6
3298
3299
3300 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3301         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3302
3303 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3304         echo "configure: warning: programs compiled here do run here..." 1>&2
3305         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3306
3307 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3308         echo "configure: warning: programs compiled here do not run here..." 1>&2
3309         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3310 fi
3311
3312 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3313 echo "configure:3314: checking for AIX" >&5
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 #ifdef _AIX
3318   yes
3319 #endif
3320
3321 EOF
3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3323   egrep "yes" >/dev/null 2>&1; then
3324   rm -rf conftest*
3325   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3326 #define _ALL_SOURCE 1
3327 EOF
3328
3329 else
3330   rm -rf conftest*
3331   echo "$ac_t""no" 1>&6
3332 fi
3333 rm -f conftest*
3334
3335
3336 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3337 echo "configure:3338: checking for POSIXized ISC" >&5
3338 if test -d /etc/conf/kconfig.d &&
3339   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3340 then
3341   echo "$ac_t""yes" 1>&6
3342   ISC=yes # If later tests want to check for ISC.
3343   cat >> confdefs.h <<\EOF
3344 #define _POSIX_SOURCE 1
3345 EOF
3346
3347   if test "$GCC" = yes; then
3348     CC="$CC -posix"
3349   else
3350     CC="$CC -Xp"
3351   fi
3352 else
3353   echo "$ac_t""no" 1>&6
3354   ISC=
3355 fi
3356
3357 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3358 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3359 echo "configure:3360: checking for minix/config.h" >&5
3360 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366 #include <minix/config.h>
3367 EOF
3368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3369 { (eval echo configure:3370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3371 if test -z "$ac_err"; then
3372   rm -rf conftest*
3373   eval "ac_cv_header_$ac_safe=yes"
3374 else
3375   echo "$ac_err" >&5
3376   echo "configure: failed program was:" >&5
3377   cat conftest.$ac_ext >&5
3378   rm -rf conftest*
3379   eval "ac_cv_header_$ac_safe=no"
3380 fi
3381 rm -f conftest*
3382 fi
3383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3384   echo "$ac_t""yes" 1>&6
3385   MINIX=yes
3386 else
3387   echo "$ac_t""no" 1>&6
3388 MINIX=
3389 fi
3390
3391 if test "$MINIX" = yes; then
3392   cat >> confdefs.h <<\EOF
3393 #define _POSIX_SOURCE 1
3394 EOF
3395
3396   cat >> confdefs.h <<\EOF
3397 #define _POSIX_1_SOURCE 2
3398 EOF
3399
3400   cat >> confdefs.h <<\EOF
3401 #define _MINIX 1
3402 EOF
3403
3404 fi
3405
3406
3407 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3408 echo "configure:3409: checking for Cygwin environment" >&5
3409 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415
3416 int main() {
3417
3418 #ifndef __CYGWIN__
3419 #define __CYGWIN__ __CYGWIN32__
3420 #endif
3421 return __CYGWIN__;
3422 ; return 0; }
3423 EOF
3424 if { (eval echo configure:3425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3425   rm -rf conftest*
3426   ac_cv_cygwin=yes
3427 else
3428   echo "configure: failed program was:" >&5
3429   cat conftest.$ac_ext >&5
3430   rm -rf conftest*
3431   ac_cv_cygwin=no
3432 fi
3433 rm -f conftest*
3434 rm -f conftest*
3435 fi
3436
3437 echo "$ac_t""$ac_cv_cygwin" 1>&6
3438 CYGWIN=
3439 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3440 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3441 echo "configure:3442: checking for mingw32 environment" >&5
3442 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   cat > conftest.$ac_ext <<EOF
3446 #line 3447 "configure"
3447 #include "confdefs.h"
3448
3449 int main() {
3450 return __MINGW32__;
3451 ; return 0; }
3452 EOF
3453 if { (eval echo configure:3454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3454   rm -rf conftest*
3455   ac_cv_mingw32=yes
3456 else
3457   echo "configure: failed program was:" >&5
3458   cat conftest.$ac_ext >&5
3459   rm -rf conftest*
3460   ac_cv_mingw32=no
3461 fi
3462 rm -f conftest*
3463 rm -f conftest*
3464 fi
3465
3466 echo "$ac_t""$ac_cv_mingw32" 1>&6
3467 MINGW32=
3468 test "$ac_cv_mingw32" = yes && MINGW32=yes
3469
3470
3471 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3472 echo "configure:3473: checking for executable suffix" >&5
3473 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3477   ac_cv_exeext=.exe
3478 else
3479   rm -f conftest*
3480   echo 'int main () { return 0; }' > conftest.$ac_ext
3481   ac_cv_exeext=
3482   if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3483     for file in conftest.*; do
3484       case $file in
3485       *.c | *.o | *.obj) ;;
3486       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3487       esac
3488     done
3489   else
3490     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3491   fi
3492   rm -f conftest*
3493   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3494 fi
3495 fi
3496
3497 EXEEXT=""
3498 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3499 echo "$ac_t""${ac_cv_exeext}" 1>&6
3500 ac_exeext=$EXEEXT
3501
3502 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3503 echo "configure:3504: checking for object suffix" >&5
3504 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   rm -f conftest*
3508 echo 'int i = 1;' > conftest.$ac_ext
3509 if { (eval echo configure:3510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3510   for ac_file in conftest.*; do
3511     case $ac_file in
3512     *.c) ;;
3513     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3514     esac
3515   done
3516 else
3517   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3518 fi
3519 rm -f conftest*
3520 fi
3521
3522 echo "$ac_t""$ac_cv_objext" 1>&6
3523 OBJEXT=$ac_cv_objext
3524 ac_objext=$ac_cv_objext
3525
3526
3527 cat >> confdefs.h <<EOF
3528 #define EXEEXT "${EXEEXT}"
3529 EOF
3530
3531
3532 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3533 echo "configure:3534: checking for be_app in -lbe" >&5
3534 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3535 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   ac_save_LIBS="$LIBS"
3539 LIBS="-lbe -lroot -lnet $LIBS"
3540 cat > conftest.$ac_ext <<EOF
3541 #line 3542 "configure"
3542 #include "confdefs.h"
3543 /* Override any gcc2 internal prototype to avoid an error.  */
3544 /* We use char because int might match the return type of a gcc2
3545     builtin and then its argument prototype would still apply.  */
3546 char be_app();
3547
3548 int main() {
3549 be_app()
3550 ; return 0; }
3551 EOF
3552 if { (eval echo configure:3553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3553   rm -rf conftest*
3554   eval "ac_cv_lib_$ac_lib_var=yes"
3555 else
3556   echo "configure: failed program was:" >&5
3557   cat conftest.$ac_ext >&5
3558   rm -rf conftest*
3559   eval "ac_cv_lib_$ac_lib_var=no"
3560 fi
3561 rm -f conftest*
3562 LIBS="$ac_save_LIBS"
3563
3564 fi
3565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3566   echo "$ac_t""yes" 1>&6
3567   LIBS="$LIBS -lbe -lroot -lnet"
3568 else
3569   echo "$ac_t""no" 1>&6
3570 :
3571 fi
3572
3573
3574
3575
3576
3577 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3578 echo "configure:3579: checking for ${CC-cc} option to accept ANSI C" >&5
3579 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   am_cv_prog_cc_stdc=no
3583 ac_save_CC="$CC"
3584 # Don't try gcc -ansi; that turns off useful extensions and
3585 # breaks some systems' header files.
3586 # AIX                   -qlanglvl=ansi
3587 # Ultrix and OSF/1      -std1
3588 # HP-UX 10.20 and later -Ae
3589 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3590 # SVR4                  -Xc -D__EXTENSIONS__
3591 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3592 do
3593   CC="$ac_save_CC $ac_arg"
3594   cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 #include <stdarg.h>
3598 #include <stdio.h>
3599 #include <sys/types.h>
3600 #include <sys/stat.h>
3601 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3602 struct buf { int x; };
3603 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3604 static char *e (p, i)
3605      char **p;
3606      int i;
3607 {
3608   return p[i];
3609 }
3610 static char *f (char * (*g) (char **, int), char **p, ...)
3611 {
3612   char *s;
3613   va_list v;
3614   va_start (v,p);
3615   s = g (p, va_arg (v,int));
3616   va_end (v);
3617   return s;
3618 }
3619 int test (int i, double x);
3620 struct s1 {int (*f) (int a);};
3621 struct s2 {int (*f) (double a);};
3622 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3623 int argc;
3624 char **argv;
3625
3626 int main() {
3627
3628 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3629
3630 ; return 0; }
3631 EOF
3632 if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3633   rm -rf conftest*
3634   am_cv_prog_cc_stdc="$ac_arg"; break
3635 else
3636   echo "configure: failed program was:" >&5
3637   cat conftest.$ac_ext >&5
3638 fi
3639 rm -f conftest*
3640 done
3641 CC="$ac_save_CC"
3642
3643 fi
3644
3645 if test -z "$am_cv_prog_cc_stdc"; then
3646   echo "$ac_t""none needed" 1>&6
3647 else
3648   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3649 fi
3650 case "x$am_cv_prog_cc_stdc" in
3651   x|xno) ;;
3652   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3653 esac
3654
3655 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3656         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3657 fi
3658
3659 # test for make depend flag
3660 OL_MKDEP=
3661 OL_MKDEP_FLAGS=
3662 if test -z "${MKDEP}"; then
3663         OL_MKDEP="${CC-cc}"
3664         if test -z "${MKDEP_FLAGS}"; then
3665                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3666 echo "configure:3667: checking for ${OL_MKDEP} depend flag" >&5
3667 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3668   echo $ac_n "(cached) $ac_c" 1>&6
3669 else
3670   
3671                         ol_cv_mkdep=no
3672                         for flag in "-M" "-xM"; do
3673                                 cat > conftest.c <<EOF
3674  noCode;
3675 EOF
3676                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3677                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3678                                 then
3679                                         if test ! -f conftest."${ac_object}" ; then
3680                                                 ol_cv_mkdep=$flag
3681                                                 OL_MKDEP_FLAGS="$flag"
3682                                                 break
3683                                         fi
3684                                 fi
3685                         done
3686                         rm -f conftest*
3687                 
3688 fi
3689
3690 echo "$ac_t""$ol_cv_mkdep" 1>&6
3691         else
3692                 cc_cv_mkdep=yes
3693                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3694         fi
3695 else
3696         cc_cv_mkdep=yes
3697         OL_MKDEP="${MKDEP}"
3698         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3699 fi
3700
3701
3702
3703 if test "${ol_cv_mkdep}" = no ; then
3704         # this will soon become an error
3705         echo "configure: warning: do not know how to generate dependencies" 1>&2
3706 fi
3707
3708 ol_link_modules=no
3709 if test $ol_enable_modules != no ; then
3710         for ac_hdr in ltdl.h
3711 do
3712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3714 echo "configure:3715: checking for $ac_hdr" >&5
3715 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 #include <$ac_hdr>
3722 EOF
3723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3724 { (eval echo configure:3725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3726 if test -z "$ac_err"; then
3727   rm -rf conftest*
3728   eval "ac_cv_header_$ac_safe=yes"
3729 else
3730   echo "$ac_err" >&5
3731   echo "configure: failed program was:" >&5
3732   cat conftest.$ac_ext >&5
3733   rm -rf conftest*
3734   eval "ac_cv_header_$ac_safe=no"
3735 fi
3736 rm -f conftest*
3737 fi
3738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3739   echo "$ac_t""yes" 1>&6
3740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3741   cat >> confdefs.h <<EOF
3742 #define $ac_tr_hdr 1
3743 EOF
3744  
3745 else
3746   echo "$ac_t""no" 1>&6
3747 fi
3748 done
3749
3750
3751         if test $ac_cv_header_ltdl_h = no ; then
3752                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3753         fi
3754
3755         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3756 echo "configure:3757: checking for lt_dlinit in -lltdl" >&5
3757 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-%__p_%'`
3758 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   ac_save_LIBS="$LIBS"
3762 LIBS="-lltdl  $LIBS"
3763 cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766 /* Override any gcc2 internal prototype to avoid an error.  */
3767 /* We use char because int might match the return type of a gcc2
3768     builtin and then its argument prototype would still apply.  */
3769 char lt_dlinit();
3770
3771 int main() {
3772 lt_dlinit()
3773 ; return 0; }
3774 EOF
3775 if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3776   rm -rf conftest*
3777   eval "ac_cv_lib_$ac_lib_var=yes"
3778 else
3779   echo "configure: failed program was:" >&5
3780   cat conftest.$ac_ext >&5
3781   rm -rf conftest*
3782   eval "ac_cv_lib_$ac_lib_var=no"
3783 fi
3784 rm -f conftest*
3785 LIBS="$ac_save_LIBS"
3786
3787 fi
3788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3789   echo "$ac_t""yes" 1>&6
3790     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3791     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3792   cat >> confdefs.h <<EOF
3793 #define $ac_tr_lib 1
3794 EOF
3795
3796   LIBS="-lltdl $LIBS"
3797
3798 else
3799   echo "$ac_t""no" 1>&6
3800 fi
3801
3802         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3803                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3804         fi
3805         ol_link_modules=yes
3806
3807 else
3808         ol_with_bdb2_module=static
3809         ol_with_ldap_module=static
3810         ol_with_ldbm_module=static
3811         ol_with_passwd_module=static
3812         ol_with_perl_module=static
3813         ol_with_shell_module=static
3814         ol_with_tcl_module=static
3815 fi
3816
3817 # test for EBCDIC
3818 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3819 echo "configure:3820: checking for EBCDIC" >&5
3820 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
3821   echo $ac_n "(cached) $ac_c" 1>&6
3822 else
3823   
3824         cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3827
3828 #if !('M' == 0xd4)
3829 #include <__ASCII__/generate_error.h>
3830 #endif
3831
3832 EOF
3833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3834 { (eval echo configure:3835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3836 if test -z "$ac_err"; then
3837   rm -rf conftest*
3838   ol_cv_cpp_ebcdic=yes
3839 else
3840   echo "$ac_err" >&5
3841   echo "configure: failed program was:" >&5
3842   cat conftest.$ac_ext >&5
3843   rm -rf conftest*
3844   ol_cv_cpp_ebcdic=no
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3850 if test $ol_cv_cpp_ebcdic = yes ; then
3851         cat >> confdefs.h <<\EOF
3852 #define HAVE_EBCDIC 1
3853 EOF
3854
3855 fi
3856
3857 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3858 echo "configure:3859: checking for ANSI C header files" >&5
3859 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
3860   echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862   cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 #include <stdlib.h>
3866 #include <stdarg.h>
3867 #include <string.h>
3868 #include <float.h>
3869 EOF
3870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3871 { (eval echo configure:3872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3873 if test -z "$ac_err"; then
3874   rm -rf conftest*
3875   ol_cv_header_stdc=yes
3876 else
3877   echo "$ac_err" >&5
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   ol_cv_header_stdc=no
3882 fi
3883 rm -f conftest*
3884
3885 if test $ol_cv_header_stdc = yes; then
3886   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3887 cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 #include <string.h>
3891 EOF
3892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3893   egrep "memchr" >/dev/null 2>&1; then
3894   :
3895 else
3896   rm -rf conftest*
3897   ol_cv_header_stdc=no
3898 fi
3899 rm -f conftest*
3900
3901 fi
3902
3903 if test $ol_cv_header_stdc = yes; then
3904   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 #include <stdlib.h>
3909 EOF
3910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3911   egrep "free" >/dev/null 2>&1; then
3912   :
3913 else
3914   rm -rf conftest*
3915   ol_cv_header_stdc=no
3916 fi
3917 rm -f conftest*
3918
3919 fi
3920
3921 if test $ol_cv_header_stdc = yes; then
3922   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3923 if test "$cross_compiling" = yes; then
3924   :
3925 else
3926   cat > conftest.$ac_ext <<EOF
3927 #line 3928 "configure"
3928 #include "confdefs.h"
3929 #include <ctype.h>
3930 #ifndef HAVE_EBCDIC
3931 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3932 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3933 #else
3934 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3935                 || ('j' <= (c) && (c) <= 'r') \
3936                 || ('s' <= (c) && (c) <= 'z'))
3937 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
3938 #endif
3939 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3940 int main () { int i; for (i = 0; i < 256; i++)
3941 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3942 exit (0); }
3943
3944 EOF
3945 if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3946 then
3947   :
3948 else
3949   echo "configure: failed program was:" >&5
3950   cat conftest.$ac_ext >&5
3951   rm -fr conftest*
3952   ol_cv_header_stdc=no
3953 fi
3954 rm -fr conftest*
3955 fi
3956
3957 fi
3958 fi
3959
3960 echo "$ac_t""$ol_cv_header_stdc" 1>&6
3961 if test $ol_cv_header_stdc = yes; then
3962   cat >> confdefs.h <<\EOF
3963 #define STDC_HEADERS 1
3964 EOF
3965
3966 fi
3967 ac_cv_header_stdc=disable
3968
3969
3970 if test $ol_cv_header_stdc != yes; then
3971         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
3972 fi
3973
3974 ac_header_dirent=no
3975 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3976 do
3977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3978 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3979 echo "configure:3980: checking for $ac_hdr that defines DIR" >&5
3980 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3981   echo $ac_n "(cached) $ac_c" 1>&6
3982 else
3983   cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 #include <sys/types.h>
3987 #include <$ac_hdr>
3988 int main() {
3989 DIR *dirp = 0;
3990 ; return 0; }
3991 EOF
3992 if { (eval echo configure:3993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3993   rm -rf conftest*
3994   eval "ac_cv_header_dirent_$ac_safe=yes"
3995 else
3996   echo "configure: failed program was:" >&5
3997   cat conftest.$ac_ext >&5
3998   rm -rf conftest*
3999   eval "ac_cv_header_dirent_$ac_safe=no"
4000 fi
4001 rm -f conftest*
4002 fi
4003 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4004   echo "$ac_t""yes" 1>&6
4005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4006   cat >> confdefs.h <<EOF
4007 #define $ac_tr_hdr 1
4008 EOF
4009  ac_header_dirent=$ac_hdr; break
4010 else
4011   echo "$ac_t""no" 1>&6
4012 fi
4013 done
4014 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4015 if test $ac_header_dirent = dirent.h; then
4016 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4017 echo "configure:4018: checking for opendir in -ldir" >&5
4018 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022   ac_save_LIBS="$LIBS"
4023 LIBS="-ldir  $LIBS"
4024 cat > conftest.$ac_ext <<EOF
4025 #line 4026 "configure"
4026 #include "confdefs.h"
4027 /* Override any gcc2 internal prototype to avoid an error.  */
4028 /* We use char because int might match the return type of a gcc2
4029     builtin and then its argument prototype would still apply.  */
4030 char opendir();
4031
4032 int main() {
4033 opendir()
4034 ; return 0; }
4035 EOF
4036 if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4037   rm -rf conftest*
4038   eval "ac_cv_lib_$ac_lib_var=yes"
4039 else
4040   echo "configure: failed program was:" >&5
4041   cat conftest.$ac_ext >&5
4042   rm -rf conftest*
4043   eval "ac_cv_lib_$ac_lib_var=no"
4044 fi
4045 rm -f conftest*
4046 LIBS="$ac_save_LIBS"
4047
4048 fi
4049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4050   echo "$ac_t""yes" 1>&6
4051   LIBS="$LIBS -ldir"
4052 else
4053   echo "$ac_t""no" 1>&6
4054 fi
4055
4056 else
4057 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4058 echo "configure:4059: checking for opendir in -lx" >&5
4059 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4061   echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063   ac_save_LIBS="$LIBS"
4064 LIBS="-lx  $LIBS"
4065 cat > conftest.$ac_ext <<EOF
4066 #line 4067 "configure"
4067 #include "confdefs.h"
4068 /* Override any gcc2 internal prototype to avoid an error.  */
4069 /* We use char because int might match the return type of a gcc2
4070     builtin and then its argument prototype would still apply.  */
4071 char opendir();
4072
4073 int main() {
4074 opendir()
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4078   rm -rf conftest*
4079   eval "ac_cv_lib_$ac_lib_var=yes"
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   eval "ac_cv_lib_$ac_lib_var=no"
4085 fi
4086 rm -f conftest*
4087 LIBS="$ac_save_LIBS"
4088
4089 fi
4090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4091   echo "$ac_t""yes" 1>&6
4092   LIBS="$LIBS -lx"
4093 else
4094   echo "$ac_t""no" 1>&6
4095 fi
4096
4097 fi
4098
4099 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4100 echo "configure:4101: checking for sys/wait.h that is POSIX.1 compatible" >&5
4101 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4102   echo $ac_n "(cached) $ac_c" 1>&6
4103 else
4104   cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 #include <sys/types.h>
4108 #include <sys/wait.h>
4109 #ifndef WEXITSTATUS
4110 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4111 #endif
4112 #ifndef WIFEXITED
4113 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4114 #endif
4115 int main() {
4116 int s;
4117 wait (&s);
4118 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   ac_cv_header_sys_wait_h=yes
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   ac_cv_header_sys_wait_h=no
4129 fi
4130 rm -f conftest*
4131 fi
4132
4133 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4134 if test $ac_cv_header_sys_wait_h = yes; then
4135   cat >> confdefs.h <<\EOF
4136 #define HAVE_SYS_WAIT_H 1
4137 EOF
4138
4139 fi
4140
4141 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4142 echo "configure:4143: checking POSIX termios" >&5
4143 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
4144   echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146   cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 #include <sys/types.h>
4150 #include <unistd.h>
4151 #include <termios.h>
4152 int main() {
4153 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4154    tcgetattr(0, 0);
4155 ; return 0; }
4156 EOF
4157 if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4158   rm -rf conftest*
4159   am_cv_sys_posix_termios=yes
4160 else
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163   rm -rf conftest*
4164   am_cv_sys_posix_termios=no
4165 fi
4166 rm -f conftest*
4167 fi
4168
4169 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4170
4171
4172  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4173 echo "configure:4174: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4174 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4178
4179   gwinsz_in_termios_h=no
4180   if test $am_cv_sys_posix_termios = yes; then
4181     cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 #include <sys/types.h>
4185 #     include <termios.h>
4186 #     ifdef TIOCGWINSZ
4187         yes
4188 #     endif
4189     
4190 EOF
4191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4192   egrep "yes" >/dev/null 2>&1; then
4193   rm -rf conftest*
4194   gwinsz_in_termios_h=yes
4195 fi
4196 rm -f conftest*
4197
4198   fi
4199
4200   if test $gwinsz_in_termios_h = no; then
4201     cat > conftest.$ac_ext <<EOF
4202 #line 4203 "configure"
4203 #include "confdefs.h"
4204 #include <sys/types.h>
4205 #     include <sys/ioctl.h>
4206 #     ifdef TIOCGWINSZ
4207         yes
4208 #     endif
4209     
4210 EOF
4211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4212   egrep "yes" >/dev/null 2>&1; then
4213   rm -rf conftest*
4214   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4215 fi
4216 rm -f conftest*
4217
4218   fi
4219   
4220 fi
4221
4222 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4223   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4224     cat >> confdefs.h <<\EOF
4225 #define GWINSZ_IN_SYS_IOCTL 1
4226 EOF
4227
4228   fi
4229
4230 if test $am_cv_sys_posix_termios = yes ; then
4231         cat >> confdefs.h <<\EOF
4232 #define HAVE_POSIX_TERMIOS 1
4233 EOF
4234
4235 fi
4236
4237 for ac_hdr in \
4238         arpa/inet.h             \
4239         arpa/nameser.h  \
4240         assert.h                \
4241         crypt.h                 \
4242         errno.h                 \
4243         fcntl.h                 \
4244         filio.h                 \
4245         getopt.h                \
4246         grp.h                   \
4247         libutil.h               \
4248         limits.h                \
4249         locale.h                \
4250         netinet/tcp.h   \
4251         malloc.h                \
4252         memory.h                \
4253         psap.h                  \
4254         pwd.h                   \
4255         resolv.h                \
4256         sgtty.h                 \
4257         shadow.h                \
4258         stddef.h                \
4259         string.h                \
4260         strings.h               \
4261         sysexits.h              \
4262         sys/file.h              \
4263         sys/filio.h             \
4264         sys/errno.h             \
4265         sys/ioctl.h             \
4266         sys/param.h             \
4267         sys/resource.h  \
4268         sys/select.h    \
4269         sys/socket.h    \
4270         sys/syslog.h    \
4271         sys/time.h              \
4272         sys/types.h             \
4273         syslog.h                \
4274         termios.h               \
4275         unistd.h                \
4276
4277 do
4278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4280 echo "configure:4281: checking for $ac_hdr" >&5
4281 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <$ac_hdr>
4288 EOF
4289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4290 { (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4292 if test -z "$ac_err"; then
4293   rm -rf conftest*
4294   eval "ac_cv_header_$ac_safe=yes"
4295 else
4296   echo "$ac_err" >&5
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   eval "ac_cv_header_$ac_safe=no"
4301 fi
4302 rm -f conftest*
4303 fi
4304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4305   echo "$ac_t""yes" 1>&6
4306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4307   cat >> confdefs.h <<EOF
4308 #define $ac_tr_hdr 1
4309 EOF
4310  
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314 done
4315
4316
4317
4318 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4319 echo "configure:4320: checking for sigset in -lV3" >&5
4320 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4321 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   ac_save_LIBS="$LIBS"
4325 LIBS="-lV3  $LIBS"
4326 cat > conftest.$ac_ext <<EOF
4327 #line 4328 "configure"
4328 #include "confdefs.h"
4329 /* Override any gcc2 internal prototype to avoid an error.  */
4330 /* We use char because int might match the return type of a gcc2
4331     builtin and then its argument prototype would still apply.  */
4332 char sigset();
4333
4334 int main() {
4335 sigset()
4336 ; return 0; }
4337 EOF
4338 if { (eval echo configure:4339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4339   rm -rf conftest*
4340   eval "ac_cv_lib_$ac_lib_var=yes"
4341 else
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   eval "ac_cv_lib_$ac_lib_var=no"
4346 fi
4347 rm -f conftest*
4348 LIBS="$ac_save_LIBS"
4349
4350 fi
4351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4352   echo "$ac_t""yes" 1>&6
4353     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4354     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4355   cat >> confdefs.h <<EOF
4356 #define $ac_tr_lib 1
4357 EOF
4358
4359   LIBS="-lV3 $LIBS"
4360
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365
4366
4367 echo $ac_n "checking for socket""... $ac_c" 1>&6
4368 echo "configure:4369: checking for socket" >&5
4369 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
4370   echo $ac_n "(cached) $ac_c" 1>&6
4371 else
4372   cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375 /* System header to define __stub macros and hopefully few prototypes,
4376     which can conflict with char socket(); below.  */
4377 #include <assert.h>
4378 /* Override any gcc2 internal prototype to avoid an error.  */
4379 /* We use char because int might match the return type of a gcc2
4380     builtin and then its argument prototype would still apply.  */
4381 char socket();
4382
4383 int main() {
4384
4385 /* The GNU C library defines this for functions which it implements
4386     to always fail with ENOSYS.  Some functions are actually named
4387     something starting with __ and the normal name is an alias.  */
4388 #if defined (__stub_socket) || defined (__stub___socket)
4389 choke me
4390 #else
4391 socket();
4392 #endif
4393
4394 ; return 0; }
4395 EOF
4396 if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4397   rm -rf conftest*
4398   eval "ac_cv_func_socket=yes"
4399 else
4400   echo "configure: failed program was:" >&5
4401   cat conftest.$ac_ext >&5
4402   rm -rf conftest*
4403   eval "ac_cv_func_socket=no"
4404 fi
4405 rm -f conftest*
4406 fi
4407
4408 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4409   echo "$ac_t""yes" 1>&6
4410   :
4411 else
4412   echo "$ac_t""no" 1>&6
4413         
4414         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4415 echo "configure:4416: checking for main in -lsocket" >&5
4416 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4417 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4418   echo $ac_n "(cached) $ac_c" 1>&6
4419 else
4420   ac_save_LIBS="$LIBS"
4421 LIBS="-lsocket  $LIBS"
4422 cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425
4426 int main() {
4427 main()
4428 ; return 0; }
4429 EOF
4430 if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4431   rm -rf conftest*
4432   eval "ac_cv_lib_$ac_lib_var=yes"
4433 else
4434   echo "configure: failed program was:" >&5
4435   cat conftest.$ac_ext >&5
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=no"
4438 fi
4439 rm -f conftest*
4440 LIBS="$ac_save_LIBS"
4441
4442 fi
4443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4444   echo "$ac_t""yes" 1>&6
4445     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4446     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4447   cat >> confdefs.h <<EOF
4448 #define $ac_tr_lib 1
4449 EOF
4450
4451   LIBS="-lsocket $LIBS"
4452
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4458 echo "configure:4459: checking for main in -lnet" >&5
4459 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
4460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   ac_save_LIBS="$LIBS"
4464 LIBS="-lnet  $LIBS"
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468
4469 int main() {
4470 main()
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   eval "ac_cv_lib_$ac_lib_var=yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   eval "ac_cv_lib_$ac_lib_var=no"
4481 fi
4482 rm -f conftest*
4483 LIBS="$ac_save_LIBS"
4484
4485 fi
4486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4487   echo "$ac_t""yes" 1>&6
4488     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4489     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4490   cat >> confdefs.h <<EOF
4491 #define $ac_tr_lib 1
4492 EOF
4493
4494   LIBS="-lnet $LIBS"
4495
4496 else
4497   echo "$ac_t""no" 1>&6
4498 fi
4499
4500         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4501 echo "configure:4502: checking for socket in -lnet" >&5
4502 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
4503 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4504   echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506   ac_save_LIBS="$LIBS"
4507 LIBS="-lnet  $LIBS"
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 /* Override any gcc2 internal prototype to avoid an error.  */
4512 /* We use char because int might match the return type of a gcc2
4513     builtin and then its argument prototype would still apply.  */
4514 char socket();
4515
4516 int main() {
4517 socket()
4518 ; return 0; }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4521   rm -rf conftest*
4522   eval "ac_cv_lib_$ac_lib_var=yes"
4523 else
4524   echo "configure: failed program was:" >&5
4525   cat conftest.$ac_ext >&5
4526   rm -rf conftest*
4527   eval "ac_cv_lib_$ac_lib_var=no"
4528 fi
4529 rm -f conftest*
4530 LIBS="$ac_save_LIBS"
4531
4532 fi
4533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4536     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4537   cat >> confdefs.h <<EOF
4538 #define $ac_tr_lib 1
4539 EOF
4540
4541   LIBS="-lnet $LIBS"
4542
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546
4547         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4548 echo "configure:4549: checking for main in -lnsl_s" >&5
4549 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
4550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   ac_save_LIBS="$LIBS"
4554 LIBS="-lnsl_s  $LIBS"
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558
4559 int main() {
4560 main()
4561 ; return 0; }
4562 EOF
4563 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4564   rm -rf conftest*
4565   eval "ac_cv_lib_$ac_lib_var=yes"
4566 else
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_lib_$ac_lib_var=no"
4571 fi
4572 rm -f conftest*
4573 LIBS="$ac_save_LIBS"
4574
4575 fi
4576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4579     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_lib 1
4582 EOF
4583
4584   LIBS="-lnsl_s $LIBS"
4585
4586 else
4587   echo "$ac_t""no" 1>&6
4588 fi
4589
4590         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4591 echo "configure:4592: checking for main in -lnsl" >&5
4592 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   ac_save_LIBS="$LIBS"
4597 LIBS="-lnsl  $LIBS"
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601
4602 int main() {
4603 main()
4604 ; return 0; }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4607   rm -rf conftest*
4608   eval "ac_cv_lib_$ac_lib_var=yes"
4609 else
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   eval "ac_cv_lib_$ac_lib_var=no"
4614 fi
4615 rm -f conftest*
4616 LIBS="$ac_save_LIBS"
4617
4618 fi
4619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4620   echo "$ac_t""yes" 1>&6
4621     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4622     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4623   cat >> confdefs.h <<EOF
4624 #define $ac_tr_lib 1
4625 EOF
4626
4627   LIBS="-lnsl $LIBS"
4628
4629 else
4630   echo "$ac_t""no" 1>&6
4631 fi
4632
4633         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4634 echo "configure:4635: checking for socket in -linet" >&5
4635 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
4636 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4637   echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639   ac_save_LIBS="$LIBS"
4640 LIBS="-linet  $LIBS"
4641 cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644 /* Override any gcc2 internal prototype to avoid an error.  */
4645 /* We use char because int might match the return type of a gcc2
4646     builtin and then its argument prototype would still apply.  */
4647 char socket();
4648
4649 int main() {
4650 socket()
4651 ; return 0; }
4652 EOF
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4654   rm -rf conftest*
4655   eval "ac_cv_lib_$ac_lib_var=yes"
4656 else
4657   echo "configure: failed program was:" >&5
4658   cat conftest.$ac_ext >&5
4659   rm -rf conftest*
4660   eval "ac_cv_lib_$ac_lib_var=no"
4661 fi
4662 rm -f conftest*
4663 LIBS="$ac_save_LIBS"
4664
4665 fi
4666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4667   echo "$ac_t""yes" 1>&6
4668     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4669     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4670   cat >> confdefs.h <<EOF
4671 #define $ac_tr_lib 1
4672 EOF
4673
4674   LIBS="-linet $LIBS"
4675
4676 else
4677   echo "$ac_t""no" 1>&6
4678 fi
4679
4680         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4681 echo "configure:4682: checking for main in -lgen" >&5
4682 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
4683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4684   echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686   ac_save_LIBS="$LIBS"
4687 LIBS="-lgen  $LIBS"
4688 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691
4692 int main() {
4693 main()
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=yes"
4699 else
4700   echo "configure: failed program was:" >&5
4701   cat conftest.$ac_ext >&5
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=no"
4704 fi
4705 rm -f conftest*
4706 LIBS="$ac_save_LIBS"
4707
4708 fi
4709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4712     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4713   cat >> confdefs.h <<EOF
4714 #define $ac_tr_lib 1
4715 EOF
4716
4717   LIBS="-lgen $LIBS"
4718
4719 else
4720   echo "$ac_t""no" 1>&6
4721 fi
4722
4723
4724 fi
4725
4726
4727 echo $ac_n "checking for select""... $ac_c" 1>&6
4728 echo "configure:4729: checking for select" >&5
4729 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735 /* System header to define __stub macros and hopefully few prototypes,
4736     which can conflict with char select(); below.  */
4737 #include <assert.h>
4738 /* Override any gcc2 internal prototype to avoid an error.  */
4739 /* We use char because int might match the return type of a gcc2
4740     builtin and then its argument prototype would still apply.  */
4741 char select();
4742
4743 int main() {
4744
4745 /* The GNU C library defines this for functions which it implements
4746     to always fail with ENOSYS.  Some functions are actually named
4747     something starting with __ and the normal name is an alias.  */
4748 #if defined (__stub_select) || defined (__stub___select)
4749 choke me
4750 #else
4751 select();
4752 #endif
4753
4754 ; return 0; }
4755 EOF
4756 if { (eval echo configure:4757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4757   rm -rf conftest*
4758   eval "ac_cv_func_select=yes"
4759 else
4760   echo "configure: failed program was:" >&5
4761   cat conftest.$ac_ext >&5
4762   rm -rf conftest*
4763   eval "ac_cv_func_select=no"
4764 fi
4765 rm -f conftest*
4766 fi
4767
4768 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4769   echo "$ac_t""yes" 1>&6
4770   :
4771 else
4772   echo "$ac_t""no" 1>&6
4773 { echo "configure: error: select() required." 1>&2; exit 1; }
4774 fi
4775
4776
4777 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4778 echo "configure:4779: checking types of arguments for select()" >&5
4779  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4786   echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4789      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4790       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4791        cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 #ifdef HAVE_SYS_TYPES_H
4795 #include <sys/types.h>
4796 #endif
4797 #ifdef HAVE_SYS_TIME_H
4798 #include <sys/time.h>
4799 #endif
4800 #ifdef HAVE_SYS_SELECT_H
4801 #include <sys/select.h>
4802 #endif
4803 #ifdef HAVE_SYS_SOCKET_H
4804 #include <sys/socket.h>
4805 #endif
4806 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);
4807 int main() {
4808
4809 ; return 0; }
4810 EOF
4811 if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4812   rm -rf conftest*
4813           ac_not_found=no ; break 3
4814 else
4815   echo "configure: failed program was:" >&5
4816   cat conftest.$ac_ext >&5
4817   rm -rf conftest*
4818   ac_not_found=yes
4819 fi
4820 rm -f conftest*
4821       done
4822      done
4823     done
4824    
4825 fi
4826   
4827 fi
4828  
4829 fi
4830  if test "$ac_not_found" = yes; then
4831   ac_cv_func_select_arg1=int 
4832   ac_cv_func_select_arg234='int *' 
4833   ac_cv_func_select_arg5='struct timeval *'
4834  fi
4835  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4836  cat >> confdefs.h <<EOF
4837 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4838 EOF
4839
4840  cat >> confdefs.h <<EOF
4841 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4842 EOF
4843
4844  cat >> confdefs.h <<EOF
4845 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4846 EOF
4847
4848
4849
4850
4851 for ac_hdr in regex.h 
4852 do
4853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4855 echo "configure:4856: checking for $ac_hdr" >&5
4856 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 #include <$ac_hdr>
4863 EOF
4864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4865 { (eval echo configure:4866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4867 if test -z "$ac_err"; then
4868   rm -rf conftest*
4869   eval "ac_cv_header_$ac_safe=yes"
4870 else
4871   echo "$ac_err" >&5
4872   echo "configure: failed program was:" >&5
4873   cat conftest.$ac_ext >&5
4874   rm -rf conftest*
4875   eval "ac_cv_header_$ac_safe=no"
4876 fi
4877 rm -f conftest*
4878 fi
4879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4880   echo "$ac_t""yes" 1>&6
4881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4882   cat >> confdefs.h <<EOF
4883 #define $ac_tr_hdr 1
4884 EOF
4885  
4886 else
4887   echo "$ac_t""no" 1>&6
4888 fi
4889 done
4890
4891 if test "$ac_cv_header_regex_h" != yes ; then
4892         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4893 fi
4894 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4895 echo "configure:4896: checking for regfree" >&5
4896 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
4897   echo $ac_n "(cached) $ac_c" 1>&6
4898 else
4899   cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4902 /* System header to define __stub macros and hopefully few prototypes,
4903     which can conflict with char regfree(); below.  */
4904 #include <assert.h>
4905 /* Override any gcc2 internal prototype to avoid an error.  */
4906 /* We use char because int might match the return type of a gcc2
4907     builtin and then its argument prototype would still apply.  */
4908 char regfree();
4909
4910 int main() {
4911
4912 /* The GNU C library defines this for functions which it implements
4913     to always fail with ENOSYS.  Some functions are actually named
4914     something starting with __ and the normal name is an alias.  */
4915 #if defined (__stub_regfree) || defined (__stub___regfree)
4916 choke me
4917 #else
4918 regfree();
4919 #endif
4920
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   eval "ac_cv_func_regfree=yes"
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   eval "ac_cv_func_regfree=no"
4931 fi
4932 rm -f conftest*
4933 fi
4934
4935 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4936   echo "$ac_t""yes" 1>&6
4937   :
4938 else
4939   echo "$ac_t""no" 1>&6
4940 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4941 fi
4942
4943
4944
4945 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4946 echo "configure:4947: checking for compatible POSIX regex" >&5
4947 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
4948   echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950   
4951         if test "$cross_compiling" = yes; then
4952   ol_cv_c_posix_regex=cross
4953 else
4954   cat > conftest.$ac_ext <<EOF
4955 #line 4956 "configure"
4956 #include "confdefs.h"
4957
4958 #include <sys/types.h>
4959 #include <regex.h>
4960 static char *pattern, *string;
4961 main()
4962 {
4963         int rc;
4964         regex_t re;
4965
4966         pattern = "^A";
4967
4968         if(regcomp(&re, pattern, 0)) {
4969                 return -1;
4970         }
4971         
4972         string = "ALL MATCH";
4973         
4974         rc = regexec(&re, string, 0, (void*)0, 0);
4975
4976         regfree(&re);
4977
4978         return rc;
4979 }
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4982 then
4983   ol_cv_c_posix_regex=yes
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -fr conftest*
4988   ol_cv_c_posix_regex=no
4989 fi
4990 rm -fr conftest*
4991 fi
4992
4993 fi
4994
4995 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4996
4997 if test "$ol_cv_c_posix_regex" = no ; then
4998         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4999 fi
5000
5001 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5002 echo "configure:5003: checking for res_search" >&5
5003 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   cat > conftest.$ac_ext <<EOF
5007 #line 5008 "configure"
5008 #include "confdefs.h"
5009 /* System header to define __stub macros and hopefully few prototypes,
5010     which can conflict with char res_search(); below.  */
5011 #include <assert.h>
5012 /* Override any gcc2 internal prototype to avoid an error.  */
5013 /* We use char because int might match the return type of a gcc2
5014     builtin and then its argument prototype would still apply.  */
5015 char res_search();
5016
5017 int main() {
5018
5019 /* The GNU C library defines this for functions which it implements
5020     to always fail with ENOSYS.  Some functions are actually named
5021     something starting with __ and the normal name is an alias.  */
5022 #if defined (__stub_res_search) || defined (__stub___res_search)
5023 choke me
5024 #else
5025 res_search();
5026 #endif
5027
5028 ; return 0; }
5029 EOF
5030 if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5031   rm -rf conftest*
5032   eval "ac_cv_func_res_search=yes"
5033 else
5034   echo "configure: failed program was:" >&5
5035   cat conftest.$ac_ext >&5
5036   rm -rf conftest*
5037   eval "ac_cv_func_res_search=no"
5038 fi
5039 rm -f conftest*
5040 fi
5041
5042 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5043   echo "$ac_t""yes" 1>&6
5044   :
5045 else
5046   echo "$ac_t""no" 1>&6
5047 fi
5048
5049 if test $ac_cv_func_res_search = no ; then 
5050         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5051 echo "configure:5052: checking for res_search in -lbind" >&5
5052 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
5053 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5054   echo $ac_n "(cached) $ac_c" 1>&6
5055 else
5056   ac_save_LIBS="$LIBS"
5057 LIBS="-lbind  $LIBS"
5058 cat > conftest.$ac_ext <<EOF
5059 #line 5060 "configure"
5060 #include "confdefs.h"
5061 /* Override any gcc2 internal prototype to avoid an error.  */
5062 /* We use char because int might match the return type of a gcc2
5063     builtin and then its argument prototype would still apply.  */
5064 char res_search();
5065
5066 int main() {
5067 res_search()
5068 ; return 0; }
5069 EOF
5070 if { (eval echo configure:5071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5071   rm -rf conftest*
5072   eval "ac_cv_lib_$ac_lib_var=yes"
5073 else
5074   echo "configure: failed program was:" >&5
5075   cat conftest.$ac_ext >&5
5076   rm -rf conftest*
5077   eval "ac_cv_lib_$ac_lib_var=no"
5078 fi
5079 rm -f conftest*
5080 LIBS="$ac_save_LIBS"
5081
5082 fi
5083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5084   echo "$ac_t""yes" 1>&6
5085     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5086     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5087   cat >> confdefs.h <<EOF
5088 #define $ac_tr_lib 1
5089 EOF
5090
5091   LIBS="-lbind $LIBS"
5092
5093 else
5094   echo "$ac_t""no" 1>&6
5095 fi
5096
5097         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5098 fi
5099
5100 if test $ac_cv_func_res_search = no ; then 
5101         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5102 echo "configure:5103: checking for __res_search in -lbind" >&5
5103 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'`
5104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5105   echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107   ac_save_LIBS="$LIBS"
5108 LIBS="-lbind  $LIBS"
5109 cat > conftest.$ac_ext <<EOF
5110 #line 5111 "configure"
5111 #include "confdefs.h"
5112 /* Override any gcc2 internal prototype to avoid an error.  */
5113 /* We use char because int might match the return type of a gcc2
5114     builtin and then its argument prototype would still apply.  */
5115 char __res_search();
5116
5117 int main() {
5118 __res_search()
5119 ; return 0; }
5120 EOF
5121 if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5122   rm -rf conftest*
5123   eval "ac_cv_lib_$ac_lib_var=yes"
5124 else
5125   echo "configure: failed program was:" >&5
5126   cat conftest.$ac_ext >&5
5127   rm -rf conftest*
5128   eval "ac_cv_lib_$ac_lib_var=no"
5129 fi
5130 rm -f conftest*
5131 LIBS="$ac_save_LIBS"
5132
5133 fi
5134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5135   echo "$ac_t""yes" 1>&6
5136     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5138   cat >> confdefs.h <<EOF
5139 #define $ac_tr_lib 1
5140 EOF
5141
5142   LIBS="-lbind $LIBS"
5143
5144 else
5145   echo "$ac_t""no" 1>&6
5146 fi
5147
5148         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5149 fi
5150
5151 if test $ac_cv_func_res_search = no ; then 
5152         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5153 echo "configure:5154: checking for res_search in -lresolv" >&5
5154 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5155 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   ac_save_LIBS="$LIBS"
5159 LIBS="-lresolv  $LIBS"
5160 cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 /* Override any gcc2 internal prototype to avoid an error.  */
5164 /* We use char because int might match the return type of a gcc2
5165     builtin and then its argument prototype would still apply.  */
5166 char res_search();
5167
5168 int main() {
5169 res_search()
5170 ; return 0; }
5171 EOF
5172 if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5173   rm -rf conftest*
5174   eval "ac_cv_lib_$ac_lib_var=yes"
5175 else
5176   echo "configure: failed program was:" >&5
5177   cat conftest.$ac_ext >&5
5178   rm -rf conftest*
5179   eval "ac_cv_lib_$ac_lib_var=no"
5180 fi
5181 rm -f conftest*
5182 LIBS="$ac_save_LIBS"
5183
5184 fi
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5186   echo "$ac_t""yes" 1>&6
5187     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5189   cat >> confdefs.h <<EOF
5190 #define $ac_tr_lib 1
5191 EOF
5192
5193   LIBS="-lresolv $LIBS"
5194
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198
5199         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5200 fi
5201
5202 if test "$ac_cv_func_res_search" = yes ; then
5203         cat >> confdefs.h <<\EOF
5204 #define HAVE_RES_SEARCH 1
5205 EOF
5206
5207 elif test $ol_enable_dns = yes ; then
5208         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5209 elif test $ol_enable_dns != no ; then
5210         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5211 fi
5212
5213
5214 ol_link_isode=no
5215 if test $ol_enable_ldapd != no ; then
5216         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5217
5218                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5219 echo "configure:5220: checking for main in -lxtpp" >&5
5220 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
5221 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   ac_save_LIBS="$LIBS"
5225 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5226 cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229
5230 int main() {
5231 main()
5232 ; return 0; }
5233 EOF
5234 if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5235   rm -rf conftest*
5236   eval "ac_cv_lib_$ac_lib_var=yes"
5237 else
5238   echo "configure: failed program was:" >&5
5239   cat conftest.$ac_ext >&5
5240   rm -rf conftest*
5241   eval "ac_cv_lib_$ac_lib_var=no"
5242 fi
5243 rm -f conftest*
5244 LIBS="$ac_save_LIBS"
5245
5246 fi
5247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5248   echo "$ac_t""yes" 1>&6
5249   
5250                 ol_link_isode=yes
5251                 cat >> confdefs.h <<\EOF
5252 #define HAVE_XTPP 1
5253 EOF
5254
5255                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5256                 
5257 else
5258   echo "$ac_t""no" 1>&6
5259 :
5260 fi
5261
5262         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5263 echo "configure:5264: checking for main in -ldsap" >&5
5264 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
5265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268   ac_save_LIBS="$LIBS"
5269 LIBS="-ldsap -lisode $LIBS"
5270 cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273
5274 int main() {
5275 main()
5276 ; return 0; }
5277 EOF
5278 if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5279   rm -rf conftest*
5280   eval "ac_cv_lib_$ac_lib_var=yes"
5281 else
5282   echo "configure: failed program was:" >&5
5283   cat conftest.$ac_ext >&5
5284   rm -rf conftest*
5285   eval "ac_cv_lib_$ac_lib_var=no"
5286 fi
5287 rm -f conftest*
5288 LIBS="$ac_save_LIBS"
5289
5290 fi
5291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5292   echo "$ac_t""yes" 1>&6
5293   
5294                 ol_link_isode=yes
5295                 cat >> confdefs.h <<\EOF
5296 #define HAVE_DSAP 1
5297 EOF
5298
5299                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5300                 
5301 else
5302   echo "$ac_t""no" 1>&6
5303 :
5304 fi
5305
5306         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5307 echo "configure:5308: checking for main in -lisode" >&5
5308 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
5309 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5310   echo $ac_n "(cached) $ac_c" 1>&6
5311 else
5312   ac_save_LIBS="$LIBS"
5313 LIBS="-lisode  $LIBS"
5314 cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5317
5318 int main() {
5319 main()
5320 ; return 0; }
5321 EOF
5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5323   rm -rf conftest*
5324   eval "ac_cv_lib_$ac_lib_var=yes"
5325 else
5326   echo "configure: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328   rm -rf conftest*
5329   eval "ac_cv_lib_$ac_lib_var=no"
5330 fi
5331 rm -f conftest*
5332 LIBS="$ac_save_LIBS"
5333
5334 fi
5335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5336   echo "$ac_t""yes" 1>&6
5337   
5338                 ol_link_isode=yes
5339                 cat >> confdefs.h <<\EOF
5340 #define HAVE_ISODE 1
5341 EOF
5342
5343                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5344                 
5345 else
5346   echo "$ac_t""no" 1>&6
5347 :
5348 fi
5349
5350 fi
5351
5352 if test $ol_link_isode != no; then
5353         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5354 echo "configure:5355: checking for main in -lpp" >&5
5355 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
5356 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5357   echo $ac_n "(cached) $ac_c" 1>&6
5358 else
5359   ac_save_LIBS="$LIBS"
5360 LIBS="-lpp  $LIBS"
5361 cat > conftest.$ac_ext <<EOF
5362 #line 5363 "configure"
5363 #include "confdefs.h"
5364
5365 int main() {
5366 main()
5367 ; return 0; }
5368 EOF
5369 if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5370   rm -rf conftest*
5371   eval "ac_cv_lib_$ac_lib_var=yes"
5372 else
5373   echo "configure: failed program was:" >&5
5374   cat conftest.$ac_ext >&5
5375   rm -rf conftest*
5376   eval "ac_cv_lib_$ac_lib_var=no"
5377 fi
5378 rm -f conftest*
5379 LIBS="$ac_save_LIBS"
5380
5381 fi
5382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5383   echo "$ac_t""yes" 1>&6
5384   
5385                 cat >> confdefs.h <<\EOF
5386 #define HAVE_PP 1
5387 EOF
5388
5389                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5390                 
5391 else
5392   echo "$ac_t""no" 1>&6
5393 :
5394 fi
5395
5396
5397         # Extract the first word of "pepsy", so it can be a program name with args.
5398 set dummy pepsy; ac_word=$2
5399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5400 echo "configure:5401: checking for $ac_word" >&5
5401 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
5402   echo $ac_n "(cached) $ac_c" 1>&6
5403 else
5404   case "$PEPSY" in
5405   /*)
5406   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5407   ;;
5408   ?:/*)                  
5409   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5410   ;;
5411   *)
5412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5413   ac_dummy="$PATH"
5414   for ac_dir in $ac_dummy; do 
5415     test -z "$ac_dir" && ac_dir=.
5416     if test -f $ac_dir/$ac_word; then
5417       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5418       break
5419     fi
5420   done
5421   IFS="$ac_save_ifs"
5422   ;;
5423 esac
5424 fi
5425 PEPSY="$ac_cv_path_PEPSY"
5426 if test -n "$PEPSY"; then
5427   echo "$ac_t""$PEPSY" 1>&6
5428 else
5429   echo "$ac_t""no" 1>&6
5430 fi
5431
5432 fi
5433
5434 if test $ol_enable_quipu != no ; then
5435         for ac_hdr in quipu/commonarg.h
5436 do
5437 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5438 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5439 echo "configure:5440: checking for $ac_hdr" >&5
5440 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5441   echo $ac_n "(cached) $ac_c" 1>&6
5442 else
5443   cat > conftest.$ac_ext <<EOF
5444 #line 5445 "configure"
5445 #include "confdefs.h"
5446 #include <$ac_hdr>
5447 EOF
5448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5449 { (eval echo configure:5450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5451 if test -z "$ac_err"; then
5452   rm -rf conftest*
5453   eval "ac_cv_header_$ac_safe=yes"
5454 else
5455   echo "$ac_err" >&5
5456   echo "configure: failed program was:" >&5
5457   cat conftest.$ac_ext >&5
5458   rm -rf conftest*
5459   eval "ac_cv_header_$ac_safe=no"
5460 fi
5461 rm -f conftest*
5462 fi
5463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5466   cat >> confdefs.h <<EOF
5467 #define $ac_tr_hdr 1
5468 EOF
5469  
5470 else
5471   echo "$ac_t""no" 1>&6
5472 fi
5473 done
5474
5475
5476         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5477                 BUILD_QUIPU=yes
5478         elif test $ol_enable_quipu = auto ; then
5479                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5480         else
5481                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5482         fi
5483 fi
5484
5485 ol_link_kerberos=no
5486
5487 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5488         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5489 do
5490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5492 echo "configure:5493: checking for $ac_hdr" >&5
5493 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5494   echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496   cat > conftest.$ac_ext <<EOF
5497 #line 5498 "configure"
5498 #include "confdefs.h"
5499 #include <$ac_hdr>
5500 EOF
5501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5502 { (eval echo configure:5503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5504 if test -z "$ac_err"; then
5505   rm -rf conftest*
5506   eval "ac_cv_header_$ac_safe=yes"
5507 else
5508   echo "$ac_err" >&5
5509   echo "configure: failed program was:" >&5
5510   cat conftest.$ac_ext >&5
5511   rm -rf conftest*
5512   eval "ac_cv_header_$ac_safe=no"
5513 fi
5514 rm -f conftest*
5515 fi
5516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5517   echo "$ac_t""yes" 1>&6
5518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5519   cat >> confdefs.h <<EOF
5520 #define $ac_tr_hdr 1
5521 EOF
5522  
5523 else
5524   echo "$ac_t""no" 1>&6
5525 fi
5526 done
5527
5528
5529         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5530                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5531 echo "configure:5532: checking for main in -lkrb4" >&5
5532 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
5533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5534   echo $ac_n "(cached) $ac_c" 1>&6
5535 else
5536   ac_save_LIBS="$LIBS"
5537 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5538 cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541
5542 int main() {
5543 main()
5544 ; return 0; }
5545 EOF
5546 if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5547   rm -rf conftest*
5548   eval "ac_cv_lib_$ac_lib_var=yes"
5549 else
5550   echo "configure: failed program was:" >&5
5551   cat conftest.$ac_ext >&5
5552   rm -rf conftest*
5553   eval "ac_cv_lib_$ac_lib_var=no"
5554 fi
5555 rm -f conftest*
5556 LIBS="$ac_save_LIBS"
5557
5558 fi
5559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5560   echo "$ac_t""yes" 1>&6
5561   have_k5=yes
5562 else
5563   echo "$ac_t""no" 1>&6
5564 have_k5=no
5565 fi
5566
5567
5568                 if test $have_k5 = yes ; then
5569                         ol_with_kerberos=found
5570                         ol_link_kerberos=yes
5571
5572                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5573
5574                         LIBS="$KRB_LIBS $LIBS"
5575
5576                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5577 echo "configure:5578: checking for des_debug in Kerberos libraries" >&5
5578 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
5579   echo $ac_n "(cached) $ac_c" 1>&6
5580 else
5581   
5582                                                                 save_LIBS="$LIBS"
5583                                 LIBS="$KRB_LIBS $LIBS"
5584                                 cat > conftest.$ac_ext <<EOF
5585 #line 5586 "configure"
5586 #include "confdefs.h"
5587
5588 #include <kerberosIV/krb.h>
5589 #include <kerberosIV/des.h>
5590 extern int des_debug;
5591
5592 int main() {
5593
5594 des_debug = 1;
5595
5596 ; return 0; }
5597 EOF
5598 if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5599   rm -rf conftest*
5600   ol_cv_var_des_debug=yes
5601 else
5602   echo "configure: failed program was:" >&5
5603   cat conftest.$ac_ext >&5
5604   rm -rf conftest*
5605   ol_cv_var_des_debug=no
5606 fi
5607 rm -f conftest*
5608                                                                 LIBS="$save_LIBS"
5609                         
5610 fi
5611
5612 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5613
5614                         if test $ol_cv_var_des_debug = yes ; then
5615                                 cat >> confdefs.h <<\EOF
5616 #define HAVE_DES_DEBUG 1
5617 EOF
5618
5619                         fi
5620
5621                         LIBS="$save_LIBS"
5622                 fi
5623         fi
5624 fi
5625
5626 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5627         for ac_hdr in krb.h des.h
5628 do
5629 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5630 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5631 echo "configure:5632: checking for $ac_hdr" >&5
5632 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5633   echo $ac_n "(cached) $ac_c" 1>&6
5634 else
5635   cat > conftest.$ac_ext <<EOF
5636 #line 5637 "configure"
5637 #include "confdefs.h"
5638 #include <$ac_hdr>
5639 EOF
5640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5641 { (eval echo configure:5642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5643 if test -z "$ac_err"; then
5644   rm -rf conftest*
5645   eval "ac_cv_header_$ac_safe=yes"
5646 else
5647   echo "$ac_err" >&5
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650   rm -rf conftest*
5651   eval "ac_cv_header_$ac_safe=no"
5652 fi
5653 rm -f conftest*
5654 fi
5655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5656   echo "$ac_t""yes" 1>&6
5657     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5658   cat >> confdefs.h <<EOF
5659 #define $ac_tr_hdr 1
5660 EOF
5661  
5662 else
5663   echo "$ac_t""no" 1>&6
5664 fi
5665 done
5666
5667
5668         if test $ac_cv_header_krb_h = yes ; then
5669                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5670 echo "configure:5671: checking for main in -lkrb" >&5
5671 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
5672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   ac_save_LIBS="$LIBS"
5676 LIBS="-lkrb -ldes $LIBS"
5677 cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680
5681 int main() {
5682 main()
5683 ; return 0; }
5684 EOF
5685 if { (eval echo configure:5686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5686   rm -rf conftest*
5687   eval "ac_cv_lib_$ac_lib_var=yes"
5688 else
5689   echo "configure: failed program was:" >&5
5690   cat conftest.$ac_ext >&5
5691   rm -rf conftest*
5692   eval "ac_cv_lib_$ac_lib_var=no"
5693 fi
5694 rm -f conftest*
5695 LIBS="$ac_save_LIBS"
5696
5697 fi
5698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5699   echo "$ac_t""yes" 1>&6
5700   have_k4=yes
5701 else
5702   echo "$ac_t""no" 1>&6
5703 have_k4=no
5704 fi
5705
5706
5707                 if test $have_k4 = yes ; then
5708                         ol_with_kerberos=found
5709                         ol_link_kerberos=yes
5710
5711                         KRB_LIBS="-lkrb -ldes"
5712                 fi
5713         fi
5714 fi
5715
5716 if test $ol_link_kerberos = yes ; then
5717         cat >> confdefs.h <<\EOF
5718 #define HAVE_KERBEROS 1
5719 EOF
5720
5721 fi
5722
5723 ol_link_tls=no
5724 if test $ol_with_tls != no ; then
5725         
5726         for ac_hdr in openssl/ssl.h ssl.h
5727 do
5728 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5729 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5730 echo "configure:5731: checking for $ac_hdr" >&5
5731 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5732   echo $ac_n "(cached) $ac_c" 1>&6
5733 else
5734   cat > conftest.$ac_ext <<EOF
5735 #line 5736 "configure"
5736 #include "confdefs.h"
5737 #include <$ac_hdr>
5738 EOF
5739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5740 { (eval echo configure:5741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5742 if test -z "$ac_err"; then
5743   rm -rf conftest*
5744   eval "ac_cv_header_$ac_safe=yes"
5745 else
5746   echo "$ac_err" >&5
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   eval "ac_cv_header_$ac_safe=no"
5751 fi
5752 rm -f conftest*
5753 fi
5754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5755   echo "$ac_t""yes" 1>&6
5756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5757   cat >> confdefs.h <<EOF
5758 #define $ac_tr_hdr 1
5759 EOF
5760  
5761 else
5762   echo "$ac_t""no" 1>&6
5763 fi
5764 done
5765
5766         
5767         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5768                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5769 echo "configure:5770: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5770 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
5771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5772   echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774   ac_save_LIBS="$LIBS"
5775 LIBS="-lssl -lcrypto $LIBS"
5776 cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 /* Override any gcc2 internal prototype to avoid an error.  */
5780 /* We use char because int might match the return type of a gcc2
5781     builtin and then its argument prototype would still apply.  */
5782 char SSLeay_add_ssl_algorithms();
5783
5784 int main() {
5785 SSLeay_add_ssl_algorithms()
5786 ; return 0; }
5787 EOF
5788 if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5789   rm -rf conftest*
5790   eval "ac_cv_lib_$ac_lib_var=yes"
5791 else
5792   echo "configure: failed program was:" >&5
5793   cat conftest.$ac_ext >&5
5794   rm -rf conftest*
5795   eval "ac_cv_lib_$ac_lib_var=no"
5796 fi
5797 rm -f conftest*
5798 LIBS="$ac_save_LIBS"
5799
5800 fi
5801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5802   echo "$ac_t""yes" 1>&6
5803   have_ssleay=yes
5804                         need_rsaref=no
5805 else
5806   echo "$ac_t""no" 1>&6
5807 have_ssleay=no
5808 fi
5809
5810                         
5811                 if test $have_ssleay = no ; then
5812                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5813 echo "configure:5814: checking for SSL_library_init in -lssl" >&5
5814 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
5815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5816   echo $ac_n "(cached) $ac_c" 1>&6
5817 else
5818   ac_save_LIBS="$LIBS"
5819 LIBS="-lssl -lcrypto $LIBS"
5820 cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823 /* Override any gcc2 internal prototype to avoid an error.  */
5824 /* We use char because int might match the return type of a gcc2
5825     builtin and then its argument prototype would still apply.  */
5826 char SSL_library_init();
5827
5828 int main() {
5829 SSL_library_init()
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5833   rm -rf conftest*
5834   eval "ac_cv_lib_$ac_lib_var=yes"
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_lib_$ac_lib_var=no"
5840 fi
5841 rm -f conftest*
5842 LIBS="$ac_save_LIBS"
5843
5844 fi
5845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5846   echo "$ac_t""yes" 1>&6
5847   have_ssleay=yes
5848                                 need_rsaref=no
5849 else
5850   echo "$ac_t""no" 1>&6
5851 have_ssleay=no
5852 fi
5853
5854                 fi
5855
5856                 if test $have_ssleay = no ; then
5857                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5858 echo "configure:5859: checking for ssl3_accept in -lssl" >&5
5859 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
5860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5861   echo $ac_n "(cached) $ac_c" 1>&6
5862 else
5863   ac_save_LIBS="$LIBS"
5864 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5865 cat > conftest.$ac_ext <<EOF
5866 #line 5867 "configure"
5867 #include "confdefs.h"
5868 /* Override any gcc2 internal prototype to avoid an error.  */
5869 /* We use char because int might match the return type of a gcc2
5870     builtin and then its argument prototype would still apply.  */
5871 char ssl3_accept();
5872
5873 int main() {
5874 ssl3_accept()
5875 ; return 0; }
5876 EOF
5877 if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5878   rm -rf conftest*
5879   eval "ac_cv_lib_$ac_lib_var=yes"
5880 else
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   eval "ac_cv_lib_$ac_lib_var=no"
5885 fi
5886 rm -f conftest*
5887 LIBS="$ac_save_LIBS"
5888
5889 fi
5890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892   have_ssleay=yes
5893                                 need_rsaref=yes
5894 else
5895   echo "$ac_t""no" 1>&6
5896 have_ssleay=no
5897 fi
5898
5899                 fi
5900
5901                 if test $have_ssleay = yes ; then
5902                         ol_with_tls=found
5903                         ol_link_tls=yes
5904
5905                         cat >> confdefs.h <<\EOF
5906 #define HAVE_SSLEAY 1
5907 EOF
5908
5909
5910                         if test $need_rsaref = yes; then
5911                                 cat >> confdefs.h <<\EOF
5912 #define HAVE_RSAREF 1
5913 EOF
5914
5915
5916                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
5917                         else
5918                                 TLS_LIBS="-lssl -lcrypto"
5919                         fi
5920                 fi
5921         fi
5922 fi
5923
5924 if test $ol_link_tls = yes ; then
5925         cat >> confdefs.h <<\EOF
5926 #define HAVE_TLS 1
5927 EOF
5928
5929 fi      
5930
5931 for ac_func in \
5932         ctime_r                 \
5933         gethostbyname_r gethostbyaddr_r \
5934
5935 do
5936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5937 echo "configure:5938: checking for $ac_func" >&5
5938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* System header to define __stub macros and hopefully few prototypes,
5945     which can conflict with char $ac_func(); below.  */
5946 #include <assert.h>
5947 /* Override any gcc2 internal prototype to avoid an error.  */
5948 /* We use char because int might match the return type of a gcc2
5949     builtin and then its argument prototype would still apply.  */
5950 char $ac_func();
5951
5952 int main() {
5953
5954 /* The GNU C library defines this for functions which it implements
5955     to always fail with ENOSYS.  Some functions are actually named
5956     something starting with __ and the normal name is an alias.  */
5957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5958 choke me
5959 #else
5960 $ac_func();
5961 #endif
5962
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_func_$ac_func=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_func_$ac_func=no"
5973 fi
5974 rm -f conftest*
5975 fi
5976
5977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5978   echo "$ac_t""yes" 1>&6
5979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5980   cat >> confdefs.h <<EOF
5981 #define $ac_tr_func 1
5982 EOF
5983  
5984 else
5985   echo "$ac_t""no" 1>&6
5986 fi
5987 done
5988
5989
5990 if test "$ac_cv_func_ctime_r" = no ; then
5991         ol_cv_func_ctime_r_nargs=0
5992 else
5993         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5994 echo "configure:5995: checking number of arguments of ctime_r" >&5
5995 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
5996   echo $ac_n "(cached) $ac_c" 1>&6
5997 else
5998   cat > conftest.$ac_ext <<EOF
5999 #line 6000 "configure"
6000 #include "confdefs.h"
6001 #include <time.h>
6002 int main() {
6003 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6004 ; return 0; }
6005 EOF
6006 if { (eval echo configure:6007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6007   rm -rf conftest*
6008   ol_cv_func_ctime_r_nargs=3
6009 else
6010   echo "configure: failed program was:" >&5
6011   cat conftest.$ac_ext >&5
6012   rm -rf conftest*
6013   cat > conftest.$ac_ext <<EOF
6014 #line 6015 "configure"
6015 #include "confdefs.h"
6016 #include <time.h>
6017 int main() {
6018 time_t ti; char *buffer; ctime_r(&ti,buffer);
6019 ; return 0; }
6020 EOF
6021 if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6022   rm -rf conftest*
6023   ol_cv_func_ctime_r_nargs=2
6024 else
6025   echo "configure: failed program was:" >&5
6026   cat conftest.$ac_ext >&5
6027   rm -rf conftest*
6028   ol_cv_func_ctime_r_nargs=0
6029 fi
6030 rm -f conftest*
6031 fi
6032 rm -f conftest*
6033 fi
6034
6035 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6036   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6037     cat >> confdefs.h <<EOF
6038 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6039 EOF
6040
6041   fi
6042
6043 fi
6044
6045 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6046         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6047 echo "configure:6048: checking number of arguments of gethostbyname_r" >&5
6048 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
6049   echo $ac_n "(cached) $ac_c" 1>&6
6050 else
6051   cat > conftest.$ac_ext <<EOF
6052 #line 6053 "configure"
6053 #include "confdefs.h"
6054 #include <sys/types.h>
6055 #include <sys/socket.h>
6056 #include <netinet/in.h>
6057 #include <netdb.h>
6058 #define BUFSIZE (sizeof(struct hostent)+10)
6059 int main() {
6060 struct hostent hent; char buffer[BUFSIZE];
6061                 int bufsize=BUFSIZE;int h_errno;
6062                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6063                         buffer, bufsize, &h_errno);
6064 ; return 0; }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6067   rm -rf conftest*
6068   ol_cv_func_gethostbyname_r_nargs=5
6069 else
6070   echo "configure: failed program was:" >&5
6071   cat conftest.$ac_ext >&5
6072   rm -rf conftest*
6073   cat > conftest.$ac_ext <<EOF
6074 #line 6075 "configure"
6075 #include "confdefs.h"
6076 #include <sys/types.h>
6077 #include <sys/socket.h>
6078 #include <netinet/in.h>
6079 #include <netdb.h>
6080 #define BUFSIZE (sizeof(struct hostent)+10)
6081 int main() {
6082 struct hostent hent;struct hostent *rhent;
6083                         char buffer[BUFSIZE];
6084                         int bufsize=BUFSIZE;int h_errno;
6085                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6086                                 &rhent, &h_errno);
6087 ; return 0; }
6088 EOF
6089 if { (eval echo configure:6090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6090   rm -rf conftest*
6091   ol_cv_func_gethostbyname_r_nargs=6
6092 else
6093   echo "configure: failed program was:" >&5
6094   cat conftest.$ac_ext >&5
6095   rm -rf conftest*
6096   ol_cv_func_gethostbyname_r_nargs=0
6097 fi
6098 rm -f conftest*
6099 fi
6100 rm -f conftest*
6101 fi
6102
6103 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6104   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6105         cat >> confdefs.h <<EOF
6106 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6107 EOF
6108
6109   fi
6110
6111 else
6112         ol_cv_func_gethostbyname_r_nargs=0
6113 fi
6114  
6115 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6116         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6117 echo "configure:6118: checking number of arguments of gethostbyaddr_r" >&5
6118 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
6119   echo $ac_n "(cached) $ac_c" 1>&6
6120 else
6121   cat > conftest.$ac_ext <<EOF
6122 #line 6123 "configure"
6123 #include "confdefs.h"
6124 #include <sys/types.h>
6125 #include <sys/socket.h>
6126 #include <netinet/in.h>
6127 #include <netdb.h>
6128 #define BUFSIZE (sizeof(struct hostent)+10)
6129 int main() {
6130 struct hostent hent; char buffer[BUFSIZE]; 
6131             struct in_addr add;
6132             size_t alen=sizeof(struct in_addr);
6133             int bufsize=BUFSIZE;int h_errno;
6134                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6135                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6136 ; return 0; }
6137 EOF
6138 if { (eval echo configure:6139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6139   rm -rf conftest*
6140   ol_cv_func_gethostbyaddr_r_nargs=7
6141 else
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   cat > conftest.$ac_ext <<EOF
6146 #line 6147 "configure"
6147 #include "confdefs.h"
6148 #include <sys/types.h>
6149 #include <sys/socket.h>
6150 #include <netinet/in.h>
6151 #include <netdb.h>
6152 #define BUFSIZE (sizeof(struct hostent)+10)
6153 int main() {
6154 struct hostent hent;
6155                         struct hostent *rhent; char buffer[BUFSIZE]; 
6156                         struct in_addr add;
6157                         size_t alen=sizeof(struct in_addr);
6158                         int bufsize=BUFSIZE;int h_errno;
6159                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6160                                 alen, AF_INET, &hent, buffer, bufsize, 
6161                                 &rhent, &h_errno);
6162 ; return 0; }
6163 EOF
6164 if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6165   rm -rf conftest*
6166   ol_cv_func_gethostbyaddr_r_nargs=8
6167 else
6168   echo "configure: failed program was:" >&5
6169   cat conftest.$ac_ext >&5
6170   rm -rf conftest*
6171   ol_cv_func_gethostbyaddr_r_nargs=0
6172 fi
6173 rm -f conftest*
6174 fi
6175 rm -f conftest*
6176 fi
6177
6178 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6179   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6180     cat >> confdefs.h <<EOF
6181 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6182 EOF
6183
6184   fi
6185
6186 else
6187         ol_cv_func_gethostbyaddr_r_nargs=0
6188 fi
6189
6190 if test "$ac_cv_func_ctime_r" = yes \
6191         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6192         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6193         -a "$ac_cv_func_gethostbyname_r" = yes \
6194         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6195         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6196         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6197         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6198         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6199         ; then
6200  
6201         cat >> confdefs.h <<\EOF
6202 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6203 EOF
6204
6205 fi
6206
6207 ol_link_threads=no
6208 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6209         -o $ol_with_threads = posix ; then
6210
6211         for ac_hdr in pthread.h
6212 do
6213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6215 echo "configure:6216: checking for $ac_hdr" >&5
6216 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 #include <$ac_hdr>
6223 EOF
6224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6225 { (eval echo configure:6226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6227 if test -z "$ac_err"; then
6228   rm -rf conftest*
6229   eval "ac_cv_header_$ac_safe=yes"
6230 else
6231   echo "$ac_err" >&5
6232   echo "configure: failed program was:" >&5
6233   cat conftest.$ac_ext >&5
6234   rm -rf conftest*
6235   eval "ac_cv_header_$ac_safe=no"
6236 fi
6237 rm -f conftest*
6238 fi
6239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6242   cat >> confdefs.h <<EOF
6243 #define $ac_tr_hdr 1
6244 EOF
6245  
6246 else
6247   echo "$ac_t""no" 1>&6
6248 fi
6249 done
6250
6251
6252         if test $ac_cv_header_pthread_h = yes ; then
6253                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6254 echo "configure:6255: checking POSIX thread version" >&5
6255 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
6256   echo $ac_n "(cached) $ac_c" 1>&6
6257 else
6258   
6259         cat > conftest.$ac_ext <<EOF
6260 #line 6261 "configure"
6261 #include "confdefs.h"
6262
6263 #               include <pthread.h>
6264                 /* this check could be improved */
6265 #               ifdef PTHREAD_ONCE_INIT
6266                         pthread_version_final;
6267 #               endif
6268         
6269 EOF
6270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6271   egrep "pthread_version_final" >/dev/null 2>&1; then
6272   rm -rf conftest*
6273   ol_pthread_final=yes
6274 else
6275   rm -rf conftest*
6276   ol_pthread_final=no
6277 fi
6278 rm -f conftest*
6279
6280
6281         cat > conftest.$ac_ext <<EOF
6282 #line 6283 "configure"
6283 #include "confdefs.h"
6284
6285 #               include <pthread.h>
6286                 /* this check could be improved */
6287 #               ifdef pthread_once_init
6288                         pthread_version_draft4;
6289 #               endif
6290         
6291 EOF
6292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6293   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6294   rm -rf conftest*
6295   ol_pthread_draft4=yes
6296 else
6297   rm -rf conftest*
6298   ol_pthread_draft4=no
6299 fi
6300 rm -f conftest*
6301
6302
6303         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6304                 ol_cv_pthread_version=final
6305         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6306                 ol_cv_pthread_version=draft4
6307         else
6308                 ol_cv_pthread_version=unknown
6309         fi
6310
6311 fi
6312
6313 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6314
6315
6316                 if test $ol_cv_pthread_version = final ; then
6317                         cat >> confdefs.h <<\EOF
6318 #define HAVE_PTHREADS_FINAL 1
6319 EOF
6320
6321                 elif test $ol_cv_pthread_version = draft4 ; then
6322                         cat >> confdefs.h <<\EOF
6323 #define HAVE_PTHREADS_D4 1
6324 EOF
6325
6326                 else
6327                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6328                 fi
6329
6330                 # consider threads found
6331                 ol_with_threads=found
6332
6333                 
6334         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6335 echo "configure:6336: checking for LinuxThreads pthread.h" >&5
6336 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6337   echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339   cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 #include <pthread.h>
6343 EOF
6344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6345   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6346   rm -rf conftest*
6347   ol_cv_header_linux_threads=yes
6348 else
6349   rm -rf conftest*
6350   ol_cv_header_linux_threads=no
6351 fi
6352 rm -f conftest*
6353
6354                 
6355 fi
6356
6357 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6358         if test $ol_cv_header_linux_threads = yes; then
6359                 cat >> confdefs.h <<\EOF
6360 #define HAVE_LINUX_THREADS 1
6361 EOF
6362
6363         fi
6364
6365                 
6366         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6367 echo "configure:6368: checking for GNU Pth pthread.h" >&5
6368 if eval "test \"`echo '$''{'ol_cv_header_gnu_pth_pthread_h'+set}'`\" = set"; then
6369   echo $ac_n "(cached) $ac_c" 1>&6
6370 else
6371   cat > conftest.$ac_ext <<EOF
6372 #line 6373 "configure"
6373 #include "confdefs.h"
6374 #include <pthread.h>
6375 #ifdef _POSIX_THREAD_IS_GNU_PTH
6376         __gnu_pth__;
6377 #endif
6378
6379 EOF
6380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6381   egrep "__gnu_pth__" >/dev/null 2>&1; then
6382   rm -rf conftest*
6383   ol_cv_header_gnu_pth_pthread_h=yes
6384 else
6385   rm -rf conftest*
6386   ol_cv_header_gnu_pth_pthread_h=no
6387 fi
6388 rm -f conftest*
6389
6390                 
6391 fi
6392
6393 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6394
6395
6396                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6397                         for ac_hdr in sched.h
6398 do
6399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6401 echo "configure:6402: checking for $ac_hdr" >&5
6402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6403   echo $ac_n "(cached) $ac_c" 1>&6
6404 else
6405   cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408 #include <$ac_hdr>
6409 EOF
6410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6411 { (eval echo configure:6412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6413 if test -z "$ac_err"; then
6414   rm -rf conftest*
6415   eval "ac_cv_header_$ac_safe=yes"
6416 else
6417   echo "$ac_err" >&5
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   eval "ac_cv_header_$ac_safe=no"
6422 fi
6423 rm -f conftest*
6424 fi
6425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6426   echo "$ac_t""yes" 1>&6
6427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6428   cat >> confdefs.h <<EOF
6429 #define $ac_tr_hdr 1
6430 EOF
6431  
6432 else
6433   echo "$ac_t""no" 1>&6
6434 fi
6435 done
6436
6437                 fi
6438
6439                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6440                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6441 echo "configure:6442: checking for pthread_create in default libraries" >&5
6442 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
6443   echo $ac_n "(cached) $ac_c" 1>&6
6444 else
6445   
6446                 if test "$cross_compiling" = yes; then
6447   cat > conftest.$ac_ext <<EOF
6448 #line 6449 "configure"
6449 #include "confdefs.h"
6450 /* pthread test headers */
6451 #include <pthread.h>
6452 #ifndef NULL
6453 #define NULL (void*)0
6454 #endif
6455
6456 static void *task(p)
6457         void *p;
6458 {
6459         return (void *) (p == NULL);
6460 }
6461
6462 int main() {
6463
6464         /* pthread test function */
6465         pthread_t t;
6466         int status;
6467
6468         /* make sure pthread_create() isn't just a stub */
6469 #if HAVE_PTHREADS_D4
6470         status = pthread_create(&t, pthread_attr_default, task, NULL);
6471 #else
6472         status = pthread_create(&t, NULL, task, NULL);
6473 #endif
6474
6475         if( status ) exit( status );
6476
6477         /* make sure pthread_detach() isn't just a stub */
6478 #if HAVE_PTHREADS_D4
6479         status = pthread_detach( &t );
6480 #else
6481         status = pthread_detach( t );
6482 #endif
6483
6484 #ifdef HAVE_LINUX_THREADS
6485         pthread_kill_other_threads_np();
6486 #endif
6487
6488         exit( status );
6489
6490 ; return 0; }
6491 EOF
6492 if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6493   rm -rf conftest*
6494   ol_cv_pthread_create=yes
6495 else
6496   echo "configure: failed program was:" >&5
6497   cat conftest.$ac_ext >&5
6498   rm -rf conftest*
6499   ol_cv_pthread_create=no
6500 fi
6501 rm -f conftest*
6502 else
6503   cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 /* pthread test headers */
6507 #include <pthread.h>
6508 #ifndef NULL
6509 #define NULL (void*)0
6510 #endif
6511
6512 static void *task(p)
6513         void *p;
6514 {
6515         return (void *) (p == NULL);
6516 }
6517
6518
6519 int main(argc, argv)
6520         int argc;
6521         char **argv;
6522 {
6523
6524         /* pthread test function */
6525         pthread_t t;
6526         int status;
6527
6528         /* make sure pthread_create() isn't just a stub */
6529 #if HAVE_PTHREADS_D4
6530         status = pthread_create(&t, pthread_attr_default, task, NULL);
6531 #else
6532         status = pthread_create(&t, NULL, task, NULL);
6533 #endif
6534
6535         if( status ) exit( status );
6536
6537         /* make sure pthread_detach() isn't just a stub */
6538 #if HAVE_PTHREADS_D4
6539         status = pthread_detach( &t );
6540 #else
6541         status = pthread_detach( t );
6542 #endif
6543
6544 #ifdef HAVE_LINUX_THREADS
6545         pthread_kill_other_threads_np();
6546 #endif
6547
6548         exit( status );
6549
6550 }
6551
6552 EOF
6553 if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6554 then
6555   ol_cv_pthread_create=yes
6556 else
6557   echo "configure: failed program was:" >&5
6558   cat conftest.$ac_ext >&5
6559   rm -fr conftest*
6560   ol_cv_pthread_create=no
6561 fi
6562 rm -fr conftest*
6563 fi
6564
6565 fi
6566
6567 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6568
6569                 if test $ol_cv_pthread_create != no ; then
6570                         ol_link_threads=posix
6571                         ol_link_pthreads=""
6572                 fi
6573                 
6574                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6575 if test "$ol_link_threads" = no ; then
6576         # try -kthread
6577         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6578 echo "configure:6579: checking for pthread link with -kthread" >&5
6579 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   
6583                 # save the flags
6584                 ol_LIBS="$LIBS"
6585                 LIBS="-kthread $LIBS"
6586
6587                 if test "$cross_compiling" = yes; then
6588   cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 /* pthread test headers */
6592 #include <pthread.h>
6593 #ifndef NULL
6594 #define NULL (void*)0
6595 #endif
6596
6597 static void *task(p)
6598         void *p;
6599 {
6600         return (void *) (p == NULL);
6601 }
6602
6603 int main() {
6604
6605         /* pthread test function */
6606         pthread_t t;
6607         int status;
6608
6609         /* make sure pthread_create() isn't just a stub */
6610 #if HAVE_PTHREADS_D4
6611         status = pthread_create(&t, pthread_attr_default, task, NULL);
6612 #else
6613         status = pthread_create(&t, NULL, task, NULL);
6614 #endif
6615
6616         if( status ) exit( status );
6617
6618         /* make sure pthread_detach() isn't just a stub */
6619 #if HAVE_PTHREADS_D4
6620         status = pthread_detach( &t );
6621 #else
6622         status = pthread_detach( t );
6623 #endif
6624
6625 #ifdef HAVE_LINUX_THREADS
6626         pthread_kill_other_threads_np();
6627 #endif
6628
6629         exit( status );
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   ol_cv_pthread_kthread=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   ol_cv_pthread_kthread=no
6641 fi
6642 rm -f conftest*
6643 else
6644   cat > conftest.$ac_ext <<EOF
6645 #line 6646 "configure"
6646 #include "confdefs.h"
6647 /* pthread test headers */
6648 #include <pthread.h>
6649 #ifndef NULL
6650 #define NULL (void*)0
6651 #endif
6652
6653 static void *task(p)
6654         void *p;
6655 {
6656         return (void *) (p == NULL);
6657 }
6658
6659
6660 int main(argc, argv)
6661         int argc;
6662         char **argv;
6663 {
6664
6665         /* pthread test function */
6666         pthread_t t;
6667         int status;
6668
6669         /* make sure pthread_create() isn't just a stub */
6670 #if HAVE_PTHREADS_D4
6671         status = pthread_create(&t, pthread_attr_default, task, NULL);
6672 #else
6673         status = pthread_create(&t, NULL, task, NULL);
6674 #endif
6675
6676         if( status ) exit( status );
6677
6678         /* make sure pthread_detach() isn't just a stub */
6679 #if HAVE_PTHREADS_D4
6680         status = pthread_detach( &t );
6681 #else
6682         status = pthread_detach( t );
6683 #endif
6684
6685 #ifdef HAVE_LINUX_THREADS
6686         pthread_kill_other_threads_np();
6687 #endif
6688
6689         exit( status );
6690
6691 }
6692
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6695 then
6696   ol_cv_pthread_kthread=yes
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -fr conftest*
6701   ol_cv_pthread_kthread=no
6702 fi
6703 rm -fr conftest*
6704 fi
6705
6706
6707                 # restore the LIBS
6708                 LIBS="$ol_LIBS"
6709         
6710 fi
6711
6712 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6713
6714         if test $ol_cv_pthread_kthread = yes ; then
6715                 ol_link_pthreads="-kthread"
6716                 ol_link_threads=posix
6717         fi
6718 fi
6719
6720                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6721 if test "$ol_link_threads" = no ; then
6722         # try -pthread
6723         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6724 echo "configure:6725: checking for pthread link with -pthread" >&5
6725 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   
6729                 # save the flags
6730                 ol_LIBS="$LIBS"
6731                 LIBS="-pthread $LIBS"
6732
6733                 if test "$cross_compiling" = yes; then
6734   cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* pthread test headers */
6738 #include <pthread.h>
6739 #ifndef NULL
6740 #define NULL (void*)0
6741 #endif
6742
6743 static void *task(p)
6744         void *p;
6745 {
6746         return (void *) (p == NULL);
6747 }
6748
6749 int main() {
6750
6751         /* pthread test function */
6752         pthread_t t;
6753         int status;
6754
6755         /* make sure pthread_create() isn't just a stub */
6756 #if HAVE_PTHREADS_D4
6757         status = pthread_create(&t, pthread_attr_default, task, NULL);
6758 #else
6759         status = pthread_create(&t, NULL, task, NULL);
6760 #endif
6761
6762         if( status ) exit( status );
6763
6764         /* make sure pthread_detach() isn't just a stub */
6765 #if HAVE_PTHREADS_D4
6766         status = pthread_detach( &t );
6767 #else
6768         status = pthread_detach( t );
6769 #endif
6770
6771 #ifdef HAVE_LINUX_THREADS
6772         pthread_kill_other_threads_np();
6773 #endif
6774
6775         exit( status );
6776
6777 ; return 0; }
6778 EOF
6779 if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6780   rm -rf conftest*
6781   ol_cv_pthread_pthread=yes
6782 else
6783   echo "configure: failed program was:" >&5
6784   cat conftest.$ac_ext >&5
6785   rm -rf conftest*
6786   ol_cv_pthread_pthread=no
6787 fi
6788 rm -f conftest*
6789 else
6790   cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793 /* pthread test headers */
6794 #include <pthread.h>
6795 #ifndef NULL
6796 #define NULL (void*)0
6797 #endif
6798
6799 static void *task(p)
6800         void *p;
6801 {
6802         return (void *) (p == NULL);
6803 }
6804
6805
6806 int main(argc, argv)
6807         int argc;
6808         char **argv;
6809 {
6810
6811         /* pthread test function */
6812         pthread_t t;
6813         int status;
6814
6815         /* make sure pthread_create() isn't just a stub */
6816 #if HAVE_PTHREADS_D4
6817         status = pthread_create(&t, pthread_attr_default, task, NULL);
6818 #else
6819         status = pthread_create(&t, NULL, task, NULL);
6820 #endif
6821
6822         if( status ) exit( status );
6823
6824         /* make sure pthread_detach() isn't just a stub */
6825 #if HAVE_PTHREADS_D4
6826         status = pthread_detach( &t );
6827 #else
6828         status = pthread_detach( t );
6829 #endif
6830
6831 #ifdef HAVE_LINUX_THREADS
6832         pthread_kill_other_threads_np();
6833 #endif
6834
6835         exit( status );
6836
6837 }
6838
6839 EOF
6840 if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6841 then
6842   ol_cv_pthread_pthread=yes
6843 else
6844   echo "configure: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   rm -fr conftest*
6847   ol_cv_pthread_pthread=no
6848 fi
6849 rm -fr conftest*
6850 fi
6851
6852
6853                 # restore the LIBS
6854                 LIBS="$ol_LIBS"
6855         
6856 fi
6857
6858 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6859
6860         if test $ol_cv_pthread_pthread = yes ; then
6861                 ol_link_pthreads="-pthread"
6862                 ol_link_threads=posix
6863         fi
6864 fi
6865
6866                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6867 if test "$ol_link_threads" = no ; then
6868         # try -pthreads
6869         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6870 echo "configure:6871: checking for pthread link with -pthreads" >&5
6871 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
6872   echo $ac_n "(cached) $ac_c" 1>&6
6873 else
6874   
6875                 # save the flags
6876                 ol_LIBS="$LIBS"
6877                 LIBS="-pthreads $LIBS"
6878
6879                 if test "$cross_compiling" = yes; then
6880   cat > conftest.$ac_ext <<EOF
6881 #line 6882 "configure"
6882 #include "confdefs.h"
6883 /* pthread test headers */
6884 #include <pthread.h>
6885 #ifndef NULL
6886 #define NULL (void*)0
6887 #endif
6888
6889 static void *task(p)
6890         void *p;
6891 {
6892         return (void *) (p == NULL);
6893 }
6894
6895 int main() {
6896
6897         /* pthread test function */
6898         pthread_t t;
6899         int status;
6900
6901         /* make sure pthread_create() isn't just a stub */
6902 #if HAVE_PTHREADS_D4
6903         status = pthread_create(&t, pthread_attr_default, task, NULL);
6904 #else
6905         status = pthread_create(&t, NULL, task, NULL);
6906 #endif
6907
6908         if( status ) exit( status );
6909
6910         /* make sure pthread_detach() isn't just a stub */
6911 #if HAVE_PTHREADS_D4
6912         status = pthread_detach( &t );
6913 #else
6914         status = pthread_detach( t );
6915 #endif
6916
6917 #ifdef HAVE_LINUX_THREADS
6918         pthread_kill_other_threads_np();
6919 #endif
6920
6921         exit( status );
6922
6923 ; return 0; }
6924 EOF
6925 if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6926   rm -rf conftest*
6927   ol_cv_pthread_pthreads=yes
6928 else
6929   echo "configure: failed program was:" >&5
6930   cat conftest.$ac_ext >&5
6931   rm -rf conftest*
6932   ol_cv_pthread_pthreads=no
6933 fi
6934 rm -f conftest*
6935 else
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939 /* pthread test headers */
6940 #include <pthread.h>
6941 #ifndef NULL
6942 #define NULL (void*)0
6943 #endif
6944
6945 static void *task(p)
6946         void *p;
6947 {
6948         return (void *) (p == NULL);
6949 }
6950
6951
6952 int main(argc, argv)
6953         int argc;
6954         char **argv;
6955 {
6956
6957         /* pthread test function */
6958         pthread_t t;
6959         int status;
6960
6961         /* make sure pthread_create() isn't just a stub */
6962 #if HAVE_PTHREADS_D4
6963         status = pthread_create(&t, pthread_attr_default, task, NULL);
6964 #else
6965         status = pthread_create(&t, NULL, task, NULL);
6966 #endif
6967
6968         if( status ) exit( status );
6969
6970         /* make sure pthread_detach() isn't just a stub */
6971 #if HAVE_PTHREADS_D4
6972         status = pthread_detach( &t );
6973 #else
6974         status = pthread_detach( t );
6975 #endif
6976
6977 #ifdef HAVE_LINUX_THREADS
6978         pthread_kill_other_threads_np();
6979 #endif
6980
6981         exit( status );
6982
6983 }
6984
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6987 then
6988   ol_cv_pthread_pthreads=yes
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -fr conftest*
6993   ol_cv_pthread_pthreads=no
6994 fi
6995 rm -fr conftest*
6996 fi
6997
6998
6999                 # restore the LIBS
7000                 LIBS="$ol_LIBS"
7001         
7002 fi
7003
7004 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7005
7006         if test $ol_cv_pthread_pthreads = yes ; then
7007                 ol_link_pthreads="-pthreads"
7008                 ol_link_threads=posix
7009         fi
7010 fi
7011
7012                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7013 if test "$ol_link_threads" = no ; then
7014         # try -mthreads
7015         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7016 echo "configure:7017: checking for pthread link with -mthreads" >&5
7017 if eval "test \"`echo '$''{'ol_cv_pthread_mthreads'+set}'`\" = set"; then
7018   echo $ac_n "(cached) $ac_c" 1>&6
7019 else
7020   
7021                 # save the flags
7022                 ol_LIBS="$LIBS"
7023                 LIBS="-mthreads $LIBS"
7024
7025                 if test "$cross_compiling" = yes; then
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 /* pthread test headers */
7030 #include <pthread.h>
7031 #ifndef NULL
7032 #define NULL (void*)0
7033 #endif
7034
7035 static void *task(p)
7036         void *p;
7037 {
7038         return (void *) (p == NULL);
7039 }
7040
7041 int main() {
7042
7043         /* pthread test function */
7044         pthread_t t;
7045         int status;
7046
7047         /* make sure pthread_create() isn't just a stub */
7048 #if HAVE_PTHREADS_D4
7049         status = pthread_create(&t, pthread_attr_default, task, NULL);
7050 #else
7051         status = pthread_create(&t, NULL, task, NULL);
7052 #endif
7053
7054         if( status ) exit( status );
7055
7056         /* make sure pthread_detach() isn't just a stub */
7057 #if HAVE_PTHREADS_D4
7058         status = pthread_detach( &t );
7059 #else
7060         status = pthread_detach( t );
7061 #endif
7062
7063 #ifdef HAVE_LINUX_THREADS
7064         pthread_kill_other_threads_np();
7065 #endif
7066
7067         exit( status );
7068
7069 ; return 0; }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7072   rm -rf conftest*
7073   ol_cv_pthread_mthreads=yes
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -rf conftest*
7078   ol_cv_pthread_mthreads=no
7079 fi
7080 rm -f conftest*
7081 else
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 /* pthread test headers */
7086 #include <pthread.h>
7087 #ifndef NULL
7088 #define NULL (void*)0
7089 #endif
7090
7091 static void *task(p)
7092         void *p;
7093 {
7094         return (void *) (p == NULL);
7095 }
7096
7097
7098 int main(argc, argv)
7099         int argc;
7100         char **argv;
7101 {
7102
7103         /* pthread test function */
7104         pthread_t t;
7105         int status;
7106
7107         /* make sure pthread_create() isn't just a stub */
7108 #if HAVE_PTHREADS_D4
7109         status = pthread_create(&t, pthread_attr_default, task, NULL);
7110 #else
7111         status = pthread_create(&t, NULL, task, NULL);
7112 #endif
7113
7114         if( status ) exit( status );
7115
7116         /* make sure pthread_detach() isn't just a stub */
7117 #if HAVE_PTHREADS_D4
7118         status = pthread_detach( &t );
7119 #else
7120         status = pthread_detach( t );
7121 #endif
7122
7123 #ifdef HAVE_LINUX_THREADS
7124         pthread_kill_other_threads_np();
7125 #endif
7126
7127         exit( status );
7128
7129 }
7130
7131 EOF
7132 if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7133 then
7134   ol_cv_pthread_mthreads=yes
7135 else
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138   rm -fr conftest*
7139   ol_cv_pthread_mthreads=no
7140 fi
7141 rm -fr conftest*
7142 fi
7143
7144
7145                 # restore the LIBS
7146                 LIBS="$ol_LIBS"
7147         
7148 fi
7149
7150 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7151
7152         if test $ol_cv_pthread_mthreads = yes ; then
7153                 ol_link_pthreads="-mthreads"
7154                 ol_link_threads=posix
7155         fi
7156 fi
7157
7158                 # Pthread try link: -thread (ol_cv_pthread_thread)
7159 if test "$ol_link_threads" = no ; then
7160         # try -thread
7161         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7162 echo "configure:7163: checking for pthread link with -thread" >&5
7163 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
7164   echo $ac_n "(cached) $ac_c" 1>&6
7165 else
7166   
7167                 # save the flags
7168                 ol_LIBS="$LIBS"
7169                 LIBS="-thread $LIBS"
7170
7171                 if test "$cross_compiling" = yes; then
7172   cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7175 /* pthread test headers */
7176 #include <pthread.h>
7177 #ifndef NULL
7178 #define NULL (void*)0
7179 #endif
7180
7181 static void *task(p)
7182         void *p;
7183 {
7184         return (void *) (p == NULL);
7185 }
7186
7187 int main() {
7188
7189         /* pthread test function */
7190         pthread_t t;
7191         int status;
7192
7193         /* make sure pthread_create() isn't just a stub */
7194 #if HAVE_PTHREADS_D4
7195         status = pthread_create(&t, pthread_attr_default, task, NULL);
7196 #else
7197         status = pthread_create(&t, NULL, task, NULL);
7198 #endif
7199
7200         if( status ) exit( status );
7201
7202         /* make sure pthread_detach() isn't just a stub */
7203 #if HAVE_PTHREADS_D4
7204         status = pthread_detach( &t );
7205 #else
7206         status = pthread_detach( t );
7207 #endif
7208
7209 #ifdef HAVE_LINUX_THREADS
7210         pthread_kill_other_threads_np();
7211 #endif
7212
7213         exit( status );
7214
7215 ; return 0; }
7216 EOF
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7218   rm -rf conftest*
7219   ol_cv_pthread_thread=yes
7220 else
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   ol_cv_pthread_thread=no
7225 fi
7226 rm -f conftest*
7227 else
7228   cat > conftest.$ac_ext <<EOF
7229 #line 7230 "configure"
7230 #include "confdefs.h"
7231 /* pthread test headers */
7232 #include <pthread.h>
7233 #ifndef NULL
7234 #define NULL (void*)0
7235 #endif
7236
7237 static void *task(p)
7238         void *p;
7239 {
7240         return (void *) (p == NULL);
7241 }
7242
7243
7244 int main(argc, argv)
7245         int argc;
7246         char **argv;
7247 {
7248
7249         /* pthread test function */
7250         pthread_t t;
7251         int status;
7252
7253         /* make sure pthread_create() isn't just a stub */
7254 #if HAVE_PTHREADS_D4
7255         status = pthread_create(&t, pthread_attr_default, task, NULL);
7256 #else
7257         status = pthread_create(&t, NULL, task, NULL);
7258 #endif
7259
7260         if( status ) exit( status );
7261
7262         /* make sure pthread_detach() isn't just a stub */
7263 #if HAVE_PTHREADS_D4
7264         status = pthread_detach( &t );
7265 #else
7266         status = pthread_detach( t );
7267 #endif
7268
7269 #ifdef HAVE_LINUX_THREADS
7270         pthread_kill_other_threads_np();
7271 #endif
7272
7273         exit( status );
7274
7275 }
7276
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7279 then
7280   ol_cv_pthread_thread=yes
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -fr conftest*
7285   ol_cv_pthread_thread=no
7286 fi
7287 rm -fr conftest*
7288 fi
7289
7290
7291                 # restore the LIBS
7292                 LIBS="$ol_LIBS"
7293         
7294 fi
7295
7296 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7297
7298         if test $ol_cv_pthread_thread = yes ; then
7299                 ol_link_pthreads="-thread"
7300                 ol_link_threads=posix
7301         fi
7302 fi
7303
7304
7305                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7306 if test "$ol_link_threads" = no ; then
7307         # try -lpthread -lmach -lexc -lc_r
7308         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7309 echo "configure:7310: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7310 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
7311   echo $ac_n "(cached) $ac_c" 1>&6
7312 else
7313   
7314                 # save the flags
7315                 ol_LIBS="$LIBS"
7316                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7317
7318                 if test "$cross_compiling" = yes; then
7319   cat > conftest.$ac_ext <<EOF
7320 #line 7321 "configure"
7321 #include "confdefs.h"
7322 /* pthread test headers */
7323 #include <pthread.h>
7324 #ifndef NULL
7325 #define NULL (void*)0
7326 #endif
7327
7328 static void *task(p)
7329         void *p;
7330 {
7331         return (void *) (p == NULL);
7332 }
7333
7334 int main() {
7335
7336         /* pthread test function */
7337         pthread_t t;
7338         int status;
7339
7340         /* make sure pthread_create() isn't just a stub */
7341 #if HAVE_PTHREADS_D4
7342         status = pthread_create(&t, pthread_attr_default, task, NULL);
7343 #else
7344         status = pthread_create(&t, NULL, task, NULL);
7345 #endif
7346
7347         if( status ) exit( status );
7348
7349         /* make sure pthread_detach() isn't just a stub */
7350 #if HAVE_PTHREADS_D4
7351         status = pthread_detach( &t );
7352 #else
7353         status = pthread_detach( t );
7354 #endif
7355
7356 #ifdef HAVE_LINUX_THREADS
7357         pthread_kill_other_threads_np();
7358 #endif
7359
7360         exit( status );
7361
7362 ; return 0; }
7363 EOF
7364 if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7365   rm -rf conftest*
7366   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7367 else
7368   echo "configure: failed program was:" >&5
7369   cat conftest.$ac_ext >&5
7370   rm -rf conftest*
7371   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7372 fi
7373 rm -f conftest*
7374 else
7375   cat > conftest.$ac_ext <<EOF
7376 #line 7377 "configure"
7377 #include "confdefs.h"
7378 /* pthread test headers */
7379 #include <pthread.h>
7380 #ifndef NULL
7381 #define NULL (void*)0
7382 #endif
7383
7384 static void *task(p)
7385         void *p;
7386 {
7387         return (void *) (p == NULL);
7388 }
7389
7390
7391 int main(argc, argv)
7392         int argc;
7393         char **argv;
7394 {
7395
7396         /* pthread test function */
7397         pthread_t t;
7398         int status;
7399
7400         /* make sure pthread_create() isn't just a stub */
7401 #if HAVE_PTHREADS_D4
7402         status = pthread_create(&t, pthread_attr_default, task, NULL);
7403 #else
7404         status = pthread_create(&t, NULL, task, NULL);
7405 #endif
7406
7407         if( status ) exit( status );
7408
7409         /* make sure pthread_detach() isn't just a stub */
7410 #if HAVE_PTHREADS_D4
7411         status = pthread_detach( &t );
7412 #else
7413         status = pthread_detach( t );
7414 #endif
7415
7416 #ifdef HAVE_LINUX_THREADS
7417         pthread_kill_other_threads_np();
7418 #endif
7419
7420         exit( status );
7421
7422 }
7423
7424 EOF
7425 if { (eval echo configure:7426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7426 then
7427   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7428 else
7429   echo "configure: failed program was:" >&5
7430   cat conftest.$ac_ext >&5
7431   rm -fr conftest*
7432   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7433 fi
7434 rm -fr conftest*
7435 fi
7436
7437
7438                 # restore the LIBS
7439                 LIBS="$ol_LIBS"
7440         
7441 fi
7442
7443 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7444
7445         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7446                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7447                 ol_link_threads=posix
7448         fi
7449 fi
7450
7451                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7452 if test "$ol_link_threads" = no ; then
7453         # try -lpthread -lmach -lexc
7454         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7455 echo "configure:7456: checking for pthread link with -lpthread -lmach -lexc" >&5
7456 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
7457   echo $ac_n "(cached) $ac_c" 1>&6
7458 else
7459   
7460                 # save the flags
7461                 ol_LIBS="$LIBS"
7462                 LIBS="-lpthread -lmach -lexc $LIBS"
7463
7464                 if test "$cross_compiling" = yes; then
7465   cat > conftest.$ac_ext <<EOF
7466 #line 7467 "configure"
7467 #include "confdefs.h"
7468 /* pthread test headers */
7469 #include <pthread.h>
7470 #ifndef NULL
7471 #define NULL (void*)0
7472 #endif
7473
7474 static void *task(p)
7475         void *p;
7476 {
7477         return (void *) (p == NULL);
7478 }
7479
7480 int main() {
7481
7482         /* pthread test function */
7483         pthread_t t;
7484         int status;
7485
7486         /* make sure pthread_create() isn't just a stub */
7487 #if HAVE_PTHREADS_D4
7488         status = pthread_create(&t, pthread_attr_default, task, NULL);
7489 #else
7490         status = pthread_create(&t, NULL, task, NULL);
7491 #endif
7492
7493         if( status ) exit( status );
7494
7495         /* make sure pthread_detach() isn't just a stub */
7496 #if HAVE_PTHREADS_D4
7497         status = pthread_detach( &t );
7498 #else
7499         status = pthread_detach( t );
7500 #endif
7501
7502 #ifdef HAVE_LINUX_THREADS
7503         pthread_kill_other_threads_np();
7504 #endif
7505
7506         exit( status );
7507
7508 ; return 0; }
7509 EOF
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7511   rm -rf conftest*
7512   ol_cv_pthread_lpthread_lmach_lexc=yes
7513 else
7514   echo "configure: failed program was:" >&5
7515   cat conftest.$ac_ext >&5
7516   rm -rf conftest*
7517   ol_cv_pthread_lpthread_lmach_lexc=no
7518 fi
7519 rm -f conftest*
7520 else
7521   cat > conftest.$ac_ext <<EOF
7522 #line 7523 "configure"
7523 #include "confdefs.h"
7524 /* pthread test headers */
7525 #include <pthread.h>
7526 #ifndef NULL
7527 #define NULL (void*)0
7528 #endif
7529
7530 static void *task(p)
7531         void *p;
7532 {
7533         return (void *) (p == NULL);
7534 }
7535
7536
7537 int main(argc, argv)
7538         int argc;
7539         char **argv;
7540 {
7541
7542         /* pthread test function */
7543         pthread_t t;
7544         int status;
7545
7546         /* make sure pthread_create() isn't just a stub */
7547 #if HAVE_PTHREADS_D4
7548         status = pthread_create(&t, pthread_attr_default, task, NULL);
7549 #else
7550         status = pthread_create(&t, NULL, task, NULL);
7551 #endif
7552
7553         if( status ) exit( status );
7554
7555         /* make sure pthread_detach() isn't just a stub */
7556 #if HAVE_PTHREADS_D4
7557         status = pthread_detach( &t );
7558 #else
7559         status = pthread_detach( t );
7560 #endif
7561
7562 #ifdef HAVE_LINUX_THREADS
7563         pthread_kill_other_threads_np();
7564 #endif
7565
7566         exit( status );
7567
7568 }
7569
7570 EOF
7571 if { (eval echo configure:7572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7572 then
7573   ol_cv_pthread_lpthread_lmach_lexc=yes
7574 else
7575   echo "configure: failed program was:" >&5
7576   cat conftest.$ac_ext >&5
7577   rm -fr conftest*
7578   ol_cv_pthread_lpthread_lmach_lexc=no
7579 fi
7580 rm -fr conftest*
7581 fi
7582
7583
7584                 # restore the LIBS
7585                 LIBS="$ol_LIBS"
7586         
7587 fi
7588
7589 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7590
7591         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7592                 ol_link_pthreads="-lpthread -lmach -lexc"
7593                 ol_link_threads=posix
7594         fi
7595 fi
7596
7597
7598                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7599 if test "$ol_link_threads" = no ; then
7600         # try -lpthread -Wl,-woff,85
7601         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7602 echo "configure:7603: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7603 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
7604   echo $ac_n "(cached) $ac_c" 1>&6
7605 else
7606   
7607                 # save the flags
7608                 ol_LIBS="$LIBS"
7609                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7610
7611                 if test "$cross_compiling" = yes; then
7612   cat > conftest.$ac_ext <<EOF
7613 #line 7614 "configure"
7614 #include "confdefs.h"
7615 /* pthread test headers */
7616 #include <pthread.h>
7617 #ifndef NULL
7618 #define NULL (void*)0
7619 #endif
7620
7621 static void *task(p)
7622         void *p;
7623 {
7624         return (void *) (p == NULL);
7625 }
7626
7627 int main() {
7628
7629         /* pthread test function */
7630         pthread_t t;
7631         int status;
7632
7633         /* make sure pthread_create() isn't just a stub */
7634 #if HAVE_PTHREADS_D4
7635         status = pthread_create(&t, pthread_attr_default, task, NULL);
7636 #else
7637         status = pthread_create(&t, NULL, task, NULL);
7638 #endif
7639
7640         if( status ) exit( status );
7641
7642         /* make sure pthread_detach() isn't just a stub */
7643 #if HAVE_PTHREADS_D4
7644         status = pthread_detach( &t );
7645 #else
7646         status = pthread_detach( t );
7647 #endif
7648
7649 #ifdef HAVE_LINUX_THREADS
7650         pthread_kill_other_threads_np();
7651 #endif
7652
7653         exit( status );
7654
7655 ; return 0; }
7656 EOF
7657 if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7658   rm -rf conftest*
7659   ol_cv_pthread_lib_lpthread_woff=yes
7660 else
7661   echo "configure: failed program was:" >&5
7662   cat conftest.$ac_ext >&5
7663   rm -rf conftest*
7664   ol_cv_pthread_lib_lpthread_woff=no
7665 fi
7666 rm -f conftest*
7667 else
7668   cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 /* pthread test headers */
7672 #include <pthread.h>
7673 #ifndef NULL
7674 #define NULL (void*)0
7675 #endif
7676
7677 static void *task(p)
7678         void *p;
7679 {
7680         return (void *) (p == NULL);
7681 }
7682
7683
7684 int main(argc, argv)
7685         int argc;
7686         char **argv;
7687 {
7688
7689         /* pthread test function */
7690         pthread_t t;
7691         int status;
7692
7693         /* make sure pthread_create() isn't just a stub */
7694 #if HAVE_PTHREADS_D4
7695         status = pthread_create(&t, pthread_attr_default, task, NULL);
7696 #else
7697         status = pthread_create(&t, NULL, task, NULL);
7698 #endif
7699
7700         if( status ) exit( status );
7701
7702         /* make sure pthread_detach() isn't just a stub */
7703 #if HAVE_PTHREADS_D4
7704         status = pthread_detach( &t );
7705 #else
7706         status = pthread_detach( t );
7707 #endif
7708
7709 #ifdef HAVE_LINUX_THREADS
7710         pthread_kill_other_threads_np();
7711 #endif
7712
7713         exit( status );
7714
7715 }
7716
7717 EOF
7718 if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7719 then
7720   ol_cv_pthread_lib_lpthread_woff=yes
7721 else
7722   echo "configure: failed program was:" >&5
7723   cat conftest.$ac_ext >&5
7724   rm -fr conftest*
7725   ol_cv_pthread_lib_lpthread_woff=no
7726 fi
7727 rm -fr conftest*
7728 fi
7729
7730
7731                 # restore the LIBS
7732                 LIBS="$ol_LIBS"
7733         
7734 fi
7735
7736 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7737
7738         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7739                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7740                 ol_link_threads=posix
7741         fi
7742 fi
7743
7744
7745                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7746 if test "$ol_link_threads" = no ; then
7747         # try -lpthread
7748         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7749 echo "configure:7750: checking for pthread link with -lpthread" >&5
7750 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
7751   echo $ac_n "(cached) $ac_c" 1>&6
7752 else
7753   
7754                 # save the flags
7755                 ol_LIBS="$LIBS"
7756                 LIBS="-lpthread $LIBS"
7757
7758                 if test "$cross_compiling" = yes; then
7759   cat > conftest.$ac_ext <<EOF
7760 #line 7761 "configure"
7761 #include "confdefs.h"
7762 /* pthread test headers */
7763 #include <pthread.h>
7764 #ifndef NULL
7765 #define NULL (void*)0
7766 #endif
7767
7768 static void *task(p)
7769         void *p;
7770 {
7771         return (void *) (p == NULL);
7772 }
7773
7774 int main() {
7775
7776         /* pthread test function */
7777         pthread_t t;
7778         int status;
7779
7780         /* make sure pthread_create() isn't just a stub */
7781 #if HAVE_PTHREADS_D4
7782         status = pthread_create(&t, pthread_attr_default, task, NULL);
7783 #else
7784         status = pthread_create(&t, NULL, task, NULL);
7785 #endif
7786
7787         if( status ) exit( status );
7788
7789         /* make sure pthread_detach() isn't just a stub */
7790 #if HAVE_PTHREADS_D4
7791         status = pthread_detach( &t );
7792 #else
7793         status = pthread_detach( t );
7794 #endif
7795
7796 #ifdef HAVE_LINUX_THREADS
7797         pthread_kill_other_threads_np();
7798 #endif
7799
7800         exit( status );
7801
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7805   rm -rf conftest*
7806   ol_cv_pthread_lpthread=yes
7807 else
7808   echo "configure: failed program was:" >&5
7809   cat conftest.$ac_ext >&5
7810   rm -rf conftest*
7811   ol_cv_pthread_lpthread=no
7812 fi
7813 rm -f conftest*
7814 else
7815   cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 /* pthread test headers */
7819 #include <pthread.h>
7820 #ifndef NULL
7821 #define NULL (void*)0
7822 #endif
7823
7824 static void *task(p)
7825         void *p;
7826 {
7827         return (void *) (p == NULL);
7828 }
7829
7830
7831 int main(argc, argv)
7832         int argc;
7833         char **argv;
7834 {
7835
7836         /* pthread test function */
7837         pthread_t t;
7838         int status;
7839
7840         /* make sure pthread_create() isn't just a stub */
7841 #if HAVE_PTHREADS_D4
7842         status = pthread_create(&t, pthread_attr_default, task, NULL);
7843 #else
7844         status = pthread_create(&t, NULL, task, NULL);
7845 #endif
7846
7847         if( status ) exit( status );
7848
7849         /* make sure pthread_detach() isn't just a stub */
7850 #if HAVE_PTHREADS_D4
7851         status = pthread_detach( &t );
7852 #else
7853         status = pthread_detach( t );
7854 #endif
7855
7856 #ifdef HAVE_LINUX_THREADS
7857         pthread_kill_other_threads_np();
7858 #endif
7859
7860         exit( status );
7861
7862 }
7863
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7866 then
7867   ol_cv_pthread_lpthread=yes
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -fr conftest*
7872   ol_cv_pthread_lpthread=no
7873 fi
7874 rm -fr conftest*
7875 fi
7876
7877
7878                 # restore the LIBS
7879                 LIBS="$ol_LIBS"
7880         
7881 fi
7882
7883 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7884
7885         if test $ol_cv_pthread_lpthread = yes ; then
7886                 ol_link_pthreads="-lpthread"
7887                 ol_link_threads=posix
7888         fi
7889 fi
7890
7891                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7892 if test "$ol_link_threads" = no ; then
7893         # try -lc_r
7894         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7895 echo "configure:7896: checking for pthread link with -lc_r" >&5
7896 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
7897   echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899   
7900                 # save the flags
7901                 ol_LIBS="$LIBS"
7902                 LIBS="-lc_r $LIBS"
7903
7904                 if test "$cross_compiling" = yes; then
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* pthread test headers */
7909 #include <pthread.h>
7910 #ifndef NULL
7911 #define NULL (void*)0
7912 #endif
7913
7914 static void *task(p)
7915         void *p;
7916 {
7917         return (void *) (p == NULL);
7918 }
7919
7920 int main() {
7921
7922         /* pthread test function */
7923         pthread_t t;
7924         int status;
7925
7926         /* make sure pthread_create() isn't just a stub */
7927 #if HAVE_PTHREADS_D4
7928         status = pthread_create(&t, pthread_attr_default, task, NULL);
7929 #else
7930         status = pthread_create(&t, NULL, task, NULL);
7931 #endif
7932
7933         if( status ) exit( status );
7934
7935         /* make sure pthread_detach() isn't just a stub */
7936 #if HAVE_PTHREADS_D4
7937         status = pthread_detach( &t );
7938 #else
7939         status = pthread_detach( t );
7940 #endif
7941
7942 #ifdef HAVE_LINUX_THREADS
7943         pthread_kill_other_threads_np();
7944 #endif
7945
7946         exit( status );
7947
7948 ; return 0; }
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7951   rm -rf conftest*
7952   ol_cv_pthread_lc_r=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   ol_cv_pthread_lc_r=no
7958 fi
7959 rm -f conftest*
7960 else
7961   cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* pthread test headers */
7965 #include <pthread.h>
7966 #ifndef NULL
7967 #define NULL (void*)0
7968 #endif
7969
7970 static void *task(p)
7971         void *p;
7972 {
7973         return (void *) (p == NULL);
7974 }
7975
7976
7977 int main(argc, argv)
7978         int argc;
7979         char **argv;
7980 {
7981
7982         /* pthread test function */
7983         pthread_t t;
7984         int status;
7985
7986         /* make sure pthread_create() isn't just a stub */
7987 #if HAVE_PTHREADS_D4
7988         status = pthread_create(&t, pthread_attr_default, task, NULL);
7989 #else
7990         status = pthread_create(&t, NULL, task, NULL);
7991 #endif
7992
7993         if( status ) exit( status );
7994
7995         /* make sure pthread_detach() isn't just a stub */
7996 #if HAVE_PTHREADS_D4
7997         status = pthread_detach( &t );
7998 #else
7999         status = pthread_detach( t );
8000 #endif
8001
8002 #ifdef HAVE_LINUX_THREADS
8003         pthread_kill_other_threads_np();
8004 #endif
8005
8006         exit( status );
8007
8008 }
8009
8010 EOF
8011 if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8012 then
8013   ol_cv_pthread_lc_r=yes
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -fr conftest*
8018   ol_cv_pthread_lc_r=no
8019 fi
8020 rm -fr conftest*
8021 fi
8022
8023
8024                 # restore the LIBS
8025                 LIBS="$ol_LIBS"
8026         
8027 fi
8028
8029 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8030
8031         if test $ol_cv_pthread_lc_r = yes ; then
8032                 ol_link_pthreads="-lc_r"
8033                 ol_link_threads=posix
8034         fi
8035 fi
8036
8037
8038                 # Pthread try link: -threads (ol_cv_pthread_threads)
8039 if test "$ol_link_threads" = no ; then
8040         # try -threads
8041         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8042 echo "configure:8043: checking for pthread link with -threads" >&5
8043 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   
8047                 # save the flags
8048                 ol_LIBS="$LIBS"
8049                 LIBS="-threads $LIBS"
8050
8051                 if test "$cross_compiling" = yes; then
8052   cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 /* pthread test headers */
8056 #include <pthread.h>
8057 #ifndef NULL
8058 #define NULL (void*)0
8059 #endif
8060
8061 static void *task(p)
8062         void *p;
8063 {
8064         return (void *) (p == NULL);
8065 }
8066
8067 int main() {
8068
8069         /* pthread test function */
8070         pthread_t t;
8071         int status;
8072
8073         /* make sure pthread_create() isn't just a stub */
8074 #if HAVE_PTHREADS_D4
8075         status = pthread_create(&t, pthread_attr_default, task, NULL);
8076 #else
8077         status = pthread_create(&t, NULL, task, NULL);
8078 #endif
8079
8080         if( status ) exit( status );
8081
8082         /* make sure pthread_detach() isn't just a stub */
8083 #if HAVE_PTHREADS_D4
8084         status = pthread_detach( &t );
8085 #else
8086         status = pthread_detach( t );
8087 #endif
8088
8089 #ifdef HAVE_LINUX_THREADS
8090         pthread_kill_other_threads_np();
8091 #endif
8092
8093         exit( status );
8094
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8098   rm -rf conftest*
8099   ol_cv_pthread_threads=yes
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103   rm -rf conftest*
8104   ol_cv_pthread_threads=no
8105 fi
8106 rm -f conftest*
8107 else
8108   cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111 /* pthread test headers */
8112 #include <pthread.h>
8113 #ifndef NULL
8114 #define NULL (void*)0
8115 #endif
8116
8117 static void *task(p)
8118         void *p;
8119 {
8120         return (void *) (p == NULL);
8121 }
8122
8123
8124 int main(argc, argv)
8125         int argc;
8126         char **argv;
8127 {
8128
8129         /* pthread test function */
8130         pthread_t t;
8131         int status;
8132
8133         /* make sure pthread_create() isn't just a stub */
8134 #if HAVE_PTHREADS_D4
8135         status = pthread_create(&t, pthread_attr_default, task, NULL);
8136 #else
8137         status = pthread_create(&t, NULL, task, NULL);
8138 #endif
8139
8140         if( status ) exit( status );
8141
8142         /* make sure pthread_detach() isn't just a stub */
8143 #if HAVE_PTHREADS_D4
8144         status = pthread_detach( &t );
8145 #else
8146         status = pthread_detach( t );
8147 #endif
8148
8149 #ifdef HAVE_LINUX_THREADS
8150         pthread_kill_other_threads_np();
8151 #endif
8152
8153         exit( status );
8154
8155 }
8156
8157 EOF
8158 if { (eval echo configure:8159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8159 then
8160   ol_cv_pthread_threads=yes
8161 else
8162   echo "configure: failed program was:" >&5
8163   cat conftest.$ac_ext >&5
8164   rm -fr conftest*
8165   ol_cv_pthread_threads=no
8166 fi
8167 rm -fr conftest*
8168 fi
8169
8170
8171                 # restore the LIBS
8172                 LIBS="$ol_LIBS"
8173         
8174 fi
8175
8176 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8177
8178         if test $ol_cv_pthread_threads = yes ; then
8179                 ol_link_pthreads="-threads"
8180                 ol_link_threads=posix
8181         fi
8182 fi
8183
8184
8185                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8186 if test "$ol_link_threads" = no ; then
8187         # try -lpthreads -lmach -lexc -lc_r
8188         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8189 echo "configure:8190: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8190 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
8191   echo $ac_n "(cached) $ac_c" 1>&6
8192 else
8193   
8194                 # save the flags
8195                 ol_LIBS="$LIBS"
8196                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8197
8198                 if test "$cross_compiling" = yes; then
8199   cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 /* pthread test headers */
8203 #include <pthread.h>
8204 #ifndef NULL
8205 #define NULL (void*)0
8206 #endif
8207
8208 static void *task(p)
8209         void *p;
8210 {
8211         return (void *) (p == NULL);
8212 }
8213
8214 int main() {
8215
8216         /* pthread test function */
8217         pthread_t t;
8218         int status;
8219
8220         /* make sure pthread_create() isn't just a stub */
8221 #if HAVE_PTHREADS_D4
8222         status = pthread_create(&t, pthread_attr_default, task, NULL);
8223 #else
8224         status = pthread_create(&t, NULL, task, NULL);
8225 #endif
8226
8227         if( status ) exit( status );
8228
8229         /* make sure pthread_detach() isn't just a stub */
8230 #if HAVE_PTHREADS_D4
8231         status = pthread_detach( &t );
8232 #else
8233         status = pthread_detach( t );
8234 #endif
8235
8236 #ifdef HAVE_LINUX_THREADS
8237         pthread_kill_other_threads_np();
8238 #endif
8239
8240         exit( status );
8241
8242 ; return 0; }
8243 EOF
8244 if { (eval echo configure:8245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8245   rm -rf conftest*
8246   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8247 else
8248   echo "configure: failed program was:" >&5
8249   cat conftest.$ac_ext >&5
8250   rm -rf conftest*
8251   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8252 fi
8253 rm -f conftest*
8254 else
8255   cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 /* pthread test headers */
8259 #include <pthread.h>
8260 #ifndef NULL
8261 #define NULL (void*)0
8262 #endif
8263
8264 static void *task(p)
8265         void *p;
8266 {
8267         return (void *) (p == NULL);
8268 }
8269
8270
8271 int main(argc, argv)
8272         int argc;
8273         char **argv;
8274 {
8275
8276         /* pthread test function */
8277         pthread_t t;
8278         int status;
8279
8280         /* make sure pthread_create() isn't just a stub */
8281 #if HAVE_PTHREADS_D4
8282         status = pthread_create(&t, pthread_attr_default, task, NULL);
8283 #else
8284         status = pthread_create(&t, NULL, task, NULL);
8285 #endif
8286
8287         if( status ) exit( status );
8288
8289         /* make sure pthread_detach() isn't just a stub */
8290 #if HAVE_PTHREADS_D4
8291         status = pthread_detach( &t );
8292 #else
8293         status = pthread_detach( t );
8294 #endif
8295
8296 #ifdef HAVE_LINUX_THREADS
8297         pthread_kill_other_threads_np();
8298 #endif
8299
8300         exit( status );
8301
8302 }
8303
8304 EOF
8305 if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8306 then
8307   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8308 else
8309   echo "configure: failed program was:" >&5
8310   cat conftest.$ac_ext >&5
8311   rm -fr conftest*
8312   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8313 fi
8314 rm -fr conftest*
8315 fi
8316
8317
8318                 # restore the LIBS
8319                 LIBS="$ol_LIBS"
8320         
8321 fi
8322
8323 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8324
8325         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8326                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8327                 ol_link_threads=posix
8328         fi
8329 fi
8330
8331                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8332 if test "$ol_link_threads" = no ; then
8333         # try -lpthreads -lmach -lexc
8334         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8335 echo "configure:8336: checking for pthread link with -lpthreads -lmach -lexc" >&5
8336 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
8337   echo $ac_n "(cached) $ac_c" 1>&6
8338 else
8339   
8340                 # save the flags
8341                 ol_LIBS="$LIBS"
8342                 LIBS="-lpthreads -lmach -lexc $LIBS"
8343
8344                 if test "$cross_compiling" = yes; then
8345   cat > conftest.$ac_ext <<EOF
8346 #line 8347 "configure"
8347 #include "confdefs.h"
8348 /* pthread test headers */
8349 #include <pthread.h>
8350 #ifndef NULL
8351 #define NULL (void*)0
8352 #endif
8353
8354 static void *task(p)
8355         void *p;
8356 {
8357         return (void *) (p == NULL);
8358 }
8359
8360 int main() {
8361
8362         /* pthread test function */
8363         pthread_t t;
8364         int status;
8365
8366         /* make sure pthread_create() isn't just a stub */
8367 #if HAVE_PTHREADS_D4
8368         status = pthread_create(&t, pthread_attr_default, task, NULL);
8369 #else
8370         status = pthread_create(&t, NULL, task, NULL);
8371 #endif
8372
8373         if( status ) exit( status );
8374
8375         /* make sure pthread_detach() isn't just a stub */
8376 #if HAVE_PTHREADS_D4
8377         status = pthread_detach( &t );
8378 #else
8379         status = pthread_detach( t );
8380 #endif
8381
8382 #ifdef HAVE_LINUX_THREADS
8383         pthread_kill_other_threads_np();
8384 #endif
8385
8386         exit( status );
8387
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8391   rm -rf conftest*
8392   ol_cv_pthread_lpthreads_lmach_lexc=yes
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   ol_cv_pthread_lpthreads_lmach_lexc=no
8398 fi
8399 rm -f conftest*
8400 else
8401   cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404 /* pthread test headers */
8405 #include <pthread.h>
8406 #ifndef NULL
8407 #define NULL (void*)0
8408 #endif
8409
8410 static void *task(p)
8411         void *p;
8412 {
8413         return (void *) (p == NULL);
8414 }
8415
8416
8417 int main(argc, argv)
8418         int argc;
8419         char **argv;
8420 {
8421
8422         /* pthread test function */
8423         pthread_t t;
8424         int status;
8425
8426         /* make sure pthread_create() isn't just a stub */
8427 #if HAVE_PTHREADS_D4
8428         status = pthread_create(&t, pthread_attr_default, task, NULL);
8429 #else
8430         status = pthread_create(&t, NULL, task, NULL);
8431 #endif
8432
8433         if( status ) exit( status );
8434
8435         /* make sure pthread_detach() isn't just a stub */
8436 #if HAVE_PTHREADS_D4
8437         status = pthread_detach( &t );
8438 #else
8439         status = pthread_detach( t );
8440 #endif
8441
8442 #ifdef HAVE_LINUX_THREADS
8443         pthread_kill_other_threads_np();
8444 #endif
8445
8446         exit( status );
8447
8448 }
8449
8450 EOF
8451 if { (eval echo configure:8452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8452 then
8453   ol_cv_pthread_lpthreads_lmach_lexc=yes
8454 else
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -fr conftest*
8458   ol_cv_pthread_lpthreads_lmach_lexc=no
8459 fi
8460 rm -fr conftest*
8461 fi
8462
8463
8464                 # restore the LIBS
8465                 LIBS="$ol_LIBS"
8466         
8467 fi
8468
8469 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8470
8471         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8472                 ol_link_pthreads="-lpthreads -lmach -lexc"
8473                 ol_link_threads=posix
8474         fi
8475 fi
8476
8477                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8478 if test "$ol_link_threads" = no ; then
8479         # try -lpthreads -lexc
8480         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8481 echo "configure:8482: checking for pthread link with -lpthreads -lexc" >&5
8482 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
8483   echo $ac_n "(cached) $ac_c" 1>&6
8484 else
8485   
8486                 # save the flags
8487                 ol_LIBS="$LIBS"
8488                 LIBS="-lpthreads -lexc $LIBS"
8489
8490                 if test "$cross_compiling" = yes; then
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 /* pthread test headers */
8495 #include <pthread.h>
8496 #ifndef NULL
8497 #define NULL (void*)0
8498 #endif
8499
8500 static void *task(p)
8501         void *p;
8502 {
8503         return (void *) (p == NULL);
8504 }
8505
8506 int main() {
8507
8508         /* pthread test function */
8509         pthread_t t;
8510         int status;
8511
8512         /* make sure pthread_create() isn't just a stub */
8513 #if HAVE_PTHREADS_D4
8514         status = pthread_create(&t, pthread_attr_default, task, NULL);
8515 #else
8516         status = pthread_create(&t, NULL, task, NULL);
8517 #endif
8518
8519         if( status ) exit( status );
8520
8521         /* make sure pthread_detach() isn't just a stub */
8522 #if HAVE_PTHREADS_D4
8523         status = pthread_detach( &t );
8524 #else
8525         status = pthread_detach( t );
8526 #endif
8527
8528 #ifdef HAVE_LINUX_THREADS
8529         pthread_kill_other_threads_np();
8530 #endif
8531
8532         exit( status );
8533
8534 ; return 0; }
8535 EOF
8536 if { (eval echo configure:8537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8537   rm -rf conftest*
8538   ol_cv_pthread_lpthreads_lexc=yes
8539 else
8540   echo "configure: failed program was:" >&5
8541   cat conftest.$ac_ext >&5
8542   rm -rf conftest*
8543   ol_cv_pthread_lpthreads_lexc=no
8544 fi
8545 rm -f conftest*
8546 else
8547   cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 /* pthread test headers */
8551 #include <pthread.h>
8552 #ifndef NULL
8553 #define NULL (void*)0
8554 #endif
8555
8556 static void *task(p)
8557         void *p;
8558 {
8559         return (void *) (p == NULL);
8560 }
8561
8562
8563 int main(argc, argv)
8564         int argc;
8565         char **argv;
8566 {
8567
8568         /* pthread test function */
8569         pthread_t t;
8570         int status;
8571
8572         /* make sure pthread_create() isn't just a stub */
8573 #if HAVE_PTHREADS_D4
8574         status = pthread_create(&t, pthread_attr_default, task, NULL);
8575 #else
8576         status = pthread_create(&t, NULL, task, NULL);
8577 #endif
8578
8579         if( status ) exit( status );
8580
8581         /* make sure pthread_detach() isn't just a stub */
8582 #if HAVE_PTHREADS_D4
8583         status = pthread_detach( &t );
8584 #else
8585         status = pthread_detach( t );
8586 #endif
8587
8588 #ifdef HAVE_LINUX_THREADS
8589         pthread_kill_other_threads_np();
8590 #endif
8591
8592         exit( status );
8593
8594 }
8595
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8598 then
8599   ol_cv_pthread_lpthreads_lexc=yes
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -fr conftest*
8604   ol_cv_pthread_lpthreads_lexc=no
8605 fi
8606 rm -fr conftest*
8607 fi
8608
8609
8610                 # restore the LIBS
8611                 LIBS="$ol_LIBS"
8612         
8613 fi
8614
8615 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8616
8617         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8618                 ol_link_pthreads="-lpthreads -lexc"
8619                 ol_link_threads=posix
8620         fi
8621 fi
8622
8623
8624                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8625 if test "$ol_link_threads" = no ; then
8626         # try -lpthreads
8627         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8628 echo "configure:8629: checking for pthread link with -lpthreads" >&5
8629 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
8630   echo $ac_n "(cached) $ac_c" 1>&6
8631 else
8632   
8633                 # save the flags
8634                 ol_LIBS="$LIBS"
8635                 LIBS="-lpthreads $LIBS"
8636
8637                 if test "$cross_compiling" = yes; then
8638   cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641 /* pthread test headers */
8642 #include <pthread.h>
8643 #ifndef NULL
8644 #define NULL (void*)0
8645 #endif
8646
8647 static void *task(p)
8648         void *p;
8649 {
8650         return (void *) (p == NULL);
8651 }
8652
8653 int main() {
8654
8655         /* pthread test function */
8656         pthread_t t;
8657         int status;
8658
8659         /* make sure pthread_create() isn't just a stub */
8660 #if HAVE_PTHREADS_D4
8661         status = pthread_create(&t, pthread_attr_default, task, NULL);
8662 #else
8663         status = pthread_create(&t, NULL, task, NULL);
8664 #endif
8665
8666         if( status ) exit( status );
8667
8668         /* make sure pthread_detach() isn't just a stub */
8669 #if HAVE_PTHREADS_D4
8670         status = pthread_detach( &t );
8671 #else
8672         status = pthread_detach( t );
8673 #endif
8674
8675 #ifdef HAVE_LINUX_THREADS
8676         pthread_kill_other_threads_np();
8677 #endif
8678
8679         exit( status );
8680
8681 ; return 0; }
8682 EOF
8683 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8684   rm -rf conftest*
8685   ol_cv_pthread_lib_lpthreads=yes
8686 else
8687   echo "configure: failed program was:" >&5
8688   cat conftest.$ac_ext >&5
8689   rm -rf conftest*
8690   ol_cv_pthread_lib_lpthreads=no
8691 fi
8692 rm -f conftest*
8693 else
8694   cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697 /* pthread test headers */
8698 #include <pthread.h>
8699 #ifndef NULL
8700 #define NULL (void*)0
8701 #endif
8702
8703 static void *task(p)
8704         void *p;
8705 {
8706         return (void *) (p == NULL);
8707 }
8708
8709
8710 int main(argc, argv)
8711         int argc;
8712         char **argv;
8713 {
8714
8715         /* pthread test function */
8716         pthread_t t;
8717         int status;
8718
8719         /* make sure pthread_create() isn't just a stub */
8720 #if HAVE_PTHREADS_D4
8721         status = pthread_create(&t, pthread_attr_default, task, NULL);
8722 #else
8723         status = pthread_create(&t, NULL, task, NULL);
8724 #endif
8725
8726         if( status ) exit( status );
8727
8728         /* make sure pthread_detach() isn't just a stub */
8729 #if HAVE_PTHREADS_D4
8730         status = pthread_detach( &t );
8731 #else
8732         status = pthread_detach( t );
8733 #endif
8734
8735 #ifdef HAVE_LINUX_THREADS
8736         pthread_kill_other_threads_np();
8737 #endif
8738
8739         exit( status );
8740
8741 }
8742
8743 EOF
8744 if { (eval echo configure:8745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8745 then
8746   ol_cv_pthread_lib_lpthreads=yes
8747 else
8748   echo "configure: failed program was:" >&5
8749   cat conftest.$ac_ext >&5
8750   rm -fr conftest*
8751   ol_cv_pthread_lib_lpthreads=no
8752 fi
8753 rm -fr conftest*
8754 fi
8755
8756
8757                 # restore the LIBS
8758                 LIBS="$ol_LIBS"
8759         
8760 fi
8761
8762 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8763
8764         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8765                 ol_link_pthreads="-lpthreads"
8766                 ol_link_threads=posix
8767         fi
8768 fi
8769
8770
8771                 if test $ol_link_threads != no ; then
8772                         cat >> confdefs.h <<\EOF
8773 #define HAVE_PTHREADS 1
8774 EOF
8775
8776
8777                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8778
8779                                                 save_CPPFLAGS="$CPPFLAGS"
8780                         save_LIBS="$LIBS"
8781                         LIBS="$LTHREAD_LIBS $LIBS"
8782
8783                                                                                                 for ac_func in sched_yield pthread_yield
8784 do
8785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8786 echo "configure:8787: checking for $ac_func" >&5
8787 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8788   echo $ac_n "(cached) $ac_c" 1>&6
8789 else
8790   cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 /* System header to define __stub macros and hopefully few prototypes,
8794     which can conflict with char $ac_func(); below.  */
8795 #include <assert.h>
8796 /* Override any gcc2 internal prototype to avoid an error.  */
8797 /* We use char because int might match the return type of a gcc2
8798     builtin and then its argument prototype would still apply.  */
8799 char $ac_func();
8800
8801 int main() {
8802
8803 /* The GNU C library defines this for functions which it implements
8804     to always fail with ENOSYS.  Some functions are actually named
8805     something starting with __ and the normal name is an alias.  */
8806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8807 choke me
8808 #else
8809 $ac_func();
8810 #endif
8811
8812 ; return 0; }
8813 EOF
8814 if { (eval echo configure:8815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8815   rm -rf conftest*
8816   eval "ac_cv_func_$ac_func=yes"
8817 else
8818   echo "configure: failed program was:" >&5
8819   cat conftest.$ac_ext >&5
8820   rm -rf conftest*
8821   eval "ac_cv_func_$ac_func=no"
8822 fi
8823 rm -f conftest*
8824 fi
8825
8826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8827   echo "$ac_t""yes" 1>&6
8828     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8829   cat >> confdefs.h <<EOF
8830 #define $ac_tr_func 1
8831 EOF
8832  
8833 else
8834   echo "$ac_t""no" 1>&6
8835 fi
8836 done
8837
8838
8839                         if test $ac_cv_func_sched_yield = no -a \
8840                                 $ac_cv_func_pthread_yield = no ; then
8841                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8842 echo "configure:8843: checking for sched_yield in -lrt" >&5
8843 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
8844 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   ac_save_LIBS="$LIBS"
8848 LIBS="-lrt  $LIBS"
8849 cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 /* Override any gcc2 internal prototype to avoid an error.  */
8853 /* We use char because int might match the return type of a gcc2
8854     builtin and then its argument prototype would still apply.  */
8855 char sched_yield();
8856
8857 int main() {
8858 sched_yield()
8859 ; return 0; }
8860 EOF
8861 if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8862   rm -rf conftest*
8863   eval "ac_cv_lib_$ac_lib_var=yes"
8864 else
8865   echo "configure: failed program was:" >&5
8866   cat conftest.$ac_ext >&5
8867   rm -rf conftest*
8868   eval "ac_cv_lib_$ac_lib_var=no"
8869 fi
8870 rm -f conftest*
8871 LIBS="$ac_save_LIBS"
8872
8873 fi
8874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8875   echo "$ac_t""yes" 1>&6
8876   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8877                                         cat >> confdefs.h <<\EOF
8878 #define HAVE_SCHED_YIELD 1
8879 EOF
8880
8881                                         ac_cv_func_sched_yield=yes
8882 else
8883   echo "$ac_t""no" 1>&6
8884 ac_cv_func_sched_yield=no
8885 fi
8886
8887                         fi
8888                         if test $ac_cv_func_sched_yield = no -a \
8889                                 $ac_cv_func_pthread_yield = no ; then
8890                                                                                                 for ac_func in thr_yield
8891 do
8892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8893 echo "configure:8894: checking for $ac_func" >&5
8894 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8895   echo $ac_n "(cached) $ac_c" 1>&6
8896 else
8897   cat > conftest.$ac_ext <<EOF
8898 #line 8899 "configure"
8899 #include "confdefs.h"
8900 /* System header to define __stub macros and hopefully few prototypes,
8901     which can conflict with char $ac_func(); below.  */
8902 #include <assert.h>
8903 /* Override any gcc2 internal prototype to avoid an error.  */
8904 /* We use char because int might match the return type of a gcc2
8905     builtin and then its argument prototype would still apply.  */
8906 char $ac_func();
8907
8908 int main() {
8909
8910 /* The GNU C library defines this for functions which it implements
8911     to always fail with ENOSYS.  Some functions are actually named
8912     something starting with __ and the normal name is an alias.  */
8913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8914 choke me
8915 #else
8916 $ac_func();
8917 #endif
8918
8919 ; return 0; }
8920 EOF
8921 if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8922   rm -rf conftest*
8923   eval "ac_cv_func_$ac_func=yes"
8924 else
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -rf conftest*
8928   eval "ac_cv_func_$ac_func=no"
8929 fi
8930 rm -f conftest*
8931 fi
8932
8933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8934   echo "$ac_t""yes" 1>&6
8935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8936   cat >> confdefs.h <<EOF
8937 #define $ac_tr_func 1
8938 EOF
8939  
8940 else
8941   echo "$ac_t""no" 1>&6
8942 fi
8943 done
8944
8945                         fi
8946                         if test $ac_cv_func_sched_yield = no -a \
8947                                 $ac_cv_func_pthread_yield = no -a \
8948                                 "$ac_cv_func_thr_yield" = no ; then
8949                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
8950                         fi
8951
8952                                                 for ac_func in pthread_kill
8953 do
8954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8955 echo "configure:8956: checking for $ac_func" >&5
8956 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8957   echo $ac_n "(cached) $ac_c" 1>&6
8958 else
8959   cat > conftest.$ac_ext <<EOF
8960 #line 8961 "configure"
8961 #include "confdefs.h"
8962 /* System header to define __stub macros and hopefully few prototypes,
8963     which can conflict with char $ac_func(); below.  */
8964 #include <assert.h>
8965 /* Override any gcc2 internal prototype to avoid an error.  */
8966 /* We use char because int might match the return type of a gcc2
8967     builtin and then its argument prototype would still apply.  */
8968 char $ac_func();
8969
8970 int main() {
8971
8972 /* The GNU C library defines this for functions which it implements
8973     to always fail with ENOSYS.  Some functions are actually named
8974     something starting with __ and the normal name is an alias.  */
8975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8976 choke me
8977 #else
8978 $ac_func();
8979 #endif
8980
8981 ; return 0; }
8982 EOF
8983 if { (eval echo configure:8984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8984   rm -rf conftest*
8985   eval "ac_cv_func_$ac_func=yes"
8986 else
8987   echo "configure: failed program was:" >&5
8988   cat conftest.$ac_ext >&5
8989   rm -rf conftest*
8990   eval "ac_cv_func_$ac_func=no"
8991 fi
8992 rm -f conftest*
8993 fi
8994
8995 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8996   echo "$ac_t""yes" 1>&6
8997     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8998   cat >> confdefs.h <<EOF
8999 #define $ac_tr_func 1
9000 EOF
9001  
9002 else
9003   echo "$ac_t""no" 1>&6
9004 fi
9005 done
9006
9007
9008                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9009 echo "configure:9010: checking for pthread_detach with <pthread.h>" >&5
9010 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
9011   echo $ac_n "(cached) $ac_c" 1>&6
9012 else
9013   
9014                                                                 cat > conftest.$ac_ext <<EOF
9015 #line 9016 "configure"
9016 #include "confdefs.h"
9017
9018 #include <pthread.h>
9019 #ifndef NULL
9020 #define NULL (void*)0
9021 #endif
9022
9023 int main() {
9024 pthread_detach(NULL);
9025 ; return 0; }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9028   rm -rf conftest*
9029   ol_cv_func_pthread_detach=yes
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   ol_cv_func_pthread_detach=no
9035 fi
9036 rm -f conftest*
9037                         
9038 fi
9039
9040 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9041
9042                         if test $ol_cv_func_pthread_detach = no ; then
9043                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9044                         fi
9045
9046                         cat >> confdefs.h <<\EOF
9047 #define HAVE_PTHREAD_DETACH 1
9048 EOF
9049
9050
9051                                                 for ac_func in \
9052                                 pthread_setconcurrency \
9053                                 pthread_getconcurrency \
9054                                 thr_setconcurrency \
9055                                 thr_getconcurrency \
9056                         
9057 do
9058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9059 echo "configure:9060: checking for $ac_func" >&5
9060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9061   echo $ac_n "(cached) $ac_c" 1>&6
9062 else
9063   cat > conftest.$ac_ext <<EOF
9064 #line 9065 "configure"
9065 #include "confdefs.h"
9066 /* System header to define __stub macros and hopefully few prototypes,
9067     which can conflict with char $ac_func(); below.  */
9068 #include <assert.h>
9069 /* Override any gcc2 internal prototype to avoid an error.  */
9070 /* We use char because int might match the return type of a gcc2
9071     builtin and then its argument prototype would still apply.  */
9072 char $ac_func();
9073
9074 int main() {
9075
9076 /* The GNU C library defines this for functions which it implements
9077     to always fail with ENOSYS.  Some functions are actually named
9078     something starting with __ and the normal name is an alias.  */
9079 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9080 choke me
9081 #else
9082 $ac_func();
9083 #endif
9084
9085 ; return 0; }
9086 EOF
9087 if { (eval echo configure:9088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9088   rm -rf conftest*
9089   eval "ac_cv_func_$ac_func=yes"
9090 else
9091   echo "configure: failed program was:" >&5
9092   cat conftest.$ac_ext >&5
9093   rm -rf conftest*
9094   eval "ac_cv_func_$ac_func=no"
9095 fi
9096 rm -f conftest*
9097 fi
9098
9099 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9100   echo "$ac_t""yes" 1>&6
9101     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9102   cat >> confdefs.h <<EOF
9103 #define $ac_tr_func 1
9104 EOF
9105  
9106 else
9107   echo "$ac_t""no" 1>&6
9108 fi
9109 done
9110
9111
9112                         
9113         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9114 echo "configure:9115: checking for pthread_kill_other_threads_np" >&5
9115 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
9116   echo $ac_n "(cached) $ac_c" 1>&6
9117 else
9118   cat > conftest.$ac_ext <<EOF
9119 #line 9120 "configure"
9120 #include "confdefs.h"
9121 /* System header to define __stub macros and hopefully few prototypes,
9122     which can conflict with char pthread_kill_other_threads_np(); below.  */
9123 #include <assert.h>
9124 /* Override any gcc2 internal prototype to avoid an error.  */
9125 /* We use char because int might match the return type of a gcc2
9126     builtin and then its argument prototype would still apply.  */
9127 char pthread_kill_other_threads_np();
9128
9129 int main() {
9130
9131 /* The GNU C library defines this for functions which it implements
9132     to always fail with ENOSYS.  Some functions are actually named
9133     something starting with __ and the normal name is an alias.  */
9134 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9135 choke me
9136 #else
9137 pthread_kill_other_threads_np();
9138 #endif
9139
9140 ; return 0; }
9141 EOF
9142 if { (eval echo configure:9143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9143   rm -rf conftest*
9144   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9145 else
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -rf conftest*
9149   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9150 fi
9151 rm -f conftest*
9152 fi
9153
9154 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9155   echo "$ac_t""yes" 1>&6
9156   :
9157 else
9158   echo "$ac_t""no" 1>&6
9159 fi
9160
9161         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9162 echo "configure:9163: checking for LinuxThreads implementation" >&5
9163 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9167 fi
9168
9169 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9170
9171                         
9172         
9173         
9174         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9175 echo "configure:9176: checking for LinuxThreads consistency" >&5
9176 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
9177   echo $ac_n "(cached) $ac_c" 1>&6
9178 else
9179   
9180                 if test $ol_cv_header_linux_threads = yes -a \
9181                         $ol_cv_sys_linux_threads = yes; then
9182                         ol_cv_linux_threads=yes
9183                 elif test $ol_cv_header_linux_threads = no -a \
9184                         $ol_cv_sys_linux_threads = no; then
9185                         ol_cv_linux_threads=no
9186                 else
9187                         ol_cv_linux_threads=error
9188                 fi
9189         
9190 fi
9191
9192 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9193
9194
9195                         if test $ol_cv_linux_threads = error; then
9196                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9197                         fi
9198
9199                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9200 echo "configure:9201: checking if pthread_create() works" >&5
9201 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   
9205                         if test "$cross_compiling" = yes; then
9206                                 ol_cv_pthread_create_works=yes
9207 else
9208   cat > conftest.$ac_ext <<EOF
9209 #line 9210 "configure"
9210 #include "confdefs.h"
9211 /* pthread test headers */
9212 #include <pthread.h>
9213 #ifndef NULL
9214 #define NULL (void*)0
9215 #endif
9216
9217 static void *task(p)
9218         void *p;
9219 {
9220         return (void *) (p == NULL);
9221 }
9222
9223
9224 int main(argc, argv)
9225         int argc;
9226         char **argv;
9227 {
9228
9229         /* pthread test function */
9230         pthread_t t;
9231         int status;
9232
9233         /* make sure pthread_create() isn't just a stub */
9234 #if HAVE_PTHREADS_D4
9235         status = pthread_create(&t, pthread_attr_default, task, NULL);
9236 #else
9237         status = pthread_create(&t, NULL, task, NULL);
9238 #endif
9239
9240         if( status ) exit( status );
9241
9242         /* make sure pthread_detach() isn't just a stub */
9243 #if HAVE_PTHREADS_D4
9244         status = pthread_detach( &t );
9245 #else
9246         status = pthread_detach( t );
9247 #endif
9248
9249 #ifdef HAVE_LINUX_THREADS
9250         pthread_kill_other_threads_np();
9251 #endif
9252
9253         exit( status );
9254
9255 }
9256
9257 EOF
9258 if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9259 then
9260   ol_cv_pthread_create_works=yes
9261 else
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -fr conftest*
9265   ol_cv_pthread_create_works=no
9266 fi
9267 rm -fr conftest*
9268 fi
9269
9270 fi
9271
9272 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9273
9274                         if test $ol_cv_pthread_create_works = no ; then
9275                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9276                         fi
9277
9278                                                 if test $ol_with_yielding_select = auto ; then
9279                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9280 echo "configure:9281: checking if select yields when using pthreads" >&5
9281 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
9282   echo $ac_n "(cached) $ac_c" 1>&6
9283 else
9284   
9285                                 if test "$cross_compiling" = yes; then
9286   ol_cv_pthread_select_yields=cross
9287 else
9288   cat > conftest.$ac_ext <<EOF
9289 #line 9290 "configure"
9290 #include "confdefs.h"
9291
9292 #include <sys/types.h>
9293 #include <sys/time.h>
9294 #include <unistd.h>
9295 #include <pthread.h>
9296 #ifndef NULL
9297 #define NULL (void*) 0
9298 #endif
9299
9300 static int fildes[2];
9301
9302 static void *task(p)
9303         void *p;
9304 {
9305         int i;
9306         struct timeval tv;
9307
9308         fd_set rfds;
9309
9310         tv.tv_sec=10;
9311         tv.tv_usec=0;
9312
9313         FD_ZERO(&rfds);
9314         FD_SET(fildes[0], &rfds);
9315
9316         /* we're not interested in any fds */
9317         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9318
9319         if(i < 0) {
9320                 perror("select");
9321                 exit(10);
9322         }
9323
9324         exit(0); /* if we exit here, the select blocked the whole process */
9325 }
9326
9327 int main(argc, argv)
9328         int argc;
9329         char **argv;
9330 {
9331         pthread_t t;
9332
9333         /* create a pipe to select */
9334         if(pipe(&fildes[0])) {
9335                 perror("select");
9336                 exit(1);
9337         }
9338
9339 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9340         (void) pthread_setconcurrency(2);
9341 #else
9342 #ifdef HAVE_THR_SETCONCURRENCY
9343         /* Set Solaris LWP concurrency to 2 */
9344         thr_setconcurrency(2);
9345 #endif
9346 #endif
9347
9348 #if HAVE_PTHREADS_D4
9349         pthread_create(&t, pthread_attr_default, task, NULL);
9350 #else
9351         pthread_create(&t, NULL, task, NULL);
9352 #endif
9353
9354 #if HAVE_SCHED_YIELD
9355         sched_yield();  /* make sure task runs first */
9356 #else
9357 #ifdef HAVE_PTHREAD_YIELD
9358         pthread_yield();        /* make sure task runs first */
9359 #endif
9360 #endif
9361
9362         exit(2);
9363 }
9364 EOF
9365 if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9366 then
9367   ol_cv_pthread_select_yields=no
9368 else
9369   echo "configure: failed program was:" >&5
9370   cat conftest.$ac_ext >&5
9371   rm -fr conftest*
9372   ol_cv_pthread_select_yields=yes
9373 fi
9374 rm -fr conftest*
9375 fi
9376
9377 fi
9378
9379 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9380
9381                                 if test $ol_cv_pthread_select_yields = cross ; then
9382                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9383                                 fi
9384
9385                                 if test $ol_cv_pthread_select_yields = yes ; then
9386                                         ol_with_yielding_select=yes
9387                                 fi
9388                         fi
9389
9390                                                 CPPFLAGS="$save_CPPFLAGS"
9391                         LIBS="$save_LIBS"
9392                 else
9393                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9394                 fi
9395         fi
9396
9397         if test $ol_with_threads = posix ; then
9398                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9399         fi
9400 fi
9401
9402 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9403         -o $ol_with_threads = mach ; then
9404
9405                 for ac_hdr in mach/cthreads.h
9406 do
9407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9409 echo "configure:9410: checking for $ac_hdr" >&5
9410 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9411   echo $ac_n "(cached) $ac_c" 1>&6
9412 else
9413   cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416 #include <$ac_hdr>
9417 EOF
9418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9419 { (eval echo configure:9420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9421 if test -z "$ac_err"; then
9422   rm -rf conftest*
9423   eval "ac_cv_header_$ac_safe=yes"
9424 else
9425   echo "$ac_err" >&5
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   eval "ac_cv_header_$ac_safe=no"
9430 fi
9431 rm -f conftest*
9432 fi
9433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9434   echo "$ac_t""yes" 1>&6
9435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9436   cat >> confdefs.h <<EOF
9437 #define $ac_tr_hdr 1
9438 EOF
9439  
9440 else
9441   echo "$ac_t""no" 1>&6
9442 fi
9443 done
9444
9445         if test $ac_cv_header_mach_cthreads_h = yes ; then
9446                 ol_with_threads=found
9447
9448                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9449 echo "configure:9450: checking for cthread_fork" >&5
9450 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   cat > conftest.$ac_ext <<EOF
9454 #line 9455 "configure"
9455 #include "confdefs.h"
9456 /* System header to define __stub macros and hopefully few prototypes,
9457     which can conflict with char cthread_fork(); below.  */
9458 #include <assert.h>
9459 /* Override any gcc2 internal prototype to avoid an error.  */
9460 /* We use char because int might match the return type of a gcc2
9461     builtin and then its argument prototype would still apply.  */
9462 char cthread_fork();
9463
9464 int main() {
9465
9466 /* The GNU C library defines this for functions which it implements
9467     to always fail with ENOSYS.  Some functions are actually named
9468     something starting with __ and the normal name is an alias.  */
9469 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9470 choke me
9471 #else
9472 cthread_fork();
9473 #endif
9474
9475 ; return 0; }
9476 EOF
9477 if { (eval echo configure:9478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9478   rm -rf conftest*
9479   eval "ac_cv_func_cthread_fork=yes"
9480 else
9481   echo "configure: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   rm -rf conftest*
9484   eval "ac_cv_func_cthread_fork=no"
9485 fi
9486 rm -f conftest*
9487 fi
9488
9489 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9490   echo "$ac_t""yes" 1>&6
9491   ol_link_threads=yes
9492 else
9493   echo "$ac_t""no" 1>&6
9494 fi
9495
9496
9497                 if test $ol_link_threads = no ; then
9498                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9499 echo "configure:9500: checking for cthread_fork with -all_load" >&5
9500 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   
9504                                                                 save_LIBS="$LIBS"
9505                                 LIBS="-all_load $LIBS"
9506                                 cat > conftest.$ac_ext <<EOF
9507 #line 9508 "configure"
9508 #include "confdefs.h"
9509 #include <mach/cthreads.h>
9510 int main() {
9511
9512                                         cthread_fork((void *)0, (void *)0);
9513                                         
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9517   rm -rf conftest*
9518   ol_cv_cthread_all_load=yes
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   ol_cv_cthread_all_load=no
9524 fi
9525 rm -f conftest*
9526                                                                 LIBS="$save_LIBS"
9527                         
9528 fi
9529
9530 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9531
9532                         if test $ol_cv_cthread_all_load = yes ; then
9533                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9534                                 ol_link_threads=mach
9535                         fi
9536                 fi
9537
9538                 if test $ol_link_threads != no ; then
9539                         : check for cthread specific functionality here
9540                         cat >> confdefs.h <<\EOF
9541 #define HAVE_MACH_CTHREADS 1
9542 EOF
9543
9544                 else
9545                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9546                 fi
9547         fi
9548
9549         if test $ol_with_threads = mach ; then
9550                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9551         fi
9552 fi
9553
9554 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9555         -o $ol_with_threads = pth ; then
9556
9557         for ac_hdr in pth.h
9558 do
9559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9561 echo "configure:9562: checking for $ac_hdr" >&5
9562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565   cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 #include <$ac_hdr>
9569 EOF
9570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9571 { (eval echo configure:9572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9573 if test -z "$ac_err"; then
9574   rm -rf conftest*
9575   eval "ac_cv_header_$ac_safe=yes"
9576 else
9577   echo "$ac_err" >&5
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580   rm -rf conftest*
9581   eval "ac_cv_header_$ac_safe=no"
9582 fi
9583 rm -f conftest*
9584 fi
9585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9586   echo "$ac_t""yes" 1>&6
9587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9588   cat >> confdefs.h <<EOF
9589 #define $ac_tr_hdr 1
9590 EOF
9591  
9592 else
9593   echo "$ac_t""no" 1>&6
9594 fi
9595 done
9596
9597
9598         if test $ac_cv_header_pth_h = yes ; then
9599                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9600 echo "configure:9601: checking for pth_version in -lpth" >&5
9601 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-%__p_%'`
9602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9603   echo $ac_n "(cached) $ac_c" 1>&6
9604 else
9605   ac_save_LIBS="$LIBS"
9606 LIBS="-lpth  $LIBS"
9607 cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 /* Override any gcc2 internal prototype to avoid an error.  */
9611 /* We use char because int might match the return type of a gcc2
9612     builtin and then its argument prototype would still apply.  */
9613 char pth_version();
9614
9615 int main() {
9616 pth_version()
9617 ; return 0; }
9618 EOF
9619 if { (eval echo configure:9620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9620   rm -rf conftest*
9621   eval "ac_cv_lib_$ac_lib_var=yes"
9622 else
9623   echo "configure: failed program was:" >&5
9624   cat conftest.$ac_ext >&5
9625   rm -rf conftest*
9626   eval "ac_cv_lib_$ac_lib_var=no"
9627 fi
9628 rm -f conftest*
9629 LIBS="$ac_save_LIBS"
9630
9631 fi
9632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9633   echo "$ac_t""yes" 1>&6
9634   have_pth=yes
9635 else
9636   echo "$ac_t""no" 1>&6
9637 have_pth=no
9638 fi
9639
9640
9641                 if test $have_pth = yes ; then
9642                         cat >> confdefs.h <<\EOF
9643 #define HAVE_GNU_PTH 1
9644 EOF
9645
9646                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9647                         ol_link_threads=pth
9648
9649                         if test $ol_with_yielding_select = auto ; then
9650                                 ol_with_yielding_select=yes
9651                         fi
9652                 fi
9653         fi
9654 fi
9655
9656 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9657         -o $ol_with_threads = lwp ; then
9658
9659                 for ac_hdr in thread.h synch.h
9660 do
9661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9663 echo "configure:9664: checking for $ac_hdr" >&5
9664 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9665   echo $ac_n "(cached) $ac_c" 1>&6
9666 else
9667   cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670 #include <$ac_hdr>
9671 EOF
9672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9673 { (eval echo configure:9674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9675 if test -z "$ac_err"; then
9676   rm -rf conftest*
9677   eval "ac_cv_header_$ac_safe=yes"
9678 else
9679   echo "$ac_err" >&5
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   eval "ac_cv_header_$ac_safe=no"
9684 fi
9685 rm -f conftest*
9686 fi
9687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9688   echo "$ac_t""yes" 1>&6
9689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9690   cat >> confdefs.h <<EOF
9691 #define $ac_tr_hdr 1
9692 EOF
9693  
9694 else
9695   echo "$ac_t""no" 1>&6
9696 fi
9697 done
9698
9699         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9700                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9701 echo "configure:9702: checking for thr_create in -lthread" >&5
9702 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
9703 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   ac_save_LIBS="$LIBS"
9707 LIBS="-lthread  $LIBS"
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* Override any gcc2 internal prototype to avoid an error.  */
9712 /* We use char because int might match the return type of a gcc2
9713     builtin and then its argument prototype would still apply.  */
9714 char thr_create();
9715
9716 int main() {
9717 thr_create()
9718 ; return 0; }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9721   rm -rf conftest*
9722   eval "ac_cv_lib_$ac_lib_var=yes"
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   eval "ac_cv_lib_$ac_lib_var=no"
9728 fi
9729 rm -f conftest*
9730 LIBS="$ac_save_LIBS"
9731
9732 fi
9733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9734   echo "$ac_t""yes" 1>&6
9735   have_thr=yes
9736 else
9737   echo "$ac_t""no" 1>&6
9738 have_thr=no
9739 fi
9740
9741
9742                 if test $have_thr = yes ; then
9743                         cat >> confdefs.h <<\EOF
9744 #define HAVE_THR 1
9745 EOF
9746
9747                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9748                         ol_link_threads=thr
9749
9750                         if test $ol_with_yielding_select = auto ; then
9751                                 ol_with_yielding_select=yes
9752                         fi
9753
9754                                                 for ac_func in \
9755                                 thr_setconcurrency \
9756                                 thr_getconcurrency \
9757                         
9758 do
9759 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9760 echo "configure:9761: checking for $ac_func" >&5
9761 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   cat > conftest.$ac_ext <<EOF
9765 #line 9766 "configure"
9766 #include "confdefs.h"
9767 /* System header to define __stub macros and hopefully few prototypes,
9768     which can conflict with char $ac_func(); below.  */
9769 #include <assert.h>
9770 /* Override any gcc2 internal prototype to avoid an error.  */
9771 /* We use char because int might match the return type of a gcc2
9772     builtin and then its argument prototype would still apply.  */
9773 char $ac_func();
9774
9775 int main() {
9776
9777 /* The GNU C library defines this for functions which it implements
9778     to always fail with ENOSYS.  Some functions are actually named
9779     something starting with __ and the normal name is an alias.  */
9780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9781 choke me
9782 #else
9783 $ac_func();
9784 #endif
9785
9786 ; return 0; }
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9789   rm -rf conftest*
9790   eval "ac_cv_func_$ac_func=yes"
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794   rm -rf conftest*
9795   eval "ac_cv_func_$ac_func=no"
9796 fi
9797 rm -f conftest*
9798 fi
9799
9800 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9801   echo "$ac_t""yes" 1>&6
9802     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9803   cat >> confdefs.h <<EOF
9804 #define $ac_tr_func 1
9805 EOF
9806  
9807 else
9808   echo "$ac_t""no" 1>&6
9809 fi
9810 done
9811
9812                 fi
9813         fi
9814
9815                 for ac_hdr in lwp/lwp.h
9816 do
9817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9819 echo "configure:9820: checking for $ac_hdr" >&5
9820 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9821   echo $ac_n "(cached) $ac_c" 1>&6
9822 else
9823   cat > conftest.$ac_ext <<EOF
9824 #line 9825 "configure"
9825 #include "confdefs.h"
9826 #include <$ac_hdr>
9827 EOF
9828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9829 { (eval echo configure:9830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9831 if test -z "$ac_err"; then
9832   rm -rf conftest*
9833   eval "ac_cv_header_$ac_safe=yes"
9834 else
9835   echo "$ac_err" >&5
9836   echo "configure: failed program was:" >&5
9837   cat conftest.$ac_ext >&5
9838   rm -rf conftest*
9839   eval "ac_cv_header_$ac_safe=no"
9840 fi
9841 rm -f conftest*
9842 fi
9843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9844   echo "$ac_t""yes" 1>&6
9845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9846   cat >> confdefs.h <<EOF
9847 #define $ac_tr_hdr 1
9848 EOF
9849  
9850 else
9851   echo "$ac_t""no" 1>&6
9852 fi
9853 done
9854
9855         if test $ac_cv_header_lwp_lwp_h = yes ; then
9856                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9857 echo "configure:9858: checking for lwp_create in -llwp" >&5
9858 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
9859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9860   echo $ac_n "(cached) $ac_c" 1>&6
9861 else
9862   ac_save_LIBS="$LIBS"
9863 LIBS="-llwp  $LIBS"
9864 cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 /* Override any gcc2 internal prototype to avoid an error.  */
9868 /* We use char because int might match the return type of a gcc2
9869     builtin and then its argument prototype would still apply.  */
9870 char lwp_create();
9871
9872 int main() {
9873 lwp_create()
9874 ; return 0; }
9875 EOF
9876 if { (eval echo configure:9877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9877   rm -rf conftest*
9878   eval "ac_cv_lib_$ac_lib_var=yes"
9879 else
9880   echo "configure: failed program was:" >&5
9881   cat conftest.$ac_ext >&5
9882   rm -rf conftest*
9883   eval "ac_cv_lib_$ac_lib_var=no"
9884 fi
9885 rm -f conftest*
9886 LIBS="$ac_save_LIBS"
9887
9888 fi
9889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9890   echo "$ac_t""yes" 1>&6
9891   have_lwp=yes
9892 else
9893   echo "$ac_t""no" 1>&6
9894 have_lwp=no
9895 fi
9896
9897
9898                 if test $have_lwp = yes ; then
9899                         cat >> confdefs.h <<\EOF
9900 #define HAVE_LWP 1
9901 EOF
9902
9903                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
9904                         ol_link_threads=lwp
9905
9906                         if test $ol_with_yielding_select = auto ; then
9907                                 ol_with_yielding_select=no
9908                         fi
9909                 fi
9910         fi
9911 fi
9912
9913 if test $ol_with_yielding_select = yes ; then
9914         cat >> confdefs.h <<\EOF
9915 #define HAVE_YIELDING_SELECT 1
9916 EOF
9917
9918 fi
9919
9920 if test $ol_with_threads = manual ; then
9921                 ol_link_threads=yes
9922
9923         echo "configure: warning: thread defines and link options must be set manually" 1>&2
9924
9925         for ac_hdr in pthread.h sched.h
9926 do
9927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9929 echo "configure:9930: checking for $ac_hdr" >&5
9930 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   cat > conftest.$ac_ext <<EOF
9934 #line 9935 "configure"
9935 #include "confdefs.h"
9936 #include <$ac_hdr>
9937 EOF
9938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9939 { (eval echo configure:9940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9941 if test -z "$ac_err"; then
9942   rm -rf conftest*
9943   eval "ac_cv_header_$ac_safe=yes"
9944 else
9945   echo "$ac_err" >&5
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   eval "ac_cv_header_$ac_safe=no"
9950 fi
9951 rm -f conftest*
9952 fi
9953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9954   echo "$ac_t""yes" 1>&6
9955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9956   cat >> confdefs.h <<EOF
9957 #define $ac_tr_hdr 1
9958 EOF
9959  
9960 else
9961   echo "$ac_t""no" 1>&6
9962 fi
9963 done
9964
9965         for ac_func in sched_yield pthread_yield
9966 do
9967 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9968 echo "configure:9969: checking for $ac_func" >&5
9969 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9970   echo $ac_n "(cached) $ac_c" 1>&6
9971 else
9972   cat > conftest.$ac_ext <<EOF
9973 #line 9974 "configure"
9974 #include "confdefs.h"
9975 /* System header to define __stub macros and hopefully few prototypes,
9976     which can conflict with char $ac_func(); below.  */
9977 #include <assert.h>
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char $ac_func();
9982
9983 int main() {
9984
9985 /* The GNU C library defines this for functions which it implements
9986     to always fail with ENOSYS.  Some functions are actually named
9987     something starting with __ and the normal name is an alias.  */
9988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9989 choke me
9990 #else
9991 $ac_func();
9992 #endif
9993
9994 ; return 0; }
9995 EOF
9996 if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9997   rm -rf conftest*
9998   eval "ac_cv_func_$ac_func=yes"
9999 else
10000   echo "configure: failed program was:" >&5
10001   cat conftest.$ac_ext >&5
10002   rm -rf conftest*
10003   eval "ac_cv_func_$ac_func=no"
10004 fi
10005 rm -f conftest*
10006 fi
10007
10008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10009   echo "$ac_t""yes" 1>&6
10010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10011   cat >> confdefs.h <<EOF
10012 #define $ac_tr_func 1
10013 EOF
10014  
10015 else
10016   echo "$ac_t""no" 1>&6
10017 fi
10018 done
10019
10020         
10021         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10022 echo "configure:10023: checking for LinuxThreads pthread.h" >&5
10023 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
10024   echo $ac_n "(cached) $ac_c" 1>&6
10025 else
10026   cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 #include <pthread.h>
10030 EOF
10031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10032   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10033   rm -rf conftest*
10034   ol_cv_header_linux_threads=yes
10035 else
10036   rm -rf conftest*
10037   ol_cv_header_linux_threads=no
10038 fi
10039 rm -f conftest*
10040
10041                 
10042 fi
10043
10044 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10045         if test $ol_cv_header_linux_threads = yes; then
10046                 cat >> confdefs.h <<\EOF
10047 #define HAVE_LINUX_THREADS 1
10048 EOF
10049
10050         fi
10051
10052
10053         for ac_hdr in mach/cthreads.h
10054 do
10055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10057 echo "configure:10058: checking for $ac_hdr" >&5
10058 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10059   echo $ac_n "(cached) $ac_c" 1>&6
10060 else
10061   cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 #include <$ac_hdr>
10065 EOF
10066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10067 { (eval echo configure:10068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10069 if test -z "$ac_err"; then
10070   rm -rf conftest*
10071   eval "ac_cv_header_$ac_safe=yes"
10072 else
10073   echo "$ac_err" >&5
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -rf conftest*
10077   eval "ac_cv_header_$ac_safe=no"
10078 fi
10079 rm -f conftest*
10080 fi
10081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10082   echo "$ac_t""yes" 1>&6
10083     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10084   cat >> confdefs.h <<EOF
10085 #define $ac_tr_hdr 1
10086 EOF
10087  
10088 else
10089   echo "$ac_t""no" 1>&6
10090 fi
10091 done
10092
10093         for ac_hdr in lwp/lwp.h
10094 do
10095 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10096 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10097 echo "configure:10098: checking for $ac_hdr" >&5
10098 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10099   echo $ac_n "(cached) $ac_c" 1>&6
10100 else
10101   cat > conftest.$ac_ext <<EOF
10102 #line 10103 "configure"
10103 #include "confdefs.h"
10104 #include <$ac_hdr>
10105 EOF
10106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10107 { (eval echo configure:10108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10109 if test -z "$ac_err"; then
10110   rm -rf conftest*
10111   eval "ac_cv_header_$ac_safe=yes"
10112 else
10113   echo "$ac_err" >&5
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -rf conftest*
10117   eval "ac_cv_header_$ac_safe=no"
10118 fi
10119 rm -f conftest*
10120 fi
10121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10122   echo "$ac_t""yes" 1>&6
10123     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10124   cat >> confdefs.h <<EOF
10125 #define $ac_tr_hdr 1
10126 EOF
10127  
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131 done
10132
10133         for ac_hdr in thread.h synch.h
10134 do
10135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10137 echo "configure:10138: checking for $ac_hdr" >&5
10138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   cat > conftest.$ac_ext <<EOF
10142 #line 10143 "configure"
10143 #include "confdefs.h"
10144 #include <$ac_hdr>
10145 EOF
10146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10147 { (eval echo configure:10148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10149 if test -z "$ac_err"; then
10150   rm -rf conftest*
10151   eval "ac_cv_header_$ac_safe=yes"
10152 else
10153   echo "$ac_err" >&5
10154   echo "configure: failed program was:" >&5
10155   cat conftest.$ac_ext >&5
10156   rm -rf conftest*
10157   eval "ac_cv_header_$ac_safe=no"
10158 fi
10159 rm -f conftest*
10160 fi
10161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10162   echo "$ac_t""yes" 1>&6
10163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10164   cat >> confdefs.h <<EOF
10165 #define $ac_tr_hdr 1
10166 EOF
10167  
10168 else
10169   echo "$ac_t""no" 1>&6
10170 fi
10171 done
10172
10173 fi
10174
10175 if test $ol_link_threads != no ; then  
10176                         cat >> confdefs.h <<\EOF
10177 #define REENTRANT 1
10178 EOF
10179
10180         cat >> confdefs.h <<\EOF
10181 #define _REENTRANT 1
10182 EOF
10183
10184         cat >> confdefs.h <<\EOF
10185 #define THREAD_SAFE 1
10186 EOF
10187
10188         cat >> confdefs.h <<\EOF
10189 #define _THREAD_SAFE 1
10190 EOF
10191
10192         cat >> confdefs.h <<\EOF
10193 #define THREADSAFE 1
10194 EOF
10195
10196         cat >> confdefs.h <<\EOF
10197 #define _THREADSAFE 1
10198 EOF
10199
10200         cat >> confdefs.h <<\EOF
10201 #define _SGI_MP_SOURCE 1
10202 EOF
10203
10204
10205                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10206 echo "configure:10207: checking for thread specific errno" >&5
10207 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
10208   echo $ac_n "(cached) $ac_c" 1>&6
10209 else
10210   
10211                 cat > conftest.$ac_ext <<EOF
10212 #line 10213 "configure"
10213 #include "confdefs.h"
10214 #include <errno.h>
10215 int main() {
10216 errno = 0;
10217 ; return 0; }
10218 EOF
10219 if { (eval echo configure:10220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10220   rm -rf conftest*
10221   ol_cv_errno_thread_specific=yes
10222 else
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   ol_cv_errno_thread_specific=no
10227 fi
10228 rm -f conftest*
10229         
10230 fi
10231
10232 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10233
10234                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10235 echo "configure:10236: checking for thread specific h_errno" >&5
10236 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
10237   echo $ac_n "(cached) $ac_c" 1>&6
10238 else
10239   
10240                 cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 #include <netdb.h>
10244 int main() {
10245 h_errno = 0;
10246 ; return 0; }
10247 EOF
10248 if { (eval echo configure:10249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10249   rm -rf conftest*
10250   ol_cv_h_errno_thread_specific=yes
10251 else
10252   echo "configure: failed program was:" >&5
10253   cat conftest.$ac_ext >&5
10254   rm -rf conftest*
10255   ol_cv_h_errno_thread_specific=no
10256 fi
10257 rm -f conftest*
10258         
10259 fi
10260
10261 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10262
10263         if test $ol_cv_errno_thread_specific != yes \
10264                 -o $ol_cv_h_errno_thread_specific != yes ; then
10265                 LIBS="$LTHREAD_LIBS $LIBS"
10266                 LTHREAD_LIBS=""
10267         fi
10268
10269 fi  
10270
10271 if test $ol_link_threads = no ; then
10272         if test $ol_with_threads = yes ; then
10273                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10274         fi
10275
10276         if test $ol_with_threads = auto ; then
10277                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10278                 ol_with_threads=no
10279         fi
10280
10281         cat >> confdefs.h <<\EOF
10282 #define NO_THREADS 1
10283 EOF
10284
10285         LTHREAD_LIBS=""
10286 fi
10287
10288 if test $ol_link_threads != no ; then
10289         cat >> confdefs.h <<\EOF
10290 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10291 EOF
10292
10293 fi
10294
10295
10296 ol_link_ldbm=no 
10297 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10298         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10299 echo "configure:10300: checking for DB2 library" >&5
10300 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
10301   echo $ac_n "(cached) $ac_c" 1>&6
10302 else
10303         ol_LIBS="$LIBS"
10304         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10305 echo "configure:10306: checking for db_appexit in -ldb" >&5
10306 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-%__p_%'`
10307 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10308   echo $ac_n "(cached) $ac_c" 1>&6
10309 else
10310   ac_save_LIBS="$LIBS"
10311 LIBS="-ldb  $LIBS"
10312 cat > conftest.$ac_ext <<EOF
10313 #line 10314 "configure"
10314 #include "confdefs.h"
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 /* We use char because int might match the return type of a gcc2
10317     builtin and then its argument prototype would still apply.  */
10318 char db_appexit();
10319
10320 int main() {
10321 db_appexit()
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   eval "ac_cv_lib_$ac_lib_var=yes"
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   eval "ac_cv_lib_$ac_lib_var=no"
10332 fi
10333 rm -f conftest*
10334 LIBS="$ac_save_LIBS"
10335
10336 fi
10337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10338   echo "$ac_t""yes" 1>&6
10339   ol_cv_lib_db2=-ldb
10340 else
10341   echo "$ac_t""no" 1>&6
10342 ol_cv_lib_db2=no
10343 fi
10344
10345         LIBS="$ol_LIBS"
10346
10347 fi
10348
10349 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10350
10351 for ac_hdr in db.h
10352 do
10353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10355 echo "configure:10356: checking for $ac_hdr" >&5
10356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10357   echo $ac_n "(cached) $ac_c" 1>&6
10358 else
10359   cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362 #include <$ac_hdr>
10363 EOF
10364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10365 { (eval echo configure:10366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10367 if test -z "$ac_err"; then
10368   rm -rf conftest*
10369   eval "ac_cv_header_$ac_safe=yes"
10370 else
10371   echo "$ac_err" >&5
10372   echo "configure: failed program was:" >&5
10373   cat conftest.$ac_ext >&5
10374   rm -rf conftest*
10375   eval "ac_cv_header_$ac_safe=no"
10376 fi
10377 rm -f conftest*
10378 fi
10379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10380   echo "$ac_t""yes" 1>&6
10381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10382   cat >> confdefs.h <<EOF
10383 #define $ac_tr_hdr 1
10384 EOF
10385  
10386 else
10387   echo "$ac_t""no" 1>&6
10388 fi
10389 done
10390
10391 if test $ac_cv_header_db_h = yes ; then
10392         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10393 echo "configure:10394: checking if db.h is DB2" >&5
10394 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
10395   echo $ac_n "(cached) $ac_c" 1>&6
10396 else
10397   
10398                 cat > conftest.$ac_ext <<EOF
10399 #line 10400 "configure"
10400 #include "confdefs.h"
10401
10402 #                       include <db.h>
10403                         /* this check could be improved */
10404 #                       ifdef DB_VERSION_MAJOR
10405 #                               if DB_VERSION_MAJOR == 2
10406                                         __db_version_2;
10407 #                               endif
10408 #                       endif
10409                 
10410 EOF
10411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10412   egrep "__db_version_2" >/dev/null 2>&1; then
10413   rm -rf conftest*
10414   ol_cv_header_db2=yes
10415 else
10416   rm -rf conftest*
10417   ol_cv_header_db2=no
10418 fi
10419 rm -f conftest*
10420
10421 fi
10422
10423 echo "$ac_t""$ol_cv_header_db2" 1>&6
10424 else
10425         ol_cv_header_db2=no
10426 fi
10427
10428
10429  
10430  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10431 echo "configure:10432: checking for Berkeley DB2" >&5
10432 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
10433   echo $ac_n "(cached) $ac_c" 1>&6
10434 else
10435   
10436         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10437                 ol_cv_berkeley_db2=no
10438         else
10439                 ol_cv_berkeley_db2=yes
10440         fi
10441
10442 fi
10443
10444 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10445  if test $ol_cv_berkeley_db2 = yes ; then
10446         cat >> confdefs.h <<\EOF
10447 #define HAVE_BERKELEY_DB2 1
10448 EOF
10449
10450  fi
10451
10452
10453         if test $ol_cv_berkeley_db2 = yes ; then
10454                 ol_link_ldbm=db2
10455                 ol_with_ldbm_api=db2
10456
10457                 if test $ol_with_ldbm_type = hash ; then
10458                         cat >> confdefs.h <<\EOF
10459 #define LDBM_USE_DBHASH 1
10460 EOF
10461
10462                 else
10463                         cat >> confdefs.h <<\EOF
10464 #define LDBM_USE_DBBTREE 1
10465 EOF
10466
10467                 fi
10468
10469                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10470 echo "configure:10471: checking for DB_THREAD support" >&5
10471 if eval "test \"`echo '$''{'ol_cv_berkeley_db2_db_thread'+set}'`\" = set"; then
10472   echo $ac_n "(cached) $ac_c" 1>&6
10473 else
10474   
10475         ol_LIBS="$LIBS"
10476         if test $ol_cv_lib_db2 != yes ; then
10477                 LIBS="$ol_cv_lib_db2"
10478         fi
10479
10480         if test "$cross_compiling" = yes; then
10481   ol_cv_berkeley_db2_db_thread=cross
10482 else
10483   cat > conftest.$ac_ext <<EOF
10484 #line 10485 "configure"
10485 #include "confdefs.h"
10486
10487 #include <db.h>
10488 #ifndef NULL
10489 #define NULL ((void *)0)
10490 #endif
10491 main()
10492 {
10493         int rc;
10494         DB_ENV env;
10495         u_int32_t flags = DB_CREATE | DB_THREAD;
10496
10497         memset( &env, '\0', sizeof(env) );
10498
10499         rc = db_appinit( NULL, NULL, &env, flags );
10500
10501         if( rc == 0 ) {
10502                 db_appexit( &env );
10503         }
10504
10505         return rc;
10506 }
10507 EOF
10508 if { (eval echo configure:10509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10509 then
10510   ol_cv_berkeley_db2_db_thread=yes
10511 else
10512   echo "configure: failed program was:" >&5
10513   cat conftest.$ac_ext >&5
10514   rm -fr conftest*
10515   ol_cv_berkeley_db2_db_thread=no
10516 fi
10517 rm -fr conftest*
10518 fi
10519
10520
10521         LIBS="$ol_LIBS"
10522
10523         if test $ol_cv_berkeley_db2_db_thread != no ; then
10524                 cat >> confdefs.h <<\EOF
10525 #define HAVE_BERKELEY_DB2_DB_THREAD 1
10526 EOF
10527
10528         fi
10529
10530 fi
10531
10532 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
10533
10534                                                 if test $ol_cv_lib_db2 != yes ; then
10535                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10536                 fi
10537         fi
10538 fi
10539
10540 ol_link_bdb2=no
10541 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10542         if test $ol_cv_berkeley_db2_db_thread != no ; then
10543                 ol_link_bdb2=yes
10544         else
10545                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
10546         fi
10547 fi
10548
10549 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10550         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10551 echo "configure:10552: checking for Berkeley DB library" >&5
10552 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
10553   echo $ac_n "(cached) $ac_c" 1>&6
10554 else
10555   
10556         for ac_hdr in db1/db.h
10557 do
10558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10560 echo "configure:10561: checking for $ac_hdr" >&5
10561 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10562   echo $ac_n "(cached) $ac_c" 1>&6
10563 else
10564   cat > conftest.$ac_ext <<EOF
10565 #line 10566 "configure"
10566 #include "confdefs.h"
10567 #include <$ac_hdr>
10568 EOF
10569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10570 { (eval echo configure:10571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10572 if test -z "$ac_err"; then
10573   rm -rf conftest*
10574   eval "ac_cv_header_$ac_safe=yes"
10575 else
10576   echo "$ac_err" >&5
10577   echo "configure: failed program was:" >&5
10578   cat conftest.$ac_ext >&5
10579   rm -rf conftest*
10580   eval "ac_cv_header_$ac_safe=no"
10581 fi
10582 rm -f conftest*
10583 fi
10584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10585   echo "$ac_t""yes" 1>&6
10586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10587   cat >> confdefs.h <<EOF
10588 #define $ac_tr_hdr 1
10589 EOF
10590  
10591 else
10592   echo "$ac_t""no" 1>&6
10593 fi
10594 done
10595
10596         ol_LIBS="$LIBS"
10597         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10598 echo "configure:10599: checking for dbopen" >&5
10599 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605 /* System header to define __stub macros and hopefully few prototypes,
10606     which can conflict with char dbopen(); below.  */
10607 #include <assert.h>
10608 /* Override any gcc2 internal prototype to avoid an error.  */
10609 /* We use char because int might match the return type of a gcc2
10610     builtin and then its argument prototype would still apply.  */
10611 char dbopen();
10612
10613 int main() {
10614
10615 /* The GNU C library defines this for functions which it implements
10616     to always fail with ENOSYS.  Some functions are actually named
10617     something starting with __ and the normal name is an alias.  */
10618 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10619 choke me
10620 #else
10621 dbopen();
10622 #endif
10623
10624 ; return 0; }
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10627   rm -rf conftest*
10628   eval "ac_cv_func_dbopen=yes"
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_func_dbopen=no"
10634 fi
10635 rm -f conftest*
10636 fi
10637
10638 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10639   echo "$ac_t""yes" 1>&6
10640   ol_cv_lib_db=yes
10641 else
10642   echo "$ac_t""no" 1>&6
10643
10644                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10645 echo "configure:10646: checking for dbopen in -ldb1" >&5
10646 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
10647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10648   echo $ac_n "(cached) $ac_c" 1>&6
10649 else
10650   ac_save_LIBS="$LIBS"
10651 LIBS="-ldb1  $LIBS"
10652 cat > conftest.$ac_ext <<EOF
10653 #line 10654 "configure"
10654 #include "confdefs.h"
10655 /* Override any gcc2 internal prototype to avoid an error.  */
10656 /* We use char because int might match the return type of a gcc2
10657     builtin and then its argument prototype would still apply.  */
10658 char dbopen();
10659
10660 int main() {
10661 dbopen()
10662 ; return 0; }
10663 EOF
10664 if { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10665   rm -rf conftest*
10666   eval "ac_cv_lib_$ac_lib_var=yes"
10667 else
10668   echo "configure: failed program was:" >&5
10669   cat conftest.$ac_ext >&5
10670   rm -rf conftest*
10671   eval "ac_cv_lib_$ac_lib_var=no"
10672 fi
10673 rm -f conftest*
10674 LIBS="$ac_save_LIBS"
10675
10676 fi
10677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10678   echo "$ac_t""yes" 1>&6
10679   ol_cv_lib_db=-ldb1
10680 else
10681   echo "$ac_t""no" 1>&6
10682
10683                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10684 echo "configure:10685: checking for dbopen in -ldb" >&5
10685 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
10686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   ac_save_LIBS="$LIBS"
10690 LIBS="-ldb  $LIBS"
10691 cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694 /* Override any gcc2 internal prototype to avoid an error.  */
10695 /* We use char because int might match the return type of a gcc2
10696     builtin and then its argument prototype would still apply.  */
10697 char dbopen();
10698
10699 int main() {
10700 dbopen()
10701 ; return 0; }
10702 EOF
10703 if { (eval echo configure:10704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10704   rm -rf conftest*
10705   eval "ac_cv_lib_$ac_lib_var=yes"
10706 else
10707   echo "configure: failed program was:" >&5
10708   cat conftest.$ac_ext >&5
10709   rm -rf conftest*
10710   eval "ac_cv_lib_$ac_lib_var=no"
10711 fi
10712 rm -f conftest*
10713 LIBS="$ac_save_LIBS"
10714
10715 fi
10716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10717   echo "$ac_t""yes" 1>&6
10718   ol_cv_lib_db=-ldb
10719 else
10720   echo "$ac_t""no" 1>&6
10721 ol_cv_lib_db=no
10722 fi
10723
10724                 
10725 fi
10726
10727         
10728 fi
10729
10730         LIBS="$ol_LIBS"
10731
10732 fi
10733
10734 echo "$ac_t""$ol_cv_lib_db" 1>&6
10735
10736
10737 for ac_hdr in db_185.h
10738 do
10739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10741 echo "configure:10742: checking for $ac_hdr" >&5
10742 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10743   echo $ac_n "(cached) $ac_c" 1>&6
10744 else
10745   cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748 #include <$ac_hdr>
10749 EOF
10750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10751 { (eval echo configure:10752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10753 if test -z "$ac_err"; then
10754   rm -rf conftest*
10755   eval "ac_cv_header_$ac_safe=yes"
10756 else
10757   echo "$ac_err" >&5
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_header_$ac_safe=no"
10762 fi
10763 rm -f conftest*
10764 fi
10765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10768   cat >> confdefs.h <<EOF
10769 #define $ac_tr_hdr 1
10770 EOF
10771  
10772 else
10773   echo "$ac_t""no" 1>&6
10774 fi
10775 done
10776
10777 if test "$ol_cv_header_db2" = yes ; then
10778         
10779         ol_cv_header_db=$ac_cv_header_db_185_h
10780 else
10781         ol_cv_header_db=$ac_cv_header_db_h
10782 fi
10783
10784
10785  
10786  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10787 echo "configure:10788: checking for Berkeley DB" >&5
10788 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
10789   echo $ac_n "(cached) $ac_c" 1>&6
10790 else
10791   
10792         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10793                 ol_cv_berkeley_db=no
10794         else
10795                 ol_cv_berkeley_db=yes
10796         fi
10797
10798 fi
10799
10800 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10801  if test $ol_cv_berkeley_db = yes ; then
10802         cat >> confdefs.h <<\EOF
10803 #define HAVE_BERKELEY_DB 1
10804 EOF
10805
10806  fi
10807
10808
10809         if test $ol_cv_berkeley_db = yes ; then
10810                 ol_link_ldbm=db
10811                 ol_with_ldbm_api=db
10812
10813                 if test $ol_with_ldbm_type = hash ; then
10814                         cat >> confdefs.h <<\EOF
10815 #define LDBM_USE_DBHASH 1
10816 EOF
10817
10818                 else
10819                         cat >> confdefs.h <<\EOF
10820 #define LDBM_USE_DBBTREE 1
10821 EOF
10822
10823                 fi
10824
10825                                                 if test $ol_cv_lib_db != yes ; then
10826                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10827                 fi
10828         fi
10829 fi
10830
10831 if test $ol_with_ldbm_api = manual ; then
10832                 ol_link_ldbm=yes
10833
10834         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10835
10836         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10837 do
10838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10840 echo "configure:10841: checking for $ac_hdr" >&5
10841 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10842   echo $ac_n "(cached) $ac_c" 1>&6
10843 else
10844   cat > conftest.$ac_ext <<EOF
10845 #line 10846 "configure"
10846 #include "confdefs.h"
10847 #include <$ac_hdr>
10848 EOF
10849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10850 { (eval echo configure:10851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10852 if test -z "$ac_err"; then
10853   rm -rf conftest*
10854   eval "ac_cv_header_$ac_safe=yes"
10855 else
10856   echo "$ac_err" >&5
10857   echo "configure: failed program was:" >&5
10858   cat conftest.$ac_ext >&5
10859   rm -rf conftest*
10860   eval "ac_cv_header_$ac_safe=no"
10861 fi
10862 rm -f conftest*
10863 fi
10864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10865   echo "$ac_t""yes" 1>&6
10866     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10867   cat >> confdefs.h <<EOF
10868 #define $ac_tr_hdr 1
10869 EOF
10870  
10871 else
10872   echo "$ac_t""no" 1>&6
10873 fi
10874 done
10875
10876 fi
10877
10878 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10879         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10880         ol_with_ldbm_api=none
10881 fi
10882
10883 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10884         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10885 echo "configure:10886: checking for MDBM library" >&5
10886 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
10887   echo $ac_n "(cached) $ac_c" 1>&6
10888 else
10889         ol_LIBS="$LIBS"
10890         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10891 echo "configure:10892: checking for mdbm_set_chain" >&5
10892 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
10893   echo $ac_n "(cached) $ac_c" 1>&6
10894 else
10895   cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 /* System header to define __stub macros and hopefully few prototypes,
10899     which can conflict with char mdbm_set_chain(); below.  */
10900 #include <assert.h>
10901 /* Override any gcc2 internal prototype to avoid an error.  */
10902 /* We use char because int might match the return type of a gcc2
10903     builtin and then its argument prototype would still apply.  */
10904 char mdbm_set_chain();
10905
10906 int main() {
10907
10908 /* The GNU C library defines this for functions which it implements
10909     to always fail with ENOSYS.  Some functions are actually named
10910     something starting with __ and the normal name is an alias.  */
10911 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10912 choke me
10913 #else
10914 mdbm_set_chain();
10915 #endif
10916
10917 ; return 0; }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10920   rm -rf conftest*
10921   eval "ac_cv_func_mdbm_set_chain=yes"
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_func_mdbm_set_chain=no"
10927 fi
10928 rm -f conftest*
10929 fi
10930
10931 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10932   echo "$ac_t""yes" 1>&6
10933   ol_cv_lib_mdbm=yes
10934 else
10935   echo "$ac_t""no" 1>&6
10936
10937                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10938 echo "configure:10939: checking for mdbm_set_chain in -lmdbm" >&5
10939 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
10940 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10941   echo $ac_n "(cached) $ac_c" 1>&6
10942 else
10943   ac_save_LIBS="$LIBS"
10944 LIBS="-lmdbm  $LIBS"
10945 cat > conftest.$ac_ext <<EOF
10946 #line 10947 "configure"
10947 #include "confdefs.h"
10948 /* Override any gcc2 internal prototype to avoid an error.  */
10949 /* We use char because int might match the return type of a gcc2
10950     builtin and then its argument prototype would still apply.  */
10951 char mdbm_set_chain();
10952
10953 int main() {
10954 mdbm_set_chain()
10955 ; return 0; }
10956 EOF
10957 if { (eval echo configure:10958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10958   rm -rf conftest*
10959   eval "ac_cv_lib_$ac_lib_var=yes"
10960 else
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_lib_$ac_lib_var=no"
10965 fi
10966 rm -f conftest*
10967 LIBS="$ac_save_LIBS"
10968
10969 fi
10970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10971   echo "$ac_t""yes" 1>&6
10972   ol_cv_lib_mdbm=-lmdbm
10973 else
10974   echo "$ac_t""no" 1>&6
10975 ol_cv_lib_mdbm=no
10976 fi
10977
10978         
10979 fi
10980
10981         LIBS="$ol_LIBS"
10982
10983 fi
10984
10985 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
10986
10987
10988  for ac_hdr in mdbm.h
10989 do
10990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10992 echo "configure:10993: checking for $ac_hdr" >&5
10993 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10994   echo $ac_n "(cached) $ac_c" 1>&6
10995 else
10996   cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 #include <$ac_hdr>
11000 EOF
11001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11002 { (eval echo configure:11003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11004 if test -z "$ac_err"; then
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=yes"
11007 else
11008   echo "$ac_err" >&5
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -rf conftest*
11012   eval "ac_cv_header_$ac_safe=no"
11013 fi
11014 rm -f conftest*
11015 fi
11016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11017   echo "$ac_t""yes" 1>&6
11018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11019   cat >> confdefs.h <<EOF
11020 #define $ac_tr_hdr 1
11021 EOF
11022  
11023 else
11024   echo "$ac_t""no" 1>&6
11025 fi
11026 done
11027
11028  echo $ac_n "checking for db""... $ac_c" 1>&6
11029 echo "configure:11030: checking for db" >&5
11030 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
11031   echo $ac_n "(cached) $ac_c" 1>&6
11032 else
11033   
11034         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11035                 ol_cv_mdbm=no
11036         else
11037                 ol_cv_mdbm=yes
11038         fi
11039
11040 fi
11041
11042 echo "$ac_t""$ol_cv_mdbm" 1>&6
11043  if test $ol_cv_mdbm = yes ; then
11044         cat >> confdefs.h <<\EOF
11045 #define HAVE_MDBM 1
11046 EOF
11047
11048  fi
11049
11050
11051         if test $ol_cv_mdbm = yes ; then
11052                 ol_link_ldbm=mdbm
11053                 ol_with_ldbm_api=mdbm
11054                 if test $ol_cv_lib_mdbm != yes ; then
11055                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11056                 fi
11057         fi
11058 fi
11059
11060 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11061         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11062 echo "configure:11063: checking for GDBM library" >&5
11063 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
11064   echo $ac_n "(cached) $ac_c" 1>&6
11065 else
11066         ol_LIBS="$LIBS"
11067         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11068 echo "configure:11069: checking for gdbm_open" >&5
11069 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
11070   echo $ac_n "(cached) $ac_c" 1>&6
11071 else
11072   cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 /* System header to define __stub macros and hopefully few prototypes,
11076     which can conflict with char gdbm_open(); below.  */
11077 #include <assert.h>
11078 /* Override any gcc2 internal prototype to avoid an error.  */
11079 /* We use char because int might match the return type of a gcc2
11080     builtin and then its argument prototype would still apply.  */
11081 char gdbm_open();
11082
11083 int main() {
11084
11085 /* The GNU C library defines this for functions which it implements
11086     to always fail with ENOSYS.  Some functions are actually named
11087     something starting with __ and the normal name is an alias.  */
11088 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11089 choke me
11090 #else
11091 gdbm_open();
11092 #endif
11093
11094 ; return 0; }
11095 EOF
11096 if { (eval echo configure:11097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11097   rm -rf conftest*
11098   eval "ac_cv_func_gdbm_open=yes"
11099 else
11100   echo "configure: failed program was:" >&5
11101   cat conftest.$ac_ext >&5
11102   rm -rf conftest*
11103   eval "ac_cv_func_gdbm_open=no"
11104 fi
11105 rm -f conftest*
11106 fi
11107
11108 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110   ol_cv_lib_gdbm=yes
11111 else
11112   echo "$ac_t""no" 1>&6
11113
11114                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11115 echo "configure:11116: checking for gdbm_open in -lgdbm" >&5
11116 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
11117 if eval "test \"`echo '$''{'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="-lgdbm  $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 gdbm_open();
11129
11130 int main() {
11131 gdbm_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_gdbm=-lgdbm
11150 else
11151   echo "$ac_t""no" 1>&6
11152 ol_cv_lib_gdbm=no
11153 fi
11154
11155         
11156 fi
11157
11158         LIBS="$ol_LIBS"
11159
11160 fi
11161
11162 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11163
11164
11165  for ac_hdr in gdbm.h
11166 do
11167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11169 echo "configure:11170: checking for $ac_hdr" >&5
11170 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11171   echo $ac_n "(cached) $ac_c" 1>&6
11172 else
11173   cat > conftest.$ac_ext <<EOF
11174 #line 11175 "configure"
11175 #include "confdefs.h"
11176 #include <$ac_hdr>
11177 EOF
11178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11179 { (eval echo configure:11180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11181 if test -z "$ac_err"; then
11182   rm -rf conftest*
11183   eval "ac_cv_header_$ac_safe=yes"
11184 else
11185   echo "$ac_err" >&5
11186   echo "configure: failed program was:" >&5
11187   cat conftest.$ac_ext >&5
11188   rm -rf conftest*
11189   eval "ac_cv_header_$ac_safe=no"
11190 fi
11191 rm -f conftest*
11192 fi
11193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11194   echo "$ac_t""yes" 1>&6
11195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11196   cat >> confdefs.h <<EOF
11197 #define $ac_tr_hdr 1
11198 EOF
11199  
11200 else
11201   echo "$ac_t""no" 1>&6
11202 fi
11203 done
11204
11205  echo $ac_n "checking for db""... $ac_c" 1>&6
11206 echo "configure:11207: checking for db" >&5
11207 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210   
11211         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11212                 ol_cv_gdbm=no
11213         else
11214                 ol_cv_gdbm=yes
11215         fi
11216
11217 fi
11218
11219 echo "$ac_t""$ol_cv_gdbm" 1>&6
11220  if test $ol_cv_gdbm = yes ; then
11221         cat >> confdefs.h <<\EOF
11222 #define HAVE_GDBM 1
11223 EOF
11224
11225  fi
11226
11227
11228         if test $ol_cv_gdbm = yes ; then
11229                 ol_link_ldbm=gdbm
11230                 ol_with_ldbm_api=gdbm
11231
11232                 if test $ol_cv_lib_gdbm != yes ; then
11233                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11234                 fi
11235         fi
11236 fi
11237
11238 if test $ol_with_ldbm_api = auto ; then
11239         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11240 elif test $ol_with_ldbm_api = ndbm ; then
11241         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11242 echo "configure:11243: checking for NDBM library" >&5
11243 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246         ol_LIBS="$LIBS"
11247         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11248 echo "configure:11249: checking for dbm_open" >&5
11249 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
11250   echo $ac_n "(cached) $ac_c" 1>&6
11251 else
11252   cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 /* System header to define __stub macros and hopefully few prototypes,
11256     which can conflict with char dbm_open(); below.  */
11257 #include <assert.h>
11258 /* Override any gcc2 internal prototype to avoid an error.  */
11259 /* We use char because int might match the return type of a gcc2
11260     builtin and then its argument prototype would still apply.  */
11261 char dbm_open();
11262
11263 int main() {
11264
11265 /* The GNU C library defines this for functions which it implements
11266     to always fail with ENOSYS.  Some functions are actually named
11267     something starting with __ and the normal name is an alias.  */
11268 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11269 choke me
11270 #else
11271 dbm_open();
11272 #endif
11273
11274 ; return 0; }
11275 EOF
11276 if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11277   rm -rf conftest*
11278   eval "ac_cv_func_dbm_open=yes"
11279 else
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   eval "ac_cv_func_dbm_open=no"
11284 fi
11285 rm -f conftest*
11286 fi
11287
11288 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11289   echo "$ac_t""yes" 1>&6
11290   ol_cv_lib_ndbm=yes
11291 else
11292   echo "$ac_t""no" 1>&6
11293
11294                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11295 echo "configure:11296: checking for dbm_open in -lndbm" >&5
11296 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
11297 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   ac_save_LIBS="$LIBS"
11301 LIBS="-lndbm  $LIBS"
11302 cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 /* Override any gcc2 internal prototype to avoid an error.  */
11306 /* We use char because int might match the return type of a gcc2
11307     builtin and then its argument prototype would still apply.  */
11308 char dbm_open();
11309
11310 int main() {
11311 dbm_open()
11312 ; return 0; }
11313 EOF
11314 if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11315   rm -rf conftest*
11316   eval "ac_cv_lib_$ac_lib_var=yes"
11317 else
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   eval "ac_cv_lib_$ac_lib_var=no"
11322 fi
11323 rm -f conftest*
11324 LIBS="$ac_save_LIBS"
11325
11326 fi
11327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329   ol_cv_lib_ndbm=-lndbm
11330 else
11331   echo "$ac_t""no" 1>&6
11332
11333                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11334 echo "configure:11335: checking for dbm_open in -ldbm" >&5
11335 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   ac_save_LIBS="$LIBS"
11340 LIBS="-ldbm  $LIBS"
11341 cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344 /* Override any gcc2 internal prototype to avoid an error.  */
11345 /* We use char because int might match the return type of a gcc2
11346     builtin and then its argument prototype would still apply.  */
11347 char dbm_open();
11348
11349 int main() {
11350 dbm_open()
11351 ; return 0; }
11352 EOF
11353 if { (eval echo configure:11354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11354   rm -rf conftest*
11355   eval "ac_cv_lib_$ac_lib_var=yes"
11356 else
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -rf conftest*
11360   eval "ac_cv_lib_$ac_lib_var=no"
11361 fi
11362 rm -f conftest*
11363 LIBS="$ac_save_LIBS"
11364
11365 fi
11366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11367   echo "$ac_t""yes" 1>&6
11368   ol_cv_lib_ndbm=-ldbm
11369 else
11370   echo "$ac_t""no" 1>&6
11371 ol_cv_lib_ndbm=no
11372 fi
11373                 
11374 fi
11375
11376         
11377 fi
11378
11379         LIBS="$ol_LIBS"
11380
11381 fi
11382
11383 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11384
11385
11386  for ac_hdr in ndbm.h
11387 do
11388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11390 echo "configure:11391: checking for $ac_hdr" >&5
11391 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11392   echo $ac_n "(cached) $ac_c" 1>&6
11393 else
11394   cat > conftest.$ac_ext <<EOF
11395 #line 11396 "configure"
11396 #include "confdefs.h"
11397 #include <$ac_hdr>
11398 EOF
11399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11400 { (eval echo configure:11401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11402 if test -z "$ac_err"; then
11403   rm -rf conftest*
11404   eval "ac_cv_header_$ac_safe=yes"
11405 else
11406   echo "$ac_err" >&5
11407   echo "configure: failed program was:" >&5
11408   cat conftest.$ac_ext >&5
11409   rm -rf conftest*
11410   eval "ac_cv_header_$ac_safe=no"
11411 fi
11412 rm -f conftest*
11413 fi
11414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11415   echo "$ac_t""yes" 1>&6
11416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11417   cat >> confdefs.h <<EOF
11418 #define $ac_tr_hdr 1
11419 EOF
11420  
11421 else
11422   echo "$ac_t""no" 1>&6
11423 fi
11424 done
11425
11426  echo $ac_n "checking for db""... $ac_c" 1>&6
11427 echo "configure:11428: checking for db" >&5
11428 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
11429   echo $ac_n "(cached) $ac_c" 1>&6
11430 else
11431   
11432         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11433                 ol_cv_ndbm=no
11434         else
11435                 ol_cv_ndbm=yes
11436         fi
11437
11438 fi
11439
11440 echo "$ac_t""$ol_cv_ndbm" 1>&6
11441  if test $ol_cv_ndbm = yes ; then
11442         cat >> confdefs.h <<\EOF
11443 #define HAVE_NDBM 1
11444 EOF
11445
11446  fi
11447
11448
11449         if test $ol_cv_ndbm = yes ; then
11450                 ol_link_ldbm=ndbm
11451                 ol_with_ldbm_api=ndbm
11452
11453                 if test $ol_cv_lib_ndbm != yes ; then
11454                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11455                 fi
11456         fi
11457 fi
11458
11459 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11460         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11461         if test $ol_enable_ldbm = yes ; then
11462                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11463         fi
11464
11465         echo "configure: warning: disabling LDBM" 1>&2
11466         ol_enable_ldbm=no
11467 fi
11468
11469 if test $ol_enable_wrappers != no ; then
11470         for ac_hdr in tcpd.h
11471 do
11472 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11473 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11474 echo "configure:11475: checking for $ac_hdr" >&5
11475 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   cat > conftest.$ac_ext <<EOF
11479 #line 11480 "configure"
11480 #include "confdefs.h"
11481 #include <$ac_hdr>
11482 EOF
11483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11484 { (eval echo configure:11485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11486 if test -z "$ac_err"; then
11487   rm -rf conftest*
11488   eval "ac_cv_header_$ac_safe=yes"
11489 else
11490   echo "$ac_err" >&5
11491   echo "configure: failed program was:" >&5
11492   cat conftest.$ac_ext >&5
11493   rm -rf conftest*
11494   eval "ac_cv_header_$ac_safe=no"
11495 fi
11496 rm -f conftest*
11497 fi
11498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11499   echo "$ac_t""yes" 1>&6
11500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11501   cat >> confdefs.h <<EOF
11502 #define $ac_tr_hdr 1
11503 EOF
11504  
11505 else
11506   echo "$ac_t""no" 1>&6
11507 fi
11508 done
11509
11510
11511         if test $ac_cv_header_tcpd_h != yes ; then
11512                 have_wrappers=no
11513         else
11514                 cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517
11518 int allow_severity = 0;
11519 int deny_severity  = 0;
11520                 
11521 int main() {
11522 hosts_access()
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11526   rm -rf conftest*
11527   have_wrappers=yes
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   have_wrappers=no
11533 fi
11534 rm -f conftest*
11535         fi
11536
11537         if test $have_wrappers = yes ; then
11538                 cat >> confdefs.h <<\EOF
11539 #define HAVE_TCPD 1
11540 EOF
11541
11542                 WRAP_LIBS="-lwrap"
11543
11544                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11545 echo "configure:11546: checking for main in -lnsl" >&5
11546 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
11547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11548   echo $ac_n "(cached) $ac_c" 1>&6
11549 else
11550   ac_save_LIBS="$LIBS"
11551 LIBS="-lnsl  $LIBS"
11552 cat > conftest.$ac_ext <<EOF
11553 #line 11554 "configure"
11554 #include "confdefs.h"
11555
11556 int main() {
11557 main()
11558 ; return 0; }
11559 EOF
11560 if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561   rm -rf conftest*
11562   eval "ac_cv_lib_$ac_lib_var=yes"
11563 else
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -rf conftest*
11567   eval "ac_cv_lib_$ac_lib_var=no"
11568 fi
11569 rm -f conftest*
11570 LIBS="$ac_save_LIBS"
11571
11572 fi
11573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11574   echo "$ac_t""yes" 1>&6
11575     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11576     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11577   cat >> confdefs.h <<EOF
11578 #define $ac_tr_lib 1
11579 EOF
11580
11581   LIBS="-lnsl $LIBS"
11582
11583 else
11584   echo "$ac_t""no" 1>&6
11585 fi
11586
11587         else
11588                 echo "configure: warning: could not find -lwrap" 1>&2
11589                 if test $ol_enable_wrappers = yes ; then
11590                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11591                 fi
11592
11593                 echo "configure: warning: disabling wrappers support" 1>&2
11594                 ol_enable_wrappers=no
11595                 WRAP_LIBS=""
11596         fi
11597 fi
11598
11599 if test $ol_enable_syslog != no ; then
11600         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11601 echo "configure:11602: checking for openlog" >&5
11602 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 /* System header to define __stub macros and hopefully few prototypes,
11609     which can conflict with char openlog(); below.  */
11610 #include <assert.h>
11611 /* Override any gcc2 internal prototype to avoid an error.  */
11612 /* We use char because int might match the return type of a gcc2
11613     builtin and then its argument prototype would still apply.  */
11614 char openlog();
11615
11616 int main() {
11617
11618 /* The GNU C library defines this for functions which it implements
11619     to always fail with ENOSYS.  Some functions are actually named
11620     something starting with __ and the normal name is an alias.  */
11621 #if defined (__stub_openlog) || defined (__stub___openlog)
11622 choke me
11623 #else
11624 openlog();
11625 #endif
11626
11627 ; return 0; }
11628 EOF
11629 if { (eval echo configure:11630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11630   rm -rf conftest*
11631   eval "ac_cv_func_openlog=yes"
11632 else
11633   echo "configure: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   rm -rf conftest*
11636   eval "ac_cv_func_openlog=no"
11637 fi
11638 rm -f conftest*
11639 fi
11640
11641 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11642   echo "$ac_t""yes" 1>&6
11643   :
11644 else
11645   echo "$ac_t""no" 1>&6
11646 fi
11647
11648         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11649                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11650         fi
11651         ol_enable_syslog=$ac_cv_func_openlog
11652 fi
11653
11654 if test $ol_enable_dmalloc != no ; then
11655         for ac_hdr in dmalloc.h
11656 do
11657 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11658 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11659 echo "configure:11660: checking for $ac_hdr" >&5
11660 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11661   echo $ac_n "(cached) $ac_c" 1>&6
11662 else
11663   cat > conftest.$ac_ext <<EOF
11664 #line 11665 "configure"
11665 #include "confdefs.h"
11666 #include <$ac_hdr>
11667 EOF
11668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11669 { (eval echo configure:11670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11671 if test -z "$ac_err"; then
11672   rm -rf conftest*
11673   eval "ac_cv_header_$ac_safe=yes"
11674 else
11675   echo "$ac_err" >&5
11676   echo "configure: failed program was:" >&5
11677   cat conftest.$ac_ext >&5
11678   rm -rf conftest*
11679   eval "ac_cv_header_$ac_safe=no"
11680 fi
11681 rm -f conftest*
11682 fi
11683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11684   echo "$ac_t""yes" 1>&6
11685     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11686   cat >> confdefs.h <<EOF
11687 #define $ac_tr_hdr 1
11688 EOF
11689  
11690 else
11691   echo "$ac_t""no" 1>&6
11692 fi
11693 done
11694
11695         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11696 echo "configure:11697: checking for dmalloc_shutdown in -ldmalloc" >&5
11697 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
11698 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11699   echo $ac_n "(cached) $ac_c" 1>&6
11700 else
11701   ac_save_LIBS="$LIBS"
11702 LIBS="-ldmalloc  $LIBS"
11703 cat > conftest.$ac_ext <<EOF
11704 #line 11705 "configure"
11705 #include "confdefs.h"
11706 /* Override any gcc2 internal prototype to avoid an error.  */
11707 /* We use char because int might match the return type of a gcc2
11708     builtin and then its argument prototype would still apply.  */
11709 char dmalloc_shutdown();
11710
11711 int main() {
11712 dmalloc_shutdown()
11713 ; return 0; }
11714 EOF
11715 if { (eval echo configure:11716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11716   rm -rf conftest*
11717   eval "ac_cv_lib_$ac_lib_var=yes"
11718 else
11719   echo "configure: failed program was:" >&5
11720   cat conftest.$ac_ext >&5
11721   rm -rf conftest*
11722   eval "ac_cv_lib_$ac_lib_var=no"
11723 fi
11724 rm -f conftest*
11725 LIBS="$ac_save_LIBS"
11726
11727 fi
11728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11729   echo "$ac_t""yes" 1>&6
11730     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11731     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11732   cat >> confdefs.h <<EOF
11733 #define $ac_tr_lib 1
11734 EOF
11735
11736   LIBS="-ldmalloc $LIBS"
11737
11738 else
11739   echo "$ac_t""no" 1>&6
11740 fi
11741
11742 fi
11743
11744 if test $ol_enable_tcl != no ; then
11745         for ac_hdr in tcl.h
11746 do
11747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11749 echo "configure:11750: checking for $ac_hdr" >&5
11750 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11751   echo $ac_n "(cached) $ac_c" 1>&6
11752 else
11753   cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756 #include <$ac_hdr>
11757 EOF
11758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11759 { (eval echo configure:11760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11761 if test -z "$ac_err"; then
11762   rm -rf conftest*
11763   eval "ac_cv_header_$ac_safe=yes"
11764 else
11765   echo "$ac_err" >&5
11766   echo "configure: failed program was:" >&5
11767   cat conftest.$ac_ext >&5
11768   rm -rf conftest*
11769   eval "ac_cv_header_$ac_safe=no"
11770 fi
11771 rm -f conftest*
11772 fi
11773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11774   echo "$ac_t""yes" 1>&6
11775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11776   cat >> confdefs.h <<EOF
11777 #define $ac_tr_hdr 1
11778 EOF
11779  
11780 else
11781   echo "$ac_t""no" 1>&6
11782 fi
11783 done
11784
11785
11786         if test $ac_cv_header_tcl_h != yes ; then
11787                 have_tcl=no
11788         else
11789                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11790 echo "configure:11791: checking for main in -ltcl" >&5
11791 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
11792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11793   echo $ac_n "(cached) $ac_c" 1>&6
11794 else
11795   ac_save_LIBS="$LIBS"
11796 LIBS="-ltcl  $LIBS"
11797 cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800
11801 int main() {
11802 main()
11803 ; return 0; }
11804 EOF
11805 if { (eval echo configure:11806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11806   rm -rf conftest*
11807   eval "ac_cv_lib_$ac_lib_var=yes"
11808 else
11809   echo "configure: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   rm -rf conftest*
11812   eval "ac_cv_lib_$ac_lib_var=no"
11813 fi
11814 rm -f conftest*
11815 LIBS="$ac_save_LIBS"
11816
11817 fi
11818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11819   echo "$ac_t""yes" 1>&6
11820   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11821 else
11822   echo "$ac_t""no" 1>&6
11823 have_tcl=no
11824 fi
11825
11826
11827                 if test $have_tcl != yes; then
11828                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11829 echo "configure:11830: checking for main in -ltcl7.6" >&5
11830 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
11831 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11832   echo $ac_n "(cached) $ac_c" 1>&6
11833 else
11834   ac_save_LIBS="$LIBS"
11835 LIBS="-ltcl7.6  $LIBS"
11836 cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839
11840 int main() {
11841 main()
11842 ; return 0; }
11843 EOF
11844 if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11845   rm -rf conftest*
11846   eval "ac_cv_lib_$ac_lib_var=yes"
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   eval "ac_cv_lib_$ac_lib_var=no"
11852 fi
11853 rm -f conftest*
11854 LIBS="$ac_save_LIBS"
11855
11856 fi
11857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11858   echo "$ac_t""yes" 1>&6
11859   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11860 else
11861   echo "$ac_t""no" 1>&6
11862 have_tcl=no
11863 fi
11864
11865                 fi
11866
11867                 if test $have_tcl != yes; then
11868                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11869 echo "configure:11870: checking for main in -ltcl8.0" >&5
11870 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
11871 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   ac_save_LIBS="$LIBS"
11875 LIBS="-ltcl8.0  $LIBS"
11876 cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879
11880 int main() {
11881 main()
11882 ; return 0; }
11883 EOF
11884 if { (eval echo configure:11885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11885   rm -rf conftest*
11886   eval "ac_cv_lib_$ac_lib_var=yes"
11887 else
11888   echo "configure: failed program was:" >&5
11889   cat conftest.$ac_ext >&5
11890   rm -rf conftest*
11891   eval "ac_cv_lib_$ac_lib_var=no"
11892 fi
11893 rm -f conftest*
11894 LIBS="$ac_save_LIBS"
11895
11896 fi
11897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11898   echo "$ac_t""yes" 1>&6
11899   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11900 else
11901   echo "$ac_t""no" 1>&6
11902 have_tcl=no
11903 fi
11904
11905                 fi
11906         fi
11907
11908         if test $have_tcl != yes ; then
11909                 echo "configure: warning: could not find -ltcl" 1>&2
11910                 if test $ol_enable_tcl = yes ; then
11911                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11912                 fi
11913
11914                 ol_enable_tcl=no
11915         fi
11916 fi
11917
11918 ol_link_termcap=no
11919 for ac_hdr in termcap.h ncurses.h
11920 do
11921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11923 echo "configure:11924: checking for $ac_hdr" >&5
11924 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11925   echo $ac_n "(cached) $ac_c" 1>&6
11926 else
11927   cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930 #include <$ac_hdr>
11931 EOF
11932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11933 { (eval echo configure:11934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11935 if test -z "$ac_err"; then
11936   rm -rf conftest*
11937   eval "ac_cv_header_$ac_safe=yes"
11938 else
11939   echo "$ac_err" >&5
11940   echo "configure: failed program was:" >&5
11941   cat conftest.$ac_ext >&5
11942   rm -rf conftest*
11943   eval "ac_cv_header_$ac_safe=no"
11944 fi
11945 rm -f conftest*
11946 fi
11947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11948   echo "$ac_t""yes" 1>&6
11949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11950   cat >> confdefs.h <<EOF
11951 #define $ac_tr_hdr 1
11952 EOF
11953  
11954 else
11955   echo "$ac_t""no" 1>&6
11956 fi
11957 done
11958
11959
11960 if test $ol_link_termcap = no ; then
11961         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
11962 echo "configure:11963: checking for tputs in -ltermcap" >&5
11963 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
11964 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11965   echo $ac_n "(cached) $ac_c" 1>&6
11966 else
11967   ac_save_LIBS="$LIBS"
11968 LIBS="-ltermcap  $LIBS"
11969 cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 /* Override any gcc2 internal prototype to avoid an error.  */
11973 /* We use char because int might match the return type of a gcc2
11974     builtin and then its argument prototype would still apply.  */
11975 char tputs();
11976
11977 int main() {
11978 tputs()
11979 ; return 0; }
11980 EOF
11981 if { (eval echo configure:11982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11982   rm -rf conftest*
11983   eval "ac_cv_lib_$ac_lib_var=yes"
11984 else
11985   echo "configure: failed program was:" >&5
11986   cat conftest.$ac_ext >&5
11987   rm -rf conftest*
11988   eval "ac_cv_lib_$ac_lib_var=no"
11989 fi
11990 rm -f conftest*
11991 LIBS="$ac_save_LIBS"
11992
11993 fi
11994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11995   echo "$ac_t""yes" 1>&6
11996   have_termcap=yes
11997 else
11998   echo "$ac_t""no" 1>&6
11999 have_termcap=no
12000 fi
12001
12002         if test $have_termcap = yes ; then
12003                 cat >> confdefs.h <<\EOF
12004 #define HAVE_TERMCAP 1
12005 EOF
12006
12007                 ol_link_termcap=yes
12008                 TERMCAP_LIBS=-ltermcap
12009         fi
12010 fi
12011
12012 if test $ol_link_termcap = no ; then
12013         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12014 echo "configure:12015: checking for initscr in -lncurses" >&5
12015 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
12016 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12017   echo $ac_n "(cached) $ac_c" 1>&6
12018 else
12019   ac_save_LIBS="$LIBS"
12020 LIBS="-lncurses  $LIBS"
12021 cat > conftest.$ac_ext <<EOF
12022 #line 12023 "configure"
12023 #include "confdefs.h"
12024 /* Override any gcc2 internal prototype to avoid an error.  */
12025 /* We use char because int might match the return type of a gcc2
12026     builtin and then its argument prototype would still apply.  */
12027 char initscr();
12028
12029 int main() {
12030 initscr()
12031 ; return 0; }
12032 EOF
12033 if { (eval echo configure:12034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12034   rm -rf conftest*
12035   eval "ac_cv_lib_$ac_lib_var=yes"
12036 else
12037   echo "configure: failed program was:" >&5
12038   cat conftest.$ac_ext >&5
12039   rm -rf conftest*
12040   eval "ac_cv_lib_$ac_lib_var=no"
12041 fi
12042 rm -f conftest*
12043 LIBS="$ac_save_LIBS"
12044
12045 fi
12046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12047   echo "$ac_t""yes" 1>&6
12048   have_ncurses=yes
12049 else
12050   echo "$ac_t""no" 1>&6
12051 have_ncurses=no
12052 fi
12053
12054         if test $have_ncurses = yes ; then
12055                 cat >> confdefs.h <<\EOF
12056 #define HAVE_NCURSES 1
12057 EOF
12058
12059                 ol_link_termcap=yes
12060                 TERMCAP_LIBS=-lncurses
12061         fi
12062 fi
12063
12064 if test $ol_link_termcap = no ; then
12065         cat >> confdefs.h <<\EOF
12066 #define NO_TERMCAP 1
12067 EOF
12068
12069         TERMCAP_LIBS=
12070 fi
12071
12072 ol_link_sasl=no
12073 if test $ol_with_cyrus_sasl != no ; then
12074         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12075 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12076 echo "configure:12077: checking for sasl.h" >&5
12077 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12078   echo $ac_n "(cached) $ac_c" 1>&6
12079 else
12080   cat > conftest.$ac_ext <<EOF
12081 #line 12082 "configure"
12082 #include "confdefs.h"
12083 #include <sasl.h>
12084 EOF
12085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12086 { (eval echo configure:12087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12088 if test -z "$ac_err"; then
12089   rm -rf conftest*
12090   eval "ac_cv_header_$ac_safe=yes"
12091 else
12092   echo "$ac_err" >&5
12093   echo "configure: failed program was:" >&5
12094   cat conftest.$ac_ext >&5
12095   rm -rf conftest*
12096   eval "ac_cv_header_$ac_safe=no"
12097 fi
12098 rm -f conftest*
12099 fi
12100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12101   echo "$ac_t""yes" 1>&6
12102   :
12103 else
12104   echo "$ac_t""no" 1>&6
12105 fi
12106
12107
12108         if test $ac_cv_header_sasl_h = yes ; then
12109                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12110 echo "configure:12111: checking for sasl_client_init in -lsasl" >&5
12111 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
12112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12113   echo $ac_n "(cached) $ac_c" 1>&6
12114 else
12115   ac_save_LIBS="$LIBS"
12116 LIBS="-lsasl  $LIBS"
12117 cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120 /* Override any gcc2 internal prototype to avoid an error.  */
12121 /* We use char because int might match the return type of a gcc2
12122     builtin and then its argument prototype would still apply.  */
12123 char sasl_client_init();
12124
12125 int main() {
12126 sasl_client_init()
12127 ; return 0; }
12128 EOF
12129 if { (eval echo configure:12130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12130   rm -rf conftest*
12131   eval "ac_cv_lib_$ac_lib_var=yes"
12132 else
12133   echo "configure: failed program was:" >&5
12134   cat conftest.$ac_ext >&5
12135   rm -rf conftest*
12136   eval "ac_cv_lib_$ac_lib_var=no"
12137 fi
12138 rm -f conftest*
12139 LIBS="$ac_save_LIBS"
12140
12141 fi
12142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12143   echo "$ac_t""yes" 1>&6
12144   have_cyrus_sasl=yes
12145 else
12146   echo "$ac_t""no" 1>&6
12147 have_cyrus_sasl=no
12148 fi
12149
12150
12151                 if test $have_cyrus_sasl != no ; then
12152                         SASL_LIBS="-lsasl"
12153                         cat >> confdefs.h <<\EOF
12154 #define HAVE_CYRUS_SASL 1
12155 EOF
12156
12157                         ol_link_sasl=yes
12158                 fi
12159         fi
12160
12161         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12162                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12163         fi
12164 fi
12165
12166 ol_link_fetch=no
12167 if test $ol_with_fetch != no ; then
12168         ol=$LIBS
12169 LIBS="-lfetch -lcom_err $LIBS"
12170 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12171 echo "configure:12172: checking fetch(3) library" >&5
12172 if eval "test \"`echo '$''{'ol_cv_lib_fetch'+set}'`\" = set"; then
12173   echo $ac_n "(cached) $ac_c" 1>&6
12174 else
12175   
12176         cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179
12180 #include <sys/param.h>
12181 #include <stdio.h>
12182 #include <fetch.h>
12183 int main() {
12184 struct url *u = fetchParseURL("file:///"); 
12185 ; return 0; }
12186 EOF
12187 if { (eval echo configure:12188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12188   rm -rf conftest*
12189   ol_cv_lib_fetch=yes
12190 else
12191   echo "configure: failed program was:" >&5
12192   cat conftest.$ac_ext >&5
12193   rm -rf conftest*
12194   ol_cv_lib_fetch=no
12195 fi
12196 rm -f conftest*
12197 fi
12198
12199 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12200 LIBS=$ol_LIBS
12201 if test $ol_cv_lib_fetch != no ; then
12202         ol_link_fetch="-lfetch -lcom_err"
12203         cat >> confdefs.h <<\EOF
12204 #define HAVE_FETCH 1
12205 EOF
12206
12207 fi
12208
12209
12210         if test $ol_cv_lib_fetch != no ; then
12211                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12212                 ol_link_fetch=freebsd
12213
12214         elif test $ol_with_fetch != auto ; then
12215                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12216         fi 
12217 fi
12218
12219 ol_link_readline=no
12220 if test $ol_with_readline != no ; then
12221         for ac_hdr in readline/readline.h readline/history.h
12222 do
12223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12225 echo "configure:12226: checking for $ac_hdr" >&5
12226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12227   echo $ac_n "(cached) $ac_c" 1>&6
12228 else
12229   cat > conftest.$ac_ext <<EOF
12230 #line 12231 "configure"
12231 #include "confdefs.h"
12232 #include <$ac_hdr>
12233 EOF
12234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12235 { (eval echo configure:12236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12237 if test -z "$ac_err"; then
12238   rm -rf conftest*
12239   eval "ac_cv_header_$ac_safe=yes"
12240 else
12241   echo "$ac_err" >&5
12242   echo "configure: failed program was:" >&5
12243   cat conftest.$ac_ext >&5
12244   rm -rf conftest*
12245   eval "ac_cv_header_$ac_safe=no"
12246 fi
12247 rm -f conftest*
12248 fi
12249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12250   echo "$ac_t""yes" 1>&6
12251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12252   cat >> confdefs.h <<EOF
12253 #define $ac_tr_hdr 1
12254 EOF
12255  
12256 else
12257   echo "$ac_t""no" 1>&6
12258 fi
12259 done
12260
12261
12262         if test $ac_cv_header_readline_readline_h = yes ; then
12263                 save_LIBS="$LIBS"
12264                 LIBS="$TERMCAP_LIBS $LIBS"
12265                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12266 echo "configure:12267: checking for readline in -lreadline" >&5
12267 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
12268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   ac_save_LIBS="$LIBS"
12272 LIBS="-lreadline  $LIBS"
12273 cat > conftest.$ac_ext <<EOF
12274 #line 12275 "configure"
12275 #include "confdefs.h"
12276 /* Override any gcc2 internal prototype to avoid an error.  */
12277 /* We use char because int might match the return type of a gcc2
12278     builtin and then its argument prototype would still apply.  */
12279 char readline();
12280
12281 int main() {
12282 readline()
12283 ; return 0; }
12284 EOF
12285 if { (eval echo configure:12286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12286   rm -rf conftest*
12287   eval "ac_cv_lib_$ac_lib_var=yes"
12288 else
12289   echo "configure: failed program was:" >&5
12290   cat conftest.$ac_ext >&5
12291   rm -rf conftest*
12292   eval "ac_cv_lib_$ac_lib_var=no"
12293 fi
12294 rm -f conftest*
12295 LIBS="$ac_save_LIBS"
12296
12297 fi
12298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12299   echo "$ac_t""yes" 1>&6
12300   have_readline=yes
12301 else
12302   echo "$ac_t""no" 1>&6
12303 have_readline=no
12304 fi
12305
12306                 LIBS="$save_LIBS"
12307                         
12308                 if test $have_readline = yes ; then
12309                         ol_with_readline=found
12310                         ol_link_readline=yes
12311
12312                         READLINE_LIBS="-lreadline"
12313                 fi
12314         fi
12315 fi
12316
12317 if test $ol_link_readline = yes ; then
12318         cat >> confdefs.h <<\EOF
12319 #define HAVE_READLINE 1
12320 EOF
12321
12322 fi
12323
12324
12325 if test $ol_enable_crypt != no ; then
12326         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12327 echo "configure:12328: checking for crypt" >&5
12328 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
12329   echo $ac_n "(cached) $ac_c" 1>&6
12330 else
12331   cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 /* System header to define __stub macros and hopefully few prototypes,
12335     which can conflict with char crypt(); below.  */
12336 #include <assert.h>
12337 /* Override any gcc2 internal prototype to avoid an error.  */
12338 /* We use char because int might match the return type of a gcc2
12339     builtin and then its argument prototype would still apply.  */
12340 char crypt();
12341
12342 int main() {
12343
12344 /* The GNU C library defines this for functions which it implements
12345     to always fail with ENOSYS.  Some functions are actually named
12346     something starting with __ and the normal name is an alias.  */
12347 #if defined (__stub_crypt) || defined (__stub___crypt)
12348 choke me
12349 #else
12350 crypt();
12351 #endif
12352
12353 ; return 0; }
12354 EOF
12355 if { (eval echo configure:12356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12356   rm -rf conftest*
12357   eval "ac_cv_func_crypt=yes"
12358 else
12359   echo "configure: failed program was:" >&5
12360   cat conftest.$ac_ext >&5
12361   rm -rf conftest*
12362   eval "ac_cv_func_crypt=no"
12363 fi
12364 rm -f conftest*
12365 fi
12366
12367 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12368   echo "$ac_t""yes" 1>&6
12369   have_crypt=yes
12370 else
12371   echo "$ac_t""no" 1>&6
12372
12373                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12374 echo "configure:12375: checking for crypt in -lcrypt" >&5
12375 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12377   echo $ac_n "(cached) $ac_c" 1>&6
12378 else
12379   ac_save_LIBS="$LIBS"
12380 LIBS="-lcrypt  $LIBS"
12381 cat > conftest.$ac_ext <<EOF
12382 #line 12383 "configure"
12383 #include "confdefs.h"
12384 /* Override any gcc2 internal prototype to avoid an error.  */
12385 /* We use char because int might match the return type of a gcc2
12386     builtin and then its argument prototype would still apply.  */
12387 char crypt();
12388
12389 int main() {
12390 crypt()
12391 ; return 0; }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12394   rm -rf conftest*
12395   eval "ac_cv_lib_$ac_lib_var=yes"
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   eval "ac_cv_lib_$ac_lib_var=no"
12401 fi
12402 rm -f conftest*
12403 LIBS="$ac_save_LIBS"
12404
12405 fi
12406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12407   echo "$ac_t""yes" 1>&6
12408   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12409                         have_crypt=yes
12410 else
12411   echo "$ac_t""no" 1>&6
12412 have_crypt=no
12413 fi
12414
12415 fi
12416
12417
12418         if test $have_crypt = yes ; then
12419                 cat >> confdefs.h <<\EOF
12420 #define HAVE_CRYPT 1
12421 EOF
12422
12423         else
12424                 echo "configure: warning: could not find crypt" 1>&2
12425                 if test $ol_enable_crypt = yes ; then
12426                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12427                 fi
12428
12429                 echo "configure: warning: disabling crypt support" 1>&2
12430                 ol_enable_crypt=no
12431         fi
12432 fi
12433
12434 if test $ol_enable_proctitle != no ; then
12435         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12436 echo "configure:12437: checking for setproctitle" >&5
12437 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
12438   echo $ac_n "(cached) $ac_c" 1>&6
12439 else
12440   cat > conftest.$ac_ext <<EOF
12441 #line 12442 "configure"
12442 #include "confdefs.h"
12443 /* System header to define __stub macros and hopefully few prototypes,
12444     which can conflict with char setproctitle(); below.  */
12445 #include <assert.h>
12446 /* Override any gcc2 internal prototype to avoid an error.  */
12447 /* We use char because int might match the return type of a gcc2
12448     builtin and then its argument prototype would still apply.  */
12449 char setproctitle();
12450
12451 int main() {
12452
12453 /* The GNU C library defines this for functions which it implements
12454     to always fail with ENOSYS.  Some functions are actually named
12455     something starting with __ and the normal name is an alias.  */
12456 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12457 choke me
12458 #else
12459 setproctitle();
12460 #endif
12461
12462 ; return 0; }
12463 EOF
12464 if { (eval echo configure:12465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12465   rm -rf conftest*
12466   eval "ac_cv_func_setproctitle=yes"
12467 else
12468   echo "configure: failed program was:" >&5
12469   cat conftest.$ac_ext >&5
12470   rm -rf conftest*
12471   eval "ac_cv_func_setproctitle=no"
12472 fi
12473 rm -f conftest*
12474 fi
12475
12476 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12477   echo "$ac_t""yes" 1>&6
12478   have_setproctitle=yes
12479 else
12480   echo "$ac_t""no" 1>&6
12481
12482                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12483 echo "configure:12484: checking for setproctitle in -lutil" >&5
12484 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
12485 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12486   echo $ac_n "(cached) $ac_c" 1>&6
12487 else
12488   ac_save_LIBS="$LIBS"
12489 LIBS="-lutil  $LIBS"
12490 cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 /* Override any gcc2 internal prototype to avoid an error.  */
12494 /* We use char because int might match the return type of a gcc2
12495     builtin and then its argument prototype would still apply.  */
12496 char setproctitle();
12497
12498 int main() {
12499 setproctitle()
12500 ; return 0; }
12501 EOF
12502 if { (eval echo configure:12503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12503   rm -rf conftest*
12504   eval "ac_cv_lib_$ac_lib_var=yes"
12505 else
12506   echo "configure: failed program was:" >&5
12507   cat conftest.$ac_ext >&5
12508   rm -rf conftest*
12509   eval "ac_cv_lib_$ac_lib_var=no"
12510 fi
12511 rm -f conftest*
12512 LIBS="$ac_save_LIBS"
12513
12514 fi
12515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12516   echo "$ac_t""yes" 1>&6
12517   have_setproctitle=yes
12518                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12519 else
12520   echo "$ac_t""no" 1>&6
12521 have_setproctitle=no
12522                         LIBOBJS="$LIBOBJS setproctitle.o"
12523 fi
12524
12525 fi
12526
12527
12528         if test $have_setproctitle = yes ; then
12529                 cat >> confdefs.h <<\EOF
12530 #define HAVE_SETPROCTITLE 1
12531 EOF
12532
12533         fi
12534 fi
12535
12536 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12537 echo "configure:12538: checking for uid_t in sys/types.h" >&5
12538 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
12539   echo $ac_n "(cached) $ac_c" 1>&6
12540 else
12541   cat > conftest.$ac_ext <<EOF
12542 #line 12543 "configure"
12543 #include "confdefs.h"
12544 #include <sys/types.h>
12545 EOF
12546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12547   egrep "uid_t" >/dev/null 2>&1; then
12548   rm -rf conftest*
12549   ac_cv_type_uid_t=yes
12550 else
12551   rm -rf conftest*
12552   ac_cv_type_uid_t=no
12553 fi
12554 rm -f conftest*
12555
12556 fi
12557
12558 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12559 if test $ac_cv_type_uid_t = no; then
12560   cat >> confdefs.h <<\EOF
12561 #define uid_t int
12562 EOF
12563
12564   cat >> confdefs.h <<\EOF
12565 #define gid_t int
12566 EOF
12567
12568 fi
12569
12570 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12571 echo "configure:12572: checking type of array argument to getgroups" >&5
12572 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
12573   echo $ac_n "(cached) $ac_c" 1>&6
12574 else
12575   if test "$cross_compiling" = yes; then
12576   ac_cv_type_getgroups=cross
12577 else
12578   cat > conftest.$ac_ext <<EOF
12579 #line 12580 "configure"
12580 #include "confdefs.h"
12581
12582 /* Thanks to Mike Rendell for this test.  */
12583 #include <sys/types.h>
12584 #define NGID 256
12585 #undef MAX
12586 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12587 main()
12588 {
12589   gid_t gidset[NGID];
12590   int i, n;
12591   union { gid_t gval; long lval; }  val;
12592
12593   val.lval = -1;
12594   for (i = 0; i < NGID; i++)
12595     gidset[i] = val.gval;
12596   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12597                  gidset);
12598   /* Exit non-zero if getgroups seems to require an array of ints.  This
12599      happens when gid_t is short but getgroups modifies an array of ints.  */
12600   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12601 }
12602
12603 EOF
12604 if { (eval echo configure:12605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12605 then
12606     ac_cv_type_getgroups=gid_t
12607 else
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -fr conftest*
12611   ac_cv_type_getgroups=int
12612 fi
12613 rm -fr conftest*
12614 fi
12615
12616 if test $ac_cv_type_getgroups = cross; then
12617         cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 #include <unistd.h>
12621 EOF
12622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12623   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12624   rm -rf conftest*
12625   ac_cv_type_getgroups=gid_t
12626 else
12627   rm -rf conftest*
12628   ac_cv_type_getgroups=int
12629 fi
12630 rm -f conftest*
12631
12632 fi
12633 fi
12634
12635 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12636 cat >> confdefs.h <<EOF
12637 #define GETGROUPS_T $ac_cv_type_getgroups
12638 EOF
12639
12640  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12641 echo "configure:12642: checking for ANSI C header files" >&5
12642 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   cat > conftest.$ac_ext <<EOF
12646 #line 12647 "configure"
12647 #include "confdefs.h"
12648 #include <stdlib.h>
12649 #include <stdarg.h>
12650 #include <string.h>
12651 #include <float.h>
12652 EOF
12653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12654 { (eval echo configure:12655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12656 if test -z "$ac_err"; then
12657   rm -rf conftest*
12658   ac_cv_header_stdc=yes
12659 else
12660   echo "$ac_err" >&5
12661   echo "configure: failed program was:" >&5
12662   cat conftest.$ac_ext >&5
12663   rm -rf conftest*
12664   ac_cv_header_stdc=no
12665 fi
12666 rm -f conftest*
12667
12668 if test $ac_cv_header_stdc = yes; then
12669   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12670 cat > conftest.$ac_ext <<EOF
12671 #line 12672 "configure"
12672 #include "confdefs.h"
12673 #include <string.h>
12674 EOF
12675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12676   egrep "memchr" >/dev/null 2>&1; then
12677   :
12678 else
12679   rm -rf conftest*
12680   ac_cv_header_stdc=no
12681 fi
12682 rm -f conftest*
12683
12684 fi
12685
12686 if test $ac_cv_header_stdc = yes; then
12687   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12688 cat > conftest.$ac_ext <<EOF
12689 #line 12690 "configure"
12690 #include "confdefs.h"
12691 #include <stdlib.h>
12692 EOF
12693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12694   egrep "free" >/dev/null 2>&1; then
12695   :
12696 else
12697   rm -rf conftest*
12698   ac_cv_header_stdc=no
12699 fi
12700 rm -f conftest*
12701
12702 fi
12703
12704 if test $ac_cv_header_stdc = yes; then
12705   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12706 if test "$cross_compiling" = yes; then
12707   :
12708 else
12709   cat > conftest.$ac_ext <<EOF
12710 #line 12711 "configure"
12711 #include "confdefs.h"
12712 #include <ctype.h>
12713 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12714 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12715 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12716 int main () { int i; for (i = 0; i < 256; i++)
12717 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12718 exit (0); }
12719
12720 EOF
12721 if { (eval echo configure:12722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12722 then
12723   :
12724 else
12725   echo "configure: failed program was:" >&5
12726   cat conftest.$ac_ext >&5
12727   rm -fr conftest*
12728   ac_cv_header_stdc=no
12729 fi
12730 rm -fr conftest*
12731 fi
12732
12733 fi
12734 fi
12735
12736 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12737 if test $ac_cv_header_stdc = yes; then
12738   cat >> confdefs.h <<\EOF
12739 #define STDC_HEADERS 1
12740 EOF
12741
12742 fi
12743
12744 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12745 echo "configure:12746: checking for mode_t" >&5
12746 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
12747   echo $ac_n "(cached) $ac_c" 1>&6
12748 else
12749   cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 #include <sys/types.h>
12753 #if STDC_HEADERS
12754 #include <stdlib.h>
12755 #include <stddef.h>
12756 #endif
12757 EOF
12758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12759   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12760   rm -rf conftest*
12761   ac_cv_type_mode_t=yes
12762 else
12763   rm -rf conftest*
12764   ac_cv_type_mode_t=no
12765 fi
12766 rm -f conftest*
12767
12768 fi
12769 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
12770 if test $ac_cv_type_mode_t = no; then
12771   cat >> confdefs.h <<\EOF
12772 #define mode_t int
12773 EOF
12774
12775 fi
12776
12777 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12778 echo "configure:12779: checking for off_t" >&5
12779 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
12780   echo $ac_n "(cached) $ac_c" 1>&6
12781 else
12782   cat > conftest.$ac_ext <<EOF
12783 #line 12784 "configure"
12784 #include "confdefs.h"
12785 #include <sys/types.h>
12786 #if STDC_HEADERS
12787 #include <stdlib.h>
12788 #include <stddef.h>
12789 #endif
12790 EOF
12791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12792   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12793   rm -rf conftest*
12794   ac_cv_type_off_t=yes
12795 else
12796   rm -rf conftest*
12797   ac_cv_type_off_t=no
12798 fi
12799 rm -f conftest*
12800
12801 fi
12802 echo "$ac_t""$ac_cv_type_off_t" 1>&6
12803 if test $ac_cv_type_off_t = no; then
12804   cat >> confdefs.h <<\EOF
12805 #define off_t long
12806 EOF
12807
12808 fi
12809
12810 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12811 echo "configure:12812: checking for pid_t" >&5
12812 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
12813   echo $ac_n "(cached) $ac_c" 1>&6
12814 else
12815   cat > conftest.$ac_ext <<EOF
12816 #line 12817 "configure"
12817 #include "confdefs.h"
12818 #include <sys/types.h>
12819 #if STDC_HEADERS
12820 #include <stdlib.h>
12821 #include <stddef.h>
12822 #endif
12823 EOF
12824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12825   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12826   rm -rf conftest*
12827   ac_cv_type_pid_t=yes
12828 else
12829   rm -rf conftest*
12830   ac_cv_type_pid_t=no
12831 fi
12832 rm -f conftest*
12833
12834 fi
12835 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
12836 if test $ac_cv_type_pid_t = no; then
12837   cat >> confdefs.h <<\EOF
12838 #define pid_t int
12839 EOF
12840
12841 fi
12842
12843 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12844 echo "configure:12845: checking for ptrdiff_t" >&5
12845 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
12846   echo $ac_n "(cached) $ac_c" 1>&6
12847 else
12848   cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 #include <stddef.h>
12852 int main() {
12853 ptrdiff_t p
12854 ; return 0; }
12855 EOF
12856 if { (eval echo configure:12857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12857   rm -rf conftest*
12858   am_cv_type_ptrdiff_t=yes
12859 else
12860   echo "configure: failed program was:" >&5
12861   cat conftest.$ac_ext >&5
12862   rm -rf conftest*
12863   am_cv_type_ptrdiff_t=no
12864 fi
12865 rm -f conftest*
12866 fi
12867
12868 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12869    if test $am_cv_type_ptrdiff_t = yes; then
12870      cat >> confdefs.h <<\EOF
12871 #define HAVE_PTRDIFF_T 1
12872 EOF
12873
12874    fi
12875
12876 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12877 echo "configure:12878: checking return type of signal handlers" >&5
12878 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
12879   echo $ac_n "(cached) $ac_c" 1>&6
12880 else
12881   cat > conftest.$ac_ext <<EOF
12882 #line 12883 "configure"
12883 #include "confdefs.h"
12884 #include <sys/types.h>
12885 #include <signal.h>
12886 #ifdef signal
12887 #undef signal
12888 #endif
12889 #ifdef __cplusplus
12890 extern "C" void (*signal (int, void (*)(int)))(int);
12891 #else
12892 void (*signal ()) ();
12893 #endif
12894
12895 int main() {
12896 int i;
12897 ; return 0; }
12898 EOF
12899 if { (eval echo configure:12900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12900   rm -rf conftest*
12901   ac_cv_type_signal=void
12902 else
12903   echo "configure: failed program was:" >&5
12904   cat conftest.$ac_ext >&5
12905   rm -rf conftest*
12906   ac_cv_type_signal=int
12907 fi
12908 rm -f conftest*
12909 fi
12910
12911 echo "$ac_t""$ac_cv_type_signal" 1>&6
12912 cat >> confdefs.h <<EOF
12913 #define RETSIGTYPE $ac_cv_type_signal
12914 EOF
12915
12916
12917 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12918 echo "configure:12919: checking for sig_atomic_t" >&5
12919 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
12920   echo $ac_n "(cached) $ac_c" 1>&6
12921 else
12922   cat > conftest.$ac_ext <<EOF
12923 #line 12924 "configure"
12924 #include "confdefs.h"
12925 #include <signal.h>
12926 int main() {
12927 sig_atomic_t atomic;
12928 ; return 0; }
12929 EOF
12930 if { (eval echo configure:12931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12931   rm -rf conftest*
12932   ol_cv_type_sig_atomic_t=yes
12933 else
12934   echo "configure: failed program was:" >&5
12935   cat conftest.$ac_ext >&5
12936   rm -rf conftest*
12937   ol_cv_type_sig_atomic_t=no
12938 fi
12939 rm -f conftest*
12940 fi
12941
12942 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
12943   if test $ol_cv_type_sig_atomic_t = no; then
12944     cat >> confdefs.h <<\EOF
12945 #define sig_atomic_t int
12946 EOF
12947
12948   fi
12949  
12950 echo $ac_n "checking for size_t""... $ac_c" 1>&6
12951 echo "configure:12952: checking for size_t" >&5
12952 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
12953   echo $ac_n "(cached) $ac_c" 1>&6
12954 else
12955   cat > conftest.$ac_ext <<EOF
12956 #line 12957 "configure"
12957 #include "confdefs.h"
12958 #include <sys/types.h>
12959 #if STDC_HEADERS
12960 #include <stdlib.h>
12961 #include <stddef.h>
12962 #endif
12963 EOF
12964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12965   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12966   rm -rf conftest*
12967   ac_cv_type_size_t=yes
12968 else
12969   rm -rf conftest*
12970   ac_cv_type_size_t=no
12971 fi
12972 rm -f conftest*
12973
12974 fi
12975 echo "$ac_t""$ac_cv_type_size_t" 1>&6
12976 if test $ac_cv_type_size_t = no; then
12977   cat >> confdefs.h <<\EOF
12978 #define size_t unsigned
12979 EOF
12980
12981 fi
12982
12983 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
12984 echo "configure:12985: checking for socklen_t" >&5
12985 if eval "test \"`echo '$''{'ol_cv_type_socklen_t'+set}'`\" = set"; then
12986   echo $ac_n "(cached) $ac_c" 1>&6
12987 else
12988   cat > conftest.$ac_ext <<EOF
12989 #line 12990 "configure"
12990 #include "confdefs.h"
12991
12992 #ifdef HAVE_SYS_TYPES_H
12993 #include <sys/types.h>
12994 #endif
12995 #ifdef HAVE_SYS_SOCKET_H
12996 #include <sys/socket.h>
12997 #endif
12998
12999 int main() {
13000 socklen_t len;
13001 ; return 0; }
13002 EOF
13003 if { (eval echo configure:13004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13004   rm -rf conftest*
13005   ol_cv_type_socklen_t=yes
13006 else
13007   echo "configure: failed program was:" >&5
13008   cat conftest.$ac_ext >&5
13009   rm -rf conftest*
13010   ol_cv_type_socklen_t=no
13011 fi
13012 rm -f conftest*
13013 fi
13014
13015 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13016   if test $ol_cv_type_socklen_t = no; then
13017     cat >> confdefs.h <<\EOF
13018 #define socklen_t int
13019 EOF
13020
13021   fi
13022  
13023 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
13024 echo "configure:13025: checking for st_blksize in struct stat" >&5
13025 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
13026   echo $ac_n "(cached) $ac_c" 1>&6
13027 else
13028   cat > conftest.$ac_ext <<EOF
13029 #line 13030 "configure"
13030 #include "confdefs.h"
13031 #include <sys/types.h>
13032 #include <sys/stat.h>
13033 int main() {
13034 struct stat s; s.st_blksize;
13035 ; return 0; }
13036 EOF
13037 if { (eval echo configure:13038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13038   rm -rf conftest*
13039   ac_cv_struct_st_blksize=yes
13040 else
13041   echo "configure: failed program was:" >&5
13042   cat conftest.$ac_ext >&5
13043   rm -rf conftest*
13044   ac_cv_struct_st_blksize=no
13045 fi
13046 rm -f conftest*
13047 fi
13048
13049 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
13050 if test $ac_cv_struct_st_blksize = yes; then
13051   cat >> confdefs.h <<\EOF
13052 #define HAVE_ST_BLKSIZE 1
13053 EOF
13054
13055 fi
13056
13057 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13058 echo "configure:13059: checking whether time.h and sys/time.h may both be included" >&5
13059 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
13060   echo $ac_n "(cached) $ac_c" 1>&6
13061 else
13062   cat > conftest.$ac_ext <<EOF
13063 #line 13064 "configure"
13064 #include "confdefs.h"
13065 #include <sys/types.h>
13066 #include <sys/time.h>
13067 #include <time.h>
13068 int main() {
13069 struct tm *tp;
13070 ; return 0; }
13071 EOF
13072 if { (eval echo configure:13073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13073   rm -rf conftest*
13074   ac_cv_header_time=yes
13075 else
13076   echo "configure: failed program was:" >&5
13077   cat conftest.$ac_ext >&5
13078   rm -rf conftest*
13079   ac_cv_header_time=no
13080 fi
13081 rm -f conftest*
13082 fi
13083
13084 echo "$ac_t""$ac_cv_header_time" 1>&6
13085 if test $ac_cv_header_time = yes; then
13086   cat >> confdefs.h <<\EOF
13087 #define TIME_WITH_SYS_TIME 1
13088 EOF
13089
13090 fi
13091
13092 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13093 echo "configure:13094: checking whether struct tm is in sys/time.h or time.h" >&5
13094 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
13095   echo $ac_n "(cached) $ac_c" 1>&6
13096 else
13097   cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 #include <sys/types.h>
13101 #include <time.h>
13102 int main() {
13103 struct tm *tp; tp->tm_sec;
13104 ; return 0; }
13105 EOF
13106 if { (eval echo configure:13107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13107   rm -rf conftest*
13108   ac_cv_struct_tm=time.h
13109 else
13110   echo "configure: failed program was:" >&5
13111   cat conftest.$ac_ext >&5
13112   rm -rf conftest*
13113   ac_cv_struct_tm=sys/time.h
13114 fi
13115 rm -f conftest*
13116 fi
13117
13118 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13119 if test $ac_cv_struct_tm = sys/time.h; then
13120   cat >> confdefs.h <<\EOF
13121 #define TM_IN_SYS_TIME 1
13122 EOF
13123
13124 fi
13125
13126 # test for pw_gecos in struct passwd
13127 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13128 echo "configure:13129: checking struct passwd for pw_gecos" >&5
13129 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
13130   echo $ac_n "(cached) $ac_c" 1>&6
13131 else
13132   
13133         cat > conftest.$ac_ext <<EOF
13134 #line 13135 "configure"
13135 #include "confdefs.h"
13136 #include <pwd.h>
13137 int main() {
13138
13139         struct passwd pwd;
13140         pwd.pw_gecos = pwd.pw_name;
13141
13142 ; return 0; }
13143 EOF
13144 if { (eval echo configure:13145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13145   rm -rf conftest*
13146   ol_cv_struct_passwd_pw_gecos=yes
13147 else
13148   echo "configure: failed program was:" >&5
13149   cat conftest.$ac_ext >&5
13150   rm -rf conftest*
13151   ol_cv_struct_passwd_pw_gecos=no
13152 fi
13153 rm -f conftest*
13154 fi
13155
13156 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13157 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13158         cat >> confdefs.h <<\EOF
13159 #define HAVE_PW_GECOS 1
13160 EOF
13161
13162 fi
13163
13164 # test for pw_passwd in struct passwd
13165 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13166 echo "configure:13167: checking struct passwd for pw_passwd" >&5
13167 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
13168   echo $ac_n "(cached) $ac_c" 1>&6
13169 else
13170   
13171         cat > conftest.$ac_ext <<EOF
13172 #line 13173 "configure"
13173 #include "confdefs.h"
13174 #include <pwd.h>
13175 int main() {
13176
13177         struct passwd pwd;
13178         pwd.pw_passwd = pwd.pw_name;
13179
13180 ; return 0; }
13181 EOF
13182 if { (eval echo configure:13183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13183   rm -rf conftest*
13184   ol_cv_struct_passwd_pw_passwd=yes
13185 else
13186   echo "configure: failed program was:" >&5
13187   cat conftest.$ac_ext >&5
13188   rm -rf conftest*
13189   ol_cv_struct_passwd_pw_passwd=no
13190 fi
13191 rm -f conftest*
13192 fi
13193
13194 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13195 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13196         cat >> confdefs.h <<\EOF
13197 #define HAVE_PW_PASSWD 1
13198 EOF
13199
13200 fi
13201
13202
13203 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13204 echo "configure:13205: checking if toupper() requires islower()" >&5
13205 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
13206   echo $ac_n "(cached) $ac_c" 1>&6
13207 else
13208   
13209         if test "$cross_compiling" = yes; then
13210   ol_cv_c_upper_lower=safe
13211 else
13212   cat > conftest.$ac_ext <<EOF
13213 #line 13214 "configure"
13214 #include "confdefs.h"
13215
13216 #include <ctype.h>
13217 main()
13218 {
13219         if ('C' == toupper('C'))
13220                 exit(0);
13221         else
13222                 exit(1);
13223 }
13224 EOF
13225 if { (eval echo configure:13226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13226 then
13227   ol_cv_c_upper_lower=no
13228 else
13229   echo "configure: failed program was:" >&5
13230   cat conftest.$ac_ext >&5
13231   rm -fr conftest*
13232   ol_cv_c_upper_lower=yes
13233 fi
13234 rm -fr conftest*
13235 fi
13236
13237 fi
13238
13239 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13240 if test $ol_cv_c_upper_lower != no ; then
13241         cat >> confdefs.h <<\EOF
13242 #define C_UPPER_LOWER 1
13243 EOF
13244
13245 fi
13246
13247 echo $ac_n "checking for working const""... $ac_c" 1>&6
13248 echo "configure:13249: checking for working const" >&5
13249 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
13250   echo $ac_n "(cached) $ac_c" 1>&6
13251 else
13252   cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255
13256 int main() {
13257
13258 /* Ultrix mips cc rejects this.  */
13259 typedef int charset[2]; const charset x;
13260 /* SunOS 4.1.1 cc rejects this.  */
13261 char const *const *ccp;
13262 char **p;
13263 /* NEC SVR4.0.2 mips cc rejects this.  */
13264 struct point {int x, y;};
13265 static struct point const zero = {0,0};
13266 /* AIX XL C 1.02.0.0 rejects this.
13267    It does not let you subtract one const X* pointer from another in an arm
13268    of an if-expression whose if-part is not a constant expression */
13269 const char *g = "string";
13270 ccp = &g + (g ? g-g : 0);
13271 /* HPUX 7.0 cc rejects these. */
13272 ++ccp;
13273 p = (char**) ccp;
13274 ccp = (char const *const *) p;
13275 { /* SCO 3.2v4 cc rejects this.  */
13276   char *t;
13277   char const *s = 0 ? (char *) 0 : (char const *) 0;
13278
13279   *t++ = 0;
13280 }
13281 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13282   int x[] = {25, 17};
13283   const int *foo = &x[0];
13284   ++foo;
13285 }
13286 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13287   typedef const int *iptr;
13288   iptr p = 0;
13289   ++p;
13290 }
13291 { /* AIX XL C 1.02.0.0 rejects this saying
13292      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13293   struct s { int j; const int *ap[3]; };
13294   struct s *b; b->j = 5;
13295 }
13296 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13297   const int foo = 10;
13298 }
13299
13300 ; return 0; }
13301 EOF
13302 if { (eval echo configure:13303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13303   rm -rf conftest*
13304   ac_cv_c_const=yes
13305 else
13306   echo "configure: failed program was:" >&5
13307   cat conftest.$ac_ext >&5
13308   rm -rf conftest*
13309   ac_cv_c_const=no
13310 fi
13311 rm -f conftest*
13312 fi
13313
13314 echo "$ac_t""$ac_cv_c_const" 1>&6
13315 if test $ac_cv_c_const = no; then
13316   cat >> confdefs.h <<\EOF
13317 #define const 
13318 EOF
13319
13320 fi
13321
13322 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13323 echo "configure:13324: checking if compiler understands volatile" >&5
13324 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
13325   echo $ac_n "(cached) $ac_c" 1>&6
13326 else
13327   cat > conftest.$ac_ext <<EOF
13328 #line 13329 "configure"
13329 #include "confdefs.h"
13330 int x, y, z;
13331 int main() {
13332 volatile int a; int * volatile b = x ? &y : &z;
13333       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13334       *b = 0;
13335 ; return 0; }
13336 EOF
13337 if { (eval echo configure:13338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13338   rm -rf conftest*
13339   ol_cv_c_volatile=yes
13340 else
13341   echo "configure: failed program was:" >&5
13342   cat conftest.$ac_ext >&5
13343   rm -rf conftest*
13344   ol_cv_c_volatile=no
13345 fi
13346 rm -f conftest*
13347 fi
13348
13349 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13350   if test $ol_cv_c_volatile = yes; then
13351     : 
13352   else
13353     cat >> confdefs.h <<\EOF
13354 #define volatile 
13355 EOF
13356
13357   fi
13358  
13359
13360 if test $cross_compiling = yes ; then
13361         cat >> confdefs.h <<\EOF
13362 #define CROSS_COMPILING 1
13363 EOF
13364
13365
13366         cat >> confdefs.h <<\EOF
13367 #define LBER_INT_T long
13368 EOF
13369
13370         cat >> confdefs.h <<\EOF
13371 #define LBER_TAG_T long
13372 EOF
13373
13374         cat >> confdefs.h <<\EOF
13375 #define LBER_SOCKET_T int
13376 EOF
13377
13378
13379 else
13380         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13381 echo "configure:13382: checking whether byte ordering is bigendian" >&5
13382 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
13383   echo $ac_n "(cached) $ac_c" 1>&6
13384 else
13385   ac_cv_c_bigendian=unknown
13386 # See if sys/param.h defines the BYTE_ORDER macro.
13387 cat > conftest.$ac_ext <<EOF
13388 #line 13389 "configure"
13389 #include "confdefs.h"
13390 #include <sys/types.h>
13391 #include <sys/param.h>
13392 int main() {
13393
13394 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13395  bogus endian macros
13396 #endif
13397 ; return 0; }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13400   rm -rf conftest*
13401   # It does; now see whether it defined to BIG_ENDIAN or not.
13402 cat > conftest.$ac_ext <<EOF
13403 #line 13404 "configure"
13404 #include "confdefs.h"
13405 #include <sys/types.h>
13406 #include <sys/param.h>
13407 int main() {
13408
13409 #if BYTE_ORDER != BIG_ENDIAN
13410  not big endian
13411 #endif
13412 ; return 0; }
13413 EOF
13414 if { (eval echo configure:13415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13415   rm -rf conftest*
13416   ac_cv_c_bigendian=yes
13417 else
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   ac_cv_c_bigendian=no
13422 fi
13423 rm -f conftest*
13424 else
13425   echo "configure: failed program was:" >&5
13426   cat conftest.$ac_ext >&5
13427 fi
13428 rm -f conftest*
13429 if test $ac_cv_c_bigendian = unknown; then
13430 if test "$cross_compiling" = yes; then
13431     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13432 else
13433   cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436 main () {
13437   /* Are we little or big endian?  From Harbison&Steele.  */
13438   union
13439   {
13440     long l;
13441     char c[sizeof (long)];
13442   } u;
13443   u.l = 1;
13444   exit (u.c[sizeof (long) - 1] == 1);
13445 }
13446 EOF
13447 if { (eval echo configure:13448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13448 then
13449   ac_cv_c_bigendian=no
13450 else
13451   echo "configure: failed program was:" >&5
13452   cat conftest.$ac_ext >&5
13453   rm -fr conftest*
13454   ac_cv_c_bigendian=yes
13455 fi
13456 rm -fr conftest*
13457 fi
13458
13459 fi
13460 fi
13461
13462 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13463 if test $ac_cv_c_bigendian = yes; then
13464   cat >> confdefs.h <<\EOF
13465 #define WORDS_BIGENDIAN 1
13466 EOF
13467
13468 fi
13469
13470         echo $ac_n "checking size of short""... $ac_c" 1>&6
13471 echo "configure:13472: checking size of short" >&5
13472 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
13473   echo $ac_n "(cached) $ac_c" 1>&6
13474 else
13475   if test "$cross_compiling" = yes; then
13476     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13477 else
13478   cat > conftest.$ac_ext <<EOF
13479 #line 13480 "configure"
13480 #include "confdefs.h"
13481 #include <stdio.h>
13482 main()
13483 {
13484   FILE *f=fopen("conftestval", "w");
13485   if (!f) exit(1);
13486   fprintf(f, "%d\n", sizeof(short));
13487   exit(0);
13488 }
13489 EOF
13490 if { (eval echo configure:13491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13491 then
13492   ac_cv_sizeof_short=`cat conftestval`
13493 else
13494   echo "configure: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496   rm -fr conftest*
13497   ac_cv_sizeof_short=0
13498 fi
13499 rm -fr conftest*
13500 fi
13501
13502 fi
13503 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13504 cat >> confdefs.h <<EOF
13505 #define SIZEOF_SHORT $ac_cv_sizeof_short
13506 EOF
13507
13508  
13509         echo $ac_n "checking size of int""... $ac_c" 1>&6
13510 echo "configure:13511: checking size of int" >&5
13511 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
13512   echo $ac_n "(cached) $ac_c" 1>&6
13513 else
13514   if test "$cross_compiling" = yes; then
13515     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13516 else
13517   cat > conftest.$ac_ext <<EOF
13518 #line 13519 "configure"
13519 #include "confdefs.h"
13520 #include <stdio.h>
13521 main()
13522 {
13523   FILE *f=fopen("conftestval", "w");
13524   if (!f) exit(1);
13525   fprintf(f, "%d\n", sizeof(int));
13526   exit(0);
13527 }
13528 EOF
13529 if { (eval echo configure:13530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13530 then
13531   ac_cv_sizeof_int=`cat conftestval`
13532 else
13533   echo "configure: failed program was:" >&5
13534   cat conftest.$ac_ext >&5
13535   rm -fr conftest*
13536   ac_cv_sizeof_int=0
13537 fi
13538 rm -fr conftest*
13539 fi
13540
13541 fi
13542 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13543 cat >> confdefs.h <<EOF
13544 #define SIZEOF_INT $ac_cv_sizeof_int
13545 EOF
13546
13547  
13548         echo $ac_n "checking size of long""... $ac_c" 1>&6
13549 echo "configure:13550: checking size of long" >&5
13550 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
13551   echo $ac_n "(cached) $ac_c" 1>&6
13552 else
13553   if test "$cross_compiling" = yes; then
13554     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13555 else
13556   cat > conftest.$ac_ext <<EOF
13557 #line 13558 "configure"
13558 #include "confdefs.h"
13559 #include <stdio.h>
13560 main()
13561 {
13562   FILE *f=fopen("conftestval", "w");
13563   if (!f) exit(1);
13564   fprintf(f, "%d\n", sizeof(long));
13565   exit(0);
13566 }
13567 EOF
13568 if { (eval echo configure:13569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13569 then
13570   ac_cv_sizeof_long=`cat conftestval`
13571 else
13572   echo "configure: failed program was:" >&5
13573   cat conftest.$ac_ext >&5
13574   rm -fr conftest*
13575   ac_cv_sizeof_long=0
13576 fi
13577 rm -fr conftest*
13578 fi
13579
13580 fi
13581 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13582 cat >> confdefs.h <<EOF
13583 #define SIZEOF_LONG $ac_cv_sizeof_long
13584 EOF
13585
13586
13587
13588         if test "$ac_cv_sizeof_int" -lt 4 ; then
13589                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13590
13591                 cat >> confdefs.h <<\EOF
13592 #define LBER_INT_T long
13593 EOF
13594
13595                 cat >> confdefs.h <<\EOF
13596 #define LBER_TAG_T long
13597 EOF
13598
13599                 cat >> confdefs.h <<\EOF
13600 #define LBER_SOCKET_T int
13601 EOF
13602
13603         else
13604                 cat >> confdefs.h <<\EOF
13605 #define LBER_INT_T int
13606 EOF
13607
13608                 cat >> confdefs.h <<\EOF
13609 #define LBER_TAG_T long
13610 EOF
13611
13612                 cat >> confdefs.h <<\EOF
13613 #define LBER_SOCKET_T int
13614 EOF
13615
13616         fi
13617 fi
13618
13619 cat >> confdefs.h <<\EOF
13620 #define LBER_LEN_T long
13621 EOF
13622
13623
13624 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13625 echo "configure:13626: checking for 8-bit clean memcmp" >&5
13626 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
13627   echo $ac_n "(cached) $ac_c" 1>&6
13628 else
13629   if test "$cross_compiling" = yes; then
13630   ac_cv_func_memcmp_clean=no
13631 else
13632   cat > conftest.$ac_ext <<EOF
13633 #line 13634 "configure"
13634 #include "confdefs.h"
13635
13636 main()
13637 {
13638   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13639   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13640 }
13641
13642 EOF
13643 if { (eval echo configure:13644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13644 then
13645   ac_cv_func_memcmp_clean=yes
13646 else
13647   echo "configure: failed program was:" >&5
13648   cat conftest.$ac_ext >&5
13649   rm -fr conftest*
13650   ac_cv_func_memcmp_clean=no
13651 fi
13652 rm -fr conftest*
13653 fi
13654
13655 fi
13656
13657 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13658 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13659
13660 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13661 echo "configure:13662: checking for strftime" >&5
13662 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
13663   echo $ac_n "(cached) $ac_c" 1>&6
13664 else
13665   cat > conftest.$ac_ext <<EOF
13666 #line 13667 "configure"
13667 #include "confdefs.h"
13668 /* System header to define __stub macros and hopefully few prototypes,
13669     which can conflict with char strftime(); below.  */
13670 #include <assert.h>
13671 /* Override any gcc2 internal prototype to avoid an error.  */
13672 /* We use char because int might match the return type of a gcc2
13673     builtin and then its argument prototype would still apply.  */
13674 char strftime();
13675
13676 int main() {
13677
13678 /* The GNU C library defines this for functions which it implements
13679     to always fail with ENOSYS.  Some functions are actually named
13680     something starting with __ and the normal name is an alias.  */
13681 #if defined (__stub_strftime) || defined (__stub___strftime)
13682 choke me
13683 #else
13684 strftime();
13685 #endif
13686
13687 ; return 0; }
13688 EOF
13689 if { (eval echo configure:13690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13690   rm -rf conftest*
13691   eval "ac_cv_func_strftime=yes"
13692 else
13693   echo "configure: failed program was:" >&5
13694   cat conftest.$ac_ext >&5
13695   rm -rf conftest*
13696   eval "ac_cv_func_strftime=no"
13697 fi
13698 rm -f conftest*
13699 fi
13700
13701 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13702   echo "$ac_t""yes" 1>&6
13703   cat >> confdefs.h <<\EOF
13704 #define HAVE_STRFTIME 1
13705 EOF
13706
13707 else
13708   echo "$ac_t""no" 1>&6
13709 # strftime is in -lintl on SCO UNIX.
13710 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13711 echo "configure:13712: checking for strftime in -lintl" >&5
13712 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
13713 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13714   echo $ac_n "(cached) $ac_c" 1>&6
13715 else
13716   ac_save_LIBS="$LIBS"
13717 LIBS="-lintl  $LIBS"
13718 cat > conftest.$ac_ext <<EOF
13719 #line 13720 "configure"
13720 #include "confdefs.h"
13721 /* Override any gcc2 internal prototype to avoid an error.  */
13722 /* We use char because int might match the return type of a gcc2
13723     builtin and then its argument prototype would still apply.  */
13724 char strftime();
13725
13726 int main() {
13727 strftime()
13728 ; return 0; }
13729 EOF
13730 if { (eval echo configure:13731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13731   rm -rf conftest*
13732   eval "ac_cv_lib_$ac_lib_var=yes"
13733 else
13734   echo "configure: failed program was:" >&5
13735   cat conftest.$ac_ext >&5
13736   rm -rf conftest*
13737   eval "ac_cv_lib_$ac_lib_var=no"
13738 fi
13739 rm -f conftest*
13740 LIBS="$ac_save_LIBS"
13741
13742 fi
13743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13744   echo "$ac_t""yes" 1>&6
13745   cat >> confdefs.h <<\EOF
13746 #define HAVE_STRFTIME 1
13747 EOF
13748
13749 LIBS="-lintl $LIBS"
13750 else
13751   echo "$ac_t""no" 1>&6
13752 fi
13753
13754 fi
13755
13756
13757 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13758 echo "configure:13759: checking for inet_aton()" >&5
13759 if eval "test \"`echo '$''{'ol_cv_func_inet_aton'+set}'`\" = set"; then
13760   echo $ac_n "(cached) $ac_c" 1>&6
13761 else
13762   cat > conftest.$ac_ext <<EOF
13763 #line 13764 "configure"
13764 #include "confdefs.h"
13765
13766 #ifdef HAVE_SYS_TYPES_H
13767 #       include <sys/types.h>
13768 #endif
13769 #ifdef HAVE_SYS_SOCKET_H
13770 #       include <sys/socket.h>
13771 #       ifdef HAVE_SYS_SELECT_H
13772 #               include <sys/select.h>
13773 #       endif
13774 #       include <netinet/in.h>
13775 #       ifdef HAVE_ARPA_INET_H
13776 #               include <arpa/inet.h>
13777 #       endif
13778 #endif
13779
13780 int main() {
13781 struct in_addr in;
13782 int rc = inet_aton( "255.255.255.255", &in );
13783 ; return 0; }
13784 EOF
13785 if { (eval echo configure:13786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13786   rm -rf conftest*
13787   ol_cv_func_inet_aton=yes
13788 else
13789   echo "configure: failed program was:" >&5
13790   cat conftest.$ac_ext >&5
13791   rm -rf conftest*
13792   ol_cv_func_inet_aton=no
13793 fi
13794 rm -f conftest*
13795 fi
13796
13797 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13798   if test $ol_cv_func_inet_aton != no; then
13799     cat >> confdefs.h <<\EOF
13800 #define HAVE_INET_ATON 1
13801 EOF
13802
13803   fi
13804  
13805
13806 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13807 echo "configure:13808: checking for vprintf" >&5
13808 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
13809   echo $ac_n "(cached) $ac_c" 1>&6
13810 else
13811   cat > conftest.$ac_ext <<EOF
13812 #line 13813 "configure"
13813 #include "confdefs.h"
13814 /* System header to define __stub macros and hopefully few prototypes,
13815     which can conflict with char vprintf(); below.  */
13816 #include <assert.h>
13817 /* Override any gcc2 internal prototype to avoid an error.  */
13818 /* We use char because int might match the return type of a gcc2
13819     builtin and then its argument prototype would still apply.  */
13820 char vprintf();
13821
13822 int main() {
13823
13824 /* The GNU C library defines this for functions which it implements
13825     to always fail with ENOSYS.  Some functions are actually named
13826     something starting with __ and the normal name is an alias.  */
13827 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13828 choke me
13829 #else
13830 vprintf();
13831 #endif
13832
13833 ; return 0; }
13834 EOF
13835 if { (eval echo configure:13836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13836   rm -rf conftest*
13837   eval "ac_cv_func_vprintf=yes"
13838 else
13839   echo "configure: failed program was:" >&5
13840   cat conftest.$ac_ext >&5
13841   rm -rf conftest*
13842   eval "ac_cv_func_vprintf=no"
13843 fi
13844 rm -f conftest*
13845 fi
13846
13847 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13848   echo "$ac_t""yes" 1>&6
13849   cat >> confdefs.h <<\EOF
13850 #define HAVE_VPRINTF 1
13851 EOF
13852
13853 else
13854   echo "$ac_t""no" 1>&6
13855 fi
13856
13857 if test "$ac_cv_func_vprintf" != yes; then
13858 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13859 echo "configure:13860: checking for _doprnt" >&5
13860 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
13861   echo $ac_n "(cached) $ac_c" 1>&6
13862 else
13863   cat > conftest.$ac_ext <<EOF
13864 #line 13865 "configure"
13865 #include "confdefs.h"
13866 /* System header to define __stub macros and hopefully few prototypes,
13867     which can conflict with char _doprnt(); below.  */
13868 #include <assert.h>
13869 /* Override any gcc2 internal prototype to avoid an error.  */
13870 /* We use char because int might match the return type of a gcc2
13871     builtin and then its argument prototype would still apply.  */
13872 char _doprnt();
13873
13874 int main() {
13875
13876 /* The GNU C library defines this for functions which it implements
13877     to always fail with ENOSYS.  Some functions are actually named
13878     something starting with __ and the normal name is an alias.  */
13879 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13880 choke me
13881 #else
13882 _doprnt();
13883 #endif
13884
13885 ; return 0; }
13886 EOF
13887 if { (eval echo configure:13888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13888   rm -rf conftest*
13889   eval "ac_cv_func__doprnt=yes"
13890 else
13891   echo "configure: failed program was:" >&5
13892   cat conftest.$ac_ext >&5
13893   rm -rf conftest*
13894   eval "ac_cv_func__doprnt=no"
13895 fi
13896 rm -f conftest*
13897 fi
13898
13899 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13900   echo "$ac_t""yes" 1>&6
13901   cat >> confdefs.h <<\EOF
13902 #define HAVE_DOPRNT 1
13903 EOF
13904
13905 else
13906   echo "$ac_t""no" 1>&6
13907 fi
13908
13909 fi
13910
13911
13912 if test $ac_cv_func_vprintf = yes ; then
13913                 for ac_func in vsnprintf vsprintf
13914 do
13915 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13916 echo "configure:13917: checking for $ac_func" >&5
13917 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13918   echo $ac_n "(cached) $ac_c" 1>&6
13919 else
13920   cat > conftest.$ac_ext <<EOF
13921 #line 13922 "configure"
13922 #include "confdefs.h"
13923 /* System header to define __stub macros and hopefully few prototypes,
13924     which can conflict with char $ac_func(); below.  */
13925 #include <assert.h>
13926 /* Override any gcc2 internal prototype to avoid an error.  */
13927 /* We use char because int might match the return type of a gcc2
13928     builtin and then its argument prototype would still apply.  */
13929 char $ac_func();
13930
13931 int main() {
13932
13933 /* The GNU C library defines this for functions which it implements
13934     to always fail with ENOSYS.  Some functions are actually named
13935     something starting with __ and the normal name is an alias.  */
13936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13937 choke me
13938 #else
13939 $ac_func();
13940 #endif
13941
13942 ; return 0; }
13943 EOF
13944 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13945   rm -rf conftest*
13946   eval "ac_cv_func_$ac_func=yes"
13947 else
13948   echo "configure: failed program was:" >&5
13949   cat conftest.$ac_ext >&5
13950   rm -rf conftest*
13951   eval "ac_cv_func_$ac_func=no"
13952 fi
13953 rm -f conftest*
13954 fi
13955
13956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13957   echo "$ac_t""yes" 1>&6
13958     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13959   cat >> confdefs.h <<EOF
13960 #define $ac_tr_func 1
13961 EOF
13962  
13963 else
13964   echo "$ac_t""no" 1>&6
13965 fi
13966 done
13967
13968 fi
13969
13970 for ac_func in \
13971         bcopy                   \
13972         closesocket             \
13973         endgrent                \
13974         endpwent                \
13975         flock                   \
13976         getdtablesize   \
13977         getgrgid                \
13978         gethostname             \
13979         getpass                 \
13980         getpwuid                \
13981         getpwnam                \
13982         getspnam                \
13983         gettimeofday    \
13984         initgroups              \
13985         lockf                   \
13986         memcpy                  \
13987         memmove                 \
13988         mkstemp                 \
13989         pipe                    \
13990         read                    \
13991         recv                    \
13992         recvfrom                \
13993         setpwfile               \
13994         setgid                  \
13995         setegid                 \
13996         setsid                  \
13997         setuid                  \
13998         seteuid                 \
13999         sigaction               \
14000         signal                  \
14001         sigset                  \
14002         snprintf                \
14003         strdup                  \
14004         strerror                \
14005         strpbrk                 \
14006         strrchr                 \
14007         strsep                  \
14008         strstr                  \
14009         strtol                  \
14010         strtoul                 \
14011         strspn                  \
14012         sysconf                 \
14013         waitpid                 \
14014         wait4                   \
14015         write                   \
14016         send                    \
14017         sendto                  \
14018
14019 do
14020 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14021 echo "configure:14022: checking for $ac_func" >&5
14022 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14023   echo $ac_n "(cached) $ac_c" 1>&6
14024 else
14025   cat > conftest.$ac_ext <<EOF
14026 #line 14027 "configure"
14027 #include "confdefs.h"
14028 /* System header to define __stub macros and hopefully few prototypes,
14029     which can conflict with char $ac_func(); below.  */
14030 #include <assert.h>
14031 /* Override any gcc2 internal prototype to avoid an error.  */
14032 /* We use char because int might match the return type of a gcc2
14033     builtin and then its argument prototype would still apply.  */
14034 char $ac_func();
14035
14036 int main() {
14037
14038 /* The GNU C library defines this for functions which it implements
14039     to always fail with ENOSYS.  Some functions are actually named
14040     something starting with __ and the normal name is an alias.  */
14041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14042 choke me
14043 #else
14044 $ac_func();
14045 #endif
14046
14047 ; return 0; }
14048 EOF
14049 if { (eval echo configure:14050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14050   rm -rf conftest*
14051   eval "ac_cv_func_$ac_func=yes"
14052 else
14053   echo "configure: failed program was:" >&5
14054   cat conftest.$ac_ext >&5
14055   rm -rf conftest*
14056   eval "ac_cv_func_$ac_func=no"
14057 fi
14058 rm -f conftest*
14059 fi
14060
14061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14062   echo "$ac_t""yes" 1>&6
14063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14064   cat >> confdefs.h <<EOF
14065 #define $ac_tr_func 1
14066 EOF
14067  
14068 else
14069   echo "$ac_t""no" 1>&6
14070 fi
14071 done
14072
14073
14074 for ac_func in getopt tempnam
14075 do
14076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14077 echo "configure:14078: checking for $ac_func" >&5
14078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14079   echo $ac_n "(cached) $ac_c" 1>&6
14080 else
14081   cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 /* System header to define __stub macros and hopefully few prototypes,
14085     which can conflict with char $ac_func(); below.  */
14086 #include <assert.h>
14087 /* Override any gcc2 internal prototype to avoid an error.  */
14088 /* We use char because int might match the return type of a gcc2
14089     builtin and then its argument prototype would still apply.  */
14090 char $ac_func();
14091
14092 int main() {
14093
14094 /* The GNU C library defines this for functions which it implements
14095     to always fail with ENOSYS.  Some functions are actually named
14096     something starting with __ and the normal name is an alias.  */
14097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14098 choke me
14099 #else
14100 $ac_func();
14101 #endif
14102
14103 ; return 0; }
14104 EOF
14105 if { (eval echo configure:14106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14106   rm -rf conftest*
14107   eval "ac_cv_func_$ac_func=yes"
14108 else
14109   echo "configure: failed program was:" >&5
14110   cat conftest.$ac_ext >&5
14111   rm -rf conftest*
14112   eval "ac_cv_func_$ac_func=no"
14113 fi
14114 rm -f conftest*
14115 fi
14116
14117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14118   echo "$ac_t""yes" 1>&6
14119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14120   cat >> confdefs.h <<EOF
14121 #define $ac_tr_func 1
14122 EOF
14123  
14124 else
14125   echo "$ac_t""no" 1>&6
14126 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14127 fi
14128 done
14129
14130
14131
14132 # Check Configuration
14133 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14134 echo "configure:14135: checking declaration of sys_errlist" >&5
14135 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
14136   echo $ac_n "(cached) $ac_c" 1>&6
14137 else
14138   
14139         cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14142
14143 #include <stdio.h>
14144 #include <sys/types.h>
14145 #include <errno.h> 
14146 int main() {
14147 char *c = (char *) *sys_errlist
14148 ; return 0; }
14149 EOF
14150 if { (eval echo configure:14151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14151   rm -rf conftest*
14152   ol_cv_dcl_sys_errlist=yes
14153         ol_cv_have_sys_errlist=yes
14154 else
14155   echo "configure: failed program was:" >&5
14156   cat conftest.$ac_ext >&5
14157   rm -rf conftest*
14158   ol_cv_dcl_sys_errlist=no
14159 fi
14160 rm -f conftest*
14161 fi
14162
14163 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14164 #
14165 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14166 if test $ol_cv_dcl_sys_errlist = no ; then
14167         cat >> confdefs.h <<\EOF
14168 #define DECL_SYS_ERRLIST 1
14169 EOF
14170
14171
14172         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14173 echo "configure:14174: checking existence of sys_errlist" >&5
14174 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
14175   echo $ac_n "(cached) $ac_c" 1>&6
14176 else
14177   
14178                 cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 #include <errno.h>
14182 int main() {
14183 char *c = (char *) *sys_errlist
14184 ; return 0; }
14185 EOF
14186 if { (eval echo configure:14187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14187   rm -rf conftest*
14188   ol_cv_have_sys_errlist=yes
14189 else
14190   echo "configure: failed program was:" >&5
14191   cat conftest.$ac_ext >&5
14192   rm -rf conftest*
14193   ol_cv_have_sys_errlist=no
14194 fi
14195 rm -f conftest*
14196 fi
14197
14198 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14199 fi
14200 if test $ol_cv_have_sys_errlist = yes ; then
14201         cat >> confdefs.h <<\EOF
14202 #define HAVE_SYS_ERRLIST 1
14203 EOF
14204
14205 fi
14206
14207
14208
14209 if test "$ol_enable_debug" != no ; then
14210         cat >> confdefs.h <<\EOF
14211 #define LDAP_DEBUG 1
14212 EOF
14213
14214 fi
14215 if test "$ol_enable_syslog" = yes ; then
14216         cat >> confdefs.h <<\EOF
14217 #define LDAP_SYSLOG 1
14218 EOF
14219
14220 fi
14221 if test "$ol_enable_libui" = yes ; then
14222         cat >> confdefs.h <<\EOF
14223 #define LDAP_LIBUI 1
14224 EOF
14225
14226 fi
14227 if test "$ol_enable_cache" = no ; then
14228         cat >> confdefs.h <<\EOF
14229 #define LDAP_NOCACHE 1
14230 EOF
14231
14232 fi
14233 if test "$ol_enable_dns" != no ; then
14234         cat >> confdefs.h <<\EOF
14235 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14236 EOF
14237
14238 fi
14239 if test "$ol_enable_proctitle" != no ; then
14240         cat >> confdefs.h <<\EOF
14241 #define LDAP_PROCTITLE 1
14242 EOF
14243
14244 fi
14245 if test "$ol_enable_referrals" != no ; then
14246         cat >> confdefs.h <<\EOF
14247 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14248 EOF
14249
14250 fi
14251 if test "$ol_enable_cldap" != no ; then
14252         cat >> confdefs.h <<\EOF
14253 #define LDAP_CONNECTIONLESS 1
14254 EOF
14255
14256 fi
14257
14258 if test "$ol_enable_crypt" != no ; then
14259         cat >> confdefs.h <<\EOF
14260 #define SLAPD_CRYPT 1
14261 EOF
14262
14263 fi
14264 if test "$ol_enable_cleartext" != no ; then
14265         cat >> confdefs.h <<\EOF
14266 #define SLAPD_CLEARTEXT 1
14267 EOF
14268
14269 fi
14270 if test "$ol_enable_multimaster" != no ; then
14271         cat >> confdefs.h <<\EOF
14272 #define SLAPD_MULTIMASTER 1
14273 EOF
14274
14275 fi
14276 if test "$ol_enable_phonetic" != no ; then
14277         cat >> confdefs.h <<\EOF
14278 #define SLAPD_PHONETIC 1
14279 EOF
14280
14281 fi
14282 if test "$ol_enable_rlookups" != no ; then
14283         cat >> confdefs.h <<\EOF
14284 #define SLAPD_RLOOKUPS 1
14285 EOF
14286
14287 fi
14288 if test "$ol_enable_aci" != no ; then
14289         cat >> confdefs.h <<\EOF
14290 #define SLAPD_ACI_ENABLED 1
14291 EOF
14292
14293 fi
14294 if test "$ol_enable_discreteaci" != no ; then
14295         cat >> confdefs.h <<\EOF
14296 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14297 EOF
14298
14299 fi
14300
14301 if test "$ol_link_modules" != no ; then
14302         cat >> confdefs.h <<\EOF
14303 #define SLAPD_MODULES 1
14304 EOF
14305
14306         BUILD_SLAPD=yes
14307         MODULES_LIBS=-lltdl
14308         SLAPD_MODULES_LDFLAGS="-dlopen self"
14309 fi
14310
14311 if test "$ol_link_bdb2" != no ; then
14312         cat >> confdefs.h <<\EOF
14313 #define SLAPD_BDB2 1
14314 EOF
14315
14316         BUILD_SLAPD=yes
14317         BUILD_BDB2=yes
14318         if test "$ol_with_bdb2_module" != static ; then
14319                 cat >> confdefs.h <<\EOF
14320 #define SLAPD_BDB2_DYNAMIC 1
14321 EOF
14322
14323                 BUILD_BDB2=mod
14324                 BUILD_BDB2_DYNAMIC=shared
14325                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14326         fi
14327 fi
14328
14329 if test "$ol_enable_ldap" != no ; then
14330         cat >> confdefs.h <<\EOF
14331 #define SLAPD_LDAP 1
14332 EOF
14333
14334         BUILD_SLAPD=yes
14335         BUILD_LDAP=yes
14336         if test "$ol_with_ldap_module" != static ; then
14337                 cat >> confdefs.h <<\EOF
14338 #define SLAPD_LDAP_DYNAMIC 1
14339 EOF
14340
14341                 BUILD_LDAP=mod
14342                 BUILD_LDAP_DYNAMIC=shared
14343                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14344         fi
14345 fi
14346
14347 if test "$ol_link_ldbm" != no ; then
14348         cat >> confdefs.h <<\EOF
14349 #define SLAPD_LDBM 1
14350 EOF
14351
14352         BUILD_SLAPD=yes
14353         BUILD_LDBM=yes
14354         if test "$ol_with_ldbm_module" != static ; then
14355                 cat >> confdefs.h <<\EOF
14356 #define SLAPD_LDBM_DYNAMIC 1
14357 EOF
14358
14359                 BUILD_LDBM=mod
14360                 BUILD_LDBM_DYNAMIC=shared
14361                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14362         fi
14363 fi
14364
14365 if test "$ol_enable_passwd" != no ; then
14366         cat >> confdefs.h <<\EOF
14367 #define SLAPD_PASSWD 1
14368 EOF
14369
14370         BUILD_SLAPD=yes
14371         BUILD_PASSWD=yes
14372         if test "$ol_with_passwd_module" != static ; then
14373                 cat >> confdefs.h <<\EOF
14374 #define SLAPD_PASSWD_DYNAMIC 1
14375 EOF
14376
14377                 BUILD_PASSWD=mod
14378                 BUILD_PASSWD_DYNAMIC=shared
14379                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14380         fi
14381 fi
14382
14383 if test "$ol_link_perl" != no ; then
14384         cat >> confdefs.h <<\EOF
14385 #define SLAPD_PERL 1
14386 EOF
14387
14388         BUILD_SLAPD=yes
14389         BUILD_PERL=yes
14390         if test "$ol_with_perl_module" != static ; then
14391                 cat >> confdefs.h <<\EOF
14392 #define SLAPD_PERL_DYNAMIC 1
14393 EOF
14394
14395                 BUILD_PERL=mod
14396                 BUILD_PERL_DYNAMIC=shared
14397                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14398         fi
14399 fi
14400
14401 if test "$ol_enable_shell" != no ; then
14402         cat >> confdefs.h <<\EOF
14403 #define SLAPD_SHELL 1
14404 EOF
14405
14406         BUILD_SLAPD=yes
14407         BUILD_SHELL=yes
14408         if test "$ol_with_shell_module" != static ; then
14409                 cat >> confdefs.h <<\EOF
14410 #define SLAPD_SHELL_DYNAMIC 1
14411 EOF
14412
14413                 BUILD_SHELL=mod
14414                 BUILD_SHELL_DYNAMIC=shared
14415                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14416         fi
14417 fi
14418
14419 if test "$ol_enable_tcl" != no ; then
14420         cat >> confdefs.h <<\EOF
14421 #define SLAPD_TCL 1
14422 EOF
14423
14424         BUILD_SLAPD=yes
14425         BUILD_TCL=yes
14426         if test "$ol_with_tcl_module" != static; then
14427                 cat >> confdefs.h <<\EOF
14428 #define SLAPD_TCL_DYNAMIC 1
14429 EOF
14430
14431                 BUILD_TCL=mod
14432                 BUILD_TCL_DYNAMIC=shared
14433                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14434         fi
14435 fi
14436
14437 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14438         $BUILD_SLAPD = yes ; then
14439         BUILD_SLURPD=yes
14440 fi
14441
14442 if test "$ol_link_isode" != no ; then
14443         BUILD_LDAPD=yes
14444 fi
14445
14446
14447
14448
14449   
14450   
14451   
14452   
14453   
14454   
14455   
14456   
14457   
14458   
14459   
14460   
14461   
14462   
14463   
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490 trap '' 1 2 15
14491
14492 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14493
14494 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14495 # Let make expand exec_prefix.
14496 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14497
14498 # Any assignment to VPATH causes Sun make to only execute
14499 # the first set of double-colon rules, so remove it if not needed.
14500 # If there is a colon in the path, we need to keep it.
14501 if test "x$srcdir" = x.; then
14502   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14503 fi
14504
14505 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14506
14507 DEFS=-DHAVE_CONFIG_H
14508
14509 # Without the "./", some shells look in PATH for config.status.
14510 : ${CONFIG_STATUS=./config.status}
14511
14512 echo creating $CONFIG_STATUS
14513 rm -f $CONFIG_STATUS
14514 cat > $CONFIG_STATUS <<EOF
14515 #! /bin/sh
14516 # Generated automatically by configure.
14517 # Run this file to recreate the current configuration.
14518 # This directory was configured as follows,
14519 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14520 #
14521 # $0 $ac_configure_args
14522 #
14523 # Compiler output produced by configure, useful for debugging
14524 # configure, is in ./config.log if it exists.
14525
14526 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14527 for ac_option
14528 do
14529   case "\$ac_option" in
14530   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14531     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14532     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14533   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14534     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14535     exit 0 ;;
14536   -help | --help | --hel | --he | --h)
14537     echo "\$ac_cs_usage"; exit 0 ;;
14538   *) echo "\$ac_cs_usage"; exit 1 ;;
14539   esac
14540 done
14541
14542 ac_given_srcdir=$srcdir
14543 ac_given_INSTALL="$INSTALL"
14544
14545 trap 'rm -fr `echo "\
14546 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14547 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14548 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14549 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14550 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14551 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14552 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14553 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14554 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14555 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14556 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14557 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14558 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14559 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14560 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14561 include/Makefile:build/top.mk:include/Makefile.in \
14562 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14563 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14564 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14565 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14566 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14567 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14568 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14569 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14570 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14571 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14572 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14573 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14574 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14575 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14576 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14577 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14578 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14579 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14580 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14581 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14582 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14583 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14584 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14585 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14586 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14587 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14588  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14589 EOF
14590 cat >> $CONFIG_STATUS <<EOF
14591
14592 # Protect against being on the right side of a sed subst in config.status.
14593 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14594  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14595 $ac_vpsub
14596 $extrasub
14597 s%@SHELL@%$SHELL%g
14598 s%@CFLAGS@%$CFLAGS%g
14599 s%@CPPFLAGS@%$CPPFLAGS%g
14600 s%@CXXFLAGS@%$CXXFLAGS%g
14601 s%@FFLAGS@%$FFLAGS%g
14602 s%@DEFS@%$DEFS%g
14603 s%@LDFLAGS@%$LDFLAGS%g
14604 s%@LIBS@%$LIBS%g
14605 s%@exec_prefix@%$exec_prefix%g
14606 s%@prefix@%$prefix%g
14607 s%@program_transform_name@%$program_transform_name%g
14608 s%@bindir@%$bindir%g
14609 s%@sbindir@%$sbindir%g
14610 s%@libexecdir@%$libexecdir%g
14611 s%@datadir@%$datadir%g
14612 s%@sysconfdir@%$sysconfdir%g
14613 s%@sharedstatedir@%$sharedstatedir%g
14614 s%@localstatedir@%$localstatedir%g
14615 s%@libdir@%$libdir%g
14616 s%@includedir@%$includedir%g
14617 s%@oldincludedir@%$oldincludedir%g
14618 s%@infodir@%$infodir%g
14619 s%@mandir@%$mandir%g
14620 s%@host@%$host%g
14621 s%@host_alias@%$host_alias%g
14622 s%@host_cpu@%$host_cpu%g
14623 s%@host_vendor@%$host_vendor%g
14624 s%@host_os@%$host_os%g
14625 s%@target@%$target%g
14626 s%@target_alias@%$target_alias%g
14627 s%@target_cpu@%$target_cpu%g
14628 s%@target_vendor@%$target_vendor%g
14629 s%@target_os@%$target_os%g
14630 s%@build@%$build%g
14631 s%@build_alias@%$build_alias%g
14632 s%@build_cpu@%$build_cpu%g
14633 s%@build_vendor@%$build_vendor%g
14634 s%@build_os@%$build_os%g
14635 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14636 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14637 s%@INSTALL_DATA@%$INSTALL_DATA%g
14638 s%@PACKAGE@%$PACKAGE%g
14639 s%@VERSION@%$VERSION%g
14640 s%@ACLOCAL@%$ACLOCAL%g
14641 s%@AUTOCONF@%$AUTOCONF%g
14642 s%@AUTOMAKE@%$AUTOMAKE%g
14643 s%@AUTOHEADER@%$AUTOHEADER%g
14644 s%@MAKEINFO@%$MAKEINFO%g
14645 s%@install_sh@%$install_sh%g
14646 s%@AMTAR@%$AMTAR%g
14647 s%@AWK@%$AWK%g
14648 s%@AMTARFLAGS@%$AMTARFLAGS%g
14649 s%@SET_MAKE@%$SET_MAKE%g
14650 s%@top_builddir@%$top_builddir%g
14651 s%@ldap_subdir@%$ldap_subdir%g
14652 s%@CC@%$CC%g
14653 s%@RANLIB@%$RANLIB%g
14654 s%@LD@%$LD%g
14655 s%@NM@%$NM%g
14656 s%@LN_S@%$LN_S%g
14657 s%@LIBTOOL@%$LIBTOOL%g
14658 s%@LN_H@%$LN_H%g
14659 s%@SENDMAIL@%$SENDMAIL%g
14660 s%@EDITOR@%$EDITOR%g
14661 s%@FINGER@%$FINGER%g
14662 s%@PERLBIN@%$PERLBIN%g
14663 s%@CPP@%$CPP%g
14664 s%@EXEEXT@%$EXEEXT%g
14665 s%@OBJEXT@%$OBJEXT%g
14666 s%@OL_MKDEP@%$OL_MKDEP%g
14667 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14668 s%@PEPSY@%$PEPSY%g
14669 s%@LIBOBJS@%$LIBOBJS%g
14670 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14671 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14672 s%@BUILD_BDB2@%$BUILD_BDB2%g
14673 s%@BUILD_LDAP@%$BUILD_LDAP%g
14674 s%@BUILD_LDBM@%$BUILD_LDBM%g
14675 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14676 s%@BUILD_PERL@%$BUILD_PERL%g
14677 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14678 s%@BUILD_SHELL@%$BUILD_SHELL%g
14679 s%@BUILD_TCL@%$BUILD_TCL%g
14680 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14681 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14682 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14683 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14684 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14685 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14686 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14687 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14688 s%@LDAP_LIBS@%$LDAP_LIBS%g
14689 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14690 s%@LDIF_LIBS@%$LDIF_LIBS%g
14691 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14692 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14693 s%@LDBM_LIBS@%$LDBM_LIBS%g
14694 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14695 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14696 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14697 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14698 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14699 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14700 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14701 s%@KRB_LIBS@%$KRB_LIBS%g
14702 s%@READLINE_LIBS@%$READLINE_LIBS%g
14703 s%@SASL_LIBS@%$SASL_LIBS%g
14704 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14705 s%@TLS_LIBS@%$TLS_LIBS%g
14706 s%@MODULES_LIBS@%$MODULES_LIBS%g
14707
14708 CEOF
14709 EOF
14710
14711 cat >> $CONFIG_STATUS <<\EOF
14712
14713 # Split the substitutions into bite-sized pieces for seds with
14714 # small command number limits, like on Digital OSF/1 and HP-UX.
14715 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14716 ac_file=1 # Number of current file.
14717 ac_beg=1 # First line for current file.
14718 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14719 ac_more_lines=:
14720 ac_sed_cmds=""
14721 while $ac_more_lines; do
14722   if test $ac_beg -gt 1; then
14723     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14724   else
14725     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14726   fi
14727   if test ! -s conftest.s$ac_file; then
14728     ac_more_lines=false
14729     rm -f conftest.s$ac_file
14730   else
14731     if test -z "$ac_sed_cmds"; then
14732       ac_sed_cmds="sed -f conftest.s$ac_file"
14733     else
14734       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14735     fi
14736     ac_file=`expr $ac_file + 1`
14737     ac_beg=$ac_end
14738     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14739   fi
14740 done
14741 if test -z "$ac_sed_cmds"; then
14742   ac_sed_cmds=cat
14743 fi
14744 EOF
14745
14746 cat >> $CONFIG_STATUS <<EOF
14747
14748 CONFIG_FILES=\${CONFIG_FILES-"\
14749 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14750 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14751 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14752 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14753 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14754 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14755 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14756 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14757 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14758 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14759 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14760 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14761 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14762 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14763 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14764 include/Makefile:build/top.mk:include/Makefile.in \
14765 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14766 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14767 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14768 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14769 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14770 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14771 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14772 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14773 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14774 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14775 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14776 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14777 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14778 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14779 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14780 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14781 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14782 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14783 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14784 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14785 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14786 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14787 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14788 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14789 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14790 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14791 "}
14792 EOF
14793 cat >> $CONFIG_STATUS <<\EOF
14794 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14795   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14796   case "$ac_file" in
14797   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14798        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14799   *) ac_file_in="${ac_file}.in" ;;
14800   esac
14801
14802   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14803
14804   # Remove last slash and all that follows it.  Not all systems have dirname.
14805   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14806   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14807     # The file is in a subdirectory.
14808     test ! -d "$ac_dir" && mkdir "$ac_dir"
14809     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14810     # A "../" for each directory in $ac_dir_suffix.
14811     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14812   else
14813     ac_dir_suffix= ac_dots=
14814   fi
14815
14816   case "$ac_given_srcdir" in
14817   .)  srcdir=.
14818       if test -z "$ac_dots"; then top_srcdir=.
14819       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14820   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14821   *) # Relative path.
14822     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14823     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14824   esac
14825
14826   case "$ac_given_INSTALL" in
14827   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14828   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14829   esac
14830
14831   echo creating "$ac_file"
14832   rm -f "$ac_file"
14833   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14834   case "$ac_file" in
14835   *Makefile*) ac_comsub="1i\\
14836 # $configure_input" ;;
14837   *) ac_comsub= ;;
14838   esac
14839
14840   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14841   sed -e "$ac_comsub
14842 s%@configure_input@%$configure_input%g
14843 s%@srcdir@%$srcdir%g
14844 s%@top_srcdir@%$top_srcdir%g
14845 s%@INSTALL@%$INSTALL%g
14846 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14847 fi; done
14848 rm -f conftest.s*
14849
14850 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14851 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14852 #
14853 # ac_d sets the value in "#define NAME VALUE" lines.
14854 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14855 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14856 ac_dC='\3'
14857 ac_dD='%g'
14858 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14859 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14860 ac_uB='\([      ]\)%\1#\2define\3'
14861 ac_uC=' '
14862 ac_uD='\4%g'
14863 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14864 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14865 ac_eB='$%\1#\2define\3'
14866 ac_eC=' '
14867 ac_eD='%g'
14868
14869 if test "${CONFIG_HEADERS+set}" != set; then
14870 EOF
14871 cat >> $CONFIG_STATUS <<EOF
14872   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14873 EOF
14874 cat >> $CONFIG_STATUS <<\EOF
14875 fi
14876 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14877   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14878   case "$ac_file" in
14879   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14880        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14881   *) ac_file_in="${ac_file}.in" ;;
14882   esac
14883
14884   echo creating $ac_file
14885
14886   rm -f conftest.frag conftest.in conftest.out
14887   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14888   cat $ac_file_inputs > conftest.in
14889
14890 EOF
14891
14892 # Transform confdefs.h into a sed script conftest.vals that substitutes
14893 # the proper values into config.h.in to produce config.h.  And first:
14894 # Protect against being on the right side of a sed subst in config.status.
14895 # Protect against being in an unquoted here document in config.status.
14896 rm -f conftest.vals
14897 cat > conftest.hdr <<\EOF
14898 s/[\\&%]/\\&/g
14899 s%[\\$`]%\\&%g
14900 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14901 s%ac_d%ac_u%gp
14902 s%ac_u%ac_e%gp
14903 EOF
14904 sed -n -f conftest.hdr confdefs.h > conftest.vals
14905 rm -f conftest.hdr
14906
14907 # This sed command replaces #undef with comments.  This is necessary, for
14908 # example, in the case of _POSIX_SOURCE, which is predefined and required
14909 # on some systems where configure will not decide to define it.
14910 cat >> conftest.vals <<\EOF
14911 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14912 EOF
14913
14914 # Break up conftest.vals because some shells have a limit on
14915 # the size of here documents, and old seds have small limits too.
14916
14917 rm -f conftest.tail
14918 while :
14919 do
14920   ac_lines=`grep -c . conftest.vals`
14921   # grep -c gives empty output for an empty file on some AIX systems.
14922   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14923   # Write a limited-size here document to conftest.frag.
14924   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14925   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14926   echo 'CEOF
14927   sed -f conftest.frag conftest.in > conftest.out
14928   rm -f conftest.in
14929   mv conftest.out conftest.in
14930 ' >> $CONFIG_STATUS
14931   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14932   rm -f conftest.vals
14933   mv conftest.tail conftest.vals
14934 done
14935 rm -f conftest.vals
14936
14937 cat >> $CONFIG_STATUS <<\EOF
14938   rm -f conftest.frag conftest.h
14939   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14940   cat conftest.in >> conftest.h
14941   rm -f conftest.in
14942   if cmp -s $ac_file conftest.h 2>/dev/null; then
14943     echo "$ac_file is unchanged"
14944     rm -f conftest.h
14945   else
14946     # Remove last slash and all that follows it.  Not all systems have dirname.
14947       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14948       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14949       # The file is in a subdirectory.
14950       test ! -d "$ac_dir" && mkdir "$ac_dir"
14951     fi
14952     rm -f $ac_file
14953     mv conftest.h $ac_file
14954   fi
14955 fi; done
14956
14957 EOF
14958 cat >> $CONFIG_STATUS <<EOF
14959
14960 EOF
14961 cat >> $CONFIG_STATUS <<\EOF
14962
14963 date > stamp-h
14964 echo Please \"make depend\" to build dependencies
14965
14966 exit 0
14967 EOF
14968 chmod +x $CONFIG_STATUS
14969 rm -fr confdefs* $ac_clean_files
14970 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14971