]> git.sur5r.net Git - openldap/blob - configure
7580b3859c640c6c6c1dc4e2de68ba7319b52d03
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.273 1999/11/01 21:06:01 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.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-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-dynamic    enable linking built binaries with dynamic libs (no)"
91 ac_help="$ac_help
92     --enable-bdb2       enable bdb2 backend (no)"
93 ac_help="$ac_help
94       --with-bdb2-module        module type (static)"
95 ac_help="$ac_help
96     --enable-ldap       enable ldap backend (no)"
97 ac_help="$ac_help
98       --with-ldap-module        module type (static)"
99 ac_help="$ac_help
100     --enable-ldbm       enable ldbm backend (yes)"
101 ac_help="$ac_help
102       --with-ldbm-api   use LDBM API (auto)"
103 ac_help="$ac_help
104       --with-ldbm-module        module type (static)"
105 ac_help="$ac_help
106       --with-ldbm-type  use LDBM type (auto)"
107 ac_help="$ac_help
108     --enable-passwd     enable passwd backend (no)"
109 ac_help="$ac_help
110       --with-passwd-module      module type (static)"
111 ac_help="$ac_help
112     --enable-perl       enable perl backend (no)"
113 ac_help="$ac_help
114       --with-perl-module        module type (static)"
115 ac_help="$ac_help
116     --enable-shell      enable shell backend (no)"
117 ac_help="$ac_help
118       --with-shell-module       module type (static)"
119 ac_help="$ac_help
120     --enable-tcl        enable tcl backend (no)"
121 ac_help="$ac_help
122       --with-tcl-module module type (static)"
123 ac_help="$ac_help
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd       enable building slurpd (auto)"
127 ac_help="$ac_help
128 Library Generation & Linking Options"
129 ac_help="$ac_help
130   --enable-static[=PKGS]  build static libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-shared[=PKGS]  build shared libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
135 ac_help="$ac_help
136   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
137 ac_help="$ac_help
138   --disable-libtool-lock  avoid locking (might break parallel builds)"
139
140 # Initialize some variables set by options.
141 # The variables have the same names as the options, with
142 # dashes changed to underlines.
143 build=NONE
144 cache_file=./config.cache
145 exec_prefix=NONE
146 host=NONE
147 no_create=
148 nonopt=NONE
149 no_recursion=
150 prefix=NONE
151 program_prefix=NONE
152 program_suffix=NONE
153 program_transform_name=s,x,x,
154 silent=
155 site=
156 srcdir=
157 target=NONE
158 verbose=
159 x_includes=NONE
160 x_libraries=NONE
161 bindir='${exec_prefix}/bin'
162 sbindir='${exec_prefix}/sbin'
163 libexecdir='${exec_prefix}/libexec'
164 datadir='${prefix}/share'
165 sysconfdir='${prefix}/etc'
166 sharedstatedir='${prefix}/com'
167 localstatedir='${prefix}/var'
168 libdir='${exec_prefix}/lib'
169 includedir='${prefix}/include'
170 oldincludedir='/usr/include'
171 infodir='${prefix}/info'
172 mandir='${prefix}/man'
173
174 # Initialize some other variables.
175 subdirs=
176 MFLAGS= MAKEFLAGS=
177 SHELL=${CONFIG_SHELL-/bin/sh}
178 # Maximum number of lines to put in a shell here document.
179 ac_max_here_lines=12
180
181 ac_prev=
182 for ac_option
183 do
184
185   # If the previous option needs an argument, assign it.
186   if test -n "$ac_prev"; then
187     eval "$ac_prev=\$ac_option"
188     ac_prev=
189     continue
190   fi
191
192   case "$ac_option" in
193   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
194   *) ac_optarg= ;;
195   esac
196
197   # Accept the important Cygnus configure options, so we can diagnose typos.
198
199   case "$ac_option" in
200
201   -bindir | --bindir | --bindi | --bind | --bin | --bi)
202     ac_prev=bindir ;;
203   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
204     bindir="$ac_optarg" ;;
205
206   -build | --build | --buil | --bui | --bu)
207     ac_prev=build ;;
208   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
209     build="$ac_optarg" ;;
210
211   -cache-file | --cache-file | --cache-fil | --cache-fi \
212   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
213     ac_prev=cache_file ;;
214   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
215   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
216     cache_file="$ac_optarg" ;;
217
218   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
219     ac_prev=datadir ;;
220   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
221   | --da=*)
222     datadir="$ac_optarg" ;;
223
224   -disable-* | --disable-*)
225     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
226     # Reject names that are not valid shell variable names.
227     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
228       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
229     fi
230     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
231     eval "enable_${ac_feature}=no" ;;
232
233   -enable-* | --enable-*)
234     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
235     # Reject names that are not valid shell variable names.
236     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
237       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
238     fi
239     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
240     case "$ac_option" in
241       *=*) ;;
242       *) ac_optarg=yes ;;
243     esac
244     eval "enable_${ac_feature}='$ac_optarg'" ;;
245
246   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
247   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
248   | --exec | --exe | --ex)
249     ac_prev=exec_prefix ;;
250   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
251   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
252   | --exec=* | --exe=* | --ex=*)
253     exec_prefix="$ac_optarg" ;;
254
255   -gas | --gas | --ga | --g)
256     # Obsolete; use --with-gas.
257     with_gas=yes ;;
258
259   -help | --help | --hel | --he)
260     # Omit some internal or obsolete options to make the list less imposing.
261     # This message is too long to be a string in the A/UX 3.1 sh.
262     cat << EOF
263 Usage: configure [options] [host]
264 Options: [defaults in brackets after descriptions]
265 Configuration:
266   --cache-file=FILE       cache test results in FILE
267   --help                  print this message
268   --no-create             do not create output files
269   --quiet, --silent       do not print \`checking...' messages
270   --version               print the version of autoconf that created configure
271 Directory and file names:
272   --prefix=PREFIX         install architecture-independent files in PREFIX
273                           [$ac_default_prefix]
274   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
275                           [same as prefix]
276   --bindir=DIR            user executables in DIR [EPREFIX/bin]
277   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
278   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
279   --datadir=DIR           read-only architecture-independent data in DIR
280                           [PREFIX/share]
281   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
282   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
283                           [PREFIX/com]
284   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
285   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
286   --includedir=DIR        C header files in DIR [PREFIX/include]
287   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
288   --infodir=DIR           info documentation in DIR [PREFIX/info]
289   --mandir=DIR            man documentation in DIR [PREFIX/man]
290   --srcdir=DIR            find the sources in DIR [configure dir or ..]
291   --program-prefix=PREFIX prepend PREFIX to installed program names
292   --program-suffix=SUFFIX append SUFFIX to installed program names
293   --program-transform-name=PROGRAM
294                           run sed PROGRAM on installed program names
295 EOF
296     cat << EOF
297 Host type:
298   --build=BUILD           configure for building on BUILD [BUILD=HOST]
299   --host=HOST             configure for HOST [guessed]
300   --target=TARGET         configure for TARGET [TARGET=HOST]
301 Features and packages:
302   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
303   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
304   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
305   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
306   --x-includes=DIR        X include files are in DIR
307   --x-libraries=DIR       X library files are in DIR
308 EOF
309     if test -n "$ac_help"; then
310       echo "--enable and --with options recognized:$ac_help"
311     fi
312     exit 0 ;;
313
314   -host | --host | --hos | --ho)
315     ac_prev=host ;;
316   -host=* | --host=* | --hos=* | --ho=*)
317     host="$ac_optarg" ;;
318
319   -includedir | --includedir | --includedi | --included | --include \
320   | --includ | --inclu | --incl | --inc)
321     ac_prev=includedir ;;
322   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
323   | --includ=* | --inclu=* | --incl=* | --inc=*)
324     includedir="$ac_optarg" ;;
325
326   -infodir | --infodir | --infodi | --infod | --info | --inf)
327     ac_prev=infodir ;;
328   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
329     infodir="$ac_optarg" ;;
330
331   -libdir | --libdir | --libdi | --libd)
332     ac_prev=libdir ;;
333   -libdir=* | --libdir=* | --libdi=* | --libd=*)
334     libdir="$ac_optarg" ;;
335
336   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
337   | --libexe | --libex | --libe)
338     ac_prev=libexecdir ;;
339   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
340   | --libexe=* | --libex=* | --libe=*)
341     libexecdir="$ac_optarg" ;;
342
343   -localstatedir | --localstatedir | --localstatedi | --localstated \
344   | --localstate | --localstat | --localsta | --localst \
345   | --locals | --local | --loca | --loc | --lo)
346     ac_prev=localstatedir ;;
347   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
348   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
349   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
350     localstatedir="$ac_optarg" ;;
351
352   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
353     ac_prev=mandir ;;
354   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
355     mandir="$ac_optarg" ;;
356
357   -nfp | --nfp | --nf)
358     # Obsolete; use --without-fp.
359     with_fp=no ;;
360
361   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
362   | --no-cr | --no-c)
363     no_create=yes ;;
364
365   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
366   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
367     no_recursion=yes ;;
368
369   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
370   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
371   | --oldin | --oldi | --old | --ol | --o)
372     ac_prev=oldincludedir ;;
373   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
374   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
375   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
376     oldincludedir="$ac_optarg" ;;
377
378   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
379     ac_prev=prefix ;;
380   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
381     prefix="$ac_optarg" ;;
382
383   -program-prefix | --program-prefix | --program-prefi | --program-pref \
384   | --program-pre | --program-pr | --program-p)
385     ac_prev=program_prefix ;;
386   -program-prefix=* | --program-prefix=* | --program-prefi=* \
387   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
388     program_prefix="$ac_optarg" ;;
389
390   -program-suffix | --program-suffix | --program-suffi | --program-suff \
391   | --program-suf | --program-su | --program-s)
392     ac_prev=program_suffix ;;
393   -program-suffix=* | --program-suffix=* | --program-suffi=* \
394   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
395     program_suffix="$ac_optarg" ;;
396
397   -program-transform-name | --program-transform-name \
398   | --program-transform-nam | --program-transform-na \
399   | --program-transform-n | --program-transform- \
400   | --program-transform | --program-transfor \
401   | --program-transfo | --program-transf \
402   | --program-trans | --program-tran \
403   | --progr-tra | --program-tr | --program-t)
404     ac_prev=program_transform_name ;;
405   -program-transform-name=* | --program-transform-name=* \
406   | --program-transform-nam=* | --program-transform-na=* \
407   | --program-transform-n=* | --program-transform-=* \
408   | --program-transform=* | --program-transfor=* \
409   | --program-transfo=* | --program-transf=* \
410   | --program-trans=* | --program-tran=* \
411   | --progr-tra=* | --program-tr=* | --program-t=*)
412     program_transform_name="$ac_optarg" ;;
413
414   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
415   | -silent | --silent | --silen | --sile | --sil)
416     silent=yes ;;
417
418   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
419     ac_prev=sbindir ;;
420   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
421   | --sbi=* | --sb=*)
422     sbindir="$ac_optarg" ;;
423
424   -sharedstatedir | --sharedstatedir | --sharedstatedi \
425   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
426   | --sharedst | --shareds | --shared | --share | --shar \
427   | --sha | --sh)
428     ac_prev=sharedstatedir ;;
429   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
430   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
431   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
432   | --sha=* | --sh=*)
433     sharedstatedir="$ac_optarg" ;;
434
435   -site | --site | --sit)
436     ac_prev=site ;;
437   -site=* | --site=* | --sit=*)
438     site="$ac_optarg" ;;
439
440   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
441     ac_prev=srcdir ;;
442   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
443     srcdir="$ac_optarg" ;;
444
445   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
446   | --syscon | --sysco | --sysc | --sys | --sy)
447     ac_prev=sysconfdir ;;
448   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
449   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
450     sysconfdir="$ac_optarg" ;;
451
452   -target | --target | --targe | --targ | --tar | --ta | --t)
453     ac_prev=target ;;
454   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
455     target="$ac_optarg" ;;
456
457   -v | -verbose | --verbose | --verbos | --verbo | --verb)
458     verbose=yes ;;
459
460   -version | --version | --versio | --versi | --vers)
461     echo "configure generated by autoconf version 2.13.1"
462     exit 0 ;;
463
464   -with-* | --with-*)
465     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
466     # Reject names that are not valid shell variable names.
467     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
468       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469     fi
470     ac_package=`echo $ac_package| sed 's/-/_/g'`
471     case "$ac_option" in
472       *=*) ;;
473       *) ac_optarg=yes ;;
474     esac
475     eval "with_${ac_package}='$ac_optarg'" ;;
476
477   -without-* | --without-*)
478     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
479     # Reject names that are not valid shell variable names.
480     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
481       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
482     fi
483     ac_package=`echo $ac_package| sed 's/-/_/g'`
484     eval "with_${ac_package}=no" ;;
485
486   --x)
487     # Obsolete; use --with-x.
488     with_x=yes ;;
489
490   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
491   | --x-incl | --x-inc | --x-in | --x-i)
492     ac_prev=x_includes ;;
493   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
494   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
495     x_includes="$ac_optarg" ;;
496
497   -x-libraries | --x-libraries | --x-librarie | --x-librari \
498   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
499     ac_prev=x_libraries ;;
500   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
501   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
502     x_libraries="$ac_optarg" ;;
503
504   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
505     ;;
506
507   *)
508     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
509       echo "configure: warning: $ac_option: invalid host type" 1>&2
510     fi
511     if test "x$nonopt" != xNONE; then
512       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
513     fi
514     nonopt="$ac_option"
515     ;;
516
517   esac
518 done
519
520 if test -n "$ac_prev"; then
521   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
522 fi
523
524 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
525
526 # File descriptor usage:
527 # 0 standard input
528 # 1 file creation
529 # 2 errors and warnings
530 # 3 some systems may open it to /dev/tty
531 # 4 used on the Kubota Titan
532 # 6 checking for... messages and results
533 # 5 compiler messages saved in config.log
534 if test "$silent" = yes; then
535   exec 6>/dev/null
536 else
537   exec 6>&1
538 fi
539 exec 5>./config.log
540
541 echo "\
542 This file contains any messages produced by compilers while
543 running configure, to aid debugging if configure makes a mistake.
544 " 1>&5
545
546 # Strip out --no-create and --no-recursion so they do not pile up.
547 # Also quote any args containing shell metacharacters.
548 ac_configure_args=
549 for ac_arg
550 do
551   case "$ac_arg" in
552   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
553   | --no-cr | --no-c) ;;
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
556   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
557   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
558   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
559   esac
560 done
561
562 # NLS nuisances.
563 # Only set these to C if already set.  These must not be set unconditionally
564 # because not all systems understand e.g. LANG=C (notably SCO).
565 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
566 # Non-C LC_CTYPE values break the ctype check.
567 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
568 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
569 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
570 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
571
572 # confdefs.h avoids OS command line length limits that DEFS can exceed.
573 rm -rf conftest* confdefs.h
574 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
575 echo > confdefs.h
576
577 # A filename unique to this package, relative to the directory that
578 # configure is in, which we can look for to find out if srcdir is correct.
579 ac_unique_file=build/version
580
581 # Find the source files, if location was not specified.
582 if test -z "$srcdir"; then
583   ac_srcdir_defaulted=yes
584   # Try the directory containing this script, then its parent.
585   ac_prog=$0
586   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
587   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
588   srcdir=$ac_confdir
589   if test ! -r $srcdir/$ac_unique_file; then
590     srcdir=..
591   fi
592 else
593   ac_srcdir_defaulted=no
594 fi
595 if test ! -r $srcdir/$ac_unique_file; then
596   if test "$ac_srcdir_defaulted" = yes; then
597     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
598   else
599     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
600   fi
601 fi
602 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
603
604 # Prefer explicitly selected file to automatically selected ones.
605 if test -z "$CONFIG_SITE"; then
606   if test "x$prefix" != xNONE; then
607     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
608   else
609     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
610   fi
611 fi
612 for ac_site_file in $CONFIG_SITE; do
613   if test -r "$ac_site_file"; then
614     echo "loading site script $ac_site_file"
615     . "$ac_site_file"
616   fi
617 done
618
619
620 ac_ext=c
621 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
622 ac_cpp='$CPP $CPPFLAGS'
623 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
624 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
625 cross_compiling=$ac_cv_prog_cc_cross
626
627 ac_exeext=
628 ac_objext=o
629 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
630   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
631   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
632     ac_n= ac_c='
633 ' ac_t='        '
634   else
635     ac_n=-n ac_c= ac_t=
636   fi
637 else
638   ac_n= ac_c='\c' ac_t=
639 fi
640
641 ac_aux_dir=
642 for ac_dir in build $srcdir/build; do
643   if test -f $ac_dir/install-sh; then
644     ac_aux_dir=$ac_dir
645     ac_install_sh="$ac_aux_dir/install-sh -c"
646     break
647   elif test -f $ac_dir/install.sh; then
648     ac_aux_dir=$ac_dir
649     ac_install_sh="$ac_aux_dir/install.sh -c"
650     break
651   fi
652 done
653 if test -z "$ac_aux_dir"; then
654   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
655 fi
656 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
657 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
658 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
659
660 OL_VERSION=`cat $ac_aux_dir/version`
661 if test -z "$OL_VERSION"; then
662         { echo "configure: error: could not determine version" 1>&2; exit 1; }
663 fi
664
665 echo "Configuring OpenLDAP $OL_VERSION ..."
666
667
668 echo $ac_n "checking host system type""... $ac_c" 1>&6
669 echo "configure:670: checking host system type" >&5
670 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
671
672 # Make sure we can run config.sub.
673   if $ac_config_sub sun4 >/dev/null 2>&1; then :
674     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
675   fi
676
677   ac_cv_host_alias=$host
678   case "$ac_cv_host_alias" in
679   NONE)
680     case $nonopt in
681     NONE)
682       if ac_cv_host_alias=`$ac_config_guess`; then :
683       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684       fi ;;
685     *) ac_cv_host_alias=$nonopt ;;
686     esac ;;
687   esac
688
689   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
690   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
691   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
692   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
693 else
694   echo $ac_n "(cached) $ac_c" 1>&6
695 fi
696
697 echo "$ac_t""$ac_cv_host" 1>&6
698
699 host=$ac_cv_host
700 host_alias=$ac_cv_host_alias
701 host_cpu=$ac_cv_host_cpu
702 host_vendor=$ac_cv_host_vendor
703 host_os=$ac_cv_host_os
704
705
706
707
708
709 echo $ac_n "checking target system type""... $ac_c" 1>&6
710 echo "configure:711: checking target system type" >&5
711 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
712
713 # Make sure we can run config.sub.
714   if $ac_config_sub sun4 >/dev/null 2>&1; then :
715     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
716   fi
717
718   ac_cv_target_alias=$target
719   case "$ac_cv_target_alias" in
720   NONE)
721     case $nonopt in
722     NONE)
723       ac_cv_target_alias=$host_alias ;;
724
725     *) ac_cv_target_alias=$nonopt ;;
726     esac ;;
727   esac
728
729   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
730   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
731   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
732   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
733 else
734   echo $ac_n "(cached) $ac_c" 1>&6
735 fi
736
737 echo "$ac_t""$ac_cv_target" 1>&6
738
739 target=$ac_cv_target
740 target_alias=$ac_cv_target_alias
741 target_cpu=$ac_cv_target_cpu
742 target_vendor=$ac_cv_target_vendor
743 target_os=$ac_cv_target_os
744
745
746
747
748
749 echo $ac_n "checking build system type""... $ac_c" 1>&6
750 echo "configure:751: checking build system type" >&5
751 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
752
753 # Make sure we can run config.sub.
754   if $ac_config_sub sun4 >/dev/null 2>&1; then :
755     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
756   fi
757
758   ac_cv_build_alias=$build
759   case "$ac_cv_build_alias" in
760   NONE)
761     case $nonopt in
762     NONE)
763       ac_cv_build_alias=$host_alias ;;
764
765     *) ac_cv_build_alias=$nonopt ;;
766     esac ;;
767   esac
768
769   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
770   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
771   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
772   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
773 else
774   echo $ac_n "(cached) $ac_c" 1>&6
775 fi
776
777 echo "$ac_t""$ac_cv_build" 1>&6
778
779 build=$ac_cv_build
780 build_alias=$ac_cv_build_alias
781 build_cpu=$ac_cv_build_cpu
782 build_vendor=$ac_cv_build_vendor
783 build_os=$ac_cv_build_os
784
785
786
787
788
789 # Do some error checking and defaulting for the host and target type.
790 # The inputs are:
791 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
792 #
793 # The rules are:
794 # 1. You are not allowed to specify --host, --target, and nonopt at the
795 #    same time.
796 # 2. Host defaults to nonopt.
797 # 3. If nonopt is not specified, then host defaults to the current host,
798 #    as determined by config.guess.
799 # 4. Target and build default to nonopt.
800 # 5. If nonopt is not specified, then target and build default to host.
801
802 # The aliases save the names the user supplied, while $host etc.
803 # will get canonicalized.
804 case $host---$target---$nonopt in
805 NONE---*---* | *---NONE---* | *---*---NONE) ;;
806 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
807 esac
808
809 test "$host_alias" != "$target_alias" &&
810   test "$program_prefix$program_suffix$program_transform_name" = \
811     NONENONEs,x,x, &&
812   program_prefix=${target_alias}-
813
814
815 # Find a good install program.  We prefer a C program (faster),
816 # so one script is as good as another.  But avoid the broken or
817 # incompatible versions:
818 # SysV /etc/install, /usr/sbin/install
819 # SunOS /usr/etc/install
820 # IRIX /sbin/install
821 # AIX /bin/install
822 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
823 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
824 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
825 # ./install, which can be erroneously created by make from ./install.sh.
826 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
827 echo "configure:828: checking for a BSD compatible install" >&5
828 if test -z "$INSTALL"; then
829 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
833   for ac_dir in $PATH; do
834     # Account for people who put trailing slashes in PATH elements.
835     case "$ac_dir/" in
836     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
837     *)
838       # OSF1 and SCO ODT 3.0 have their own names for install.
839       # Don't use installbsd from OSF since it installs stuff as root
840       # by default.
841       for ac_prog in ginstall scoinst install; do
842         if test -f $ac_dir/$ac_prog; then
843           if test $ac_prog = install &&
844             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
845             # AIX install.  It has an incompatible calling convention.
846             :
847           elif test $ac_prog = install &&
848             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
849             # program-specific install script used by HP pwplus--don't use.
850             :
851           else
852             ac_cv_path_install="$ac_dir/$ac_prog -c"
853             break 2
854           fi
855         fi
856       done
857       ;;
858     esac
859   done
860   IFS="$ac_save_IFS"
861
862 fi
863   if test "${ac_cv_path_install+set}" = set; then
864     INSTALL="$ac_cv_path_install"
865   else
866     # As a last resort, use the slow shell script.  We don't cache a
867     # path for INSTALL within a source directory, because that will
868     # break other packages using the cache if that directory is
869     # removed, or if the path is relative.
870     INSTALL="$ac_install_sh"
871   fi
872 fi
873 echo "$ac_t""$INSTALL" 1>&6
874
875 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
876 # It thinks the first close brace ends the variable substitution.
877 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
878
879 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
880
881 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
882
883 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
884 echo "configure:885: checking whether build environment is sane" >&5
885 # Just in case
886 sleep 1
887 echo timestamp > conftestfile
888 # Do `set' in a subshell so we don't clobber the current shell's
889 # arguments.  Must try -L first in case configure is actually a
890 # symlink; some systems play weird games with the mod time of symlinks
891 # (eg FreeBSD returns the mod time of the symlink's containing
892 # directory).
893 if (
894    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
895    if test "$*" = "X"; then
896       # -L didn't work.
897       set X `ls -t $srcdir/configure conftestfile`
898    fi
899    if test "$*" != "X $srcdir/configure conftestfile" \
900       && test "$*" != "X conftestfile $srcdir/configure"; then
901
902       # If neither matched, then we have a broken ls.  This can happen
903       # if, for instance, CONFIG_SHELL is bash and it inherits a
904       # broken ls alias from the environment.  This has actually
905       # happened.  Such a system could not be considered "sane".
906       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
907 alias in your environment" 1>&2; exit 1; }
908    fi
909
910    test "$2" = conftestfile
911    )
912 then
913    # Ok.
914    :
915 else
916    { echo "configure: error: newly created file is older than distributed files!
917 Check your system clock" 1>&2; exit 1; }
918 fi
919 rm -f conftest*
920 echo "$ac_t""yes" 1>&6
921 if test "$program_transform_name" = s,x,x,; then
922   program_transform_name=
923 else
924   # Double any \ or $.  echo might interpret backslashes.
925   cat <<\EOF_SED > conftestsed
926 s,\\,\\\\,g; s,\$,$$,g
927 EOF_SED
928   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
929   rm -f conftestsed
930 fi
931 test "$program_prefix" != NONE &&
932   program_transform_name="s,^,${program_prefix},;$program_transform_name"
933 # Use a double $ so make ignores it.
934 test "$program_suffix" != NONE &&
935   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
936
937 # sed with no file args requires a program.
938 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
939
940 for ac_prog in mawk gawk nawk awk
941 do
942 # Extract the first word of "$ac_prog", so it can be a program name with args.
943 set dummy $ac_prog; ac_word=$2
944 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
945 echo "configure:946: checking for $ac_word" >&5
946 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
947   echo $ac_n "(cached) $ac_c" 1>&6
948 else
949   if test -n "$AWK"; then
950   ac_cv_prog_AWK="$AWK" # Let the user override the test.
951 else
952   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
953   ac_dummy="$PATH"
954   for ac_dir in $ac_dummy; do
955     test -z "$ac_dir" && ac_dir=.
956     if test -f $ac_dir/$ac_word; then
957       ac_cv_prog_AWK="$ac_prog"
958       break
959     fi
960   done
961   IFS="$ac_save_ifs"
962 fi
963 fi
964 AWK="$ac_cv_prog_AWK"
965 if test -n "$AWK"; then
966   echo "$ac_t""$AWK" 1>&6
967 else
968   echo "$ac_t""no" 1>&6
969 fi
970
971 test -n "$AWK" && break
972 done
973
974 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
975 echo "configure:976: checking whether ${MAKE-make} sets \${MAKE}" >&5
976 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
977 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   cat > conftestmake <<\EOF
981 all:
982         @echo 'ac_maketemp="${MAKE}"'
983 EOF
984 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
985 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
986 if test -n "$ac_maketemp"; then
987   eval ac_cv_prog_make_${ac_make}_set=yes
988 else
989   eval ac_cv_prog_make_${ac_make}_set=no
990 fi
991 rm -f conftestmake
992 fi
993 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
994   echo "$ac_t""yes" 1>&6
995   SET_MAKE=
996 else
997   echo "$ac_t""no" 1>&6
998   SET_MAKE="MAKE=${MAKE-make}"
999 fi
1000
1001
1002
1003 PACKAGE=OpenLDAP
1004
1005 VERSION=$OL_VERSION
1006
1007 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1008   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1009 fi
1010
1011
1012
1013 missing_dir=`cd $ac_aux_dir && pwd`
1014 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1015 echo "configure:1016: checking for working aclocal" >&5
1016 # Run test in a subshell; some versions of sh will print an error if
1017 # an executable is not found, even if stderr is redirected.
1018 # Redirect stdin to placate older versions of autoconf.  Sigh.
1019 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1020    ACLOCAL=aclocal
1021    echo "$ac_t""found" 1>&6
1022 else
1023    ACLOCAL="$missing_dir/missing aclocal"
1024    echo "$ac_t""missing" 1>&6
1025 fi
1026
1027 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1028 echo "configure:1029: checking for working autoconf" >&5
1029 # Run test in a subshell; some versions of sh will print an error if
1030 # an executable is not found, even if stderr is redirected.
1031 # Redirect stdin to placate older versions of autoconf.  Sigh.
1032 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1033    AUTOCONF=autoconf
1034    echo "$ac_t""found" 1>&6
1035 else
1036    AUTOCONF="$missing_dir/missing autoconf"
1037    echo "$ac_t""missing" 1>&6
1038 fi
1039
1040 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1041 echo "configure:1042: checking for working automake" >&5
1042 # Run test in a subshell; some versions of sh will print an error if
1043 # an executable is not found, even if stderr is redirected.
1044 # Redirect stdin to placate older versions of autoconf.  Sigh.
1045 if (automake --version) < /dev/null > /dev/null 2>&1; then
1046    AUTOMAKE=automake
1047    echo "$ac_t""found" 1>&6
1048 else
1049    AUTOMAKE="$missing_dir/missing automake"
1050    echo "$ac_t""missing" 1>&6
1051 fi
1052
1053 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1054 echo "configure:1055: checking for working autoheader" >&5
1055 # Run test in a subshell; some versions of sh will print an error if
1056 # an executable is not found, even if stderr is redirected.
1057 # Redirect stdin to placate older versions of autoconf.  Sigh.
1058 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1059    AUTOHEADER=autoheader
1060    echo "$ac_t""found" 1>&6
1061 else
1062    AUTOHEADER="$missing_dir/missing autoheader"
1063    echo "$ac_t""missing" 1>&6
1064 fi
1065
1066 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1067 echo "configure:1068: checking for working makeinfo" >&5
1068 # Run test in a subshell; some versions of sh will print an error if
1069 # an executable is not found, even if stderr is redirected.
1070 # Redirect stdin to placate older versions of autoconf.  Sigh.
1071 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1072    MAKEINFO=makeinfo
1073    echo "$ac_t""found" 1>&6
1074 else
1075    MAKEINFO="$missing_dir/missing makeinfo"
1076    echo "$ac_t""missing" 1>&6
1077 fi
1078
1079 install_sh="$missing_dir/install-sh"
1080 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1081
1082 for ac_prog in gnutar gtar tar
1083 do
1084 # Extract the first word of "$ac_prog", so it can be a program name with args.
1085 set dummy $ac_prog; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   if test -n "$AMTAR"; then
1092   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1093 else
1094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1095   ac_dummy="$PATH"
1096   for ac_dir in $ac_dummy; do
1097     test -z "$ac_dir" && ac_dir=.
1098     if test -f $ac_dir/$ac_word; then
1099       ac_cv_prog_AMTAR="$ac_prog"
1100       break
1101     fi
1102   done
1103   IFS="$ac_save_ifs"
1104 fi
1105 fi
1106 AMTAR="$ac_cv_prog_AMTAR"
1107 if test -n "$AMTAR"; then
1108   echo "$ac_t""$AMTAR" 1>&6
1109 else
1110   echo "$ac_t""no" 1>&6
1111 fi
1112
1113 test -n "$AMTAR" && break
1114 done
1115
1116
1117 AMTARFLAGS=
1118 if test -n "$AMTAR"; then
1119   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1120         AMTARFLAGS=o
1121   fi
1122 fi
1123
1124
1125
1126 cat >> confdefs.h <<EOF
1127 #define OPENLDAP_PACKAGE "$PACKAGE"
1128 EOF
1129
1130 cat >> confdefs.h <<EOF
1131 #define OPENLDAP_VERSION "$VERSION"
1132 EOF
1133
1134
1135
1136
1137 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1138 echo "configure:1139: checking configure arguments" >&5
1139
1140
1141 top_builddir=`pwd`
1142
1143 ldap_subdir="/openldap"
1144
1145 # Check whether --with-subdir or --without-subdir was given.
1146 if test "${with_subdir+set}" = set; then
1147   withval="$with_subdir"
1148   case "$withval" in
1149         no) ldap_subdir=""
1150                 ;;
1151         yes)
1152                 ;;
1153         /*|\\*)
1154                 ldap_subdir="$withval"
1155                 ;;
1156         *)
1157                 ldap_subdir="/$withval"
1158                 ;;
1159 esac
1160
1161 fi
1162
1163
1164 # OpenLDAP --enable-debug
1165         # Check whether --enable-debug or --disable-debug was given.
1166 if test "${enable_debug+set}" = set; then
1167   enableval="$enable_debug"
1168   
1169         ol_arg=invalid
1170         for ol_val in auto yes no ; do
1171                 if test "$enableval" = "$ol_val" ; then
1172                         ol_arg="$ol_val"
1173                 fi
1174         done
1175         if test "$ol_arg" = "invalid" ; then
1176                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1177         fi
1178         ol_enable_debug="$ol_arg"
1179
1180 else
1181         ol_enable_debug="yes"
1182 fi
1183 # end --enable-debug
1184 # OpenLDAP --enable-syslog
1185         # Check whether --enable-syslog or --disable-syslog was given.
1186 if test "${enable_syslog+set}" = set; then
1187   enableval="$enable_syslog"
1188   
1189         ol_arg=invalid
1190         for ol_val in auto yes no ; do
1191                 if test "$enableval" = "$ol_val" ; then
1192                         ol_arg="$ol_val"
1193                 fi
1194         done
1195         if test "$ol_arg" = "invalid" ; then
1196                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1197         fi
1198         ol_enable_syslog="$ol_arg"
1199
1200 else
1201         ol_enable_syslog="auto"
1202 fi
1203 # end --enable-syslog
1204 # OpenLDAP --enable-proctitle
1205         # Check whether --enable-proctitle or --disable-proctitle was given.
1206 if test "${enable_proctitle+set}" = set; then
1207   enableval="$enable_proctitle"
1208   
1209         ol_arg=invalid
1210         for ol_val in auto yes no ; do
1211                 if test "$enableval" = "$ol_val" ; then
1212                         ol_arg="$ol_val"
1213                 fi
1214         done
1215         if test "$ol_arg" = "invalid" ; then
1216                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1217         fi
1218         ol_enable_proctitle="$ol_arg"
1219
1220 else
1221         ol_enable_proctitle="yes"
1222 fi
1223 # end --enable-proctitle
1224 # OpenLDAP --enable-cache
1225         # Check whether --enable-cache or --disable-cache was given.
1226 if test "${enable_cache+set}" = set; then
1227   enableval="$enable_cache"
1228   
1229         ol_arg=invalid
1230         for ol_val in auto yes no ; do
1231                 if test "$enableval" = "$ol_val" ; then
1232                         ol_arg="$ol_val"
1233                 fi
1234         done
1235         if test "$ol_arg" = "invalid" ; then
1236                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1237         fi
1238         ol_enable_cache="$ol_arg"
1239
1240 else
1241         ol_enable_cache="yes"
1242 fi
1243 # end --enable-cache
1244 # OpenLDAP --enable-dns
1245         # Check whether --enable-dns or --disable-dns was given.
1246 if test "${enable_dns+set}" = set; then
1247   enableval="$enable_dns"
1248   
1249         ol_arg=invalid
1250         for ol_val in auto yes no ; do
1251                 if test "$enableval" = "$ol_val" ; then
1252                         ol_arg="$ol_val"
1253                 fi
1254         done
1255         if test "$ol_arg" = "invalid" ; then
1256                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1257         fi
1258         ol_enable_dns="$ol_arg"
1259
1260 else
1261         ol_enable_dns="no"
1262 fi
1263 # end --enable-dns
1264 # OpenLDAP --enable-referrals
1265         # Check whether --enable-referrals or --disable-referrals was given.
1266 if test "${enable_referrals+set}" = set; then
1267   enableval="$enable_referrals"
1268   
1269         ol_arg=invalid
1270         for ol_val in auto yes no ; do
1271                 if test "$enableval" = "$ol_val" ; then
1272                         ol_arg="$ol_val"
1273                 fi
1274         done
1275         if test "$ol_arg" = "invalid" ; then
1276                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1277         fi
1278         ol_enable_referrals="$ol_arg"
1279
1280 else
1281         ol_enable_referrals="yes"
1282 fi
1283 # end --enable-referrals
1284 # OpenLDAP --enable-cldap
1285         # Check whether --enable-cldap or --disable-cldap was given.
1286 if test "${enable_cldap+set}" = set; then
1287   enableval="$enable_cldap"
1288   
1289         ol_arg=invalid
1290         for ol_val in auto yes no ; do
1291                 if test "$enableval" = "$ol_val" ; then
1292                         ol_arg="$ol_val"
1293                 fi
1294         done
1295         if test "$ol_arg" = "invalid" ; then
1296                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1297         fi
1298         ol_enable_cldap="$ol_arg"
1299
1300 else
1301         ol_enable_cldap="no"
1302 fi
1303 # end --enable-cldap
1304 # OpenLDAP --enable-x_compile
1305         # Check whether --enable-x_compile or --disable-x_compile was given.
1306 if test "${enable_x_compile+set}" = set; then
1307   enableval="$enable_x_compile"
1308   
1309         ol_arg=invalid
1310         for ol_val in yes no ; do
1311                 if test "$enableval" = "$ol_val" ; then
1312                         ol_arg="$ol_val"
1313                 fi
1314         done
1315         if test "$ol_arg" = "invalid" ; then
1316                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1317         fi
1318         ol_enable_x_compile="$ol_arg"
1319
1320 else
1321         ol_enable_x_compile="no"
1322 fi
1323 # end --enable-x_compile
1324
1325 # OpenLDAP --enable-dmalloc
1326         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1327 if test "${enable_dmalloc+set}" = set; then
1328   enableval="$enable_dmalloc"
1329   
1330         ol_arg=invalid
1331         for ol_val in auto yes no ; do
1332                 if test "$enableval" = "$ol_val" ; then
1333                         ol_arg="$ol_val"
1334                 fi
1335         done
1336         if test "$ol_arg" = "invalid" ; then
1337                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1338         fi
1339         ol_enable_dmalloc="$ol_arg"
1340
1341 else
1342         ol_enable_dmalloc="no"
1343 fi
1344 # end --enable-dmalloc
1345
1346 # OpenLDAP --with-cyrus_sasl
1347         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1348 if test "${with_cyrus_sasl+set}" = set; then
1349   withval="$with_cyrus_sasl"
1350   
1351         ol_arg=invalid
1352         for ol_val in auto yes no  ; do
1353                 if test "$withval" = "$ol_val" ; then
1354                         ol_arg="$ol_val"
1355                 fi
1356         done
1357         if test "$ol_arg" = "invalid" ; then
1358                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1359         fi
1360         ol_with_cyrus_sasl="$ol_arg"
1361
1362 else
1363         ol_with_cyrus_sasl="auto"
1364 fi
1365 # end --with-cyrus_sasl
1366
1367 # OpenLDAP --with-fetch
1368         # Check whether --with-fetch or --without-fetch was given.
1369 if test "${with_fetch+set}" = set; then
1370   withval="$with_fetch"
1371   
1372         ol_arg=invalid
1373         for ol_val in auto yes no  ; do
1374                 if test "$withval" = "$ol_val" ; then
1375                         ol_arg="$ol_val"
1376                 fi
1377         done
1378         if test "$ol_arg" = "invalid" ; then
1379                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1380         fi
1381         ol_with_fetch="$ol_arg"
1382
1383 else
1384         ol_with_fetch="auto"
1385 fi
1386 # end --with-fetch
1387
1388 # OpenLDAP --with-kerberos
1389         # Check whether --with-kerberos or --without-kerberos was given.
1390 if test "${with_kerberos+set}" = set; then
1391   withval="$with_kerberos"
1392   
1393         ol_arg=invalid
1394         for ol_val in auto k5 kth k4 afs yes no ; do
1395                 if test "$withval" = "$ol_val" ; then
1396                         ol_arg="$ol_val"
1397                 fi
1398         done
1399         if test "$ol_arg" = "invalid" ; then
1400                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1401         fi
1402         ol_with_kerberos="$ol_arg"
1403
1404 else
1405         ol_with_kerberos="auto"
1406 fi
1407 # end --with-kerberos
1408
1409 # OpenLDAP --with-readline
1410         # Check whether --with-readline or --without-readline was given.
1411 if test "${with_readline+set}" = set; then
1412   withval="$with_readline"
1413   
1414         ol_arg=invalid
1415         for ol_val in auto yes no  ; do
1416                 if test "$withval" = "$ol_val" ; then
1417                         ol_arg="$ol_val"
1418                 fi
1419         done
1420         if test "$ol_arg" = "invalid" ; then
1421                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1422         fi
1423         ol_with_readline="$ol_arg"
1424
1425 else
1426         ol_with_readline="auto"
1427 fi
1428 # end --with-readline
1429
1430 # OpenLDAP --with-threads
1431         # Check whether --with-threads or --without-threads was given.
1432 if test "${with_threads+set}" = set; then
1433   withval="$with_threads"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1437                 if test "$withval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1443         fi
1444         ol_with_threads="$ol_arg"
1445
1446 else
1447         ol_with_threads="auto"
1448 fi
1449 # end --with-threads
1450
1451 # OpenLDAP --with-tls
1452         # Check whether --with-tls or --without-tls was given.
1453 if test "${with_tls+set}" = set; then
1454   withval="$with_tls"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto ssleay openssl yes no  ; do
1458                 if test "$withval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1464         fi
1465         ol_with_tls="$ol_arg"
1466
1467 else
1468         ol_with_tls="auto"
1469 fi
1470 # end --with-tls
1471
1472 # OpenLDAP --with-yielding_select
1473         # Check whether --with-yielding_select or --without-yielding_select was given.
1474 if test "${with_yielding_select+set}" = set; then
1475   withval="$with_yielding_select"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no manual  ; do
1479                 if test "$withval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1485         fi
1486         ol_with_yielding_select="$ol_arg"
1487
1488 else
1489         ol_with_yielding_select="auto"
1490 fi
1491 # end --with-yielding_select
1492
1493
1494 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1495 if test "${with_xxldapdoptions+set}" = set; then
1496   withval="$with_xxldapdoptions"
1497   :
1498 fi
1499
1500 # OpenLDAP --enable-ldapd
1501         # Check whether --enable-ldapd or --disable-ldapd was given.
1502 if test "${enable_ldapd+set}" = set; then
1503   enableval="$enable_ldapd"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1513         fi
1514         ol_enable_ldapd="$ol_arg"
1515
1516 else
1517         ol_enable_ldapd="no"
1518 fi
1519 # end --enable-ldapd
1520
1521 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1522 if test "${with_xxslapdoptions+set}" = set; then
1523   withval="$with_xxslapdoptions"
1524   :
1525 fi
1526
1527 # OpenLDAP --enable-slapd
1528         # Check whether --enable-slapd or --disable-slapd was given.
1529 if test "${enable_slapd+set}" = set; then
1530   enableval="$enable_slapd"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1540         fi
1541         ol_enable_slapd="$ol_arg"
1542
1543 else
1544         ol_enable_slapd="yes"
1545 fi
1546 # end --enable-slapd
1547 # OpenLDAP --enable-cleartext
1548         # Check whether --enable-cleartext or --disable-cleartext was given.
1549 if test "${enable_cleartext+set}" = set; then
1550   enableval="$enable_cleartext"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1560         fi
1561         ol_enable_cleartext="$ol_arg"
1562
1563 else
1564         ol_enable_cleartext="yes"
1565 fi
1566 # end --enable-cleartext
1567 # OpenLDAP --enable-crypt
1568         # Check whether --enable-crypt or --disable-crypt was given.
1569 if test "${enable_crypt+set}" = set; then
1570   enableval="$enable_crypt"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1580         fi
1581         ol_enable_crypt="$ol_arg"
1582
1583 else
1584         ol_enable_crypt="auto"
1585 fi
1586 # end --enable-crypt
1587 # OpenLDAP --enable-modules
1588         # Check whether --enable-modules or --disable-modules was given.
1589 if test "${enable_modules+set}" = set; then
1590   enableval="$enable_modules"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1600         fi
1601         ol_enable_modules="$ol_arg"
1602
1603 else
1604         ol_enable_modules="no"
1605 fi
1606 # end --enable-modules
1607 # OpenLDAP --enable-multimaster
1608         # Check whether --enable-multimaster or --disable-multimaster was given.
1609 if test "${enable_multimaster+set}" = set; then
1610   enableval="$enable_multimaster"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1620         fi
1621         ol_enable_multimaster="$ol_arg"
1622
1623 else
1624         ol_enable_multimaster="no"
1625 fi
1626 # end --enable-multimaster
1627 # OpenLDAP --enable-phonetic
1628         # Check whether --enable-phonetic or --disable-phonetic was given.
1629 if test "${enable_phonetic+set}" = set; then
1630   enableval="$enable_phonetic"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1640         fi
1641         ol_enable_phonetic="$ol_arg"
1642
1643 else
1644         ol_enable_phonetic="no"
1645 fi
1646 # end --enable-phonetic
1647 # OpenLDAP --enable-quipu
1648         # Check whether --enable-quipu or --disable-quipu was given.
1649 if test "${enable_quipu+set}" = set; then
1650   enableval="$enable_quipu"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1660         fi
1661         ol_enable_quipu="$ol_arg"
1662
1663 else
1664         ol_enable_quipu="no"
1665 fi
1666 # end --enable-quipu
1667 # OpenLDAP --enable-rlookups
1668         # Check whether --enable-rlookups or --disable-rlookups was given.
1669 if test "${enable_rlookups+set}" = set; then
1670   enableval="$enable_rlookups"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1680         fi
1681         ol_enable_rlookups="$ol_arg"
1682
1683 else
1684         ol_enable_rlookups="auto"
1685 fi
1686 # end --enable-rlookups
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-discreteaci
1708         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1709 if test "${enable_discreteaci+set}" = set; then
1710   enableval="$enable_discreteaci"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1720         fi
1721         ol_enable_discreteaci="$ol_arg"
1722
1723 else
1724         ol_enable_discreteaci="no"
1725 fi
1726 # end --enable-discreteaci
1727 # OpenLDAP --enable-wrappers
1728         # Check whether --enable-wrappers or --disable-wrappers was given.
1729 if test "${enable_wrappers+set}" = set; then
1730   enableval="$enable_wrappers"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1740         fi
1741         ol_enable_wrappers="$ol_arg"
1742
1743 else
1744         ol_enable_wrappers="no"
1745 fi
1746 # end --enable-wrappers
1747 # OpenLDAP --enable-dynamic
1748         # Check whether --enable-dynamic or --disable-dynamic was given.
1749 if test "${enable_dynamic+set}" = set; then
1750   enableval="$enable_dynamic"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1760         fi
1761         ol_enable_dynamic="$ol_arg"
1762
1763 else
1764         ol_enable_dynamic="no"
1765 fi
1766 # end --enable-dynamic
1767
1768 # OpenLDAP --enable-bdb2
1769         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1770 if test "${enable_bdb2+set}" = set; then
1771   enableval="$enable_bdb2"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1781         fi
1782         ol_enable_bdb2="$ol_arg"
1783
1784 else
1785         ol_enable_bdb2="no"
1786 fi
1787 # end --enable-bdb2
1788 # OpenLDAP --with-bdb2_module
1789         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1790 if test "${with_bdb2_module+set}" = set; then
1791   withval="$with_bdb2_module"
1792   
1793         ol_arg=invalid
1794         for ol_val in static dynamic ; do
1795                 if test "$withval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1801         fi
1802         ol_with_bdb2_module="$ol_arg"
1803
1804 else
1805         ol_with_bdb2_module="static"
1806 fi
1807 # end --with-bdb2_module
1808
1809 # OpenLDAP --enable-ldap
1810         # Check whether --enable-ldap or --disable-ldap was given.
1811 if test "${enable_ldap+set}" = set; then
1812   enableval="$enable_ldap"
1813   
1814         ol_arg=invalid
1815         for ol_val in auto yes no ; do
1816                 if test "$enableval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1822         fi
1823         ol_enable_ldap="$ol_arg"
1824
1825 else
1826         ol_enable_ldap="no"
1827 fi
1828 # end --enable-ldap
1829 # OpenLDAP --with-ldap_module
1830         # Check whether --with-ldap_module or --without-ldap_module was given.
1831 if test "${with_ldap_module+set}" = set; then
1832   withval="$with_ldap_module"
1833   
1834         ol_arg=invalid
1835         for ol_val in static dynamic ; do
1836                 if test "$withval" = "$ol_val" ; then
1837                         ol_arg="$ol_val"
1838                 fi
1839         done
1840         if test "$ol_arg" = "invalid" ; then
1841                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1842         fi
1843         ol_with_ldap_module="$ol_arg"
1844
1845 else
1846         ol_with_ldap_module="static"
1847 fi
1848 # end --with-ldap_module
1849
1850 # OpenLDAP --enable-ldbm
1851         # Check whether --enable-ldbm or --disable-ldbm was given.
1852 if test "${enable_ldbm+set}" = set; then
1853   enableval="$enable_ldbm"
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-ldbm" 1>&2; exit 1; }
1863         fi
1864         ol_enable_ldbm="$ol_arg"
1865
1866 else
1867         ol_enable_ldbm="yes"
1868 fi
1869 # end --enable-ldbm
1870 # OpenLDAP --with-ldbm_api
1871         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1872 if test "${with_ldbm_api+set}" = set; then
1873   withval="$with_ldbm_api"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto db2 db mdbm gdbm ndbm manual ; 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-ldbm_api" 1>&2; exit 1; }
1883         fi
1884         ol_with_ldbm_api="$ol_arg"
1885
1886 else
1887         ol_with_ldbm_api="auto"
1888 fi
1889 # end --with-ldbm_api
1890
1891 # OpenLDAP --with-ldbm_module
1892         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1893 if test "${with_ldbm_module+set}" = set; then
1894   withval="$with_ldbm_module"
1895   
1896         ol_arg=invalid
1897         for ol_val in static dynamic ; do
1898                 if test "$withval" = "$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 $withval for --with-ldbm_module" 1>&2; exit 1; }
1904         fi
1905         ol_with_ldbm_module="$ol_arg"
1906
1907 else
1908         ol_with_ldbm_module="static"
1909 fi
1910 # end --with-ldbm_module
1911
1912 # OpenLDAP --with-ldbm_type
1913         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1914 if test "${with_ldbm_type+set}" = set; then
1915   withval="$with_ldbm_type"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto btree hash ; do
1919                 if test "$withval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1925         fi
1926         ol_with_ldbm_type="$ol_arg"
1927
1928 else
1929         ol_with_ldbm_type="auto"
1930 fi
1931 # end --with-ldbm_type
1932
1933
1934 # OpenLDAP --enable-passwd
1935         # Check whether --enable-passwd or --disable-passwd was given.
1936 if test "${enable_passwd+set}" = set; then
1937   enableval="$enable_passwd"
1938   
1939         ol_arg=invalid
1940         for ol_val in auto yes no ; do
1941                 if test "$enableval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1947         fi
1948         ol_enable_passwd="$ol_arg"
1949
1950 else
1951         ol_enable_passwd="no"
1952 fi
1953 # end --enable-passwd
1954 # OpenLDAP --with-passwd_module
1955         # Check whether --with-passwd_module or --without-passwd_module was given.
1956 if test "${with_passwd_module+set}" = set; then
1957   withval="$with_passwd_module"
1958   
1959         ol_arg=invalid
1960         for ol_val in static dynamic ; do
1961                 if test "$withval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1967         fi
1968         ol_with_passwd_module="$ol_arg"
1969
1970 else
1971         ol_with_passwd_module="static"
1972 fi
1973 # end --with-passwd_module
1974
1975 # OpenLDAP --enable-perl
1976         # Check whether --enable-perl or --disable-perl was given.
1977 if test "${enable_perl+set}" = set; then
1978   enableval="$enable_perl"
1979   
1980         ol_arg=invalid
1981         for ol_val in auto yes no ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1988         fi
1989         ol_enable_perl="$ol_arg"
1990
1991 else
1992         ol_enable_perl="no"
1993 fi
1994 # end --enable-perl
1995 # OpenLDAP --with-perl_module
1996         # Check whether --with-perl_module or --without-perl_module was given.
1997 if test "${with_perl_module+set}" = set; then
1998   withval="$with_perl_module"
1999   
2000         ol_arg=invalid
2001         for ol_val in static dynamic ; do
2002                 if test "$withval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2008         fi
2009         ol_with_perl_module="$ol_arg"
2010
2011 else
2012         ol_with_perl_module="static"
2013 fi
2014 # end --with-perl_module
2015
2016 # OpenLDAP --enable-shell
2017         # Check whether --enable-shell or --disable-shell was given.
2018 if test "${enable_shell+set}" = set; then
2019   enableval="$enable_shell"
2020   
2021         ol_arg=invalid
2022         for ol_val in auto yes no ; do
2023                 if test "$enableval" = "$ol_val" ; then
2024                         ol_arg="$ol_val"
2025                 fi
2026         done
2027         if test "$ol_arg" = "invalid" ; then
2028                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2029         fi
2030         ol_enable_shell="$ol_arg"
2031
2032 else
2033         ol_enable_shell="no"
2034 fi
2035 # end --enable-shell
2036 # OpenLDAP --with-shell_module
2037         # Check whether --with-shell_module or --without-shell_module was given.
2038 if test "${with_shell_module+set}" = set; then
2039   withval="$with_shell_module"
2040   
2041         ol_arg=invalid
2042         for ol_val in static dynamic ; do
2043                 if test "$withval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2049         fi
2050         ol_with_shell_module="$ol_arg"
2051
2052 else
2053         ol_with_shell_module="static"
2054 fi
2055 # end --with-shell_module
2056
2057 # OpenLDAP --enable-tcl
2058         # Check whether --enable-tcl or --disable-tcl was given.
2059 if test "${enable_tcl+set}" = set; then
2060   enableval="$enable_tcl"
2061   
2062         ol_arg=invalid
2063         for ol_val in auto yes no ; do
2064                 if test "$enableval" = "$ol_val" ; then
2065                         ol_arg="$ol_val"
2066                 fi
2067         done
2068         if test "$ol_arg" = "invalid" ; then
2069                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2070         fi
2071         ol_enable_tcl="$ol_arg"
2072
2073 else
2074         ol_enable_tcl="no"
2075 fi
2076 # end --enable-tcl
2077 # OpenLDAP --with-tcl_module
2078         # Check whether --with-tcl_module or --without-tcl_module was given.
2079 if test "${with_tcl_module+set}" = set; then
2080   withval="$with_tcl_module"
2081   
2082         ol_arg=invalid
2083         for ol_val in static dynamic ; do
2084                 if test "$withval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2090         fi
2091         ol_with_tcl_module="$ol_arg"
2092
2093 else
2094         ol_with_tcl_module="static"
2095 fi
2096 # end --with-tcl_module
2097
2098
2099 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2100 if test "${with_xxslurpdoptions+set}" = set; then
2101   withval="$with_xxslurpdoptions"
2102   :
2103 fi
2104
2105 # OpenLDAP --enable-slurpd
2106         # Check whether --enable-slurpd or --disable-slurpd was given.
2107 if test "${enable_slurpd+set}" = set; then
2108   enableval="$enable_slurpd"
2109   
2110         ol_arg=invalid
2111         for ol_val in auto yes no ; do
2112                 if test "$enableval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2118         fi
2119         ol_enable_slurpd="$ol_arg"
2120
2121 else
2122         ol_enable_slurpd="auto"
2123 fi
2124 # end --enable-slurpd
2125
2126 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2127 if test "${with_xxliboptions+set}" = set; then
2128   withval="$with_xxliboptions"
2129   :
2130 fi
2131
2132 # Check whether --enable-static or --disable-static was given.
2133 if test "${enable_static+set}" = set; then
2134   enableval="$enable_static"
2135   p=${PACKAGE-default}
2136 case "$enableval" in
2137 yes) enable_static=yes ;;
2138 no) enable_static=no ;;
2139 *)
2140   enable_static=no
2141   # Look at the argument we got.  We use all the common list separators.
2142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2143   for pkg in $enableval; do
2144     if test "X$pkg" = "X$p"; then
2145       enable_static=yes
2146     fi
2147   done
2148   IFS="$ac_save_ifs"
2149   ;;
2150 esac
2151 else
2152   enable_static=yes
2153 fi
2154
2155 # Check whether --enable-shared or --disable-shared was given.
2156 if test "${enable_shared+set}" = set; then
2157   enableval="$enable_shared"
2158   p=${PACKAGE-default}
2159 case "$enableval" in
2160 yes) enable_shared=yes ;;
2161 no) enable_shared=no ;;
2162 *)
2163   enable_shared=no
2164   # Look at the argument we got.  We use all the common list separators.
2165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2166   for pkg in $enableval; do
2167     if test "X$pkg" = "X$p"; then
2168       enable_shared=yes
2169     fi
2170   done
2171   IFS="$ac_save_ifs"
2172   ;;
2173 esac
2174 else
2175   enable_shared=yes
2176 fi
2177
2178
2179
2180 # validate options
2181 if test $ol_enable_dns = yes ; then
2182         if test $ol_enable_referrals = no ; then
2183                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2184         fi
2185         if test $ol_enable_referrals = auto ; then
2186                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2187                 ol_enable_referrals=yes
2188         fi
2189 fi
2190
2191 if test $ol_enable_slapd = no ; then
2192                 if test $ol_enable_bdb2 = yes ; then
2193                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2194         fi
2195         if test $ol_enable_ldap = yes ; then
2196                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2197         fi
2198         if test $ol_enable_ldbm = yes ; then
2199                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2200         fi
2201         if test $ol_enable_passwd = yes ; then
2202                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2203         fi
2204         if test $ol_enable_perl = yes ; then
2205                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2206         fi
2207         if test $ol_enable_shell = yes ; then
2208                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2209         fi
2210         if test $ol_enable_tcl = yes ; then
2211                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2212         fi
2213         if test $ol_enable_modules = yes ; then
2214                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2215         fi
2216         if test $ol_enable_multimaster = yes ; then
2217                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2218         fi
2219         if test $ol_enable_wrappers = yes ; then
2220                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2221         fi
2222         if test $ol_enable_phonetic = yes ; then
2223                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2224         fi
2225         if test $ol_enable_quipu = yes ; then
2226                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2227         fi
2228         if test $ol_enable_rlookups = yes ; then
2229                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2230         fi
2231         if test $ol_enable_aci = yes ; then
2232                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2233         fi
2234         if test $ol_enable_discreteaci = yes ; then
2235                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2236         fi
2237         if test $ol_with_ldbm_api != auto ; then
2238                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2239         fi
2240         if test $ol_with_ldbm_type != auto ; then
2241                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2242         fi
2243         if test $ol_with_bdb2_module != static ; then
2244                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2245         fi
2246         if test $ol_with_ldap_module != static ; then
2247                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2248         fi
2249         if test $ol_with_ldbm_module != static ; then
2250                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2251         fi
2252         if test $ol_with_passwd_module != static ; then
2253                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2254         fi
2255         if test $ol_with_perl_module != static ; then
2256                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2257         fi
2258         if test $ol_with_shell_module != static ; then
2259                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2260         fi
2261         if test $ol_with_tcl_module != static ; then
2262                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2263         fi
2264         if test $ol_enable_slurpd = yes ; then
2265                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2266         fi
2267
2268         # force settings to no
2269         ol_enable_bdb2=no
2270         ol_enable_ldap=no
2271         ol_enable_ldbm=no
2272         ol_enable_passwd=no
2273         ol_enable_perl=no
2274         ol_enable_shell=no
2275         ol_enable_tcl=no
2276
2277         ol_enable_modules=no
2278         ol_enable_multimaster=no
2279         ol_enable_phonetic=no
2280         ol_enable_quipu=no
2281         ol_enable_rlookups=no
2282         ol_enable_aci=no
2283         ol_enable_discreteaci=no
2284         ol_enable_wrappers=no
2285         ol_enable_dynamic=no
2286
2287         ol_with_ldbm_api=no
2288         ol_with_ldbm_type=no
2289
2290         ol_with_bdb2_module=static
2291         ol_with_ldap_module=static
2292         ol_with_ldbm_module=static
2293         ol_with_passwd_module=static
2294         ol_with_perl_module=static
2295         ol_with_shell_module=static
2296         ol_with_tcl_module=static
2297
2298         ol_enable_slurpd=no
2299
2300 elif test $ol_enable_ldbm = no ; then
2301         
2302         if test $ol_with_ldbm_api != auto ; then
2303                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2304         fi
2305
2306         if test $ol_with_ldbm_type != auto ; then
2307                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2308         fi
2309
2310         if test $ol_with_ldbm_module != static ; then
2311                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2312         fi
2313
2314         if test $ol_enable_bdb2 = yes ; then
2315                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2316         fi
2317
2318         if test $ol_enable_modules != yes -a \
2319                 $ol_enable_ldap = no -a \
2320                 $ol_enable_passwd = no -a \
2321                 $ol_enable_perl = no -a \
2322                 $ol_enable_shell = no -a \
2323                 $ol_enable_tcl = no ; then
2324                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2325         fi
2326
2327         ol_with_ldbm_api=no
2328         ol_with_ldbm_type=no
2329         ol_with_ldbm_module=static
2330
2331 elif test $ol_enable_bdb2 = yes ; then
2332         
2333         if test $ol_with_ldbm_api != auto -a \
2334                 $ol_with_ldbm_api != db2 ; then
2335                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2336         fi
2337
2338         ol_with_ldbm_api=db2
2339
2340 else
2341         
2342         if test $ol_enable_bdb2 != no ; then
2343                 if test $ol_with_ldbm_api != auto -a \
2344                         $ol_with_ldbm_api != db2 ; then
2345                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2346                         ol_enable_bdb2=no
2347                 fi
2348         fi
2349
2350         if test $ol_with_ldbm_api = gdbm -a \
2351                 $ol_with_ldbm_type = btree ; then
2352                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2353         fi
2354         if test $ol_with_ldbm_api = mdbm -a \
2355                 $ol_with_ldbm_type = btree ; then
2356                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2357         fi
2358         if test $ol_with_ldbm_api = ndbm -a \
2359                 $ol_with_ldbm_type = btree ; then
2360                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2361         fi
2362 fi
2363
2364 if test $ol_enable_slurpd = yes ; then
2365                 if test $ol_with_threads = no ; then
2366                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2367         fi
2368 fi
2369
2370 echo "$ac_t""done" 1>&6
2371
2372 LDAP_LIBS=
2373 LDIF_LIBS=
2374 LDBM_LIBS=
2375 LTHREAD_LIBS=
2376 LUTIL_LIBS=
2377
2378 LDAPD_LIBS=
2379 SLAPD_LIBS=
2380 SLURPD_LIBS=
2381
2382 BUILD_LDAPD=no
2383 BUILD_SLAPD=no
2384 BUILD_SLURPD=no
2385
2386 BUILD_BDB2=no
2387 BUILD_LDAP=no
2388 BUILD_LDBM=no
2389 BUILD_PASSWD=no
2390 BUILD_PERL=no
2391 BUILD_QUIPU=no
2392 BUILD_SHELL=no
2393 BUILD_TCL=no
2394 BUILD_THREAD=no
2395
2396 BUILD_BDB2_DYNAMIC=static
2397 BUILD_LDAP_DYNAMIC=static
2398 BUILD_LDBM_DYNAMIC=static
2399 BUILD_PASSWD_DYNAMIC=static
2400 BUILD_PERL_DYNAMIC=static
2401 BUILD_SHELL_DYNAMIC=static
2402 BUILD_TCL_DYNAMIC=static
2403
2404 SLAPD_MODULES_LDFLAGS=
2405 SLAPD_MODULES_CPPFLAGS=
2406 SLAPD_MODULES_LIST=
2407
2408 SLAPD_PERL_LDFLAGS=
2409 MOD_PERL_LDFLAGS=
2410 PERL_CPPFLAGS=
2411
2412 MOD_TCL_LIB=
2413 KRB_LIBS=
2414 READLINE_LIBS=
2415 SASL_LIBS=
2416 TERMCAP_LIBS=
2417 TLS_LIBS=
2418 MODULES_LIBS=
2419
2420
2421
2422 cat >> confdefs.h <<\EOF
2423 #define HAVE_MKVERSION 1
2424 EOF
2425
2426
2427
2428
2429 ol_aix_threads=no
2430 case "$target" in
2431 *-*-aix*)       if test -z "$CC" ; then
2432                 case "$ol_with_threads" in
2433                 auto | yes |  posix) ol_aix_threads=yes ;;
2434                 esac
2435         fi
2436 ;;
2437 esac
2438
2439 if test $ol_aix_threads = yes ; then
2440         if test -z "${CC}" ; then
2441                 for ac_prog in cc_r xlc_r cc
2442 do
2443 # Extract the first word of "$ac_prog", so it can be a program name with args.
2444 set dummy $ac_prog; ac_word=$2
2445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2446 echo "configure:2447: checking for $ac_word" >&5
2447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2448   echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450   if test -n "$CC"; then
2451   ac_cv_prog_CC="$CC" # Let the user override the test.
2452 else
2453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2454   ac_dummy="$PATH"
2455   for ac_dir in $ac_dummy; do
2456     test -z "$ac_dir" && ac_dir=.
2457     if test -f $ac_dir/$ac_word; then
2458       ac_cv_prog_CC="$ac_prog"
2459       break
2460     fi
2461   done
2462   IFS="$ac_save_ifs"
2463 fi
2464 fi
2465 CC="$ac_cv_prog_CC"
2466 if test -n "$CC"; then
2467   echo "$ac_t""$CC" 1>&6
2468 else
2469   echo "$ac_t""no" 1>&6
2470 fi
2471
2472 test -n "$CC" && break
2473 done
2474
2475
2476                 if test "$CC" = cc ; then
2477                                                 if test $ol_with_threads != auto ; then
2478                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2479                         else
2480                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2481                         fi
2482                         ol_with_threads=no
2483                 fi
2484         fi
2485
2486         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2487                 ol_with_threads=posix
2488                 ol_cv_pthread_create=yes
2489         fi
2490 fi
2491
2492 if test -z "${CC}"; then
2493         for ac_prog in cc
2494 do
2495 # Extract the first word of "$ac_prog", so it can be a program name with args.
2496 set dummy $ac_prog; ac_word=$2
2497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_word" >&5
2499 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   if test -n "$CC"; then
2503   ac_cv_prog_CC="$CC" # Let the user override the test.
2504 else
2505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       ac_cv_prog_CC="$ac_prog"
2511       break
2512     fi
2513   done
2514   IFS="$ac_save_ifs"
2515 fi
2516 fi
2517 CC="$ac_cv_prog_CC"
2518 if test -n "$CC"; then
2519   echo "$ac_t""$CC" 1>&6
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523
2524 test -n "$CC" && break
2525 done
2526
2527 fi
2528
2529
2530
2531
2532 # Check whether --enable-fast-install or --disable-fast-install was given.
2533 if test "${enable_fast_install+set}" = set; then
2534   enableval="$enable_fast_install"
2535   p=${PACKAGE-default}
2536 case "$enableval" in
2537 yes) enable_fast_install=yes ;;
2538 no) enable_fast_install=no ;;
2539 *)
2540   enable_fast_install=no
2541   # Look at the argument we got.  We use all the common list separators.
2542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2543   for pkg in $enableval; do
2544     if test "X$pkg" = "X$p"; then
2545       enable_fast_install=yes
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   ;;
2550 esac
2551 else
2552   enable_fast_install=yes
2553 fi
2554
2555 # Extract the first word of "ranlib", so it can be a program name with args.
2556 set dummy ranlib; ac_word=$2
2557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2558 echo "configure:2559: checking for $ac_word" >&5
2559 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2560   echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562   if test -n "$RANLIB"; then
2563   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2564 else
2565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2566   ac_dummy="$PATH"
2567   for ac_dir in $ac_dummy; do
2568     test -z "$ac_dir" && ac_dir=.
2569     if test -f $ac_dir/$ac_word; then
2570       ac_cv_prog_RANLIB="ranlib"
2571       break
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2576 fi
2577 fi
2578 RANLIB="$ac_cv_prog_RANLIB"
2579 if test -n "$RANLIB"; then
2580   echo "$ac_t""$RANLIB" 1>&6
2581 else
2582   echo "$ac_t""no" 1>&6
2583 fi
2584
2585 # Extract the first word of "gcc", so it can be a program name with args.
2586 set dummy gcc; ac_word=$2
2587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2588 echo "configure:2589: checking for $ac_word" >&5
2589 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   if test -n "$CC"; then
2593   ac_cv_prog_CC="$CC" # Let the user override the test.
2594 else
2595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2596   ac_dummy="$PATH"
2597   for ac_dir in $ac_dummy; do
2598     test -z "$ac_dir" && ac_dir=.
2599     if test -f $ac_dir/$ac_word; then
2600       ac_cv_prog_CC="gcc"
2601       break
2602     fi
2603   done
2604   IFS="$ac_save_ifs"
2605 fi
2606 fi
2607 CC="$ac_cv_prog_CC"
2608 if test -n "$CC"; then
2609   echo "$ac_t""$CC" 1>&6
2610 else
2611   echo "$ac_t""no" 1>&6
2612 fi
2613
2614 if test -z "$CC"; then
2615   # Extract the first word of "cc", so it can be a program name with args.
2616 set dummy cc; ac_word=$2
2617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2618 echo "configure:2619: checking for $ac_word" >&5
2619 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2620   echo $ac_n "(cached) $ac_c" 1>&6
2621 else
2622   if test -n "$CC"; then
2623   ac_cv_prog_CC="$CC" # Let the user override the test.
2624 else
2625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2626   ac_prog_rejected=no
2627   ac_dummy="$PATH"
2628   for ac_dir in $ac_dummy; do
2629     test -z "$ac_dir" && ac_dir=.
2630     if test -f $ac_dir/$ac_word; then
2631       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2632         ac_prog_rejected=yes
2633         continue
2634       fi
2635       ac_cv_prog_CC="cc"
2636       break
2637     fi
2638   done
2639   IFS="$ac_save_ifs"
2640 if test $ac_prog_rejected = yes; then
2641   # We found a bogon in the path, so make sure we never use it.
2642   set dummy $ac_cv_prog_CC
2643   shift
2644   if test $# -gt 0; then
2645     # We chose a different compiler from the bogus one.
2646     # However, it has the same basename, so the bogon will be chosen
2647     # first if we set CC to just the basename; use the full file name.
2648     shift
2649     set dummy "$ac_dir/$ac_word" "$@"
2650     shift
2651     ac_cv_prog_CC="$@"
2652   fi
2653 fi
2654 fi
2655 fi
2656 CC="$ac_cv_prog_CC"
2657 if test -n "$CC"; then
2658   echo "$ac_t""$CC" 1>&6
2659 else
2660   echo "$ac_t""no" 1>&6
2661 fi
2662
2663   if test -z "$CC"; then
2664     case "`uname -s`" in
2665     *win32* | *WIN32* | *CYGWIN*)
2666       # Extract the first word of "cl", so it can be a program name with args.
2667 set dummy cl; ac_word=$2
2668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_word" >&5
2670 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   if test -n "$CC"; then
2674   ac_cv_prog_CC="$CC" # Let the user override the test.
2675 else
2676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2677   ac_dummy="$PATH"
2678   for ac_dir in $ac_dummy; do
2679     test -z "$ac_dir" && ac_dir=.
2680     if test -f $ac_dir/$ac_word; then
2681       ac_cv_prog_CC="cl"
2682       break
2683     fi
2684   done
2685   IFS="$ac_save_ifs"
2686 fi
2687 fi
2688 CC="$ac_cv_prog_CC"
2689 if test -n "$CC"; then
2690   echo "$ac_t""$CC" 1>&6
2691 else
2692   echo "$ac_t""no" 1>&6
2693 fi
2694  ;;
2695     esac
2696   fi
2697   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2698 fi
2699
2700 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2701 echo "configure:2702: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2702
2703 ac_ext=c
2704 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2705 ac_cpp='$CPP $CPPFLAGS'
2706 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2707 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2708 cross_compiling=$ac_cv_prog_cc_cross
2709
2710 cat > conftest.$ac_ext << EOF
2711
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714
2715 main(){return(0);}
2716 EOF
2717 if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2718   ac_cv_prog_cc_works=yes
2719   # If we can't run a trivial program, we are probably using a cross compiler.
2720   if (./conftest; exit) 2>/dev/null; then
2721     ac_cv_prog_cc_cross=no
2722   else
2723     ac_cv_prog_cc_cross=yes
2724   fi
2725 else
2726   echo "configure: failed program was:" >&5
2727   cat conftest.$ac_ext >&5
2728   ac_cv_prog_cc_works=no
2729 fi
2730 rm -fr conftest*
2731 ac_ext=c
2732 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2733 ac_cpp='$CPP $CPPFLAGS'
2734 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2735 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2736 cross_compiling=$ac_cv_prog_cc_cross
2737
2738 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2739 if test $ac_cv_prog_cc_works = no; then
2740   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2741 fi
2742 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2743 echo "configure:2744: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2744 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2745 cross_compiling=$ac_cv_prog_cc_cross
2746
2747 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2748 echo "configure:2749: checking whether we are using GNU C" >&5
2749 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   cat > conftest.c <<EOF
2753 #ifdef __GNUC__
2754   yes;
2755 #endif
2756 EOF
2757 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2758   ac_cv_prog_gcc=yes
2759 else
2760   ac_cv_prog_gcc=no
2761 fi
2762 fi
2763
2764 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2765
2766 if test $ac_cv_prog_gcc = yes; then
2767   GCC=yes
2768 else
2769   GCC=
2770 fi
2771
2772 ac_test_CFLAGS="${CFLAGS+set}"
2773 ac_save_CFLAGS="$CFLAGS"
2774 CFLAGS=
2775 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2776 echo "configure:2777: checking whether ${CC-cc} accepts -g" >&5
2777 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2778   echo $ac_n "(cached) $ac_c" 1>&6
2779 else
2780   echo 'void f(){}' > conftest.c
2781 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2782   ac_cv_prog_cc_g=yes
2783 else
2784   ac_cv_prog_cc_g=no
2785 fi
2786 rm -f conftest*
2787
2788 fi
2789
2790 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2791 if test "$ac_test_CFLAGS" = set; then
2792   CFLAGS="$ac_save_CFLAGS"
2793 elif test $ac_cv_prog_cc_g = yes; then
2794   if test "$GCC" = yes; then
2795     CFLAGS="-g -O2"
2796   else
2797     CFLAGS="-g"
2798   fi
2799 else
2800   if test "$GCC" = yes; then
2801     CFLAGS="-O2"
2802   else
2803     CFLAGS=
2804   fi
2805 fi
2806
2807 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2808 if test "${with_gnu_ld+set}" = set; then
2809   withval="$with_gnu_ld"
2810   test "$withval" = no || with_gnu_ld=yes
2811 else
2812   with_gnu_ld=no
2813 fi
2814
2815 ac_prog=ld
2816 if test "$ac_cv_prog_gcc" = yes; then
2817   # Check if gcc -print-prog-name=ld gives a path.
2818   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2819 echo "configure:2820: checking for ld used by GCC" >&5
2820   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2821   case "$ac_prog" in
2822     # Accept absolute paths.
2823     [\\/]* | [A-Za-z]:[\\/]*)
2824       re_direlt='/[^/][^/]*/\.\./'
2825       # Canonicalize the path of ld
2826       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2827       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2828         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2829       done
2830       test -z "$LD" && LD="$ac_prog"
2831       ;;
2832   "")
2833     # If it fails, then pretend we aren't using GCC.
2834     ac_prog=ld
2835     ;;
2836   *)
2837     # If it is relative, then search for the first ld in PATH.
2838     with_gnu_ld=unknown
2839     ;;
2840   esac
2841 elif test "$with_gnu_ld" = yes; then
2842   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2843 echo "configure:2844: checking for GNU ld" >&5
2844 else
2845   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2846 echo "configure:2847: checking for non-GNU ld" >&5
2847 fi
2848 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2849   echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851   if test -z "$LD"; then
2852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2853   for ac_dir in $PATH; do
2854     test -z "$ac_dir" && ac_dir=.
2855     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2856       ac_cv_path_LD="$ac_dir/$ac_prog"
2857       # Check to see if the program is GNU ld.  I'd rather use --version,
2858       # but apparently some GNU ld's only accept -v.
2859       # Break only if it was the GNU/non-GNU ld that we prefer.
2860       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2861         test "$with_gnu_ld" != no && break
2862       else
2863         test "$with_gnu_ld" != yes && break
2864       fi
2865     fi
2866   done
2867   IFS="$ac_save_ifs"
2868 else
2869   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2870 fi
2871 fi
2872
2873 LD="$ac_cv_path_LD"
2874 if test -n "$LD"; then
2875   echo "$ac_t""$LD" 1>&6
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2880
2881 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2882 echo "configure:2883: checking if the linker ($LD) is GNU ld" >&5
2883 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2887 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2888   ac_cv_prog_gnu_ld=yes
2889 else
2890   ac_cv_prog_gnu_ld=no
2891 fi
2892 fi
2893
2894 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2895
2896
2897 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2898 echo "configure:2899: checking for BSD-compatible nm" >&5
2899 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   if test -n "$NM"; then
2903   # Let the user override the test.
2904   ac_cv_path_NM="$NM"
2905 else
2906   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2907   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2908     test -z "$ac_dir" && ac_dir=.
2909     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2910       # Check to see if the nm accepts a BSD-compat flag.
2911       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2912       #   nm: unknown option "B" ignored
2913       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2914         ac_cv_path_NM="$ac_dir/nm -B"
2915         break
2916       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2917         ac_cv_path_NM="$ac_dir/nm -p"
2918         break
2919       else
2920         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2921         continue # so that we can try to find one that supports BSD flags
2922       fi
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2927 fi
2928 fi
2929
2930 NM="$ac_cv_path_NM"
2931 echo "$ac_t""$NM" 1>&6
2932
2933
2934 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2935 echo "configure:2936: checking whether ln -s works" >&5
2936 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   rm -f conftestdata
2940 if ln -s X conftestdata 2>/dev/null
2941 then
2942   rm -f conftestdata
2943   ac_cv_prog_LN_S="ln -s"
2944 else
2945   ac_cv_prog_LN_S=ln
2946 fi
2947 fi
2948 LN_S="$ac_cv_prog_LN_S"
2949 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2950   echo "$ac_t""yes" 1>&6
2951 else
2952   echo "$ac_t""no" 1>&6
2953 fi
2954
2955 if test $host != $build; then
2956   ac_tool_prefix=${host_alias}-
2957 else
2958   ac_tool_prefix=
2959 fi
2960
2961
2962 # Check for any special flags to pass to ltconfig.
2963 libtool_flags="--cache-file=$cache_file"
2964 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2965 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2966 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2967 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2968 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2969 libtool_flags="$libtool_flags --enable-dlopen"
2970 libtool_flags="$libtool_flags --enable-win32-dll"
2971 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2972 if test "${enable_libtool_lock+set}" = set; then
2973   enableval="$enable_libtool_lock"
2974   :
2975 fi
2976
2977 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2978 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2979
2980 # Some flags need to be propagated to the compiler or linker for good
2981 # libtool support.
2982 case "$host" in
2983 *-*-irix6*)
2984   # Find out which ABI we are using.
2985   echo '#line 2986 "configure"' > conftest.$ac_ext
2986   if { (eval echo configure:2987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2987     case "`/usr/bin/file conftest.o`" in
2988     *32-bit*)
2989       LD="${LD-ld} -32"
2990       ;;
2991     *N32*)
2992       LD="${LD-ld} -n32"
2993       ;;
2994     *64-bit*)
2995       LD="${LD-ld} -64"
2996       ;;
2997     esac
2998   fi
2999   rm -rf conftest*
3000   ;;
3001
3002 *-*-sco3.2v5*)
3003   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3004   SAVE_CFLAGS="$CFLAGS"
3005   CFLAGS="$CFLAGS -belf"
3006   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3007 echo "configure:3008: checking whether the C compiler needs -belf" >&5
3008 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3009   echo $ac_n "(cached) $ac_c" 1>&6
3010 else
3011   cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014
3015 int main() {
3016
3017 ; return 0; }
3018 EOF
3019 if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3020   rm -rf conftest*
3021   lt_cv_cc_needs_belf=yes
3022 else
3023   echo "configure: failed program was:" >&5
3024   cat conftest.$ac_ext >&5
3025   rm -rf conftest*
3026   lt_cv_cc_needs_belf=no
3027 fi
3028 rm -f conftest*
3029 fi
3030
3031 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3032   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3033     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3034     CFLAGS="$SAVE_CFLAGS"
3035   fi
3036   ;;
3037
3038 *-*-cygwin* | *-*-mingw*)
3039   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3040 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3042 echo "configure:3043: checking for $ac_word" >&5
3043 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test -n "$DLLTOOL"; then
3047   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3048 else
3049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3050   ac_dummy="$PATH"
3051   for ac_dir in $ac_dummy; do
3052     test -z "$ac_dir" && ac_dir=.
3053     if test -f $ac_dir/$ac_word; then
3054       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3055       break
3056     fi
3057   done
3058   IFS="$ac_save_ifs"
3059 fi
3060 fi
3061 DLLTOOL="$ac_cv_prog_DLLTOOL"
3062 if test -n "$DLLTOOL"; then
3063   echo "$ac_t""$DLLTOOL" 1>&6
3064 else
3065   echo "$ac_t""no" 1>&6
3066 fi
3067
3068
3069 if test -z "$ac_cv_prog_DLLTOOL"; then
3070 if test -n "$ac_tool_prefix"; then
3071   # Extract the first word of "dlltool", so it can be a program name with args.
3072 set dummy dlltool; ac_word=$2
3073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3074 echo "configure:3075: checking for $ac_word" >&5
3075 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   if test -n "$DLLTOOL"; then
3079   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3080 else
3081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3082   ac_dummy="$PATH"
3083   for ac_dir in $ac_dummy; do
3084     test -z "$ac_dir" && ac_dir=.
3085     if test -f $ac_dir/$ac_word; then
3086       ac_cv_prog_DLLTOOL="dlltool"
3087       break
3088     fi
3089   done
3090   IFS="$ac_save_ifs"
3091   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3092 fi
3093 fi
3094 DLLTOOL="$ac_cv_prog_DLLTOOL"
3095 if test -n "$DLLTOOL"; then
3096   echo "$ac_t""$DLLTOOL" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101 else
3102   DLLTOOL="false"
3103 fi
3104 fi
3105
3106   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3107 set dummy ${ac_tool_prefix}as; ac_word=$2
3108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3109 echo "configure:3110: checking for $ac_word" >&5
3110 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   if test -n "$AS"; then
3114   ac_cv_prog_AS="$AS" # Let the user override the test.
3115 else
3116   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3117   ac_dummy="$PATH"
3118   for ac_dir in $ac_dummy; do
3119     test -z "$ac_dir" && ac_dir=.
3120     if test -f $ac_dir/$ac_word; then
3121       ac_cv_prog_AS="${ac_tool_prefix}as"
3122       break
3123     fi
3124   done
3125   IFS="$ac_save_ifs"
3126 fi
3127 fi
3128 AS="$ac_cv_prog_AS"
3129 if test -n "$AS"; then
3130   echo "$ac_t""$AS" 1>&6
3131 else
3132   echo "$ac_t""no" 1>&6
3133 fi
3134
3135
3136 if test -z "$ac_cv_prog_AS"; then
3137 if test -n "$ac_tool_prefix"; then
3138   # Extract the first word of "as", so it can be a program name with args.
3139 set dummy as; ac_word=$2
3140 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3141 echo "configure:3142: checking for $ac_word" >&5
3142 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3143   echo $ac_n "(cached) $ac_c" 1>&6
3144 else
3145   if test -n "$AS"; then
3146   ac_cv_prog_AS="$AS" # Let the user override the test.
3147 else
3148   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3149   ac_dummy="$PATH"
3150   for ac_dir in $ac_dummy; do
3151     test -z "$ac_dir" && ac_dir=.
3152     if test -f $ac_dir/$ac_word; then
3153       ac_cv_prog_AS="as"
3154       break
3155     fi
3156   done
3157   IFS="$ac_save_ifs"
3158   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3159 fi
3160 fi
3161 AS="$ac_cv_prog_AS"
3162 if test -n "$AS"; then
3163   echo "$ac_t""$AS" 1>&6
3164 else
3165   echo "$ac_t""no" 1>&6
3166 fi
3167
3168 else
3169   AS="false"
3170 fi
3171 fi
3172
3173   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3174 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3176 echo "configure:3177: checking for $ac_word" >&5
3177 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   if test -n "$OBJDUMP"; then
3181   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3182 else
3183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3184   ac_dummy="$PATH"
3185   for ac_dir in $ac_dummy; do
3186     test -z "$ac_dir" && ac_dir=.
3187     if test -f $ac_dir/$ac_word; then
3188       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3189       break
3190     fi
3191   done
3192   IFS="$ac_save_ifs"
3193 fi
3194 fi
3195 OBJDUMP="$ac_cv_prog_OBJDUMP"
3196 if test -n "$OBJDUMP"; then
3197   echo "$ac_t""$OBJDUMP" 1>&6
3198 else
3199   echo "$ac_t""no" 1>&6
3200 fi
3201
3202
3203 if test -z "$ac_cv_prog_OBJDUMP"; then
3204 if test -n "$ac_tool_prefix"; then
3205   # Extract the first word of "objdump", so it can be a program name with args.
3206 set dummy objdump; ac_word=$2
3207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3208 echo "configure:3209: checking for $ac_word" >&5
3209 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   if test -n "$OBJDUMP"; then
3213   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3214 else
3215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3216   ac_dummy="$PATH"
3217   for ac_dir in $ac_dummy; do
3218     test -z "$ac_dir" && ac_dir=.
3219     if test -f $ac_dir/$ac_word; then
3220       ac_cv_prog_OBJDUMP="objdump"
3221       break
3222     fi
3223   done
3224   IFS="$ac_save_ifs"
3225   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3226 fi
3227 fi
3228 OBJDUMP="$ac_cv_prog_OBJDUMP"
3229 if test -n "$OBJDUMP"; then
3230   echo "$ac_t""$OBJDUMP" 1>&6
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 else
3236   OBJDUMP="false"
3237 fi
3238 fi
3239
3240   ;;
3241
3242 esac
3243
3244
3245 # Save cache, so that ltconfig can load it
3246
3247
3248 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3249 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3250 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3251 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3252 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3253 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3254 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3255 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3256
3257 # Reload cache, that may have been modified by ltconfig
3258
3259
3260 # This can be used to rebuild libtool when needed
3261 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3262
3263 # Always use our own libtool.
3264 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3265
3266 # Redirect the config.log output again, so that the ltconfig log is not
3267 # clobbered by the next message.
3268 exec 5>>./config.log
3269
3270
3271 for ac_prog in mawk gawk nawk awk
3272 do
3273 # Extract the first word of "$ac_prog", so it can be a program name with args.
3274 set dummy $ac_prog; ac_word=$2
3275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3276 echo "configure:3277: checking for $ac_word" >&5
3277 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280   if test -n "$AWK"; then
3281   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3282 else
3283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3284   ac_dummy="$PATH"
3285   for ac_dir in $ac_dummy; do
3286     test -z "$ac_dir" && ac_dir=.
3287     if test -f $ac_dir/$ac_word; then
3288       ac_cv_prog_AWK="$ac_prog"
3289       break
3290     fi
3291   done
3292   IFS="$ac_save_ifs"
3293 fi
3294 fi
3295 AWK="$ac_cv_prog_AWK"
3296 if test -n "$AWK"; then
3297   echo "$ac_t""$AWK" 1>&6
3298 else
3299   echo "$ac_t""no" 1>&6
3300 fi
3301
3302 test -n "$AWK" && break
3303 done
3304
3305 # test for ln hardlink support
3306 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3307 echo "configure:3308: checking whether ln works" >&5
3308 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   rm -f conftest.src conftest.dst
3312 echo "conftest" > conftest.src
3313 if ln conftest.src conftest.dst 2>/dev/null
3314 then
3315   ol_cv_prog_LN_H="ln"
3316 else
3317   ol_cv_prog_LN_H="cp"
3318 fi
3319 rm -f conftest.src conftest.dst
3320
3321 fi
3322 LN_H="$ol_cv_prog_LN_H"
3323 if test "$ol_cv_prog_LN_H" = "ln"; then
3324         echo "$ac_t""yes" 1>&6
3325 else
3326         echo "$ac_t""no" 1>&6
3327 fi
3328
3329 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3330 echo "configure:3331: checking whether ln -s works" >&5
3331 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   rm -f conftestdata
3335 if ln -s X conftestdata 2>/dev/null
3336 then
3337   rm -f conftestdata
3338   ac_cv_prog_LN_S="ln -s"
3339 else
3340   ac_cv_prog_LN_S=ln
3341 fi
3342 fi
3343 LN_S="$ac_cv_prog_LN_S"
3344 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3345   echo "$ac_t""yes" 1>&6
3346 else
3347   echo "$ac_t""no" 1>&6
3348 fi
3349
3350
3351 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3352         LN_S="$LN_H"
3353 fi
3354
3355 # Extract the first word of "sendmail", so it can be a program name with args.
3356 set dummy sendmail; ac_word=$2
3357 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3358 echo "configure:3359: checking for $ac_word" >&5
3359 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3360   echo $ac_n "(cached) $ac_c" 1>&6
3361 else
3362   case "$SENDMAIL" in
3363   /*)
3364   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3365   ;;
3366   ?:/*)                  
3367   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3368   ;;
3369   *)
3370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3371   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3372   for ac_dir in $ac_dummy; do 
3373     test -z "$ac_dir" && ac_dir=.
3374     if test -f $ac_dir/$ac_word; then
3375       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3376       break
3377     fi
3378   done
3379   IFS="$ac_save_ifs"
3380   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3381   ;;
3382 esac
3383 fi
3384 SENDMAIL="$ac_cv_path_SENDMAIL"
3385 if test -n "$SENDMAIL"; then
3386   echo "$ac_t""$SENDMAIL" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 # Extract the first word of "vi", so it can be a program name with args.
3392 set dummy vi; ac_word=$2
3393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3394 echo "configure:3395: checking for $ac_word" >&5
3395 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3396   echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398   case "$EDITOR" in
3399   /*)
3400   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3401   ;;
3402   ?:/*)                  
3403   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3404   ;;
3405   *)
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH:/usr/ucb"
3408   for ac_dir in $ac_dummy; do 
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3417   ;;
3418 esac
3419 fi
3420 EDITOR="$ac_cv_path_EDITOR"
3421 if test -n "$EDITOR"; then
3422   echo "$ac_t""$EDITOR" 1>&6
3423 else
3424   echo "$ac_t""no" 1>&6
3425 fi
3426
3427 # Extract the first word of "finger", so it can be a program name with args.
3428 set dummy finger; ac_word=$2
3429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3430 echo "configure:3431: checking for $ac_word" >&5
3431 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   case "$FINGER" in
3435   /*)
3436   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3437   ;;
3438   ?:/*)                  
3439   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3440   ;;
3441   *)
3442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3443   ac_dummy="$PATH:/usr/ucb"
3444   for ac_dir in $ac_dummy; do 
3445     test -z "$ac_dir" && ac_dir=.
3446     if test -f $ac_dir/$ac_word; then
3447       ac_cv_path_FINGER="$ac_dir/$ac_word"
3448       break
3449     fi
3450   done
3451   IFS="$ac_save_ifs"
3452   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3453   ;;
3454 esac
3455 fi
3456 FINGER="$ac_cv_path_FINGER"
3457 if test -n "$FINGER"; then
3458   echo "$ac_t""$FINGER" 1>&6
3459 else
3460   echo "$ac_t""no" 1>&6
3461 fi
3462
3463
3464 ol_link_perl=no
3465 if test $ol_enable_perl != no ; then
3466         # Extract the first word of "perl", so it can be a program name with args.
3467 set dummy perl; ac_word=$2
3468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3469 echo "configure:3470: checking for $ac_word" >&5
3470 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3471   echo $ac_n "(cached) $ac_c" 1>&6
3472 else
3473   case "$PERLBIN" in
3474   /*)
3475   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3476   ;;
3477   ?:/*)                  
3478   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3479   ;;
3480   *)
3481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3482   ac_dummy="$PATH"
3483   for ac_dir in $ac_dummy; do 
3484     test -z "$ac_dir" && ac_dir=.
3485     if test -f $ac_dir/$ac_word; then
3486       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3487       break
3488     fi
3489   done
3490   IFS="$ac_save_ifs"
3491   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3492   ;;
3493 esac
3494 fi
3495 PERLBIN="$ac_cv_path_PERLBIN"
3496 if test -n "$PERLBIN"; then
3497   echo "$ac_t""$PERLBIN" 1>&6
3498 else
3499   echo "$ac_t""no" 1>&6
3500 fi
3501
3502
3503         if test "no$PERLBIN" = "no" ; then
3504                 if test $ol_enable_perl = yes ; then
3505                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3506                 fi
3507
3508         else
3509                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3510                 if test x"$ol_with_perl_module" == "xstatic" ; then
3511                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3512                 else
3513                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3514                 fi
3515                                 ol_link_perl=yes
3516         fi
3517 fi
3518
3519 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3520 echo "configure:3521: checking how to run the C preprocessor" >&5
3521 # On Suns, sometimes $CPP names a directory.
3522 if test -n "$CPP" && test -d "$CPP"; then
3523   CPP=
3524 fi
3525 if test -z "$CPP"; then
3526 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529     # This must be in double quotes, not single quotes, because CPP may get
3530   # substituted into the Makefile and "${CC-cc}" will confuse make.
3531   CPP="${CC-cc} -E"
3532   # On the NeXT, cc -E runs the code through the compiler's parser,
3533   # not just through cpp.
3534   cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 #include <assert.h>
3538 Syntax Error
3539 EOF
3540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3541 { (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3543 if test -z "$ac_err"; then
3544   :
3545 else
3546   echo "$ac_err" >&5
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   CPP="${CC-cc} -E -traditional-cpp"
3551   cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 #include <assert.h>
3555 Syntax Error
3556 EOF
3557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3558 { (eval echo configure:3559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3560 if test -z "$ac_err"; then
3561   :
3562 else
3563   echo "$ac_err" >&5
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   CPP="${CC-cc} -nologo -E"
3568   cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <assert.h>
3572 Syntax Error
3573 EOF
3574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3575 { (eval echo configure:3576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3577 if test -z "$ac_err"; then
3578   :
3579 else
3580   echo "$ac_err" >&5
3581   echo "configure: failed program was:" >&5
3582   cat conftest.$ac_ext >&5
3583   rm -rf conftest*
3584   CPP=/lib/cpp
3585 fi
3586 rm -f conftest*
3587 fi
3588 rm -f conftest*
3589 fi
3590 rm -f conftest*
3591   ac_cv_prog_CPP="$CPP"
3592 fi
3593   CPP="$ac_cv_prog_CPP"
3594 else
3595   ac_cv_prog_CPP="$CPP"
3596 fi
3597 echo "$ac_t""$CPP" 1>&6
3598
3599
3600 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3601         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3602
3603 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3604         echo "configure: warning: programs compiled here do run here..." 1>&2
3605         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3606
3607 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3608         echo "configure: warning: programs compiled here do not run here..." 1>&2
3609         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3610 fi
3611
3612 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3613 echo "configure:3614: checking for AIX" >&5
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #ifdef _AIX
3618   yes
3619 #endif
3620
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "yes" >/dev/null 2>&1; then
3624   rm -rf conftest*
3625   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3626 #define _ALL_SOURCE 1
3627 EOF
3628
3629 else
3630   rm -rf conftest*
3631   echo "$ac_t""no" 1>&6
3632 fi
3633 rm -f conftest*
3634
3635
3636 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3637 echo "configure:3638: checking for POSIXized ISC" >&5
3638 if test -d /etc/conf/kconfig.d &&
3639   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3640 then
3641   echo "$ac_t""yes" 1>&6
3642   ISC=yes # If later tests want to check for ISC.
3643   cat >> confdefs.h <<\EOF
3644 #define _POSIX_SOURCE 1
3645 EOF
3646
3647   if test "$GCC" = yes; then
3648     CC="$CC -posix"
3649   else
3650     CC="$CC -Xp"
3651   fi
3652 else
3653   echo "$ac_t""no" 1>&6
3654   ISC=
3655 fi
3656
3657 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3658 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3659 echo "configure:3660: checking for minix/config.h" >&5
3660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   cat > conftest.$ac_ext <<EOF
3664 #line 3665 "configure"
3665 #include "confdefs.h"
3666 #include <minix/config.h>
3667 EOF
3668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3669 { (eval echo configure:3670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3671 if test -z "$ac_err"; then
3672   rm -rf conftest*
3673   eval "ac_cv_header_$ac_safe=yes"
3674 else
3675   echo "$ac_err" >&5
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   eval "ac_cv_header_$ac_safe=no"
3680 fi
3681 rm -f conftest*
3682 fi
3683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3684   echo "$ac_t""yes" 1>&6
3685   MINIX=yes
3686 else
3687   echo "$ac_t""no" 1>&6
3688 MINIX=
3689 fi
3690
3691 if test "$MINIX" = yes; then
3692   cat >> confdefs.h <<\EOF
3693 #define _POSIX_SOURCE 1
3694 EOF
3695
3696   cat >> confdefs.h <<\EOF
3697 #define _POSIX_1_SOURCE 2
3698 EOF
3699
3700   cat >> confdefs.h <<\EOF
3701 #define _MINIX 1
3702 EOF
3703
3704 fi
3705
3706
3707 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3708 echo "configure:3709: checking for Cygwin environment" >&5
3709 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3710   echo $ac_n "(cached) $ac_c" 1>&6
3711 else
3712   cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715
3716 int main() {
3717
3718 #ifndef __CYGWIN__
3719 #define __CYGWIN__ __CYGWIN32__
3720 #endif
3721 return __CYGWIN__;
3722 ; return 0; }
3723 EOF
3724 if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3725   rm -rf conftest*
3726   ac_cv_cygwin=yes
3727 else
3728   echo "configure: failed program was:" >&5
3729   cat conftest.$ac_ext >&5
3730   rm -rf conftest*
3731   ac_cv_cygwin=no
3732 fi
3733 rm -f conftest*
3734 fi
3735
3736 echo "$ac_t""$ac_cv_cygwin" 1>&6
3737 CYGWIN=
3738 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3739 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3740 echo "configure:3741: checking for mingw32 environment" >&5
3741 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3742   echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744   cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747
3748 int main() {
3749 return __MINGW32__;
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   ac_cv_mingw32=yes
3755 else
3756   echo "configure: failed program was:" >&5
3757   cat conftest.$ac_ext >&5
3758   rm -rf conftest*
3759   ac_cv_mingw32=no
3760 fi
3761 rm -f conftest*
3762 fi
3763
3764 echo "$ac_t""$ac_cv_mingw32" 1>&6
3765 MINGW32=
3766 test "$ac_cv_mingw32" = yes && MINGW32=yes
3767 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3768 echo "configure:3769: checking for EMX OS/2 environment" >&5
3769 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   cat > conftest.$ac_ext <<EOF
3773 #line 3774 "configure"
3774 #include "confdefs.h"
3775
3776 int main() {
3777 return __EMX__;
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3781   rm -rf conftest*
3782   ac_cv_emxos2=yes
3783 else
3784   echo "configure: failed program was:" >&5
3785   cat conftest.$ac_ext >&5
3786   rm -rf conftest*
3787   ac_cv_emxos2=no
3788 fi
3789 rm -f conftest*
3790 fi
3791
3792 echo "$ac_t""$ac_cv_emxos2" 1>&6
3793 EMXOS2=
3794 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3795
3796
3797
3798 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3799 echo "configure:3800: checking for executable suffix" >&5
3800 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3801   echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3804   ac_cv_exeext=.exe
3805 else
3806   rm -f conftest*
3807   echo 'int main () { return 0; }' > conftest.$ac_ext
3808   ac_cv_exeext=
3809   if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3810     for file in conftest.*; do
3811       case $file in
3812       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3813       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3814       esac
3815     done
3816   else
3817     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3818   fi
3819   rm -f conftest*
3820   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3821 fi
3822 fi
3823
3824 EXEEXT=""
3825 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3826 echo "$ac_t""${ac_cv_exeext}" 1>&6
3827 ac_exeext=$EXEEXT
3828
3829 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3830 echo "configure:3831: checking for object suffix" >&5
3831 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   rm -f conftest*
3835 echo 'int i = 1;' > conftest.$ac_ext
3836 if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3837   for ac_file in conftest.*; do
3838     case $ac_file in
3839     *.c) ;;
3840     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3841     esac
3842   done
3843 else
3844   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_objext" 1>&6
3850 OBJEXT=$ac_cv_objext
3851 ac_objext=$ac_cv_objext
3852
3853
3854 cat >> confdefs.h <<EOF
3855 #define EXEEXT "${EXEEXT}"
3856 EOF
3857
3858
3859 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3860 echo "configure:3861: checking for be_app in -lbe" >&5
3861 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   ac_save_LIBS="$LIBS"
3866 LIBS="-lbe -lroot -lnet $LIBS"
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 /* Override any gcc2 internal prototype to avoid an error.  */
3871 /* We use char because int might match the return type of a gcc2
3872     builtin and then its argument prototype would still apply.  */
3873 char be_app();
3874
3875 int main() {
3876 be_app()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893   echo "$ac_t""yes" 1>&6
3894   LIBS="$LIBS -lbe -lroot -lnet"
3895 else
3896   echo "$ac_t""no" 1>&6
3897 :
3898 fi
3899
3900
3901
3902
3903
3904 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3905 echo "configure:3906: checking for ${CC-cc} option to accept ANSI C" >&5
3906 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   am_cv_prog_cc_stdc=no
3910 ac_save_CC="$CC"
3911 # Don't try gcc -ansi; that turns off useful extensions and
3912 # breaks some systems' header files.
3913 # AIX                   -qlanglvl=ansi
3914 # Ultrix and OSF/1      -std1
3915 # HP-UX 10.20 and later -Ae
3916 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3917 # SVR4                  -Xc -D__EXTENSIONS__
3918 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3919 do
3920   CC="$ac_save_CC $ac_arg"
3921   cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 #include <stdarg.h>
3925 #include <stdio.h>
3926 #include <sys/types.h>
3927 #include <sys/stat.h>
3928 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3929 struct buf { int x; };
3930 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3931 static char *e (p, i)
3932      char **p;
3933      int i;
3934 {
3935   return p[i];
3936 }
3937 static char *f (char * (*g) (char **, int), char **p, ...)
3938 {
3939   char *s;
3940   va_list v;
3941   va_start (v,p);
3942   s = g (p, va_arg (v,int));
3943   va_end (v);
3944   return s;
3945 }
3946 int test (int i, double x);
3947 struct s1 {int (*f) (int a);};
3948 struct s2 {int (*f) (double a);};
3949 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3950 int argc;
3951 char **argv;
3952
3953 int main() {
3954
3955 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3956
3957 ; return 0; }
3958 EOF
3959 if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3960   rm -rf conftest*
3961   am_cv_prog_cc_stdc="$ac_arg"; break
3962 else
3963   echo "configure: failed program was:" >&5
3964   cat conftest.$ac_ext >&5
3965 fi
3966 rm -f conftest*
3967 done
3968 CC="$ac_save_CC"
3969
3970 fi
3971
3972 if test -z "$am_cv_prog_cc_stdc"; then
3973   echo "$ac_t""none needed" 1>&6
3974 else
3975   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3976 fi
3977 case "x$am_cv_prog_cc_stdc" in
3978   x|xno) ;;
3979   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3980 esac
3981
3982 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3983         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3984 fi
3985
3986 # test for make depend flag
3987 OL_MKDEP=
3988 OL_MKDEP_FLAGS=
3989 if test -z "${MKDEP}"; then
3990         OL_MKDEP="${CC-cc}"
3991         if test -z "${MKDEP_FLAGS}"; then
3992                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3993 echo "configure:3994: checking for ${OL_MKDEP} depend flag" >&5
3994 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   
3998                         ol_cv_mkdep=no
3999                         for flag in "-M" "-xM"; do
4000                                 cat > conftest.c <<EOF
4001  noCode;
4002 EOF
4003                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4004                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4005                                 then
4006                                         if test ! -f conftest."${ac_object}" ; then
4007                                                 ol_cv_mkdep=$flag
4008                                                 OL_MKDEP_FLAGS="$flag"
4009                                                 break
4010                                         fi
4011                                 fi
4012                         done
4013                         rm -f conftest*
4014                 
4015 fi
4016
4017 echo "$ac_t""$ol_cv_mkdep" 1>&6
4018         else
4019                 cc_cv_mkdep=yes
4020                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4021         fi
4022 else
4023         cc_cv_mkdep=yes
4024         OL_MKDEP="${MKDEP}"
4025         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4026 fi
4027
4028
4029
4030 if test "${ol_cv_mkdep}" = no ; then
4031         # this will soon become an error
4032         echo "configure: warning: do not know how to generate dependencies" 1>&2
4033 fi
4034
4035 ol_link_modules=no
4036 if test $ol_enable_modules != no ; then
4037         for ac_hdr in ltdl.h
4038 do
4039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4041 echo "configure:4042: checking for $ac_hdr" >&5
4042 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4043   echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045   cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 #include <$ac_hdr>
4049 EOF
4050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4051 { (eval echo configure:4052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4053 if test -z "$ac_err"; then
4054   rm -rf conftest*
4055   eval "ac_cv_header_$ac_safe=yes"
4056 else
4057   echo "$ac_err" >&5
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   eval "ac_cv_header_$ac_safe=no"
4062 fi
4063 rm -f conftest*
4064 fi
4065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4066   echo "$ac_t""yes" 1>&6
4067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4068   cat >> confdefs.h <<EOF
4069 #define $ac_tr_hdr 1
4070 EOF
4071  
4072 else
4073   echo "$ac_t""no" 1>&6
4074 fi
4075 done
4076
4077
4078         if test $ac_cv_header_ltdl_h = no ; then
4079                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4080         fi
4081
4082         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4083 echo "configure:4084: checking for lt_dlinit in -lltdl" >&5
4084 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   ac_save_LIBS="$LIBS"
4089 LIBS="-lltdl  $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char lt_dlinit();
4097
4098 int main() {
4099 lt_dlinit()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103   rm -rf conftest*
4104   eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116   echo "$ac_t""yes" 1>&6
4117   
4118             MODULES_LIBS=-lltdl
4119             cat >> confdefs.h <<\EOF
4120 #define HAVE_LIBLTDL 1
4121 EOF
4122
4123         
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128
4129         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4130                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4131         fi
4132         ol_link_modules=yes
4133 else
4134         ol_with_bdb2_module=static
4135         ol_with_ldap_module=static
4136         ol_with_ldbm_module=static
4137         ol_with_passwd_module=static
4138         ol_with_perl_module=static
4139         ol_with_shell_module=static
4140         ol_with_tcl_module=static
4141 fi
4142
4143 # test for EBCDIC
4144 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4145 echo "configure:4146: checking for EBCDIC" >&5
4146 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4147   echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149   
4150         cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153
4154 #if !('M' == 0xd4)
4155 #include <__ASCII__/generate_error.h>
4156 #endif
4157
4158 EOF
4159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4160 { (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4162 if test -z "$ac_err"; then
4163   rm -rf conftest*
4164   ol_cv_cpp_ebcdic=yes
4165 else
4166   echo "$ac_err" >&5
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ol_cv_cpp_ebcdic=no
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4176 if test $ol_cv_cpp_ebcdic = yes ; then
4177         cat >> confdefs.h <<\EOF
4178 #define HAVE_EBCDIC 1
4179 EOF
4180
4181 fi
4182
4183 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4184 echo "configure:4185: checking for ANSI C header files" >&5
4185 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <stdlib.h>
4192 #include <stdarg.h>
4193 #include <string.h>
4194 #include <float.h>
4195 EOF
4196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4197 { (eval echo configure:4198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4199 if test -z "$ac_err"; then
4200   rm -rf conftest*
4201   ol_cv_header_stdc=yes
4202 else
4203   echo "$ac_err" >&5
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   ol_cv_header_stdc=no
4208 fi
4209 rm -f conftest*
4210
4211 if test $ol_cv_header_stdc = yes; then
4212   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4213 cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <string.h>
4217 EOF
4218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4219   egrep "memchr" >/dev/null 2>&1; then
4220   :
4221 else
4222   rm -rf conftest*
4223   ol_cv_header_stdc=no
4224 fi
4225 rm -f conftest*
4226
4227 fi
4228
4229 if test $ol_cv_header_stdc = yes; then
4230   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 #include <stdlib.h>
4235 EOF
4236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4237   egrep "free" >/dev/null 2>&1; then
4238   :
4239 else
4240   rm -rf conftest*
4241   ol_cv_header_stdc=no
4242 fi
4243 rm -f conftest*
4244
4245 fi
4246
4247 if test $ol_cv_header_stdc = yes; then
4248   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4249 if test "$cross_compiling" = yes; then
4250   :
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <ctype.h>
4256 #ifndef HAVE_EBCDIC
4257 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4258 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4259 #else
4260 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4261                 || ('j' <= (c) && (c) <= 'r') \
4262                 || ('s' <= (c) && (c) <= 'z'))
4263 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4264 #endif
4265 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4266 int main () { int i; for (i = 0; i < 256; i++)
4267 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4268 exit (0); }
4269
4270 EOF
4271 if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4272 then
4273   :
4274 else
4275   echo "configure: failed program was:" >&5
4276   cat conftest.$ac_ext >&5
4277   rm -fr conftest*
4278   ol_cv_header_stdc=no
4279 fi
4280 rm -fr conftest*
4281 fi
4282
4283 fi
4284 fi
4285
4286 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4287 if test $ol_cv_header_stdc = yes; then
4288   cat >> confdefs.h <<\EOF
4289 #define STDC_HEADERS 1
4290 EOF
4291
4292 fi
4293 ac_cv_header_stdc=disable
4294
4295
4296 if test $ol_cv_header_stdc != yes; then
4297         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4298 fi
4299
4300 ac_header_dirent=no
4301 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4302 do
4303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4304 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4305 echo "configure:4306: checking for $ac_hdr that defines DIR" >&5
4306 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   cat > conftest.$ac_ext <<EOF
4310 #line 4311 "configure"
4311 #include "confdefs.h"
4312 #include <sys/types.h>
4313 #include <$ac_hdr>
4314 int main() {
4315 DIR *dirp = 0;
4316 ; return 0; }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4319   rm -rf conftest*
4320   eval "ac_cv_header_dirent_$ac_safe=yes"
4321 else
4322   echo "configure: failed program was:" >&5
4323   cat conftest.$ac_ext >&5
4324   rm -rf conftest*
4325   eval "ac_cv_header_dirent_$ac_safe=no"
4326 fi
4327 rm -f conftest*
4328 fi
4329 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4330   echo "$ac_t""yes" 1>&6
4331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4332   cat >> confdefs.h <<EOF
4333 #define $ac_tr_hdr 1
4334 EOF
4335  ac_header_dirent=$ac_hdr; break
4336 else
4337   echo "$ac_t""no" 1>&6
4338 fi
4339 done
4340 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4341 if test $ac_header_dirent = dirent.h; then
4342 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4343 echo "configure:4344: checking for opendir in -ldir" >&5
4344 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   ac_save_LIBS="$LIBS"
4349 LIBS="-ldir  $LIBS"
4350 cat > conftest.$ac_ext <<EOF
4351 #line 4352 "configure"
4352 #include "confdefs.h"
4353 /* Override any gcc2 internal prototype to avoid an error.  */
4354 /* We use char because int might match the return type of a gcc2
4355     builtin and then its argument prototype would still apply.  */
4356 char opendir();
4357
4358 int main() {
4359 opendir()
4360 ; return 0; }
4361 EOF
4362 if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4363   rm -rf conftest*
4364   eval "ac_cv_lib_$ac_lib_var=yes"
4365 else
4366   echo "configure: failed program was:" >&5
4367   cat conftest.$ac_ext >&5
4368   rm -rf conftest*
4369   eval "ac_cv_lib_$ac_lib_var=no"
4370 fi
4371 rm -f conftest*
4372 LIBS="$ac_save_LIBS"
4373
4374 fi
4375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4376   echo "$ac_t""yes" 1>&6
4377   LIBS="$LIBS -ldir"
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381
4382 else
4383 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4384 echo "configure:4385: checking for opendir in -lx" >&5
4385 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   ac_save_LIBS="$LIBS"
4390 LIBS="-lx  $LIBS"
4391 cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 /* Override any gcc2 internal prototype to avoid an error.  */
4395 /* We use char because int might match the return type of a gcc2
4396     builtin and then its argument prototype would still apply.  */
4397 char opendir();
4398
4399 int main() {
4400 opendir()
4401 ; return 0; }
4402 EOF
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=yes"
4406 else
4407   echo "configure: failed program was:" >&5
4408   cat conftest.$ac_ext >&5
4409   rm -rf conftest*
4410   eval "ac_cv_lib_$ac_lib_var=no"
4411 fi
4412 rm -f conftest*
4413 LIBS="$ac_save_LIBS"
4414
4415 fi
4416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4417   echo "$ac_t""yes" 1>&6
4418   LIBS="$LIBS -lx"
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422
4423 fi
4424
4425 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4426 echo "configure:4427: checking for sys/wait.h that is POSIX.1 compatible" >&5
4427 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4428   echo $ac_n "(cached) $ac_c" 1>&6
4429 else
4430   cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 #include <sys/wait.h>
4435 #ifndef WEXITSTATUS
4436 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4437 #endif
4438 #ifndef WIFEXITED
4439 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4440 #endif
4441 int main() {
4442 int s;
4443 wait (&s);
4444 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4445 ; return 0; }
4446 EOF
4447 if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4448   rm -rf conftest*
4449   ac_cv_header_sys_wait_h=yes
4450 else
4451   echo "configure: failed program was:" >&5
4452   cat conftest.$ac_ext >&5
4453   rm -rf conftest*
4454   ac_cv_header_sys_wait_h=no
4455 fi
4456 rm -f conftest*
4457 fi
4458
4459 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4460 if test $ac_cv_header_sys_wait_h = yes; then
4461   cat >> confdefs.h <<\EOF
4462 #define HAVE_SYS_WAIT_H 1
4463 EOF
4464
4465 fi
4466
4467 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4468 echo "configure:4469: checking POSIX termios" >&5
4469 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <sys/types.h>
4476 #include <unistd.h>
4477 #include <termios.h>
4478 int main() {
4479 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4480    tcgetattr(0, 0);
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   am_cv_sys_posix_termios=yes
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   am_cv_sys_posix_termios=no
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4496
4497
4498  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4499 echo "configure:4500: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4500 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4504
4505   gwinsz_in_termios_h=no
4506   if test $am_cv_sys_posix_termios = yes; then
4507     cat > conftest.$ac_ext <<EOF
4508 #line 4509 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4511 #     include <termios.h>
4512 #     ifdef TIOCGWINSZ
4513         yes
4514 #     endif
4515     
4516 EOF
4517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4518   egrep "yes" >/dev/null 2>&1; then
4519   rm -rf conftest*
4520   gwinsz_in_termios_h=yes
4521 fi
4522 rm -f conftest*
4523
4524   fi
4525
4526   if test $gwinsz_in_termios_h = no; then
4527     cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <sys/types.h>
4531 #     include <sys/ioctl.h>
4532 #     ifdef TIOCGWINSZ
4533         yes
4534 #     endif
4535     
4536 EOF
4537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4538   egrep "yes" >/dev/null 2>&1; then
4539   rm -rf conftest*
4540   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4541 fi
4542 rm -f conftest*
4543
4544   fi
4545   
4546 fi
4547
4548 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4549   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4550     cat >> confdefs.h <<\EOF
4551 #define GWINSZ_IN_SYS_IOCTL 1
4552 EOF
4553
4554   fi
4555
4556 if test $am_cv_sys_posix_termios = yes ; then
4557         cat >> confdefs.h <<\EOF
4558 #define HAVE_POSIX_TERMIOS 1
4559 EOF
4560
4561 fi
4562
4563 for ac_hdr in \
4564         arpa/inet.h             \
4565         arpa/nameser.h  \
4566         assert.h                \
4567         conio.h                 \
4568         crypt.h                 \
4569         direct.h                \
4570         errno.h                 \
4571         fcntl.h                 \
4572         filio.h                 \
4573         getopt.h                \
4574         grp.h                   \
4575         io.h                    \
4576         libutil.h               \
4577         limits.h                \
4578         locale.h                \
4579         netinet/tcp.h   \
4580         malloc.h                \
4581         memory.h                \
4582         psap.h                  \
4583         pwd.h                   \
4584         process.h               \
4585         resolv.h                \
4586         sgtty.h                 \
4587         shadow.h                \
4588         stddef.h                \
4589         string.h                \
4590         strings.h               \
4591         sysexits.h              \
4592         sys/file.h              \
4593         sys/filio.h             \
4594         sys/errno.h             \
4595         sys/ioctl.h             \
4596         sys/param.h             \
4597         sys/resource.h  \
4598         sys/select.h    \
4599         sys/socket.h    \
4600         sys/syslog.h    \
4601         sys/time.h              \
4602         sys/types.h             \
4603         syslog.h                \
4604         termios.h               \
4605         unistd.h                \
4606         winsock.h               \
4607
4608 do
4609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4611 echo "configure:4612: checking for $ac_hdr" >&5
4612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 #include <$ac_hdr>
4619 EOF
4620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4621 { (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4623 if test -z "$ac_err"; then
4624   rm -rf conftest*
4625   eval "ac_cv_header_$ac_safe=yes"
4626 else
4627   echo "$ac_err" >&5
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630   rm -rf conftest*
4631   eval "ac_cv_header_$ac_safe=no"
4632 fi
4633 rm -f conftest*
4634 fi
4635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4636   echo "$ac_t""yes" 1>&6
4637     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4638   cat >> confdefs.h <<EOF
4639 #define $ac_tr_hdr 1
4640 EOF
4641  
4642 else
4643   echo "$ac_t""no" 1>&6
4644 fi
4645 done
4646
4647
4648
4649
4650 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4651 echo "configure:4652: checking for sigset in -lV3" >&5
4652 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   ac_save_LIBS="$LIBS"
4657 LIBS="-lV3  $LIBS"
4658 cat > conftest.$ac_ext <<EOF
4659 #line 4660 "configure"
4660 #include "confdefs.h"
4661 /* Override any gcc2 internal prototype to avoid an error.  */
4662 /* We use char because int might match the return type of a gcc2
4663     builtin and then its argument prototype would still apply.  */
4664 char sigset();
4665
4666 int main() {
4667 sigset()
4668 ; return 0; }
4669 EOF
4670 if { (eval echo configure:4671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4671   rm -rf conftest*
4672   eval "ac_cv_lib_$ac_lib_var=yes"
4673 else
4674   echo "configure: failed program was:" >&5
4675   cat conftest.$ac_ext >&5
4676   rm -rf conftest*
4677   eval "ac_cv_lib_$ac_lib_var=no"
4678 fi
4679 rm -f conftest*
4680 LIBS="$ac_save_LIBS"
4681
4682 fi
4683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4684   echo "$ac_t""yes" 1>&6
4685     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4686     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4687   cat >> confdefs.h <<EOF
4688 #define $ac_tr_lib 1
4689 EOF
4690
4691   LIBS="-lV3 $LIBS"
4692
4693 else
4694   echo "$ac_t""no" 1>&6
4695 fi
4696
4697
4698 if test "${ac_cv_header_winsock_h}" = yes; then
4699     echo $ac_n "checking for winsock support""... $ac_c" 1>&6
4700 echo "configure:4701: checking for winsock support" >&5
4701     cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704
4705 #include <winsock.h>
4706     
4707 int main() {
4708
4709 socket(0,0,0);
4710 select(0,NULL,NULL,NULL,NULL);
4711 closesocket(0);
4712 gethostname(NULL,0);
4713     
4714 ; return 0; }
4715 EOF
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717   rm -rf conftest*
4718   
4719         echo "$ac_t""yes" 1>&6
4720         cat >> confdefs.h <<\EOF
4721 #define HAVE_WINSOCK 1
4722 EOF
4723
4724         ac_cv_func_socket=yes
4725         ac_cv_func_select=yes
4726         ac_cv_func_closesocket=yes
4727         ac_cv_func_gethostname=yes
4728     
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   
4734         echo "$ac_t""no" 1>&6
4735     
4736 fi
4737 rm -f conftest*
4738 fi
4739
4740
4741 echo $ac_n "checking for socket""... $ac_c" 1>&6
4742 echo "configure:4743: checking for socket" >&5
4743 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749 /* System header to define __stub macros and hopefully few prototypes,
4750     which can conflict with char socket(); below.  */
4751 #include <assert.h>
4752 /* Override any gcc2 internal prototype to avoid an error.  */
4753 /* We use char because int might match the return type of a gcc2
4754     builtin and then its argument prototype would still apply.  */
4755 char socket();
4756 char (*f)();
4757
4758 int main() {
4759
4760 /* The GNU C library defines this for functions which it implements
4761     to always fail with ENOSYS.  Some functions are actually named
4762     something starting with __ and the normal name is an alias.  */
4763 #if defined (__stub_socket) || defined (__stub___socket)
4764 choke me
4765 #else
4766 f = socket;
4767 #endif
4768
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   eval "ac_cv_func_socket=yes"
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_func_socket=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4784   echo "$ac_t""yes" 1>&6
4785   :
4786 else
4787   echo "$ac_t""no" 1>&6
4788         
4789         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4790 echo "configure:4791: checking for main in -lsocket" >&5
4791 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   ac_save_LIBS="$LIBS"
4796 LIBS="-lsocket  $LIBS"
4797 cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800
4801 int main() {
4802 main()
4803 ; return 0; }
4804 EOF
4805 if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4806   rm -rf conftest*
4807   eval "ac_cv_lib_$ac_lib_var=yes"
4808 else
4809   echo "configure: failed program was:" >&5
4810   cat conftest.$ac_ext >&5
4811   rm -rf conftest*
4812   eval "ac_cv_lib_$ac_lib_var=no"
4813 fi
4814 rm -f conftest*
4815 LIBS="$ac_save_LIBS"
4816
4817 fi
4818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4819   echo "$ac_t""yes" 1>&6
4820     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4822   cat >> confdefs.h <<EOF
4823 #define $ac_tr_lib 1
4824 EOF
4825
4826   LIBS="-lsocket $LIBS"
4827
4828 else
4829   echo "$ac_t""no" 1>&6
4830 fi
4831
4832         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4833 echo "configure:4834: checking for main in -lnet" >&5
4834 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   ac_save_LIBS="$LIBS"
4839 LIBS="-lnet  $LIBS"
4840 cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843
4844 int main() {
4845 main()
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   eval "ac_cv_lib_$ac_lib_var=yes"
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   eval "ac_cv_lib_$ac_lib_var=no"
4856 fi
4857 rm -f conftest*
4858 LIBS="$ac_save_LIBS"
4859
4860 fi
4861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4862   echo "$ac_t""yes" 1>&6
4863     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4865   cat >> confdefs.h <<EOF
4866 #define $ac_tr_lib 1
4867 EOF
4868
4869   LIBS="-lnet $LIBS"
4870
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874
4875         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4876 echo "configure:4877: checking for socket in -lnet" >&5
4877 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   ac_save_LIBS="$LIBS"
4882 LIBS="-lnet  $LIBS"
4883 cat > conftest.$ac_ext <<EOF
4884 #line 4885 "configure"
4885 #include "confdefs.h"
4886 /* Override any gcc2 internal prototype to avoid an error.  */
4887 /* We use char because int might match the return type of a gcc2
4888     builtin and then its argument prototype would still apply.  */
4889 char socket();
4890
4891 int main() {
4892 socket()
4893 ; return 0; }
4894 EOF
4895 if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4896   rm -rf conftest*
4897   eval "ac_cv_lib_$ac_lib_var=yes"
4898 else
4899   echo "configure: failed program was:" >&5
4900   cat conftest.$ac_ext >&5
4901   rm -rf conftest*
4902   eval "ac_cv_lib_$ac_lib_var=no"
4903 fi
4904 rm -f conftest*
4905 LIBS="$ac_save_LIBS"
4906
4907 fi
4908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4909   echo "$ac_t""yes" 1>&6
4910     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4911     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4912   cat >> confdefs.h <<EOF
4913 #define $ac_tr_lib 1
4914 EOF
4915
4916   LIBS="-lnet $LIBS"
4917
4918 else
4919   echo "$ac_t""no" 1>&6
4920 fi
4921
4922         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4923 echo "configure:4924: checking for main in -lnsl_s" >&5
4924 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4925 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   ac_save_LIBS="$LIBS"
4929 LIBS="-lnsl_s  $LIBS"
4930 cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933
4934 int main() {
4935 main()
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4939   rm -rf conftest*
4940   eval "ac_cv_lib_$ac_lib_var=yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   eval "ac_cv_lib_$ac_lib_var=no"
4946 fi
4947 rm -f conftest*
4948 LIBS="$ac_save_LIBS"
4949
4950 fi
4951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4952   echo "$ac_t""yes" 1>&6
4953     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4954     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4955   cat >> confdefs.h <<EOF
4956 #define $ac_tr_lib 1
4957 EOF
4958
4959   LIBS="-lnsl_s $LIBS"
4960
4961 else
4962   echo "$ac_t""no" 1>&6
4963 fi
4964
4965         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4966 echo "configure:4967: checking for main in -lnsl" >&5
4967 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4969   echo $ac_n "(cached) $ac_c" 1>&6
4970 else
4971   ac_save_LIBS="$LIBS"
4972 LIBS="-lnsl  $LIBS"
4973 cat > conftest.$ac_ext <<EOF
4974 #line 4975 "configure"
4975 #include "confdefs.h"
4976
4977 int main() {
4978 main()
4979 ; return 0; }
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4982   rm -rf conftest*
4983   eval "ac_cv_lib_$ac_lib_var=yes"
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -rf conftest*
4988   eval "ac_cv_lib_$ac_lib_var=no"
4989 fi
4990 rm -f conftest*
4991 LIBS="$ac_save_LIBS"
4992
4993 fi
4994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4995   echo "$ac_t""yes" 1>&6
4996     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4997     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4998   cat >> confdefs.h <<EOF
4999 #define $ac_tr_lib 1
5000 EOF
5001
5002   LIBS="-lnsl $LIBS"
5003
5004 else
5005   echo "$ac_t""no" 1>&6
5006 fi
5007
5008         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5009 echo "configure:5010: checking for socket in -linet" >&5
5010 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   ac_save_LIBS="$LIBS"
5015 LIBS="-linet  $LIBS"
5016 cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019 /* Override any gcc2 internal prototype to avoid an error.  */
5020 /* We use char because int might match the return type of a gcc2
5021     builtin and then its argument prototype would still apply.  */
5022 char socket();
5023
5024 int main() {
5025 socket()
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5029   rm -rf conftest*
5030   eval "ac_cv_lib_$ac_lib_var=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_lib_$ac_lib_var=no"
5036 fi
5037 rm -f conftest*
5038 LIBS="$ac_save_LIBS"
5039
5040 fi
5041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5042   echo "$ac_t""yes" 1>&6
5043     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5045   cat >> confdefs.h <<EOF
5046 #define $ac_tr_lib 1
5047 EOF
5048
5049   LIBS="-linet $LIBS"
5050
5051 else
5052   echo "$ac_t""no" 1>&6
5053 fi
5054
5055         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5056 echo "configure:5057: checking for main in -lgen" >&5
5057 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5059   echo $ac_n "(cached) $ac_c" 1>&6
5060 else
5061   ac_save_LIBS="$LIBS"
5062 LIBS="-lgen  $LIBS"
5063 cat > conftest.$ac_ext <<EOF
5064 #line 5065 "configure"
5065 #include "confdefs.h"
5066
5067 int main() {
5068 main()
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=yes"
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   eval "ac_cv_lib_$ac_lib_var=no"
5079 fi
5080 rm -f conftest*
5081 LIBS="$ac_save_LIBS"
5082
5083 fi
5084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5085   echo "$ac_t""yes" 1>&6
5086     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5088   cat >> confdefs.h <<EOF
5089 #define $ac_tr_lib 1
5090 EOF
5091
5092   LIBS="-lgen $LIBS"
5093
5094 else
5095   echo "$ac_t""no" 1>&6
5096 fi
5097
5098
5099 fi
5100
5101
5102 echo $ac_n "checking for select""... $ac_c" 1>&6
5103 echo "configure:5104: checking for select" >&5
5104 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5105   echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107   cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 /* System header to define __stub macros and hopefully few prototypes,
5111     which can conflict with char select(); below.  */
5112 #include <assert.h>
5113 /* Override any gcc2 internal prototype to avoid an error.  */
5114 /* We use char because int might match the return type of a gcc2
5115     builtin and then its argument prototype would still apply.  */
5116 char select();
5117 char (*f)();
5118
5119 int main() {
5120
5121 /* The GNU C library defines this for functions which it implements
5122     to always fail with ENOSYS.  Some functions are actually named
5123     something starting with __ and the normal name is an alias.  */
5124 #if defined (__stub_select) || defined (__stub___select)
5125 choke me
5126 #else
5127 f = select;
5128 #endif
5129
5130 ; return 0; }
5131 EOF
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133   rm -rf conftest*
5134   eval "ac_cv_func_select=yes"
5135 else
5136   echo "configure: failed program was:" >&5
5137   cat conftest.$ac_ext >&5
5138   rm -rf conftest*
5139   eval "ac_cv_func_select=no"
5140 fi
5141 rm -f conftest*
5142 fi
5143
5144 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5145   echo "$ac_t""yes" 1>&6
5146   :
5147 else
5148   echo "$ac_t""no" 1>&6
5149 { echo "configure: error: select() required." 1>&2; exit 1; }
5150 fi
5151
5152
5153 if test "${ac_cv_header_winsock_h}" != yes; then
5154                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5155 echo "configure:5156: checking types of arguments for select()" >&5
5156  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5160   echo $ac_n "(cached) $ac_c" 1>&6
5161 else
5162     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5166      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5167       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5168        cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 #ifdef HAVE_SYS_TYPES_H
5172 #include <sys/types.h>
5173 #endif
5174 #ifdef HAVE_SYS_TIME_H
5175 #include <sys/time.h>
5176 #endif
5177 #ifdef HAVE_SYS_SELECT_H
5178 #include <sys/select.h>
5179 #endif
5180 #ifdef HAVE_SYS_SOCKET_H
5181 #include <sys/socket.h>
5182 #endif
5183 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);
5184 int main() {
5185
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5189   rm -rf conftest*
5190           ac_not_found=no ; break 3
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   ac_not_found=yes
5196 fi
5197 rm -f conftest*
5198       done
5199      done
5200     done
5201    
5202 fi
5203   
5204 fi
5205  
5206 fi
5207  if test "$ac_not_found" = yes; then
5208   ac_cv_func_select_arg1=int 
5209   ac_cv_func_select_arg234='int *' 
5210   ac_cv_func_select_arg5='struct timeval *'
5211  fi
5212  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5213  cat >> confdefs.h <<EOF
5214 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5215 EOF
5216
5217  cat >> confdefs.h <<EOF
5218 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5219 EOF
5220
5221  cat >> confdefs.h <<EOF
5222 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5223 EOF
5224
5225
5226 fi
5227
5228
5229 for ac_hdr in regex.h 
5230 do
5231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5233 echo "configure:5234: checking for $ac_hdr" >&5
5234 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 #include <$ac_hdr>
5241 EOF
5242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5243 { (eval echo configure:5244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5245 if test -z "$ac_err"; then
5246   rm -rf conftest*
5247   eval "ac_cv_header_$ac_safe=yes"
5248 else
5249   echo "$ac_err" >&5
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   eval "ac_cv_header_$ac_safe=no"
5254 fi
5255 rm -f conftest*
5256 fi
5257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5258   echo "$ac_t""yes" 1>&6
5259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5260   cat >> confdefs.h <<EOF
5261 #define $ac_tr_hdr 1
5262 EOF
5263  
5264 else
5265   echo "$ac_t""no" 1>&6
5266 fi
5267 done
5268
5269 if test "$ac_cv_header_regex_h" != yes ; then
5270         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5271 fi
5272 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5273 echo "configure:5274: checking for regfree" >&5
5274 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char regfree(); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 /* We use char because int might match the return type of a gcc2
5285     builtin and then its argument prototype would still apply.  */
5286 char regfree();
5287 char (*f)();
5288
5289 int main() {
5290
5291 /* The GNU C library defines this for functions which it implements
5292     to always fail with ENOSYS.  Some functions are actually named
5293     something starting with __ and the normal name is an alias.  */
5294 #if defined (__stub_regfree) || defined (__stub___regfree)
5295 choke me
5296 #else
5297 f = regfree;
5298 #endif
5299
5300 ; return 0; }
5301 EOF
5302 if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5303   rm -rf conftest*
5304   eval "ac_cv_func_regfree=yes"
5305 else
5306   echo "configure: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   rm -rf conftest*
5309   eval "ac_cv_func_regfree=no"
5310 fi
5311 rm -f conftest*
5312 fi
5313
5314 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5315   echo "$ac_t""yes" 1>&6
5316   :
5317 else
5318   echo "$ac_t""no" 1>&6
5319 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5320 fi
5321
5322
5323
5324 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5325 echo "configure:5326: checking for compatible POSIX regex" >&5
5326 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5327   echo $ac_n "(cached) $ac_c" 1>&6
5328 else
5329   
5330         if test "$cross_compiling" = yes; then
5331   ol_cv_c_posix_regex=cross
5332 else
5333   cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336
5337 #include <sys/types.h>
5338 #include <regex.h>
5339 static char *pattern, *string;
5340 main()
5341 {
5342         int rc;
5343         regex_t re;
5344
5345         pattern = "^A";
5346
5347         if(regcomp(&re, pattern, 0)) {
5348                 return -1;
5349         }
5350         
5351         string = "ALL MATCH";
5352         
5353         rc = regexec(&re, string, 0, (void*)0, 0);
5354
5355         regfree(&re);
5356
5357         return rc;
5358 }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5361 then
5362   ol_cv_c_posix_regex=yes
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -fr conftest*
5367   ol_cv_c_posix_regex=no
5368 fi
5369 rm -fr conftest*
5370 fi
5371
5372 fi
5373
5374 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5375
5376 if test "$ol_cv_c_posix_regex" = no ; then
5377         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5378 fi
5379
5380 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5381 echo "configure:5382: checking for res_search" >&5
5382 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5383   echo $ac_n "(cached) $ac_c" 1>&6
5384 else
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char res_search(); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 /* We use char because int might match the return type of a gcc2
5393     builtin and then its argument prototype would still apply.  */
5394 char res_search();
5395 char (*f)();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_res_search) || defined (__stub___res_search)
5403 choke me
5404 #else
5405 f = res_search;
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_res_search=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_res_search=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   :
5425 else
5426   echo "$ac_t""no" 1>&6
5427 fi
5428
5429 if test $ac_cv_func_res_search = no ; then 
5430         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5431 echo "configure:5432: checking for res_search in -lbind" >&5
5432 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5434   echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436   ac_save_LIBS="$LIBS"
5437 LIBS="-lbind  $LIBS"
5438 cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 /* Override any gcc2 internal prototype to avoid an error.  */
5442 /* We use char because int might match the return type of a gcc2
5443     builtin and then its argument prototype would still apply.  */
5444 char res_search();
5445
5446 int main() {
5447 res_search()
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=yes"
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=no"
5458 fi
5459 rm -f conftest*
5460 LIBS="$ac_save_LIBS"
5461
5462 fi
5463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5467   cat >> confdefs.h <<EOF
5468 #define $ac_tr_lib 1
5469 EOF
5470
5471   LIBS="-lbind $LIBS"
5472
5473 else
5474   echo "$ac_t""no" 1>&6
5475 fi
5476
5477         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5478 fi
5479
5480 if test $ac_cv_func_res_search = no ; then 
5481         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5482 echo "configure:5483: checking for __res_search in -lbind" >&5
5483 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5484 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5485   echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487   ac_save_LIBS="$LIBS"
5488 LIBS="-lbind  $LIBS"
5489 cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 /* Override any gcc2 internal prototype to avoid an error.  */
5493 /* We use char because int might match the return type of a gcc2
5494     builtin and then its argument prototype would still apply.  */
5495 char __res_search();
5496
5497 int main() {
5498 __res_search()
5499 ; return 0; }
5500 EOF
5501 if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5502   rm -rf conftest*
5503   eval "ac_cv_lib_$ac_lib_var=yes"
5504 else
5505   echo "configure: failed program was:" >&5
5506   cat conftest.$ac_ext >&5
5507   rm -rf conftest*
5508   eval "ac_cv_lib_$ac_lib_var=no"
5509 fi
5510 rm -f conftest*
5511 LIBS="$ac_save_LIBS"
5512
5513 fi
5514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5515   echo "$ac_t""yes" 1>&6
5516     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5517     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5518   cat >> confdefs.h <<EOF
5519 #define $ac_tr_lib 1
5520 EOF
5521
5522   LIBS="-lbind $LIBS"
5523
5524 else
5525   echo "$ac_t""no" 1>&6
5526 fi
5527
5528         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5529 fi
5530
5531 if test $ac_cv_func_res_search = no ; then 
5532         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5533 echo "configure:5534: checking for res_search in -lresolv" >&5
5534 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5535 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   ac_save_LIBS="$LIBS"
5539 LIBS="-lresolv  $LIBS"
5540 cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 /* Override any gcc2 internal prototype to avoid an error.  */
5544 /* We use char because int might match the return type of a gcc2
5545     builtin and then its argument prototype would still apply.  */
5546 char res_search();
5547
5548 int main() {
5549 res_search()
5550 ; return 0; }
5551 EOF
5552 if { (eval echo configure:5553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5553   rm -rf conftest*
5554   eval "ac_cv_lib_$ac_lib_var=yes"
5555 else
5556   echo "configure: failed program was:" >&5
5557   cat conftest.$ac_ext >&5
5558   rm -rf conftest*
5559   eval "ac_cv_lib_$ac_lib_var=no"
5560 fi
5561 rm -f conftest*
5562 LIBS="$ac_save_LIBS"
5563
5564 fi
5565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5566   echo "$ac_t""yes" 1>&6
5567     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5568     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5569   cat >> confdefs.h <<EOF
5570 #define $ac_tr_lib 1
5571 EOF
5572
5573   LIBS="-lresolv $LIBS"
5574
5575 else
5576   echo "$ac_t""no" 1>&6
5577 fi
5578
5579         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5580 fi
5581
5582 if test "$ac_cv_func_res_search" = yes ; then
5583         cat >> confdefs.h <<\EOF
5584 #define HAVE_RES_SEARCH 1
5585 EOF
5586
5587 elif test $ol_enable_dns = yes ; then
5588         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5589 elif test $ol_enable_dns != no ; then
5590         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5591 fi
5592
5593
5594 ol_link_isode=no
5595 if test $ol_enable_ldapd != no ; then
5596         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5597
5598                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5599 echo "configure:5600: checking for main in -lxtpp" >&5
5600 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604   ac_save_LIBS="$LIBS"
5605 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609
5610 int main() {
5611 main()
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615   rm -rf conftest*
5616   eval "ac_cv_lib_$ac_lib_var=yes"
5617 else
5618   echo "configure: failed program was:" >&5
5619   cat conftest.$ac_ext >&5
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=no"
5622 fi
5623 rm -f conftest*
5624 LIBS="$ac_save_LIBS"
5625
5626 fi
5627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5628   echo "$ac_t""yes" 1>&6
5629   
5630                 ol_link_isode=yes
5631                 cat >> confdefs.h <<\EOF
5632 #define HAVE_XTPP 1
5633 EOF
5634
5635                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5636                 
5637 else
5638   echo "$ac_t""no" 1>&6
5639 :
5640 fi
5641
5642         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5643 echo "configure:5644: checking for main in -ldsap" >&5
5644 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5646   echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648   ac_save_LIBS="$LIBS"
5649 LIBS="-ldsap -lisode $LIBS"
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653
5654 int main() {
5655 main()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 LIBS="$ac_save_LIBS"
5669
5670 fi
5671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5672   echo "$ac_t""yes" 1>&6
5673   
5674                 ol_link_isode=yes
5675                 cat >> confdefs.h <<\EOF
5676 #define HAVE_DSAP 1
5677 EOF
5678
5679                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5680                 
5681 else
5682   echo "$ac_t""no" 1>&6
5683 :
5684 fi
5685
5686         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5687 echo "configure:5688: checking for main in -lisode" >&5
5688 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5690   echo $ac_n "(cached) $ac_c" 1>&6
5691 else
5692   ac_save_LIBS="$LIBS"
5693 LIBS="-lisode  $LIBS"
5694 cat > conftest.$ac_ext <<EOF
5695 #line 5696 "configure"
5696 #include "confdefs.h"
5697
5698 int main() {
5699 main()
5700 ; return 0; }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703   rm -rf conftest*
5704   eval "ac_cv_lib_$ac_lib_var=yes"
5705 else
5706   echo "configure: failed program was:" >&5
5707   cat conftest.$ac_ext >&5
5708   rm -rf conftest*
5709   eval "ac_cv_lib_$ac_lib_var=no"
5710 fi
5711 rm -f conftest*
5712 LIBS="$ac_save_LIBS"
5713
5714 fi
5715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5716   echo "$ac_t""yes" 1>&6
5717   
5718                 ol_link_isode=yes
5719                 cat >> confdefs.h <<\EOF
5720 #define HAVE_ISODE 1
5721 EOF
5722
5723                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5724                 
5725 else
5726   echo "$ac_t""no" 1>&6
5727 :
5728 fi
5729
5730 fi
5731
5732 if test $ol_link_isode != no; then
5733         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5734 echo "configure:5735: checking for main in -lpp" >&5
5735 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   ac_save_LIBS="$LIBS"
5740 LIBS="-lpp  $LIBS"
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5743 "configure"
5743 #include "confdefs.h"
5744
5745 int main() {
5746 main()
5747 ; return 0; }
5748 EOF
5749 if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5750   rm -rf conftest*
5751   eval "ac_cv_lib_$ac_lib_var=yes"
5752 else
5753   echo "configure: failed program was:" >&5
5754   cat conftest.$ac_ext >&5
5755   rm -rf conftest*
5756   eval "ac_cv_lib_$ac_lib_var=no"
5757 fi
5758 rm -f conftest*
5759 LIBS="$ac_save_LIBS"
5760
5761 fi
5762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5763   echo "$ac_t""yes" 1>&6
5764   
5765                 cat >> confdefs.h <<\EOF
5766 #define HAVE_PP 1
5767 EOF
5768
5769                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5770                 
5771 else
5772   echo "$ac_t""no" 1>&6
5773 :
5774 fi
5775
5776
5777         # Extract the first word of "pepsy", so it can be a program name with args.
5778 set dummy pepsy; ac_word=$2
5779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5780 echo "configure:5781: checking for $ac_word" >&5
5781 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5782   echo $ac_n "(cached) $ac_c" 1>&6
5783 else
5784   case "$PEPSY" in
5785   /*)
5786   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5787   ;;
5788   ?:/*)                  
5789   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5790   ;;
5791   *)
5792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5793   ac_dummy="$PATH"
5794   for ac_dir in $ac_dummy; do 
5795     test -z "$ac_dir" && ac_dir=.
5796     if test -f $ac_dir/$ac_word; then
5797       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5798       break
5799     fi
5800   done
5801   IFS="$ac_save_ifs"
5802   ;;
5803 esac
5804 fi
5805 PEPSY="$ac_cv_path_PEPSY"
5806 if test -n "$PEPSY"; then
5807   echo "$ac_t""$PEPSY" 1>&6
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811
5812 fi
5813
5814 if test $ol_enable_quipu != no ; then
5815         for ac_hdr in quipu/commonarg.h
5816 do
5817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5819 echo "configure:5820: checking for $ac_hdr" >&5
5820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 #include <$ac_hdr>
5827 EOF
5828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5829 { (eval echo configure:5830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5831 if test -z "$ac_err"; then
5832   rm -rf conftest*
5833   eval "ac_cv_header_$ac_safe=yes"
5834 else
5835   echo "$ac_err" >&5
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_header_$ac_safe=no"
5840 fi
5841 rm -f conftest*
5842 fi
5843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5844   echo "$ac_t""yes" 1>&6
5845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5846   cat >> confdefs.h <<EOF
5847 #define $ac_tr_hdr 1
5848 EOF
5849  
5850 else
5851   echo "$ac_t""no" 1>&6
5852 fi
5853 done
5854
5855
5856         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5857                 BUILD_QUIPU=yes
5858         elif test $ol_enable_quipu = auto ; then
5859                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5860         else
5861                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5862         fi
5863 fi
5864
5865 ol_link_kerberos=no
5866
5867 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5868         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5869 do
5870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5872 echo "configure:5873: checking for $ac_hdr" >&5
5873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 #include <$ac_hdr>
5880 EOF
5881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5882 { (eval echo configure:5883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5884 if test -z "$ac_err"; then
5885   rm -rf conftest*
5886   eval "ac_cv_header_$ac_safe=yes"
5887 else
5888   echo "$ac_err" >&5
5889   echo "configure: failed program was:" >&5
5890   cat conftest.$ac_ext >&5
5891   rm -rf conftest*
5892   eval "ac_cv_header_$ac_safe=no"
5893 fi
5894 rm -f conftest*
5895 fi
5896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5897   echo "$ac_t""yes" 1>&6
5898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5899   cat >> confdefs.h <<EOF
5900 #define $ac_tr_hdr 1
5901 EOF
5902  
5903 else
5904   echo "$ac_t""no" 1>&6
5905 fi
5906 done
5907
5908
5909         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5910                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5911 echo "configure:5912: checking for main in -lkrb4" >&5
5912 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5914   echo $ac_n "(cached) $ac_c" 1>&6
5915 else
5916   ac_save_LIBS="$LIBS"
5917 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921
5922 int main() {
5923 main()
5924 ; return 0; }
5925 EOF
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927   rm -rf conftest*
5928   eval "ac_cv_lib_$ac_lib_var=yes"
5929 else
5930   echo "configure: failed program was:" >&5
5931   cat conftest.$ac_ext >&5
5932   rm -rf conftest*
5933   eval "ac_cv_lib_$ac_lib_var=no"
5934 fi
5935 rm -f conftest*
5936 LIBS="$ac_save_LIBS"
5937
5938 fi
5939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5940   echo "$ac_t""yes" 1>&6
5941   have_k5=yes
5942 else
5943   echo "$ac_t""no" 1>&6
5944 have_k5=no
5945 fi
5946
5947
5948                 if test $have_k5 = yes ; then
5949                         ol_with_kerberos=found
5950                         ol_link_kerberos=yes
5951
5952                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5953
5954                         LIBS="$KRB_LIBS $LIBS"
5955
5956                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5957 echo "configure:5958: checking for des_debug in Kerberos libraries" >&5
5958 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5959   echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961   
5962                                                                 save_LIBS="$LIBS"
5963                                 LIBS="$KRB_LIBS $LIBS"
5964                                 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967
5968 #include <kerberosIV/krb.h>
5969 #include <kerberosIV/des.h>
5970 extern int des_debug;
5971
5972 int main() {
5973
5974 des_debug = 1;
5975
5976 ; return 0; }
5977 EOF
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979   rm -rf conftest*
5980   ol_cv_var_des_debug=yes
5981 else
5982   echo "configure: failed program was:" >&5
5983   cat conftest.$ac_ext >&5
5984   rm -rf conftest*
5985   ol_cv_var_des_debug=no
5986 fi
5987 rm -f conftest*
5988                                                                 LIBS="$save_LIBS"
5989                         
5990 fi
5991
5992 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5993
5994                         if test $ol_cv_var_des_debug = yes ; then
5995                                 cat >> confdefs.h <<\EOF
5996 #define HAVE_DES_DEBUG 1
5997 EOF
5998
5999                         fi
6000
6001                         LIBS="$save_LIBS"
6002                 fi
6003         fi
6004 fi
6005
6006 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6007         -o $ol_with_kerberos = kth ; then
6008
6009         for ac_hdr in krb.h des.h krb-archaeology.h 
6010 do
6011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6013 echo "configure:6014: checking for $ac_hdr" >&5
6014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6015   echo $ac_n "(cached) $ac_c" 1>&6
6016 else
6017   cat > conftest.$ac_ext <<EOF
6018 #line 6019 "configure"
6019 #include "confdefs.h"
6020 #include <$ac_hdr>
6021 EOF
6022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6023 { (eval echo configure:6024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6025 if test -z "$ac_err"; then
6026   rm -rf conftest*
6027   eval "ac_cv_header_$ac_safe=yes"
6028 else
6029   echo "$ac_err" >&5
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=no"
6034 fi
6035 rm -f conftest*
6036 fi
6037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6040   cat >> confdefs.h <<EOF
6041 #define $ac_tr_hdr 1
6042 EOF
6043  
6044 else
6045   echo "$ac_t""no" 1>&6
6046 fi
6047 done
6048
6049
6050         if test $ac_cv_header_krb_h = yes ; then
6051                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6052 echo "configure:6053: checking for main in -lkrb" >&5
6053 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   ac_save_LIBS="$LIBS"
6058 LIBS="-lkrb -ldes $LIBS"
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062
6063 int main() {
6064 main()
6065 ; return 0; }
6066 EOF
6067 if { (eval echo configure:6068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6068   rm -rf conftest*
6069   eval "ac_cv_lib_$ac_lib_var=yes"
6070 else
6071   echo "configure: failed program was:" >&5
6072   cat conftest.$ac_ext >&5
6073   rm -rf conftest*
6074   eval "ac_cv_lib_$ac_lib_var=no"
6075 fi
6076 rm -f conftest*
6077 LIBS="$ac_save_LIBS"
6078
6079 fi
6080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082   have_k4=yes
6083 else
6084   echo "$ac_t""no" 1>&6
6085 have_k4=no
6086 fi
6087
6088
6089                 if test $have_k4 = yes ; then
6090                         ol_with_kerberos=found
6091                         ol_link_kerberos=yes
6092
6093                         KRB_LIBS="-lkrb -ldes"
6094
6095                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6096                                 cat >> confdefs.h <<\EOF
6097 #define HAVE_KTH_KERBEROS 1
6098 EOF
6099
6100                         fi
6101                 fi
6102         fi
6103 fi
6104
6105 if test $ol_link_kerberos = yes ; then
6106         cat >> confdefs.h <<\EOF
6107 #define HAVE_KERBEROS 1
6108 EOF
6109
6110
6111 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6112         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6113 fi
6114
6115 ol_link_tls=no
6116 if test $ol_with_tls != no ; then
6117         
6118         for ac_hdr in openssl/ssl.h ssl.h
6119 do
6120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6121 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6122 echo "configure:6123: checking for $ac_hdr" >&5
6123 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6124   echo $ac_n "(cached) $ac_c" 1>&6
6125 else
6126   cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 #include <$ac_hdr>
6130 EOF
6131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6132 { (eval echo configure:6133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6134 if test -z "$ac_err"; then
6135   rm -rf conftest*
6136   eval "ac_cv_header_$ac_safe=yes"
6137 else
6138   echo "$ac_err" >&5
6139   echo "configure: failed program was:" >&5
6140   cat conftest.$ac_ext >&5
6141   rm -rf conftest*
6142   eval "ac_cv_header_$ac_safe=no"
6143 fi
6144 rm -f conftest*
6145 fi
6146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6147   echo "$ac_t""yes" 1>&6
6148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6149   cat >> confdefs.h <<EOF
6150 #define $ac_tr_hdr 1
6151 EOF
6152  
6153 else
6154   echo "$ac_t""no" 1>&6
6155 fi
6156 done
6157
6158         
6159         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6160                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6161 echo "configure:6162: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6162 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6164   echo $ac_n "(cached) $ac_c" 1>&6
6165 else
6166   ac_save_LIBS="$LIBS"
6167 LIBS="-lssl -lcrypto $LIBS"
6168 cat > conftest.$ac_ext <<EOF
6169 #line 6170 "configure"
6170 #include "confdefs.h"
6171 /* Override any gcc2 internal prototype to avoid an error.  */
6172 /* We use char because int might match the return type of a gcc2
6173     builtin and then its argument prototype would still apply.  */
6174 char SSLeay_add_ssl_algorithms();
6175
6176 int main() {
6177 SSLeay_add_ssl_algorithms()
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_lib_$ac_lib_var=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_lib_$ac_lib_var=no"
6188 fi
6189 rm -f conftest*
6190 LIBS="$ac_save_LIBS"
6191
6192 fi
6193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6194   echo "$ac_t""yes" 1>&6
6195   have_ssleay=yes
6196                         need_rsaref=no
6197 else
6198   echo "$ac_t""no" 1>&6
6199 have_ssleay=no
6200 fi
6201
6202                         
6203                 if test $have_ssleay = no ; then
6204                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6205 echo "configure:6206: checking for SSL_library_init in -lssl" >&5
6206 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210   ac_save_LIBS="$LIBS"
6211 LIBS="-lssl -lcrypto $LIBS"
6212 cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 /* We use char because int might match the return type of a gcc2
6217     builtin and then its argument prototype would still apply.  */
6218 char SSL_library_init();
6219
6220 int main() {
6221 SSL_library_init()
6222 ; return 0; }
6223 EOF
6224 if { (eval echo configure:6225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6225   rm -rf conftest*
6226   eval "ac_cv_lib_$ac_lib_var=yes"
6227 else
6228   echo "configure: failed program was:" >&5
6229   cat conftest.$ac_ext >&5
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=no"
6232 fi
6233 rm -f conftest*
6234 LIBS="$ac_save_LIBS"
6235
6236 fi
6237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6238   echo "$ac_t""yes" 1>&6
6239   have_ssleay=yes
6240                                 need_rsaref=no
6241 else
6242   echo "$ac_t""no" 1>&6
6243 have_ssleay=no
6244 fi
6245
6246                 fi
6247
6248                 if test $have_ssleay = no ; then
6249                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6250 echo "configure:6251: checking for ssl3_accept in -lssl" >&5
6251 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6253   echo $ac_n "(cached) $ac_c" 1>&6
6254 else
6255   ac_save_LIBS="$LIBS"
6256 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6257 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 /* Override any gcc2 internal prototype to avoid an error.  */
6261 /* We use char because int might match the return type of a gcc2
6262     builtin and then its argument prototype would still apply.  */
6263 char ssl3_accept();
6264
6265 int main() {
6266 ssl3_accept()
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_lib_$ac_lib_var=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=no"
6277 fi
6278 rm -f conftest*
6279 LIBS="$ac_save_LIBS"
6280
6281 fi
6282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6283   echo "$ac_t""yes" 1>&6
6284   have_ssleay=yes
6285                                 need_rsaref=yes
6286 else
6287   echo "$ac_t""no" 1>&6
6288 have_ssleay=no
6289 fi
6290
6291                 fi
6292
6293                 if test $have_ssleay = yes ; then
6294                         ol_with_tls=found
6295                         ol_link_tls=yes
6296
6297                         cat >> confdefs.h <<\EOF
6298 #define HAVE_SSLEAY 1
6299 EOF
6300
6301
6302                         if test $need_rsaref = yes; then
6303                                 cat >> confdefs.h <<\EOF
6304 #define HAVE_RSAREF 1
6305 EOF
6306
6307
6308                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6309                         else
6310                                 TLS_LIBS="-lssl -lcrypto"
6311                         fi
6312                 fi
6313         fi
6314 fi
6315
6316 if test $ol_link_tls = yes ; then
6317         cat >> confdefs.h <<\EOF
6318 #define HAVE_TLS 1
6319 EOF
6320
6321 fi      
6322
6323 for ac_func in \
6324         ctime_r                 \
6325         gethostbyname_r gethostbyaddr_r \
6326
6327 do
6328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6329 echo "configure:6330: checking for $ac_func" >&5
6330 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6331   echo $ac_n "(cached) $ac_c" 1>&6
6332 else
6333   cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6336 /* System header to define __stub macros and hopefully few prototypes,
6337     which can conflict with char $ac_func(); below.  */
6338 #include <assert.h>
6339 /* Override any gcc2 internal prototype to avoid an error.  */
6340 /* We use char because int might match the return type of a gcc2
6341     builtin and then its argument prototype would still apply.  */
6342 char $ac_func();
6343 char (*f)();
6344
6345 int main() {
6346
6347 /* The GNU C library defines this for functions which it implements
6348     to always fail with ENOSYS.  Some functions are actually named
6349     something starting with __ and the normal name is an alias.  */
6350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6351 choke me
6352 #else
6353 f = $ac_func;
6354 #endif
6355
6356 ; return 0; }
6357 EOF
6358 if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6359   rm -rf conftest*
6360   eval "ac_cv_func_$ac_func=yes"
6361 else
6362   echo "configure: failed program was:" >&5
6363   cat conftest.$ac_ext >&5
6364   rm -rf conftest*
6365   eval "ac_cv_func_$ac_func=no"
6366 fi
6367 rm -f conftest*
6368 fi
6369
6370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6371   echo "$ac_t""yes" 1>&6
6372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6373   cat >> confdefs.h <<EOF
6374 #define $ac_tr_func 1
6375 EOF
6376  
6377 else
6378   echo "$ac_t""no" 1>&6
6379 fi
6380 done
6381
6382
6383 if test "$ac_cv_func_ctime_r" = no ; then
6384         ol_cv_func_ctime_r_nargs=0
6385 else
6386         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6387 echo "configure:6388: checking number of arguments of ctime_r" >&5
6388 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6389   echo $ac_n "(cached) $ac_c" 1>&6
6390 else
6391   cat > conftest.$ac_ext <<EOF
6392 #line 6393 "configure"
6393 #include "confdefs.h"
6394 #include <time.h>
6395 int main() {
6396 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6397 ; return 0; }
6398 EOF
6399 if { (eval echo configure:6400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6400   rm -rf conftest*
6401   ol_cv_func_ctime_r_nargs3=yes
6402 else
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   ol_cv_func_ctime_r_nargs3=no
6407 fi
6408 rm -f conftest*
6409
6410         cat > conftest.$ac_ext <<EOF
6411 #line 6412 "configure"
6412 #include "confdefs.h"
6413 #include <time.h>
6414 int main() {
6415 time_t ti; char *buffer; ctime_r(&ti,buffer);
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6419   rm -rf conftest*
6420   ol_cv_func_ctime_r_nargs2=yes
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   ol_cv_func_ctime_r_nargs2=no
6426 fi
6427 rm -f conftest*
6428
6429         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6430                 $ol_cv_func_ctime_r_nargs2 = no ; then
6431
6432                 ol_cv_func_ctime_r_nargs=3
6433
6434         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6435                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6436
6437                 ol_cv_func_ctime_r_nargs=2
6438
6439         else
6440                 ol_cv_func_ctime_r_nargs=0
6441         fi
6442   
6443 fi
6444
6445 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6446
6447   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6448         cat >> confdefs.h <<EOF
6449 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6450 EOF
6451
6452   fi
6453
6454 fi
6455
6456 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6457         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6458 echo "configure:6459: checking number of arguments of gethostbyname_r" >&5
6459 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6460   echo $ac_n "(cached) $ac_c" 1>&6
6461 else
6462   cat > conftest.$ac_ext <<EOF
6463 #line 6464 "configure"
6464 #include "confdefs.h"
6465 #include <sys/types.h>
6466 #include <sys/socket.h>
6467 #include <netinet/in.h>
6468 #include <netdb.h>
6469 #define BUFSIZE (sizeof(struct hostent)+10)
6470 int main() {
6471 struct hostent hent; char buffer[BUFSIZE];
6472                 int bufsize=BUFSIZE;int h_errno;
6473                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6474                         buffer, bufsize, &h_errno);
6475 ; return 0; }
6476 EOF
6477 if { (eval echo configure:6478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6478   rm -rf conftest*
6479   ol_cv_func_gethostbyname_r_nargs5=yes
6480 else
6481   echo "configure: failed program was:" >&5
6482   cat conftest.$ac_ext >&5
6483   rm -rf conftest*
6484   ol_cv_func_gethostbyname_r_nargs5=no
6485 fi
6486 rm -f conftest*
6487
6488         cat > conftest.$ac_ext <<EOF
6489 #line 6490 "configure"
6490 #include "confdefs.h"
6491 #include <sys/types.h>
6492 #include <sys/socket.h>
6493 #include <netinet/in.h>
6494 #include <netdb.h>
6495 #define BUFSIZE (sizeof(struct hostent)+10)
6496 int main() {
6497 struct hostent hent;struct hostent *rhent;
6498                 char buffer[BUFSIZE];
6499                 int bufsize=BUFSIZE;int h_errno;
6500                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6501                         &rhent, &h_errno);
6502 ; return 0; }
6503 EOF
6504 if { (eval echo configure:6505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6505   rm -rf conftest*
6506   ol_cv_func_gethostbyname_r_nargs6=yes
6507 else
6508   echo "configure: failed program was:" >&5
6509   cat conftest.$ac_ext >&5
6510   rm -rf conftest*
6511   ol_cv_func_gethostbyname_r_nargs6=no
6512 fi
6513 rm -f conftest*
6514
6515         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6516                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6517
6518                 ol_cv_func_gethostbyname_r_nargs=5
6519
6520         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6521                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6522
6523                 ol_cv_func_gethostbyname_r_nargs=6
6524
6525         else
6526                 ol_cv_func_gethostbyname_r_nargs=0
6527         fi
6528   
6529 fi
6530
6531 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6532   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6533         cat >> confdefs.h <<EOF
6534 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6535 EOF
6536
6537   fi
6538
6539 else
6540         ol_cv_func_gethostbyname_r_nargs=0
6541 fi
6542  
6543 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6544         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6545 echo "configure:6546: checking number of arguments of gethostbyaddr_r" >&5
6546 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6547   echo $ac_n "(cached) $ac_c" 1>&6
6548 else
6549   cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 #include <sys/types.h>
6553 #include <sys/socket.h>
6554 #include <netinet/in.h>
6555 #include <netdb.h>
6556 #define BUFSIZE (sizeof(struct hostent)+10)
6557 int main() {
6558 struct hostent hent; char buffer[BUFSIZE]; 
6559             struct in_addr add;
6560             size_t alen=sizeof(struct in_addr);
6561             int bufsize=BUFSIZE;int h_errno;
6562                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6563                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6567   rm -rf conftest*
6568   ol_cv_func_gethostbyaddr_r_nargs7=yes
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   ol_cv_func_gethostbyaddr_r_nargs7=no
6574 fi
6575 rm -f conftest*
6576
6577         cat > conftest.$ac_ext <<EOF
6578 #line 6579 "configure"
6579 #include "confdefs.h"
6580 #include <sys/types.h>
6581 #include <sys/socket.h>
6582 #include <netinet/in.h>
6583 #include <netdb.h>
6584 #define BUFSIZE (sizeof(struct hostent)+10)
6585 int main() {
6586 struct hostent hent;
6587                 struct hostent *rhent; char buffer[BUFSIZE]; 
6588                 struct in_addr add;
6589                 size_t alen=sizeof(struct in_addr);
6590                 int bufsize=BUFSIZE;int h_errno;
6591                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6592                         alen, AF_INET, &hent, buffer, bufsize, 
6593                         &rhent, &h_errno);
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6597   rm -rf conftest*
6598   ol_cv_func_gethostbyaddr_r_nargs8=yes
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   ol_cv_func_gethostbyaddr_r_nargs8=no
6604 fi
6605 rm -f conftest*
6606
6607         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6608                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6609
6610                 ol_cv_func_gethostbyaddr_r_nargs=7
6611
6612         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6613                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6614
6615                 ol_cv_func_gethostbyaddr_r_nargs=8
6616
6617         else
6618                 ol_cv_func_gethostbyaddr_r_nargs=0
6619         fi
6620   
6621 fi
6622
6623 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6624   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6625     cat >> confdefs.h <<EOF
6626 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6627 EOF
6628
6629   fi
6630
6631 else
6632         ol_cv_func_gethostbyaddr_r_nargs=0
6633 fi
6634
6635 if test "$ac_cv_func_ctime_r" = yes \
6636         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6637         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6638         -a "$ac_cv_func_gethostbyname_r" = yes \
6639         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6640         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6641         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6642         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6643         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6644         ; then
6645  
6646         cat >> confdefs.h <<\EOF
6647 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6648 EOF
6649
6650 fi
6651
6652 ol_link_threads=no
6653
6654 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6655         -o $ol_with_threads = nt ; then
6656
6657         
6658         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6659 echo "configure:6660: checking for NT Threads" >&5
6660 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6661   echo $ac_n "(cached) $ac_c" 1>&6
6662 else
6663   
6664                 # bogus test
6665                 if test $ac_cv_mingw32 = yes ; then
6666                         ol_cv_nt_threads=yes
6667                 else
6668                         ol_cv_nt_threads=no
6669                 fi
6670         
6671 fi
6672
6673 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6674
6675         if test $ol_cv_nt_threads = yes ; then
6676                 cat >> confdefs.h <<\EOF
6677 #define HAVE_NT_THREADS 1
6678 EOF
6679
6680         fi
6681
6682
6683         if test "$ol_cv_nt_threads" = yes ; then
6684         ol_link_threads=nt
6685         ol_with_threads=found
6686         ol_with_yielding_select=yes
6687
6688                 cat >> confdefs.h <<\EOF
6689 #define HAVE_NT_SERVICE_MANAGER 1
6690 EOF
6691
6692                 cat >> confdefs.h <<\EOF
6693 #define HAVE_NT_EVENT_LOG 1
6694 EOF
6695
6696         fi
6697
6698         if test $ol_with_threads = nt ; then
6699                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6700         fi
6701 fi
6702
6703 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6704         -o $ol_with_threads = posix ; then
6705
6706         for ac_hdr in pthread.h
6707 do
6708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6710 echo "configure:6711: checking for $ac_hdr" >&5
6711 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6712   echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714   cat > conftest.$ac_ext <<EOF
6715 #line 6716 "configure"
6716 #include "confdefs.h"
6717 #include <$ac_hdr>
6718 EOF
6719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6720 { (eval echo configure:6721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6722 if test -z "$ac_err"; then
6723   rm -rf conftest*
6724   eval "ac_cv_header_$ac_safe=yes"
6725 else
6726   echo "$ac_err" >&5
6727   echo "configure: failed program was:" >&5
6728   cat conftest.$ac_ext >&5
6729   rm -rf conftest*
6730   eval "ac_cv_header_$ac_safe=no"
6731 fi
6732 rm -f conftest*
6733 fi
6734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6735   echo "$ac_t""yes" 1>&6
6736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6737   cat >> confdefs.h <<EOF
6738 #define $ac_tr_hdr 1
6739 EOF
6740  
6741 else
6742   echo "$ac_t""no" 1>&6
6743 fi
6744 done
6745
6746
6747         if test $ac_cv_header_pthread_h = yes ; then
6748                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6749 echo "configure:6750: checking POSIX thread version" >&5
6750 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6751   echo $ac_n "(cached) $ac_c" 1>&6
6752 else
6753   
6754         cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757
6758 #               include <pthread.h>
6759                 /* this check could be improved */
6760 #               ifdef PTHREAD_ONCE_INIT
6761                         pthread_version_final;
6762 #               endif
6763         
6764 EOF
6765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6766   egrep "pthread_version_final" >/dev/null 2>&1; then
6767   rm -rf conftest*
6768   ol_pthread_final=yes
6769 else
6770   rm -rf conftest*
6771   ol_pthread_final=no
6772 fi
6773 rm -f conftest*
6774
6775
6776         cat > conftest.$ac_ext <<EOF
6777 #line 6778 "configure"
6778 #include "confdefs.h"
6779
6780 #               include <pthread.h>
6781                 /* this check could be improved */
6782 #               ifdef pthread_once_init
6783                         pthread_version_draft4;
6784 #               endif
6785         
6786 EOF
6787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6788   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6789   rm -rf conftest*
6790   ol_pthread_draft4=yes
6791 else
6792   rm -rf conftest*
6793   ol_pthread_draft4=no
6794 fi
6795 rm -f conftest*
6796
6797
6798         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6799                 ol_cv_pthread_version=final
6800         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6801                 ol_cv_pthread_version=draft4
6802         else
6803                 ol_cv_pthread_version=unknown
6804         fi
6805
6806 fi
6807
6808 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6809
6810
6811                 if test $ol_cv_pthread_version = final ; then
6812                         cat >> confdefs.h <<\EOF
6813 #define HAVE_PTHREADS_FINAL 1
6814 EOF
6815
6816                 elif test $ol_cv_pthread_version = draft4 ; then
6817                         cat >> confdefs.h <<\EOF
6818 #define HAVE_PTHREADS_D4 1
6819 EOF
6820
6821                 else
6822                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6823                 fi
6824
6825                 # consider threads found
6826                 ol_with_threads=found
6827
6828                 
6829         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6830 echo "configure:6831: checking for LinuxThreads pthread.h" >&5
6831 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   cat > conftest.$ac_ext <<EOF
6835 #line 6836 "configure"
6836 #include "confdefs.h"
6837 #include <pthread.h>
6838 EOF
6839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6840   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6841   rm -rf conftest*
6842   ol_cv_header_linux_threads=yes
6843 else
6844   rm -rf conftest*
6845   ol_cv_header_linux_threads=no
6846 fi
6847 rm -f conftest*
6848
6849                 
6850 fi
6851
6852 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6853         if test $ol_cv_header_linux_threads = yes; then
6854                 cat >> confdefs.h <<\EOF
6855 #define HAVE_LINUX_THREADS 1
6856 EOF
6857
6858         fi
6859
6860                 
6861         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6862 echo "configure:6863: checking for GNU Pth pthread.h" >&5
6863 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6864   echo $ac_n "(cached) $ac_c" 1>&6
6865 else
6866   cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 #include <pthread.h>
6870 #ifdef _POSIX_THREAD_IS_GNU_PTH
6871         __gnu_pth__;
6872 #endif
6873
6874 EOF
6875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6876   egrep "__gnu_pth__" >/dev/null 2>&1; then
6877   rm -rf conftest*
6878   ol_cv_header_gnu_pth_pthread_h=yes
6879 else
6880   rm -rf conftest*
6881   ol_cv_header_gnu_pth_pthread_h=no
6882 fi
6883 rm -f conftest*
6884
6885                 
6886 fi
6887
6888 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6889
6890
6891                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6892                         for ac_hdr in sched.h
6893 do
6894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6896 echo "configure:6897: checking for $ac_hdr" >&5
6897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6898   echo $ac_n "(cached) $ac_c" 1>&6
6899 else
6900   cat > conftest.$ac_ext <<EOF
6901 #line 6902 "configure"
6902 #include "confdefs.h"
6903 #include <$ac_hdr>
6904 EOF
6905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6906 { (eval echo configure:6907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6908 if test -z "$ac_err"; then
6909   rm -rf conftest*
6910   eval "ac_cv_header_$ac_safe=yes"
6911 else
6912   echo "$ac_err" >&5
6913   echo "configure: failed program was:" >&5
6914   cat conftest.$ac_ext >&5
6915   rm -rf conftest*
6916   eval "ac_cv_header_$ac_safe=no"
6917 fi
6918 rm -f conftest*
6919 fi
6920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6921   echo "$ac_t""yes" 1>&6
6922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6923   cat >> confdefs.h <<EOF
6924 #define $ac_tr_hdr 1
6925 EOF
6926  
6927 else
6928   echo "$ac_t""no" 1>&6
6929 fi
6930 done
6931
6932                 fi
6933
6934                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6935                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6936 echo "configure:6937: checking for pthread_create in default libraries" >&5
6937 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6938   echo $ac_n "(cached) $ac_c" 1>&6
6939 else
6940   
6941                 if test "$cross_compiling" = yes; then
6942   cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6945 /* pthread test headers */
6946 #include <pthread.h>
6947 #ifndef NULL
6948 #define NULL (void*)0
6949 #endif
6950
6951 static void *task(p)
6952         void *p;
6953 {
6954         return (void *) (p == NULL);
6955 }
6956
6957 int main() {
6958
6959         /* pthread test function */
6960         pthread_t t;
6961         int status;
6962
6963         /* make sure pthread_create() isn't just a stub */
6964 #if HAVE_PTHREADS_D4
6965         status = pthread_create(&t, pthread_attr_default, task, NULL);
6966 #else
6967         status = pthread_create(&t, NULL, task, NULL);
6968 #endif
6969
6970         if( status ) exit( status );
6971
6972         /* make sure pthread_detach() isn't just a stub */
6973 #if HAVE_PTHREADS_D4
6974         status = pthread_detach( &t );
6975 #else
6976         status = pthread_detach( t );
6977 #endif
6978
6979 #ifdef HAVE_LINUX_THREADS
6980         pthread_kill_other_threads_np();
6981 #endif
6982
6983         exit( status );
6984
6985 ; return 0; }
6986 EOF
6987 if { (eval echo configure:6988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6988   rm -rf conftest*
6989   ol_cv_pthread_create=yes
6990 else
6991   echo "configure: failed program was:" >&5
6992   cat conftest.$ac_ext >&5
6993   rm -rf conftest*
6994   ol_cv_pthread_create=no
6995 fi
6996 rm -f conftest*
6997 else
6998   cat > conftest.$ac_ext <<EOF
6999 #line 7000 "configure"
7000 #include "confdefs.h"
7001 /* pthread test headers */
7002 #include <pthread.h>
7003 #ifndef NULL
7004 #define NULL (void*)0
7005 #endif
7006
7007 static void *task(p)
7008         void *p;
7009 {
7010         return (void *) (p == NULL);
7011 }
7012
7013
7014 int main(argc, argv)
7015         int argc;
7016         char **argv;
7017 {
7018
7019         /* pthread test function */
7020         pthread_t t;
7021         int status;
7022
7023         /* make sure pthread_create() isn't just a stub */
7024 #if HAVE_PTHREADS_D4
7025         status = pthread_create(&t, pthread_attr_default, task, NULL);
7026 #else
7027         status = pthread_create(&t, NULL, task, NULL);
7028 #endif
7029
7030         if( status ) exit( status );
7031
7032         /* make sure pthread_detach() isn't just a stub */
7033 #if HAVE_PTHREADS_D4
7034         status = pthread_detach( &t );
7035 #else
7036         status = pthread_detach( t );
7037 #endif
7038
7039 #ifdef HAVE_LINUX_THREADS
7040         pthread_kill_other_threads_np();
7041 #endif
7042
7043         exit( status );
7044
7045 }
7046
7047 EOF
7048 if { (eval echo configure:7049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7049 then
7050   ol_cv_pthread_create=yes
7051 else
7052   echo "configure: failed program was:" >&5
7053   cat conftest.$ac_ext >&5
7054   rm -fr conftest*
7055   ol_cv_pthread_create=no
7056 fi
7057 rm -fr conftest*
7058 fi
7059
7060 fi
7061
7062 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7063
7064                 if test $ol_cv_pthread_create != no ; then
7065                         ol_link_threads=posix
7066                         ol_link_pthreads=""
7067                 fi
7068                 
7069                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7070 if test "$ol_link_threads" = no ; then
7071         # try -kthread
7072         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7073 echo "configure:7074: checking for pthread link with -kthread" >&5
7074 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077   
7078                 # save the flags
7079                 ol_LIBS="$LIBS"
7080                 LIBS="-kthread $LIBS"
7081
7082                 if test "$cross_compiling" = yes; then
7083   cat > conftest.$ac_ext <<EOF
7084 #line 7085 "configure"
7085 #include "confdefs.h"
7086 /* pthread test headers */
7087 #include <pthread.h>
7088 #ifndef NULL
7089 #define NULL (void*)0
7090 #endif
7091
7092 static void *task(p)
7093         void *p;
7094 {
7095         return (void *) (p == NULL);
7096 }
7097
7098 int main() {
7099
7100         /* pthread test function */
7101         pthread_t t;
7102         int status;
7103
7104         /* make sure pthread_create() isn't just a stub */
7105 #if HAVE_PTHREADS_D4
7106         status = pthread_create(&t, pthread_attr_default, task, NULL);
7107 #else
7108         status = pthread_create(&t, NULL, task, NULL);
7109 #endif
7110
7111         if( status ) exit( status );
7112
7113         /* make sure pthread_detach() isn't just a stub */
7114 #if HAVE_PTHREADS_D4
7115         status = pthread_detach( &t );
7116 #else
7117         status = pthread_detach( t );
7118 #endif
7119
7120 #ifdef HAVE_LINUX_THREADS
7121         pthread_kill_other_threads_np();
7122 #endif
7123
7124         exit( status );
7125
7126 ; return 0; }
7127 EOF
7128 if { (eval echo configure:7129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7129   rm -rf conftest*
7130   ol_cv_pthread_kthread=yes
7131 else
7132   echo "configure: failed program was:" >&5
7133   cat conftest.$ac_ext >&5
7134   rm -rf conftest*
7135   ol_cv_pthread_kthread=no
7136 fi
7137 rm -f conftest*
7138 else
7139   cat > conftest.$ac_ext <<EOF
7140 #line 7141 "configure"
7141 #include "confdefs.h"
7142 /* pthread test headers */
7143 #include <pthread.h>
7144 #ifndef NULL
7145 #define NULL (void*)0
7146 #endif
7147
7148 static void *task(p)
7149         void *p;
7150 {
7151         return (void *) (p == NULL);
7152 }
7153
7154
7155 int main(argc, argv)
7156         int argc;
7157         char **argv;
7158 {
7159
7160         /* pthread test function */
7161         pthread_t t;
7162         int status;
7163
7164         /* make sure pthread_create() isn't just a stub */
7165 #if HAVE_PTHREADS_D4
7166         status = pthread_create(&t, pthread_attr_default, task, NULL);
7167 #else
7168         status = pthread_create(&t, NULL, task, NULL);
7169 #endif
7170
7171         if( status ) exit( status );
7172
7173         /* make sure pthread_detach() isn't just a stub */
7174 #if HAVE_PTHREADS_D4
7175         status = pthread_detach( &t );
7176 #else
7177         status = pthread_detach( t );
7178 #endif
7179
7180 #ifdef HAVE_LINUX_THREADS
7181         pthread_kill_other_threads_np();
7182 #endif
7183
7184         exit( status );
7185
7186 }
7187
7188 EOF
7189 if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7190 then
7191   ol_cv_pthread_kthread=yes
7192 else
7193   echo "configure: failed program was:" >&5
7194   cat conftest.$ac_ext >&5
7195   rm -fr conftest*
7196   ol_cv_pthread_kthread=no
7197 fi
7198 rm -fr conftest*
7199 fi
7200
7201
7202                 # restore the LIBS
7203                 LIBS="$ol_LIBS"
7204         
7205 fi
7206
7207 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7208
7209         if test $ol_cv_pthread_kthread = yes ; then
7210                 ol_link_pthreads="-kthread"
7211                 ol_link_threads=posix
7212         fi
7213 fi
7214
7215                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7216 if test "$ol_link_threads" = no ; then
7217         # try -pthread
7218         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7219 echo "configure:7220: checking for pthread link with -pthread" >&5
7220 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7221   echo $ac_n "(cached) $ac_c" 1>&6
7222 else
7223   
7224                 # save the flags
7225                 ol_LIBS="$LIBS"
7226                 LIBS="-pthread $LIBS"
7227
7228                 if test "$cross_compiling" = yes; then
7229   cat > conftest.$ac_ext <<EOF
7230 #line 7231 "configure"
7231 #include "confdefs.h"
7232 /* pthread test headers */
7233 #include <pthread.h>
7234 #ifndef NULL
7235 #define NULL (void*)0
7236 #endif
7237
7238 static void *task(p)
7239         void *p;
7240 {
7241         return (void *) (p == NULL);
7242 }
7243
7244 int main() {
7245
7246         /* pthread test function */
7247         pthread_t t;
7248         int status;
7249
7250         /* make sure pthread_create() isn't just a stub */
7251 #if HAVE_PTHREADS_D4
7252         status = pthread_create(&t, pthread_attr_default, task, NULL);
7253 #else
7254         status = pthread_create(&t, NULL, task, NULL);
7255 #endif
7256
7257         if( status ) exit( status );
7258
7259         /* make sure pthread_detach() isn't just a stub */
7260 #if HAVE_PTHREADS_D4
7261         status = pthread_detach( &t );
7262 #else
7263         status = pthread_detach( t );
7264 #endif
7265
7266 #ifdef HAVE_LINUX_THREADS
7267         pthread_kill_other_threads_np();
7268 #endif
7269
7270         exit( status );
7271
7272 ; return 0; }
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7275   rm -rf conftest*
7276   ol_cv_pthread_pthread=yes
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   ol_cv_pthread_pthread=no
7282 fi
7283 rm -f conftest*
7284 else
7285   cat > conftest.$ac_ext <<EOF
7286 #line 7287 "configure"
7287 #include "confdefs.h"
7288 /* pthread test headers */
7289 #include <pthread.h>
7290 #ifndef NULL
7291 #define NULL (void*)0
7292 #endif
7293
7294 static void *task(p)
7295         void *p;
7296 {
7297         return (void *) (p == NULL);
7298 }
7299
7300
7301 int main(argc, argv)
7302         int argc;
7303         char **argv;
7304 {
7305
7306         /* pthread test function */
7307         pthread_t t;
7308         int status;
7309
7310         /* make sure pthread_create() isn't just a stub */
7311 #if HAVE_PTHREADS_D4
7312         status = pthread_create(&t, pthread_attr_default, task, NULL);
7313 #else
7314         status = pthread_create(&t, NULL, task, NULL);
7315 #endif
7316
7317         if( status ) exit( status );
7318
7319         /* make sure pthread_detach() isn't just a stub */
7320 #if HAVE_PTHREADS_D4
7321         status = pthread_detach( &t );
7322 #else
7323         status = pthread_detach( t );
7324 #endif
7325
7326 #ifdef HAVE_LINUX_THREADS
7327         pthread_kill_other_threads_np();
7328 #endif
7329
7330         exit( status );
7331
7332 }
7333
7334 EOF
7335 if { (eval echo configure:7336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7336 then
7337   ol_cv_pthread_pthread=yes
7338 else
7339   echo "configure: failed program was:" >&5
7340   cat conftest.$ac_ext >&5
7341   rm -fr conftest*
7342   ol_cv_pthread_pthread=no
7343 fi
7344 rm -fr conftest*
7345 fi
7346
7347
7348                 # restore the LIBS
7349                 LIBS="$ol_LIBS"
7350         
7351 fi
7352
7353 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7354
7355         if test $ol_cv_pthread_pthread = yes ; then
7356                 ol_link_pthreads="-pthread"
7357                 ol_link_threads=posix
7358         fi
7359 fi
7360
7361                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7362 if test "$ol_link_threads" = no ; then
7363         # try -pthreads
7364         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7365 echo "configure:7366: checking for pthread link with -pthreads" >&5
7366 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7367   echo $ac_n "(cached) $ac_c" 1>&6
7368 else
7369   
7370                 # save the flags
7371                 ol_LIBS="$LIBS"
7372                 LIBS="-pthreads $LIBS"
7373
7374                 if test "$cross_compiling" = yes; then
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 int main() {
7391
7392         /* pthread test function */
7393         pthread_t t;
7394         int status;
7395
7396         /* make sure pthread_create() isn't just a stub */
7397 #if HAVE_PTHREADS_D4
7398         status = pthread_create(&t, pthread_attr_default, task, NULL);
7399 #else
7400         status = pthread_create(&t, NULL, task, NULL);
7401 #endif
7402
7403         if( status ) exit( status );
7404
7405         /* make sure pthread_detach() isn't just a stub */
7406 #if HAVE_PTHREADS_D4
7407         status = pthread_detach( &t );
7408 #else
7409         status = pthread_detach( t );
7410 #endif
7411
7412 #ifdef HAVE_LINUX_THREADS
7413         pthread_kill_other_threads_np();
7414 #endif
7415
7416         exit( status );
7417
7418 ; return 0; }
7419 EOF
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7421   rm -rf conftest*
7422   ol_cv_pthread_pthreads=yes
7423 else
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   ol_cv_pthread_pthreads=no
7428 fi
7429 rm -f conftest*
7430 else
7431   cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 /* pthread test headers */
7435 #include <pthread.h>
7436 #ifndef NULL
7437 #define NULL (void*)0
7438 #endif
7439
7440 static void *task(p)
7441         void *p;
7442 {
7443         return (void *) (p == NULL);
7444 }
7445
7446
7447 int main(argc, argv)
7448         int argc;
7449         char **argv;
7450 {
7451
7452         /* pthread test function */
7453         pthread_t t;
7454         int status;
7455
7456         /* make sure pthread_create() isn't just a stub */
7457 #if HAVE_PTHREADS_D4
7458         status = pthread_create(&t, pthread_attr_default, task, NULL);
7459 #else
7460         status = pthread_create(&t, NULL, task, NULL);
7461 #endif
7462
7463         if( status ) exit( status );
7464
7465         /* make sure pthread_detach() isn't just a stub */
7466 #if HAVE_PTHREADS_D4
7467         status = pthread_detach( &t );
7468 #else
7469         status = pthread_detach( t );
7470 #endif
7471
7472 #ifdef HAVE_LINUX_THREADS
7473         pthread_kill_other_threads_np();
7474 #endif
7475
7476         exit( status );
7477
7478 }
7479
7480 EOF
7481 if { (eval echo configure:7482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7482 then
7483   ol_cv_pthread_pthreads=yes
7484 else
7485   echo "configure: failed program was:" >&5
7486   cat conftest.$ac_ext >&5
7487   rm -fr conftest*
7488   ol_cv_pthread_pthreads=no
7489 fi
7490 rm -fr conftest*
7491 fi
7492
7493
7494                 # restore the LIBS
7495                 LIBS="$ol_LIBS"
7496         
7497 fi
7498
7499 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7500
7501         if test $ol_cv_pthread_pthreads = yes ; then
7502                 ol_link_pthreads="-pthreads"
7503                 ol_link_threads=posix
7504         fi
7505 fi
7506
7507                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7508 if test "$ol_link_threads" = no ; then
7509         # try -mthreads
7510         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7511 echo "configure:7512: checking for pthread link with -mthreads" >&5
7512 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7513   echo $ac_n "(cached) $ac_c" 1>&6
7514 else
7515   
7516                 # save the flags
7517                 ol_LIBS="$LIBS"
7518                 LIBS="-mthreads $LIBS"
7519
7520                 if test "$cross_compiling" = yes; then
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 int main() {
7537
7538         /* pthread test function */
7539         pthread_t t;
7540         int status;
7541
7542         /* make sure pthread_create() isn't just a stub */
7543 #if HAVE_PTHREADS_D4
7544         status = pthread_create(&t, pthread_attr_default, task, NULL);
7545 #else
7546         status = pthread_create(&t, NULL, task, NULL);
7547 #endif
7548
7549         if( status ) exit( status );
7550
7551         /* make sure pthread_detach() isn't just a stub */
7552 #if HAVE_PTHREADS_D4
7553         status = pthread_detach( &t );
7554 #else
7555         status = pthread_detach( t );
7556 #endif
7557
7558 #ifdef HAVE_LINUX_THREADS
7559         pthread_kill_other_threads_np();
7560 #endif
7561
7562         exit( status );
7563
7564 ; return 0; }
7565 EOF
7566 if { (eval echo configure:7567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7567   rm -rf conftest*
7568   ol_cv_pthread_mthreads=yes
7569 else
7570   echo "configure: failed program was:" >&5
7571   cat conftest.$ac_ext >&5
7572   rm -rf conftest*
7573   ol_cv_pthread_mthreads=no
7574 fi
7575 rm -f conftest*
7576 else
7577   cat > conftest.$ac_ext <<EOF
7578 #line 7579 "configure"
7579 #include "confdefs.h"
7580 /* pthread test headers */
7581 #include <pthread.h>
7582 #ifndef NULL
7583 #define NULL (void*)0
7584 #endif
7585
7586 static void *task(p)
7587         void *p;
7588 {
7589         return (void *) (p == NULL);
7590 }
7591
7592
7593 int main(argc, argv)
7594         int argc;
7595         char **argv;
7596 {
7597
7598         /* pthread test function */
7599         pthread_t t;
7600         int status;
7601
7602         /* make sure pthread_create() isn't just a stub */
7603 #if HAVE_PTHREADS_D4
7604         status = pthread_create(&t, pthread_attr_default, task, NULL);
7605 #else
7606         status = pthread_create(&t, NULL, task, NULL);
7607 #endif
7608
7609         if( status ) exit( status );
7610
7611         /* make sure pthread_detach() isn't just a stub */
7612 #if HAVE_PTHREADS_D4
7613         status = pthread_detach( &t );
7614 #else
7615         status = pthread_detach( t );
7616 #endif
7617
7618 #ifdef HAVE_LINUX_THREADS
7619         pthread_kill_other_threads_np();
7620 #endif
7621
7622         exit( status );
7623
7624 }
7625
7626 EOF
7627 if { (eval echo configure:7628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7628 then
7629   ol_cv_pthread_mthreads=yes
7630 else
7631   echo "configure: failed program was:" >&5
7632   cat conftest.$ac_ext >&5
7633   rm -fr conftest*
7634   ol_cv_pthread_mthreads=no
7635 fi
7636 rm -fr conftest*
7637 fi
7638
7639
7640                 # restore the LIBS
7641                 LIBS="$ol_LIBS"
7642         
7643 fi
7644
7645 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7646
7647         if test $ol_cv_pthread_mthreads = yes ; then
7648                 ol_link_pthreads="-mthreads"
7649                 ol_link_threads=posix
7650         fi
7651 fi
7652
7653                 # Pthread try link: -thread (ol_cv_pthread_thread)
7654 if test "$ol_link_threads" = no ; then
7655         # try -thread
7656         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7657 echo "configure:7658: checking for pthread link with -thread" >&5
7658 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7659   echo $ac_n "(cached) $ac_c" 1>&6
7660 else
7661   
7662                 # save the flags
7663                 ol_LIBS="$LIBS"
7664                 LIBS="-thread $LIBS"
7665
7666                 if test "$cross_compiling" = yes; then
7667   cat > conftest.$ac_ext <<EOF
7668 #line 7669 "configure"
7669 #include "confdefs.h"
7670 /* pthread test headers */
7671 #include <pthread.h>
7672 #ifndef NULL
7673 #define NULL (void*)0
7674 #endif
7675
7676 static void *task(p)
7677         void *p;
7678 {
7679         return (void *) (p == NULL);
7680 }
7681
7682 int main() {
7683
7684         /* pthread test function */
7685         pthread_t t;
7686         int status;
7687
7688         /* make sure pthread_create() isn't just a stub */
7689 #if HAVE_PTHREADS_D4
7690         status = pthread_create(&t, pthread_attr_default, task, NULL);
7691 #else
7692         status = pthread_create(&t, NULL, task, NULL);
7693 #endif
7694
7695         if( status ) exit( status );
7696
7697         /* make sure pthread_detach() isn't just a stub */
7698 #if HAVE_PTHREADS_D4
7699         status = pthread_detach( &t );
7700 #else
7701         status = pthread_detach( t );
7702 #endif
7703
7704 #ifdef HAVE_LINUX_THREADS
7705         pthread_kill_other_threads_np();
7706 #endif
7707
7708         exit( status );
7709
7710 ; return 0; }
7711 EOF
7712 if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7713   rm -rf conftest*
7714   ol_cv_pthread_thread=yes
7715 else
7716   echo "configure: failed program was:" >&5
7717   cat conftest.$ac_ext >&5
7718   rm -rf conftest*
7719   ol_cv_pthread_thread=no
7720 fi
7721 rm -f conftest*
7722 else
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 /* pthread test headers */
7727 #include <pthread.h>
7728 #ifndef NULL
7729 #define NULL (void*)0
7730 #endif
7731
7732 static void *task(p)
7733         void *p;
7734 {
7735         return (void *) (p == NULL);
7736 }
7737
7738
7739 int main(argc, argv)
7740         int argc;
7741         char **argv;
7742 {
7743
7744         /* pthread test function */
7745         pthread_t t;
7746         int status;
7747
7748         /* make sure pthread_create() isn't just a stub */
7749 #if HAVE_PTHREADS_D4
7750         status = pthread_create(&t, pthread_attr_default, task, NULL);
7751 #else
7752         status = pthread_create(&t, NULL, task, NULL);
7753 #endif
7754
7755         if( status ) exit( status );
7756
7757         /* make sure pthread_detach() isn't just a stub */
7758 #if HAVE_PTHREADS_D4
7759         status = pthread_detach( &t );
7760 #else
7761         status = pthread_detach( t );
7762 #endif
7763
7764 #ifdef HAVE_LINUX_THREADS
7765         pthread_kill_other_threads_np();
7766 #endif
7767
7768         exit( status );
7769
7770 }
7771
7772 EOF
7773 if { (eval echo configure:7774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7774 then
7775   ol_cv_pthread_thread=yes
7776 else
7777   echo "configure: failed program was:" >&5
7778   cat conftest.$ac_ext >&5
7779   rm -fr conftest*
7780   ol_cv_pthread_thread=no
7781 fi
7782 rm -fr conftest*
7783 fi
7784
7785
7786                 # restore the LIBS
7787                 LIBS="$ol_LIBS"
7788         
7789 fi
7790
7791 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7792
7793         if test $ol_cv_pthread_thread = yes ; then
7794                 ol_link_pthreads="-thread"
7795                 ol_link_threads=posix
7796         fi
7797 fi
7798
7799
7800                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7801 if test "$ol_link_threads" = no ; then
7802         # try -lpthread -lmach -lexc -lc_r
7803         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7804 echo "configure:7805: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7805 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7806   echo $ac_n "(cached) $ac_c" 1>&6
7807 else
7808   
7809                 # save the flags
7810                 ol_LIBS="$LIBS"
7811                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7812
7813                 if test "$cross_compiling" = yes; then
7814   cat > conftest.$ac_ext <<EOF
7815 #line 7816 "configure"
7816 #include "confdefs.h"
7817 /* pthread test headers */
7818 #include <pthread.h>
7819 #ifndef NULL
7820 #define NULL (void*)0
7821 #endif
7822
7823 static void *task(p)
7824         void *p;
7825 {
7826         return (void *) (p == NULL);
7827 }
7828
7829 int main() {
7830
7831         /* pthread test function */
7832         pthread_t t;
7833         int status;
7834
7835         /* make sure pthread_create() isn't just a stub */
7836 #if HAVE_PTHREADS_D4
7837         status = pthread_create(&t, pthread_attr_default, task, NULL);
7838 #else
7839         status = pthread_create(&t, NULL, task, NULL);
7840 #endif
7841
7842         if( status ) exit( status );
7843
7844         /* make sure pthread_detach() isn't just a stub */
7845 #if HAVE_PTHREADS_D4
7846         status = pthread_detach( &t );
7847 #else
7848         status = pthread_detach( t );
7849 #endif
7850
7851 #ifdef HAVE_LINUX_THREADS
7852         pthread_kill_other_threads_np();
7853 #endif
7854
7855         exit( status );
7856
7857 ; return 0; }
7858 EOF
7859 if { (eval echo configure:7860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7860   rm -rf conftest*
7861   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7862 else
7863   echo "configure: failed program was:" >&5
7864   cat conftest.$ac_ext >&5
7865   rm -rf conftest*
7866   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7867 fi
7868 rm -f conftest*
7869 else
7870   cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 /* pthread test headers */
7874 #include <pthread.h>
7875 #ifndef NULL
7876 #define NULL (void*)0
7877 #endif
7878
7879 static void *task(p)
7880         void *p;
7881 {
7882         return (void *) (p == NULL);
7883 }
7884
7885
7886 int main(argc, argv)
7887         int argc;
7888         char **argv;
7889 {
7890
7891         /* pthread test function */
7892         pthread_t t;
7893         int status;
7894
7895         /* make sure pthread_create() isn't just a stub */
7896 #if HAVE_PTHREADS_D4
7897         status = pthread_create(&t, pthread_attr_default, task, NULL);
7898 #else
7899         status = pthread_create(&t, NULL, task, NULL);
7900 #endif
7901
7902         if( status ) exit( status );
7903
7904         /* make sure pthread_detach() isn't just a stub */
7905 #if HAVE_PTHREADS_D4
7906         status = pthread_detach( &t );
7907 #else
7908         status = pthread_detach( t );
7909 #endif
7910
7911 #ifdef HAVE_LINUX_THREADS
7912         pthread_kill_other_threads_np();
7913 #endif
7914
7915         exit( status );
7916
7917 }
7918
7919 EOF
7920 if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7921 then
7922   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7923 else
7924   echo "configure: failed program was:" >&5
7925   cat conftest.$ac_ext >&5
7926   rm -fr conftest*
7927   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7928 fi
7929 rm -fr conftest*
7930 fi
7931
7932
7933                 # restore the LIBS
7934                 LIBS="$ol_LIBS"
7935         
7936 fi
7937
7938 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7939
7940         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7941                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7942                 ol_link_threads=posix
7943         fi
7944 fi
7945
7946                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7947 if test "$ol_link_threads" = no ; then
7948         # try -lpthread -lmach -lexc
7949         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7950 echo "configure:7951: checking for pthread link with -lpthread -lmach -lexc" >&5
7951 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7952   echo $ac_n "(cached) $ac_c" 1>&6
7953 else
7954   
7955                 # save the flags
7956                 ol_LIBS="$LIBS"
7957                 LIBS="-lpthread -lmach -lexc $LIBS"
7958
7959                 if test "$cross_compiling" = yes; then
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* pthread test headers */
7964 #include <pthread.h>
7965 #ifndef NULL
7966 #define NULL (void*)0
7967 #endif
7968
7969 static void *task(p)
7970         void *p;
7971 {
7972         return (void *) (p == NULL);
7973 }
7974
7975 int main() {
7976
7977         /* pthread test function */
7978         pthread_t t;
7979         int status;
7980
7981         /* make sure pthread_create() isn't just a stub */
7982 #if HAVE_PTHREADS_D4
7983         status = pthread_create(&t, pthread_attr_default, task, NULL);
7984 #else
7985         status = pthread_create(&t, NULL, task, NULL);
7986 #endif
7987
7988         if( status ) exit( status );
7989
7990         /* make sure pthread_detach() isn't just a stub */
7991 #if HAVE_PTHREADS_D4
7992         status = pthread_detach( &t );
7993 #else
7994         status = pthread_detach( t );
7995 #endif
7996
7997 #ifdef HAVE_LINUX_THREADS
7998         pthread_kill_other_threads_np();
7999 #endif
8000
8001         exit( status );
8002
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   ol_cv_pthread_lpthread_lmach_lexc=yes
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   ol_cv_pthread_lpthread_lmach_lexc=no
8013 fi
8014 rm -f conftest*
8015 else
8016   cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019 /* pthread test headers */
8020 #include <pthread.h>
8021 #ifndef NULL
8022 #define NULL (void*)0
8023 #endif
8024
8025 static void *task(p)
8026         void *p;
8027 {
8028         return (void *) (p == NULL);
8029 }
8030
8031
8032 int main(argc, argv)
8033         int argc;
8034         char **argv;
8035 {
8036
8037         /* pthread test function */
8038         pthread_t t;
8039         int status;
8040
8041         /* make sure pthread_create() isn't just a stub */
8042 #if HAVE_PTHREADS_D4
8043         status = pthread_create(&t, pthread_attr_default, task, NULL);
8044 #else
8045         status = pthread_create(&t, NULL, task, NULL);
8046 #endif
8047
8048         if( status ) exit( status );
8049
8050         /* make sure pthread_detach() isn't just a stub */
8051 #if HAVE_PTHREADS_D4
8052         status = pthread_detach( &t );
8053 #else
8054         status = pthread_detach( t );
8055 #endif
8056
8057 #ifdef HAVE_LINUX_THREADS
8058         pthread_kill_other_threads_np();
8059 #endif
8060
8061         exit( status );
8062
8063 }
8064
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8067 then
8068   ol_cv_pthread_lpthread_lmach_lexc=yes
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -fr conftest*
8073   ol_cv_pthread_lpthread_lmach_lexc=no
8074 fi
8075 rm -fr conftest*
8076 fi
8077
8078
8079                 # restore the LIBS
8080                 LIBS="$ol_LIBS"
8081         
8082 fi
8083
8084 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8085
8086         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8087                 ol_link_pthreads="-lpthread -lmach -lexc"
8088                 ol_link_threads=posix
8089         fi
8090 fi
8091
8092
8093                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8094 if test "$ol_link_threads" = no ; then
8095         # try -lpthread -Wl,-woff,85
8096         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8097 echo "configure:8098: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8098 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8099   echo $ac_n "(cached) $ac_c" 1>&6
8100 else
8101   
8102                 # save the flags
8103                 ol_LIBS="$LIBS"
8104                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8105
8106                 if test "$cross_compiling" = yes; then
8107   cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 /* pthread test headers */
8111 #include <pthread.h>
8112 #ifndef NULL
8113 #define NULL (void*)0
8114 #endif
8115
8116 static void *task(p)
8117         void *p;
8118 {
8119         return (void *) (p == NULL);
8120 }
8121
8122 int main() {
8123
8124         /* pthread test function */
8125         pthread_t t;
8126         int status;
8127
8128         /* make sure pthread_create() isn't just a stub */
8129 #if HAVE_PTHREADS_D4
8130         status = pthread_create(&t, pthread_attr_default, task, NULL);
8131 #else
8132         status = pthread_create(&t, NULL, task, NULL);
8133 #endif
8134
8135         if( status ) exit( status );
8136
8137         /* make sure pthread_detach() isn't just a stub */
8138 #if HAVE_PTHREADS_D4
8139         status = pthread_detach( &t );
8140 #else
8141         status = pthread_detach( t );
8142 #endif
8143
8144 #ifdef HAVE_LINUX_THREADS
8145         pthread_kill_other_threads_np();
8146 #endif
8147
8148         exit( status );
8149
8150 ; return 0; }
8151 EOF
8152 if { (eval echo configure:8153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8153   rm -rf conftest*
8154   ol_cv_pthread_lib_lpthread_woff=yes
8155 else
8156   echo "configure: failed program was:" >&5
8157   cat conftest.$ac_ext >&5
8158   rm -rf conftest*
8159   ol_cv_pthread_lib_lpthread_woff=no
8160 fi
8161 rm -f conftest*
8162 else
8163   cat > conftest.$ac_ext <<EOF
8164 #line 8165 "configure"
8165 #include "confdefs.h"
8166 /* pthread test headers */
8167 #include <pthread.h>
8168 #ifndef NULL
8169 #define NULL (void*)0
8170 #endif
8171
8172 static void *task(p)
8173         void *p;
8174 {
8175         return (void *) (p == NULL);
8176 }
8177
8178
8179 int main(argc, argv)
8180         int argc;
8181         char **argv;
8182 {
8183
8184         /* pthread test function */
8185         pthread_t t;
8186         int status;
8187
8188         /* make sure pthread_create() isn't just a stub */
8189 #if HAVE_PTHREADS_D4
8190         status = pthread_create(&t, pthread_attr_default, task, NULL);
8191 #else
8192         status = pthread_create(&t, NULL, task, NULL);
8193 #endif
8194
8195         if( status ) exit( status );
8196
8197         /* make sure pthread_detach() isn't just a stub */
8198 #if HAVE_PTHREADS_D4
8199         status = pthread_detach( &t );
8200 #else
8201         status = pthread_detach( t );
8202 #endif
8203
8204 #ifdef HAVE_LINUX_THREADS
8205         pthread_kill_other_threads_np();
8206 #endif
8207
8208         exit( status );
8209
8210 }
8211
8212 EOF
8213 if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8214 then
8215   ol_cv_pthread_lib_lpthread_woff=yes
8216 else
8217   echo "configure: failed program was:" >&5
8218   cat conftest.$ac_ext >&5
8219   rm -fr conftest*
8220   ol_cv_pthread_lib_lpthread_woff=no
8221 fi
8222 rm -fr conftest*
8223 fi
8224
8225
8226                 # restore the LIBS
8227                 LIBS="$ol_LIBS"
8228         
8229 fi
8230
8231 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8232
8233         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8234                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8235                 ol_link_threads=posix
8236         fi
8237 fi
8238
8239
8240                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8241 if test "$ol_link_threads" = no ; then
8242         # try -lpthread
8243         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8244 echo "configure:8245: checking for pthread link with -lpthread" >&5
8245 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8246   echo $ac_n "(cached) $ac_c" 1>&6
8247 else
8248   
8249                 # save the flags
8250                 ol_LIBS="$LIBS"
8251                 LIBS="-lpthread $LIBS"
8252
8253                 if test "$cross_compiling" = yes; then
8254   cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* pthread test headers */
8258 #include <pthread.h>
8259 #ifndef NULL
8260 #define NULL (void*)0
8261 #endif
8262
8263 static void *task(p)
8264         void *p;
8265 {
8266         return (void *) (p == NULL);
8267 }
8268
8269 int main() {
8270
8271         /* pthread test function */
8272         pthread_t t;
8273         int status;
8274
8275         /* make sure pthread_create() isn't just a stub */
8276 #if HAVE_PTHREADS_D4
8277         status = pthread_create(&t, pthread_attr_default, task, NULL);
8278 #else
8279         status = pthread_create(&t, NULL, task, NULL);
8280 #endif
8281
8282         if( status ) exit( status );
8283
8284         /* make sure pthread_detach() isn't just a stub */
8285 #if HAVE_PTHREADS_D4
8286         status = pthread_detach( &t );
8287 #else
8288         status = pthread_detach( t );
8289 #endif
8290
8291 #ifdef HAVE_LINUX_THREADS
8292         pthread_kill_other_threads_np();
8293 #endif
8294
8295         exit( status );
8296
8297 ; return 0; }
8298 EOF
8299 if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8300   rm -rf conftest*
8301   ol_cv_pthread_lpthread=yes
8302 else
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -rf conftest*
8306   ol_cv_pthread_lpthread=no
8307 fi
8308 rm -f conftest*
8309 else
8310   cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313 /* pthread test headers */
8314 #include <pthread.h>
8315 #ifndef NULL
8316 #define NULL (void*)0
8317 #endif
8318
8319 static void *task(p)
8320         void *p;
8321 {
8322         return (void *) (p == NULL);
8323 }
8324
8325
8326 int main(argc, argv)
8327         int argc;
8328         char **argv;
8329 {
8330
8331         /* pthread test function */
8332         pthread_t t;
8333         int status;
8334
8335         /* make sure pthread_create() isn't just a stub */
8336 #if HAVE_PTHREADS_D4
8337         status = pthread_create(&t, pthread_attr_default, task, NULL);
8338 #else
8339         status = pthread_create(&t, NULL, task, NULL);
8340 #endif
8341
8342         if( status ) exit( status );
8343
8344         /* make sure pthread_detach() isn't just a stub */
8345 #if HAVE_PTHREADS_D4
8346         status = pthread_detach( &t );
8347 #else
8348         status = pthread_detach( t );
8349 #endif
8350
8351 #ifdef HAVE_LINUX_THREADS
8352         pthread_kill_other_threads_np();
8353 #endif
8354
8355         exit( status );
8356
8357 }
8358
8359 EOF
8360 if { (eval echo configure:8361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8361 then
8362   ol_cv_pthread_lpthread=yes
8363 else
8364   echo "configure: failed program was:" >&5
8365   cat conftest.$ac_ext >&5
8366   rm -fr conftest*
8367   ol_cv_pthread_lpthread=no
8368 fi
8369 rm -fr conftest*
8370 fi
8371
8372
8373                 # restore the LIBS
8374                 LIBS="$ol_LIBS"
8375         
8376 fi
8377
8378 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8379
8380         if test $ol_cv_pthread_lpthread = yes ; then
8381                 ol_link_pthreads="-lpthread"
8382                 ol_link_threads=posix
8383         fi
8384 fi
8385
8386                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8387 if test "$ol_link_threads" = no ; then
8388         # try -lc_r
8389         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8390 echo "configure:8391: checking for pthread link with -lc_r" >&5
8391 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8392   echo $ac_n "(cached) $ac_c" 1>&6
8393 else
8394   
8395                 # save the flags
8396                 ol_LIBS="$LIBS"
8397                 LIBS="-lc_r $LIBS"
8398
8399                 if test "$cross_compiling" = yes; then
8400   cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403 /* pthread test headers */
8404 #include <pthread.h>
8405 #ifndef NULL
8406 #define NULL (void*)0
8407 #endif
8408
8409 static void *task(p)
8410         void *p;
8411 {
8412         return (void *) (p == NULL);
8413 }
8414
8415 int main() {
8416
8417         /* pthread test function */
8418         pthread_t t;
8419         int status;
8420
8421         /* make sure pthread_create() isn't just a stub */
8422 #if HAVE_PTHREADS_D4
8423         status = pthread_create(&t, pthread_attr_default, task, NULL);
8424 #else
8425         status = pthread_create(&t, NULL, task, NULL);
8426 #endif
8427
8428         if( status ) exit( status );
8429
8430         /* make sure pthread_detach() isn't just a stub */
8431 #if HAVE_PTHREADS_D4
8432         status = pthread_detach( &t );
8433 #else
8434         status = pthread_detach( t );
8435 #endif
8436
8437 #ifdef HAVE_LINUX_THREADS
8438         pthread_kill_other_threads_np();
8439 #endif
8440
8441         exit( status );
8442
8443 ; return 0; }
8444 EOF
8445 if { (eval echo configure:8446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8446   rm -rf conftest*
8447   ol_cv_pthread_lc_r=yes
8448 else
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -rf conftest*
8452   ol_cv_pthread_lc_r=no
8453 fi
8454 rm -f conftest*
8455 else
8456   cat > conftest.$ac_ext <<EOF
8457 #line 8458 "configure"
8458 #include "confdefs.h"
8459 /* pthread test headers */
8460 #include <pthread.h>
8461 #ifndef NULL
8462 #define NULL (void*)0
8463 #endif
8464
8465 static void *task(p)
8466         void *p;
8467 {
8468         return (void *) (p == NULL);
8469 }
8470
8471
8472 int main(argc, argv)
8473         int argc;
8474         char **argv;
8475 {
8476
8477         /* pthread test function */
8478         pthread_t t;
8479         int status;
8480
8481         /* make sure pthread_create() isn't just a stub */
8482 #if HAVE_PTHREADS_D4
8483         status = pthread_create(&t, pthread_attr_default, task, NULL);
8484 #else
8485         status = pthread_create(&t, NULL, task, NULL);
8486 #endif
8487
8488         if( status ) exit( status );
8489
8490         /* make sure pthread_detach() isn't just a stub */
8491 #if HAVE_PTHREADS_D4
8492         status = pthread_detach( &t );
8493 #else
8494         status = pthread_detach( t );
8495 #endif
8496
8497 #ifdef HAVE_LINUX_THREADS
8498         pthread_kill_other_threads_np();
8499 #endif
8500
8501         exit( status );
8502
8503 }
8504
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8507 then
8508   ol_cv_pthread_lc_r=yes
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -fr conftest*
8513   ol_cv_pthread_lc_r=no
8514 fi
8515 rm -fr conftest*
8516 fi
8517
8518
8519                 # restore the LIBS
8520                 LIBS="$ol_LIBS"
8521         
8522 fi
8523
8524 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8525
8526         if test $ol_cv_pthread_lc_r = yes ; then
8527                 ol_link_pthreads="-lc_r"
8528                 ol_link_threads=posix
8529         fi
8530 fi
8531
8532
8533                 # Pthread try link: -threads (ol_cv_pthread_threads)
8534 if test "$ol_link_threads" = no ; then
8535         # try -threads
8536         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8537 echo "configure:8538: checking for pthread link with -threads" >&5
8538 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8539   echo $ac_n "(cached) $ac_c" 1>&6
8540 else
8541   
8542                 # save the flags
8543                 ol_LIBS="$LIBS"
8544                 LIBS="-threads $LIBS"
8545
8546                 if test "$cross_compiling" = yes; then
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 int main() {
8563
8564         /* pthread test function */
8565         pthread_t t;
8566         int status;
8567
8568         /* make sure pthread_create() isn't just a stub */
8569 #if HAVE_PTHREADS_D4
8570         status = pthread_create(&t, pthread_attr_default, task, NULL);
8571 #else
8572         status = pthread_create(&t, NULL, task, NULL);
8573 #endif
8574
8575         if( status ) exit( status );
8576
8577         /* make sure pthread_detach() isn't just a stub */
8578 #if HAVE_PTHREADS_D4
8579         status = pthread_detach( &t );
8580 #else
8581         status = pthread_detach( t );
8582 #endif
8583
8584 #ifdef HAVE_LINUX_THREADS
8585         pthread_kill_other_threads_np();
8586 #endif
8587
8588         exit( status );
8589
8590 ; return 0; }
8591 EOF
8592 if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8593   rm -rf conftest*
8594   ol_cv_pthread_threads=yes
8595 else
8596   echo "configure: failed program was:" >&5
8597   cat conftest.$ac_ext >&5
8598   rm -rf conftest*
8599   ol_cv_pthread_threads=no
8600 fi
8601 rm -f conftest*
8602 else
8603   cat > conftest.$ac_ext <<EOF
8604 #line 8605 "configure"
8605 #include "confdefs.h"
8606 /* pthread test headers */
8607 #include <pthread.h>
8608 #ifndef NULL
8609 #define NULL (void*)0
8610 #endif
8611
8612 static void *task(p)
8613         void *p;
8614 {
8615         return (void *) (p == NULL);
8616 }
8617
8618
8619 int main(argc, argv)
8620         int argc;
8621         char **argv;
8622 {
8623
8624         /* pthread test function */
8625         pthread_t t;
8626         int status;
8627
8628         /* make sure pthread_create() isn't just a stub */
8629 #if HAVE_PTHREADS_D4
8630         status = pthread_create(&t, pthread_attr_default, task, NULL);
8631 #else
8632         status = pthread_create(&t, NULL, task, NULL);
8633 #endif
8634
8635         if( status ) exit( status );
8636
8637         /* make sure pthread_detach() isn't just a stub */
8638 #if HAVE_PTHREADS_D4
8639         status = pthread_detach( &t );
8640 #else
8641         status = pthread_detach( t );
8642 #endif
8643
8644 #ifdef HAVE_LINUX_THREADS
8645         pthread_kill_other_threads_np();
8646 #endif
8647
8648         exit( status );
8649
8650 }
8651
8652 EOF
8653 if { (eval echo configure:8654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8654 then
8655   ol_cv_pthread_threads=yes
8656 else
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -fr conftest*
8660   ol_cv_pthread_threads=no
8661 fi
8662 rm -fr conftest*
8663 fi
8664
8665
8666                 # restore the LIBS
8667                 LIBS="$ol_LIBS"
8668         
8669 fi
8670
8671 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8672
8673         if test $ol_cv_pthread_threads = yes ; then
8674                 ol_link_pthreads="-threads"
8675                 ol_link_threads=posix
8676         fi
8677 fi
8678
8679
8680                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8681 if test "$ol_link_threads" = no ; then
8682         # try -lpthreads -lmach -lexc -lc_r
8683         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8684 echo "configure:8685: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8685 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8686   echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688   
8689                 # save the flags
8690                 ol_LIBS="$LIBS"
8691                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8692
8693                 if test "$cross_compiling" = yes; then
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 int main() {
8710
8711         /* pthread test function */
8712         pthread_t t;
8713         int status;
8714
8715         /* make sure pthread_create() isn't just a stub */
8716 #if HAVE_PTHREADS_D4
8717         status = pthread_create(&t, pthread_attr_default, task, NULL);
8718 #else
8719         status = pthread_create(&t, NULL, task, NULL);
8720 #endif
8721
8722         if( status ) exit( status );
8723
8724         /* make sure pthread_detach() isn't just a stub */
8725 #if HAVE_PTHREADS_D4
8726         status = pthread_detach( &t );
8727 #else
8728         status = pthread_detach( t );
8729 #endif
8730
8731 #ifdef HAVE_LINUX_THREADS
8732         pthread_kill_other_threads_np();
8733 #endif
8734
8735         exit( status );
8736
8737 ; return 0; }
8738 EOF
8739 if { (eval echo configure:8740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8740   rm -rf conftest*
8741   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8742 else
8743   echo "configure: failed program was:" >&5
8744   cat conftest.$ac_ext >&5
8745   rm -rf conftest*
8746   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8747 fi
8748 rm -f conftest*
8749 else
8750   cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 /* pthread test headers */
8754 #include <pthread.h>
8755 #ifndef NULL
8756 #define NULL (void*)0
8757 #endif
8758
8759 static void *task(p)
8760         void *p;
8761 {
8762         return (void *) (p == NULL);
8763 }
8764
8765
8766 int main(argc, argv)
8767         int argc;
8768         char **argv;
8769 {
8770
8771         /* pthread test function */
8772         pthread_t t;
8773         int status;
8774
8775         /* make sure pthread_create() isn't just a stub */
8776 #if HAVE_PTHREADS_D4
8777         status = pthread_create(&t, pthread_attr_default, task, NULL);
8778 #else
8779         status = pthread_create(&t, NULL, task, NULL);
8780 #endif
8781
8782         if( status ) exit( status );
8783
8784         /* make sure pthread_detach() isn't just a stub */
8785 #if HAVE_PTHREADS_D4
8786         status = pthread_detach( &t );
8787 #else
8788         status = pthread_detach( t );
8789 #endif
8790
8791 #ifdef HAVE_LINUX_THREADS
8792         pthread_kill_other_threads_np();
8793 #endif
8794
8795         exit( status );
8796
8797 }
8798
8799 EOF
8800 if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8801 then
8802   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8803 else
8804   echo "configure: failed program was:" >&5
8805   cat conftest.$ac_ext >&5
8806   rm -fr conftest*
8807   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8808 fi
8809 rm -fr conftest*
8810 fi
8811
8812
8813                 # restore the LIBS
8814                 LIBS="$ol_LIBS"
8815         
8816 fi
8817
8818 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8819
8820         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8821                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8822                 ol_link_threads=posix
8823         fi
8824 fi
8825
8826                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8827 if test "$ol_link_threads" = no ; then
8828         # try -lpthreads -lmach -lexc
8829         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8830 echo "configure:8831: checking for pthread link with -lpthreads -lmach -lexc" >&5
8831 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8832   echo $ac_n "(cached) $ac_c" 1>&6
8833 else
8834   
8835                 # save the flags
8836                 ol_LIBS="$LIBS"
8837                 LIBS="-lpthreads -lmach -lexc $LIBS"
8838
8839                 if test "$cross_compiling" = yes; then
8840   cat > conftest.$ac_ext <<EOF
8841 #line 8842 "configure"
8842 #include "confdefs.h"
8843 /* pthread test headers */
8844 #include <pthread.h>
8845 #ifndef NULL
8846 #define NULL (void*)0
8847 #endif
8848
8849 static void *task(p)
8850         void *p;
8851 {
8852         return (void *) (p == NULL);
8853 }
8854
8855 int main() {
8856
8857         /* pthread test function */
8858         pthread_t t;
8859         int status;
8860
8861         /* make sure pthread_create() isn't just a stub */
8862 #if HAVE_PTHREADS_D4
8863         status = pthread_create(&t, pthread_attr_default, task, NULL);
8864 #else
8865         status = pthread_create(&t, NULL, task, NULL);
8866 #endif
8867
8868         if( status ) exit( status );
8869
8870         /* make sure pthread_detach() isn't just a stub */
8871 #if HAVE_PTHREADS_D4
8872         status = pthread_detach( &t );
8873 #else
8874         status = pthread_detach( t );
8875 #endif
8876
8877 #ifdef HAVE_LINUX_THREADS
8878         pthread_kill_other_threads_np();
8879 #endif
8880
8881         exit( status );
8882
8883 ; return 0; }
8884 EOF
8885 if { (eval echo configure:8886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8886   rm -rf conftest*
8887   ol_cv_pthread_lpthreads_lmach_lexc=yes
8888 else
8889   echo "configure: failed program was:" >&5
8890   cat conftest.$ac_ext >&5
8891   rm -rf conftest*
8892   ol_cv_pthread_lpthreads_lmach_lexc=no
8893 fi
8894 rm -f conftest*
8895 else
8896   cat > conftest.$ac_ext <<EOF
8897 #line 8898 "configure"
8898 #include "confdefs.h"
8899 /* pthread test headers */
8900 #include <pthread.h>
8901 #ifndef NULL
8902 #define NULL (void*)0
8903 #endif
8904
8905 static void *task(p)
8906         void *p;
8907 {
8908         return (void *) (p == NULL);
8909 }
8910
8911
8912 int main(argc, argv)
8913         int argc;
8914         char **argv;
8915 {
8916
8917         /* pthread test function */
8918         pthread_t t;
8919         int status;
8920
8921         /* make sure pthread_create() isn't just a stub */
8922 #if HAVE_PTHREADS_D4
8923         status = pthread_create(&t, pthread_attr_default, task, NULL);
8924 #else
8925         status = pthread_create(&t, NULL, task, NULL);
8926 #endif
8927
8928         if( status ) exit( status );
8929
8930         /* make sure pthread_detach() isn't just a stub */
8931 #if HAVE_PTHREADS_D4
8932         status = pthread_detach( &t );
8933 #else
8934         status = pthread_detach( t );
8935 #endif
8936
8937 #ifdef HAVE_LINUX_THREADS
8938         pthread_kill_other_threads_np();
8939 #endif
8940
8941         exit( status );
8942
8943 }
8944
8945 EOF
8946 if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8947 then
8948   ol_cv_pthread_lpthreads_lmach_lexc=yes
8949 else
8950   echo "configure: failed program was:" >&5
8951   cat conftest.$ac_ext >&5
8952   rm -fr conftest*
8953   ol_cv_pthread_lpthreads_lmach_lexc=no
8954 fi
8955 rm -fr conftest*
8956 fi
8957
8958
8959                 # restore the LIBS
8960                 LIBS="$ol_LIBS"
8961         
8962 fi
8963
8964 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8965
8966         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8967                 ol_link_pthreads="-lpthreads -lmach -lexc"
8968                 ol_link_threads=posix
8969         fi
8970 fi
8971
8972                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8973 if test "$ol_link_threads" = no ; then
8974         # try -lpthreads -lexc
8975         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8976 echo "configure:8977: checking for pthread link with -lpthreads -lexc" >&5
8977 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   
8981                 # save the flags
8982                 ol_LIBS="$LIBS"
8983                 LIBS="-lpthreads -lexc $LIBS"
8984
8985                 if test "$cross_compiling" = yes; then
8986   cat > conftest.$ac_ext <<EOF
8987 #line 8988 "configure"
8988 #include "confdefs.h"
8989 /* pthread test headers */
8990 #include <pthread.h>
8991 #ifndef NULL
8992 #define NULL (void*)0
8993 #endif
8994
8995 static void *task(p)
8996         void *p;
8997 {
8998         return (void *) (p == NULL);
8999 }
9000
9001 int main() {
9002
9003         /* pthread test function */
9004         pthread_t t;
9005         int status;
9006
9007         /* make sure pthread_create() isn't just a stub */
9008 #if HAVE_PTHREADS_D4
9009         status = pthread_create(&t, pthread_attr_default, task, NULL);
9010 #else
9011         status = pthread_create(&t, NULL, task, NULL);
9012 #endif
9013
9014         if( status ) exit( status );
9015
9016         /* make sure pthread_detach() isn't just a stub */
9017 #if HAVE_PTHREADS_D4
9018         status = pthread_detach( &t );
9019 #else
9020         status = pthread_detach( t );
9021 #endif
9022
9023 #ifdef HAVE_LINUX_THREADS
9024         pthread_kill_other_threads_np();
9025 #endif
9026
9027         exit( status );
9028
9029 ; return 0; }
9030 EOF
9031 if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9032   rm -rf conftest*
9033   ol_cv_pthread_lpthreads_lexc=yes
9034 else
9035   echo "configure: failed program was:" >&5
9036   cat conftest.$ac_ext >&5
9037   rm -rf conftest*
9038   ol_cv_pthread_lpthreads_lexc=no
9039 fi
9040 rm -f conftest*
9041 else
9042   cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* pthread test headers */
9046 #include <pthread.h>
9047 #ifndef NULL
9048 #define NULL (void*)0
9049 #endif
9050
9051 static void *task(p)
9052         void *p;
9053 {
9054         return (void *) (p == NULL);
9055 }
9056
9057
9058 int main(argc, argv)
9059         int argc;
9060         char **argv;
9061 {
9062
9063         /* pthread test function */
9064         pthread_t t;
9065         int status;
9066
9067         /* make sure pthread_create() isn't just a stub */
9068 #if HAVE_PTHREADS_D4
9069         status = pthread_create(&t, pthread_attr_default, task, NULL);
9070 #else
9071         status = pthread_create(&t, NULL, task, NULL);
9072 #endif
9073
9074         if( status ) exit( status );
9075
9076         /* make sure pthread_detach() isn't just a stub */
9077 #if HAVE_PTHREADS_D4
9078         status = pthread_detach( &t );
9079 #else
9080         status = pthread_detach( t );
9081 #endif
9082
9083 #ifdef HAVE_LINUX_THREADS
9084         pthread_kill_other_threads_np();
9085 #endif
9086
9087         exit( status );
9088
9089 }
9090
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9093 then
9094   ol_cv_pthread_lpthreads_lexc=yes
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -fr conftest*
9099   ol_cv_pthread_lpthreads_lexc=no
9100 fi
9101 rm -fr conftest*
9102 fi
9103
9104
9105                 # restore the LIBS
9106                 LIBS="$ol_LIBS"
9107         
9108 fi
9109
9110 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9111
9112         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9113                 ol_link_pthreads="-lpthreads -lexc"
9114                 ol_link_threads=posix
9115         fi
9116 fi
9117
9118
9119                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9120 if test "$ol_link_threads" = no ; then
9121         # try -lpthreads
9122         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9123 echo "configure:9124: checking for pthread link with -lpthreads" >&5
9124 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128                 # save the flags
9129                 ol_LIBS="$LIBS"
9130                 LIBS="-lpthreads $LIBS"
9131
9132                 if test "$cross_compiling" = yes; then
9133   cat > conftest.$ac_ext <<EOF
9134 #line 9135 "configure"
9135 #include "confdefs.h"
9136 /* pthread test headers */
9137 #include <pthread.h>
9138 #ifndef NULL
9139 #define NULL (void*)0
9140 #endif
9141
9142 static void *task(p)
9143         void *p;
9144 {
9145         return (void *) (p == NULL);
9146 }
9147
9148 int main() {
9149
9150         /* pthread test function */
9151         pthread_t t;
9152         int status;
9153
9154         /* make sure pthread_create() isn't just a stub */
9155 #if HAVE_PTHREADS_D4
9156         status = pthread_create(&t, pthread_attr_default, task, NULL);
9157 #else
9158         status = pthread_create(&t, NULL, task, NULL);
9159 #endif
9160
9161         if( status ) exit( status );
9162
9163         /* make sure pthread_detach() isn't just a stub */
9164 #if HAVE_PTHREADS_D4
9165         status = pthread_detach( &t );
9166 #else
9167         status = pthread_detach( t );
9168 #endif
9169
9170 #ifdef HAVE_LINUX_THREADS
9171         pthread_kill_other_threads_np();
9172 #endif
9173
9174         exit( status );
9175
9176 ; return 0; }
9177 EOF
9178 if { (eval echo configure:9179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9179   rm -rf conftest*
9180   ol_cv_pthread_lib_lpthreads=yes
9181 else
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   ol_cv_pthread_lib_lpthreads=no
9186 fi
9187 rm -f conftest*
9188 else
9189   cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192 /* pthread test headers */
9193 #include <pthread.h>
9194 #ifndef NULL
9195 #define NULL (void*)0
9196 #endif
9197
9198 static void *task(p)
9199         void *p;
9200 {
9201         return (void *) (p == NULL);
9202 }
9203
9204
9205 int main(argc, argv)
9206         int argc;
9207         char **argv;
9208 {
9209
9210         /* pthread test function */
9211         pthread_t t;
9212         int status;
9213
9214         /* make sure pthread_create() isn't just a stub */
9215 #if HAVE_PTHREADS_D4
9216         status = pthread_create(&t, pthread_attr_default, task, NULL);
9217 #else
9218         status = pthread_create(&t, NULL, task, NULL);
9219 #endif
9220
9221         if( status ) exit( status );
9222
9223         /* make sure pthread_detach() isn't just a stub */
9224 #if HAVE_PTHREADS_D4
9225         status = pthread_detach( &t );
9226 #else
9227         status = pthread_detach( t );
9228 #endif
9229
9230 #ifdef HAVE_LINUX_THREADS
9231         pthread_kill_other_threads_np();
9232 #endif
9233
9234         exit( status );
9235
9236 }
9237
9238 EOF
9239 if { (eval echo configure:9240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9240 then
9241   ol_cv_pthread_lib_lpthreads=yes
9242 else
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245   rm -fr conftest*
9246   ol_cv_pthread_lib_lpthreads=no
9247 fi
9248 rm -fr conftest*
9249 fi
9250
9251
9252                 # restore the LIBS
9253                 LIBS="$ol_LIBS"
9254         
9255 fi
9256
9257 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9258
9259         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9260                 ol_link_pthreads="-lpthreads"
9261                 ol_link_threads=posix
9262         fi
9263 fi
9264
9265
9266                 if test $ol_link_threads != no ; then
9267                         cat >> confdefs.h <<\EOF
9268 #define HAVE_PTHREADS 1
9269 EOF
9270
9271
9272                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9273
9274                                                 save_CPPFLAGS="$CPPFLAGS"
9275                         save_LIBS="$LIBS"
9276                         LIBS="$LTHREAD_LIBS $LIBS"
9277
9278                                                                                                 for ac_func in sched_yield pthread_yield
9279 do
9280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9281 echo "configure:9282: checking for $ac_func" >&5
9282 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9283   echo $ac_n "(cached) $ac_c" 1>&6
9284 else
9285   cat > conftest.$ac_ext <<EOF
9286 #line 9287 "configure"
9287 #include "confdefs.h"
9288 /* System header to define __stub macros and hopefully few prototypes,
9289     which can conflict with char $ac_func(); below.  */
9290 #include <assert.h>
9291 /* Override any gcc2 internal prototype to avoid an error.  */
9292 /* We use char because int might match the return type of a gcc2
9293     builtin and then its argument prototype would still apply.  */
9294 char $ac_func();
9295 char (*f)();
9296
9297 int main() {
9298
9299 /* The GNU C library defines this for functions which it implements
9300     to always fail with ENOSYS.  Some functions are actually named
9301     something starting with __ and the normal name is an alias.  */
9302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9303 choke me
9304 #else
9305 f = $ac_func;
9306 #endif
9307
9308 ; return 0; }
9309 EOF
9310 if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9311   rm -rf conftest*
9312   eval "ac_cv_func_$ac_func=yes"
9313 else
9314   echo "configure: failed program was:" >&5
9315   cat conftest.$ac_ext >&5
9316   rm -rf conftest*
9317   eval "ac_cv_func_$ac_func=no"
9318 fi
9319 rm -f conftest*
9320 fi
9321
9322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9323   echo "$ac_t""yes" 1>&6
9324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9325   cat >> confdefs.h <<EOF
9326 #define $ac_tr_func 1
9327 EOF
9328  
9329 else
9330   echo "$ac_t""no" 1>&6
9331 fi
9332 done
9333
9334
9335                         if test $ac_cv_func_sched_yield = no -a \
9336                                 $ac_cv_func_pthread_yield = no ; then
9337                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9338 echo "configure:9339: checking for sched_yield in -lrt" >&5
9339 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   ac_save_LIBS="$LIBS"
9344 LIBS="-lrt  $LIBS"
9345 cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 /* Override any gcc2 internal prototype to avoid an error.  */
9349 /* We use char because int might match the return type of a gcc2
9350     builtin and then its argument prototype would still apply.  */
9351 char sched_yield();
9352
9353 int main() {
9354 sched_yield()
9355 ; return 0; }
9356 EOF
9357 if { (eval echo configure:9358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9358   rm -rf conftest*
9359   eval "ac_cv_lib_$ac_lib_var=yes"
9360 else
9361   echo "configure: failed program was:" >&5
9362   cat conftest.$ac_ext >&5
9363   rm -rf conftest*
9364   eval "ac_cv_lib_$ac_lib_var=no"
9365 fi
9366 rm -f conftest*
9367 LIBS="$ac_save_LIBS"
9368
9369 fi
9370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9371   echo "$ac_t""yes" 1>&6
9372   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9373                                         cat >> confdefs.h <<\EOF
9374 #define HAVE_SCHED_YIELD 1
9375 EOF
9376
9377                                         ac_cv_func_sched_yield=yes
9378 else
9379   echo "$ac_t""no" 1>&6
9380 ac_cv_func_sched_yield=no
9381 fi
9382
9383                         fi
9384                         if test $ac_cv_func_sched_yield = no -a \
9385                                 $ac_cv_func_pthread_yield = no ; then
9386                                                                                                 for ac_func in thr_yield
9387 do
9388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9389 echo "configure:9390: checking for $ac_func" >&5
9390 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9391   echo $ac_n "(cached) $ac_c" 1>&6
9392 else
9393   cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9396 /* System header to define __stub macros and hopefully few prototypes,
9397     which can conflict with char $ac_func(); below.  */
9398 #include <assert.h>
9399 /* Override any gcc2 internal prototype to avoid an error.  */
9400 /* We use char because int might match the return type of a gcc2
9401     builtin and then its argument prototype would still apply.  */
9402 char $ac_func();
9403 char (*f)();
9404
9405 int main() {
9406
9407 /* The GNU C library defines this for functions which it implements
9408     to always fail with ENOSYS.  Some functions are actually named
9409     something starting with __ and the normal name is an alias.  */
9410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9411 choke me
9412 #else
9413 f = $ac_func;
9414 #endif
9415
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9419   rm -rf conftest*
9420   eval "ac_cv_func_$ac_func=yes"
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_func_$ac_func=no"
9426 fi
9427 rm -f conftest*
9428 fi
9429
9430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9431   echo "$ac_t""yes" 1>&6
9432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9433   cat >> confdefs.h <<EOF
9434 #define $ac_tr_func 1
9435 EOF
9436  
9437 else
9438   echo "$ac_t""no" 1>&6
9439 fi
9440 done
9441
9442                         fi
9443                         if test $ac_cv_func_sched_yield = no -a \
9444                                 $ac_cv_func_pthread_yield = no -a \
9445                                 "$ac_cv_func_thr_yield" = no ; then
9446                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9447                         fi
9448
9449                                                 for ac_func in pthread_kill
9450 do
9451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9452 echo "configure:9453: checking for $ac_func" >&5
9453 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9454   echo $ac_n "(cached) $ac_c" 1>&6
9455 else
9456   cat > conftest.$ac_ext <<EOF
9457 #line 9458 "configure"
9458 #include "confdefs.h"
9459 /* System header to define __stub macros and hopefully few prototypes,
9460     which can conflict with char $ac_func(); below.  */
9461 #include <assert.h>
9462 /* Override any gcc2 internal prototype to avoid an error.  */
9463 /* We use char because int might match the return type of a gcc2
9464     builtin and then its argument prototype would still apply.  */
9465 char $ac_func();
9466 char (*f)();
9467
9468 int main() {
9469
9470 /* The GNU C library defines this for functions which it implements
9471     to always fail with ENOSYS.  Some functions are actually named
9472     something starting with __ and the normal name is an alias.  */
9473 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9474 choke me
9475 #else
9476 f = $ac_func;
9477 #endif
9478
9479 ; return 0; }
9480 EOF
9481 if { (eval echo configure:9482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9482   rm -rf conftest*
9483   eval "ac_cv_func_$ac_func=yes"
9484 else
9485   echo "configure: failed program was:" >&5
9486   cat conftest.$ac_ext >&5
9487   rm -rf conftest*
9488   eval "ac_cv_func_$ac_func=no"
9489 fi
9490 rm -f conftest*
9491 fi
9492
9493 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9494   echo "$ac_t""yes" 1>&6
9495     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9496   cat >> confdefs.h <<EOF
9497 #define $ac_tr_func 1
9498 EOF
9499  
9500 else
9501   echo "$ac_t""no" 1>&6
9502 fi
9503 done
9504
9505
9506                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9507 echo "configure:9508: checking for pthread_detach with <pthread.h>" >&5
9508 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511   
9512                                                                 cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515
9516 #include <pthread.h>
9517 #ifndef NULL
9518 #define NULL (void*)0
9519 #endif
9520
9521 int main() {
9522 pthread_detach(NULL);
9523 ; return 0; }
9524 EOF
9525 if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9526   rm -rf conftest*
9527   ol_cv_func_pthread_detach=yes
9528 else
9529   echo "configure: failed program was:" >&5
9530   cat conftest.$ac_ext >&5
9531   rm -rf conftest*
9532   ol_cv_func_pthread_detach=no
9533 fi
9534 rm -f conftest*
9535                         
9536 fi
9537
9538 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9539
9540                         if test $ol_cv_func_pthread_detach = no ; then
9541                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9542                         fi
9543
9544                         cat >> confdefs.h <<\EOF
9545 #define HAVE_PTHREAD_DETACH 1
9546 EOF
9547
9548
9549                                                 for ac_func in \
9550                                 pthread_setconcurrency \
9551                                 pthread_getconcurrency \
9552                                 thr_setconcurrency \
9553                                 thr_getconcurrency \
9554                         
9555 do
9556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9557 echo "configure:9558: checking for $ac_func" >&5
9558 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9559   echo $ac_n "(cached) $ac_c" 1>&6
9560 else
9561   cat > conftest.$ac_ext <<EOF
9562 #line 9563 "configure"
9563 #include "confdefs.h"
9564 /* System header to define __stub macros and hopefully few prototypes,
9565     which can conflict with char $ac_func(); below.  */
9566 #include <assert.h>
9567 /* Override any gcc2 internal prototype to avoid an error.  */
9568 /* We use char because int might match the return type of a gcc2
9569     builtin and then its argument prototype would still apply.  */
9570 char $ac_func();
9571 char (*f)();
9572
9573 int main() {
9574
9575 /* The GNU C library defines this for functions which it implements
9576     to always fail with ENOSYS.  Some functions are actually named
9577     something starting with __ and the normal name is an alias.  */
9578 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9579 choke me
9580 #else
9581 f = $ac_func;
9582 #endif
9583
9584 ; return 0; }
9585 EOF
9586 if { (eval echo configure:9587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9587   rm -rf conftest*
9588   eval "ac_cv_func_$ac_func=yes"
9589 else
9590   echo "configure: failed program was:" >&5
9591   cat conftest.$ac_ext >&5
9592   rm -rf conftest*
9593   eval "ac_cv_func_$ac_func=no"
9594 fi
9595 rm -f conftest*
9596 fi
9597
9598 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9599   echo "$ac_t""yes" 1>&6
9600     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9601   cat >> confdefs.h <<EOF
9602 #define $ac_tr_func 1
9603 EOF
9604  
9605 else
9606   echo "$ac_t""no" 1>&6
9607 fi
9608 done
9609
9610
9611                         
9612         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9613 echo "configure:9614: checking for pthread_kill_other_threads_np" >&5
9614 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   cat > conftest.$ac_ext <<EOF
9618 #line 9619 "configure"
9619 #include "confdefs.h"
9620 /* System header to define __stub macros and hopefully few prototypes,
9621     which can conflict with char pthread_kill_other_threads_np(); below.  */
9622 #include <assert.h>
9623 /* Override any gcc2 internal prototype to avoid an error.  */
9624 /* We use char because int might match the return type of a gcc2
9625     builtin and then its argument prototype would still apply.  */
9626 char pthread_kill_other_threads_np();
9627 char (*f)();
9628
9629 int main() {
9630
9631 /* The GNU C library defines this for functions which it implements
9632     to always fail with ENOSYS.  Some functions are actually named
9633     something starting with __ and the normal name is an alias.  */
9634 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9635 choke me
9636 #else
9637 f = pthread_kill_other_threads_np;
9638 #endif
9639
9640 ; return 0; }
9641 EOF
9642 if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9643   rm -rf conftest*
9644   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9645 else
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -rf conftest*
9649   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9650 fi
9651 rm -f conftest*
9652 fi
9653
9654 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9655   echo "$ac_t""yes" 1>&6
9656   :
9657 else
9658   echo "$ac_t""no" 1>&6
9659 fi
9660
9661         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9662 echo "configure:9663: checking for LinuxThreads implementation" >&5
9663 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9667 fi
9668
9669 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9670
9671                         
9672         
9673         
9674         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9675 echo "configure:9676: checking for LinuxThreads consistency" >&5
9676 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9677   echo $ac_n "(cached) $ac_c" 1>&6
9678 else
9679   
9680                 if test $ol_cv_header_linux_threads = yes -a \
9681                         $ol_cv_sys_linux_threads = yes; then
9682                         ol_cv_linux_threads=yes
9683                 elif test $ol_cv_header_linux_threads = no -a \
9684                         $ol_cv_sys_linux_threads = no; then
9685                         ol_cv_linux_threads=no
9686                 else
9687                         ol_cv_linux_threads=error
9688                 fi
9689         
9690 fi
9691
9692 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9693
9694
9695                         if test $ol_cv_linux_threads = error; then
9696                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9697                         fi
9698
9699                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9700 echo "configure:9701: checking if pthread_create() works" >&5
9701 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9702   echo $ac_n "(cached) $ac_c" 1>&6
9703 else
9704   
9705                         if test "$cross_compiling" = yes; then
9706                                 ol_cv_pthread_create_works=yes
9707 else
9708   cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* pthread test headers */
9712 #include <pthread.h>
9713 #ifndef NULL
9714 #define NULL (void*)0
9715 #endif
9716
9717 static void *task(p)
9718         void *p;
9719 {
9720         return (void *) (p == NULL);
9721 }
9722
9723
9724 int main(argc, argv)
9725         int argc;
9726         char **argv;
9727 {
9728
9729         /* pthread test function */
9730         pthread_t t;
9731         int status;
9732
9733         /* make sure pthread_create() isn't just a stub */
9734 #if HAVE_PTHREADS_D4
9735         status = pthread_create(&t, pthread_attr_default, task, NULL);
9736 #else
9737         status = pthread_create(&t, NULL, task, NULL);
9738 #endif
9739
9740         if( status ) exit( status );
9741
9742         /* make sure pthread_detach() isn't just a stub */
9743 #if HAVE_PTHREADS_D4
9744         status = pthread_detach( &t );
9745 #else
9746         status = pthread_detach( t );
9747 #endif
9748
9749 #ifdef HAVE_LINUX_THREADS
9750         pthread_kill_other_threads_np();
9751 #endif
9752
9753         exit( status );
9754
9755 }
9756
9757 EOF
9758 if { (eval echo configure:9759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9759 then
9760   ol_cv_pthread_create_works=yes
9761 else
9762   echo "configure: failed program was:" >&5
9763   cat conftest.$ac_ext >&5
9764   rm -fr conftest*
9765   ol_cv_pthread_create_works=no
9766 fi
9767 rm -fr conftest*
9768 fi
9769
9770 fi
9771
9772 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9773
9774                         if test $ol_cv_pthread_create_works = no ; then
9775                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9776                         fi
9777
9778                                                 if test $ol_with_yielding_select = auto ; then
9779                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9780 echo "configure:9781: checking if select yields when using pthreads" >&5
9781 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9782   echo $ac_n "(cached) $ac_c" 1>&6
9783 else
9784   
9785                                 if test "$cross_compiling" = yes; then
9786   ol_cv_pthread_select_yields=cross
9787 else
9788   cat > conftest.$ac_ext <<EOF
9789 #line 9790 "configure"
9790 #include "confdefs.h"
9791
9792 #include <sys/types.h>
9793 #include <sys/time.h>
9794 #include <unistd.h>
9795 #include <pthread.h>
9796 #ifndef NULL
9797 #define NULL (void*) 0
9798 #endif
9799
9800 static int fildes[2];
9801
9802 static void *task(p)
9803         void *p;
9804 {
9805         int i;
9806         struct timeval tv;
9807
9808         fd_set rfds;
9809
9810         tv.tv_sec=10;
9811         tv.tv_usec=0;
9812
9813         FD_ZERO(&rfds);
9814         FD_SET(fildes[0], &rfds);
9815
9816         /* we're not interested in any fds */
9817         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9818
9819         if(i < 0) {
9820                 perror("select");
9821                 exit(10);
9822         }
9823
9824         exit(0); /* if we exit here, the select blocked the whole process */
9825 }
9826
9827 int main(argc, argv)
9828         int argc;
9829         char **argv;
9830 {
9831         pthread_t t;
9832
9833         /* create a pipe to select */
9834         if(pipe(&fildes[0])) {
9835                 perror("select");
9836                 exit(1);
9837         }
9838
9839 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9840         (void) pthread_setconcurrency(2);
9841 #else
9842 #ifdef HAVE_THR_SETCONCURRENCY
9843         /* Set Solaris LWP concurrency to 2 */
9844         thr_setconcurrency(2);
9845 #endif
9846 #endif
9847
9848 #if HAVE_PTHREADS_D4
9849         pthread_create(&t, pthread_attr_default, task, NULL);
9850 #else
9851         pthread_create(&t, NULL, task, NULL);
9852 #endif
9853
9854 #if HAVE_SCHED_YIELD
9855         sched_yield();  /* make sure task runs first */
9856 #else
9857 #ifdef HAVE_PTHREAD_YIELD
9858         pthread_yield();        /* make sure task runs first */
9859 #endif
9860 #endif
9861
9862         exit(2);
9863 }
9864 EOF
9865 if { (eval echo configure:9866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9866 then
9867   ol_cv_pthread_select_yields=no
9868 else
9869   echo "configure: failed program was:" >&5
9870   cat conftest.$ac_ext >&5
9871   rm -fr conftest*
9872   ol_cv_pthread_select_yields=yes
9873 fi
9874 rm -fr conftest*
9875 fi
9876
9877 fi
9878
9879 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9880
9881                                 if test $ol_cv_pthread_select_yields = cross ; then
9882                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9883                                 fi
9884
9885                                 if test $ol_cv_pthread_select_yields = yes ; then
9886                                         ol_with_yielding_select=yes
9887                                 fi
9888                         fi
9889
9890                                                 CPPFLAGS="$save_CPPFLAGS"
9891                         LIBS="$save_LIBS"
9892                 else
9893                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9894                 fi
9895         fi
9896
9897         if test $ol_with_threads = posix ; then
9898                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9899         fi
9900 fi
9901
9902 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9903         -o $ol_with_threads = mach ; then
9904
9905                 for ac_hdr in mach/cthreads.h
9906 do
9907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9909 echo "configure:9910: checking for $ac_hdr" >&5
9910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9911   echo $ac_n "(cached) $ac_c" 1>&6
9912 else
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 #include <$ac_hdr>
9917 EOF
9918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9919 { (eval echo configure:9920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9921 if test -z "$ac_err"; then
9922   rm -rf conftest*
9923   eval "ac_cv_header_$ac_safe=yes"
9924 else
9925   echo "$ac_err" >&5
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   eval "ac_cv_header_$ac_safe=no"
9930 fi
9931 rm -f conftest*
9932 fi
9933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9934   echo "$ac_t""yes" 1>&6
9935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9936   cat >> confdefs.h <<EOF
9937 #define $ac_tr_hdr 1
9938 EOF
9939  
9940 else
9941   echo "$ac_t""no" 1>&6
9942 fi
9943 done
9944
9945         if test $ac_cv_header_mach_cthreads_h = yes ; then
9946                 ol_with_threads=found
9947
9948                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9949 echo "configure:9950: checking for cthread_fork" >&5
9950 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9951   echo $ac_n "(cached) $ac_c" 1>&6
9952 else
9953   cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956 /* System header to define __stub macros and hopefully few prototypes,
9957     which can conflict with char cthread_fork(); below.  */
9958 #include <assert.h>
9959 /* Override any gcc2 internal prototype to avoid an error.  */
9960 /* We use char because int might match the return type of a gcc2
9961     builtin and then its argument prototype would still apply.  */
9962 char cthread_fork();
9963 char (*f)();
9964
9965 int main() {
9966
9967 /* The GNU C library defines this for functions which it implements
9968     to always fail with ENOSYS.  Some functions are actually named
9969     something starting with __ and the normal name is an alias.  */
9970 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9971 choke me
9972 #else
9973 f = cthread_fork;
9974 #endif
9975
9976 ; return 0; }
9977 EOF
9978 if { (eval echo configure:9979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9979   rm -rf conftest*
9980   eval "ac_cv_func_cthread_fork=yes"
9981 else
9982   echo "configure: failed program was:" >&5
9983   cat conftest.$ac_ext >&5
9984   rm -rf conftest*
9985   eval "ac_cv_func_cthread_fork=no"
9986 fi
9987 rm -f conftest*
9988 fi
9989
9990 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9991   echo "$ac_t""yes" 1>&6
9992   ol_link_threads=yes
9993 else
9994   echo "$ac_t""no" 1>&6
9995 fi
9996
9997
9998                 if test $ol_link_threads = no ; then
9999                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10000 echo "configure:10001: checking for cthread_fork with -all_load" >&5
10001 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10002   echo $ac_n "(cached) $ac_c" 1>&6
10003 else
10004   
10005                                                                 save_LIBS="$LIBS"
10006                                 LIBS="-all_load $LIBS"
10007                                 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 #include <mach/cthreads.h>
10011 int main() {
10012
10013                                         cthread_fork((void *)0, (void *)0);
10014                                         
10015 ; return 0; }
10016 EOF
10017 if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10018   rm -rf conftest*
10019   ol_cv_cthread_all_load=yes
10020 else
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   ol_cv_cthread_all_load=no
10025 fi
10026 rm -f conftest*
10027                                                                 LIBS="$save_LIBS"
10028                         
10029 fi
10030
10031 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10032
10033                         if test $ol_cv_cthread_all_load = yes ; then
10034                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10035                                 ol_link_threads=mach
10036                         fi
10037                 fi
10038
10039                 if test $ol_link_threads != no ; then
10040                         : check for cthread specific functionality here
10041                         cat >> confdefs.h <<\EOF
10042 #define HAVE_MACH_CTHREADS 1
10043 EOF
10044
10045                 else
10046                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10047                 fi
10048         fi
10049
10050         if test $ol_with_threads = mach ; then
10051                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10052         fi
10053 fi
10054
10055 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10056         -o $ol_with_threads = pth ; then
10057
10058         for ac_hdr in pth.h
10059 do
10060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10062 echo "configure:10063: checking for $ac_hdr" >&5
10063 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10064   echo $ac_n "(cached) $ac_c" 1>&6
10065 else
10066   cat > conftest.$ac_ext <<EOF
10067 #line 10068 "configure"
10068 #include "confdefs.h"
10069 #include <$ac_hdr>
10070 EOF
10071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10072 { (eval echo configure:10073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10074 if test -z "$ac_err"; then
10075   rm -rf conftest*
10076   eval "ac_cv_header_$ac_safe=yes"
10077 else
10078   echo "$ac_err" >&5
10079   echo "configure: failed program was:" >&5
10080   cat conftest.$ac_ext >&5
10081   rm -rf conftest*
10082   eval "ac_cv_header_$ac_safe=no"
10083 fi
10084 rm -f conftest*
10085 fi
10086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10087   echo "$ac_t""yes" 1>&6
10088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10089   cat >> confdefs.h <<EOF
10090 #define $ac_tr_hdr 1
10091 EOF
10092  
10093 else
10094   echo "$ac_t""no" 1>&6
10095 fi
10096 done
10097
10098
10099         if test $ac_cv_header_pth_h = yes ; then
10100                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10101 echo "configure:10102: checking for pth_version in -lpth" >&5
10102 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   ac_save_LIBS="$LIBS"
10107 LIBS="-lpth  $LIBS"
10108 cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 /* Override any gcc2 internal prototype to avoid an error.  */
10112 /* We use char because int might match the return type of a gcc2
10113     builtin and then its argument prototype would still apply.  */
10114 char pth_version();
10115
10116 int main() {
10117 pth_version()
10118 ; return 0; }
10119 EOF
10120 if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10121   rm -rf conftest*
10122   eval "ac_cv_lib_$ac_lib_var=yes"
10123 else
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   eval "ac_cv_lib_$ac_lib_var=no"
10128 fi
10129 rm -f conftest*
10130 LIBS="$ac_save_LIBS"
10131
10132 fi
10133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10134   echo "$ac_t""yes" 1>&6
10135   have_pth=yes
10136 else
10137   echo "$ac_t""no" 1>&6
10138 have_pth=no
10139 fi
10140
10141
10142                 if test $have_pth = yes ; then
10143                         cat >> confdefs.h <<\EOF
10144 #define HAVE_GNU_PTH 1
10145 EOF
10146
10147                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10148                         ol_link_threads=pth
10149
10150                         if test $ol_with_yielding_select = auto ; then
10151                                 ol_with_yielding_select=yes
10152                         fi
10153                 fi
10154         fi
10155 fi
10156
10157 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10158         -o $ol_with_threads = lwp ; then
10159
10160                 for ac_hdr in thread.h synch.h
10161 do
10162 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10163 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10164 echo "configure:10165: checking for $ac_hdr" >&5
10165 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 #include <$ac_hdr>
10172 EOF
10173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10174 { (eval echo configure:10175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10176 if test -z "$ac_err"; then
10177   rm -rf conftest*
10178   eval "ac_cv_header_$ac_safe=yes"
10179 else
10180   echo "$ac_err" >&5
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   eval "ac_cv_header_$ac_safe=no"
10185 fi
10186 rm -f conftest*
10187 fi
10188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10191   cat >> confdefs.h <<EOF
10192 #define $ac_tr_hdr 1
10193 EOF
10194  
10195 else
10196   echo "$ac_t""no" 1>&6
10197 fi
10198 done
10199
10200         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10201                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10202 echo "configure:10203: checking for thr_create in -lthread" >&5
10203 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10205   echo $ac_n "(cached) $ac_c" 1>&6
10206 else
10207   ac_save_LIBS="$LIBS"
10208 LIBS="-lthread  $LIBS"
10209 cat > conftest.$ac_ext <<EOF
10210 #line 10211 "configure"
10211 #include "confdefs.h"
10212 /* Override any gcc2 internal prototype to avoid an error.  */
10213 /* We use char because int might match the return type of a gcc2
10214     builtin and then its argument prototype would still apply.  */
10215 char thr_create();
10216
10217 int main() {
10218 thr_create()
10219 ; return 0; }
10220 EOF
10221 if { (eval echo configure:10222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10222   rm -rf conftest*
10223   eval "ac_cv_lib_$ac_lib_var=yes"
10224 else
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -rf conftest*
10228   eval "ac_cv_lib_$ac_lib_var=no"
10229 fi
10230 rm -f conftest*
10231 LIBS="$ac_save_LIBS"
10232
10233 fi
10234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10235   echo "$ac_t""yes" 1>&6
10236   have_thr=yes
10237 else
10238   echo "$ac_t""no" 1>&6
10239 have_thr=no
10240 fi
10241
10242
10243                 if test $have_thr = yes ; then
10244                         cat >> confdefs.h <<\EOF
10245 #define HAVE_THR 1
10246 EOF
10247
10248                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10249                         ol_link_threads=thr
10250
10251                         if test $ol_with_yielding_select = auto ; then
10252                                 ol_with_yielding_select=yes
10253                         fi
10254
10255                                                 for ac_func in \
10256                                 thr_setconcurrency \
10257                                 thr_getconcurrency \
10258                         
10259 do
10260 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10261 echo "configure:10262: checking for $ac_func" >&5
10262 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10263   echo $ac_n "(cached) $ac_c" 1>&6
10264 else
10265   cat > conftest.$ac_ext <<EOF
10266 #line 10267 "configure"
10267 #include "confdefs.h"
10268 /* System header to define __stub macros and hopefully few prototypes,
10269     which can conflict with char $ac_func(); below.  */
10270 #include <assert.h>
10271 /* Override any gcc2 internal prototype to avoid an error.  */
10272 /* We use char because int might match the return type of a gcc2
10273     builtin and then its argument prototype would still apply.  */
10274 char $ac_func();
10275 char (*f)();
10276
10277 int main() {
10278
10279 /* The GNU C library defines this for functions which it implements
10280     to always fail with ENOSYS.  Some functions are actually named
10281     something starting with __ and the normal name is an alias.  */
10282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10283 choke me
10284 #else
10285 f = $ac_func;
10286 #endif
10287
10288 ; return 0; }
10289 EOF
10290 if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10291   rm -rf conftest*
10292   eval "ac_cv_func_$ac_func=yes"
10293 else
10294   echo "configure: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   rm -rf conftest*
10297   eval "ac_cv_func_$ac_func=no"
10298 fi
10299 rm -f conftest*
10300 fi
10301
10302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10303   echo "$ac_t""yes" 1>&6
10304     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10305   cat >> confdefs.h <<EOF
10306 #define $ac_tr_func 1
10307 EOF
10308  
10309 else
10310   echo "$ac_t""no" 1>&6
10311 fi
10312 done
10313
10314                 fi
10315         fi
10316
10317                 for ac_hdr in lwp/lwp.h
10318 do
10319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10321 echo "configure:10322: checking for $ac_hdr" >&5
10322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10323   echo $ac_n "(cached) $ac_c" 1>&6
10324 else
10325   cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include <$ac_hdr>
10329 EOF
10330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10331 { (eval echo configure:10332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10333 if test -z "$ac_err"; then
10334   rm -rf conftest*
10335   eval "ac_cv_header_$ac_safe=yes"
10336 else
10337   echo "$ac_err" >&5
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_header_$ac_safe=no"
10342 fi
10343 rm -f conftest*
10344 fi
10345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10346   echo "$ac_t""yes" 1>&6
10347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10348   cat >> confdefs.h <<EOF
10349 #define $ac_tr_hdr 1
10350 EOF
10351  
10352 else
10353   echo "$ac_t""no" 1>&6
10354 fi
10355 done
10356
10357         if test $ac_cv_header_lwp_lwp_h = yes ; then
10358                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10359 echo "configure:10360: checking for lwp_create in -llwp" >&5
10360 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10362   echo $ac_n "(cached) $ac_c" 1>&6
10363 else
10364   ac_save_LIBS="$LIBS"
10365 LIBS="-llwp  $LIBS"
10366 cat > conftest.$ac_ext <<EOF
10367 #line 10368 "configure"
10368 #include "confdefs.h"
10369 /* Override any gcc2 internal prototype to avoid an error.  */
10370 /* We use char because int might match the return type of a gcc2
10371     builtin and then its argument prototype would still apply.  */
10372 char lwp_create();
10373
10374 int main() {
10375 lwp_create()
10376 ; return 0; }
10377 EOF
10378 if { (eval echo configure:10379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10379   rm -rf conftest*
10380   eval "ac_cv_lib_$ac_lib_var=yes"
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   eval "ac_cv_lib_$ac_lib_var=no"
10386 fi
10387 rm -f conftest*
10388 LIBS="$ac_save_LIBS"
10389
10390 fi
10391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10392   echo "$ac_t""yes" 1>&6
10393   have_lwp=yes
10394 else
10395   echo "$ac_t""no" 1>&6
10396 have_lwp=no
10397 fi
10398
10399
10400                 if test $have_lwp = yes ; then
10401                         cat >> confdefs.h <<\EOF
10402 #define HAVE_LWP 1
10403 EOF
10404
10405                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10406                         ol_link_threads=lwp
10407
10408                         if test $ol_with_yielding_select = auto ; then
10409                                 ol_with_yielding_select=no
10410                         fi
10411                 fi
10412         fi
10413 fi
10414
10415 if test $ol_with_yielding_select = yes ; then
10416         cat >> confdefs.h <<\EOF
10417 #define HAVE_YIELDING_SELECT 1
10418 EOF
10419
10420 fi
10421
10422 if test $ol_with_threads = manual ; then
10423                 ol_link_threads=yes
10424
10425         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10426
10427         for ac_hdr in pthread.h sched.h
10428 do
10429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10431 echo "configure:10432: checking for $ac_hdr" >&5
10432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10433   echo $ac_n "(cached) $ac_c" 1>&6
10434 else
10435   cat > conftest.$ac_ext <<EOF
10436 #line 10437 "configure"
10437 #include "confdefs.h"
10438 #include <$ac_hdr>
10439 EOF
10440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10441 { (eval echo configure:10442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10443 if test -z "$ac_err"; then
10444   rm -rf conftest*
10445   eval "ac_cv_header_$ac_safe=yes"
10446 else
10447   echo "$ac_err" >&5
10448   echo "configure: failed program was:" >&5
10449   cat conftest.$ac_ext >&5
10450   rm -rf conftest*
10451   eval "ac_cv_header_$ac_safe=no"
10452 fi
10453 rm -f conftest*
10454 fi
10455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10456   echo "$ac_t""yes" 1>&6
10457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10458   cat >> confdefs.h <<EOF
10459 #define $ac_tr_hdr 1
10460 EOF
10461  
10462 else
10463   echo "$ac_t""no" 1>&6
10464 fi
10465 done
10466
10467         for ac_func in sched_yield pthread_yield
10468 do
10469 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10470 echo "configure:10471: checking for $ac_func" >&5
10471 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10472   echo $ac_n "(cached) $ac_c" 1>&6
10473 else
10474   cat > conftest.$ac_ext <<EOF
10475 #line 10476 "configure"
10476 #include "confdefs.h"
10477 /* System header to define __stub macros and hopefully few prototypes,
10478     which can conflict with char $ac_func(); below.  */
10479 #include <assert.h>
10480 /* Override any gcc2 internal prototype to avoid an error.  */
10481 /* We use char because int might match the return type of a gcc2
10482     builtin and then its argument prototype would still apply.  */
10483 char $ac_func();
10484 char (*f)();
10485
10486 int main() {
10487
10488 /* The GNU C library defines this for functions which it implements
10489     to always fail with ENOSYS.  Some functions are actually named
10490     something starting with __ and the normal name is an alias.  */
10491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10492 choke me
10493 #else
10494 f = $ac_func;
10495 #endif
10496
10497 ; return 0; }
10498 EOF
10499 if { (eval echo configure:10500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10500   rm -rf conftest*
10501   eval "ac_cv_func_$ac_func=yes"
10502 else
10503   echo "configure: failed program was:" >&5
10504   cat conftest.$ac_ext >&5
10505   rm -rf conftest*
10506   eval "ac_cv_func_$ac_func=no"
10507 fi
10508 rm -f conftest*
10509 fi
10510
10511 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10512   echo "$ac_t""yes" 1>&6
10513     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10514   cat >> confdefs.h <<EOF
10515 #define $ac_tr_func 1
10516 EOF
10517  
10518 else
10519   echo "$ac_t""no" 1>&6
10520 fi
10521 done
10522
10523         
10524         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10525 echo "configure:10526: checking for LinuxThreads pthread.h" >&5
10526 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532 #include <pthread.h>
10533 EOF
10534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10535   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10536   rm -rf conftest*
10537   ol_cv_header_linux_threads=yes
10538 else
10539   rm -rf conftest*
10540   ol_cv_header_linux_threads=no
10541 fi
10542 rm -f conftest*
10543
10544                 
10545 fi
10546
10547 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10548         if test $ol_cv_header_linux_threads = yes; then
10549                 cat >> confdefs.h <<\EOF
10550 #define HAVE_LINUX_THREADS 1
10551 EOF
10552
10553         fi
10554
10555
10556         for ac_hdr in mach/cthreads.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 \"\${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         for ac_hdr in lwp/lwp.h
10597 do
10598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10600 echo "configure:10601: checking for $ac_hdr" >&5
10601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10602   echo $ac_n "(cached) $ac_c" 1>&6
10603 else
10604   cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607 #include <$ac_hdr>
10608 EOF
10609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10610 { (eval echo configure:10611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10612 if test -z "$ac_err"; then
10613   rm -rf conftest*
10614   eval "ac_cv_header_$ac_safe=yes"
10615 else
10616   echo "$ac_err" >&5
10617   echo "configure: failed program was:" >&5
10618   cat conftest.$ac_ext >&5
10619   rm -rf conftest*
10620   eval "ac_cv_header_$ac_safe=no"
10621 fi
10622 rm -f conftest*
10623 fi
10624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10625   echo "$ac_t""yes" 1>&6
10626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10627   cat >> confdefs.h <<EOF
10628 #define $ac_tr_hdr 1
10629 EOF
10630  
10631 else
10632   echo "$ac_t""no" 1>&6
10633 fi
10634 done
10635
10636         for ac_hdr in thread.h synch.h
10637 do
10638 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10639 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10640 echo "configure:10641: checking for $ac_hdr" >&5
10641 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10642   echo $ac_n "(cached) $ac_c" 1>&6
10643 else
10644   cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647 #include <$ac_hdr>
10648 EOF
10649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10650 { (eval echo configure:10651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10652 if test -z "$ac_err"; then
10653   rm -rf conftest*
10654   eval "ac_cv_header_$ac_safe=yes"
10655 else
10656   echo "$ac_err" >&5
10657   echo "configure: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   rm -rf conftest*
10660   eval "ac_cv_header_$ac_safe=no"
10661 fi
10662 rm -f conftest*
10663 fi
10664 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10665   echo "$ac_t""yes" 1>&6
10666     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10667   cat >> confdefs.h <<EOF
10668 #define $ac_tr_hdr 1
10669 EOF
10670  
10671 else
10672   echo "$ac_t""no" 1>&6
10673 fi
10674 done
10675
10676 fi
10677
10678 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10679                         cat >> confdefs.h <<\EOF
10680 #define REENTRANT 1
10681 EOF
10682
10683         cat >> confdefs.h <<\EOF
10684 #define _REENTRANT 1
10685 EOF
10686
10687         cat >> confdefs.h <<\EOF
10688 #define THREAD_SAFE 1
10689 EOF
10690
10691         cat >> confdefs.h <<\EOF
10692 #define _THREAD_SAFE 1
10693 EOF
10694
10695         cat >> confdefs.h <<\EOF
10696 #define THREADSAFE 1
10697 EOF
10698
10699         cat >> confdefs.h <<\EOF
10700 #define _THREADSAFE 1
10701 EOF
10702
10703         cat >> confdefs.h <<\EOF
10704 #define _SGI_MP_SOURCE 1
10705 EOF
10706
10707
10708                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10709 echo "configure:10710: checking for thread specific errno" >&5
10710 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10711   echo $ac_n "(cached) $ac_c" 1>&6
10712 else
10713   
10714                 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717 #include <errno.h>
10718 int main() {
10719 errno = 0;
10720 ; return 0; }
10721 EOF
10722 if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10723   rm -rf conftest*
10724   ol_cv_errno_thread_specific=yes
10725 else
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -rf conftest*
10729   ol_cv_errno_thread_specific=no
10730 fi
10731 rm -f conftest*
10732         
10733 fi
10734
10735 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10736
10737                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10738 echo "configure:10739: checking for thread specific h_errno" >&5
10739 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   
10743                 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <netdb.h>
10747 int main() {
10748 h_errno = 0;
10749 ; return 0; }
10750 EOF
10751 if { (eval echo configure:10752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10752   rm -rf conftest*
10753   ol_cv_h_errno_thread_specific=yes
10754 else
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -rf conftest*
10758   ol_cv_h_errno_thread_specific=no
10759 fi
10760 rm -f conftest*
10761         
10762 fi
10763
10764 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10765
10766         if test $ol_cv_errno_thread_specific != yes \
10767                 -o $ol_cv_h_errno_thread_specific != yes ; then
10768                 LIBS="$LTHREAD_LIBS $LIBS"
10769                 LTHREAD_LIBS=""
10770         fi
10771
10772 fi  
10773
10774 if test $ol_link_threads = no ; then
10775         if test $ol_with_threads = yes ; then
10776                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10777         fi
10778
10779         if test $ol_with_threads = auto ; then
10780                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10781                 ol_with_threads=no
10782         fi
10783
10784         cat >> confdefs.h <<\EOF
10785 #define NO_THREADS 1
10786 EOF
10787
10788         LTHREAD_LIBS=""
10789 fi
10790
10791 if test $ol_link_threads != no ; then
10792         cat >> confdefs.h <<\EOF
10793 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10794 EOF
10795
10796 fi
10797
10798
10799 ol_link_ldbm=no 
10800 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10801         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10802 echo "configure:10803: checking for DB2 library" >&5
10803 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10804   echo $ac_n "(cached) $ac_c" 1>&6
10805 else
10806         ol_LIBS="$LIBS"
10807         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10808 echo "configure:10809: checking for db_appexit in -ldb" >&5
10809 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10810 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   ac_save_LIBS="$LIBS"
10814 LIBS="-ldb  $LIBS"
10815 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 /* Override any gcc2 internal prototype to avoid an error.  */
10819 /* We use char because int might match the return type of a gcc2
10820     builtin and then its argument prototype would still apply.  */
10821 char db_appexit();
10822
10823 int main() {
10824 db_appexit()
10825 ; return 0; }
10826 EOF
10827 if { (eval echo configure:10828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10828   rm -rf conftest*
10829   eval "ac_cv_lib_$ac_lib_var=yes"
10830 else
10831   echo "configure: failed program was:" >&5
10832   cat conftest.$ac_ext >&5
10833   rm -rf conftest*
10834   eval "ac_cv_lib_$ac_lib_var=no"
10835 fi
10836 rm -f conftest*
10837 LIBS="$ac_save_LIBS"
10838
10839 fi
10840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10841   echo "$ac_t""yes" 1>&6
10842   ol_cv_lib_db2=-ldb
10843 else
10844   echo "$ac_t""no" 1>&6
10845 ol_cv_lib_db2=no
10846 fi
10847
10848         LIBS="$ol_LIBS"
10849
10850 fi
10851
10852 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10853
10854 for ac_hdr in db.h
10855 do
10856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10858 echo "configure:10859: checking for $ac_hdr" >&5
10859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10860   echo $ac_n "(cached) $ac_c" 1>&6
10861 else
10862   cat > conftest.$ac_ext <<EOF
10863 #line 10864 "configure"
10864 #include "confdefs.h"
10865 #include <$ac_hdr>
10866 EOF
10867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10868 { (eval echo configure:10869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10870 if test -z "$ac_err"; then
10871   rm -rf conftest*
10872   eval "ac_cv_header_$ac_safe=yes"
10873 else
10874   echo "$ac_err" >&5
10875   echo "configure: failed program was:" >&5
10876   cat conftest.$ac_ext >&5
10877   rm -rf conftest*
10878   eval "ac_cv_header_$ac_safe=no"
10879 fi
10880 rm -f conftest*
10881 fi
10882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10883   echo "$ac_t""yes" 1>&6
10884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10885   cat >> confdefs.h <<EOF
10886 #define $ac_tr_hdr 1
10887 EOF
10888  
10889 else
10890   echo "$ac_t""no" 1>&6
10891 fi
10892 done
10893
10894 if test $ac_cv_header_db_h = yes ; then
10895         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10896 echo "configure:10897: checking if db.h is DB2" >&5
10897 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   
10901                 cat > conftest.$ac_ext <<EOF
10902 #line 10903 "configure"
10903 #include "confdefs.h"
10904
10905 #                       include <db.h>
10906                         /* this check could be improved */
10907 #                       ifdef DB_VERSION_MAJOR
10908 #                               if DB_VERSION_MAJOR == 2
10909                                         __db_version_2;
10910 #                               endif
10911 #                       endif
10912                 
10913 EOF
10914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10915   egrep "__db_version_2" >/dev/null 2>&1; then
10916   rm -rf conftest*
10917   ol_cv_header_db2=yes
10918 else
10919   rm -rf conftest*
10920   ol_cv_header_db2=no
10921 fi
10922 rm -f conftest*
10923
10924 fi
10925
10926 echo "$ac_t""$ol_cv_header_db2" 1>&6
10927 else
10928         ol_cv_header_db2=no
10929 fi
10930
10931
10932  
10933  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10934 echo "configure:10935: checking for Berkeley DB2" >&5
10935 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10936   echo $ac_n "(cached) $ac_c" 1>&6
10937 else
10938   
10939         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10940                 ol_cv_berkeley_db2=no
10941         else
10942                 ol_cv_berkeley_db2=yes
10943         fi
10944
10945 fi
10946
10947 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10948  if test $ol_cv_berkeley_db2 = yes ; then
10949         cat >> confdefs.h <<\EOF
10950 #define HAVE_BERKELEY_DB2 1
10951 EOF
10952
10953  fi
10954
10955
10956         if test $ol_cv_berkeley_db2 = yes ; then
10957                 ol_link_ldbm=db2
10958                 ol_with_ldbm_api=db2
10959
10960                 if test $ol_with_ldbm_type = hash ; then
10961                         cat >> confdefs.h <<\EOF
10962 #define LDBM_USE_DBHASH 1
10963 EOF
10964
10965                 else
10966                         cat >> confdefs.h <<\EOF
10967 #define LDBM_USE_DBBTREE 1
10968 EOF
10969
10970                 fi
10971
10972                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10973 echo "configure:10974: checking for DB_THREAD support" >&5
10974 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10975   echo $ac_n "(cached) $ac_c" 1>&6
10976 else
10977   
10978         ol_LIBS="$LIBS"
10979         if test $ol_cv_lib_db2 != yes ; then
10980                 LIBS="$ol_cv_lib_db2"
10981         fi
10982
10983         if test "$cross_compiling" = yes; then
10984   ol_cv_berkeley_db2_db_thread=cross
10985 else
10986   cat > conftest.$ac_ext <<EOF
10987 #line 10988 "configure"
10988 #include "confdefs.h"
10989
10990 #include <db.h>
10991 #ifndef NULL
10992 #define NULL ((void *)0)
10993 #endif
10994 main()
10995 {
10996         int rc;
10997         DB_ENV env;
10998         u_int32_t flags = DB_CREATE | DB_THREAD;
10999
11000         memset( &env, '\0', sizeof(env) );
11001
11002         rc = db_appinit( NULL, NULL, &env, flags );
11003
11004         if( rc == 0 ) {
11005                 db_appexit( &env );
11006         }
11007
11008         return rc;
11009 }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11012 then
11013   ol_cv_berkeley_db2_db_thread=yes
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -fr conftest*
11018   ol_cv_berkeley_db2_db_thread=no
11019 fi
11020 rm -fr conftest*
11021 fi
11022
11023
11024         LIBS="$ol_LIBS"
11025
11026         if test $ol_cv_berkeley_db2_db_thread != no ; then
11027                 cat >> confdefs.h <<\EOF
11028 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11029 EOF
11030
11031         fi
11032
11033 fi
11034
11035 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11036
11037                                                 if test $ol_cv_lib_db2 != yes ; then
11038                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11039                 fi
11040         fi
11041 fi
11042
11043 ol_link_bdb2=no
11044 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11045         if test $ol_cv_berkeley_db2_db_thread != no ; then
11046                 ol_link_bdb2=yes
11047         else
11048                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11049         fi
11050 fi
11051
11052 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11053         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11054 echo "configure:11055: checking for Berkeley DB library" >&5
11055 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   
11059         for ac_hdr in db1/db.h
11060 do
11061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11063 echo "configure:11064: checking for $ac_hdr" >&5
11064 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070 #include <$ac_hdr>
11071 EOF
11072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11073 { (eval echo configure:11074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11075 if test -z "$ac_err"; then
11076   rm -rf conftest*
11077   eval "ac_cv_header_$ac_safe=yes"
11078 else
11079   echo "$ac_err" >&5
11080   echo "configure: failed program was:" >&5
11081   cat conftest.$ac_ext >&5
11082   rm -rf conftest*
11083   eval "ac_cv_header_$ac_safe=no"
11084 fi
11085 rm -f conftest*
11086 fi
11087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11088   echo "$ac_t""yes" 1>&6
11089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11090   cat >> confdefs.h <<EOF
11091 #define $ac_tr_hdr 1
11092 EOF
11093  
11094 else
11095   echo "$ac_t""no" 1>&6
11096 fi
11097 done
11098
11099         ol_LIBS="$LIBS"
11100         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11101 echo "configure:11102: checking for dbopen" >&5
11102 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11103   echo $ac_n "(cached) $ac_c" 1>&6
11104 else
11105   cat > conftest.$ac_ext <<EOF
11106 #line 11107 "configure"
11107 #include "confdefs.h"
11108 /* System header to define __stub macros and hopefully few prototypes,
11109     which can conflict with char dbopen(); below.  */
11110 #include <assert.h>
11111 /* Override any gcc2 internal prototype to avoid an error.  */
11112 /* We use char because int might match the return type of a gcc2
11113     builtin and then its argument prototype would still apply.  */
11114 char dbopen();
11115 char (*f)();
11116
11117 int main() {
11118
11119 /* The GNU C library defines this for functions which it implements
11120     to always fail with ENOSYS.  Some functions are actually named
11121     something starting with __ and the normal name is an alias.  */
11122 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11123 choke me
11124 #else
11125 f = dbopen;
11126 #endif
11127
11128 ; return 0; }
11129 EOF
11130 if { (eval echo configure:11131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11131   rm -rf conftest*
11132   eval "ac_cv_func_dbopen=yes"
11133 else
11134   echo "configure: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   rm -rf conftest*
11137   eval "ac_cv_func_dbopen=no"
11138 fi
11139 rm -f conftest*
11140 fi
11141
11142 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144   ol_cv_lib_db=yes
11145 else
11146   echo "$ac_t""no" 1>&6
11147
11148                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11149 echo "configure:11150: checking for dbopen in -ldb1" >&5
11150 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11152   echo $ac_n "(cached) $ac_c" 1>&6
11153 else
11154   ac_save_LIBS="$LIBS"
11155 LIBS="-ldb1  $LIBS"
11156 cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159 /* Override any gcc2 internal prototype to avoid an error.  */
11160 /* We use char because int might match the return type of a gcc2
11161     builtin and then its argument prototype would still apply.  */
11162 char dbopen();
11163
11164 int main() {
11165 dbopen()
11166 ; return 0; }
11167 EOF
11168 if { (eval echo configure:11169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11169   rm -rf conftest*
11170   eval "ac_cv_lib_$ac_lib_var=yes"
11171 else
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=no"
11176 fi
11177 rm -f conftest*
11178 LIBS="$ac_save_LIBS"
11179
11180 fi
11181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11182   echo "$ac_t""yes" 1>&6
11183   ol_cv_lib_db=-ldb1
11184 else
11185   echo "$ac_t""no" 1>&6
11186
11187                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11188 echo "configure:11189: checking for dbopen in -ldb" >&5
11189 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11191   echo $ac_n "(cached) $ac_c" 1>&6
11192 else
11193   ac_save_LIBS="$LIBS"
11194 LIBS="-ldb  $LIBS"
11195 cat > conftest.$ac_ext <<EOF
11196 #line 11197 "configure"
11197 #include "confdefs.h"
11198 /* Override any gcc2 internal prototype to avoid an error.  */
11199 /* We use char because int might match the return type of a gcc2
11200     builtin and then its argument prototype would still apply.  */
11201 char dbopen();
11202
11203 int main() {
11204 dbopen()
11205 ; return 0; }
11206 EOF
11207 if { (eval echo configure:11208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11208   rm -rf conftest*
11209   eval "ac_cv_lib_$ac_lib_var=yes"
11210 else
11211   echo "configure: failed program was:" >&5
11212   cat conftest.$ac_ext >&5
11213   rm -rf conftest*
11214   eval "ac_cv_lib_$ac_lib_var=no"
11215 fi
11216 rm -f conftest*
11217 LIBS="$ac_save_LIBS"
11218
11219 fi
11220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11221   echo "$ac_t""yes" 1>&6
11222   ol_cv_lib_db=-ldb
11223 else
11224   echo "$ac_t""no" 1>&6
11225 ol_cv_lib_db=no
11226 fi
11227
11228                 
11229 fi
11230
11231         
11232 fi
11233
11234         LIBS="$ol_LIBS"
11235
11236 fi
11237
11238 echo "$ac_t""$ol_cv_lib_db" 1>&6
11239
11240
11241 for ac_hdr in db_185.h
11242 do
11243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11245 echo "configure:11246: checking for $ac_hdr" >&5
11246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 #include <$ac_hdr>
11253 EOF
11254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11255 { (eval echo configure:11256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11257 if test -z "$ac_err"; then
11258   rm -rf conftest*
11259   eval "ac_cv_header_$ac_safe=yes"
11260 else
11261   echo "$ac_err" >&5
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=no"
11266 fi
11267 rm -f conftest*
11268 fi
11269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11270   echo "$ac_t""yes" 1>&6
11271     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11272   cat >> confdefs.h <<EOF
11273 #define $ac_tr_hdr 1
11274 EOF
11275  
11276 else
11277   echo "$ac_t""no" 1>&6
11278 fi
11279 done
11280
11281 if test "$ol_cv_header_db2" = yes ; then
11282         
11283         ol_cv_header_db=$ac_cv_header_db_185_h
11284 else
11285         ol_cv_header_db=$ac_cv_header_db_h
11286 fi
11287
11288
11289  
11290  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11291 echo "configure:11292: checking for Berkeley DB" >&5
11292 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   
11296         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11297                 ol_cv_berkeley_db=no
11298         else
11299                 ol_cv_berkeley_db=yes
11300         fi
11301
11302 fi
11303
11304 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11305  if test $ol_cv_berkeley_db = yes ; then
11306         cat >> confdefs.h <<\EOF
11307 #define HAVE_BERKELEY_DB 1
11308 EOF
11309
11310  fi
11311
11312
11313         if test $ol_cv_berkeley_db = yes ; then
11314                 ol_link_ldbm=db
11315                 ol_with_ldbm_api=db
11316
11317                 if test $ol_with_ldbm_type = hash ; then
11318                         cat >> confdefs.h <<\EOF
11319 #define LDBM_USE_DBHASH 1
11320 EOF
11321
11322                 else
11323                         cat >> confdefs.h <<\EOF
11324 #define LDBM_USE_DBBTREE 1
11325 EOF
11326
11327                 fi
11328
11329                                                 if test $ol_cv_lib_db != yes ; then
11330                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11331                 fi
11332         fi
11333 fi
11334
11335 if test $ol_with_ldbm_api = manual ; then
11336                 ol_link_ldbm=yes
11337
11338         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11339
11340         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11341 do
11342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11344 echo "configure:11345: checking for $ac_hdr" >&5
11345 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11346   echo $ac_n "(cached) $ac_c" 1>&6
11347 else
11348   cat > conftest.$ac_ext <<EOF
11349 #line 11350 "configure"
11350 #include "confdefs.h"
11351 #include <$ac_hdr>
11352 EOF
11353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11354 { (eval echo configure:11355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11356 if test -z "$ac_err"; then
11357   rm -rf conftest*
11358   eval "ac_cv_header_$ac_safe=yes"
11359 else
11360   echo "$ac_err" >&5
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_header_$ac_safe=no"
11365 fi
11366 rm -f conftest*
11367 fi
11368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11369   echo "$ac_t""yes" 1>&6
11370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11371   cat >> confdefs.h <<EOF
11372 #define $ac_tr_hdr 1
11373 EOF
11374  
11375 else
11376   echo "$ac_t""no" 1>&6
11377 fi
11378 done
11379
11380 fi
11381
11382 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11383         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11384         ol_with_ldbm_api=none
11385 fi
11386
11387 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11388         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11389 echo "configure:11390: checking for MDBM library" >&5
11390 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11391   echo $ac_n "(cached) $ac_c" 1>&6
11392 else
11393         ol_LIBS="$LIBS"
11394         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11395 echo "configure:11396: checking for mdbm_set_chain" >&5
11396 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11397   echo $ac_n "(cached) $ac_c" 1>&6
11398 else
11399   cat > conftest.$ac_ext <<EOF
11400 #line 11401 "configure"
11401 #include "confdefs.h"
11402 /* System header to define __stub macros and hopefully few prototypes,
11403     which can conflict with char mdbm_set_chain(); below.  */
11404 #include <assert.h>
11405 /* Override any gcc2 internal prototype to avoid an error.  */
11406 /* We use char because int might match the return type of a gcc2
11407     builtin and then its argument prototype would still apply.  */
11408 char mdbm_set_chain();
11409 char (*f)();
11410
11411 int main() {
11412
11413 /* The GNU C library defines this for functions which it implements
11414     to always fail with ENOSYS.  Some functions are actually named
11415     something starting with __ and the normal name is an alias.  */
11416 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11417 choke me
11418 #else
11419 f = mdbm_set_chain;
11420 #endif
11421
11422 ; return 0; }
11423 EOF
11424 if { (eval echo configure:11425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11425   rm -rf conftest*
11426   eval "ac_cv_func_mdbm_set_chain=yes"
11427 else
11428   echo "configure: failed program was:" >&5
11429   cat conftest.$ac_ext >&5
11430   rm -rf conftest*
11431   eval "ac_cv_func_mdbm_set_chain=no"
11432 fi
11433 rm -f conftest*
11434 fi
11435
11436 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11437   echo "$ac_t""yes" 1>&6
11438   ol_cv_lib_mdbm=yes
11439 else
11440   echo "$ac_t""no" 1>&6
11441
11442                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11443 echo "configure:11444: checking for mdbm_set_chain in -lmdbm" >&5
11444 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11445 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11446   echo $ac_n "(cached) $ac_c" 1>&6
11447 else
11448   ac_save_LIBS="$LIBS"
11449 LIBS="-lmdbm  $LIBS"
11450 cat > conftest.$ac_ext <<EOF
11451 #line 11452 "configure"
11452 #include "confdefs.h"
11453 /* Override any gcc2 internal prototype to avoid an error.  */
11454 /* We use char because int might match the return type of a gcc2
11455     builtin and then its argument prototype would still apply.  */
11456 char mdbm_set_chain();
11457
11458 int main() {
11459 mdbm_set_chain()
11460 ; return 0; }
11461 EOF
11462 if { (eval echo configure:11463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11463   rm -rf conftest*
11464   eval "ac_cv_lib_$ac_lib_var=yes"
11465 else
11466   echo "configure: failed program was:" >&5
11467   cat conftest.$ac_ext >&5
11468   rm -rf conftest*
11469   eval "ac_cv_lib_$ac_lib_var=no"
11470 fi
11471 rm -f conftest*
11472 LIBS="$ac_save_LIBS"
11473
11474 fi
11475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11476   echo "$ac_t""yes" 1>&6
11477   ol_cv_lib_mdbm=-lmdbm
11478 else
11479   echo "$ac_t""no" 1>&6
11480 ol_cv_lib_mdbm=no
11481 fi
11482
11483         
11484 fi
11485
11486         LIBS="$ol_LIBS"
11487
11488 fi
11489
11490 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11491
11492
11493  for ac_hdr in mdbm.h
11494 do
11495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11497 echo "configure:11498: checking for $ac_hdr" >&5
11498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11499   echo $ac_n "(cached) $ac_c" 1>&6
11500 else
11501   cat > conftest.$ac_ext <<EOF
11502 #line 11503 "configure"
11503 #include "confdefs.h"
11504 #include <$ac_hdr>
11505 EOF
11506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11507 { (eval echo configure:11508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11509 if test -z "$ac_err"; then
11510   rm -rf conftest*
11511   eval "ac_cv_header_$ac_safe=yes"
11512 else
11513   echo "$ac_err" >&5
11514   echo "configure: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   rm -rf conftest*
11517   eval "ac_cv_header_$ac_safe=no"
11518 fi
11519 rm -f conftest*
11520 fi
11521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11522   echo "$ac_t""yes" 1>&6
11523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11524   cat >> confdefs.h <<EOF
11525 #define $ac_tr_hdr 1
11526 EOF
11527  
11528 else
11529   echo "$ac_t""no" 1>&6
11530 fi
11531 done
11532
11533  echo $ac_n "checking for db""... $ac_c" 1>&6
11534 echo "configure:11535: checking for db" >&5
11535 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   
11539         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11540                 ol_cv_mdbm=no
11541         else
11542                 ol_cv_mdbm=yes
11543         fi
11544
11545 fi
11546
11547 echo "$ac_t""$ol_cv_mdbm" 1>&6
11548  if test $ol_cv_mdbm = yes ; then
11549         cat >> confdefs.h <<\EOF
11550 #define HAVE_MDBM 1
11551 EOF
11552
11553  fi
11554
11555
11556         if test $ol_cv_mdbm = yes ; then
11557                 ol_link_ldbm=mdbm
11558                 ol_with_ldbm_api=mdbm
11559                 if test $ol_cv_lib_mdbm != yes ; then
11560                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11561                 fi
11562         fi
11563 fi
11564
11565 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11566         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11567 echo "configure:11568: checking for GDBM library" >&5
11568 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11569   echo $ac_n "(cached) $ac_c" 1>&6
11570 else
11571         ol_LIBS="$LIBS"
11572         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11573 echo "configure:11574: checking for gdbm_open" >&5
11574 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11575   echo $ac_n "(cached) $ac_c" 1>&6
11576 else
11577   cat > conftest.$ac_ext <<EOF
11578 #line 11579 "configure"
11579 #include "confdefs.h"
11580 /* System header to define __stub macros and hopefully few prototypes,
11581     which can conflict with char gdbm_open(); below.  */
11582 #include <assert.h>
11583 /* Override any gcc2 internal prototype to avoid an error.  */
11584 /* We use char because int might match the return type of a gcc2
11585     builtin and then its argument prototype would still apply.  */
11586 char gdbm_open();
11587 char (*f)();
11588
11589 int main() {
11590
11591 /* The GNU C library defines this for functions which it implements
11592     to always fail with ENOSYS.  Some functions are actually named
11593     something starting with __ and the normal name is an alias.  */
11594 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11595 choke me
11596 #else
11597 f = gdbm_open;
11598 #endif
11599
11600 ; return 0; }
11601 EOF
11602 if { (eval echo configure:11603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11603   rm -rf conftest*
11604   eval "ac_cv_func_gdbm_open=yes"
11605 else
11606   echo "configure: failed program was:" >&5
11607   cat conftest.$ac_ext >&5
11608   rm -rf conftest*
11609   eval "ac_cv_func_gdbm_open=no"
11610 fi
11611 rm -f conftest*
11612 fi
11613
11614 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11615   echo "$ac_t""yes" 1>&6
11616   ol_cv_lib_gdbm=yes
11617 else
11618   echo "$ac_t""no" 1>&6
11619
11620                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11621 echo "configure:11622: checking for gdbm_open in -lgdbm" >&5
11622 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11624   echo $ac_n "(cached) $ac_c" 1>&6
11625 else
11626   ac_save_LIBS="$LIBS"
11627 LIBS="-lgdbm  $LIBS"
11628 cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 /* Override any gcc2 internal prototype to avoid an error.  */
11632 /* We use char because int might match the return type of a gcc2
11633     builtin and then its argument prototype would still apply.  */
11634 char gdbm_open();
11635
11636 int main() {
11637 gdbm_open()
11638 ; return 0; }
11639 EOF
11640 if { (eval echo configure:11641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11641   rm -rf conftest*
11642   eval "ac_cv_lib_$ac_lib_var=yes"
11643 else
11644   echo "configure: failed program was:" >&5
11645   cat conftest.$ac_ext >&5
11646   rm -rf conftest*
11647   eval "ac_cv_lib_$ac_lib_var=no"
11648 fi
11649 rm -f conftest*
11650 LIBS="$ac_save_LIBS"
11651
11652 fi
11653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11654   echo "$ac_t""yes" 1>&6
11655   ol_cv_lib_gdbm=-lgdbm
11656 else
11657   echo "$ac_t""no" 1>&6
11658 ol_cv_lib_gdbm=no
11659 fi
11660
11661         
11662 fi
11663
11664         LIBS="$ol_LIBS"
11665
11666 fi
11667
11668 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11669
11670
11671  for ac_hdr in gdbm.h
11672 do
11673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11675 echo "configure:11676: checking for $ac_hdr" >&5
11676 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11677   echo $ac_n "(cached) $ac_c" 1>&6
11678 else
11679   cat > conftest.$ac_ext <<EOF
11680 #line 11681 "configure"
11681 #include "confdefs.h"
11682 #include <$ac_hdr>
11683 EOF
11684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11685 { (eval echo configure:11686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11687 if test -z "$ac_err"; then
11688   rm -rf conftest*
11689   eval "ac_cv_header_$ac_safe=yes"
11690 else
11691   echo "$ac_err" >&5
11692   echo "configure: failed program was:" >&5
11693   cat conftest.$ac_ext >&5
11694   rm -rf conftest*
11695   eval "ac_cv_header_$ac_safe=no"
11696 fi
11697 rm -f conftest*
11698 fi
11699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11700   echo "$ac_t""yes" 1>&6
11701     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11702   cat >> confdefs.h <<EOF
11703 #define $ac_tr_hdr 1
11704 EOF
11705  
11706 else
11707   echo "$ac_t""no" 1>&6
11708 fi
11709 done
11710
11711  echo $ac_n "checking for db""... $ac_c" 1>&6
11712 echo "configure:11713: checking for db" >&5
11713 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11714   echo $ac_n "(cached) $ac_c" 1>&6
11715 else
11716   
11717         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11718                 ol_cv_gdbm=no
11719         else
11720                 ol_cv_gdbm=yes
11721         fi
11722
11723 fi
11724
11725 echo "$ac_t""$ol_cv_gdbm" 1>&6
11726  if test $ol_cv_gdbm = yes ; then
11727         cat >> confdefs.h <<\EOF
11728 #define HAVE_GDBM 1
11729 EOF
11730
11731  fi
11732
11733
11734         if test $ol_cv_gdbm = yes ; then
11735                 ol_link_ldbm=gdbm
11736                 ol_with_ldbm_api=gdbm
11737
11738                 if test $ol_cv_lib_gdbm != yes ; then
11739                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11740                 fi
11741         fi
11742 fi
11743
11744 if test $ol_with_ldbm_api = auto ; then
11745         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11746 elif test $ol_with_ldbm_api = ndbm ; then
11747         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11748 echo "configure:11749: checking for NDBM library" >&5
11749 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11750   echo $ac_n "(cached) $ac_c" 1>&6
11751 else
11752         ol_LIBS="$LIBS"
11753         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11754 echo "configure:11755: checking for dbm_open" >&5
11755 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11756   echo $ac_n "(cached) $ac_c" 1>&6
11757 else
11758   cat > conftest.$ac_ext <<EOF
11759 #line 11760 "configure"
11760 #include "confdefs.h"
11761 /* System header to define __stub macros and hopefully few prototypes,
11762     which can conflict with char dbm_open(); below.  */
11763 #include <assert.h>
11764 /* Override any gcc2 internal prototype to avoid an error.  */
11765 /* We use char because int might match the return type of a gcc2
11766     builtin and then its argument prototype would still apply.  */
11767 char dbm_open();
11768 char (*f)();
11769
11770 int main() {
11771
11772 /* The GNU C library defines this for functions which it implements
11773     to always fail with ENOSYS.  Some functions are actually named
11774     something starting with __ and the normal name is an alias.  */
11775 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11776 choke me
11777 #else
11778 f = dbm_open;
11779 #endif
11780
11781 ; return 0; }
11782 EOF
11783 if { (eval echo configure:11784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11784   rm -rf conftest*
11785   eval "ac_cv_func_dbm_open=yes"
11786 else
11787   echo "configure: failed program was:" >&5
11788   cat conftest.$ac_ext >&5
11789   rm -rf conftest*
11790   eval "ac_cv_func_dbm_open=no"
11791 fi
11792 rm -f conftest*
11793 fi
11794
11795 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11796   echo "$ac_t""yes" 1>&6
11797   ol_cv_lib_ndbm=yes
11798 else
11799   echo "$ac_t""no" 1>&6
11800
11801                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11802 echo "configure:11803: checking for dbm_open in -lndbm" >&5
11803 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11805   echo $ac_n "(cached) $ac_c" 1>&6
11806 else
11807   ac_save_LIBS="$LIBS"
11808 LIBS="-lndbm  $LIBS"
11809 cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 /* Override any gcc2 internal prototype to avoid an error.  */
11813 /* We use char because int might match the return type of a gcc2
11814     builtin and then its argument prototype would still apply.  */
11815 char dbm_open();
11816
11817 int main() {
11818 dbm_open()
11819 ; return 0; }
11820 EOF
11821 if { (eval echo configure:11822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11822   rm -rf conftest*
11823   eval "ac_cv_lib_$ac_lib_var=yes"
11824 else
11825   echo "configure: failed program was:" >&5
11826   cat conftest.$ac_ext >&5
11827   rm -rf conftest*
11828   eval "ac_cv_lib_$ac_lib_var=no"
11829 fi
11830 rm -f conftest*
11831 LIBS="$ac_save_LIBS"
11832
11833 fi
11834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11835   echo "$ac_t""yes" 1>&6
11836   ol_cv_lib_ndbm=-lndbm
11837 else
11838   echo "$ac_t""no" 1>&6
11839
11840                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11841 echo "configure:11842: checking for dbm_open in -ldbm" >&5
11842 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11844   echo $ac_n "(cached) $ac_c" 1>&6
11845 else
11846   ac_save_LIBS="$LIBS"
11847 LIBS="-ldbm  $LIBS"
11848 cat > conftest.$ac_ext <<EOF
11849 #line 11850 "configure"
11850 #include "confdefs.h"
11851 /* Override any gcc2 internal prototype to avoid an error.  */
11852 /* We use char because int might match the return type of a gcc2
11853     builtin and then its argument prototype would still apply.  */
11854 char dbm_open();
11855
11856 int main() {
11857 dbm_open()
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11861   rm -rf conftest*
11862   eval "ac_cv_lib_$ac_lib_var=yes"
11863 else
11864   echo "configure: failed program was:" >&5
11865   cat conftest.$ac_ext >&5
11866   rm -rf conftest*
11867   eval "ac_cv_lib_$ac_lib_var=no"
11868 fi
11869 rm -f conftest*
11870 LIBS="$ac_save_LIBS"
11871
11872 fi
11873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11874   echo "$ac_t""yes" 1>&6
11875   ol_cv_lib_ndbm=-ldbm
11876 else
11877   echo "$ac_t""no" 1>&6
11878 ol_cv_lib_ndbm=no
11879 fi
11880                 
11881 fi
11882
11883         
11884 fi
11885
11886         LIBS="$ol_LIBS"
11887
11888 fi
11889
11890 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11891
11892
11893  for ac_hdr in ndbm.h
11894 do
11895 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11896 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11897 echo "configure:11898: checking for $ac_hdr" >&5
11898 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11899   echo $ac_n "(cached) $ac_c" 1>&6
11900 else
11901   cat > conftest.$ac_ext <<EOF
11902 #line 11903 "configure"
11903 #include "confdefs.h"
11904 #include <$ac_hdr>
11905 EOF
11906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11907 { (eval echo configure:11908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11909 if test -z "$ac_err"; then
11910   rm -rf conftest*
11911   eval "ac_cv_header_$ac_safe=yes"
11912 else
11913   echo "$ac_err" >&5
11914   echo "configure: failed program was:" >&5
11915   cat conftest.$ac_ext >&5
11916   rm -rf conftest*
11917   eval "ac_cv_header_$ac_safe=no"
11918 fi
11919 rm -f conftest*
11920 fi
11921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11922   echo "$ac_t""yes" 1>&6
11923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11924   cat >> confdefs.h <<EOF
11925 #define $ac_tr_hdr 1
11926 EOF
11927  
11928 else
11929   echo "$ac_t""no" 1>&6
11930 fi
11931 done
11932
11933  echo $ac_n "checking for db""... $ac_c" 1>&6
11934 echo "configure:11935: checking for db" >&5
11935 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11936   echo $ac_n "(cached) $ac_c" 1>&6
11937 else
11938   
11939         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11940                 ol_cv_ndbm=no
11941         else
11942                 ol_cv_ndbm=yes
11943         fi
11944
11945 fi
11946
11947 echo "$ac_t""$ol_cv_ndbm" 1>&6
11948  if test $ol_cv_ndbm = yes ; then
11949         cat >> confdefs.h <<\EOF
11950 #define HAVE_NDBM 1
11951 EOF
11952
11953  fi
11954
11955
11956         if test $ol_cv_ndbm = yes ; then
11957                 ol_link_ldbm=ndbm
11958                 ol_with_ldbm_api=ndbm
11959
11960                 if test $ol_cv_lib_ndbm != yes ; then
11961                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11962                 fi
11963         fi
11964 fi
11965
11966 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11967         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11968         if test $ol_enable_ldbm = yes ; then
11969                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11970         fi
11971
11972         echo "configure: warning: disabling LDBM" 1>&2
11973         ol_enable_ldbm=no
11974 fi
11975
11976 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
11977         LINK_BINS_DYNAMIC="yes"
11978 else
11979         LINK_BINS_DYNAMIC="no"
11980 fi
11981
11982 if test $ol_enable_wrappers != no ; then
11983         for ac_hdr in tcpd.h
11984 do
11985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11986 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11987 echo "configure:11988: checking for $ac_hdr" >&5
11988 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11989   echo $ac_n "(cached) $ac_c" 1>&6
11990 else
11991   cat > conftest.$ac_ext <<EOF
11992 #line 11993 "configure"
11993 #include "confdefs.h"
11994 #include <$ac_hdr>
11995 EOF
11996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11997 { (eval echo configure:11998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11999 if test -z "$ac_err"; then
12000   rm -rf conftest*
12001   eval "ac_cv_header_$ac_safe=yes"
12002 else
12003   echo "$ac_err" >&5
12004   echo "configure: failed program was:" >&5
12005   cat conftest.$ac_ext >&5
12006   rm -rf conftest*
12007   eval "ac_cv_header_$ac_safe=no"
12008 fi
12009 rm -f conftest*
12010 fi
12011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12012   echo "$ac_t""yes" 1>&6
12013     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12014   cat >> confdefs.h <<EOF
12015 #define $ac_tr_hdr 1
12016 EOF
12017  
12018 else
12019   echo "$ac_t""no" 1>&6
12020 fi
12021 done
12022
12023
12024         if test $ac_cv_header_tcpd_h != yes ; then
12025                 have_wrappers=no
12026         else
12027                 cat > conftest.$ac_ext <<EOF
12028 #line 12029 "configure"
12029 #include "confdefs.h"
12030
12031 int allow_severity = 0;
12032 int deny_severity  = 0;
12033                 
12034 int main() {
12035 hosts_access()
12036 ; return 0; }
12037 EOF
12038 if { (eval echo configure:12039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12039   rm -rf conftest*
12040   have_wrappers=yes
12041 else
12042   echo "configure: failed program was:" >&5
12043   cat conftest.$ac_ext >&5
12044   rm -rf conftest*
12045   have_wrappers=no
12046 fi
12047 rm -f conftest*
12048         fi
12049
12050         if test $have_wrappers = yes ; then
12051                 cat >> confdefs.h <<\EOF
12052 #define HAVE_TCPD 1
12053 EOF
12054
12055                 WRAP_LIBS="-lwrap"
12056
12057                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12058 echo "configure:12059: checking for main in -lnsl" >&5
12059 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12061   echo $ac_n "(cached) $ac_c" 1>&6
12062 else
12063   ac_save_LIBS="$LIBS"
12064 LIBS="-lnsl  $LIBS"
12065 cat > conftest.$ac_ext <<EOF
12066 #line 12067 "configure"
12067 #include "confdefs.h"
12068
12069 int main() {
12070 main()
12071 ; return 0; }
12072 EOF
12073 if { (eval echo configure:12074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12074   rm -rf conftest*
12075   eval "ac_cv_lib_$ac_lib_var=yes"
12076 else
12077   echo "configure: failed program was:" >&5
12078   cat conftest.$ac_ext >&5
12079   rm -rf conftest*
12080   eval "ac_cv_lib_$ac_lib_var=no"
12081 fi
12082 rm -f conftest*
12083 LIBS="$ac_save_LIBS"
12084
12085 fi
12086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12087   echo "$ac_t""yes" 1>&6
12088     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12090   cat >> confdefs.h <<EOF
12091 #define $ac_tr_lib 1
12092 EOF
12093
12094   LIBS="-lnsl $LIBS"
12095
12096 else
12097   echo "$ac_t""no" 1>&6
12098 fi
12099
12100         else
12101                 echo "configure: warning: could not find -lwrap" 1>&2
12102                 if test $ol_enable_wrappers = yes ; then
12103                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12104                 fi
12105
12106                 echo "configure: warning: disabling wrappers support" 1>&2
12107                 ol_enable_wrappers=no
12108                 WRAP_LIBS=""
12109         fi
12110 fi
12111
12112 if test $ol_enable_syslog != no ; then
12113         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12114 echo "configure:12115: checking for openlog" >&5
12115 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12116   echo $ac_n "(cached) $ac_c" 1>&6
12117 else
12118   cat > conftest.$ac_ext <<EOF
12119 #line 12120 "configure"
12120 #include "confdefs.h"
12121 /* System header to define __stub macros and hopefully few prototypes,
12122     which can conflict with char openlog(); below.  */
12123 #include <assert.h>
12124 /* Override any gcc2 internal prototype to avoid an error.  */
12125 /* We use char because int might match the return type of a gcc2
12126     builtin and then its argument prototype would still apply.  */
12127 char openlog();
12128 char (*f)();
12129
12130 int main() {
12131
12132 /* The GNU C library defines this for functions which it implements
12133     to always fail with ENOSYS.  Some functions are actually named
12134     something starting with __ and the normal name is an alias.  */
12135 #if defined (__stub_openlog) || defined (__stub___openlog)
12136 choke me
12137 #else
12138 f = openlog;
12139 #endif
12140
12141 ; return 0; }
12142 EOF
12143 if { (eval echo configure:12144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12144   rm -rf conftest*
12145   eval "ac_cv_func_openlog=yes"
12146 else
12147   echo "configure: failed program was:" >&5
12148   cat conftest.$ac_ext >&5
12149   rm -rf conftest*
12150   eval "ac_cv_func_openlog=no"
12151 fi
12152 rm -f conftest*
12153 fi
12154
12155 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12156   echo "$ac_t""yes" 1>&6
12157   :
12158 else
12159   echo "$ac_t""no" 1>&6
12160 fi
12161
12162         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12163                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12164         fi
12165         ol_enable_syslog=$ac_cv_func_openlog
12166 fi
12167
12168 if test $ol_enable_dmalloc != no ; then
12169         for ac_hdr in dmalloc.h
12170 do
12171 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12172 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12173 echo "configure:12174: checking for $ac_hdr" >&5
12174 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12175   echo $ac_n "(cached) $ac_c" 1>&6
12176 else
12177   cat > conftest.$ac_ext <<EOF
12178 #line 12179 "configure"
12179 #include "confdefs.h"
12180 #include <$ac_hdr>
12181 EOF
12182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12183 { (eval echo configure:12184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12185 if test -z "$ac_err"; then
12186   rm -rf conftest*
12187   eval "ac_cv_header_$ac_safe=yes"
12188 else
12189   echo "$ac_err" >&5
12190   echo "configure: failed program was:" >&5
12191   cat conftest.$ac_ext >&5
12192   rm -rf conftest*
12193   eval "ac_cv_header_$ac_safe=no"
12194 fi
12195 rm -f conftest*
12196 fi
12197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12198   echo "$ac_t""yes" 1>&6
12199     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12200   cat >> confdefs.h <<EOF
12201 #define $ac_tr_hdr 1
12202 EOF
12203  
12204 else
12205   echo "$ac_t""no" 1>&6
12206 fi
12207 done
12208
12209         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12210 echo "configure:12211: checking for dmalloc_shutdown in -ldmalloc" >&5
12211 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12213   echo $ac_n "(cached) $ac_c" 1>&6
12214 else
12215   ac_save_LIBS="$LIBS"
12216 LIBS="-ldmalloc  $LIBS"
12217 cat > conftest.$ac_ext <<EOF
12218 #line 12219 "configure"
12219 #include "confdefs.h"
12220 /* Override any gcc2 internal prototype to avoid an error.  */
12221 /* We use char because int might match the return type of a gcc2
12222     builtin and then its argument prototype would still apply.  */
12223 char dmalloc_shutdown();
12224
12225 int main() {
12226 dmalloc_shutdown()
12227 ; return 0; }
12228 EOF
12229 if { (eval echo configure:12230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12230   rm -rf conftest*
12231   eval "ac_cv_lib_$ac_lib_var=yes"
12232 else
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   eval "ac_cv_lib_$ac_lib_var=no"
12237 fi
12238 rm -f conftest*
12239 LIBS="$ac_save_LIBS"
12240
12241 fi
12242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12243   echo "$ac_t""yes" 1>&6
12244     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12245     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12246   cat >> confdefs.h <<EOF
12247 #define $ac_tr_lib 1
12248 EOF
12249
12250   LIBS="-ldmalloc $LIBS"
12251
12252 else
12253   echo "$ac_t""no" 1>&6
12254 fi
12255
12256 fi
12257
12258 if test $ol_enable_tcl != no ; then
12259         for ac_hdr in tcl.h
12260 do
12261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12263 echo "configure:12264: checking for $ac_hdr" >&5
12264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12265   echo $ac_n "(cached) $ac_c" 1>&6
12266 else
12267   cat > conftest.$ac_ext <<EOF
12268 #line 12269 "configure"
12269 #include "confdefs.h"
12270 #include <$ac_hdr>
12271 EOF
12272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12273 { (eval echo configure:12274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12275 if test -z "$ac_err"; then
12276   rm -rf conftest*
12277   eval "ac_cv_header_$ac_safe=yes"
12278 else
12279   echo "$ac_err" >&5
12280   echo "configure: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   rm -rf conftest*
12283   eval "ac_cv_header_$ac_safe=no"
12284 fi
12285 rm -f conftest*
12286 fi
12287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12288   echo "$ac_t""yes" 1>&6
12289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12290   cat >> confdefs.h <<EOF
12291 #define $ac_tr_hdr 1
12292 EOF
12293  
12294 else
12295   echo "$ac_t""no" 1>&6
12296 fi
12297 done
12298
12299
12300         if test $ac_cv_header_tcl_h != yes ; then
12301                 have_tcl=no
12302         else
12303                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12304                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12305 echo "configure:12306: checking for main in -l$lib" >&5
12306 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12307 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12308   echo $ac_n "(cached) $ac_c" 1>&6
12309 else
12310   ac_save_LIBS="$LIBS"
12311 LIBS="-l$lib  $LIBS"
12312 cat > conftest.$ac_ext <<EOF
12313 #line 12314 "configure"
12314 #include "confdefs.h"
12315
12316 int main() {
12317 main()
12318 ; return 0; }
12319 EOF
12320 if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12321   rm -rf conftest*
12322   eval "ac_cv_lib_$ac_lib_var=yes"
12323 else
12324   echo "configure: failed program was:" >&5
12325   cat conftest.$ac_ext >&5
12326   rm -rf conftest*
12327   eval "ac_cv_lib_$ac_lib_var=no"
12328 fi
12329 rm -f conftest*
12330 LIBS="$ac_save_LIBS"
12331
12332 fi
12333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12334   echo "$ac_t""yes" 1>&6
12335   have_tcl=yes
12336                            if test x"$ol_with_tcl_module" == "xstatic" ; then
12337                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12338                            else
12339                                MOD_TCL_LIB="-l${lib}"
12340                            fi;break
12341 else
12342   echo "$ac_t""no" 1>&6
12343 have_tcl=no
12344 fi
12345
12346                 done
12347         fi
12348
12349         if test $have_tcl != yes ; then
12350                 echo "configure: warning: could not find -ltcl" 1>&2
12351                 if test $ol_enable_tcl = yes ; then
12352                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12353                 fi
12354
12355                 ol_enable_tcl=no
12356         fi
12357 fi
12358
12359 ol_link_termcap=no
12360 for ac_hdr in termcap.h ncurses.h
12361 do
12362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12364 echo "configure:12365: checking for $ac_hdr" >&5
12365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12366   echo $ac_n "(cached) $ac_c" 1>&6
12367 else
12368   cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371 #include <$ac_hdr>
12372 EOF
12373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12374 { (eval echo configure:12375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12376 if test -z "$ac_err"; then
12377   rm -rf conftest*
12378   eval "ac_cv_header_$ac_safe=yes"
12379 else
12380   echo "$ac_err" >&5
12381   echo "configure: failed program was:" >&5
12382   cat conftest.$ac_ext >&5
12383   rm -rf conftest*
12384   eval "ac_cv_header_$ac_safe=no"
12385 fi
12386 rm -f conftest*
12387 fi
12388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12389   echo "$ac_t""yes" 1>&6
12390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12391   cat >> confdefs.h <<EOF
12392 #define $ac_tr_hdr 1
12393 EOF
12394  
12395 else
12396   echo "$ac_t""no" 1>&6
12397 fi
12398 done
12399
12400
12401 if test $ol_link_termcap = no ; then
12402         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12403 echo "configure:12404: checking for tputs in -ltermcap" >&5
12404 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12406   echo $ac_n "(cached) $ac_c" 1>&6
12407 else
12408   ac_save_LIBS="$LIBS"
12409 LIBS="-ltermcap  $LIBS"
12410 cat > conftest.$ac_ext <<EOF
12411 #line 12412 "configure"
12412 #include "confdefs.h"
12413 /* Override any gcc2 internal prototype to avoid an error.  */
12414 /* We use char because int might match the return type of a gcc2
12415     builtin and then its argument prototype would still apply.  */
12416 char tputs();
12417
12418 int main() {
12419 tputs()
12420 ; return 0; }
12421 EOF
12422 if { (eval echo configure:12423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12423   rm -rf conftest*
12424   eval "ac_cv_lib_$ac_lib_var=yes"
12425 else
12426   echo "configure: failed program was:" >&5
12427   cat conftest.$ac_ext >&5
12428   rm -rf conftest*
12429   eval "ac_cv_lib_$ac_lib_var=no"
12430 fi
12431 rm -f conftest*
12432 LIBS="$ac_save_LIBS"
12433
12434 fi
12435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12436   echo "$ac_t""yes" 1>&6
12437   have_termcap=yes
12438 else
12439   echo "$ac_t""no" 1>&6
12440 have_termcap=no
12441 fi
12442
12443         if test $have_termcap = yes ; then
12444                 cat >> confdefs.h <<\EOF
12445 #define HAVE_TERMCAP 1
12446 EOF
12447
12448                 ol_link_termcap=yes
12449                 TERMCAP_LIBS=-ltermcap
12450         fi
12451 fi
12452
12453 if test $ol_link_termcap = no ; then
12454         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12455 echo "configure:12456: checking for initscr in -lncurses" >&5
12456 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12458   echo $ac_n "(cached) $ac_c" 1>&6
12459 else
12460   ac_save_LIBS="$LIBS"
12461 LIBS="-lncurses  $LIBS"
12462 cat > conftest.$ac_ext <<EOF
12463 #line 12464 "configure"
12464 #include "confdefs.h"
12465 /* Override any gcc2 internal prototype to avoid an error.  */
12466 /* We use char because int might match the return type of a gcc2
12467     builtin and then its argument prototype would still apply.  */
12468 char initscr();
12469
12470 int main() {
12471 initscr()
12472 ; return 0; }
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12475   rm -rf conftest*
12476   eval "ac_cv_lib_$ac_lib_var=yes"
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   eval "ac_cv_lib_$ac_lib_var=no"
12482 fi
12483 rm -f conftest*
12484 LIBS="$ac_save_LIBS"
12485
12486 fi
12487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12488   echo "$ac_t""yes" 1>&6
12489   have_ncurses=yes
12490 else
12491   echo "$ac_t""no" 1>&6
12492 have_ncurses=no
12493 fi
12494
12495         if test $have_ncurses = yes ; then
12496                 cat >> confdefs.h <<\EOF
12497 #define HAVE_NCURSES 1
12498 EOF
12499
12500                 ol_link_termcap=yes
12501                 TERMCAP_LIBS=-lncurses
12502         fi
12503 fi
12504
12505 if test $ol_link_termcap = no ; then
12506         cat >> confdefs.h <<\EOF
12507 #define NO_TERMCAP 1
12508 EOF
12509
12510         TERMCAP_LIBS=
12511 fi
12512
12513 ol_link_sasl=no
12514 if test $ol_with_cyrus_sasl != no ; then
12515         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12516 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12517 echo "configure:12518: checking for sasl.h" >&5
12518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12519   echo $ac_n "(cached) $ac_c" 1>&6
12520 else
12521   cat > conftest.$ac_ext <<EOF
12522 #line 12523 "configure"
12523 #include "confdefs.h"
12524 #include <sasl.h>
12525 EOF
12526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12527 { (eval echo configure:12528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12529 if test -z "$ac_err"; then
12530   rm -rf conftest*
12531   eval "ac_cv_header_$ac_safe=yes"
12532 else
12533   echo "$ac_err" >&5
12534   echo "configure: failed program was:" >&5
12535   cat conftest.$ac_ext >&5
12536   rm -rf conftest*
12537   eval "ac_cv_header_$ac_safe=no"
12538 fi
12539 rm -f conftest*
12540 fi
12541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12542   echo "$ac_t""yes" 1>&6
12543   :
12544 else
12545   echo "$ac_t""no" 1>&6
12546 fi
12547
12548
12549         if test $ac_cv_header_sasl_h = yes ; then
12550                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12551 echo "configure:12552: checking for sasl_client_init in -lsasl" >&5
12552 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12554   echo $ac_n "(cached) $ac_c" 1>&6
12555 else
12556   ac_save_LIBS="$LIBS"
12557 LIBS="-lsasl  $LIBS"
12558 cat > conftest.$ac_ext <<EOF
12559 #line 12560 "configure"
12560 #include "confdefs.h"
12561 /* Override any gcc2 internal prototype to avoid an error.  */
12562 /* We use char because int might match the return type of a gcc2
12563     builtin and then its argument prototype would still apply.  */
12564 char sasl_client_init();
12565
12566 int main() {
12567 sasl_client_init()
12568 ; return 0; }
12569 EOF
12570 if { (eval echo configure:12571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12571   rm -rf conftest*
12572   eval "ac_cv_lib_$ac_lib_var=yes"
12573 else
12574   echo "configure: failed program was:" >&5
12575   cat conftest.$ac_ext >&5
12576   rm -rf conftest*
12577   eval "ac_cv_lib_$ac_lib_var=no"
12578 fi
12579 rm -f conftest*
12580 LIBS="$ac_save_LIBS"
12581
12582 fi
12583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12584   echo "$ac_t""yes" 1>&6
12585   have_cyrus_sasl=yes
12586 else
12587   echo "$ac_t""no" 1>&6
12588 have_cyrus_sasl=no
12589 fi
12590
12591
12592                 if test $have_cyrus_sasl != no ; then
12593                         SASL_LIBS="-lsasl"
12594                         cat >> confdefs.h <<\EOF
12595 #define HAVE_CYRUS_SASL 1
12596 EOF
12597
12598                         ol_link_sasl=yes
12599                 fi
12600         fi
12601
12602         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12603                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12604         fi
12605 fi
12606
12607 if test $cross_compiling != yes ; then
12608         dev=no
12609         if test -r /dev/urandom ; then
12610                 dev="/dev/urandom";
12611         elif test -r /idev/urandom ; then
12612                 dev="/idev/urandom";
12613         elif test -r /dev/srandom ; then
12614                 dev="/dev/srandom";
12615         elif test -r /dev/random ; then
12616                 dev="/dev/random";
12617         elif test -r /idev/random ; then
12618                 dev="/idev/random";
12619         fi
12620
12621         if test $dev != no ; then
12622                 cat >> confdefs.h <<EOF
12623 #define URANDOM_DEVICE "$dev"
12624 EOF
12625
12626         fi
12627 fi
12628
12629 ol_link_fetch=no
12630 if test $ol_with_fetch != no ; then
12631         ol=$LIBS
12632 LIBS="-lfetch -lcom_err $LIBS"
12633 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12634 echo "configure:12635: checking fetch(3) library" >&5
12635 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12636   echo $ac_n "(cached) $ac_c" 1>&6
12637 else
12638   
12639         cat > conftest.$ac_ext <<EOF
12640 #line 12641 "configure"
12641 #include "confdefs.h"
12642
12643 #include <sys/param.h>
12644 #include <stdio.h>
12645 #include <fetch.h>
12646 int main() {
12647 struct url *u = fetchParseURL("file:///"); 
12648 ; return 0; }
12649 EOF
12650 if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12651   rm -rf conftest*
12652   ol_cv_lib_fetch=yes
12653 else
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -rf conftest*
12657   ol_cv_lib_fetch=no
12658 fi
12659 rm -f conftest*
12660 fi
12661
12662 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12663 LIBS=$ol_LIBS
12664 if test $ol_cv_lib_fetch != no ; then
12665         ol_link_fetch="-lfetch -lcom_err"
12666         cat >> confdefs.h <<\EOF
12667 #define HAVE_FETCH 1
12668 EOF
12669
12670 fi
12671
12672
12673         if test $ol_cv_lib_fetch != no ; then
12674                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12675                 ol_link_fetch=freebsd
12676
12677         elif test $ol_with_fetch != auto ; then
12678                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12679         fi 
12680 fi
12681
12682 ol_link_readline=no
12683 if test $ol_with_readline != no ; then
12684         for ac_hdr in readline/readline.h readline/history.h
12685 do
12686 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12687 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12688 echo "configure:12689: checking for $ac_hdr" >&5
12689 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12690   echo $ac_n "(cached) $ac_c" 1>&6
12691 else
12692   cat > conftest.$ac_ext <<EOF
12693 #line 12694 "configure"
12694 #include "confdefs.h"
12695 #include <$ac_hdr>
12696 EOF
12697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12698 { (eval echo configure:12699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12700 if test -z "$ac_err"; then
12701   rm -rf conftest*
12702   eval "ac_cv_header_$ac_safe=yes"
12703 else
12704   echo "$ac_err" >&5
12705   echo "configure: failed program was:" >&5
12706   cat conftest.$ac_ext >&5
12707   rm -rf conftest*
12708   eval "ac_cv_header_$ac_safe=no"
12709 fi
12710 rm -f conftest*
12711 fi
12712 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12713   echo "$ac_t""yes" 1>&6
12714     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12715   cat >> confdefs.h <<EOF
12716 #define $ac_tr_hdr 1
12717 EOF
12718  
12719 else
12720   echo "$ac_t""no" 1>&6
12721 fi
12722 done
12723
12724
12725         if test $ac_cv_header_readline_readline_h = yes ; then
12726                 save_LIBS="$LIBS"
12727                 LIBS="$TERMCAP_LIBS $LIBS"
12728                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12729 echo "configure:12730: checking for readline in -lreadline" >&5
12730 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12732   echo $ac_n "(cached) $ac_c" 1>&6
12733 else
12734   ac_save_LIBS="$LIBS"
12735 LIBS="-lreadline  $LIBS"
12736 cat > conftest.$ac_ext <<EOF
12737 #line 12738 "configure"
12738 #include "confdefs.h"
12739 /* Override any gcc2 internal prototype to avoid an error.  */
12740 /* We use char because int might match the return type of a gcc2
12741     builtin and then its argument prototype would still apply.  */
12742 char readline();
12743
12744 int main() {
12745 readline()
12746 ; return 0; }
12747 EOF
12748 if { (eval echo configure:12749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12749   rm -rf conftest*
12750   eval "ac_cv_lib_$ac_lib_var=yes"
12751 else
12752   echo "configure: failed program was:" >&5
12753   cat conftest.$ac_ext >&5
12754   rm -rf conftest*
12755   eval "ac_cv_lib_$ac_lib_var=no"
12756 fi
12757 rm -f conftest*
12758 LIBS="$ac_save_LIBS"
12759
12760 fi
12761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12762   echo "$ac_t""yes" 1>&6
12763   have_readline=yes
12764 else
12765   echo "$ac_t""no" 1>&6
12766 have_readline=no
12767 fi
12768
12769                 LIBS="$save_LIBS"
12770                         
12771                 if test $have_readline = yes ; then
12772                         ol_with_readline=found
12773                         ol_link_readline=yes
12774
12775                         READLINE_LIBS="-lreadline"
12776                 fi
12777         fi
12778 fi
12779
12780 if test $ol_link_readline = yes ; then
12781         cat >> confdefs.h <<\EOF
12782 #define HAVE_READLINE 1
12783 EOF
12784
12785 fi
12786
12787
12788 if test $ol_enable_crypt != no ; then
12789         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12790 echo "configure:12791: checking for crypt" >&5
12791 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12792   echo $ac_n "(cached) $ac_c" 1>&6
12793 else
12794   cat > conftest.$ac_ext <<EOF
12795 #line 12796 "configure"
12796 #include "confdefs.h"
12797 /* System header to define __stub macros and hopefully few prototypes,
12798     which can conflict with char crypt(); below.  */
12799 #include <assert.h>
12800 /* Override any gcc2 internal prototype to avoid an error.  */
12801 /* We use char because int might match the return type of a gcc2
12802     builtin and then its argument prototype would still apply.  */
12803 char crypt();
12804 char (*f)();
12805
12806 int main() {
12807
12808 /* The GNU C library defines this for functions which it implements
12809     to always fail with ENOSYS.  Some functions are actually named
12810     something starting with __ and the normal name is an alias.  */
12811 #if defined (__stub_crypt) || defined (__stub___crypt)
12812 choke me
12813 #else
12814 f = crypt;
12815 #endif
12816
12817 ; return 0; }
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12820   rm -rf conftest*
12821   eval "ac_cv_func_crypt=yes"
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   eval "ac_cv_func_crypt=no"
12827 fi
12828 rm -f conftest*
12829 fi
12830
12831 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12832   echo "$ac_t""yes" 1>&6
12833   have_crypt=yes
12834 else
12835   echo "$ac_t""no" 1>&6
12836
12837                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12838 echo "configure:12839: checking for crypt in -lcrypt" >&5
12839 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12840 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12841   echo $ac_n "(cached) $ac_c" 1>&6
12842 else
12843   ac_save_LIBS="$LIBS"
12844 LIBS="-lcrypt  $LIBS"
12845 cat > conftest.$ac_ext <<EOF
12846 #line 12847 "configure"
12847 #include "confdefs.h"
12848 /* Override any gcc2 internal prototype to avoid an error.  */
12849 /* We use char because int might match the return type of a gcc2
12850     builtin and then its argument prototype would still apply.  */
12851 char crypt();
12852
12853 int main() {
12854 crypt()
12855 ; return 0; }
12856 EOF
12857 if { (eval echo configure:12858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12858   rm -rf conftest*
12859   eval "ac_cv_lib_$ac_lib_var=yes"
12860 else
12861   echo "configure: failed program was:" >&5
12862   cat conftest.$ac_ext >&5
12863   rm -rf conftest*
12864   eval "ac_cv_lib_$ac_lib_var=no"
12865 fi
12866 rm -f conftest*
12867 LIBS="$ac_save_LIBS"
12868
12869 fi
12870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12871   echo "$ac_t""yes" 1>&6
12872   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12873                         have_crypt=yes
12874 else
12875   echo "$ac_t""no" 1>&6
12876 have_crypt=no
12877 fi
12878
12879 fi
12880
12881
12882         if test $have_crypt = yes ; then
12883                 cat >> confdefs.h <<\EOF
12884 #define HAVE_CRYPT 1
12885 EOF
12886
12887         else
12888                 echo "configure: warning: could not find crypt" 1>&2
12889                 if test $ol_enable_crypt = yes ; then
12890                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12891                 fi
12892
12893                 echo "configure: warning: disabling crypt support" 1>&2
12894                 ol_enable_crypt=no
12895         fi
12896 fi
12897
12898 if test $ol_enable_proctitle != no ; then
12899         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12900 echo "configure:12901: checking for setproctitle" >&5
12901 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12902   echo $ac_n "(cached) $ac_c" 1>&6
12903 else
12904   cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* System header to define __stub macros and hopefully few prototypes,
12908     which can conflict with char setproctitle(); below.  */
12909 #include <assert.h>
12910 /* Override any gcc2 internal prototype to avoid an error.  */
12911 /* We use char because int might match the return type of a gcc2
12912     builtin and then its argument prototype would still apply.  */
12913 char setproctitle();
12914 char (*f)();
12915
12916 int main() {
12917
12918 /* The GNU C library defines this for functions which it implements
12919     to always fail with ENOSYS.  Some functions are actually named
12920     something starting with __ and the normal name is an alias.  */
12921 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12922 choke me
12923 #else
12924 f = setproctitle;
12925 #endif
12926
12927 ; return 0; }
12928 EOF
12929 if { (eval echo configure:12930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12930   rm -rf conftest*
12931   eval "ac_cv_func_setproctitle=yes"
12932 else
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   eval "ac_cv_func_setproctitle=no"
12937 fi
12938 rm -f conftest*
12939 fi
12940
12941 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12942   echo "$ac_t""yes" 1>&6
12943   have_setproctitle=yes
12944 else
12945   echo "$ac_t""no" 1>&6
12946
12947                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12948 echo "configure:12949: checking for setproctitle in -lutil" >&5
12949 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12951   echo $ac_n "(cached) $ac_c" 1>&6
12952 else
12953   ac_save_LIBS="$LIBS"
12954 LIBS="-lutil  $LIBS"
12955 cat > conftest.$ac_ext <<EOF
12956 #line 12957 "configure"
12957 #include "confdefs.h"
12958 /* Override any gcc2 internal prototype to avoid an error.  */
12959 /* We use char because int might match the return type of a gcc2
12960     builtin and then its argument prototype would still apply.  */
12961 char setproctitle();
12962
12963 int main() {
12964 setproctitle()
12965 ; return 0; }
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12968   rm -rf conftest*
12969   eval "ac_cv_lib_$ac_lib_var=yes"
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -rf conftest*
12974   eval "ac_cv_lib_$ac_lib_var=no"
12975 fi
12976 rm -f conftest*
12977 LIBS="$ac_save_LIBS"
12978
12979 fi
12980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12981   echo "$ac_t""yes" 1>&6
12982   have_setproctitle=yes
12983                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12984 else
12985   echo "$ac_t""no" 1>&6
12986 have_setproctitle=no
12987                         LIBOBJS="$LIBOBJS setproctitle.o"
12988                         LIBSRCS="$LIBSRCS setproctitle.c"
12989 fi
12990
12991 fi
12992
12993
12994         if test $have_setproctitle = yes ; then
12995                 cat >> confdefs.h <<\EOF
12996 #define HAVE_SETPROCTITLE 1
12997 EOF
12998
12999         fi
13000 fi
13001
13002 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13003 echo "configure:13004: checking for ANSI C header files" >&5
13004 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13005   echo $ac_n "(cached) $ac_c" 1>&6
13006 else
13007   cat > conftest.$ac_ext <<EOF
13008 #line 13009 "configure"
13009 #include "confdefs.h"
13010 #include <stdlib.h>
13011 #include <stdarg.h>
13012 #include <string.h>
13013 #include <float.h>
13014 EOF
13015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13016 { (eval echo configure:13017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13018 if test -z "$ac_err"; then
13019   rm -rf conftest*
13020   ac_cv_header_stdc=yes
13021 else
13022   echo "$ac_err" >&5
13023   echo "configure: failed program was:" >&5
13024   cat conftest.$ac_ext >&5
13025   rm -rf conftest*
13026   ac_cv_header_stdc=no
13027 fi
13028 rm -f conftest*
13029
13030 if test $ac_cv_header_stdc = yes; then
13031   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13032 cat > conftest.$ac_ext <<EOF
13033 #line 13034 "configure"
13034 #include "confdefs.h"
13035 #include <string.h>
13036 EOF
13037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13038   egrep "memchr" >/dev/null 2>&1; then
13039   :
13040 else
13041   rm -rf conftest*
13042   ac_cv_header_stdc=no
13043 fi
13044 rm -f conftest*
13045
13046 fi
13047
13048 if test $ac_cv_header_stdc = yes; then
13049   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13050 cat > conftest.$ac_ext <<EOF
13051 #line 13052 "configure"
13052 #include "confdefs.h"
13053 #include <stdlib.h>
13054 EOF
13055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13056   egrep "free" >/dev/null 2>&1; then
13057   :
13058 else
13059   rm -rf conftest*
13060   ac_cv_header_stdc=no
13061 fi
13062 rm -f conftest*
13063
13064 fi
13065
13066 if test $ac_cv_header_stdc = yes; then
13067   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13068 if test "$cross_compiling" = yes; then
13069   :
13070 else
13071   cat > conftest.$ac_ext <<EOF
13072 #line 13073 "configure"
13073 #include "confdefs.h"
13074 #include <ctype.h>
13075 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13076 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13077 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13078 int main () { int i; for (i = 0; i < 256; i++)
13079 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13080 exit (0); }
13081
13082 EOF
13083 if { (eval echo configure:13084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13084 then
13085   :
13086 else
13087   echo "configure: failed program was:" >&5
13088   cat conftest.$ac_ext >&5
13089   rm -fr conftest*
13090   ac_cv_header_stdc=no
13091 fi
13092 rm -fr conftest*
13093 fi
13094
13095 fi
13096 fi
13097
13098 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13099 if test $ac_cv_header_stdc = yes; then
13100   cat >> confdefs.h <<\EOF
13101 #define STDC_HEADERS 1
13102 EOF
13103
13104 fi
13105
13106 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13107 echo "configure:13108: checking for mode_t" >&5
13108 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13109   echo $ac_n "(cached) $ac_c" 1>&6
13110 else
13111   cat > conftest.$ac_ext <<EOF
13112 #line 13113 "configure"
13113 #include "confdefs.h"
13114 #include <sys/types.h>
13115 #if STDC_HEADERS
13116 #include <stdlib.h>
13117 #include <stddef.h>
13118 #endif
13119 EOF
13120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13121   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13122   rm -rf conftest*
13123   eval "ac_cv_type_mode_t=yes"
13124 else
13125   rm -rf conftest*
13126   eval "ac_cv_type_mode_t=no"
13127 fi
13128 rm -f conftest*
13129
13130 fi
13131 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13132   echo "$ac_t""yes" 1>&6
13133 else
13134   echo "$ac_t""no" 1>&6
13135   cat >> confdefs.h <<EOF
13136 #define mode_t int
13137 EOF
13138
13139 fi
13140
13141 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13142 echo "configure:13143: checking for off_t" >&5
13143 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13144   echo $ac_n "(cached) $ac_c" 1>&6
13145 else
13146   cat > conftest.$ac_ext <<EOF
13147 #line 13148 "configure"
13148 #include "confdefs.h"
13149 #include <sys/types.h>
13150 #if STDC_HEADERS
13151 #include <stdlib.h>
13152 #include <stddef.h>
13153 #endif
13154 EOF
13155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13156   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13157   rm -rf conftest*
13158   eval "ac_cv_type_off_t=yes"
13159 else
13160   rm -rf conftest*
13161   eval "ac_cv_type_off_t=no"
13162 fi
13163 rm -f conftest*
13164
13165 fi
13166 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13167   echo "$ac_t""yes" 1>&6
13168 else
13169   echo "$ac_t""no" 1>&6
13170   cat >> confdefs.h <<EOF
13171 #define off_t long
13172 EOF
13173
13174 fi
13175
13176 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13177 echo "configure:13178: checking for pid_t" >&5
13178 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13179   echo $ac_n "(cached) $ac_c" 1>&6
13180 else
13181   cat > conftest.$ac_ext <<EOF
13182 #line 13183 "configure"
13183 #include "confdefs.h"
13184 #include <sys/types.h>
13185 #if STDC_HEADERS
13186 #include <stdlib.h>
13187 #include <stddef.h>
13188 #endif
13189 EOF
13190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13191   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13192   rm -rf conftest*
13193   eval "ac_cv_type_pid_t=yes"
13194 else
13195   rm -rf conftest*
13196   eval "ac_cv_type_pid_t=no"
13197 fi
13198 rm -f conftest*
13199
13200 fi
13201 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13202   echo "$ac_t""yes" 1>&6
13203 else
13204   echo "$ac_t""no" 1>&6
13205   cat >> confdefs.h <<EOF
13206 #define pid_t int
13207 EOF
13208
13209 fi
13210
13211 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13212 echo "configure:13213: checking for ptrdiff_t" >&5
13213 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13214   echo $ac_n "(cached) $ac_c" 1>&6
13215 else
13216   cat > conftest.$ac_ext <<EOF
13217 #line 13218 "configure"
13218 #include "confdefs.h"
13219 #include <stddef.h>
13220 int main() {
13221 ptrdiff_t p
13222 ; return 0; }
13223 EOF
13224 if { (eval echo configure:13225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13225   rm -rf conftest*
13226   am_cv_type_ptrdiff_t=yes
13227 else
13228   echo "configure: failed program was:" >&5
13229   cat conftest.$ac_ext >&5
13230   rm -rf conftest*
13231   am_cv_type_ptrdiff_t=no
13232 fi
13233 rm -f conftest*
13234 fi
13235
13236 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13237    if test $am_cv_type_ptrdiff_t = yes; then
13238      cat >> confdefs.h <<\EOF
13239 #define HAVE_PTRDIFF_T 1
13240 EOF
13241
13242    fi
13243
13244 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13245 echo "configure:13246: checking return type of signal handlers" >&5
13246 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13247   echo $ac_n "(cached) $ac_c" 1>&6
13248 else
13249   cat > conftest.$ac_ext <<EOF
13250 #line 13251 "configure"
13251 #include "confdefs.h"
13252 #include <sys/types.h>
13253 #include <signal.h>
13254 #ifdef signal
13255 #undef signal
13256 #endif
13257 #ifdef __cplusplus
13258 extern "C" void (*signal (int, void (*)(int)))(int);
13259 #else
13260 void (*signal ()) ();
13261 #endif
13262
13263 int main() {
13264 int i;
13265 ; return 0; }
13266 EOF
13267 if { (eval echo configure:13268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13268   rm -rf conftest*
13269   ac_cv_type_signal=void
13270 else
13271   echo "configure: failed program was:" >&5
13272   cat conftest.$ac_ext >&5
13273   rm -rf conftest*
13274   ac_cv_type_signal=int
13275 fi
13276 rm -f conftest*
13277 fi
13278
13279 echo "$ac_t""$ac_cv_type_signal" 1>&6
13280 cat >> confdefs.h <<EOF
13281 #define RETSIGTYPE $ac_cv_type_signal
13282 EOF
13283
13284
13285 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13286 echo "configure:13287: checking for size_t" >&5
13287 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13288   echo $ac_n "(cached) $ac_c" 1>&6
13289 else
13290   cat > conftest.$ac_ext <<EOF
13291 #line 13292 "configure"
13292 #include "confdefs.h"
13293 #include <sys/types.h>
13294 #if STDC_HEADERS
13295 #include <stdlib.h>
13296 #include <stddef.h>
13297 #endif
13298 EOF
13299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13300   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13301   rm -rf conftest*
13302   eval "ac_cv_type_size_t=yes"
13303 else
13304   rm -rf conftest*
13305   eval "ac_cv_type_size_t=no"
13306 fi
13307 rm -f conftest*
13308
13309 fi
13310 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13311   echo "$ac_t""yes" 1>&6
13312 else
13313   echo "$ac_t""no" 1>&6
13314   cat >> confdefs.h <<EOF
13315 #define size_t unsigned
13316 EOF
13317
13318 fi
13319
13320
13321 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13322 echo "configure:13323: checking for ssize_t" >&5
13323 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13324   echo $ac_n "(cached) $ac_c" 1>&6
13325 else
13326   cat > conftest.$ac_ext <<EOF
13327 #line 13328 "configure"
13328 #include "confdefs.h"
13329 #include <sys/types.h>
13330 #if STDC_HEADERS
13331 #include <stdlib.h>
13332 #include <stddef.h>
13333 #endif
13334 EOF
13335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13336   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13337   rm -rf conftest*
13338   eval "ac_cv_type_ssize_t=yes"
13339 else
13340   rm -rf conftest*
13341   eval "ac_cv_type_ssize_t=no"
13342 fi
13343 rm -f conftest*
13344
13345 fi
13346 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13347   echo "$ac_t""yes" 1>&6
13348 else
13349   echo "$ac_t""no" 1>&6
13350   cat >> confdefs.h <<EOF
13351 #define ssize_t signed int
13352 EOF
13353
13354 fi
13355
13356 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13357 echo "configure:13358: checking for caddr_t" >&5
13358 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13359   echo $ac_n "(cached) $ac_c" 1>&6
13360 else
13361   cat > conftest.$ac_ext <<EOF
13362 #line 13363 "configure"
13363 #include "confdefs.h"
13364 #include <sys/types.h>
13365 #if STDC_HEADERS
13366 #include <stdlib.h>
13367 #include <stddef.h>
13368 #endif
13369 EOF
13370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13371   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13372   rm -rf conftest*
13373   eval "ac_cv_type_caddr_t=yes"
13374 else
13375   rm -rf conftest*
13376   eval "ac_cv_type_caddr_t=no"
13377 fi
13378 rm -f conftest*
13379
13380 fi
13381 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13382   echo "$ac_t""yes" 1>&6
13383 else
13384   echo "$ac_t""no" 1>&6
13385   cat >> confdefs.h <<EOF
13386 #define caddr_t char *
13387 EOF
13388
13389 fi
13390
13391
13392 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13393 echo "configure:13394: checking for socklen_t" >&5
13394 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13395   echo $ac_n "(cached) $ac_c" 1>&6
13396 else
13397   cat > conftest.$ac_ext <<EOF
13398 #line 13399 "configure"
13399 #include "confdefs.h"
13400
13401 #ifdef HAVE_SYS_TYPES_H
13402 #include <sys/types.h>
13403 #endif
13404 #ifdef HAVE_SYS_SOCKET_H
13405 #include <sys/socket.h>
13406 #endif
13407
13408 int main() {
13409 socklen_t len;
13410 ; return 0; }
13411 EOF
13412 if { (eval echo configure:13413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13413   rm -rf conftest*
13414   ol_cv_type_socklen_t=yes
13415 else
13416   echo "configure: failed program was:" >&5
13417   cat conftest.$ac_ext >&5
13418   rm -rf conftest*
13419   ol_cv_type_socklen_t=no
13420 fi
13421 rm -f conftest*
13422 fi
13423
13424 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13425   if test $ol_cv_type_socklen_t = no; then
13426     cat >> confdefs.h <<\EOF
13427 #define socklen_t int
13428 EOF
13429
13430   fi
13431  
13432 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13433 echo "configure:13434: checking for member st_blksize in aggregate type struct stat" >&5
13434 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13435   echo $ac_n "(cached) $ac_c" 1>&6
13436 else
13437   cat > conftest.$ac_ext <<EOF
13438 #line 13439 "configure"
13439 #include "confdefs.h"
13440 #include <sys/types.h>
13441 #include <sys/stat.h>
13442 int main() {
13443 struct stat foo; foo.st_blksize;
13444 ; return 0; }
13445 EOF
13446 if { (eval echo configure:13447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13447   rm -rf conftest*
13448   ac_cv_c_struct_member_st_blksize=yes
13449 else
13450   echo "configure: failed program was:" >&5
13451   cat conftest.$ac_ext >&5
13452   rm -rf conftest*
13453   ac_cv_c_struct_member_st_blksize=no
13454 fi
13455 rm -f conftest*
13456 fi
13457
13458 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13459 st_blksize="$ac_cv_c_struct_member_st_blksize"
13460 if test $ac_cv_c_struct_member_st_blksize = yes; then
13461   cat >> confdefs.h <<\EOF
13462 #define HAVE_ST_BLKSIZE 1
13463 EOF
13464
13465 fi
13466
13467 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13468 echo "configure:13469: checking whether time.h and sys/time.h may both be included" >&5
13469 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13470   echo $ac_n "(cached) $ac_c" 1>&6
13471 else
13472   cat > conftest.$ac_ext <<EOF
13473 #line 13474 "configure"
13474 #include "confdefs.h"
13475 #include <sys/types.h>
13476 #include <sys/time.h>
13477 #include <time.h>
13478 int main() {
13479 struct tm *tp;
13480 ; return 0; }
13481 EOF
13482 if { (eval echo configure:13483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13483   rm -rf conftest*
13484   ac_cv_header_time=yes
13485 else
13486   echo "configure: failed program was:" >&5
13487   cat conftest.$ac_ext >&5
13488   rm -rf conftest*
13489   ac_cv_header_time=no
13490 fi
13491 rm -f conftest*
13492 fi
13493
13494 echo "$ac_t""$ac_cv_header_time" 1>&6
13495 if test $ac_cv_header_time = yes; then
13496   cat >> confdefs.h <<\EOF
13497 #define TIME_WITH_SYS_TIME 1
13498 EOF
13499
13500 fi
13501
13502 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13503 echo "configure:13504: checking whether struct tm is in sys/time.h or time.h" >&5
13504 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13505   echo $ac_n "(cached) $ac_c" 1>&6
13506 else
13507   cat > conftest.$ac_ext <<EOF
13508 #line 13509 "configure"
13509 #include "confdefs.h"
13510 #include <sys/types.h>
13511 #include <time.h>
13512 int main() {
13513 struct tm *tp; tp->tm_sec;
13514 ; return 0; }
13515 EOF
13516 if { (eval echo configure:13517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13517   rm -rf conftest*
13518   ac_cv_struct_tm=time.h
13519 else
13520   echo "configure: failed program was:" >&5
13521   cat conftest.$ac_ext >&5
13522   rm -rf conftest*
13523   ac_cv_struct_tm=sys/time.h
13524 fi
13525 rm -f conftest*
13526 fi
13527
13528 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13529 if test $ac_cv_struct_tm = sys/time.h; then
13530   cat >> confdefs.h <<\EOF
13531 #define TM_IN_SYS_TIME 1
13532 EOF
13533
13534 fi
13535
13536 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13537 echo "configure:13538: checking for uid_t in sys/types.h" >&5
13538 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13539   echo $ac_n "(cached) $ac_c" 1>&6
13540 else
13541   cat > conftest.$ac_ext <<EOF
13542 #line 13543 "configure"
13543 #include "confdefs.h"
13544 #include <sys/types.h>
13545 EOF
13546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13547   egrep "uid_t" >/dev/null 2>&1; then
13548   rm -rf conftest*
13549   ac_cv_type_uid_t=yes
13550 else
13551   rm -rf conftest*
13552   ac_cv_type_uid_t=no
13553 fi
13554 rm -f conftest*
13555
13556 fi
13557
13558 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13559 if test $ac_cv_type_uid_t = no; then
13560   cat >> confdefs.h <<\EOF
13561 #define uid_t int
13562 EOF
13563
13564   cat >> confdefs.h <<\EOF
13565 #define gid_t int
13566 EOF
13567
13568 fi
13569
13570 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13571 echo "configure:13572: checking for sig_atomic_t" >&5
13572 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13573   echo $ac_n "(cached) $ac_c" 1>&6
13574 else
13575   cat > conftest.$ac_ext <<EOF
13576 #line 13577 "configure"
13577 #include "confdefs.h"
13578 #include <signal.h>
13579 int main() {
13580 sig_atomic_t atomic;
13581 ; return 0; }
13582 EOF
13583 if { (eval echo configure:13584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13584   rm -rf conftest*
13585   ol_cv_type_sig_atomic_t=yes
13586 else
13587   echo "configure: failed program was:" >&5
13588   cat conftest.$ac_ext >&5
13589   rm -rf conftest*
13590   ol_cv_type_sig_atomic_t=no
13591 fi
13592 rm -f conftest*
13593 fi
13594
13595 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13596   if test $ol_cv_type_sig_atomic_t = no; then
13597     cat >> confdefs.h <<\EOF
13598 #define sig_atomic_t int
13599 EOF
13600
13601   fi
13602  
13603
13604 if test "$ac_cv_mingw32" != yes ; then
13605     echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
13606 echo "configure:13607: checking type of array argument to getgroups" >&5
13607 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
13608   echo $ac_n "(cached) $ac_c" 1>&6
13609 else
13610   if test "$cross_compiling" = yes; then
13611   ac_cv_type_getgroups=cross
13612 else
13613   cat > conftest.$ac_ext <<EOF
13614 #line 13615 "configure"
13615 #include "confdefs.h"
13616
13617 /* Thanks to Mike Rendell for this test.  */
13618 #include <sys/types.h>
13619 #define NGID 256
13620 #undef MAX
13621 #define MAX(x, y) ((x) > (y) ? (x) : (y))
13622 main()
13623 {
13624   gid_t gidset[NGID];
13625   int i, n;
13626   union { gid_t gval; long lval; }  val;
13627
13628   val.lval = -1;
13629   for (i = 0; i < NGID; i++)
13630     gidset[i] = val.gval;
13631   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
13632                  gidset);
13633   /* Exit non-zero if getgroups seems to require an array of ints.  This
13634      happens when gid_t is short but getgroups modifies an array of ints.  */
13635   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
13636 }
13637
13638 EOF
13639 if { (eval echo configure:13640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13640 then
13641     ac_cv_type_getgroups=gid_t
13642 else
13643   echo "configure: failed program was:" >&5
13644   cat conftest.$ac_ext >&5
13645   rm -fr conftest*
13646   ac_cv_type_getgroups=int
13647 fi
13648 rm -fr conftest*
13649 fi
13650
13651 if test $ac_cv_type_getgroups = cross; then
13652         cat > conftest.$ac_ext <<EOF
13653 #line 13654 "configure"
13654 #include "confdefs.h"
13655 #include <unistd.h>
13656 EOF
13657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13658   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
13659   rm -rf conftest*
13660   ac_cv_type_getgroups=gid_t
13661 else
13662   rm -rf conftest*
13663   ac_cv_type_getgroups=int
13664 fi
13665 rm -f conftest*
13666
13667 fi
13668 fi
13669
13670 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
13671 cat >> confdefs.h <<EOF
13672 #define GETGROUPS_T $ac_cv_type_getgroups
13673 EOF
13674
13675
13676     # test for pw_gecos in struct passwd
13677 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13678 echo "configure:13679: checking struct passwd for pw_gecos" >&5
13679 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13680   echo $ac_n "(cached) $ac_c" 1>&6
13681 else
13682   
13683         cat > conftest.$ac_ext <<EOF
13684 #line 13685 "configure"
13685 #include "confdefs.h"
13686 #include <pwd.h>
13687 int main() {
13688
13689         struct passwd pwd;
13690         pwd.pw_gecos = pwd.pw_name;
13691
13692 ; return 0; }
13693 EOF
13694 if { (eval echo configure:13695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13695   rm -rf conftest*
13696   ol_cv_struct_passwd_pw_gecos=yes
13697 else
13698   echo "configure: failed program was:" >&5
13699   cat conftest.$ac_ext >&5
13700   rm -rf conftest*
13701   ol_cv_struct_passwd_pw_gecos=no
13702 fi
13703 rm -f conftest*
13704 fi
13705
13706 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13707 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13708         cat >> confdefs.h <<\EOF
13709 #define HAVE_PW_GECOS 1
13710 EOF
13711
13712 fi
13713
13714     # test for pw_passwd in struct passwd
13715 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13716 echo "configure:13717: checking struct passwd for pw_passwd" >&5
13717 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13718   echo $ac_n "(cached) $ac_c" 1>&6
13719 else
13720   
13721         cat > conftest.$ac_ext <<EOF
13722 #line 13723 "configure"
13723 #include "confdefs.h"
13724 #include <pwd.h>
13725 int main() {
13726
13727         struct passwd pwd;
13728         pwd.pw_passwd = pwd.pw_name;
13729
13730 ; return 0; }
13731 EOF
13732 if { (eval echo configure:13733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13733   rm -rf conftest*
13734   ol_cv_struct_passwd_pw_passwd=yes
13735 else
13736   echo "configure: failed program was:" >&5
13737   cat conftest.$ac_ext >&5
13738   rm -rf conftest*
13739   ol_cv_struct_passwd_pw_passwd=no
13740 fi
13741 rm -f conftest*
13742 fi
13743
13744 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13745 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13746         cat >> confdefs.h <<\EOF
13747 #define HAVE_PW_PASSWD 1
13748 EOF
13749
13750 fi
13751
13752 fi
13753
13754 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13755 echo "configure:13756: checking if toupper() requires islower()" >&5
13756 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13757   echo $ac_n "(cached) $ac_c" 1>&6
13758 else
13759   
13760         if test "$cross_compiling" = yes; then
13761   ol_cv_c_upper_lower=safe
13762 else
13763   cat > conftest.$ac_ext <<EOF
13764 #line 13765 "configure"
13765 #include "confdefs.h"
13766
13767 #include <ctype.h>
13768 main()
13769 {
13770         if ('C' == toupper('C'))
13771                 exit(0);
13772         else
13773                 exit(1);
13774 }
13775 EOF
13776 if { (eval echo configure:13777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13777 then
13778   ol_cv_c_upper_lower=no
13779 else
13780   echo "configure: failed program was:" >&5
13781   cat conftest.$ac_ext >&5
13782   rm -fr conftest*
13783   ol_cv_c_upper_lower=yes
13784 fi
13785 rm -fr conftest*
13786 fi
13787
13788 fi
13789
13790 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13791 if test $ol_cv_c_upper_lower != no ; then
13792         cat >> confdefs.h <<\EOF
13793 #define C_UPPER_LOWER 1
13794 EOF
13795
13796 fi
13797
13798 echo $ac_n "checking for working const""... $ac_c" 1>&6
13799 echo "configure:13800: checking for working const" >&5
13800 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13801   echo $ac_n "(cached) $ac_c" 1>&6
13802 else
13803   cat > conftest.$ac_ext <<EOF
13804 #line 13805 "configure"
13805 #include "confdefs.h"
13806
13807 int main() {
13808
13809 /* Ultrix mips cc rejects this.  */
13810 typedef int charset[2]; const charset x;
13811 /* SunOS 4.1.1 cc rejects this.  */
13812 char const *const *ccp;
13813 char **p;
13814 /* NEC SVR4.0.2 mips cc rejects this.  */
13815 struct point {int x, y;};
13816 static struct point const zero = {0,0};
13817 /* AIX XL C 1.02.0.0 rejects this.
13818    It does not let you subtract one const X* pointer from another in an arm
13819    of an if-expression whose if-part is not a constant expression */
13820 const char *g = "string";
13821 ccp = &g + (g ? g-g : 0);
13822 /* HPUX 7.0 cc rejects these. */
13823 ++ccp;
13824 p = (char**) ccp;
13825 ccp = (char const *const *) p;
13826 { /* SCO 3.2v4 cc rejects this.  */
13827   char *t;
13828   char const *s = 0 ? (char *) 0 : (char const *) 0;
13829
13830   *t++ = 0;
13831 }
13832 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13833   int x[] = {25, 17};
13834   const int *foo = &x[0];
13835   ++foo;
13836 }
13837 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13838   typedef const int *iptr;
13839   iptr p = 0;
13840   ++p;
13841 }
13842 { /* AIX XL C 1.02.0.0 rejects this saying
13843      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13844   struct s { int j; const int *ap[3]; };
13845   struct s *b; b->j = 5;
13846 }
13847 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13848   const int foo = 10;
13849 }
13850
13851 ; return 0; }
13852 EOF
13853 if { (eval echo configure:13854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13854   rm -rf conftest*
13855   ac_cv_c_const=yes
13856 else
13857   echo "configure: failed program was:" >&5
13858   cat conftest.$ac_ext >&5
13859   rm -rf conftest*
13860   ac_cv_c_const=no
13861 fi
13862 rm -f conftest*
13863 fi
13864
13865 echo "$ac_t""$ac_cv_c_const" 1>&6
13866 if test $ac_cv_c_const = no; then
13867   cat >> confdefs.h <<\EOF
13868 #define const 
13869 EOF
13870
13871 fi
13872
13873 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13874 echo "configure:13875: checking if compiler understands volatile" >&5
13875 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13876   echo $ac_n "(cached) $ac_c" 1>&6
13877 else
13878   cat > conftest.$ac_ext <<EOF
13879 #line 13880 "configure"
13880 #include "confdefs.h"
13881 int x, y, z;
13882 int main() {
13883 volatile int a; int * volatile b = x ? &y : &z;
13884       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13885       *b = 0;
13886 ; return 0; }
13887 EOF
13888 if { (eval echo configure:13889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13889   rm -rf conftest*
13890   ol_cv_c_volatile=yes
13891 else
13892   echo "configure: failed program was:" >&5
13893   cat conftest.$ac_ext >&5
13894   rm -rf conftest*
13895   ol_cv_c_volatile=no
13896 fi
13897 rm -f conftest*
13898 fi
13899
13900 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13901   if test $ol_cv_c_volatile = yes; then
13902     : 
13903   else
13904     cat >> confdefs.h <<\EOF
13905 #define volatile 
13906 EOF
13907
13908   fi
13909  
13910
13911 if test $cross_compiling = yes ; then
13912         cat >> confdefs.h <<\EOF
13913 #define CROSS_COMPILING 1
13914 EOF
13915
13916 else
13917         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13918 echo "configure:13919: checking whether byte ordering is bigendian" >&5
13919 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13920   echo $ac_n "(cached) $ac_c" 1>&6
13921 else
13922   ac_cv_c_bigendian=unknown
13923 # See if sys/param.h defines the BYTE_ORDER macro.
13924 cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 #include <sys/types.h>
13928 #include <sys/param.h>
13929 int main() {
13930
13931 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13932  bogus endian macros
13933 #endif
13934 ; return 0; }
13935 EOF
13936 if { (eval echo configure:13937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13937   rm -rf conftest*
13938   # It does; now see whether it defined to BIG_ENDIAN or not.
13939 cat > conftest.$ac_ext <<EOF
13940 #line 13941 "configure"
13941 #include "confdefs.h"
13942 #include <sys/types.h>
13943 #include <sys/param.h>
13944 int main() {
13945
13946 #if BYTE_ORDER != BIG_ENDIAN
13947  not big endian
13948 #endif
13949 ; return 0; }
13950 EOF
13951 if { (eval echo configure:13952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13952   rm -rf conftest*
13953   ac_cv_c_bigendian=yes
13954 else
13955   echo "configure: failed program was:" >&5
13956   cat conftest.$ac_ext >&5
13957   rm -rf conftest*
13958   ac_cv_c_bigendian=no
13959 fi
13960 rm -f conftest*
13961 else
13962   echo "configure: failed program was:" >&5
13963   cat conftest.$ac_ext >&5
13964 fi
13965 rm -f conftest*
13966 if test $ac_cv_c_bigendian = unknown; then
13967 if test "$cross_compiling" = yes; then
13968     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13969 else
13970   cat > conftest.$ac_ext <<EOF
13971 #line 13972 "configure"
13972 #include "confdefs.h"
13973 main () {
13974   /* Are we little or big endian?  From Harbison&Steele.  */
13975   union
13976   {
13977     long l;
13978     char c[sizeof (long)];
13979   } u;
13980   u.l = 1;
13981   exit (u.c[sizeof (long) - 1] == 1);
13982 }
13983 EOF
13984 if { (eval echo configure:13985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13985 then
13986   ac_cv_c_bigendian=no
13987 else
13988   echo "configure: failed program was:" >&5
13989   cat conftest.$ac_ext >&5
13990   rm -fr conftest*
13991   ac_cv_c_bigendian=yes
13992 fi
13993 rm -fr conftest*
13994 fi
13995
13996 fi
13997 fi
13998
13999 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14000 if test $ac_cv_c_bigendian = yes; then
14001   cat >> confdefs.h <<\EOF
14002 #define WORDS_BIGENDIAN 1
14003 EOF
14004
14005 fi
14006
14007 fi
14008
14009 echo $ac_n "checking size of short""... $ac_c" 1>&6
14010 echo "configure:14011: checking size of short" >&5 
14011 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14012   echo $ac_n "(cached) $ac_c" 1>&6
14013 else
14014   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14015   cat > conftest.$ac_ext <<EOF
14016 #line 14017 "configure"
14017 #include "confdefs.h"
14018 #include "confdefs.h" 
14019 #include <sys/types.h> 
14020  
14021
14022 int main() {
14023 switch (0) case 0: case (sizeof (short) == $ac_size):;
14024 ; return 0; }
14025 EOF
14026 if { (eval echo configure:14027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14027   rm -rf conftest*
14028   ac_cv_sizeof_short=$ac_size
14029 else
14030   echo "configure: failed program was:" >&5
14031   cat conftest.$ac_ext >&5
14032 fi
14033 rm -f conftest* 
14034   if test x$ac_cv_sizeof_short != x ; then break; fi 
14035 done 
14036
14037 fi
14038  
14039 if test x$ac_cv_sizeof_short = x ; then 
14040   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14041 fi 
14042 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14043 cat >> confdefs.h <<EOF
14044 #define SIZEOF_SHORT $ac_cv_sizeof_short
14045 EOF
14046  
14047  
14048 echo $ac_n "checking size of int""... $ac_c" 1>&6
14049 echo "configure:14050: checking size of int" >&5 
14050 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14051   echo $ac_n "(cached) $ac_c" 1>&6
14052 else
14053   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14054   cat > conftest.$ac_ext <<EOF
14055 #line 14056 "configure"
14056 #include "confdefs.h"
14057 #include "confdefs.h" 
14058 #include <sys/types.h> 
14059  
14060
14061 int main() {
14062 switch (0) case 0: case (sizeof (int) == $ac_size):;
14063 ; return 0; }
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14066   rm -rf conftest*
14067   ac_cv_sizeof_int=$ac_size
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071 fi
14072 rm -f conftest* 
14073   if test x$ac_cv_sizeof_int != x ; then break; fi 
14074 done 
14075
14076 fi
14077  
14078 if test x$ac_cv_sizeof_int = x ; then 
14079   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14080 fi 
14081 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14082 cat >> confdefs.h <<EOF
14083 #define SIZEOF_INT $ac_cv_sizeof_int
14084 EOF
14085  
14086  
14087 echo $ac_n "checking size of long""... $ac_c" 1>&6
14088 echo "configure:14089: checking size of long" >&5 
14089 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14090   echo $ac_n "(cached) $ac_c" 1>&6
14091 else
14092   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14093   cat > conftest.$ac_ext <<EOF
14094 #line 14095 "configure"
14095 #include "confdefs.h"
14096 #include "confdefs.h" 
14097 #include <sys/types.h> 
14098  
14099
14100 int main() {
14101 switch (0) case 0: case (sizeof (long) == $ac_size):;
14102 ; return 0; }
14103 EOF
14104 if { (eval echo configure:14105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14105   rm -rf conftest*
14106   ac_cv_sizeof_long=$ac_size
14107 else
14108   echo "configure: failed program was:" >&5
14109   cat conftest.$ac_ext >&5
14110 fi
14111 rm -f conftest* 
14112   if test x$ac_cv_sizeof_long != x ; then break; fi 
14113 done 
14114
14115 fi
14116  
14117 if test x$ac_cv_sizeof_long = x ; then 
14118   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14119 fi 
14120 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14121 cat >> confdefs.h <<EOF
14122 #define SIZEOF_LONG $ac_cv_sizeof_long
14123 EOF
14124  
14125
14126
14127 if test "$ac_cv_sizeof_int" -lt 4 ; then
14128         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14129
14130         cat >> confdefs.h <<\EOF
14131 #define LBER_INT_T long
14132 EOF
14133
14134         cat >> confdefs.h <<\EOF
14135 #define LBER_TAG_T long
14136 EOF
14137
14138         cat >> confdefs.h <<\EOF
14139 #define LBER_SOCKET_T int
14140 EOF
14141
14142 else
14143         cat >> confdefs.h <<\EOF
14144 #define LBER_INT_T int
14145 EOF
14146
14147         cat >> confdefs.h <<\EOF
14148 #define LBER_TAG_T long
14149 EOF
14150
14151         cat >> confdefs.h <<\EOF
14152 #define LBER_SOCKET_T int
14153 EOF
14154
14155 fi
14156
14157 cat >> confdefs.h <<\EOF
14158 #define LBER_LEN_T long
14159 EOF
14160
14161
14162 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14163 echo "configure:14164: checking for 8-bit clean memcmp" >&5
14164 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14165   echo $ac_n "(cached) $ac_c" 1>&6
14166 else
14167   if test "$cross_compiling" = yes; then
14168   ac_cv_func_memcmp_clean=no
14169 else
14170   cat > conftest.$ac_ext <<EOF
14171 #line 14172 "configure"
14172 #include "confdefs.h"
14173
14174 main()
14175 {
14176   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14177   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14178 }
14179
14180 EOF
14181 if { (eval echo configure:14182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14182 then
14183   ac_cv_func_memcmp_clean=yes
14184 else
14185   echo "configure: failed program was:" >&5
14186   cat conftest.$ac_ext >&5
14187   rm -fr conftest*
14188   ac_cv_func_memcmp_clean=no
14189 fi
14190 rm -fr conftest*
14191 fi
14192
14193 fi
14194
14195 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14196 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14197
14198 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14199 echo "configure:14200: checking for strftime" >&5
14200 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14201   echo $ac_n "(cached) $ac_c" 1>&6
14202 else
14203   cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 /* System header to define __stub macros and hopefully few prototypes,
14207     which can conflict with char strftime(); below.  */
14208 #include <assert.h>
14209 /* Override any gcc2 internal prototype to avoid an error.  */
14210 /* We use char because int might match the return type of a gcc2
14211     builtin and then its argument prototype would still apply.  */
14212 char strftime();
14213 char (*f)();
14214
14215 int main() {
14216
14217 /* The GNU C library defines this for functions which it implements
14218     to always fail with ENOSYS.  Some functions are actually named
14219     something starting with __ and the normal name is an alias.  */
14220 #if defined (__stub_strftime) || defined (__stub___strftime)
14221 choke me
14222 #else
14223 f = strftime;
14224 #endif
14225
14226 ; return 0; }
14227 EOF
14228 if { (eval echo configure:14229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14229   rm -rf conftest*
14230   eval "ac_cv_func_strftime=yes"
14231 else
14232   echo "configure: failed program was:" >&5
14233   cat conftest.$ac_ext >&5
14234   rm -rf conftest*
14235   eval "ac_cv_func_strftime=no"
14236 fi
14237 rm -f conftest*
14238 fi
14239
14240 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14241   echo "$ac_t""yes" 1>&6
14242   cat >> confdefs.h <<\EOF
14243 #define HAVE_STRFTIME 1
14244 EOF
14245
14246 else
14247   echo "$ac_t""no" 1>&6
14248 # strftime is in -lintl on SCO UNIX.
14249 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14250 echo "configure:14251: checking for strftime in -lintl" >&5
14251 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14253   echo $ac_n "(cached) $ac_c" 1>&6
14254 else
14255   ac_save_LIBS="$LIBS"
14256 LIBS="-lintl  $LIBS"
14257 cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 /* Override any gcc2 internal prototype to avoid an error.  */
14261 /* We use char because int might match the return type of a gcc2
14262     builtin and then its argument prototype would still apply.  */
14263 char strftime();
14264
14265 int main() {
14266 strftime()
14267 ; return 0; }
14268 EOF
14269 if { (eval echo configure:14270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14270   rm -rf conftest*
14271   eval "ac_cv_lib_$ac_lib_var=yes"
14272 else
14273   echo "configure: failed program was:" >&5
14274   cat conftest.$ac_ext >&5
14275   rm -rf conftest*
14276   eval "ac_cv_lib_$ac_lib_var=no"
14277 fi
14278 rm -f conftest*
14279 LIBS="$ac_save_LIBS"
14280
14281 fi
14282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14283   echo "$ac_t""yes" 1>&6
14284   cat >> confdefs.h <<\EOF
14285 #define HAVE_STRFTIME 1
14286 EOF
14287
14288 LIBS="-lintl $LIBS"
14289 else
14290   echo "$ac_t""no" 1>&6
14291 fi
14292
14293 fi
14294
14295
14296 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14297 echo "configure:14298: checking for inet_aton()" >&5
14298 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14299   echo $ac_n "(cached) $ac_c" 1>&6
14300 else
14301   cat > conftest.$ac_ext <<EOF
14302 #line 14303 "configure"
14303 #include "confdefs.h"
14304
14305 #ifdef HAVE_SYS_TYPES_H
14306 #       include <sys/types.h>
14307 #endif
14308 #ifdef HAVE_SYS_SOCKET_H
14309 #       include <sys/socket.h>
14310 #       ifdef HAVE_SYS_SELECT_H
14311 #               include <sys/select.h>
14312 #       endif
14313 #       include <netinet/in.h>
14314 #       ifdef HAVE_ARPA_INET_H
14315 #               include <arpa/inet.h>
14316 #       endif
14317 #endif
14318
14319 int main() {
14320 struct in_addr in;
14321 int rc = inet_aton( "255.255.255.255", &in );
14322 ; return 0; }
14323 EOF
14324 if { (eval echo configure:14325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14325   rm -rf conftest*
14326   ol_cv_func_inet_aton=yes
14327 else
14328   echo "configure: failed program was:" >&5
14329   cat conftest.$ac_ext >&5
14330   rm -rf conftest*
14331   ol_cv_func_inet_aton=no
14332 fi
14333 rm -f conftest*
14334 fi
14335
14336 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14337   if test $ol_cv_func_inet_aton != no; then
14338     cat >> confdefs.h <<\EOF
14339 #define HAVE_INET_ATON 1
14340 EOF
14341
14342   fi
14343  
14344
14345 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14346 echo "configure:14347: checking for _spawnlp" >&5
14347 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14348   echo $ac_n "(cached) $ac_c" 1>&6
14349 else
14350   cat > conftest.$ac_ext <<EOF
14351 #line 14352 "configure"
14352 #include "confdefs.h"
14353 /* System header to define __stub macros and hopefully few prototypes,
14354     which can conflict with char _spawnlp(); below.  */
14355 #include <assert.h>
14356 /* Override any gcc2 internal prototype to avoid an error.  */
14357 /* We use char because int might match the return type of a gcc2
14358     builtin and then its argument prototype would still apply.  */
14359 char _spawnlp();
14360 char (*f)();
14361
14362 int main() {
14363
14364 /* The GNU C library defines this for functions which it implements
14365     to always fail with ENOSYS.  Some functions are actually named
14366     something starting with __ and the normal name is an alias.  */
14367 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14368 choke me
14369 #else
14370 f = _spawnlp;
14371 #endif
14372
14373 ; return 0; }
14374 EOF
14375 if { (eval echo configure:14376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14376   rm -rf conftest*
14377   eval "ac_cv_func__spawnlp=yes"
14378 else
14379   echo "configure: failed program was:" >&5
14380   cat conftest.$ac_ext >&5
14381   rm -rf conftest*
14382   eval "ac_cv_func__spawnlp=no"
14383 fi
14384 rm -f conftest*
14385 fi
14386
14387 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14388   echo "$ac_t""yes" 1>&6
14389   cat >> confdefs.h <<\EOF
14390 #define HAVE_SPAWNLP 1
14391 EOF
14392
14393 else
14394   echo "$ac_t""no" 1>&6
14395 fi
14396
14397
14398 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14399 echo "configure:14400: checking for _snprintf" >&5
14400 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14401   echo $ac_n "(cached) $ac_c" 1>&6
14402 else
14403   cat > conftest.$ac_ext <<EOF
14404 #line 14405 "configure"
14405 #include "confdefs.h"
14406 /* System header to define __stub macros and hopefully few prototypes,
14407     which can conflict with char _snprintf(); below.  */
14408 #include <assert.h>
14409 /* Override any gcc2 internal prototype to avoid an error.  */
14410 /* We use char because int might match the return type of a gcc2
14411     builtin and then its argument prototype would still apply.  */
14412 char _snprintf();
14413 char (*f)();
14414
14415 int main() {
14416
14417 /* The GNU C library defines this for functions which it implements
14418     to always fail with ENOSYS.  Some functions are actually named
14419     something starting with __ and the normal name is an alias.  */
14420 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14421 choke me
14422 #else
14423 f = _snprintf;
14424 #endif
14425
14426 ; return 0; }
14427 EOF
14428 if { (eval echo configure:14429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14429   rm -rf conftest*
14430   eval "ac_cv_func__snprintf=yes"
14431 else
14432   echo "configure: failed program was:" >&5
14433   cat conftest.$ac_ext >&5
14434   rm -rf conftest*
14435   eval "ac_cv_func__snprintf=no"
14436 fi
14437 rm -f conftest*
14438 fi
14439
14440 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14441   echo "$ac_t""yes" 1>&6
14442   ac_cv_func_snprintf=yes
14443         cat >> confdefs.h <<\EOF
14444 #define snprintf _snprintf
14445 EOF
14446
14447
14448 else
14449   echo "$ac_t""no" 1>&6
14450 fi
14451
14452
14453 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14454 echo "configure:14455: checking for _vsnprintf" >&5
14455 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14456   echo $ac_n "(cached) $ac_c" 1>&6
14457 else
14458   cat > conftest.$ac_ext <<EOF
14459 #line 14460 "configure"
14460 #include "confdefs.h"
14461 /* System header to define __stub macros and hopefully few prototypes,
14462     which can conflict with char _vsnprintf(); below.  */
14463 #include <assert.h>
14464 /* Override any gcc2 internal prototype to avoid an error.  */
14465 /* We use char because int might match the return type of a gcc2
14466     builtin and then its argument prototype would still apply.  */
14467 char _vsnprintf();
14468 char (*f)();
14469
14470 int main() {
14471
14472 /* The GNU C library defines this for functions which it implements
14473     to always fail with ENOSYS.  Some functions are actually named
14474     something starting with __ and the normal name is an alias.  */
14475 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14476 choke me
14477 #else
14478 f = _vsnprintf;
14479 #endif
14480
14481 ; return 0; }
14482 EOF
14483 if { (eval echo configure:14484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14484   rm -rf conftest*
14485   eval "ac_cv_func__vsnprintf=yes"
14486 else
14487   echo "configure: failed program was:" >&5
14488   cat conftest.$ac_ext >&5
14489   rm -rf conftest*
14490   eval "ac_cv_func__vsnprintf=no"
14491 fi
14492 rm -f conftest*
14493 fi
14494
14495 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14496   echo "$ac_t""yes" 1>&6
14497   ac_cv_func_vsnprintf=yes
14498         cat >> confdefs.h <<\EOF
14499 #define vsnprintf _vsnprintf
14500 EOF
14501
14502
14503 else
14504   echo "$ac_t""no" 1>&6
14505 fi
14506
14507
14508 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14509 echo "configure:14510: checking for vprintf" >&5
14510 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14511   echo $ac_n "(cached) $ac_c" 1>&6
14512 else
14513   cat > conftest.$ac_ext <<EOF
14514 #line 14515 "configure"
14515 #include "confdefs.h"
14516 /* System header to define __stub macros and hopefully few prototypes,
14517     which can conflict with char vprintf(); below.  */
14518 #include <assert.h>
14519 /* Override any gcc2 internal prototype to avoid an error.  */
14520 /* We use char because int might match the return type of a gcc2
14521     builtin and then its argument prototype would still apply.  */
14522 char vprintf();
14523 char (*f)();
14524
14525 int main() {
14526
14527 /* The GNU C library defines this for functions which it implements
14528     to always fail with ENOSYS.  Some functions are actually named
14529     something starting with __ and the normal name is an alias.  */
14530 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14531 choke me
14532 #else
14533 f = vprintf;
14534 #endif
14535
14536 ; return 0; }
14537 EOF
14538 if { (eval echo configure:14539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14539   rm -rf conftest*
14540   eval "ac_cv_func_vprintf=yes"
14541 else
14542   echo "configure: failed program was:" >&5
14543   cat conftest.$ac_ext >&5
14544   rm -rf conftest*
14545   eval "ac_cv_func_vprintf=no"
14546 fi
14547 rm -f conftest*
14548 fi
14549
14550 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14551   echo "$ac_t""yes" 1>&6
14552   cat >> confdefs.h <<\EOF
14553 #define HAVE_VPRINTF 1
14554 EOF
14555
14556 else
14557   echo "$ac_t""no" 1>&6
14558 fi
14559
14560 if test "$ac_cv_func_vprintf" != yes; then
14561 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14562 echo "configure:14563: checking for _doprnt" >&5
14563 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14564   echo $ac_n "(cached) $ac_c" 1>&6
14565 else
14566   cat > conftest.$ac_ext <<EOF
14567 #line 14568 "configure"
14568 #include "confdefs.h"
14569 /* System header to define __stub macros and hopefully few prototypes,
14570     which can conflict with char _doprnt(); below.  */
14571 #include <assert.h>
14572 /* Override any gcc2 internal prototype to avoid an error.  */
14573 /* We use char because int might match the return type of a gcc2
14574     builtin and then its argument prototype would still apply.  */
14575 char _doprnt();
14576 char (*f)();
14577
14578 int main() {
14579
14580 /* The GNU C library defines this for functions which it implements
14581     to always fail with ENOSYS.  Some functions are actually named
14582     something starting with __ and the normal name is an alias.  */
14583 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14584 choke me
14585 #else
14586 f = _doprnt;
14587 #endif
14588
14589 ; return 0; }
14590 EOF
14591 if { (eval echo configure:14592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14592   rm -rf conftest*
14593   eval "ac_cv_func__doprnt=yes"
14594 else
14595   echo "configure: failed program was:" >&5
14596   cat conftest.$ac_ext >&5
14597   rm -rf conftest*
14598   eval "ac_cv_func__doprnt=no"
14599 fi
14600 rm -f conftest*
14601 fi
14602
14603 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14604   echo "$ac_t""yes" 1>&6
14605   cat >> confdefs.h <<\EOF
14606 #define HAVE_DOPRNT 1
14607 EOF
14608
14609 else
14610   echo "$ac_t""no" 1>&6
14611 fi
14612
14613 fi
14614
14615
14616 if test $ac_cv_func_vprintf = yes ; then
14617                 for ac_func in vsnprintf vsprintf
14618 do
14619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14620 echo "configure:14621: checking for $ac_func" >&5
14621 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14622   echo $ac_n "(cached) $ac_c" 1>&6
14623 else
14624   cat > conftest.$ac_ext <<EOF
14625 #line 14626 "configure"
14626 #include "confdefs.h"
14627 /* System header to define __stub macros and hopefully few prototypes,
14628     which can conflict with char $ac_func(); below.  */
14629 #include <assert.h>
14630 /* Override any gcc2 internal prototype to avoid an error.  */
14631 /* We use char because int might match the return type of a gcc2
14632     builtin and then its argument prototype would still apply.  */
14633 char $ac_func();
14634 char (*f)();
14635
14636 int main() {
14637
14638 /* The GNU C library defines this for functions which it implements
14639     to always fail with ENOSYS.  Some functions are actually named
14640     something starting with __ and the normal name is an alias.  */
14641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14642 choke me
14643 #else
14644 f = $ac_func;
14645 #endif
14646
14647 ; return 0; }
14648 EOF
14649 if { (eval echo configure:14650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14650   rm -rf conftest*
14651   eval "ac_cv_func_$ac_func=yes"
14652 else
14653   echo "configure: failed program was:" >&5
14654   cat conftest.$ac_ext >&5
14655   rm -rf conftest*
14656   eval "ac_cv_func_$ac_func=no"
14657 fi
14658 rm -f conftest*
14659 fi
14660
14661 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14662   echo "$ac_t""yes" 1>&6
14663     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14664   cat >> confdefs.h <<EOF
14665 #define $ac_tr_func 1
14666 EOF
14667  
14668 else
14669   echo "$ac_t""no" 1>&6
14670 fi
14671 done
14672
14673 fi
14674
14675 for ac_func in \
14676         bcopy                   \
14677         closesocket             \
14678         endgrent                \
14679         endpwent                \
14680         flock                   \
14681         getdtablesize   \
14682         getgrgid                \
14683         gethostname             \
14684         getpass                 \
14685         getpwuid                \
14686         getpwnam                \
14687         getspnam                \
14688         gettimeofday    \
14689         initgroups              \
14690         lockf                   \
14691         memcpy                  \
14692         memmove                 \
14693         mkstemp                 \
14694         pipe                    \
14695         read                    \
14696         recv                    \
14697         recvfrom                \
14698         setpwfile               \
14699         setgid                  \
14700         setegid                 \
14701         setsid                  \
14702         setuid                  \
14703         seteuid                 \
14704         sigaction               \
14705         signal                  \
14706         sigset                  \
14707         snprintf                \
14708         strdup                  \
14709         strerror                \
14710         strpbrk                 \
14711         strrchr                 \
14712         strsep                  \
14713         strstr                  \
14714         strtol                  \
14715         strtoul                 \
14716         strspn                  \
14717         sysconf                 \
14718         waitpid                 \
14719         wait4                   \
14720         write                   \
14721         send                    \
14722         sendto                  \
14723
14724 do
14725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14726 echo "configure:14727: checking for $ac_func" >&5
14727 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14728   echo $ac_n "(cached) $ac_c" 1>&6
14729 else
14730   cat > conftest.$ac_ext <<EOF
14731 #line 14732 "configure"
14732 #include "confdefs.h"
14733 /* System header to define __stub macros and hopefully few prototypes,
14734     which can conflict with char $ac_func(); below.  */
14735 #include <assert.h>
14736 /* Override any gcc2 internal prototype to avoid an error.  */
14737 /* We use char because int might match the return type of a gcc2
14738     builtin and then its argument prototype would still apply.  */
14739 char $ac_func();
14740 char (*f)();
14741
14742 int main() {
14743
14744 /* The GNU C library defines this for functions which it implements
14745     to always fail with ENOSYS.  Some functions are actually named
14746     something starting with __ and the normal name is an alias.  */
14747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14748 choke me
14749 #else
14750 f = $ac_func;
14751 #endif
14752
14753 ; return 0; }
14754 EOF
14755 if { (eval echo configure:14756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14756   rm -rf conftest*
14757   eval "ac_cv_func_$ac_func=yes"
14758 else
14759   echo "configure: failed program was:" >&5
14760   cat conftest.$ac_ext >&5
14761   rm -rf conftest*
14762   eval "ac_cv_func_$ac_func=no"
14763 fi
14764 rm -f conftest*
14765 fi
14766
14767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14768   echo "$ac_t""yes" 1>&6
14769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14770   cat >> confdefs.h <<EOF
14771 #define $ac_tr_func 1
14772 EOF
14773  
14774 else
14775   echo "$ac_t""no" 1>&6
14776 fi
14777 done
14778
14779
14780 for ac_func in getopt tempnam
14781 do
14782 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14783 echo "configure:14784: checking for $ac_func" >&5
14784 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14785   echo $ac_n "(cached) $ac_c" 1>&6
14786 else
14787   cat > conftest.$ac_ext <<EOF
14788 #line 14789 "configure"
14789 #include "confdefs.h"
14790 /* System header to define __stub macros and hopefully few prototypes,
14791     which can conflict with char $ac_func(); below.  */
14792 #include <assert.h>
14793 /* Override any gcc2 internal prototype to avoid an error.  */
14794 /* We use char because int might match the return type of a gcc2
14795     builtin and then its argument prototype would still apply.  */
14796 char $ac_func();
14797 char (*f)();
14798
14799 int main() {
14800
14801 /* The GNU C library defines this for functions which it implements
14802     to always fail with ENOSYS.  Some functions are actually named
14803     something starting with __ and the normal name is an alias.  */
14804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14805 choke me
14806 #else
14807 f = $ac_func;
14808 #endif
14809
14810 ; return 0; }
14811 EOF
14812 if { (eval echo configure:14813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14813   rm -rf conftest*
14814   eval "ac_cv_func_$ac_func=yes"
14815 else
14816   echo "configure: failed program was:" >&5
14817   cat conftest.$ac_ext >&5
14818   rm -rf conftest*
14819   eval "ac_cv_func_$ac_func=no"
14820 fi
14821 rm -f conftest*
14822 fi
14823
14824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14825   echo "$ac_t""yes" 1>&6
14826     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14827   cat >> confdefs.h <<EOF
14828 #define $ac_tr_func 1
14829 EOF
14830  
14831 else
14832   echo "$ac_t""no" 1>&6
14833 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14834 fi
14835 done
14836
14837
14838
14839 if test "$ac_cv_func_getopt" != yes; then
14840     LIBSRCS="$LIBSRCS getopt.c"
14841 fi
14842
14843 if test "$ac_cv_func_tempnam" != yes; then
14844     LIBSRCS="$LIBSRCS tempnam.c"
14845 fi
14846
14847 # Check Configuration
14848 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14849 echo "configure:14850: checking declaration of sys_errlist" >&5
14850 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14851   echo $ac_n "(cached) $ac_c" 1>&6
14852 else
14853   
14854         cat > conftest.$ac_ext <<EOF
14855 #line 14856 "configure"
14856 #include "confdefs.h"
14857
14858 #include <stdio.h>
14859 #include <sys/types.h>
14860 #include <errno.h>
14861 #ifdef WINNT
14862 #include <stdlib.h>
14863 #endif 
14864 int main() {
14865 char *c = (char *) *sys_errlist
14866 ; return 0; }
14867 EOF
14868 if { (eval echo configure:14869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14869   rm -rf conftest*
14870   ol_cv_dcl_sys_errlist=yes
14871         ol_cv_have_sys_errlist=yes
14872 else
14873   echo "configure: failed program was:" >&5
14874   cat conftest.$ac_ext >&5
14875   rm -rf conftest*
14876   ol_cv_dcl_sys_errlist=no
14877 fi
14878 rm -f conftest*
14879 fi
14880
14881 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14882 #
14883 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14884 if test $ol_cv_dcl_sys_errlist = no ; then
14885         cat >> confdefs.h <<\EOF
14886 #define DECL_SYS_ERRLIST 1
14887 EOF
14888
14889
14890         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14891 echo "configure:14892: checking existence of sys_errlist" >&5
14892 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14893   echo $ac_n "(cached) $ac_c" 1>&6
14894 else
14895   
14896                 cat > conftest.$ac_ext <<EOF
14897 #line 14898 "configure"
14898 #include "confdefs.h"
14899 #include <errno.h>
14900 int main() {
14901 char *c = (char *) *sys_errlist
14902 ; return 0; }
14903 EOF
14904 if { (eval echo configure:14905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14905   rm -rf conftest*
14906   ol_cv_have_sys_errlist=yes
14907 else
14908   echo "configure: failed program was:" >&5
14909   cat conftest.$ac_ext >&5
14910   rm -rf conftest*
14911   ol_cv_have_sys_errlist=no
14912 fi
14913 rm -f conftest*
14914 fi
14915
14916 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14917 fi
14918 if test $ol_cv_have_sys_errlist = yes ; then
14919         cat >> confdefs.h <<\EOF
14920 #define HAVE_SYS_ERRLIST 1
14921 EOF
14922
14923 fi
14924
14925
14926
14927 if test "$ol_enable_debug" != no ; then
14928         cat >> confdefs.h <<\EOF
14929 #define LDAP_DEBUG 1
14930 EOF
14931
14932 fi
14933 if test "$ol_enable_syslog" = yes ; then
14934         cat >> confdefs.h <<\EOF
14935 #define LDAP_SYSLOG 1
14936 EOF
14937
14938 fi
14939 if test "$ol_enable_libui" = yes ; then
14940         cat >> confdefs.h <<\EOF
14941 #define LDAP_LIBUI 1
14942 EOF
14943
14944 fi
14945 if test "$ol_enable_cache" = no ; then
14946         cat >> confdefs.h <<\EOF
14947 #define LDAP_NOCACHE 1
14948 EOF
14949
14950 fi
14951 if test "$ol_enable_dns" != no ; then
14952         cat >> confdefs.h <<\EOF
14953 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14954 EOF
14955
14956 fi
14957 if test "$ol_enable_proctitle" != no ; then
14958         cat >> confdefs.h <<\EOF
14959 #define LDAP_PROCTITLE 1
14960 EOF
14961
14962 fi
14963 if test "$ol_enable_referrals" != no ; then
14964         cat >> confdefs.h <<\EOF
14965 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14966 EOF
14967
14968 fi
14969 if test "$ol_enable_cldap" != no ; then
14970         cat >> confdefs.h <<\EOF
14971 #define LDAP_CONNECTIONLESS 1
14972 EOF
14973
14974 fi
14975
14976 if test "$ol_enable_crypt" != no ; then
14977         cat >> confdefs.h <<\EOF
14978 #define SLAPD_CRYPT 1
14979 EOF
14980
14981 fi
14982 if test "$ol_enable_cleartext" != no ; then
14983         cat >> confdefs.h <<\EOF
14984 #define SLAPD_CLEARTEXT 1
14985 EOF
14986
14987 fi
14988 if test "$ol_enable_multimaster" != no ; then
14989         cat >> confdefs.h <<\EOF
14990 #define SLAPD_MULTIMASTER 1
14991 EOF
14992
14993 fi
14994 if test "$ol_enable_phonetic" != no ; then
14995         cat >> confdefs.h <<\EOF
14996 #define SLAPD_PHONETIC 1
14997 EOF
14998
14999 fi
15000 if test "$ol_enable_rlookups" != no ; then
15001         cat >> confdefs.h <<\EOF
15002 #define SLAPD_RLOOKUPS 1
15003 EOF
15004
15005 fi
15006 if test "$ol_enable_aci" != no ; then
15007         cat >> confdefs.h <<\EOF
15008 #define SLAPD_ACI_ENABLED 1
15009 EOF
15010
15011 fi
15012 if test "$ol_enable_discreteaci" != no ; then
15013         cat >> confdefs.h <<\EOF
15014 #define SLAPD_ACI_DISCRETE_RIGHTS 1
15015 EOF
15016
15017 fi
15018
15019 if test "$ol_link_modules" != no ; then
15020         cat >> confdefs.h <<\EOF
15021 #define SLAPD_MODULES 1
15022 EOF
15023
15024         BUILD_SLAPD=yes
15025         SLAPD_MODULES_LDFLAGS="-dlopen self"
15026 fi
15027
15028 if test "$ol_link_bdb2" != no ; then
15029         cat >> confdefs.h <<\EOF
15030 #define SLAPD_BDB2 1
15031 EOF
15032
15033         BUILD_SLAPD=yes
15034         BUILD_BDB2=yes
15035         if test "$ol_with_bdb2_module" != static ; then
15036                 cat >> confdefs.h <<\EOF
15037 #define SLAPD_BDB2_DYNAMIC 1
15038 EOF
15039
15040                 BUILD_BDB2=mod
15041                 BUILD_BDB2_DYNAMIC=shared
15042                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15043         fi
15044 fi
15045
15046 if test "$ol_enable_ldap" != no ; then
15047         cat >> confdefs.h <<\EOF
15048 #define SLAPD_LDAP 1
15049 EOF
15050
15051         BUILD_SLAPD=yes
15052         BUILD_LDAP=yes
15053         if test "$ol_with_ldap_module" != static ; then
15054                 cat >> confdefs.h <<\EOF
15055 #define SLAPD_LDAP_DYNAMIC 1
15056 EOF
15057
15058                 BUILD_LDAP=mod
15059                 BUILD_LDAP_DYNAMIC=shared
15060                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15061         fi
15062 fi
15063
15064 if test "$ol_link_ldbm" != no ; then
15065         cat >> confdefs.h <<\EOF
15066 #define SLAPD_LDBM 1
15067 EOF
15068
15069         BUILD_SLAPD=yes
15070         BUILD_LDBM=yes
15071         if test "$ol_with_ldbm_module" != static ; then
15072                 cat >> confdefs.h <<\EOF
15073 #define SLAPD_LDBM_DYNAMIC 1
15074 EOF
15075
15076                 BUILD_LDBM=mod
15077                 BUILD_LDBM_DYNAMIC=shared
15078                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15079         fi
15080 fi
15081
15082 if test "$ol_enable_passwd" != no ; then
15083         cat >> confdefs.h <<\EOF
15084 #define SLAPD_PASSWD 1
15085 EOF
15086
15087         BUILD_SLAPD=yes
15088         BUILD_PASSWD=yes
15089         if test "$ol_with_passwd_module" != static ; then
15090                 cat >> confdefs.h <<\EOF
15091 #define SLAPD_PASSWD_DYNAMIC 1
15092 EOF
15093
15094                 BUILD_PASSWD=mod
15095                 BUILD_PASSWD_DYNAMIC=shared
15096                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15097         fi
15098 fi
15099
15100 if test "$ol_link_perl" != no ; then
15101         cat >> confdefs.h <<\EOF
15102 #define SLAPD_PERL 1
15103 EOF
15104
15105         BUILD_SLAPD=yes
15106         BUILD_PERL=yes
15107         if test "$ol_with_perl_module" != static ; then
15108                 cat >> confdefs.h <<\EOF
15109 #define SLAPD_PERL_DYNAMIC 1
15110 EOF
15111
15112                 BUILD_PERL=mod
15113                 BUILD_PERL_DYNAMIC=shared
15114                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15115         fi
15116 fi
15117
15118 if test "$ol_enable_shell" != no ; then
15119         cat >> confdefs.h <<\EOF
15120 #define SLAPD_SHELL 1
15121 EOF
15122
15123         BUILD_SLAPD=yes
15124         BUILD_SHELL=yes
15125         if test "$ol_with_shell_module" != static ; then
15126                 cat >> confdefs.h <<\EOF
15127 #define SLAPD_SHELL_DYNAMIC 1
15128 EOF
15129
15130                 BUILD_SHELL=mod
15131                 BUILD_SHELL_DYNAMIC=shared
15132                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15133         fi
15134 fi
15135
15136 if test "$ol_enable_tcl" != no ; then
15137         cat >> confdefs.h <<\EOF
15138 #define SLAPD_TCL 1
15139 EOF
15140
15141         BUILD_SLAPD=yes
15142         BUILD_TCL=yes
15143         if test "$ol_with_tcl_module" != static; then
15144                 cat >> confdefs.h <<\EOF
15145 #define SLAPD_TCL_DYNAMIC 1
15146 EOF
15147
15148                 BUILD_TCL=mod
15149                 BUILD_TCL_DYNAMIC=shared
15150                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15151         fi
15152 fi
15153
15154 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15155         $BUILD_SLAPD = yes ; then
15156         BUILD_SLURPD=yes
15157 fi
15158
15159 if test "$ol_link_isode" != no ; then
15160         BUILD_LDAPD=yes
15161 fi
15162
15163
15164 if test "$LINK_BINS_DYNAMIC" = yes; then
15165     LIB_LINKAGE=DYN
15166     LT_LIB_LINKAGE=shared
15167 else
15168     LIB_LINKAGE=STAT
15169     LT_LIB_LINKAGE=static
15170 fi
15171
15172 if test "$ac_cv_mingw32" = yes ; then
15173     PLAT=NT
15174     DYN_EXT=dll
15175 else
15176     PLAT=UNIX
15177     DYN_EXT=so
15178 fi
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189   
15190   
15191   
15192   
15193   
15194   
15195   
15196   
15197   
15198   
15199   
15200   
15201   
15202   
15203   
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234 trap '' 1 2 15
15235
15236 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15237
15238 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15239 # Let make expand exec_prefix.
15240 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15241
15242 # Any assignment to VPATH causes Sun make to only execute
15243 # the first set of double-colon rules, so remove it if not needed.
15244 # If there is a colon in the path, we need to keep it.
15245 if test "x$srcdir" = x.; then
15246   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15247 fi
15248
15249 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15250
15251 DEFS=-DHAVE_CONFIG_H
15252
15253 # Without the "./", some shells look in PATH for config.status.
15254 : ${CONFIG_STATUS=./config.status}
15255
15256 echo creating $CONFIG_STATUS
15257 rm -f $CONFIG_STATUS
15258 cat > $CONFIG_STATUS <<EOF
15259 #! /bin/sh
15260 # Generated automatically by configure.
15261 # Run this file to recreate the current configuration.
15262 # This directory was configured as follows,
15263 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15264 #
15265 # $0 $ac_configure_args
15266 #
15267 # Compiler output produced by configure, useful for debugging
15268 # configure, is in ./config.log if it exists.
15269
15270 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15271 for ac_option
15272 do
15273   case "\$ac_option" in
15274   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15275     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15276     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15277   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15278     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15279     exit 0 ;;
15280   -help | --help | --hel | --he | --h)
15281     echo "\$ac_cs_usage"; exit 0 ;;
15282   *) echo "\$ac_cs_usage"; exit 1 ;;
15283   esac
15284 done
15285
15286 ac_given_srcdir=$srcdir
15287 ac_given_INSTALL="$INSTALL"
15288
15289 trap 'rm -fr `echo "\
15290 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15291 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15292 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15293 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15294 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15295 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15296 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15297 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15298 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15299 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15300 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15301 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15302 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15303 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15304 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15305 include/Makefile:build/top.mk:include/Makefile.in \
15306 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15307 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15308 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15309 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15310 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15311 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15312 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15313 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15314 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15315 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15316 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15317 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15318 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15319 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15320 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15321 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15322 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15323 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15324 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15325 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15326 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15327 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15328 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15329 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15330 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15331 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15332  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15333 EOF
15334 cat >> $CONFIG_STATUS <<EOF
15335
15336 # Protect against being on the right side of a sed subst in config.status.
15337 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15338  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15339 $ac_vpsub
15340 $extrasub
15341 s%@SHELL@%$SHELL%g
15342 s%@CFLAGS@%$CFLAGS%g
15343 s%@CPPFLAGS@%$CPPFLAGS%g
15344 s%@CXXFLAGS@%$CXXFLAGS%g
15345 s%@FFLAGS@%$FFLAGS%g
15346 s%@DEFS@%$DEFS%g
15347 s%@LDFLAGS@%$LDFLAGS%g
15348 s%@LIBS@%$LIBS%g
15349 s%@exec_prefix@%$exec_prefix%g
15350 s%@prefix@%$prefix%g
15351 s%@program_transform_name@%$program_transform_name%g
15352 s%@bindir@%$bindir%g
15353 s%@sbindir@%$sbindir%g
15354 s%@libexecdir@%$libexecdir%g
15355 s%@datadir@%$datadir%g
15356 s%@sysconfdir@%$sysconfdir%g
15357 s%@sharedstatedir@%$sharedstatedir%g
15358 s%@localstatedir@%$localstatedir%g
15359 s%@libdir@%$libdir%g
15360 s%@includedir@%$includedir%g
15361 s%@oldincludedir@%$oldincludedir%g
15362 s%@infodir@%$infodir%g
15363 s%@mandir@%$mandir%g
15364 s%@host@%$host%g
15365 s%@host_alias@%$host_alias%g
15366 s%@host_cpu@%$host_cpu%g
15367 s%@host_vendor@%$host_vendor%g
15368 s%@host_os@%$host_os%g
15369 s%@target@%$target%g
15370 s%@target_alias@%$target_alias%g
15371 s%@target_cpu@%$target_cpu%g
15372 s%@target_vendor@%$target_vendor%g
15373 s%@target_os@%$target_os%g
15374 s%@build@%$build%g
15375 s%@build_alias@%$build_alias%g
15376 s%@build_cpu@%$build_cpu%g
15377 s%@build_vendor@%$build_vendor%g
15378 s%@build_os@%$build_os%g
15379 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15380 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15381 s%@INSTALL_DATA@%$INSTALL_DATA%g
15382 s%@PACKAGE@%$PACKAGE%g
15383 s%@VERSION@%$VERSION%g
15384 s%@ACLOCAL@%$ACLOCAL%g
15385 s%@AUTOCONF@%$AUTOCONF%g
15386 s%@AUTOMAKE@%$AUTOMAKE%g
15387 s%@AUTOHEADER@%$AUTOHEADER%g
15388 s%@MAKEINFO@%$MAKEINFO%g
15389 s%@install_sh@%$install_sh%g
15390 s%@AMTAR@%$AMTAR%g
15391 s%@AWK@%$AWK%g
15392 s%@AMTARFLAGS@%$AMTARFLAGS%g
15393 s%@SET_MAKE@%$SET_MAKE%g
15394 s%@top_builddir@%$top_builddir%g
15395 s%@ldap_subdir@%$ldap_subdir%g
15396 s%@CC@%$CC%g
15397 s%@RANLIB@%$RANLIB%g
15398 s%@LD@%$LD%g
15399 s%@NM@%$NM%g
15400 s%@LN_S@%$LN_S%g
15401 s%@DLLTOOL@%$DLLTOOL%g
15402 s%@AS@%$AS%g
15403 s%@OBJDUMP@%$OBJDUMP%g
15404 s%@LIBTOOL@%$LIBTOOL%g
15405 s%@LN_H@%$LN_H%g
15406 s%@SENDMAIL@%$SENDMAIL%g
15407 s%@EDITOR@%$EDITOR%g
15408 s%@FINGER@%$FINGER%g
15409 s%@PERLBIN@%$PERLBIN%g
15410 s%@CPP@%$CPP%g
15411 s%@EXEEXT@%$EXEEXT%g
15412 s%@OBJEXT@%$OBJEXT%g
15413 s%@OL_MKDEP@%$OL_MKDEP%g
15414 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15415 s%@PEPSY@%$PEPSY%g
15416 s%@LIBOBJS@%$LIBOBJS%g
15417 s%@LIBSRCS@%$LIBSRCS%g
15418 s%@PLAT@%$PLAT%g
15419 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15420 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15421 s%@DYN_EXT@%$DYN_EXT%g
15422 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15423 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15424 s%@BUILD_BDB2@%$BUILD_BDB2%g
15425 s%@BUILD_LDAP@%$BUILD_LDAP%g
15426 s%@BUILD_LDBM@%$BUILD_LDBM%g
15427 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15428 s%@BUILD_PERL@%$BUILD_PERL%g
15429 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15430 s%@BUILD_SHELL@%$BUILD_SHELL%g
15431 s%@BUILD_TCL@%$BUILD_TCL%g
15432 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15433 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15434 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15435 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15436 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15437 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15438 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15439 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15440 s%@LDAP_LIBS@%$LDAP_LIBS%g
15441 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15442 s%@LDIF_LIBS@%$LDIF_LIBS%g
15443 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15444 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15445 s%@LDBM_LIBS@%$LDBM_LIBS%g
15446 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15447 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15448 s%@WRAP_LIBS@%$WRAP_LIBS%g
15449 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15450 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15451 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15452 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15453 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15454 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15455 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15456 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15457 s%@KRB_LIBS@%$KRB_LIBS%g
15458 s%@READLINE_LIBS@%$READLINE_LIBS%g
15459 s%@SASL_LIBS@%$SASL_LIBS%g
15460 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15461 s%@TLS_LIBS@%$TLS_LIBS%g
15462 s%@MODULES_LIBS@%$MODULES_LIBS%g
15463
15464 CEOF
15465 EOF
15466
15467 cat >> $CONFIG_STATUS <<\EOF
15468
15469 # Split the substitutions into bite-sized pieces for seds with
15470 # small command number limits, like on Digital OSF/1 and HP-UX.
15471 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15472 ac_file=1 # Number of current file.
15473 ac_beg=1 # First line for current file.
15474 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15475 ac_more_lines=:
15476 ac_sed_cmds=""
15477 while $ac_more_lines; do
15478   if test $ac_beg -gt 1; then
15479     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15480   else
15481     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15482   fi
15483   if test ! -s conftest.s$ac_file; then
15484     ac_more_lines=false
15485     rm -f conftest.s$ac_file
15486   else
15487     if test -z "$ac_sed_cmds"; then
15488       ac_sed_cmds="sed -f conftest.s$ac_file"
15489     else
15490       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15491     fi
15492     ac_file=`expr $ac_file + 1`
15493     ac_beg=$ac_end
15494     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15495   fi
15496 done
15497 if test -z "$ac_sed_cmds"; then
15498   ac_sed_cmds=cat
15499 fi
15500 EOF
15501
15502 cat >> $CONFIG_STATUS <<EOF
15503
15504 CONFIG_FILES=\${CONFIG_FILES-"\
15505 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15506 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15507 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15508 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15509 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15510 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15511 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15512 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15513 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15514 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15515 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15516 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15517 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15518 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15519 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15520 include/Makefile:build/top.mk:include/Makefile.in \
15521 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15522 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15523 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15524 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15525 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15526 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15527 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15528 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15529 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15530 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15531 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15532 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15533 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15534 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15535 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15536 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15537 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15538 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15539 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15540 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15541 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15542 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15543 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15544 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15545 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15546 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15547 "}
15548 EOF
15549 cat >> $CONFIG_STATUS <<\EOF
15550 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15551   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15552   case "$ac_file" in
15553   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15554        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15555   *) ac_file_in="${ac_file}.in" ;;
15556   esac
15557
15558   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15559
15560   # Remove last slash and all that follows it.  Not all systems have dirname.
15561   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15562   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15563     # The file is in a subdirectory.
15564     test ! -d "$ac_dir" && mkdir "$ac_dir"
15565     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15566     # A "../" for each directory in $ac_dir_suffix.
15567     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15568   else
15569     ac_dir_suffix= ac_dots=
15570   fi
15571
15572   case "$ac_given_srcdir" in
15573   .)  srcdir=.
15574       if test -z "$ac_dots"; then top_srcdir=.
15575       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15576   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15577   *) # Relative path.
15578     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15579     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15580   esac
15581
15582   case "$ac_given_INSTALL" in
15583   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15584   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15585   esac
15586
15587   echo creating "$ac_file"
15588   rm -f "$ac_file"
15589   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15590   case "$ac_file" in
15591   *Makefile*) ac_comsub="1i\\
15592 # $configure_input" ;;
15593   *) ac_comsub= ;;
15594   esac
15595
15596   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15597   sed -e "$ac_comsub
15598 s%@configure_input@%$configure_input%g
15599 s%@srcdir@%$srcdir%g
15600 s%@top_srcdir@%$top_srcdir%g
15601 s%@INSTALL@%$INSTALL%g
15602 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15603 fi; done
15604 rm -f conftest.s*
15605
15606 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15607 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15608 #
15609 # ac_d sets the value in "#define NAME VALUE" lines.
15610 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15611 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15612 ac_dC='\3'
15613 ac_dD='%g'
15614 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15615 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15616 ac_uB='\([      ]\)%\1#\2define\3'
15617 ac_uC=' '
15618 ac_uD='\4%g'
15619 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15620 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15621 ac_eB='$%\1#\2define\3'
15622 ac_eC=' '
15623 ac_eD='%g'
15624
15625 if test "${CONFIG_HEADERS+set}" != set; then
15626 EOF
15627 cat >> $CONFIG_STATUS <<EOF
15628   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15629 EOF
15630 cat >> $CONFIG_STATUS <<\EOF
15631 fi
15632 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15633   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15634   case "$ac_file" in
15635   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15636        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15637   *) ac_file_in="${ac_file}.in" ;;
15638   esac
15639
15640   echo creating $ac_file
15641
15642   rm -f conftest.frag conftest.in conftest.out
15643   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15644   cat $ac_file_inputs > conftest.in
15645
15646 EOF
15647
15648 # Transform confdefs.h into a sed script conftest.vals that substitutes
15649 # the proper values into config.h.in to produce config.h.  And first:
15650 # Protect against being on the right side of a sed subst in config.status.
15651 # Protect against being in an unquoted here document in config.status.
15652 rm -f conftest.vals
15653 cat > conftest.hdr <<\EOF
15654 s/[\\&%]/\\&/g
15655 s%[\\$`]%\\&%g
15656 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15657 s%ac_d%ac_u%gp
15658 s%ac_u%ac_e%gp
15659 EOF
15660 sed -n -f conftest.hdr confdefs.h > conftest.vals
15661 rm -f conftest.hdr
15662
15663 # This sed command replaces #undef with comments.  This is necessary, for
15664 # example, in the case of _POSIX_SOURCE, which is predefined and required
15665 # on some systems where configure will not decide to define it.
15666 cat >> conftest.vals <<\EOF
15667 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15668 EOF
15669
15670 # Break up conftest.vals because some shells have a limit on
15671 # the size of here documents, and old seds have small limits too.
15672
15673 rm -f conftest.tail
15674 while :
15675 do
15676   ac_lines=`grep -c . conftest.vals`
15677   # grep -c gives empty output for an empty file on some AIX systems.
15678   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15679   # Write a limited-size here document to conftest.frag.
15680   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15681   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15682   echo 'CEOF
15683   sed -f conftest.frag conftest.in > conftest.out
15684   rm -f conftest.in
15685   mv conftest.out conftest.in
15686 ' >> $CONFIG_STATUS
15687   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15688   rm -f conftest.vals
15689   mv conftest.tail conftest.vals
15690 done
15691 rm -f conftest.vals
15692
15693 cat >> $CONFIG_STATUS <<\EOF
15694   rm -f conftest.frag conftest.h
15695   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15696   cat conftest.in >> conftest.h
15697   rm -f conftest.in
15698   if cmp -s $ac_file conftest.h 2>/dev/null; then
15699     echo "$ac_file is unchanged"
15700     rm -f conftest.h
15701   else
15702     # Remove last slash and all that follows it.  Not all systems have dirname.
15703       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15704       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15705       # The file is in a subdirectory.
15706       test ! -d "$ac_dir" && mkdir "$ac_dir"
15707     fi
15708     rm -f $ac_file
15709     mv conftest.h $ac_file
15710   fi
15711 fi; done
15712
15713 EOF
15714 cat >> $CONFIG_STATUS <<EOF
15715
15716 EOF
15717 cat >> $CONFIG_STATUS <<\EOF
15718
15719 date > stamp-h
15720 echo Please \"make depend\" to build dependencies
15721
15722 exit 0
15723 EOF
15724 chmod +x $CONFIG_STATUS
15725 rm -fr confdefs* $ac_clean_files
15726 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15727