]> git.sur5r.net Git - openldap/blob - configure
write winsock with AC_CACHE_CHECK to allow mangling via environment.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.275 1999/11/02 01:10:37 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""... $ac_c" 1>&6
4700 echo "configure:4701: checking for winsock" >&5
4701 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   cat > conftest.$ac_ext <<EOF
4705 #line 4706 "configure"
4706 #include "confdefs.h"
4707 #include <winsock.h>
4708 int main() {
4709
4710                         socket(0,0,0);
4711                         select(0,NULL,NULL,NULL,NULL);
4712                         closesocket(0);
4713                         gethostname(NULL,0);
4714         
4715 ; return 0; }
4716 EOF
4717 if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718   rm -rf conftest*
4719   ol_cv_winsock=yes
4720 else
4721   echo "configure: failed program was:" >&5
4722   cat conftest.$ac_ext >&5
4723   rm -rf conftest*
4724   ol_cv_winsock=no
4725 fi
4726 rm -f conftest*]
4727 fi
4728
4729 echo "$ac_t""$ol_cv_winsock" 1>&6
4730
4731         if test $ol_cv_winsock = yes ; then
4732                 cat >> confdefs.h <<\EOF
4733 #define HAVE_WINSOCK 1
4734 EOF
4735
4736                 ac_cv_func_socket=yes
4737                 ac_cv_func_select=yes
4738                 ac_cv_func_closesocket=yes
4739                 ac_cv_func_gethostname=yes
4740         fi
4741 fi
4742
4743
4744 echo $ac_n "checking for socket""... $ac_c" 1>&6
4745 echo "configure:4746: checking for socket" >&5
4746 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   cat > conftest.$ac_ext <<EOF
4750 #line 4751 "configure"
4751 #include "confdefs.h"
4752 /* System header to define __stub macros and hopefully few prototypes,
4753     which can conflict with char socket(); below.  */
4754 #include <assert.h>
4755 /* Override any gcc2 internal prototype to avoid an error.  */
4756 /* We use char because int might match the return type of a gcc2
4757     builtin and then its argument prototype would still apply.  */
4758 char socket();
4759 char (*f)();
4760
4761 int main() {
4762
4763 /* The GNU C library defines this for functions which it implements
4764     to always fail with ENOSYS.  Some functions are actually named
4765     something starting with __ and the normal name is an alias.  */
4766 #if defined (__stub_socket) || defined (__stub___socket)
4767 choke me
4768 #else
4769 f = socket;
4770 #endif
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   eval "ac_cv_func_socket=yes"
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   eval "ac_cv_func_socket=no"
4782 fi
4783 rm -f conftest*
4784 fi
4785
4786 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4787   echo "$ac_t""yes" 1>&6
4788   :
4789 else
4790   echo "$ac_t""no" 1>&6
4791         
4792         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4793 echo "configure:4794: checking for main in -lsocket" >&5
4794 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4796   echo $ac_n "(cached) $ac_c" 1>&6
4797 else
4798   ac_save_LIBS="$LIBS"
4799 LIBS="-lsocket  $LIBS"
4800 cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803
4804 int main() {
4805 main()
4806 ; return 0; }
4807 EOF
4808 if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4809   rm -rf conftest*
4810   eval "ac_cv_lib_$ac_lib_var=yes"
4811 else
4812   echo "configure: failed program was:" >&5
4813   cat conftest.$ac_ext >&5
4814   rm -rf conftest*
4815   eval "ac_cv_lib_$ac_lib_var=no"
4816 fi
4817 rm -f conftest*
4818 LIBS="$ac_save_LIBS"
4819
4820 fi
4821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4822   echo "$ac_t""yes" 1>&6
4823     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4824     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4825   cat >> confdefs.h <<EOF
4826 #define $ac_tr_lib 1
4827 EOF
4828
4829   LIBS="-lsocket $LIBS"
4830
4831 else
4832   echo "$ac_t""no" 1>&6
4833 fi
4834
4835         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4836 echo "configure:4837: checking for main in -lnet" >&5
4837 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   ac_save_LIBS="$LIBS"
4842 LIBS="-lnet  $LIBS"
4843 cat > conftest.$ac_ext <<EOF
4844 #line 4845 "configure"
4845 #include "confdefs.h"
4846
4847 int main() {
4848 main()
4849 ; return 0; }
4850 EOF
4851 if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4852   rm -rf conftest*
4853   eval "ac_cv_lib_$ac_lib_var=yes"
4854 else
4855   echo "configure: failed program was:" >&5
4856   cat conftest.$ac_ext >&5
4857   rm -rf conftest*
4858   eval "ac_cv_lib_$ac_lib_var=no"
4859 fi
4860 rm -f conftest*
4861 LIBS="$ac_save_LIBS"
4862
4863 fi
4864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4865   echo "$ac_t""yes" 1>&6
4866     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4867     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4868   cat >> confdefs.h <<EOF
4869 #define $ac_tr_lib 1
4870 EOF
4871
4872   LIBS="-lnet $LIBS"
4873
4874 else
4875   echo "$ac_t""no" 1>&6
4876 fi
4877
4878         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4879 echo "configure:4880: checking for socket in -lnet" >&5
4880 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4882   echo $ac_n "(cached) $ac_c" 1>&6
4883 else
4884   ac_save_LIBS="$LIBS"
4885 LIBS="-lnet  $LIBS"
4886 cat > conftest.$ac_ext <<EOF
4887 #line 4888 "configure"
4888 #include "confdefs.h"
4889 /* Override any gcc2 internal prototype to avoid an error.  */
4890 /* We use char because int might match the return type of a gcc2
4891     builtin and then its argument prototype would still apply.  */
4892 char socket();
4893
4894 int main() {
4895 socket()
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899   rm -rf conftest*
4900   eval "ac_cv_lib_$ac_lib_var=yes"
4901 else
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   eval "ac_cv_lib_$ac_lib_var=no"
4906 fi
4907 rm -f conftest*
4908 LIBS="$ac_save_LIBS"
4909
4910 fi
4911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4912   echo "$ac_t""yes" 1>&6
4913     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4914     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4915   cat >> confdefs.h <<EOF
4916 #define $ac_tr_lib 1
4917 EOF
4918
4919   LIBS="-lnet $LIBS"
4920
4921 else
4922   echo "$ac_t""no" 1>&6
4923 fi
4924
4925         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4926 echo "configure:4927: checking for main in -lnsl_s" >&5
4927 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   ac_save_LIBS="$LIBS"
4932 LIBS="-lnsl_s  $LIBS"
4933 cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936
4937 int main() {
4938 main()
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=yes"
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   eval "ac_cv_lib_$ac_lib_var=no"
4949 fi
4950 rm -f conftest*
4951 LIBS="$ac_save_LIBS"
4952
4953 fi
4954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4955   echo "$ac_t""yes" 1>&6
4956     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4957     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4958   cat >> confdefs.h <<EOF
4959 #define $ac_tr_lib 1
4960 EOF
4961
4962   LIBS="-lnsl_s $LIBS"
4963
4964 else
4965   echo "$ac_t""no" 1>&6
4966 fi
4967
4968         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4969 echo "configure:4970: checking for main in -lnsl" >&5
4970 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4971 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4972   echo $ac_n "(cached) $ac_c" 1>&6
4973 else
4974   ac_save_LIBS="$LIBS"
4975 LIBS="-lnsl  $LIBS"
4976 cat > conftest.$ac_ext <<EOF
4977 #line 4978 "configure"
4978 #include "confdefs.h"
4979
4980 int main() {
4981 main()
4982 ; return 0; }
4983 EOF
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985   rm -rf conftest*
4986   eval "ac_cv_lib_$ac_lib_var=yes"
4987 else
4988   echo "configure: failed program was:" >&5
4989   cat conftest.$ac_ext >&5
4990   rm -rf conftest*
4991   eval "ac_cv_lib_$ac_lib_var=no"
4992 fi
4993 rm -f conftest*
4994 LIBS="$ac_save_LIBS"
4995
4996 fi
4997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4998   echo "$ac_t""yes" 1>&6
4999     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5000     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5001   cat >> confdefs.h <<EOF
5002 #define $ac_tr_lib 1
5003 EOF
5004
5005   LIBS="-lnsl $LIBS"
5006
5007 else
5008   echo "$ac_t""no" 1>&6
5009 fi
5010
5011         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5012 echo "configure:5013: checking for socket in -linet" >&5
5013 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5015   echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017   ac_save_LIBS="$LIBS"
5018 LIBS="-linet  $LIBS"
5019 cat > conftest.$ac_ext <<EOF
5020 #line 5021 "configure"
5021 #include "confdefs.h"
5022 /* Override any gcc2 internal prototype to avoid an error.  */
5023 /* We use char because int might match the return type of a gcc2
5024     builtin and then its argument prototype would still apply.  */
5025 char socket();
5026
5027 int main() {
5028 socket()
5029 ; return 0; }
5030 EOF
5031 if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=yes"
5034 else
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   eval "ac_cv_lib_$ac_lib_var=no"
5039 fi
5040 rm -f conftest*
5041 LIBS="$ac_save_LIBS"
5042
5043 fi
5044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5045   echo "$ac_t""yes" 1>&6
5046     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5047     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5048   cat >> confdefs.h <<EOF
5049 #define $ac_tr_lib 1
5050 EOF
5051
5052   LIBS="-linet $LIBS"
5053
5054 else
5055   echo "$ac_t""no" 1>&6
5056 fi
5057
5058         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5059 echo "configure:5060: checking for main in -lgen" >&5
5060 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5062   echo $ac_n "(cached) $ac_c" 1>&6
5063 else
5064   ac_save_LIBS="$LIBS"
5065 LIBS="-lgen  $LIBS"
5066 cat > conftest.$ac_ext <<EOF
5067 #line 5068 "configure"
5068 #include "confdefs.h"
5069
5070 int main() {
5071 main()
5072 ; return 0; }
5073 EOF
5074 if { (eval echo configure:5075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=yes"
5077 else
5078   echo "configure: failed program was:" >&5
5079   cat conftest.$ac_ext >&5
5080   rm -rf conftest*
5081   eval "ac_cv_lib_$ac_lib_var=no"
5082 fi
5083 rm -f conftest*
5084 LIBS="$ac_save_LIBS"
5085
5086 fi
5087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5088   echo "$ac_t""yes" 1>&6
5089     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5090     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5091   cat >> confdefs.h <<EOF
5092 #define $ac_tr_lib 1
5093 EOF
5094
5095   LIBS="-lgen $LIBS"
5096
5097 else
5098   echo "$ac_t""no" 1>&6
5099 fi
5100
5101
5102 fi
5103
5104
5105 echo $ac_n "checking for select""... $ac_c" 1>&6
5106 echo "configure:5107: checking for select" >&5
5107 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5108   echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110   cat > conftest.$ac_ext <<EOF
5111 #line 5112 "configure"
5112 #include "confdefs.h"
5113 /* System header to define __stub macros and hopefully few prototypes,
5114     which can conflict with char select(); below.  */
5115 #include <assert.h>
5116 /* Override any gcc2 internal prototype to avoid an error.  */
5117 /* We use char because int might match the return type of a gcc2
5118     builtin and then its argument prototype would still apply.  */
5119 char select();
5120 char (*f)();
5121
5122 int main() {
5123
5124 /* The GNU C library defines this for functions which it implements
5125     to always fail with ENOSYS.  Some functions are actually named
5126     something starting with __ and the normal name is an alias.  */
5127 #if defined (__stub_select) || defined (__stub___select)
5128 choke me
5129 #else
5130 f = select;
5131 #endif
5132
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_func_select=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_func_select=no"
5143 fi
5144 rm -f conftest*
5145 fi
5146
5147 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5148   echo "$ac_t""yes" 1>&6
5149   :
5150 else
5151   echo "$ac_t""no" 1>&6
5152 { echo "configure: error: select() required." 1>&2; exit 1; }
5153 fi
5154
5155
5156 if test "${ac_cv_header_winsock_h}" != yes; then
5157                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5158 echo "configure:5159: checking types of arguments for select()" >&5
5159  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5160   echo $ac_n "(cached) $ac_c" 1>&6
5161 else
5162    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5163   echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5169      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5170       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5171        cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174 #ifdef HAVE_SYS_TYPES_H
5175 #include <sys/types.h>
5176 #endif
5177 #ifdef HAVE_SYS_TIME_H
5178 #include <sys/time.h>
5179 #endif
5180 #ifdef HAVE_SYS_SELECT_H
5181 #include <sys/select.h>
5182 #endif
5183 #ifdef HAVE_SYS_SOCKET_H
5184 #include <sys/socket.h>
5185 #endif
5186 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);
5187 int main() {
5188
5189 ; return 0; }
5190 EOF
5191 if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5192   rm -rf conftest*
5193           ac_not_found=no ; break 3
5194 else
5195   echo "configure: failed program was:" >&5
5196   cat conftest.$ac_ext >&5
5197   rm -rf conftest*
5198   ac_not_found=yes
5199 fi
5200 rm -f conftest*
5201       done
5202      done
5203     done
5204    
5205 fi
5206   
5207 fi
5208  
5209 fi
5210  if test "$ac_not_found" = yes; then
5211   ac_cv_func_select_arg1=int 
5212   ac_cv_func_select_arg234='int *' 
5213   ac_cv_func_select_arg5='struct timeval *'
5214  fi
5215  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5216  cat >> confdefs.h <<EOF
5217 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5218 EOF
5219
5220  cat >> confdefs.h <<EOF
5221 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5222 EOF
5223
5224  cat >> confdefs.h <<EOF
5225 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5226 EOF
5227
5228
5229 fi
5230
5231
5232 for ac_hdr in regex.h 
5233 do
5234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5236 echo "configure:5237: checking for $ac_hdr" >&5
5237 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240   cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 #include <$ac_hdr>
5244 EOF
5245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5246 { (eval echo configure:5247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5248 if test -z "$ac_err"; then
5249   rm -rf conftest*
5250   eval "ac_cv_header_$ac_safe=yes"
5251 else
5252   echo "$ac_err" >&5
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255   rm -rf conftest*
5256   eval "ac_cv_header_$ac_safe=no"
5257 fi
5258 rm -f conftest*
5259 fi
5260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5261   echo "$ac_t""yes" 1>&6
5262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5263   cat >> confdefs.h <<EOF
5264 #define $ac_tr_hdr 1
5265 EOF
5266  
5267 else
5268   echo "$ac_t""no" 1>&6
5269 fi
5270 done
5271
5272 if test "$ac_cv_header_regex_h" != yes ; then
5273         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5274 fi
5275 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5276 echo "configure:5277: checking for regfree" >&5
5277 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5278   echo $ac_n "(cached) $ac_c" 1>&6
5279 else
5280   cat > conftest.$ac_ext <<EOF
5281 #line 5282 "configure"
5282 #include "confdefs.h"
5283 /* System header to define __stub macros and hopefully few prototypes,
5284     which can conflict with char regfree(); below.  */
5285 #include <assert.h>
5286 /* Override any gcc2 internal prototype to avoid an error.  */
5287 /* We use char because int might match the return type of a gcc2
5288     builtin and then its argument prototype would still apply.  */
5289 char regfree();
5290 char (*f)();
5291
5292 int main() {
5293
5294 /* The GNU C library defines this for functions which it implements
5295     to always fail with ENOSYS.  Some functions are actually named
5296     something starting with __ and the normal name is an alias.  */
5297 #if defined (__stub_regfree) || defined (__stub___regfree)
5298 choke me
5299 #else
5300 f = regfree;
5301 #endif
5302
5303 ; return 0; }
5304 EOF
5305 if { (eval echo configure:5306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5306   rm -rf conftest*
5307   eval "ac_cv_func_regfree=yes"
5308 else
5309   echo "configure: failed program was:" >&5
5310   cat conftest.$ac_ext >&5
5311   rm -rf conftest*
5312   eval "ac_cv_func_regfree=no"
5313 fi
5314 rm -f conftest*
5315 fi
5316
5317 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5318   echo "$ac_t""yes" 1>&6
5319   :
5320 else
5321   echo "$ac_t""no" 1>&6
5322 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5323 fi
5324
5325
5326
5327 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5328 echo "configure:5329: checking for compatible POSIX regex" >&5
5329 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   
5333         if test "$cross_compiling" = yes; then
5334   ol_cv_c_posix_regex=cross
5335 else
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 #include <sys/types.h>
5341 #include <regex.h>
5342 static char *pattern, *string;
5343 main()
5344 {
5345         int rc;
5346         regex_t re;
5347
5348         pattern = "^A";
5349
5350         if(regcomp(&re, pattern, 0)) {
5351                 return -1;
5352         }
5353         
5354         string = "ALL MATCH";
5355         
5356         rc = regexec(&re, string, 0, (void*)0, 0);
5357
5358         regfree(&re);
5359
5360         return rc;
5361 }
5362 EOF
5363 if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5364 then
5365   ol_cv_c_posix_regex=yes
5366 else
5367   echo "configure: failed program was:" >&5
5368   cat conftest.$ac_ext >&5
5369   rm -fr conftest*
5370   ol_cv_c_posix_regex=no
5371 fi
5372 rm -fr conftest*
5373 fi
5374
5375 fi
5376
5377 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5378
5379 if test "$ol_cv_c_posix_regex" = no ; then
5380         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5381 fi
5382
5383 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5384 echo "configure:5385: checking for res_search" >&5
5385 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5386   echo $ac_n "(cached) $ac_c" 1>&6
5387 else
5388   cat > conftest.$ac_ext <<EOF
5389 #line 5390 "configure"
5390 #include "confdefs.h"
5391 /* System header to define __stub macros and hopefully few prototypes,
5392     which can conflict with char res_search(); below.  */
5393 #include <assert.h>
5394 /* Override any gcc2 internal prototype to avoid an error.  */
5395 /* We use char because int might match the return type of a gcc2
5396     builtin and then its argument prototype would still apply.  */
5397 char res_search();
5398 char (*f)();
5399
5400 int main() {
5401
5402 /* The GNU C library defines this for functions which it implements
5403     to always fail with ENOSYS.  Some functions are actually named
5404     something starting with __ and the normal name is an alias.  */
5405 #if defined (__stub_res_search) || defined (__stub___res_search)
5406 choke me
5407 #else
5408 f = res_search;
5409 #endif
5410
5411 ; return 0; }
5412 EOF
5413 if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5414   rm -rf conftest*
5415   eval "ac_cv_func_res_search=yes"
5416 else
5417   echo "configure: failed program was:" >&5
5418   cat conftest.$ac_ext >&5
5419   rm -rf conftest*
5420   eval "ac_cv_func_res_search=no"
5421 fi
5422 rm -f conftest*
5423 fi
5424
5425 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5426   echo "$ac_t""yes" 1>&6
5427   :
5428 else
5429   echo "$ac_t""no" 1>&6
5430 fi
5431
5432 if test $ac_cv_func_res_search = no ; then 
5433         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5434 echo "configure:5435: checking for res_search in -lbind" >&5
5435 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5436 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5437   echo $ac_n "(cached) $ac_c" 1>&6
5438 else
5439   ac_save_LIBS="$LIBS"
5440 LIBS="-lbind  $LIBS"
5441 cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 /* Override any gcc2 internal prototype to avoid an error.  */
5445 /* We use char because int might match the return type of a gcc2
5446     builtin and then its argument prototype would still apply.  */
5447 char res_search();
5448
5449 int main() {
5450 res_search()
5451 ; return 0; }
5452 EOF
5453 if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5454   rm -rf conftest*
5455   eval "ac_cv_lib_$ac_lib_var=yes"
5456 else
5457   echo "configure: failed program was:" >&5
5458   cat conftest.$ac_ext >&5
5459   rm -rf conftest*
5460   eval "ac_cv_lib_$ac_lib_var=no"
5461 fi
5462 rm -f conftest*
5463 LIBS="$ac_save_LIBS"
5464
5465 fi
5466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5467   echo "$ac_t""yes" 1>&6
5468     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5469     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5470   cat >> confdefs.h <<EOF
5471 #define $ac_tr_lib 1
5472 EOF
5473
5474   LIBS="-lbind $LIBS"
5475
5476 else
5477   echo "$ac_t""no" 1>&6
5478 fi
5479
5480         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5481 fi
5482
5483 if test $ac_cv_func_res_search = no ; then 
5484         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5485 echo "configure:5486: checking for __res_search in -lbind" >&5
5486 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5488   echo $ac_n "(cached) $ac_c" 1>&6
5489 else
5490   ac_save_LIBS="$LIBS"
5491 LIBS="-lbind  $LIBS"
5492 cat > conftest.$ac_ext <<EOF
5493 #line 5494 "configure"
5494 #include "confdefs.h"
5495 /* Override any gcc2 internal prototype to avoid an error.  */
5496 /* We use char because int might match the return type of a gcc2
5497     builtin and then its argument prototype would still apply.  */
5498 char __res_search();
5499
5500 int main() {
5501 __res_search()
5502 ; return 0; }
5503 EOF
5504 if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5505   rm -rf conftest*
5506   eval "ac_cv_lib_$ac_lib_var=yes"
5507 else
5508   echo "configure: failed program was:" >&5
5509   cat conftest.$ac_ext >&5
5510   rm -rf conftest*
5511   eval "ac_cv_lib_$ac_lib_var=no"
5512 fi
5513 rm -f conftest*
5514 LIBS="$ac_save_LIBS"
5515
5516 fi
5517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5518   echo "$ac_t""yes" 1>&6
5519     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5520     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5521   cat >> confdefs.h <<EOF
5522 #define $ac_tr_lib 1
5523 EOF
5524
5525   LIBS="-lbind $LIBS"
5526
5527 else
5528   echo "$ac_t""no" 1>&6
5529 fi
5530
5531         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5532 fi
5533
5534 if test $ac_cv_func_res_search = no ; then 
5535         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5536 echo "configure:5537: checking for res_search in -lresolv" >&5
5537 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5539   echo $ac_n "(cached) $ac_c" 1>&6
5540 else
5541   ac_save_LIBS="$LIBS"
5542 LIBS="-lresolv  $LIBS"
5543 cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546 /* Override any gcc2 internal prototype to avoid an error.  */
5547 /* We use char because int might match the return type of a gcc2
5548     builtin and then its argument prototype would still apply.  */
5549 char res_search();
5550
5551 int main() {
5552 res_search()
5553 ; return 0; }
5554 EOF
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556   rm -rf conftest*
5557   eval "ac_cv_lib_$ac_lib_var=yes"
5558 else
5559   echo "configure: failed program was:" >&5
5560   cat conftest.$ac_ext >&5
5561   rm -rf conftest*
5562   eval "ac_cv_lib_$ac_lib_var=no"
5563 fi
5564 rm -f conftest*
5565 LIBS="$ac_save_LIBS"
5566
5567 fi
5568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5569   echo "$ac_t""yes" 1>&6
5570     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5571     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5572   cat >> confdefs.h <<EOF
5573 #define $ac_tr_lib 1
5574 EOF
5575
5576   LIBS="-lresolv $LIBS"
5577
5578 else
5579   echo "$ac_t""no" 1>&6
5580 fi
5581
5582         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5583 fi
5584
5585 if test "$ac_cv_func_res_search" = yes ; then
5586         cat >> confdefs.h <<\EOF
5587 #define HAVE_RES_SEARCH 1
5588 EOF
5589
5590 elif test $ol_enable_dns = yes ; then
5591         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5592 elif test $ol_enable_dns != no ; then
5593         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5594 fi
5595
5596
5597 ol_link_isode=no
5598 if test $ol_enable_ldapd != no ; then
5599         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5600
5601                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5602 echo "configure:5603: checking for main in -lxtpp" >&5
5603 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5605   echo $ac_n "(cached) $ac_c" 1>&6
5606 else
5607   ac_save_LIBS="$LIBS"
5608 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5609 cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612
5613 int main() {
5614 main()
5615 ; return 0; }
5616 EOF
5617 if { (eval echo configure:5618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5618   rm -rf conftest*
5619   eval "ac_cv_lib_$ac_lib_var=yes"
5620 else
5621   echo "configure: failed program was:" >&5
5622   cat conftest.$ac_ext >&5
5623   rm -rf conftest*
5624   eval "ac_cv_lib_$ac_lib_var=no"
5625 fi
5626 rm -f conftest*
5627 LIBS="$ac_save_LIBS"
5628
5629 fi
5630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632   
5633                 ol_link_isode=yes
5634                 cat >> confdefs.h <<\EOF
5635 #define HAVE_XTPP 1
5636 EOF
5637
5638                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5639                 
5640 else
5641   echo "$ac_t""no" 1>&6
5642 :
5643 fi
5644
5645         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5646 echo "configure:5647: checking for main in -ldsap" >&5
5647 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5649   echo $ac_n "(cached) $ac_c" 1>&6
5650 else
5651   ac_save_LIBS="$LIBS"
5652 LIBS="-ldsap -lisode $LIBS"
5653 cat > conftest.$ac_ext <<EOF
5654 #line 5655 "configure"
5655 #include "confdefs.h"
5656
5657 int main() {
5658 main()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676   
5677                 ol_link_isode=yes
5678                 cat >> confdefs.h <<\EOF
5679 #define HAVE_DSAP 1
5680 EOF
5681
5682                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5683                 
5684 else
5685   echo "$ac_t""no" 1>&6
5686 :
5687 fi
5688
5689         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5690 echo "configure:5691: checking for main in -lisode" >&5
5691 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5693   echo $ac_n "(cached) $ac_c" 1>&6
5694 else
5695   ac_save_LIBS="$LIBS"
5696 LIBS="-lisode  $LIBS"
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700
5701 int main() {
5702 main()
5703 ; return 0; }
5704 EOF
5705 if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5706   rm -rf conftest*
5707   eval "ac_cv_lib_$ac_lib_var=yes"
5708 else
5709   echo "configure: failed program was:" >&5
5710   cat conftest.$ac_ext >&5
5711   rm -rf conftest*
5712   eval "ac_cv_lib_$ac_lib_var=no"
5713 fi
5714 rm -f conftest*
5715 LIBS="$ac_save_LIBS"
5716
5717 fi
5718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5719   echo "$ac_t""yes" 1>&6
5720   
5721                 ol_link_isode=yes
5722                 cat >> confdefs.h <<\EOF
5723 #define HAVE_ISODE 1
5724 EOF
5725
5726                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5727                 
5728 else
5729   echo "$ac_t""no" 1>&6
5730 :
5731 fi
5732
5733 fi
5734
5735 if test $ol_link_isode != no; then
5736         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5737 echo "configure:5738: checking for main in -lpp" >&5
5738 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5740   echo $ac_n "(cached) $ac_c" 1>&6
5741 else
5742   ac_save_LIBS="$LIBS"
5743 LIBS="-lpp  $LIBS"
5744 cat > conftest.$ac_ext <<EOF
5745 #line 5746 "configure"
5746 #include "confdefs.h"
5747
5748 int main() {
5749 main()
5750 ; return 0; }
5751 EOF
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753   rm -rf conftest*
5754   eval "ac_cv_lib_$ac_lib_var=yes"
5755 else
5756   echo "configure: failed program was:" >&5
5757   cat conftest.$ac_ext >&5
5758   rm -rf conftest*
5759   eval "ac_cv_lib_$ac_lib_var=no"
5760 fi
5761 rm -f conftest*
5762 LIBS="$ac_save_LIBS"
5763
5764 fi
5765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5766   echo "$ac_t""yes" 1>&6
5767   
5768                 cat >> confdefs.h <<\EOF
5769 #define HAVE_PP 1
5770 EOF
5771
5772                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5773                 
5774 else
5775   echo "$ac_t""no" 1>&6
5776 :
5777 fi
5778
5779
5780         # Extract the first word of "pepsy", so it can be a program name with args.
5781 set dummy pepsy; ac_word=$2
5782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5783 echo "configure:5784: checking for $ac_word" >&5
5784 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5785   echo $ac_n "(cached) $ac_c" 1>&6
5786 else
5787   case "$PEPSY" in
5788   /*)
5789   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5790   ;;
5791   ?:/*)                  
5792   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5793   ;;
5794   *)
5795   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5796   ac_dummy="$PATH"
5797   for ac_dir in $ac_dummy; do 
5798     test -z "$ac_dir" && ac_dir=.
5799     if test -f $ac_dir/$ac_word; then
5800       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5801       break
5802     fi
5803   done
5804   IFS="$ac_save_ifs"
5805   ;;
5806 esac
5807 fi
5808 PEPSY="$ac_cv_path_PEPSY"
5809 if test -n "$PEPSY"; then
5810   echo "$ac_t""$PEPSY" 1>&6
5811 else
5812   echo "$ac_t""no" 1>&6
5813 fi
5814
5815 fi
5816
5817 if test $ol_enable_quipu != no ; then
5818         for ac_hdr in quipu/commonarg.h
5819 do
5820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5822 echo "configure:5823: checking for $ac_hdr" >&5
5823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5824   echo $ac_n "(cached) $ac_c" 1>&6
5825 else
5826   cat > conftest.$ac_ext <<EOF
5827 #line 5828 "configure"
5828 #include "confdefs.h"
5829 #include <$ac_hdr>
5830 EOF
5831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5832 { (eval echo configure:5833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5834 if test -z "$ac_err"; then
5835   rm -rf conftest*
5836   eval "ac_cv_header_$ac_safe=yes"
5837 else
5838   echo "$ac_err" >&5
5839   echo "configure: failed program was:" >&5
5840   cat conftest.$ac_ext >&5
5841   rm -rf conftest*
5842   eval "ac_cv_header_$ac_safe=no"
5843 fi
5844 rm -f conftest*
5845 fi
5846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5847   echo "$ac_t""yes" 1>&6
5848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5849   cat >> confdefs.h <<EOF
5850 #define $ac_tr_hdr 1
5851 EOF
5852  
5853 else
5854   echo "$ac_t""no" 1>&6
5855 fi
5856 done
5857
5858
5859         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5860                 BUILD_QUIPU=yes
5861         elif test $ol_enable_quipu = auto ; then
5862                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5863         else
5864                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5865         fi
5866 fi
5867
5868 ol_link_kerberos=no
5869
5870 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5871         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5872 do
5873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5875 echo "configure:5876: checking for $ac_hdr" >&5
5876 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5877   echo $ac_n "(cached) $ac_c" 1>&6
5878 else
5879   cat > conftest.$ac_ext <<EOF
5880 #line 5881 "configure"
5881 #include "confdefs.h"
5882 #include <$ac_hdr>
5883 EOF
5884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5885 { (eval echo configure:5886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5887 if test -z "$ac_err"; then
5888   rm -rf conftest*
5889   eval "ac_cv_header_$ac_safe=yes"
5890 else
5891   echo "$ac_err" >&5
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -rf conftest*
5895   eval "ac_cv_header_$ac_safe=no"
5896 fi
5897 rm -f conftest*
5898 fi
5899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5900   echo "$ac_t""yes" 1>&6
5901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5902   cat >> confdefs.h <<EOF
5903 #define $ac_tr_hdr 1
5904 EOF
5905  
5906 else
5907   echo "$ac_t""no" 1>&6
5908 fi
5909 done
5910
5911
5912         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5913                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5914 echo "configure:5915: checking for main in -lkrb4" >&5
5915 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5917   echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919   ac_save_LIBS="$LIBS"
5920 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5921 cat > conftest.$ac_ext <<EOF
5922 #line 5923 "configure"
5923 #include "confdefs.h"
5924
5925 int main() {
5926 main()
5927 ; return 0; }
5928 EOF
5929 if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5930   rm -rf conftest*
5931   eval "ac_cv_lib_$ac_lib_var=yes"
5932 else
5933   echo "configure: failed program was:" >&5
5934   cat conftest.$ac_ext >&5
5935   rm -rf conftest*
5936   eval "ac_cv_lib_$ac_lib_var=no"
5937 fi
5938 rm -f conftest*
5939 LIBS="$ac_save_LIBS"
5940
5941 fi
5942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5943   echo "$ac_t""yes" 1>&6
5944   have_k5=yes
5945 else
5946   echo "$ac_t""no" 1>&6
5947 have_k5=no
5948 fi
5949
5950
5951                 if test $have_k5 = yes ; then
5952                         ol_with_kerberos=found
5953                         ol_link_kerberos=yes
5954
5955                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5956
5957                         LIBS="$KRB_LIBS $LIBS"
5958
5959                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5960 echo "configure:5961: checking for des_debug in Kerberos libraries" >&5
5961 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5962   echo $ac_n "(cached) $ac_c" 1>&6
5963 else
5964   
5965                                                                 save_LIBS="$LIBS"
5966                                 LIBS="$KRB_LIBS $LIBS"
5967                                 cat > conftest.$ac_ext <<EOF
5968 #line 5969 "configure"
5969 #include "confdefs.h"
5970
5971 #include <kerberosIV/krb.h>
5972 #include <kerberosIV/des.h>
5973 extern int des_debug;
5974
5975 int main() {
5976
5977 des_debug = 1;
5978
5979 ; return 0; }
5980 EOF
5981 if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5982   rm -rf conftest*
5983   ol_cv_var_des_debug=yes
5984 else
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -rf conftest*
5988   ol_cv_var_des_debug=no
5989 fi
5990 rm -f conftest*
5991                                                                 LIBS="$save_LIBS"
5992                         
5993 fi
5994
5995 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5996
5997                         if test $ol_cv_var_des_debug = yes ; then
5998                                 cat >> confdefs.h <<\EOF
5999 #define HAVE_DES_DEBUG 1
6000 EOF
6001
6002                         fi
6003
6004                         LIBS="$save_LIBS"
6005                 fi
6006         fi
6007 fi
6008
6009 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6010         -o $ol_with_kerberos = kth ; then
6011
6012         for ac_hdr in krb.h des.h krb-archaeology.h 
6013 do
6014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6016 echo "configure:6017: checking for $ac_hdr" >&5
6017 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6018   echo $ac_n "(cached) $ac_c" 1>&6
6019 else
6020   cat > conftest.$ac_ext <<EOF
6021 #line 6022 "configure"
6022 #include "confdefs.h"
6023 #include <$ac_hdr>
6024 EOF
6025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6026 { (eval echo configure:6027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6028 if test -z "$ac_err"; then
6029   rm -rf conftest*
6030   eval "ac_cv_header_$ac_safe=yes"
6031 else
6032   echo "$ac_err" >&5
6033   echo "configure: failed program was:" >&5
6034   cat conftest.$ac_ext >&5
6035   rm -rf conftest*
6036   eval "ac_cv_header_$ac_safe=no"
6037 fi
6038 rm -f conftest*
6039 fi
6040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6041   echo "$ac_t""yes" 1>&6
6042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6043   cat >> confdefs.h <<EOF
6044 #define $ac_tr_hdr 1
6045 EOF
6046  
6047 else
6048   echo "$ac_t""no" 1>&6
6049 fi
6050 done
6051
6052
6053         if test $ac_cv_header_krb_h = yes ; then
6054                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6055 echo "configure:6056: checking for main in -lkrb" >&5
6056 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6058   echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060   ac_save_LIBS="$LIBS"
6061 LIBS="-lkrb -ldes $LIBS"
6062 cat > conftest.$ac_ext <<EOF
6063 #line 6064 "configure"
6064 #include "confdefs.h"
6065
6066 int main() {
6067 main()
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   eval "ac_cv_lib_$ac_lib_var=yes"
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   eval "ac_cv_lib_$ac_lib_var=no"
6078 fi
6079 rm -f conftest*
6080 LIBS="$ac_save_LIBS"
6081
6082 fi
6083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085   have_k4=yes
6086 else
6087   echo "$ac_t""no" 1>&6
6088 have_k4=no
6089 fi
6090
6091
6092                 if test $have_k4 = yes ; then
6093                         ol_with_kerberos=found
6094                         ol_link_kerberos=yes
6095
6096                         KRB_LIBS="-lkrb -ldes"
6097
6098                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6099                                 cat >> confdefs.h <<\EOF
6100 #define HAVE_KTH_KERBEROS 1
6101 EOF
6102
6103                         fi
6104                 fi
6105         fi
6106 fi
6107
6108 if test $ol_link_kerberos = yes ; then
6109         cat >> confdefs.h <<\EOF
6110 #define HAVE_KERBEROS 1
6111 EOF
6112
6113
6114 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6115         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6116 fi
6117
6118 ol_link_tls=no
6119 if test $ol_with_tls != no ; then
6120         
6121         for ac_hdr in openssl/ssl.h ssl.h
6122 do
6123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6125 echo "configure:6126: checking for $ac_hdr" >&5
6126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6127   echo $ac_n "(cached) $ac_c" 1>&6
6128 else
6129   cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 #include <$ac_hdr>
6133 EOF
6134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6135 { (eval echo configure:6136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6137 if test -z "$ac_err"; then
6138   rm -rf conftest*
6139   eval "ac_cv_header_$ac_safe=yes"
6140 else
6141   echo "$ac_err" >&5
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_header_$ac_safe=no"
6146 fi
6147 rm -f conftest*
6148 fi
6149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6150   echo "$ac_t""yes" 1>&6
6151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6152   cat >> confdefs.h <<EOF
6153 #define $ac_tr_hdr 1
6154 EOF
6155  
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159 done
6160
6161         
6162         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6163                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6164 echo "configure:6165: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6165 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6166 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6167   echo $ac_n "(cached) $ac_c" 1>&6
6168 else
6169   ac_save_LIBS="$LIBS"
6170 LIBS="-lssl -lcrypto $LIBS"
6171 cat > conftest.$ac_ext <<EOF
6172 #line 6173 "configure"
6173 #include "confdefs.h"
6174 /* Override any gcc2 internal prototype to avoid an error.  */
6175 /* We use char because int might match the return type of a gcc2
6176     builtin and then its argument prototype would still apply.  */
6177 char SSLeay_add_ssl_algorithms();
6178
6179 int main() {
6180 SSLeay_add_ssl_algorithms()
6181 ; return 0; }
6182 EOF
6183 if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=yes"
6186 else
6187   echo "configure: failed program was:" >&5
6188   cat conftest.$ac_ext >&5
6189   rm -rf conftest*
6190   eval "ac_cv_lib_$ac_lib_var=no"
6191 fi
6192 rm -f conftest*
6193 LIBS="$ac_save_LIBS"
6194
6195 fi
6196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6197   echo "$ac_t""yes" 1>&6
6198   have_ssleay=yes
6199                         need_rsaref=no
6200 else
6201   echo "$ac_t""no" 1>&6
6202 have_ssleay=no
6203 fi
6204
6205                         
6206                 if test $have_ssleay = no ; then
6207                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6208 echo "configure:6209: checking for SSL_library_init in -lssl" >&5
6209 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6210 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6211   echo $ac_n "(cached) $ac_c" 1>&6
6212 else
6213   ac_save_LIBS="$LIBS"
6214 LIBS="-lssl -lcrypto $LIBS"
6215 cat > conftest.$ac_ext <<EOF
6216 #line 6217 "configure"
6217 #include "confdefs.h"
6218 /* Override any gcc2 internal prototype to avoid an error.  */
6219 /* We use char because int might match the return type of a gcc2
6220     builtin and then its argument prototype would still apply.  */
6221 char SSL_library_init();
6222
6223 int main() {
6224 SSL_library_init()
6225 ; return 0; }
6226 EOF
6227 if { (eval echo configure:6228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6228   rm -rf conftest*
6229   eval "ac_cv_lib_$ac_lib_var=yes"
6230 else
6231   echo "configure: failed program was:" >&5
6232   cat conftest.$ac_ext >&5
6233   rm -rf conftest*
6234   eval "ac_cv_lib_$ac_lib_var=no"
6235 fi
6236 rm -f conftest*
6237 LIBS="$ac_save_LIBS"
6238
6239 fi
6240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6241   echo "$ac_t""yes" 1>&6
6242   have_ssleay=yes
6243                                 need_rsaref=no
6244 else
6245   echo "$ac_t""no" 1>&6
6246 have_ssleay=no
6247 fi
6248
6249                 fi
6250
6251                 if test $have_ssleay = no ; then
6252                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6253 echo "configure:6254: checking for ssl3_accept in -lssl" >&5
6254 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6256   echo $ac_n "(cached) $ac_c" 1>&6
6257 else
6258   ac_save_LIBS="$LIBS"
6259 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6260 cat > conftest.$ac_ext <<EOF
6261 #line 6262 "configure"
6262 #include "confdefs.h"
6263 /* Override any gcc2 internal prototype to avoid an error.  */
6264 /* We use char because int might match the return type of a gcc2
6265     builtin and then its argument prototype would still apply.  */
6266 char ssl3_accept();
6267
6268 int main() {
6269 ssl3_accept()
6270 ; return 0; }
6271 EOF
6272 if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6273   rm -rf conftest*
6274   eval "ac_cv_lib_$ac_lib_var=yes"
6275 else
6276   echo "configure: failed program was:" >&5
6277   cat conftest.$ac_ext >&5
6278   rm -rf conftest*
6279   eval "ac_cv_lib_$ac_lib_var=no"
6280 fi
6281 rm -f conftest*
6282 LIBS="$ac_save_LIBS"
6283
6284 fi
6285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6286   echo "$ac_t""yes" 1>&6
6287   have_ssleay=yes
6288                                 need_rsaref=yes
6289 else
6290   echo "$ac_t""no" 1>&6
6291 have_ssleay=no
6292 fi
6293
6294                 fi
6295
6296                 if test $have_ssleay = yes ; then
6297                         ol_with_tls=found
6298                         ol_link_tls=yes
6299
6300                         cat >> confdefs.h <<\EOF
6301 #define HAVE_SSLEAY 1
6302 EOF
6303
6304
6305                         if test $need_rsaref = yes; then
6306                                 cat >> confdefs.h <<\EOF
6307 #define HAVE_RSAREF 1
6308 EOF
6309
6310
6311                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6312                         else
6313                                 TLS_LIBS="-lssl -lcrypto"
6314                         fi
6315                 fi
6316         fi
6317 fi
6318
6319 if test $ol_link_tls = yes ; then
6320         cat >> confdefs.h <<\EOF
6321 #define HAVE_TLS 1
6322 EOF
6323
6324 fi      
6325
6326 for ac_func in \
6327         ctime_r                 \
6328         gethostbyname_r gethostbyaddr_r \
6329
6330 do
6331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6332 echo "configure:6333: checking for $ac_func" >&5
6333 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6334   echo $ac_n "(cached) $ac_c" 1>&6
6335 else
6336   cat > conftest.$ac_ext <<EOF
6337 #line 6338 "configure"
6338 #include "confdefs.h"
6339 /* System header to define __stub macros and hopefully few prototypes,
6340     which can conflict with char $ac_func(); below.  */
6341 #include <assert.h>
6342 /* Override any gcc2 internal prototype to avoid an error.  */
6343 /* We use char because int might match the return type of a gcc2
6344     builtin and then its argument prototype would still apply.  */
6345 char $ac_func();
6346 char (*f)();
6347
6348 int main() {
6349
6350 /* The GNU C library defines this for functions which it implements
6351     to always fail with ENOSYS.  Some functions are actually named
6352     something starting with __ and the normal name is an alias.  */
6353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6354 choke me
6355 #else
6356 f = $ac_func;
6357 #endif
6358
6359 ; return 0; }
6360 EOF
6361 if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6362   rm -rf conftest*
6363   eval "ac_cv_func_$ac_func=yes"
6364 else
6365   echo "configure: failed program was:" >&5
6366   cat conftest.$ac_ext >&5
6367   rm -rf conftest*
6368   eval "ac_cv_func_$ac_func=no"
6369 fi
6370 rm -f conftest*
6371 fi
6372
6373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6374   echo "$ac_t""yes" 1>&6
6375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6376   cat >> confdefs.h <<EOF
6377 #define $ac_tr_func 1
6378 EOF
6379  
6380 else
6381   echo "$ac_t""no" 1>&6
6382 fi
6383 done
6384
6385
6386 if test "$ac_cv_func_ctime_r" = no ; then
6387         ol_cv_func_ctime_r_nargs=0
6388 else
6389         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6390 echo "configure:6391: checking number of arguments of ctime_r" >&5
6391 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6392   echo $ac_n "(cached) $ac_c" 1>&6
6393 else
6394   cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 #include <time.h>
6398 int main() {
6399 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6400 ; return 0; }
6401 EOF
6402 if { (eval echo configure:6403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6403   rm -rf conftest*
6404   ol_cv_func_ctime_r_nargs3=yes
6405 else
6406   echo "configure: failed program was:" >&5
6407   cat conftest.$ac_ext >&5
6408   rm -rf conftest*
6409   ol_cv_func_ctime_r_nargs3=no
6410 fi
6411 rm -f conftest*
6412
6413         cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416 #include <time.h>
6417 int main() {
6418 time_t ti; char *buffer; ctime_r(&ti,buffer);
6419 ; return 0; }
6420 EOF
6421 if { (eval echo configure:6422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6422   rm -rf conftest*
6423   ol_cv_func_ctime_r_nargs2=yes
6424 else
6425   echo "configure: failed program was:" >&5
6426   cat conftest.$ac_ext >&5
6427   rm -rf conftest*
6428   ol_cv_func_ctime_r_nargs2=no
6429 fi
6430 rm -f conftest*
6431
6432         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6433                 $ol_cv_func_ctime_r_nargs2 = no ; then
6434
6435                 ol_cv_func_ctime_r_nargs=3
6436
6437         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6438                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6439
6440                 ol_cv_func_ctime_r_nargs=2
6441
6442         else
6443                 ol_cv_func_ctime_r_nargs=0
6444         fi
6445   
6446 fi
6447
6448 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6449
6450   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6451         cat >> confdefs.h <<EOF
6452 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6453 EOF
6454
6455   fi
6456
6457 fi
6458
6459 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6460         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6461 echo "configure:6462: checking number of arguments of gethostbyname_r" >&5
6462 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6463   echo $ac_n "(cached) $ac_c" 1>&6
6464 else
6465   cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 #include <sys/types.h>
6469 #include <sys/socket.h>
6470 #include <netinet/in.h>
6471 #include <netdb.h>
6472 #define BUFSIZE (sizeof(struct hostent)+10)
6473 int main() {
6474 struct hostent hent; char buffer[BUFSIZE];
6475                 int bufsize=BUFSIZE;int h_errno;
6476                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6477                         buffer, bufsize, &h_errno);
6478 ; return 0; }
6479 EOF
6480 if { (eval echo configure:6481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6481   rm -rf conftest*
6482   ol_cv_func_gethostbyname_r_nargs5=yes
6483 else
6484   echo "configure: failed program was:" >&5
6485   cat conftest.$ac_ext >&5
6486   rm -rf conftest*
6487   ol_cv_func_gethostbyname_r_nargs5=no
6488 fi
6489 rm -f conftest*
6490
6491         cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 #include <sys/types.h>
6495 #include <sys/socket.h>
6496 #include <netinet/in.h>
6497 #include <netdb.h>
6498 #define BUFSIZE (sizeof(struct hostent)+10)
6499 int main() {
6500 struct hostent hent;struct hostent *rhent;
6501                 char buffer[BUFSIZE];
6502                 int bufsize=BUFSIZE;int h_errno;
6503                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6504                         &rhent, &h_errno);
6505 ; return 0; }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6508   rm -rf conftest*
6509   ol_cv_func_gethostbyname_r_nargs6=yes
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -rf conftest*
6514   ol_cv_func_gethostbyname_r_nargs6=no
6515 fi
6516 rm -f conftest*
6517
6518         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6519                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6520
6521                 ol_cv_func_gethostbyname_r_nargs=5
6522
6523         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6524                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6525
6526                 ol_cv_func_gethostbyname_r_nargs=6
6527
6528         else
6529                 ol_cv_func_gethostbyname_r_nargs=0
6530         fi
6531   
6532 fi
6533
6534 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6535   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6536         cat >> confdefs.h <<EOF
6537 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6538 EOF
6539
6540   fi
6541
6542 else
6543         ol_cv_func_gethostbyname_r_nargs=0
6544 fi
6545  
6546 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6547         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6548 echo "configure:6549: checking number of arguments of gethostbyaddr_r" >&5
6549 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555 #include <sys/types.h>
6556 #include <sys/socket.h>
6557 #include <netinet/in.h>
6558 #include <netdb.h>
6559 #define BUFSIZE (sizeof(struct hostent)+10)
6560 int main() {
6561 struct hostent hent; char buffer[BUFSIZE]; 
6562             struct in_addr add;
6563             size_t alen=sizeof(struct in_addr);
6564             int bufsize=BUFSIZE;int h_errno;
6565                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6566                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6567 ; return 0; }
6568 EOF
6569 if { (eval echo configure:6570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6570   rm -rf conftest*
6571   ol_cv_func_gethostbyaddr_r_nargs7=yes
6572 else
6573   echo "configure: failed program was:" >&5
6574   cat conftest.$ac_ext >&5
6575   rm -rf conftest*
6576   ol_cv_func_gethostbyaddr_r_nargs7=no
6577 fi
6578 rm -f conftest*
6579
6580         cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 #include <sys/types.h>
6584 #include <sys/socket.h>
6585 #include <netinet/in.h>
6586 #include <netdb.h>
6587 #define BUFSIZE (sizeof(struct hostent)+10)
6588 int main() {
6589 struct hostent hent;
6590                 struct hostent *rhent; char buffer[BUFSIZE]; 
6591                 struct in_addr add;
6592                 size_t alen=sizeof(struct in_addr);
6593                 int bufsize=BUFSIZE;int h_errno;
6594                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6595                         alen, AF_INET, &hent, buffer, bufsize, 
6596                         &rhent, &h_errno);
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6600   rm -rf conftest*
6601   ol_cv_func_gethostbyaddr_r_nargs8=yes
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   ol_cv_func_gethostbyaddr_r_nargs8=no
6607 fi
6608 rm -f conftest*
6609
6610         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6611                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6612
6613                 ol_cv_func_gethostbyaddr_r_nargs=7
6614
6615         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6616                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6617
6618                 ol_cv_func_gethostbyaddr_r_nargs=8
6619
6620         else
6621                 ol_cv_func_gethostbyaddr_r_nargs=0
6622         fi
6623   
6624 fi
6625
6626 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6627   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6628     cat >> confdefs.h <<EOF
6629 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6630 EOF
6631
6632   fi
6633
6634 else
6635         ol_cv_func_gethostbyaddr_r_nargs=0
6636 fi
6637
6638 if test "$ac_cv_func_ctime_r" = yes \
6639         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6640         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6641         -a "$ac_cv_func_gethostbyname_r" = yes \
6642         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6643         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6644         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6645         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6646         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6647         ; then
6648  
6649         cat >> confdefs.h <<\EOF
6650 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6651 EOF
6652
6653 fi
6654
6655 ol_link_threads=no
6656
6657 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6658         -o $ol_with_threads = nt ; then
6659
6660         
6661         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6662 echo "configure:6663: checking for NT Threads" >&5
6663 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
6664   echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666   
6667                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6668 echo "configure:6669: checking for _beginthread" >&5
6669 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
6670   echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672   cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 /* System header to define __stub macros and hopefully few prototypes,
6676     which can conflict with char _beginthread(); below.  */
6677 #include <assert.h>
6678 /* Override any gcc2 internal prototype to avoid an error.  */
6679 /* We use char because int might match the return type of a gcc2
6680     builtin and then its argument prototype would still apply.  */
6681 char _beginthread();
6682 char (*f)();
6683
6684 int main() {
6685
6686 /* The GNU C library defines this for functions which it implements
6687     to always fail with ENOSYS.  Some functions are actually named
6688     something starting with __ and the normal name is an alias.  */
6689 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6690 choke me
6691 #else
6692 f = _beginthread;
6693 #endif
6694
6695 ; return 0; }
6696 EOF
6697 if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6698   rm -rf conftest*
6699   eval "ac_cv_func__beginthread=yes"
6700 else
6701   echo "configure: failed program was:" >&5
6702   cat conftest.$ac_ext >&5
6703   rm -rf conftest*
6704   eval "ac_cv_func__beginthread=no"
6705 fi
6706 rm -f conftest*
6707 fi
6708
6709 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6710   echo "$ac_t""yes" 1>&6
6711   ol_cv_nt_threads=yes
6712 else
6713   echo "$ac_t""no" 1>&6
6714 ol_cv_nt_threads=no
6715 fi
6716
6717         
6718 fi
6719
6720 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6721
6722         if test $ol_cv_nt_threads = yes ; then
6723                 cat >> confdefs.h <<\EOF
6724 #define HAVE_NT_THREADS 1
6725 EOF
6726
6727         fi
6728
6729
6730         if test "$ol_cv_nt_threads" = yes ; then
6731         ol_link_threads=nt
6732         ol_with_threads=found
6733         ol_with_yielding_select=yes
6734
6735                 cat >> confdefs.h <<\EOF
6736 #define HAVE_NT_SERVICE_MANAGER 1
6737 EOF
6738
6739                 cat >> confdefs.h <<\EOF
6740 #define HAVE_NT_EVENT_LOG 1
6741 EOF
6742
6743         fi
6744
6745         if test $ol_with_threads = nt ; then
6746                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6747         fi
6748 fi
6749
6750 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6751         -o $ol_with_threads = posix ; then
6752
6753         for ac_hdr in pthread.h
6754 do
6755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6757 echo "configure:6758: checking for $ac_hdr" >&5
6758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6759   echo $ac_n "(cached) $ac_c" 1>&6
6760 else
6761   cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 #include <$ac_hdr>
6765 EOF
6766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6767 { (eval echo configure:6768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6769 if test -z "$ac_err"; then
6770   rm -rf conftest*
6771   eval "ac_cv_header_$ac_safe=yes"
6772 else
6773   echo "$ac_err" >&5
6774   echo "configure: failed program was:" >&5
6775   cat conftest.$ac_ext >&5
6776   rm -rf conftest*
6777   eval "ac_cv_header_$ac_safe=no"
6778 fi
6779 rm -f conftest*
6780 fi
6781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6782   echo "$ac_t""yes" 1>&6
6783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6784   cat >> confdefs.h <<EOF
6785 #define $ac_tr_hdr 1
6786 EOF
6787  
6788 else
6789   echo "$ac_t""no" 1>&6
6790 fi
6791 done
6792
6793
6794         if test $ac_cv_header_pthread_h = yes ; then
6795                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6796 echo "configure:6797: checking POSIX thread version" >&5
6797 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6798   echo $ac_n "(cached) $ac_c" 1>&6
6799 else
6800   
6801         cat > conftest.$ac_ext <<EOF
6802 #line 6803 "configure"
6803 #include "confdefs.h"
6804
6805 #               include <pthread.h>
6806                 /* this check could be improved */
6807 #               ifdef PTHREAD_ONCE_INIT
6808                         pthread_version_final;
6809 #               endif
6810         
6811 EOF
6812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6813   egrep "pthread_version_final" >/dev/null 2>&1; then
6814   rm -rf conftest*
6815   ol_pthread_final=yes
6816 else
6817   rm -rf conftest*
6818   ol_pthread_final=no
6819 fi
6820 rm -f conftest*
6821
6822
6823         cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826
6827 #               include <pthread.h>
6828                 /* this check could be improved */
6829 #               ifdef pthread_once_init
6830                         pthread_version_draft4;
6831 #               endif
6832         
6833 EOF
6834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6835   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6836   rm -rf conftest*
6837   ol_pthread_draft4=yes
6838 else
6839   rm -rf conftest*
6840   ol_pthread_draft4=no
6841 fi
6842 rm -f conftest*
6843
6844
6845         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6846                 ol_cv_pthread_version=final
6847         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6848                 ol_cv_pthread_version=draft4
6849         else
6850                 ol_cv_pthread_version=unknown
6851         fi
6852
6853 fi
6854
6855 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6856
6857
6858                 if test $ol_cv_pthread_version = final ; then
6859                         cat >> confdefs.h <<\EOF
6860 #define HAVE_PTHREADS_FINAL 1
6861 EOF
6862
6863                 elif test $ol_cv_pthread_version = draft4 ; then
6864                         cat >> confdefs.h <<\EOF
6865 #define HAVE_PTHREADS_D4 1
6866 EOF
6867
6868                 else
6869                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6870                 fi
6871
6872                 # consider threads found
6873                 ol_with_threads=found
6874
6875                 
6876         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6877 echo "configure:6878: checking for LinuxThreads pthread.h" >&5
6878 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6879   echo $ac_n "(cached) $ac_c" 1>&6
6880 else
6881   cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 #include <pthread.h>
6885 EOF
6886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6887   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6888   rm -rf conftest*
6889   ol_cv_header_linux_threads=yes
6890 else
6891   rm -rf conftest*
6892   ol_cv_header_linux_threads=no
6893 fi
6894 rm -f conftest*
6895
6896                 
6897 fi
6898
6899 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6900         if test $ol_cv_header_linux_threads = yes; then
6901                 cat >> confdefs.h <<\EOF
6902 #define HAVE_LINUX_THREADS 1
6903 EOF
6904
6905         fi
6906
6907                 
6908         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6909 echo "configure:6910: checking for GNU Pth pthread.h" >&5
6910 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6911   echo $ac_n "(cached) $ac_c" 1>&6
6912 else
6913   cat > conftest.$ac_ext <<EOF
6914 #line 6915 "configure"
6915 #include "confdefs.h"
6916 #include <pthread.h>
6917 #ifdef _POSIX_THREAD_IS_GNU_PTH
6918         __gnu_pth__;
6919 #endif
6920
6921 EOF
6922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6923   egrep "__gnu_pth__" >/dev/null 2>&1; then
6924   rm -rf conftest*
6925   ol_cv_header_gnu_pth_pthread_h=yes
6926 else
6927   rm -rf conftest*
6928   ol_cv_header_gnu_pth_pthread_h=no
6929 fi
6930 rm -f conftest*
6931
6932                 
6933 fi
6934
6935 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6936
6937
6938                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6939                         for ac_hdr in sched.h
6940 do
6941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6943 echo "configure:6944: checking for $ac_hdr" >&5
6944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6945   echo $ac_n "(cached) $ac_c" 1>&6
6946 else
6947   cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 #include <$ac_hdr>
6951 EOF
6952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6953 { (eval echo configure:6954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6955 if test -z "$ac_err"; then
6956   rm -rf conftest*
6957   eval "ac_cv_header_$ac_safe=yes"
6958 else
6959   echo "$ac_err" >&5
6960   echo "configure: failed program was:" >&5
6961   cat conftest.$ac_ext >&5
6962   rm -rf conftest*
6963   eval "ac_cv_header_$ac_safe=no"
6964 fi
6965 rm -f conftest*
6966 fi
6967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6968   echo "$ac_t""yes" 1>&6
6969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6970   cat >> confdefs.h <<EOF
6971 #define $ac_tr_hdr 1
6972 EOF
6973  
6974 else
6975   echo "$ac_t""no" 1>&6
6976 fi
6977 done
6978
6979                 fi
6980
6981                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6982                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6983 echo "configure:6984: checking for pthread_create in default libraries" >&5
6984 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6985   echo $ac_n "(cached) $ac_c" 1>&6
6986 else
6987   
6988                 if test "$cross_compiling" = yes; then
6989   cat > conftest.$ac_ext <<EOF
6990 #line 6991 "configure"
6991 #include "confdefs.h"
6992 /* pthread test headers */
6993 #include <pthread.h>
6994 #ifndef NULL
6995 #define NULL (void*)0
6996 #endif
6997
6998 static void *task(p)
6999         void *p;
7000 {
7001         return (void *) (p == NULL);
7002 }
7003
7004 int main() {
7005
7006         /* pthread test function */
7007         pthread_t t;
7008         int status;
7009
7010         /* make sure pthread_create() isn't just a stub */
7011 #if HAVE_PTHREADS_D4
7012         status = pthread_create(&t, pthread_attr_default, task, NULL);
7013 #else
7014         status = pthread_create(&t, NULL, task, NULL);
7015 #endif
7016
7017         if( status ) exit( status );
7018
7019         /* make sure pthread_detach() isn't just a stub */
7020 #if HAVE_PTHREADS_D4
7021         status = pthread_detach( &t );
7022 #else
7023         status = pthread_detach( t );
7024 #endif
7025
7026 #ifdef HAVE_LINUX_THREADS
7027         pthread_kill_other_threads_np();
7028 #endif
7029
7030         exit( status );
7031
7032 ; return 0; }
7033 EOF
7034 if { (eval echo configure:7035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7035   rm -rf conftest*
7036   ol_cv_pthread_create=yes
7037 else
7038   echo "configure: failed program was:" >&5
7039   cat conftest.$ac_ext >&5
7040   rm -rf conftest*
7041   ol_cv_pthread_create=no
7042 fi
7043 rm -f conftest*
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 /* pthread test headers */
7049 #include <pthread.h>
7050 #ifndef NULL
7051 #define NULL (void*)0
7052 #endif
7053
7054 static void *task(p)
7055         void *p;
7056 {
7057         return (void *) (p == NULL);
7058 }
7059
7060
7061 int main(argc, argv)
7062         int argc;
7063         char **argv;
7064 {
7065
7066         /* pthread test function */
7067         pthread_t t;
7068         int status;
7069
7070         /* make sure pthread_create() isn't just a stub */
7071 #if HAVE_PTHREADS_D4
7072         status = pthread_create(&t, pthread_attr_default, task, NULL);
7073 #else
7074         status = pthread_create(&t, NULL, task, NULL);
7075 #endif
7076
7077         if( status ) exit( status );
7078
7079         /* make sure pthread_detach() isn't just a stub */
7080 #if HAVE_PTHREADS_D4
7081         status = pthread_detach( &t );
7082 #else
7083         status = pthread_detach( t );
7084 #endif
7085
7086 #ifdef HAVE_LINUX_THREADS
7087         pthread_kill_other_threads_np();
7088 #endif
7089
7090         exit( status );
7091
7092 }
7093
7094 EOF
7095 if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7096 then
7097   ol_cv_pthread_create=yes
7098 else
7099   echo "configure: failed program was:" >&5
7100   cat conftest.$ac_ext >&5
7101   rm -fr conftest*
7102   ol_cv_pthread_create=no
7103 fi
7104 rm -fr conftest*
7105 fi
7106
7107 fi
7108
7109 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7110
7111                 if test $ol_cv_pthread_create != no ; then
7112                         ol_link_threads=posix
7113                         ol_link_pthreads=""
7114                 fi
7115                 
7116                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7117 if test "$ol_link_threads" = no ; then
7118         # try -kthread
7119         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7120 echo "configure:7121: checking for pthread link with -kthread" >&5
7121 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124   
7125                 # save the flags
7126                 ol_LIBS="$LIBS"
7127                 LIBS="-kthread $LIBS"
7128
7129                 if test "$cross_compiling" = yes; then
7130   cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 /* pthread test headers */
7134 #include <pthread.h>
7135 #ifndef NULL
7136 #define NULL (void*)0
7137 #endif
7138
7139 static void *task(p)
7140         void *p;
7141 {
7142         return (void *) (p == NULL);
7143 }
7144
7145 int main() {
7146
7147         /* pthread test function */
7148         pthread_t t;
7149         int status;
7150
7151         /* make sure pthread_create() isn't just a stub */
7152 #if HAVE_PTHREADS_D4
7153         status = pthread_create(&t, pthread_attr_default, task, NULL);
7154 #else
7155         status = pthread_create(&t, NULL, task, NULL);
7156 #endif
7157
7158         if( status ) exit( status );
7159
7160         /* make sure pthread_detach() isn't just a stub */
7161 #if HAVE_PTHREADS_D4
7162         status = pthread_detach( &t );
7163 #else
7164         status = pthread_detach( t );
7165 #endif
7166
7167 #ifdef HAVE_LINUX_THREADS
7168         pthread_kill_other_threads_np();
7169 #endif
7170
7171         exit( status );
7172
7173 ; return 0; }
7174 EOF
7175 if { (eval echo configure:7176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7176   rm -rf conftest*
7177   ol_cv_pthread_kthread=yes
7178 else
7179   echo "configure: failed program was:" >&5
7180   cat conftest.$ac_ext >&5
7181   rm -rf conftest*
7182   ol_cv_pthread_kthread=no
7183 fi
7184 rm -f conftest*
7185 else
7186   cat > conftest.$ac_ext <<EOF
7187 #line 7188 "configure"
7188 #include "confdefs.h"
7189 /* pthread test headers */
7190 #include <pthread.h>
7191 #ifndef NULL
7192 #define NULL (void*)0
7193 #endif
7194
7195 static void *task(p)
7196         void *p;
7197 {
7198         return (void *) (p == NULL);
7199 }
7200
7201
7202 int main(argc, argv)
7203         int argc;
7204         char **argv;
7205 {
7206
7207         /* pthread test function */
7208         pthread_t t;
7209         int status;
7210
7211         /* make sure pthread_create() isn't just a stub */
7212 #if HAVE_PTHREADS_D4
7213         status = pthread_create(&t, pthread_attr_default, task, NULL);
7214 #else
7215         status = pthread_create(&t, NULL, task, NULL);
7216 #endif
7217
7218         if( status ) exit( status );
7219
7220         /* make sure pthread_detach() isn't just a stub */
7221 #if HAVE_PTHREADS_D4
7222         status = pthread_detach( &t );
7223 #else
7224         status = pthread_detach( t );
7225 #endif
7226
7227 #ifdef HAVE_LINUX_THREADS
7228         pthread_kill_other_threads_np();
7229 #endif
7230
7231         exit( status );
7232
7233 }
7234
7235 EOF
7236 if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7237 then
7238   ol_cv_pthread_kthread=yes
7239 else
7240   echo "configure: failed program was:" >&5
7241   cat conftest.$ac_ext >&5
7242   rm -fr conftest*
7243   ol_cv_pthread_kthread=no
7244 fi
7245 rm -fr conftest*
7246 fi
7247
7248
7249                 # restore the LIBS
7250                 LIBS="$ol_LIBS"
7251         
7252 fi
7253
7254 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7255
7256         if test $ol_cv_pthread_kthread = yes ; then
7257                 ol_link_pthreads="-kthread"
7258                 ol_link_threads=posix
7259         fi
7260 fi
7261
7262                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7263 if test "$ol_link_threads" = no ; then
7264         # try -pthread
7265         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7266 echo "configure:7267: checking for pthread link with -pthread" >&5
7267 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7268   echo $ac_n "(cached) $ac_c" 1>&6
7269 else
7270   
7271                 # save the flags
7272                 ol_LIBS="$LIBS"
7273                 LIBS="-pthread $LIBS"
7274
7275                 if test "$cross_compiling" = yes; then
7276   cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 /* pthread test headers */
7280 #include <pthread.h>
7281 #ifndef NULL
7282 #define NULL (void*)0
7283 #endif
7284
7285 static void *task(p)
7286         void *p;
7287 {
7288         return (void *) (p == NULL);
7289 }
7290
7291 int main() {
7292
7293         /* pthread test function */
7294         pthread_t t;
7295         int status;
7296
7297         /* make sure pthread_create() isn't just a stub */
7298 #if HAVE_PTHREADS_D4
7299         status = pthread_create(&t, pthread_attr_default, task, NULL);
7300 #else
7301         status = pthread_create(&t, NULL, task, NULL);
7302 #endif
7303
7304         if( status ) exit( status );
7305
7306         /* make sure pthread_detach() isn't just a stub */
7307 #if HAVE_PTHREADS_D4
7308         status = pthread_detach( &t );
7309 #else
7310         status = pthread_detach( t );
7311 #endif
7312
7313 #ifdef HAVE_LINUX_THREADS
7314         pthread_kill_other_threads_np();
7315 #endif
7316
7317         exit( status );
7318
7319 ; return 0; }
7320 EOF
7321 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7322   rm -rf conftest*
7323   ol_cv_pthread_pthread=yes
7324 else
7325   echo "configure: failed program was:" >&5
7326   cat conftest.$ac_ext >&5
7327   rm -rf conftest*
7328   ol_cv_pthread_pthread=no
7329 fi
7330 rm -f conftest*
7331 else
7332   cat > conftest.$ac_ext <<EOF
7333 #line 7334 "configure"
7334 #include "confdefs.h"
7335 /* pthread test headers */
7336 #include <pthread.h>
7337 #ifndef NULL
7338 #define NULL (void*)0
7339 #endif
7340
7341 static void *task(p)
7342         void *p;
7343 {
7344         return (void *) (p == NULL);
7345 }
7346
7347
7348 int main(argc, argv)
7349         int argc;
7350         char **argv;
7351 {
7352
7353         /* pthread test function */
7354         pthread_t t;
7355         int status;
7356
7357         /* make sure pthread_create() isn't just a stub */
7358 #if HAVE_PTHREADS_D4
7359         status = pthread_create(&t, pthread_attr_default, task, NULL);
7360 #else
7361         status = pthread_create(&t, NULL, task, NULL);
7362 #endif
7363
7364         if( status ) exit( status );
7365
7366         /* make sure pthread_detach() isn't just a stub */
7367 #if HAVE_PTHREADS_D4
7368         status = pthread_detach( &t );
7369 #else
7370         status = pthread_detach( t );
7371 #endif
7372
7373 #ifdef HAVE_LINUX_THREADS
7374         pthread_kill_other_threads_np();
7375 #endif
7376
7377         exit( status );
7378
7379 }
7380
7381 EOF
7382 if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7383 then
7384   ol_cv_pthread_pthread=yes
7385 else
7386   echo "configure: failed program was:" >&5
7387   cat conftest.$ac_ext >&5
7388   rm -fr conftest*
7389   ol_cv_pthread_pthread=no
7390 fi
7391 rm -fr conftest*
7392 fi
7393
7394
7395                 # restore the LIBS
7396                 LIBS="$ol_LIBS"
7397         
7398 fi
7399
7400 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7401
7402         if test $ol_cv_pthread_pthread = yes ; then
7403                 ol_link_pthreads="-pthread"
7404                 ol_link_threads=posix
7405         fi
7406 fi
7407
7408                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7409 if test "$ol_link_threads" = no ; then
7410         # try -pthreads
7411         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7412 echo "configure:7413: checking for pthread link with -pthreads" >&5
7413 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7414   echo $ac_n "(cached) $ac_c" 1>&6
7415 else
7416   
7417                 # save the flags
7418                 ol_LIBS="$LIBS"
7419                 LIBS="-pthreads $LIBS"
7420
7421                 if test "$cross_compiling" = yes; then
7422   cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425 /* pthread test headers */
7426 #include <pthread.h>
7427 #ifndef NULL
7428 #define NULL (void*)0
7429 #endif
7430
7431 static void *task(p)
7432         void *p;
7433 {
7434         return (void *) (p == NULL);
7435 }
7436
7437 int main() {
7438
7439         /* pthread test function */
7440         pthread_t t;
7441         int status;
7442
7443         /* make sure pthread_create() isn't just a stub */
7444 #if HAVE_PTHREADS_D4
7445         status = pthread_create(&t, pthread_attr_default, task, NULL);
7446 #else
7447         status = pthread_create(&t, NULL, task, NULL);
7448 #endif
7449
7450         if( status ) exit( status );
7451
7452         /* make sure pthread_detach() isn't just a stub */
7453 #if HAVE_PTHREADS_D4
7454         status = pthread_detach( &t );
7455 #else
7456         status = pthread_detach( t );
7457 #endif
7458
7459 #ifdef HAVE_LINUX_THREADS
7460         pthread_kill_other_threads_np();
7461 #endif
7462
7463         exit( status );
7464
7465 ; return 0; }
7466 EOF
7467 if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7468   rm -rf conftest*
7469   ol_cv_pthread_pthreads=yes
7470 else
7471   echo "configure: failed program was:" >&5
7472   cat conftest.$ac_ext >&5
7473   rm -rf conftest*
7474   ol_cv_pthread_pthreads=no
7475 fi
7476 rm -f conftest*
7477 else
7478   cat > conftest.$ac_ext <<EOF
7479 #line 7480 "configure"
7480 #include "confdefs.h"
7481 /* pthread test headers */
7482 #include <pthread.h>
7483 #ifndef NULL
7484 #define NULL (void*)0
7485 #endif
7486
7487 static void *task(p)
7488         void *p;
7489 {
7490         return (void *) (p == NULL);
7491 }
7492
7493
7494 int main(argc, argv)
7495         int argc;
7496         char **argv;
7497 {
7498
7499         /* pthread test function */
7500         pthread_t t;
7501         int status;
7502
7503         /* make sure pthread_create() isn't just a stub */
7504 #if HAVE_PTHREADS_D4
7505         status = pthread_create(&t, pthread_attr_default, task, NULL);
7506 #else
7507         status = pthread_create(&t, NULL, task, NULL);
7508 #endif
7509
7510         if( status ) exit( status );
7511
7512         /* make sure pthread_detach() isn't just a stub */
7513 #if HAVE_PTHREADS_D4
7514         status = pthread_detach( &t );
7515 #else
7516         status = pthread_detach( t );
7517 #endif
7518
7519 #ifdef HAVE_LINUX_THREADS
7520         pthread_kill_other_threads_np();
7521 #endif
7522
7523         exit( status );
7524
7525 }
7526
7527 EOF
7528 if { (eval echo configure:7529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7529 then
7530   ol_cv_pthread_pthreads=yes
7531 else
7532   echo "configure: failed program was:" >&5
7533   cat conftest.$ac_ext >&5
7534   rm -fr conftest*
7535   ol_cv_pthread_pthreads=no
7536 fi
7537 rm -fr conftest*
7538 fi
7539
7540
7541                 # restore the LIBS
7542                 LIBS="$ol_LIBS"
7543         
7544 fi
7545
7546 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7547
7548         if test $ol_cv_pthread_pthreads = yes ; then
7549                 ol_link_pthreads="-pthreads"
7550                 ol_link_threads=posix
7551         fi
7552 fi
7553
7554                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7555 if test "$ol_link_threads" = no ; then
7556         # try -mthreads
7557         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7558 echo "configure:7559: checking for pthread link with -mthreads" >&5
7559 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7560   echo $ac_n "(cached) $ac_c" 1>&6
7561 else
7562   
7563                 # save the flags
7564                 ol_LIBS="$LIBS"
7565                 LIBS="-mthreads $LIBS"
7566
7567                 if test "$cross_compiling" = yes; then
7568   cat > conftest.$ac_ext <<EOF
7569 #line 7570 "configure"
7570 #include "confdefs.h"
7571 /* pthread test headers */
7572 #include <pthread.h>
7573 #ifndef NULL
7574 #define NULL (void*)0
7575 #endif
7576
7577 static void *task(p)
7578         void *p;
7579 {
7580         return (void *) (p == NULL);
7581 }
7582
7583 int main() {
7584
7585         /* pthread test function */
7586         pthread_t t;
7587         int status;
7588
7589         /* make sure pthread_create() isn't just a stub */
7590 #if HAVE_PTHREADS_D4
7591         status = pthread_create(&t, pthread_attr_default, task, NULL);
7592 #else
7593         status = pthread_create(&t, NULL, task, NULL);
7594 #endif
7595
7596         if( status ) exit( status );
7597
7598         /* make sure pthread_detach() isn't just a stub */
7599 #if HAVE_PTHREADS_D4
7600         status = pthread_detach( &t );
7601 #else
7602         status = pthread_detach( t );
7603 #endif
7604
7605 #ifdef HAVE_LINUX_THREADS
7606         pthread_kill_other_threads_np();
7607 #endif
7608
7609         exit( status );
7610
7611 ; return 0; }
7612 EOF
7613 if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7614   rm -rf conftest*
7615   ol_cv_pthread_mthreads=yes
7616 else
7617   echo "configure: failed program was:" >&5
7618   cat conftest.$ac_ext >&5
7619   rm -rf conftest*
7620   ol_cv_pthread_mthreads=no
7621 fi
7622 rm -f conftest*
7623 else
7624   cat > conftest.$ac_ext <<EOF
7625 #line 7626 "configure"
7626 #include "confdefs.h"
7627 /* pthread test headers */
7628 #include <pthread.h>
7629 #ifndef NULL
7630 #define NULL (void*)0
7631 #endif
7632
7633 static void *task(p)
7634         void *p;
7635 {
7636         return (void *) (p == NULL);
7637 }
7638
7639
7640 int main(argc, argv)
7641         int argc;
7642         char **argv;
7643 {
7644
7645         /* pthread test function */
7646         pthread_t t;
7647         int status;
7648
7649         /* make sure pthread_create() isn't just a stub */
7650 #if HAVE_PTHREADS_D4
7651         status = pthread_create(&t, pthread_attr_default, task, NULL);
7652 #else
7653         status = pthread_create(&t, NULL, task, NULL);
7654 #endif
7655
7656         if( status ) exit( status );
7657
7658         /* make sure pthread_detach() isn't just a stub */
7659 #if HAVE_PTHREADS_D4
7660         status = pthread_detach( &t );
7661 #else
7662         status = pthread_detach( t );
7663 #endif
7664
7665 #ifdef HAVE_LINUX_THREADS
7666         pthread_kill_other_threads_np();
7667 #endif
7668
7669         exit( status );
7670
7671 }
7672
7673 EOF
7674 if { (eval echo configure:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7675 then
7676   ol_cv_pthread_mthreads=yes
7677 else
7678   echo "configure: failed program was:" >&5
7679   cat conftest.$ac_ext >&5
7680   rm -fr conftest*
7681   ol_cv_pthread_mthreads=no
7682 fi
7683 rm -fr conftest*
7684 fi
7685
7686
7687                 # restore the LIBS
7688                 LIBS="$ol_LIBS"
7689         
7690 fi
7691
7692 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7693
7694         if test $ol_cv_pthread_mthreads = yes ; then
7695                 ol_link_pthreads="-mthreads"
7696                 ol_link_threads=posix
7697         fi
7698 fi
7699
7700                 # Pthread try link: -thread (ol_cv_pthread_thread)
7701 if test "$ol_link_threads" = no ; then
7702         # try -thread
7703         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7704 echo "configure:7705: checking for pthread link with -thread" >&5
7705 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7706   echo $ac_n "(cached) $ac_c" 1>&6
7707 else
7708   
7709                 # save the flags
7710                 ol_LIBS="$LIBS"
7711                 LIBS="-thread $LIBS"
7712
7713                 if test "$cross_compiling" = yes; then
7714   cat > conftest.$ac_ext <<EOF
7715 #line 7716 "configure"
7716 #include "confdefs.h"
7717 /* pthread test headers */
7718 #include <pthread.h>
7719 #ifndef NULL
7720 #define NULL (void*)0
7721 #endif
7722
7723 static void *task(p)
7724         void *p;
7725 {
7726         return (void *) (p == NULL);
7727 }
7728
7729 int main() {
7730
7731         /* pthread test function */
7732         pthread_t t;
7733         int status;
7734
7735         /* make sure pthread_create() isn't just a stub */
7736 #if HAVE_PTHREADS_D4
7737         status = pthread_create(&t, pthread_attr_default, task, NULL);
7738 #else
7739         status = pthread_create(&t, NULL, task, NULL);
7740 #endif
7741
7742         if( status ) exit( status );
7743
7744         /* make sure pthread_detach() isn't just a stub */
7745 #if HAVE_PTHREADS_D4
7746         status = pthread_detach( &t );
7747 #else
7748         status = pthread_detach( t );
7749 #endif
7750
7751 #ifdef HAVE_LINUX_THREADS
7752         pthread_kill_other_threads_np();
7753 #endif
7754
7755         exit( status );
7756
7757 ; return 0; }
7758 EOF
7759 if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7760   rm -rf conftest*
7761   ol_cv_pthread_thread=yes
7762 else
7763   echo "configure: failed program was:" >&5
7764   cat conftest.$ac_ext >&5
7765   rm -rf conftest*
7766   ol_cv_pthread_thread=no
7767 fi
7768 rm -f conftest*
7769 else
7770   cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 /* pthread test headers */
7774 #include <pthread.h>
7775 #ifndef NULL
7776 #define NULL (void*)0
7777 #endif
7778
7779 static void *task(p)
7780         void *p;
7781 {
7782         return (void *) (p == NULL);
7783 }
7784
7785
7786 int main(argc, argv)
7787         int argc;
7788         char **argv;
7789 {
7790
7791         /* pthread test function */
7792         pthread_t t;
7793         int status;
7794
7795         /* make sure pthread_create() isn't just a stub */
7796 #if HAVE_PTHREADS_D4
7797         status = pthread_create(&t, pthread_attr_default, task, NULL);
7798 #else
7799         status = pthread_create(&t, NULL, task, NULL);
7800 #endif
7801
7802         if( status ) exit( status );
7803
7804         /* make sure pthread_detach() isn't just a stub */
7805 #if HAVE_PTHREADS_D4
7806         status = pthread_detach( &t );
7807 #else
7808         status = pthread_detach( t );
7809 #endif
7810
7811 #ifdef HAVE_LINUX_THREADS
7812         pthread_kill_other_threads_np();
7813 #endif
7814
7815         exit( status );
7816
7817 }
7818
7819 EOF
7820 if { (eval echo configure:7821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7821 then
7822   ol_cv_pthread_thread=yes
7823 else
7824   echo "configure: failed program was:" >&5
7825   cat conftest.$ac_ext >&5
7826   rm -fr conftest*
7827   ol_cv_pthread_thread=no
7828 fi
7829 rm -fr conftest*
7830 fi
7831
7832
7833                 # restore the LIBS
7834                 LIBS="$ol_LIBS"
7835         
7836 fi
7837
7838 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7839
7840         if test $ol_cv_pthread_thread = yes ; then
7841                 ol_link_pthreads="-thread"
7842                 ol_link_threads=posix
7843         fi
7844 fi
7845
7846
7847                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7848 if test "$ol_link_threads" = no ; then
7849         # try -lpthread -lmach -lexc -lc_r
7850         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7851 echo "configure:7852: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7852 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   
7856                 # save the flags
7857                 ol_LIBS="$LIBS"
7858                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7859
7860                 if test "$cross_compiling" = yes; then
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 /* pthread test headers */
7865 #include <pthread.h>
7866 #ifndef NULL
7867 #define NULL (void*)0
7868 #endif
7869
7870 static void *task(p)
7871         void *p;
7872 {
7873         return (void *) (p == NULL);
7874 }
7875
7876 int main() {
7877
7878         /* pthread test function */
7879         pthread_t t;
7880         int status;
7881
7882         /* make sure pthread_create() isn't just a stub */
7883 #if HAVE_PTHREADS_D4
7884         status = pthread_create(&t, pthread_attr_default, task, NULL);
7885 #else
7886         status = pthread_create(&t, NULL, task, NULL);
7887 #endif
7888
7889         if( status ) exit( status );
7890
7891         /* make sure pthread_detach() isn't just a stub */
7892 #if HAVE_PTHREADS_D4
7893         status = pthread_detach( &t );
7894 #else
7895         status = pthread_detach( t );
7896 #endif
7897
7898 #ifdef HAVE_LINUX_THREADS
7899         pthread_kill_other_threads_np();
7900 #endif
7901
7902         exit( status );
7903
7904 ; return 0; }
7905 EOF
7906 if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7907   rm -rf conftest*
7908   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7909 else
7910   echo "configure: failed program was:" >&5
7911   cat conftest.$ac_ext >&5
7912   rm -rf conftest*
7913   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7914 fi
7915 rm -f conftest*
7916 else
7917   cat > conftest.$ac_ext <<EOF
7918 #line 7919 "configure"
7919 #include "confdefs.h"
7920 /* pthread test headers */
7921 #include <pthread.h>
7922 #ifndef NULL
7923 #define NULL (void*)0
7924 #endif
7925
7926 static void *task(p)
7927         void *p;
7928 {
7929         return (void *) (p == NULL);
7930 }
7931
7932
7933 int main(argc, argv)
7934         int argc;
7935         char **argv;
7936 {
7937
7938         /* pthread test function */
7939         pthread_t t;
7940         int status;
7941
7942         /* make sure pthread_create() isn't just a stub */
7943 #if HAVE_PTHREADS_D4
7944         status = pthread_create(&t, pthread_attr_default, task, NULL);
7945 #else
7946         status = pthread_create(&t, NULL, task, NULL);
7947 #endif
7948
7949         if( status ) exit( status );
7950
7951         /* make sure pthread_detach() isn't just a stub */
7952 #if HAVE_PTHREADS_D4
7953         status = pthread_detach( &t );
7954 #else
7955         status = pthread_detach( t );
7956 #endif
7957
7958 #ifdef HAVE_LINUX_THREADS
7959         pthread_kill_other_threads_np();
7960 #endif
7961
7962         exit( status );
7963
7964 }
7965
7966 EOF
7967 if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7968 then
7969   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7970 else
7971   echo "configure: failed program was:" >&5
7972   cat conftest.$ac_ext >&5
7973   rm -fr conftest*
7974   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7975 fi
7976 rm -fr conftest*
7977 fi
7978
7979
7980                 # restore the LIBS
7981                 LIBS="$ol_LIBS"
7982         
7983 fi
7984
7985 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7986
7987         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7988                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7989                 ol_link_threads=posix
7990         fi
7991 fi
7992
7993                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7994 if test "$ol_link_threads" = no ; then
7995         # try -lpthread -lmach -lexc
7996         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7997 echo "configure:7998: checking for pthread link with -lpthread -lmach -lexc" >&5
7998 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   
8002                 # save the flags
8003                 ol_LIBS="$LIBS"
8004                 LIBS="-lpthread -lmach -lexc $LIBS"
8005
8006                 if test "$cross_compiling" = yes; then
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* pthread test headers */
8011 #include <pthread.h>
8012 #ifndef NULL
8013 #define NULL (void*)0
8014 #endif
8015
8016 static void *task(p)
8017         void *p;
8018 {
8019         return (void *) (p == NULL);
8020 }
8021
8022 int main() {
8023
8024         /* pthread test function */
8025         pthread_t t;
8026         int status;
8027
8028         /* make sure pthread_create() isn't just a stub */
8029 #if HAVE_PTHREADS_D4
8030         status = pthread_create(&t, pthread_attr_default, task, NULL);
8031 #else
8032         status = pthread_create(&t, NULL, task, NULL);
8033 #endif
8034
8035         if( status ) exit( status );
8036
8037         /* make sure pthread_detach() isn't just a stub */
8038 #if HAVE_PTHREADS_D4
8039         status = pthread_detach( &t );
8040 #else
8041         status = pthread_detach( t );
8042 #endif
8043
8044 #ifdef HAVE_LINUX_THREADS
8045         pthread_kill_other_threads_np();
8046 #endif
8047
8048         exit( status );
8049
8050 ; return 0; }
8051 EOF
8052 if { (eval echo configure:8053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8053   rm -rf conftest*
8054   ol_cv_pthread_lpthread_lmach_lexc=yes
8055 else
8056   echo "configure: failed program was:" >&5
8057   cat conftest.$ac_ext >&5
8058   rm -rf conftest*
8059   ol_cv_pthread_lpthread_lmach_lexc=no
8060 fi
8061 rm -f conftest*
8062 else
8063   cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 /* pthread test headers */
8067 #include <pthread.h>
8068 #ifndef NULL
8069 #define NULL (void*)0
8070 #endif
8071
8072 static void *task(p)
8073         void *p;
8074 {
8075         return (void *) (p == NULL);
8076 }
8077
8078
8079 int main(argc, argv)
8080         int argc;
8081         char **argv;
8082 {
8083
8084         /* pthread test function */
8085         pthread_t t;
8086         int status;
8087
8088         /* make sure pthread_create() isn't just a stub */
8089 #if HAVE_PTHREADS_D4
8090         status = pthread_create(&t, pthread_attr_default, task, NULL);
8091 #else
8092         status = pthread_create(&t, NULL, task, NULL);
8093 #endif
8094
8095         if( status ) exit( status );
8096
8097         /* make sure pthread_detach() isn't just a stub */
8098 #if HAVE_PTHREADS_D4
8099         status = pthread_detach( &t );
8100 #else
8101         status = pthread_detach( t );
8102 #endif
8103
8104 #ifdef HAVE_LINUX_THREADS
8105         pthread_kill_other_threads_np();
8106 #endif
8107
8108         exit( status );
8109
8110 }
8111
8112 EOF
8113 if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8114 then
8115   ol_cv_pthread_lpthread_lmach_lexc=yes
8116 else
8117   echo "configure: failed program was:" >&5
8118   cat conftest.$ac_ext >&5
8119   rm -fr conftest*
8120   ol_cv_pthread_lpthread_lmach_lexc=no
8121 fi
8122 rm -fr conftest*
8123 fi
8124
8125
8126                 # restore the LIBS
8127                 LIBS="$ol_LIBS"
8128         
8129 fi
8130
8131 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8132
8133         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8134                 ol_link_pthreads="-lpthread -lmach -lexc"
8135                 ol_link_threads=posix
8136         fi
8137 fi
8138
8139
8140                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8141 if test "$ol_link_threads" = no ; then
8142         # try -lpthread -Wl,-woff,85
8143         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8144 echo "configure:8145: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8145 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   
8149                 # save the flags
8150                 ol_LIBS="$LIBS"
8151                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8152
8153                 if test "$cross_compiling" = yes; then
8154   cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* pthread test headers */
8158 #include <pthread.h>
8159 #ifndef NULL
8160 #define NULL (void*)0
8161 #endif
8162
8163 static void *task(p)
8164         void *p;
8165 {
8166         return (void *) (p == NULL);
8167 }
8168
8169 int main() {
8170
8171         /* pthread test function */
8172         pthread_t t;
8173         int status;
8174
8175         /* make sure pthread_create() isn't just a stub */
8176 #if HAVE_PTHREADS_D4
8177         status = pthread_create(&t, pthread_attr_default, task, NULL);
8178 #else
8179         status = pthread_create(&t, NULL, task, NULL);
8180 #endif
8181
8182         if( status ) exit( status );
8183
8184         /* make sure pthread_detach() isn't just a stub */
8185 #if HAVE_PTHREADS_D4
8186         status = pthread_detach( &t );
8187 #else
8188         status = pthread_detach( t );
8189 #endif
8190
8191 #ifdef HAVE_LINUX_THREADS
8192         pthread_kill_other_threads_np();
8193 #endif
8194
8195         exit( status );
8196
8197 ; return 0; }
8198 EOF
8199 if { (eval echo configure:8200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8200   rm -rf conftest*
8201   ol_cv_pthread_lib_lpthread_woff=yes
8202 else
8203   echo "configure: failed program was:" >&5
8204   cat conftest.$ac_ext >&5
8205   rm -rf conftest*
8206   ol_cv_pthread_lib_lpthread_woff=no
8207 fi
8208 rm -f conftest*
8209 else
8210   cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 /* pthread test headers */
8214 #include <pthread.h>
8215 #ifndef NULL
8216 #define NULL (void*)0
8217 #endif
8218
8219 static void *task(p)
8220         void *p;
8221 {
8222         return (void *) (p == NULL);
8223 }
8224
8225
8226 int main(argc, argv)
8227         int argc;
8228         char **argv;
8229 {
8230
8231         /* pthread test function */
8232         pthread_t t;
8233         int status;
8234
8235         /* make sure pthread_create() isn't just a stub */
8236 #if HAVE_PTHREADS_D4
8237         status = pthread_create(&t, pthread_attr_default, task, NULL);
8238 #else
8239         status = pthread_create(&t, NULL, task, NULL);
8240 #endif
8241
8242         if( status ) exit( status );
8243
8244         /* make sure pthread_detach() isn't just a stub */
8245 #if HAVE_PTHREADS_D4
8246         status = pthread_detach( &t );
8247 #else
8248         status = pthread_detach( t );
8249 #endif
8250
8251 #ifdef HAVE_LINUX_THREADS
8252         pthread_kill_other_threads_np();
8253 #endif
8254
8255         exit( status );
8256
8257 }
8258
8259 EOF
8260 if { (eval echo configure:8261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8261 then
8262   ol_cv_pthread_lib_lpthread_woff=yes
8263 else
8264   echo "configure: failed program was:" >&5
8265   cat conftest.$ac_ext >&5
8266   rm -fr conftest*
8267   ol_cv_pthread_lib_lpthread_woff=no
8268 fi
8269 rm -fr conftest*
8270 fi
8271
8272
8273                 # restore the LIBS
8274                 LIBS="$ol_LIBS"
8275         
8276 fi
8277
8278 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8279
8280         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8281                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8282                 ol_link_threads=posix
8283         fi
8284 fi
8285
8286
8287                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8288 if test "$ol_link_threads" = no ; then
8289         # try -lpthread
8290         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8291 echo "configure:8292: checking for pthread link with -lpthread" >&5
8292 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8293   echo $ac_n "(cached) $ac_c" 1>&6
8294 else
8295   
8296                 # save the flags
8297                 ol_LIBS="$LIBS"
8298                 LIBS="-lpthread $LIBS"
8299
8300                 if test "$cross_compiling" = yes; then
8301   cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* pthread test headers */
8305 #include <pthread.h>
8306 #ifndef NULL
8307 #define NULL (void*)0
8308 #endif
8309
8310 static void *task(p)
8311         void *p;
8312 {
8313         return (void *) (p == NULL);
8314 }
8315
8316 int main() {
8317
8318         /* pthread test function */
8319         pthread_t t;
8320         int status;
8321
8322         /* make sure pthread_create() isn't just a stub */
8323 #if HAVE_PTHREADS_D4
8324         status = pthread_create(&t, pthread_attr_default, task, NULL);
8325 #else
8326         status = pthread_create(&t, NULL, task, NULL);
8327 #endif
8328
8329         if( status ) exit( status );
8330
8331         /* make sure pthread_detach() isn't just a stub */
8332 #if HAVE_PTHREADS_D4
8333         status = pthread_detach( &t );
8334 #else
8335         status = pthread_detach( t );
8336 #endif
8337
8338 #ifdef HAVE_LINUX_THREADS
8339         pthread_kill_other_threads_np();
8340 #endif
8341
8342         exit( status );
8343
8344 ; return 0; }
8345 EOF
8346 if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8347   rm -rf conftest*
8348   ol_cv_pthread_lpthread=yes
8349 else
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   ol_cv_pthread_lpthread=no
8354 fi
8355 rm -f conftest*
8356 else
8357   cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 /* pthread test headers */
8361 #include <pthread.h>
8362 #ifndef NULL
8363 #define NULL (void*)0
8364 #endif
8365
8366 static void *task(p)
8367         void *p;
8368 {
8369         return (void *) (p == NULL);
8370 }
8371
8372
8373 int main(argc, argv)
8374         int argc;
8375         char **argv;
8376 {
8377
8378         /* pthread test function */
8379         pthread_t t;
8380         int status;
8381
8382         /* make sure pthread_create() isn't just a stub */
8383 #if HAVE_PTHREADS_D4
8384         status = pthread_create(&t, pthread_attr_default, task, NULL);
8385 #else
8386         status = pthread_create(&t, NULL, task, NULL);
8387 #endif
8388
8389         if( status ) exit( status );
8390
8391         /* make sure pthread_detach() isn't just a stub */
8392 #if HAVE_PTHREADS_D4
8393         status = pthread_detach( &t );
8394 #else
8395         status = pthread_detach( t );
8396 #endif
8397
8398 #ifdef HAVE_LINUX_THREADS
8399         pthread_kill_other_threads_np();
8400 #endif
8401
8402         exit( status );
8403
8404 }
8405
8406 EOF
8407 if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8408 then
8409   ol_cv_pthread_lpthread=yes
8410 else
8411   echo "configure: failed program was:" >&5
8412   cat conftest.$ac_ext >&5
8413   rm -fr conftest*
8414   ol_cv_pthread_lpthread=no
8415 fi
8416 rm -fr conftest*
8417 fi
8418
8419
8420                 # restore the LIBS
8421                 LIBS="$ol_LIBS"
8422         
8423 fi
8424
8425 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8426
8427         if test $ol_cv_pthread_lpthread = yes ; then
8428                 ol_link_pthreads="-lpthread"
8429                 ol_link_threads=posix
8430         fi
8431 fi
8432
8433                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8434 if test "$ol_link_threads" = no ; then
8435         # try -lc_r
8436         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8437 echo "configure:8438: checking for pthread link with -lc_r" >&5
8438 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8439   echo $ac_n "(cached) $ac_c" 1>&6
8440 else
8441   
8442                 # save the flags
8443                 ol_LIBS="$LIBS"
8444                 LIBS="-lc_r $LIBS"
8445
8446                 if test "$cross_compiling" = yes; then
8447   cat > conftest.$ac_ext <<EOF
8448 #line 8449 "configure"
8449 #include "confdefs.h"
8450 /* pthread test headers */
8451 #include <pthread.h>
8452 #ifndef NULL
8453 #define NULL (void*)0
8454 #endif
8455
8456 static void *task(p)
8457         void *p;
8458 {
8459         return (void *) (p == NULL);
8460 }
8461
8462 int main() {
8463
8464         /* pthread test function */
8465         pthread_t t;
8466         int status;
8467
8468         /* make sure pthread_create() isn't just a stub */
8469 #if HAVE_PTHREADS_D4
8470         status = pthread_create(&t, pthread_attr_default, task, NULL);
8471 #else
8472         status = pthread_create(&t, NULL, task, NULL);
8473 #endif
8474
8475         if( status ) exit( status );
8476
8477         /* make sure pthread_detach() isn't just a stub */
8478 #if HAVE_PTHREADS_D4
8479         status = pthread_detach( &t );
8480 #else
8481         status = pthread_detach( t );
8482 #endif
8483
8484 #ifdef HAVE_LINUX_THREADS
8485         pthread_kill_other_threads_np();
8486 #endif
8487
8488         exit( status );
8489
8490 ; return 0; }
8491 EOF
8492 if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8493   rm -rf conftest*
8494   ol_cv_pthread_lc_r=yes
8495 else
8496   echo "configure: failed program was:" >&5
8497   cat conftest.$ac_ext >&5
8498   rm -rf conftest*
8499   ol_cv_pthread_lc_r=no
8500 fi
8501 rm -f conftest*
8502 else
8503   cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 /* pthread test headers */
8507 #include <pthread.h>
8508 #ifndef NULL
8509 #define NULL (void*)0
8510 #endif
8511
8512 static void *task(p)
8513         void *p;
8514 {
8515         return (void *) (p == NULL);
8516 }
8517
8518
8519 int main(argc, argv)
8520         int argc;
8521         char **argv;
8522 {
8523
8524         /* pthread test function */
8525         pthread_t t;
8526         int status;
8527
8528         /* make sure pthread_create() isn't just a stub */
8529 #if HAVE_PTHREADS_D4
8530         status = pthread_create(&t, pthread_attr_default, task, NULL);
8531 #else
8532         status = pthread_create(&t, NULL, task, NULL);
8533 #endif
8534
8535         if( status ) exit( status );
8536
8537         /* make sure pthread_detach() isn't just a stub */
8538 #if HAVE_PTHREADS_D4
8539         status = pthread_detach( &t );
8540 #else
8541         status = pthread_detach( t );
8542 #endif
8543
8544 #ifdef HAVE_LINUX_THREADS
8545         pthread_kill_other_threads_np();
8546 #endif
8547
8548         exit( status );
8549
8550 }
8551
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8554 then
8555   ol_cv_pthread_lc_r=yes
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -fr conftest*
8560   ol_cv_pthread_lc_r=no
8561 fi
8562 rm -fr conftest*
8563 fi
8564
8565
8566                 # restore the LIBS
8567                 LIBS="$ol_LIBS"
8568         
8569 fi
8570
8571 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8572
8573         if test $ol_cv_pthread_lc_r = yes ; then
8574                 ol_link_pthreads="-lc_r"
8575                 ol_link_threads=posix
8576         fi
8577 fi
8578
8579
8580                 # Pthread try link: -threads (ol_cv_pthread_threads)
8581 if test "$ol_link_threads" = no ; then
8582         # try -threads
8583         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8584 echo "configure:8585: checking for pthread link with -threads" >&5
8585 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8586   echo $ac_n "(cached) $ac_c" 1>&6
8587 else
8588   
8589                 # save the flags
8590                 ol_LIBS="$LIBS"
8591                 LIBS="-threads $LIBS"
8592
8593                 if test "$cross_compiling" = yes; then
8594   cat > conftest.$ac_ext <<EOF
8595 #line 8596 "configure"
8596 #include "confdefs.h"
8597 /* pthread test headers */
8598 #include <pthread.h>
8599 #ifndef NULL
8600 #define NULL (void*)0
8601 #endif
8602
8603 static void *task(p)
8604         void *p;
8605 {
8606         return (void *) (p == NULL);
8607 }
8608
8609 int main() {
8610
8611         /* pthread test function */
8612         pthread_t t;
8613         int status;
8614
8615         /* make sure pthread_create() isn't just a stub */
8616 #if HAVE_PTHREADS_D4
8617         status = pthread_create(&t, pthread_attr_default, task, NULL);
8618 #else
8619         status = pthread_create(&t, NULL, task, NULL);
8620 #endif
8621
8622         if( status ) exit( status );
8623
8624         /* make sure pthread_detach() isn't just a stub */
8625 #if HAVE_PTHREADS_D4
8626         status = pthread_detach( &t );
8627 #else
8628         status = pthread_detach( t );
8629 #endif
8630
8631 #ifdef HAVE_LINUX_THREADS
8632         pthread_kill_other_threads_np();
8633 #endif
8634
8635         exit( status );
8636
8637 ; return 0; }
8638 EOF
8639 if { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8640   rm -rf conftest*
8641   ol_cv_pthread_threads=yes
8642 else
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -rf conftest*
8646   ol_cv_pthread_threads=no
8647 fi
8648 rm -f conftest*
8649 else
8650   cat > conftest.$ac_ext <<EOF
8651 #line 8652 "configure"
8652 #include "confdefs.h"
8653 /* pthread test headers */
8654 #include <pthread.h>
8655 #ifndef NULL
8656 #define NULL (void*)0
8657 #endif
8658
8659 static void *task(p)
8660         void *p;
8661 {
8662         return (void *) (p == NULL);
8663 }
8664
8665
8666 int main(argc, argv)
8667         int argc;
8668         char **argv;
8669 {
8670
8671         /* pthread test function */
8672         pthread_t t;
8673         int status;
8674
8675         /* make sure pthread_create() isn't just a stub */
8676 #if HAVE_PTHREADS_D4
8677         status = pthread_create(&t, pthread_attr_default, task, NULL);
8678 #else
8679         status = pthread_create(&t, NULL, task, NULL);
8680 #endif
8681
8682         if( status ) exit( status );
8683
8684         /* make sure pthread_detach() isn't just a stub */
8685 #if HAVE_PTHREADS_D4
8686         status = pthread_detach( &t );
8687 #else
8688         status = pthread_detach( t );
8689 #endif
8690
8691 #ifdef HAVE_LINUX_THREADS
8692         pthread_kill_other_threads_np();
8693 #endif
8694
8695         exit( status );
8696
8697 }
8698
8699 EOF
8700 if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8701 then
8702   ol_cv_pthread_threads=yes
8703 else
8704   echo "configure: failed program was:" >&5
8705   cat conftest.$ac_ext >&5
8706   rm -fr conftest*
8707   ol_cv_pthread_threads=no
8708 fi
8709 rm -fr conftest*
8710 fi
8711
8712
8713                 # restore the LIBS
8714                 LIBS="$ol_LIBS"
8715         
8716 fi
8717
8718 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8719
8720         if test $ol_cv_pthread_threads = yes ; then
8721                 ol_link_pthreads="-threads"
8722                 ol_link_threads=posix
8723         fi
8724 fi
8725
8726
8727                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8728 if test "$ol_link_threads" = no ; then
8729         # try -lpthreads -lmach -lexc -lc_r
8730         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8731 echo "configure:8732: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8732 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8733   echo $ac_n "(cached) $ac_c" 1>&6
8734 else
8735   
8736                 # save the flags
8737                 ol_LIBS="$LIBS"
8738                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8739
8740                 if test "$cross_compiling" = yes; then
8741   cat > conftest.$ac_ext <<EOF
8742 #line 8743 "configure"
8743 #include "confdefs.h"
8744 /* pthread test headers */
8745 #include <pthread.h>
8746 #ifndef NULL
8747 #define NULL (void*)0
8748 #endif
8749
8750 static void *task(p)
8751         void *p;
8752 {
8753         return (void *) (p == NULL);
8754 }
8755
8756 int main() {
8757
8758         /* pthread test function */
8759         pthread_t t;
8760         int status;
8761
8762         /* make sure pthread_create() isn't just a stub */
8763 #if HAVE_PTHREADS_D4
8764         status = pthread_create(&t, pthread_attr_default, task, NULL);
8765 #else
8766         status = pthread_create(&t, NULL, task, NULL);
8767 #endif
8768
8769         if( status ) exit( status );
8770
8771         /* make sure pthread_detach() isn't just a stub */
8772 #if HAVE_PTHREADS_D4
8773         status = pthread_detach( &t );
8774 #else
8775         status = pthread_detach( t );
8776 #endif
8777
8778 #ifdef HAVE_LINUX_THREADS
8779         pthread_kill_other_threads_np();
8780 #endif
8781
8782         exit( status );
8783
8784 ; return 0; }
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8787   rm -rf conftest*
8788   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -rf conftest*
8793   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8794 fi
8795 rm -f conftest*
8796 else
8797   cat > conftest.$ac_ext <<EOF
8798 #line 8799 "configure"
8799 #include "confdefs.h"
8800 /* pthread test headers */
8801 #include <pthread.h>
8802 #ifndef NULL
8803 #define NULL (void*)0
8804 #endif
8805
8806 static void *task(p)
8807         void *p;
8808 {
8809         return (void *) (p == NULL);
8810 }
8811
8812
8813 int main(argc, argv)
8814         int argc;
8815         char **argv;
8816 {
8817
8818         /* pthread test function */
8819         pthread_t t;
8820         int status;
8821
8822         /* make sure pthread_create() isn't just a stub */
8823 #if HAVE_PTHREADS_D4
8824         status = pthread_create(&t, pthread_attr_default, task, NULL);
8825 #else
8826         status = pthread_create(&t, NULL, task, NULL);
8827 #endif
8828
8829         if( status ) exit( status );
8830
8831         /* make sure pthread_detach() isn't just a stub */
8832 #if HAVE_PTHREADS_D4
8833         status = pthread_detach( &t );
8834 #else
8835         status = pthread_detach( t );
8836 #endif
8837
8838 #ifdef HAVE_LINUX_THREADS
8839         pthread_kill_other_threads_np();
8840 #endif
8841
8842         exit( status );
8843
8844 }
8845
8846 EOF
8847 if { (eval echo configure:8848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8848 then
8849   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8850 else
8851   echo "configure: failed program was:" >&5
8852   cat conftest.$ac_ext >&5
8853   rm -fr conftest*
8854   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8855 fi
8856 rm -fr conftest*
8857 fi
8858
8859
8860                 # restore the LIBS
8861                 LIBS="$ol_LIBS"
8862         
8863 fi
8864
8865 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8866
8867         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8868                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8869                 ol_link_threads=posix
8870         fi
8871 fi
8872
8873                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8874 if test "$ol_link_threads" = no ; then
8875         # try -lpthreads -lmach -lexc
8876         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8877 echo "configure:8878: checking for pthread link with -lpthreads -lmach -lexc" >&5
8878 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   
8882                 # save the flags
8883                 ol_LIBS="$LIBS"
8884                 LIBS="-lpthreads -lmach -lexc $LIBS"
8885
8886                 if test "$cross_compiling" = yes; then
8887   cat > conftest.$ac_ext <<EOF
8888 #line 8889 "configure"
8889 #include "confdefs.h"
8890 /* pthread test headers */
8891 #include <pthread.h>
8892 #ifndef NULL
8893 #define NULL (void*)0
8894 #endif
8895
8896 static void *task(p)
8897         void *p;
8898 {
8899         return (void *) (p == NULL);
8900 }
8901
8902 int main() {
8903
8904         /* pthread test function */
8905         pthread_t t;
8906         int status;
8907
8908         /* make sure pthread_create() isn't just a stub */
8909 #if HAVE_PTHREADS_D4
8910         status = pthread_create(&t, pthread_attr_default, task, NULL);
8911 #else
8912         status = pthread_create(&t, NULL, task, NULL);
8913 #endif
8914
8915         if( status ) exit( status );
8916
8917         /* make sure pthread_detach() isn't just a stub */
8918 #if HAVE_PTHREADS_D4
8919         status = pthread_detach( &t );
8920 #else
8921         status = pthread_detach( t );
8922 #endif
8923
8924 #ifdef HAVE_LINUX_THREADS
8925         pthread_kill_other_threads_np();
8926 #endif
8927
8928         exit( status );
8929
8930 ; return 0; }
8931 EOF
8932 if { (eval echo configure:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8933   rm -rf conftest*
8934   ol_cv_pthread_lpthreads_lmach_lexc=yes
8935 else
8936   echo "configure: failed program was:" >&5
8937   cat conftest.$ac_ext >&5
8938   rm -rf conftest*
8939   ol_cv_pthread_lpthreads_lmach_lexc=no
8940 fi
8941 rm -f conftest*
8942 else
8943   cat > conftest.$ac_ext <<EOF
8944 #line 8945 "configure"
8945 #include "confdefs.h"
8946 /* pthread test headers */
8947 #include <pthread.h>
8948 #ifndef NULL
8949 #define NULL (void*)0
8950 #endif
8951
8952 static void *task(p)
8953         void *p;
8954 {
8955         return (void *) (p == NULL);
8956 }
8957
8958
8959 int main(argc, argv)
8960         int argc;
8961         char **argv;
8962 {
8963
8964         /* pthread test function */
8965         pthread_t t;
8966         int status;
8967
8968         /* make sure pthread_create() isn't just a stub */
8969 #if HAVE_PTHREADS_D4
8970         status = pthread_create(&t, pthread_attr_default, task, NULL);
8971 #else
8972         status = pthread_create(&t, NULL, task, NULL);
8973 #endif
8974
8975         if( status ) exit( status );
8976
8977         /* make sure pthread_detach() isn't just a stub */
8978 #if HAVE_PTHREADS_D4
8979         status = pthread_detach( &t );
8980 #else
8981         status = pthread_detach( t );
8982 #endif
8983
8984 #ifdef HAVE_LINUX_THREADS
8985         pthread_kill_other_threads_np();
8986 #endif
8987
8988         exit( status );
8989
8990 }
8991
8992 EOF
8993 if { (eval echo configure:8994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8994 then
8995   ol_cv_pthread_lpthreads_lmach_lexc=yes
8996 else
8997   echo "configure: failed program was:" >&5
8998   cat conftest.$ac_ext >&5
8999   rm -fr conftest*
9000   ol_cv_pthread_lpthreads_lmach_lexc=no
9001 fi
9002 rm -fr conftest*
9003 fi
9004
9005
9006                 # restore the LIBS
9007                 LIBS="$ol_LIBS"
9008         
9009 fi
9010
9011 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9012
9013         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9014                 ol_link_pthreads="-lpthreads -lmach -lexc"
9015                 ol_link_threads=posix
9016         fi
9017 fi
9018
9019                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9020 if test "$ol_link_threads" = no ; then
9021         # try -lpthreads -lexc
9022         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9023 echo "configure:9024: checking for pthread link with -lpthreads -lexc" >&5
9024 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9025   echo $ac_n "(cached) $ac_c" 1>&6
9026 else
9027   
9028                 # save the flags
9029                 ol_LIBS="$LIBS"
9030                 LIBS="-lpthreads -lexc $LIBS"
9031
9032                 if test "$cross_compiling" = yes; then
9033   cat > conftest.$ac_ext <<EOF
9034 #line 9035 "configure"
9035 #include "confdefs.h"
9036 /* pthread test headers */
9037 #include <pthread.h>
9038 #ifndef NULL
9039 #define NULL (void*)0
9040 #endif
9041
9042 static void *task(p)
9043         void *p;
9044 {
9045         return (void *) (p == NULL);
9046 }
9047
9048 int main() {
9049
9050         /* pthread test function */
9051         pthread_t t;
9052         int status;
9053
9054         /* make sure pthread_create() isn't just a stub */
9055 #if HAVE_PTHREADS_D4
9056         status = pthread_create(&t, pthread_attr_default, task, NULL);
9057 #else
9058         status = pthread_create(&t, NULL, task, NULL);
9059 #endif
9060
9061         if( status ) exit( status );
9062
9063         /* make sure pthread_detach() isn't just a stub */
9064 #if HAVE_PTHREADS_D4
9065         status = pthread_detach( &t );
9066 #else
9067         status = pthread_detach( t );
9068 #endif
9069
9070 #ifdef HAVE_LINUX_THREADS
9071         pthread_kill_other_threads_np();
9072 #endif
9073
9074         exit( status );
9075
9076 ; return 0; }
9077 EOF
9078 if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9079   rm -rf conftest*
9080   ol_cv_pthread_lpthreads_lexc=yes
9081 else
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   ol_cv_pthread_lpthreads_lexc=no
9086 fi
9087 rm -f conftest*
9088 else
9089   cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 /* pthread test headers */
9093 #include <pthread.h>
9094 #ifndef NULL
9095 #define NULL (void*)0
9096 #endif
9097
9098 static void *task(p)
9099         void *p;
9100 {
9101         return (void *) (p == NULL);
9102 }
9103
9104
9105 int main(argc, argv)
9106         int argc;
9107         char **argv;
9108 {
9109
9110         /* pthread test function */
9111         pthread_t t;
9112         int status;
9113
9114         /* make sure pthread_create() isn't just a stub */
9115 #if HAVE_PTHREADS_D4
9116         status = pthread_create(&t, pthread_attr_default, task, NULL);
9117 #else
9118         status = pthread_create(&t, NULL, task, NULL);
9119 #endif
9120
9121         if( status ) exit( status );
9122
9123         /* make sure pthread_detach() isn't just a stub */
9124 #if HAVE_PTHREADS_D4
9125         status = pthread_detach( &t );
9126 #else
9127         status = pthread_detach( t );
9128 #endif
9129
9130 #ifdef HAVE_LINUX_THREADS
9131         pthread_kill_other_threads_np();
9132 #endif
9133
9134         exit( status );
9135
9136 }
9137
9138 EOF
9139 if { (eval echo configure:9140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9140 then
9141   ol_cv_pthread_lpthreads_lexc=yes
9142 else
9143   echo "configure: failed program was:" >&5
9144   cat conftest.$ac_ext >&5
9145   rm -fr conftest*
9146   ol_cv_pthread_lpthreads_lexc=no
9147 fi
9148 rm -fr conftest*
9149 fi
9150
9151
9152                 # restore the LIBS
9153                 LIBS="$ol_LIBS"
9154         
9155 fi
9156
9157 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9158
9159         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9160                 ol_link_pthreads="-lpthreads -lexc"
9161                 ol_link_threads=posix
9162         fi
9163 fi
9164
9165
9166                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9167 if test "$ol_link_threads" = no ; then
9168         # try -lpthreads
9169         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9170 echo "configure:9171: checking for pthread link with -lpthreads" >&5
9171 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9172   echo $ac_n "(cached) $ac_c" 1>&6
9173 else
9174   
9175                 # save the flags
9176                 ol_LIBS="$LIBS"
9177                 LIBS="-lpthreads $LIBS"
9178
9179                 if test "$cross_compiling" = yes; then
9180   cat > conftest.$ac_ext <<EOF
9181 #line 9182 "configure"
9182 #include "confdefs.h"
9183 /* pthread test headers */
9184 #include <pthread.h>
9185 #ifndef NULL
9186 #define NULL (void*)0
9187 #endif
9188
9189 static void *task(p)
9190         void *p;
9191 {
9192         return (void *) (p == NULL);
9193 }
9194
9195 int main() {
9196
9197         /* pthread test function */
9198         pthread_t t;
9199         int status;
9200
9201         /* make sure pthread_create() isn't just a stub */
9202 #if HAVE_PTHREADS_D4
9203         status = pthread_create(&t, pthread_attr_default, task, NULL);
9204 #else
9205         status = pthread_create(&t, NULL, task, NULL);
9206 #endif
9207
9208         if( status ) exit( status );
9209
9210         /* make sure pthread_detach() isn't just a stub */
9211 #if HAVE_PTHREADS_D4
9212         status = pthread_detach( &t );
9213 #else
9214         status = pthread_detach( t );
9215 #endif
9216
9217 #ifdef HAVE_LINUX_THREADS
9218         pthread_kill_other_threads_np();
9219 #endif
9220
9221         exit( status );
9222
9223 ; return 0; }
9224 EOF
9225 if { (eval echo configure:9226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9226   rm -rf conftest*
9227   ol_cv_pthread_lib_lpthreads=yes
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   ol_cv_pthread_lib_lpthreads=no
9233 fi
9234 rm -f conftest*
9235 else
9236   cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239 /* pthread test headers */
9240 #include <pthread.h>
9241 #ifndef NULL
9242 #define NULL (void*)0
9243 #endif
9244
9245 static void *task(p)
9246         void *p;
9247 {
9248         return (void *) (p == NULL);
9249 }
9250
9251
9252 int main(argc, argv)
9253         int argc;
9254         char **argv;
9255 {
9256
9257         /* pthread test function */
9258         pthread_t t;
9259         int status;
9260
9261         /* make sure pthread_create() isn't just a stub */
9262 #if HAVE_PTHREADS_D4
9263         status = pthread_create(&t, pthread_attr_default, task, NULL);
9264 #else
9265         status = pthread_create(&t, NULL, task, NULL);
9266 #endif
9267
9268         if( status ) exit( status );
9269
9270         /* make sure pthread_detach() isn't just a stub */
9271 #if HAVE_PTHREADS_D4
9272         status = pthread_detach( &t );
9273 #else
9274         status = pthread_detach( t );
9275 #endif
9276
9277 #ifdef HAVE_LINUX_THREADS
9278         pthread_kill_other_threads_np();
9279 #endif
9280
9281         exit( status );
9282
9283 }
9284
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9287 then
9288   ol_cv_pthread_lib_lpthreads=yes
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -fr conftest*
9293   ol_cv_pthread_lib_lpthreads=no
9294 fi
9295 rm -fr conftest*
9296 fi
9297
9298
9299                 # restore the LIBS
9300                 LIBS="$ol_LIBS"
9301         
9302 fi
9303
9304 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9305
9306         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9307                 ol_link_pthreads="-lpthreads"
9308                 ol_link_threads=posix
9309         fi
9310 fi
9311
9312
9313                 if test $ol_link_threads != no ; then
9314                         cat >> confdefs.h <<\EOF
9315 #define HAVE_PTHREADS 1
9316 EOF
9317
9318
9319                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9320
9321                                                 save_CPPFLAGS="$CPPFLAGS"
9322                         save_LIBS="$LIBS"
9323                         LIBS="$LTHREAD_LIBS $LIBS"
9324
9325                                                                                                 for ac_func in sched_yield pthread_yield
9326 do
9327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9328 echo "configure:9329: checking for $ac_func" >&5
9329 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9330   echo $ac_n "(cached) $ac_c" 1>&6
9331 else
9332   cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 /* System header to define __stub macros and hopefully few prototypes,
9336     which can conflict with char $ac_func(); below.  */
9337 #include <assert.h>
9338 /* Override any gcc2 internal prototype to avoid an error.  */
9339 /* We use char because int might match the return type of a gcc2
9340     builtin and then its argument prototype would still apply.  */
9341 char $ac_func();
9342 char (*f)();
9343
9344 int main() {
9345
9346 /* The GNU C library defines this for functions which it implements
9347     to always fail with ENOSYS.  Some functions are actually named
9348     something starting with __ and the normal name is an alias.  */
9349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9350 choke me
9351 #else
9352 f = $ac_func;
9353 #endif
9354
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_func_$ac_func=yes"
9360 else
9361   echo "configure: failed program was:" >&5
9362   cat conftest.$ac_ext >&5
9363   rm -rf conftest*
9364   eval "ac_cv_func_$ac_func=no"
9365 fi
9366 rm -f conftest*
9367 fi
9368
9369 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9372   cat >> confdefs.h <<EOF
9373 #define $ac_tr_func 1
9374 EOF
9375  
9376 else
9377   echo "$ac_t""no" 1>&6
9378 fi
9379 done
9380
9381
9382                         if test $ac_cv_func_sched_yield = no -a \
9383                                 $ac_cv_func_pthread_yield = no ; then
9384                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9385 echo "configure:9386: checking for sched_yield in -lrt" >&5
9386 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9387 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9388   echo $ac_n "(cached) $ac_c" 1>&6
9389 else
9390   ac_save_LIBS="$LIBS"
9391 LIBS="-lrt  $LIBS"
9392 cat > conftest.$ac_ext <<EOF
9393 #line 9394 "configure"
9394 #include "confdefs.h"
9395 /* Override any gcc2 internal prototype to avoid an error.  */
9396 /* We use char because int might match the return type of a gcc2
9397     builtin and then its argument prototype would still apply.  */
9398 char sched_yield();
9399
9400 int main() {
9401 sched_yield()
9402 ; return 0; }
9403 EOF
9404 if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=yes"
9407 else
9408   echo "configure: failed program was:" >&5
9409   cat conftest.$ac_ext >&5
9410   rm -rf conftest*
9411   eval "ac_cv_lib_$ac_lib_var=no"
9412 fi
9413 rm -f conftest*
9414 LIBS="$ac_save_LIBS"
9415
9416 fi
9417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9418   echo "$ac_t""yes" 1>&6
9419   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9420                                         cat >> confdefs.h <<\EOF
9421 #define HAVE_SCHED_YIELD 1
9422 EOF
9423
9424                                         ac_cv_func_sched_yield=yes
9425 else
9426   echo "$ac_t""no" 1>&6
9427 ac_cv_func_sched_yield=no
9428 fi
9429
9430                         fi
9431                         if test $ac_cv_func_sched_yield = no -a \
9432                                 $ac_cv_func_pthread_yield = no ; then
9433                                                                                                 for ac_func in thr_yield
9434 do
9435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9436 echo "configure:9437: checking for $ac_func" >&5
9437 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9438   echo $ac_n "(cached) $ac_c" 1>&6
9439 else
9440   cat > conftest.$ac_ext <<EOF
9441 #line 9442 "configure"
9442 #include "confdefs.h"
9443 /* System header to define __stub macros and hopefully few prototypes,
9444     which can conflict with char $ac_func(); below.  */
9445 #include <assert.h>
9446 /* Override any gcc2 internal prototype to avoid an error.  */
9447 /* We use char because int might match the return type of a gcc2
9448     builtin and then its argument prototype would still apply.  */
9449 char $ac_func();
9450 char (*f)();
9451
9452 int main() {
9453
9454 /* The GNU C library defines this for functions which it implements
9455     to always fail with ENOSYS.  Some functions are actually named
9456     something starting with __ and the normal name is an alias.  */
9457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9458 choke me
9459 #else
9460 f = $ac_func;
9461 #endif
9462
9463 ; return 0; }
9464 EOF
9465 if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9466   rm -rf conftest*
9467   eval "ac_cv_func_$ac_func=yes"
9468 else
9469   echo "configure: failed program was:" >&5
9470   cat conftest.$ac_ext >&5
9471   rm -rf conftest*
9472   eval "ac_cv_func_$ac_func=no"
9473 fi
9474 rm -f conftest*
9475 fi
9476
9477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9478   echo "$ac_t""yes" 1>&6
9479     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9480   cat >> confdefs.h <<EOF
9481 #define $ac_tr_func 1
9482 EOF
9483  
9484 else
9485   echo "$ac_t""no" 1>&6
9486 fi
9487 done
9488
9489                         fi
9490                         if test $ac_cv_func_sched_yield = no -a \
9491                                 $ac_cv_func_pthread_yield = no -a \
9492                                 "$ac_cv_func_thr_yield" = no ; then
9493                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9494                         fi
9495
9496                                                 for ac_func in pthread_kill
9497 do
9498 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9499 echo "configure:9500: checking for $ac_func" >&5
9500 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   cat > conftest.$ac_ext <<EOF
9504 #line 9505 "configure"
9505 #include "confdefs.h"
9506 /* System header to define __stub macros and hopefully few prototypes,
9507     which can conflict with char $ac_func(); below.  */
9508 #include <assert.h>
9509 /* Override any gcc2 internal prototype to avoid an error.  */
9510 /* We use char because int might match the return type of a gcc2
9511     builtin and then its argument prototype would still apply.  */
9512 char $ac_func();
9513 char (*f)();
9514
9515 int main() {
9516
9517 /* The GNU C library defines this for functions which it implements
9518     to always fail with ENOSYS.  Some functions are actually named
9519     something starting with __ and the normal name is an alias.  */
9520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9521 choke me
9522 #else
9523 f = $ac_func;
9524 #endif
9525
9526 ; return 0; }
9527 EOF
9528 if { (eval echo configure:9529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9529   rm -rf conftest*
9530   eval "ac_cv_func_$ac_func=yes"
9531 else
9532   echo "configure: failed program was:" >&5
9533   cat conftest.$ac_ext >&5
9534   rm -rf conftest*
9535   eval "ac_cv_func_$ac_func=no"
9536 fi
9537 rm -f conftest*
9538 fi
9539
9540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9541   echo "$ac_t""yes" 1>&6
9542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9543   cat >> confdefs.h <<EOF
9544 #define $ac_tr_func 1
9545 EOF
9546  
9547 else
9548   echo "$ac_t""no" 1>&6
9549 fi
9550 done
9551
9552
9553                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9554 echo "configure:9555: checking for pthread_detach with <pthread.h>" >&5
9555 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9556   echo $ac_n "(cached) $ac_c" 1>&6
9557 else
9558   
9559                                                                 cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562
9563 #include <pthread.h>
9564 #ifndef NULL
9565 #define NULL (void*)0
9566 #endif
9567
9568 int main() {
9569 pthread_detach(NULL);
9570 ; return 0; }
9571 EOF
9572 if { (eval echo configure:9573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9573   rm -rf conftest*
9574   ol_cv_func_pthread_detach=yes
9575 else
9576   echo "configure: failed program was:" >&5
9577   cat conftest.$ac_ext >&5
9578   rm -rf conftest*
9579   ol_cv_func_pthread_detach=no
9580 fi
9581 rm -f conftest*
9582                         
9583 fi
9584
9585 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9586
9587                         if test $ol_cv_func_pthread_detach = no ; then
9588                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9589                         fi
9590
9591                         cat >> confdefs.h <<\EOF
9592 #define HAVE_PTHREAD_DETACH 1
9593 EOF
9594
9595
9596                                                 for ac_func in \
9597                                 pthread_setconcurrency \
9598                                 pthread_getconcurrency \
9599                                 thr_setconcurrency \
9600                                 thr_getconcurrency \
9601                         
9602 do
9603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9604 echo "configure:9605: checking for $ac_func" >&5
9605 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608   cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 /* System header to define __stub macros and hopefully few prototypes,
9612     which can conflict with char $ac_func(); below.  */
9613 #include <assert.h>
9614 /* Override any gcc2 internal prototype to avoid an error.  */
9615 /* We use char because int might match the return type of a gcc2
9616     builtin and then its argument prototype would still apply.  */
9617 char $ac_func();
9618 char (*f)();
9619
9620 int main() {
9621
9622 /* The GNU C library defines this for functions which it implements
9623     to always fail with ENOSYS.  Some functions are actually named
9624     something starting with __ and the normal name is an alias.  */
9625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9626 choke me
9627 #else
9628 f = $ac_func;
9629 #endif
9630
9631 ; return 0; }
9632 EOF
9633 if { (eval echo configure:9634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9634   rm -rf conftest*
9635   eval "ac_cv_func_$ac_func=yes"
9636 else
9637   echo "configure: failed program was:" >&5
9638   cat conftest.$ac_ext >&5
9639   rm -rf conftest*
9640   eval "ac_cv_func_$ac_func=no"
9641 fi
9642 rm -f conftest*
9643 fi
9644
9645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9646   echo "$ac_t""yes" 1>&6
9647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9648   cat >> confdefs.h <<EOF
9649 #define $ac_tr_func 1
9650 EOF
9651  
9652 else
9653   echo "$ac_t""no" 1>&6
9654 fi
9655 done
9656
9657
9658                         
9659         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9660 echo "configure:9661: checking for pthread_kill_other_threads_np" >&5
9661 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667 /* System header to define __stub macros and hopefully few prototypes,
9668     which can conflict with char pthread_kill_other_threads_np(); below.  */
9669 #include <assert.h>
9670 /* Override any gcc2 internal prototype to avoid an error.  */
9671 /* We use char because int might match the return type of a gcc2
9672     builtin and then its argument prototype would still apply.  */
9673 char pthread_kill_other_threads_np();
9674 char (*f)();
9675
9676 int main() {
9677
9678 /* The GNU C library defines this for functions which it implements
9679     to always fail with ENOSYS.  Some functions are actually named
9680     something starting with __ and the normal name is an alias.  */
9681 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9682 choke me
9683 #else
9684 f = pthread_kill_other_threads_np;
9685 #endif
9686
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9690   rm -rf conftest*
9691   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695   rm -rf conftest*
9696   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9697 fi
9698 rm -f conftest*
9699 fi
9700
9701 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9702   echo "$ac_t""yes" 1>&6
9703   :
9704 else
9705   echo "$ac_t""no" 1>&6
9706 fi
9707
9708         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9709 echo "configure:9710: checking for LinuxThreads implementation" >&5
9710 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9711   echo $ac_n "(cached) $ac_c" 1>&6
9712 else
9713   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9714 fi
9715
9716 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9717
9718                         
9719         
9720         
9721         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9722 echo "configure:9723: checking for LinuxThreads consistency" >&5
9723 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9724   echo $ac_n "(cached) $ac_c" 1>&6
9725 else
9726   
9727                 if test $ol_cv_header_linux_threads = yes -a \
9728                         $ol_cv_sys_linux_threads = yes; then
9729                         ol_cv_linux_threads=yes
9730                 elif test $ol_cv_header_linux_threads = no -a \
9731                         $ol_cv_sys_linux_threads = no; then
9732                         ol_cv_linux_threads=no
9733                 else
9734                         ol_cv_linux_threads=error
9735                 fi
9736         
9737 fi
9738
9739 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9740
9741
9742                         if test $ol_cv_linux_threads = error; then
9743                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9744                         fi
9745
9746                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9747 echo "configure:9748: checking if pthread_create() works" >&5
9748 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   
9752                         if test "$cross_compiling" = yes; then
9753                                 ol_cv_pthread_create_works=yes
9754 else
9755   cat > conftest.$ac_ext <<EOF
9756 #line 9757 "configure"
9757 #include "confdefs.h"
9758 /* pthread test headers */
9759 #include <pthread.h>
9760 #ifndef NULL
9761 #define NULL (void*)0
9762 #endif
9763
9764 static void *task(p)
9765         void *p;
9766 {
9767         return (void *) (p == NULL);
9768 }
9769
9770
9771 int main(argc, argv)
9772         int argc;
9773         char **argv;
9774 {
9775
9776         /* pthread test function */
9777         pthread_t t;
9778         int status;
9779
9780         /* make sure pthread_create() isn't just a stub */
9781 #if HAVE_PTHREADS_D4
9782         status = pthread_create(&t, pthread_attr_default, task, NULL);
9783 #else
9784         status = pthread_create(&t, NULL, task, NULL);
9785 #endif
9786
9787         if( status ) exit( status );
9788
9789         /* make sure pthread_detach() isn't just a stub */
9790 #if HAVE_PTHREADS_D4
9791         status = pthread_detach( &t );
9792 #else
9793         status = pthread_detach( t );
9794 #endif
9795
9796 #ifdef HAVE_LINUX_THREADS
9797         pthread_kill_other_threads_np();
9798 #endif
9799
9800         exit( status );
9801
9802 }
9803
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9806 then
9807   ol_cv_pthread_create_works=yes
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811   rm -fr conftest*
9812   ol_cv_pthread_create_works=no
9813 fi
9814 rm -fr conftest*
9815 fi
9816
9817 fi
9818
9819 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9820
9821                         if test $ol_cv_pthread_create_works = no ; then
9822                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9823                         fi
9824
9825                                                 if test $ol_with_yielding_select = auto ; then
9826                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9827 echo "configure:9828: checking if select yields when using pthreads" >&5
9828 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9829   echo $ac_n "(cached) $ac_c" 1>&6
9830 else
9831   
9832                                 if test "$cross_compiling" = yes; then
9833   ol_cv_pthread_select_yields=cross
9834 else
9835   cat > conftest.$ac_ext <<EOF
9836 #line 9837 "configure"
9837 #include "confdefs.h"
9838
9839 #include <sys/types.h>
9840 #include <sys/time.h>
9841 #include <unistd.h>
9842 #include <pthread.h>
9843 #ifndef NULL
9844 #define NULL (void*) 0
9845 #endif
9846
9847 static int fildes[2];
9848
9849 static void *task(p)
9850         void *p;
9851 {
9852         int i;
9853         struct timeval tv;
9854
9855         fd_set rfds;
9856
9857         tv.tv_sec=10;
9858         tv.tv_usec=0;
9859
9860         FD_ZERO(&rfds);
9861         FD_SET(fildes[0], &rfds);
9862
9863         /* we're not interested in any fds */
9864         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9865
9866         if(i < 0) {
9867                 perror("select");
9868                 exit(10);
9869         }
9870
9871         exit(0); /* if we exit here, the select blocked the whole process */
9872 }
9873
9874 int main(argc, argv)
9875         int argc;
9876         char **argv;
9877 {
9878         pthread_t t;
9879
9880         /* create a pipe to select */
9881         if(pipe(&fildes[0])) {
9882                 perror("select");
9883                 exit(1);
9884         }
9885
9886 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9887         (void) pthread_setconcurrency(2);
9888 #else
9889 #ifdef HAVE_THR_SETCONCURRENCY
9890         /* Set Solaris LWP concurrency to 2 */
9891         thr_setconcurrency(2);
9892 #endif
9893 #endif
9894
9895 #if HAVE_PTHREADS_D4
9896         pthread_create(&t, pthread_attr_default, task, NULL);
9897 #else
9898         pthread_create(&t, NULL, task, NULL);
9899 #endif
9900
9901 #if HAVE_SCHED_YIELD
9902         sched_yield();  /* make sure task runs first */
9903 #else
9904 #ifdef HAVE_PTHREAD_YIELD
9905         pthread_yield();        /* make sure task runs first */
9906 #endif
9907 #endif
9908
9909         exit(2);
9910 }
9911 EOF
9912 if { (eval echo configure:9913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9913 then
9914   ol_cv_pthread_select_yields=no
9915 else
9916   echo "configure: failed program was:" >&5
9917   cat conftest.$ac_ext >&5
9918   rm -fr conftest*
9919   ol_cv_pthread_select_yields=yes
9920 fi
9921 rm -fr conftest*
9922 fi
9923
9924 fi
9925
9926 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9927
9928                                 if test $ol_cv_pthread_select_yields = cross ; then
9929                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9930                                 fi
9931
9932                                 if test $ol_cv_pthread_select_yields = yes ; then
9933                                         ol_with_yielding_select=yes
9934                                 fi
9935                         fi
9936
9937                                                 CPPFLAGS="$save_CPPFLAGS"
9938                         LIBS="$save_LIBS"
9939                 else
9940                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9941                 fi
9942         fi
9943
9944         if test $ol_with_threads = posix ; then
9945                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9946         fi
9947 fi
9948
9949 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9950         -o $ol_with_threads = mach ; then
9951
9952                 for ac_hdr in mach/cthreads.h
9953 do
9954 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9955 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9956 echo "configure:9957: checking for $ac_hdr" >&5
9957 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9958   echo $ac_n "(cached) $ac_c" 1>&6
9959 else
9960   cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 #include <$ac_hdr>
9964 EOF
9965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9966 { (eval echo configure:9967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9968 if test -z "$ac_err"; then
9969   rm -rf conftest*
9970   eval "ac_cv_header_$ac_safe=yes"
9971 else
9972   echo "$ac_err" >&5
9973   echo "configure: failed program was:" >&5
9974   cat conftest.$ac_ext >&5
9975   rm -rf conftest*
9976   eval "ac_cv_header_$ac_safe=no"
9977 fi
9978 rm -f conftest*
9979 fi
9980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9981   echo "$ac_t""yes" 1>&6
9982     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9983   cat >> confdefs.h <<EOF
9984 #define $ac_tr_hdr 1
9985 EOF
9986  
9987 else
9988   echo "$ac_t""no" 1>&6
9989 fi
9990 done
9991
9992         if test $ac_cv_header_mach_cthreads_h = yes ; then
9993                 ol_with_threads=found
9994
9995                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9996 echo "configure:9997: checking for cthread_fork" >&5
9997 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9998   echo $ac_n "(cached) $ac_c" 1>&6
9999 else
10000   cat > conftest.$ac_ext <<EOF
10001 #line 10002 "configure"
10002 #include "confdefs.h"
10003 /* System header to define __stub macros and hopefully few prototypes,
10004     which can conflict with char cthread_fork(); below.  */
10005 #include <assert.h>
10006 /* Override any gcc2 internal prototype to avoid an error.  */
10007 /* We use char because int might match the return type of a gcc2
10008     builtin and then its argument prototype would still apply.  */
10009 char cthread_fork();
10010 char (*f)();
10011
10012 int main() {
10013
10014 /* The GNU C library defines this for functions which it implements
10015     to always fail with ENOSYS.  Some functions are actually named
10016     something starting with __ and the normal name is an alias.  */
10017 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10018 choke me
10019 #else
10020 f = cthread_fork;
10021 #endif
10022
10023 ; return 0; }
10024 EOF
10025 if { (eval echo configure:10026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10026   rm -rf conftest*
10027   eval "ac_cv_func_cthread_fork=yes"
10028 else
10029   echo "configure: failed program was:" >&5
10030   cat conftest.$ac_ext >&5
10031   rm -rf conftest*
10032   eval "ac_cv_func_cthread_fork=no"
10033 fi
10034 rm -f conftest*
10035 fi
10036
10037 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10038   echo "$ac_t""yes" 1>&6
10039   ol_link_threads=yes
10040 else
10041   echo "$ac_t""no" 1>&6
10042 fi
10043
10044
10045                 if test $ol_link_threads = no ; then
10046                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10047 echo "configure:10048: checking for cthread_fork with -all_load" >&5
10048 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   
10052                                                                 save_LIBS="$LIBS"
10053                                 LIBS="-all_load $LIBS"
10054                                 cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057 #include <mach/cthreads.h>
10058 int main() {
10059
10060                                         cthread_fork((void *)0, (void *)0);
10061                                         
10062 ; return 0; }
10063 EOF
10064 if { (eval echo configure:10065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10065   rm -rf conftest*
10066   ol_cv_cthread_all_load=yes
10067 else
10068   echo "configure: failed program was:" >&5
10069   cat conftest.$ac_ext >&5
10070   rm -rf conftest*
10071   ol_cv_cthread_all_load=no
10072 fi
10073 rm -f conftest*
10074                                                                 LIBS="$save_LIBS"
10075                         
10076 fi
10077
10078 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10079
10080                         if test $ol_cv_cthread_all_load = yes ; then
10081                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10082                                 ol_link_threads=mach
10083                         fi
10084                 fi
10085
10086                 if test $ol_link_threads != no ; then
10087                         : check for cthread specific functionality here
10088                         cat >> confdefs.h <<\EOF
10089 #define HAVE_MACH_CTHREADS 1
10090 EOF
10091
10092                 else
10093                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10094                 fi
10095         fi
10096
10097         if test $ol_with_threads = mach ; then
10098                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10099         fi
10100 fi
10101
10102 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10103         -o $ol_with_threads = pth ; then
10104
10105         for ac_hdr in pth.h
10106 do
10107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10109 echo "configure:10110: checking for $ac_hdr" >&5
10110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 #include <$ac_hdr>
10117 EOF
10118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10119 { (eval echo configure:10120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10121 if test -z "$ac_err"; then
10122   rm -rf conftest*
10123   eval "ac_cv_header_$ac_safe=yes"
10124 else
10125   echo "$ac_err" >&5
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_header_$ac_safe=no"
10130 fi
10131 rm -f conftest*
10132 fi
10133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10134   echo "$ac_t""yes" 1>&6
10135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10136   cat >> confdefs.h <<EOF
10137 #define $ac_tr_hdr 1
10138 EOF
10139  
10140 else
10141   echo "$ac_t""no" 1>&6
10142 fi
10143 done
10144
10145
10146         if test $ac_cv_header_pth_h = yes ; then
10147                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10148 echo "configure:10149: checking for pth_version in -lpth" >&5
10149 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10151   echo $ac_n "(cached) $ac_c" 1>&6
10152 else
10153   ac_save_LIBS="$LIBS"
10154 LIBS="-lpth  $LIBS"
10155 cat > conftest.$ac_ext <<EOF
10156 #line 10157 "configure"
10157 #include "confdefs.h"
10158 /* Override any gcc2 internal prototype to avoid an error.  */
10159 /* We use char because int might match the return type of a gcc2
10160     builtin and then its argument prototype would still apply.  */
10161 char pth_version();
10162
10163 int main() {
10164 pth_version()
10165 ; return 0; }
10166 EOF
10167 if { (eval echo configure:10168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10168   rm -rf conftest*
10169   eval "ac_cv_lib_$ac_lib_var=yes"
10170 else
10171   echo "configure: failed program was:" >&5
10172   cat conftest.$ac_ext >&5
10173   rm -rf conftest*
10174   eval "ac_cv_lib_$ac_lib_var=no"
10175 fi
10176 rm -f conftest*
10177 LIBS="$ac_save_LIBS"
10178
10179 fi
10180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10181   echo "$ac_t""yes" 1>&6
10182   have_pth=yes
10183 else
10184   echo "$ac_t""no" 1>&6
10185 have_pth=no
10186 fi
10187
10188
10189                 if test $have_pth = yes ; then
10190                         cat >> confdefs.h <<\EOF
10191 #define HAVE_GNU_PTH 1
10192 EOF
10193
10194                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10195                         ol_link_threads=pth
10196
10197                         if test $ol_with_yielding_select = auto ; then
10198                                 ol_with_yielding_select=yes
10199                         fi
10200                 fi
10201         fi
10202 fi
10203
10204 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10205         -o $ol_with_threads = lwp ; then
10206
10207                 for ac_hdr in thread.h synch.h
10208 do
10209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10211 echo "configure:10212: checking for $ac_hdr" >&5
10212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10213   echo $ac_n "(cached) $ac_c" 1>&6
10214 else
10215   cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218 #include <$ac_hdr>
10219 EOF
10220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10221 { (eval echo configure:10222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10223 if test -z "$ac_err"; then
10224   rm -rf conftest*
10225   eval "ac_cv_header_$ac_safe=yes"
10226 else
10227   echo "$ac_err" >&5
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230   rm -rf conftest*
10231   eval "ac_cv_header_$ac_safe=no"
10232 fi
10233 rm -f conftest*
10234 fi
10235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10236   echo "$ac_t""yes" 1>&6
10237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10238   cat >> confdefs.h <<EOF
10239 #define $ac_tr_hdr 1
10240 EOF
10241  
10242 else
10243   echo "$ac_t""no" 1>&6
10244 fi
10245 done
10246
10247         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10248                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10249 echo "configure:10250: checking for thr_create in -lthread" >&5
10250 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10252   echo $ac_n "(cached) $ac_c" 1>&6
10253 else
10254   ac_save_LIBS="$LIBS"
10255 LIBS="-lthread  $LIBS"
10256 cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 /* Override any gcc2 internal prototype to avoid an error.  */
10260 /* We use char because int might match the return type of a gcc2
10261     builtin and then its argument prototype would still apply.  */
10262 char thr_create();
10263
10264 int main() {
10265 thr_create()
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10269   rm -rf conftest*
10270   eval "ac_cv_lib_$ac_lib_var=yes"
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_lib_$ac_lib_var=no"
10276 fi
10277 rm -f conftest*
10278 LIBS="$ac_save_LIBS"
10279
10280 fi
10281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10282   echo "$ac_t""yes" 1>&6
10283   have_thr=yes
10284 else
10285   echo "$ac_t""no" 1>&6
10286 have_thr=no
10287 fi
10288
10289
10290                 if test $have_thr = yes ; then
10291                         cat >> confdefs.h <<\EOF
10292 #define HAVE_THR 1
10293 EOF
10294
10295                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10296                         ol_link_threads=thr
10297
10298                         if test $ol_with_yielding_select = auto ; then
10299                                 ol_with_yielding_select=yes
10300                         fi
10301
10302                                                 for ac_func in \
10303                                 thr_setconcurrency \
10304                                 thr_getconcurrency \
10305                         
10306 do
10307 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10308 echo "configure:10309: checking for $ac_func" >&5
10309 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10310   echo $ac_n "(cached) $ac_c" 1>&6
10311 else
10312   cat > conftest.$ac_ext <<EOF
10313 #line 10314 "configure"
10314 #include "confdefs.h"
10315 /* System header to define __stub macros and hopefully few prototypes,
10316     which can conflict with char $ac_func(); below.  */
10317 #include <assert.h>
10318 /* Override any gcc2 internal prototype to avoid an error.  */
10319 /* We use char because int might match the return type of a gcc2
10320     builtin and then its argument prototype would still apply.  */
10321 char $ac_func();
10322 char (*f)();
10323
10324 int main() {
10325
10326 /* The GNU C library defines this for functions which it implements
10327     to always fail with ENOSYS.  Some functions are actually named
10328     something starting with __ and the normal name is an alias.  */
10329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10330 choke me
10331 #else
10332 f = $ac_func;
10333 #endif
10334
10335 ; return 0; }
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10338   rm -rf conftest*
10339   eval "ac_cv_func_$ac_func=yes"
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -rf conftest*
10344   eval "ac_cv_func_$ac_func=no"
10345 fi
10346 rm -f conftest*
10347 fi
10348
10349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10352   cat >> confdefs.h <<EOF
10353 #define $ac_tr_func 1
10354 EOF
10355  
10356 else
10357   echo "$ac_t""no" 1>&6
10358 fi
10359 done
10360
10361                 fi
10362         fi
10363
10364                 for ac_hdr in lwp/lwp.h
10365 do
10366 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10367 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10368 echo "configure:10369: checking for $ac_hdr" >&5
10369 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10370   echo $ac_n "(cached) $ac_c" 1>&6
10371 else
10372   cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375 #include <$ac_hdr>
10376 EOF
10377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10378 { (eval echo configure:10379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10380 if test -z "$ac_err"; then
10381   rm -rf conftest*
10382   eval "ac_cv_header_$ac_safe=yes"
10383 else
10384   echo "$ac_err" >&5
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_header_$ac_safe=no"
10389 fi
10390 rm -f conftest*
10391 fi
10392 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10393   echo "$ac_t""yes" 1>&6
10394     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10395   cat >> confdefs.h <<EOF
10396 #define $ac_tr_hdr 1
10397 EOF
10398  
10399 else
10400   echo "$ac_t""no" 1>&6
10401 fi
10402 done
10403
10404         if test $ac_cv_header_lwp_lwp_h = yes ; then
10405                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10406 echo "configure:10407: checking for lwp_create in -llwp" >&5
10407 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10408 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10409   echo $ac_n "(cached) $ac_c" 1>&6
10410 else
10411   ac_save_LIBS="$LIBS"
10412 LIBS="-llwp  $LIBS"
10413 cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416 /* Override any gcc2 internal prototype to avoid an error.  */
10417 /* We use char because int might match the return type of a gcc2
10418     builtin and then its argument prototype would still apply.  */
10419 char lwp_create();
10420
10421 int main() {
10422 lwp_create()
10423 ; return 0; }
10424 EOF
10425 if { (eval echo configure:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10426   rm -rf conftest*
10427   eval "ac_cv_lib_$ac_lib_var=yes"
10428 else
10429   echo "configure: failed program was:" >&5
10430   cat conftest.$ac_ext >&5
10431   rm -rf conftest*
10432   eval "ac_cv_lib_$ac_lib_var=no"
10433 fi
10434 rm -f conftest*
10435 LIBS="$ac_save_LIBS"
10436
10437 fi
10438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10439   echo "$ac_t""yes" 1>&6
10440   have_lwp=yes
10441 else
10442   echo "$ac_t""no" 1>&6
10443 have_lwp=no
10444 fi
10445
10446
10447                 if test $have_lwp = yes ; then
10448                         cat >> confdefs.h <<\EOF
10449 #define HAVE_LWP 1
10450 EOF
10451
10452                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10453                         ol_link_threads=lwp
10454
10455                         if test $ol_with_yielding_select = auto ; then
10456                                 ol_with_yielding_select=no
10457                         fi
10458                 fi
10459         fi
10460 fi
10461
10462 if test $ol_with_yielding_select = yes ; then
10463         cat >> confdefs.h <<\EOF
10464 #define HAVE_YIELDING_SELECT 1
10465 EOF
10466
10467 fi
10468
10469 if test $ol_with_threads = manual ; then
10470                 ol_link_threads=yes
10471
10472         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10473
10474         for ac_hdr in pthread.h sched.h
10475 do
10476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10478 echo "configure:10479: checking for $ac_hdr" >&5
10479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485 #include <$ac_hdr>
10486 EOF
10487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10488 { (eval echo configure:10489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10490 if test -z "$ac_err"; then
10491   rm -rf conftest*
10492   eval "ac_cv_header_$ac_safe=yes"
10493 else
10494   echo "$ac_err" >&5
10495   echo "configure: failed program was:" >&5
10496   cat conftest.$ac_ext >&5
10497   rm -rf conftest*
10498   eval "ac_cv_header_$ac_safe=no"
10499 fi
10500 rm -f conftest*
10501 fi
10502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10503   echo "$ac_t""yes" 1>&6
10504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10505   cat >> confdefs.h <<EOF
10506 #define $ac_tr_hdr 1
10507 EOF
10508  
10509 else
10510   echo "$ac_t""no" 1>&6
10511 fi
10512 done
10513
10514         for ac_func in sched_yield pthread_yield
10515 do
10516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10517 echo "configure:10518: checking for $ac_func" >&5
10518 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   cat > conftest.$ac_ext <<EOF
10522 #line 10523 "configure"
10523 #include "confdefs.h"
10524 /* System header to define __stub macros and hopefully few prototypes,
10525     which can conflict with char $ac_func(); below.  */
10526 #include <assert.h>
10527 /* Override any gcc2 internal prototype to avoid an error.  */
10528 /* We use char because int might match the return type of a gcc2
10529     builtin and then its argument prototype would still apply.  */
10530 char $ac_func();
10531 char (*f)();
10532
10533 int main() {
10534
10535 /* The GNU C library defines this for functions which it implements
10536     to always fail with ENOSYS.  Some functions are actually named
10537     something starting with __ and the normal name is an alias.  */
10538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10539 choke me
10540 #else
10541 f = $ac_func;
10542 #endif
10543
10544 ; return 0; }
10545 EOF
10546 if { (eval echo configure:10547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10547   rm -rf conftest*
10548   eval "ac_cv_func_$ac_func=yes"
10549 else
10550   echo "configure: failed program was:" >&5
10551   cat conftest.$ac_ext >&5
10552   rm -rf conftest*
10553   eval "ac_cv_func_$ac_func=no"
10554 fi
10555 rm -f conftest*
10556 fi
10557
10558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10559   echo "$ac_t""yes" 1>&6
10560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10561   cat >> confdefs.h <<EOF
10562 #define $ac_tr_func 1
10563 EOF
10564  
10565 else
10566   echo "$ac_t""no" 1>&6
10567 fi
10568 done
10569
10570         
10571         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10572 echo "configure:10573: checking for LinuxThreads pthread.h" >&5
10573 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10574   echo $ac_n "(cached) $ac_c" 1>&6
10575 else
10576   cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579 #include <pthread.h>
10580 EOF
10581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10582   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10583   rm -rf conftest*
10584   ol_cv_header_linux_threads=yes
10585 else
10586   rm -rf conftest*
10587   ol_cv_header_linux_threads=no
10588 fi
10589 rm -f conftest*
10590
10591                 
10592 fi
10593
10594 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10595         if test $ol_cv_header_linux_threads = yes; then
10596                 cat >> confdefs.h <<\EOF
10597 #define HAVE_LINUX_THREADS 1
10598 EOF
10599
10600         fi
10601
10602
10603         for ac_hdr in mach/cthreads.h
10604 do
10605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10607 echo "configure:10608: checking for $ac_hdr" >&5
10608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10609   echo $ac_n "(cached) $ac_c" 1>&6
10610 else
10611   cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 #include <$ac_hdr>
10615 EOF
10616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10617 { (eval echo configure:10618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10619 if test -z "$ac_err"; then
10620   rm -rf conftest*
10621   eval "ac_cv_header_$ac_safe=yes"
10622 else
10623   echo "$ac_err" >&5
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_header_$ac_safe=no"
10628 fi
10629 rm -f conftest*
10630 fi
10631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10634   cat >> confdefs.h <<EOF
10635 #define $ac_tr_hdr 1
10636 EOF
10637  
10638 else
10639   echo "$ac_t""no" 1>&6
10640 fi
10641 done
10642
10643         for ac_hdr in lwp/lwp.h
10644 do
10645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10647 echo "configure:10648: checking for $ac_hdr" >&5
10648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654 #include <$ac_hdr>
10655 EOF
10656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10657 { (eval echo configure:10658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10659 if test -z "$ac_err"; then
10660   rm -rf conftest*
10661   eval "ac_cv_header_$ac_safe=yes"
10662 else
10663   echo "$ac_err" >&5
10664   echo "configure: failed program was:" >&5
10665   cat conftest.$ac_ext >&5
10666   rm -rf conftest*
10667   eval "ac_cv_header_$ac_safe=no"
10668 fi
10669 rm -f conftest*
10670 fi
10671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10672   echo "$ac_t""yes" 1>&6
10673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10674   cat >> confdefs.h <<EOF
10675 #define $ac_tr_hdr 1
10676 EOF
10677  
10678 else
10679   echo "$ac_t""no" 1>&6
10680 fi
10681 done
10682
10683         for ac_hdr in thread.h synch.h
10684 do
10685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10687 echo "configure:10688: checking for $ac_hdr" >&5
10688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10689   echo $ac_n "(cached) $ac_c" 1>&6
10690 else
10691   cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694 #include <$ac_hdr>
10695 EOF
10696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10697 { (eval echo configure:10698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10699 if test -z "$ac_err"; then
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=yes"
10702 else
10703   echo "$ac_err" >&5
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -rf conftest*
10707   eval "ac_cv_header_$ac_safe=no"
10708 fi
10709 rm -f conftest*
10710 fi
10711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10712   echo "$ac_t""yes" 1>&6
10713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10714   cat >> confdefs.h <<EOF
10715 #define $ac_tr_hdr 1
10716 EOF
10717  
10718 else
10719   echo "$ac_t""no" 1>&6
10720 fi
10721 done
10722
10723 fi
10724
10725 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10726                         cat >> confdefs.h <<\EOF
10727 #define REENTRANT 1
10728 EOF
10729
10730         cat >> confdefs.h <<\EOF
10731 #define _REENTRANT 1
10732 EOF
10733
10734         cat >> confdefs.h <<\EOF
10735 #define THREAD_SAFE 1
10736 EOF
10737
10738         cat >> confdefs.h <<\EOF
10739 #define _THREAD_SAFE 1
10740 EOF
10741
10742         cat >> confdefs.h <<\EOF
10743 #define THREADSAFE 1
10744 EOF
10745
10746         cat >> confdefs.h <<\EOF
10747 #define _THREADSAFE 1
10748 EOF
10749
10750         cat >> confdefs.h <<\EOF
10751 #define _SGI_MP_SOURCE 1
10752 EOF
10753
10754
10755                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10756 echo "configure:10757: checking for thread specific errno" >&5
10757 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10758   echo $ac_n "(cached) $ac_c" 1>&6
10759 else
10760   
10761                 cat > conftest.$ac_ext <<EOF
10762 #line 10763 "configure"
10763 #include "confdefs.h"
10764 #include <errno.h>
10765 int main() {
10766 errno = 0;
10767 ; return 0; }
10768 EOF
10769 if { (eval echo configure:10770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10770   rm -rf conftest*
10771   ol_cv_errno_thread_specific=yes
10772 else
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   ol_cv_errno_thread_specific=no
10777 fi
10778 rm -f conftest*
10779         
10780 fi
10781
10782 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10783
10784                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10785 echo "configure:10786: checking for thread specific h_errno" >&5
10786 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10787   echo $ac_n "(cached) $ac_c" 1>&6
10788 else
10789   
10790                 cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <netdb.h>
10794 int main() {
10795 h_errno = 0;
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   ol_cv_h_errno_thread_specific=yes
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   ol_cv_h_errno_thread_specific=no
10806 fi
10807 rm -f conftest*
10808         
10809 fi
10810
10811 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10812
10813         if test $ol_cv_errno_thread_specific != yes \
10814                 -o $ol_cv_h_errno_thread_specific != yes ; then
10815                 LIBS="$LTHREAD_LIBS $LIBS"
10816                 LTHREAD_LIBS=""
10817         fi
10818
10819 fi  
10820
10821 if test $ol_link_threads = no ; then
10822         if test $ol_with_threads = yes ; then
10823                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10824         fi
10825
10826         if test $ol_with_threads = auto ; then
10827                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10828                 ol_with_threads=no
10829         fi
10830
10831         cat >> confdefs.h <<\EOF
10832 #define NO_THREADS 1
10833 EOF
10834
10835         LTHREAD_LIBS=""
10836 fi
10837
10838 if test $ol_link_threads != no ; then
10839         cat >> confdefs.h <<\EOF
10840 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10841 EOF
10842
10843 fi
10844
10845
10846 ol_link_ldbm=no 
10847 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10848         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10849 echo "configure:10850: checking for DB2 library" >&5
10850 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853         ol_LIBS="$LIBS"
10854         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10855 echo "configure:10856: checking for db_appexit in -ldb" >&5
10856 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10857 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10858   echo $ac_n "(cached) $ac_c" 1>&6
10859 else
10860   ac_save_LIBS="$LIBS"
10861 LIBS="-ldb  $LIBS"
10862 cat > conftest.$ac_ext <<EOF
10863 #line 10864 "configure"
10864 #include "confdefs.h"
10865 /* Override any gcc2 internal prototype to avoid an error.  */
10866 /* We use char because int might match the return type of a gcc2
10867     builtin and then its argument prototype would still apply.  */
10868 char db_appexit();
10869
10870 int main() {
10871 db_appexit()
10872 ; return 0; }
10873 EOF
10874 if { (eval echo configure:10875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10875   rm -rf conftest*
10876   eval "ac_cv_lib_$ac_lib_var=yes"
10877 else
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -rf conftest*
10881   eval "ac_cv_lib_$ac_lib_var=no"
10882 fi
10883 rm -f conftest*
10884 LIBS="$ac_save_LIBS"
10885
10886 fi
10887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10888   echo "$ac_t""yes" 1>&6
10889   ol_cv_lib_db2=-ldb
10890 else
10891   echo "$ac_t""no" 1>&6
10892 ol_cv_lib_db2=no
10893 fi
10894
10895         LIBS="$ol_LIBS"
10896
10897 fi
10898
10899 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10900
10901 for ac_hdr in db.h
10902 do
10903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10905 echo "configure:10906: checking for $ac_hdr" >&5
10906 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10907   echo $ac_n "(cached) $ac_c" 1>&6
10908 else
10909   cat > conftest.$ac_ext <<EOF
10910 #line 10911 "configure"
10911 #include "confdefs.h"
10912 #include <$ac_hdr>
10913 EOF
10914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10915 { (eval echo configure:10916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10917 if test -z "$ac_err"; then
10918   rm -rf conftest*
10919   eval "ac_cv_header_$ac_safe=yes"
10920 else
10921   echo "$ac_err" >&5
10922   echo "configure: failed program was:" >&5
10923   cat conftest.$ac_ext >&5
10924   rm -rf conftest*
10925   eval "ac_cv_header_$ac_safe=no"
10926 fi
10927 rm -f conftest*
10928 fi
10929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10930   echo "$ac_t""yes" 1>&6
10931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10932   cat >> confdefs.h <<EOF
10933 #define $ac_tr_hdr 1
10934 EOF
10935  
10936 else
10937   echo "$ac_t""no" 1>&6
10938 fi
10939 done
10940
10941 if test $ac_cv_header_db_h = yes ; then
10942         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10943 echo "configure:10944: checking if db.h is DB2" >&5
10944 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10945   echo $ac_n "(cached) $ac_c" 1>&6
10946 else
10947   
10948                 cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951
10952 #                       include <db.h>
10953                         /* this check could be improved */
10954 #                       ifdef DB_VERSION_MAJOR
10955 #                               if DB_VERSION_MAJOR == 2
10956                                         __db_version_2;
10957 #                               endif
10958 #                       endif
10959                 
10960 EOF
10961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10962   egrep "__db_version_2" >/dev/null 2>&1; then
10963   rm -rf conftest*
10964   ol_cv_header_db2=yes
10965 else
10966   rm -rf conftest*
10967   ol_cv_header_db2=no
10968 fi
10969 rm -f conftest*
10970
10971 fi
10972
10973 echo "$ac_t""$ol_cv_header_db2" 1>&6
10974 else
10975         ol_cv_header_db2=no
10976 fi
10977
10978
10979  
10980  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10981 echo "configure:10982: checking for Berkeley DB2" >&5
10982 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10983   echo $ac_n "(cached) $ac_c" 1>&6
10984 else
10985   
10986         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10987                 ol_cv_berkeley_db2=no
10988         else
10989                 ol_cv_berkeley_db2=yes
10990         fi
10991
10992 fi
10993
10994 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10995  if test $ol_cv_berkeley_db2 = yes ; then
10996         cat >> confdefs.h <<\EOF
10997 #define HAVE_BERKELEY_DB2 1
10998 EOF
10999
11000  fi
11001
11002
11003         if test $ol_cv_berkeley_db2 = yes ; then
11004                 ol_link_ldbm=db2
11005                 ol_with_ldbm_api=db2
11006
11007                 if test $ol_with_ldbm_type = hash ; then
11008                         cat >> confdefs.h <<\EOF
11009 #define LDBM_USE_DBHASH 1
11010 EOF
11011
11012                 else
11013                         cat >> confdefs.h <<\EOF
11014 #define LDBM_USE_DBBTREE 1
11015 EOF
11016
11017                 fi
11018
11019                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11020 echo "configure:11021: checking for DB_THREAD support" >&5
11021 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   
11025         ol_LIBS="$LIBS"
11026         if test $ol_cv_lib_db2 != yes ; then
11027                 LIBS="$ol_cv_lib_db2"
11028         fi
11029
11030         if test "$cross_compiling" = yes; then
11031   ol_cv_berkeley_db2_db_thread=cross
11032 else
11033   cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036
11037 #include <db.h>
11038 #ifndef NULL
11039 #define NULL ((void *)0)
11040 #endif
11041 main()
11042 {
11043         int rc;
11044         DB_ENV env;
11045         u_int32_t flags = DB_CREATE | DB_THREAD;
11046
11047         memset( &env, '\0', sizeof(env) );
11048
11049         rc = db_appinit( NULL, NULL, &env, flags );
11050
11051         if( rc == 0 ) {
11052                 db_appexit( &env );
11053         }
11054
11055         return rc;
11056 }
11057 EOF
11058 if { (eval echo configure:11059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11059 then
11060   ol_cv_berkeley_db2_db_thread=yes
11061 else
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -fr conftest*
11065   ol_cv_berkeley_db2_db_thread=no
11066 fi
11067 rm -fr conftest*
11068 fi
11069
11070
11071         LIBS="$ol_LIBS"
11072
11073         if test $ol_cv_berkeley_db2_db_thread != no ; then
11074                 cat >> confdefs.h <<\EOF
11075 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11076 EOF
11077
11078         fi
11079
11080 fi
11081
11082 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11083
11084                                                 if test $ol_cv_lib_db2 != yes ; then
11085                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11086                 fi
11087         fi
11088 fi
11089
11090 ol_link_bdb2=no
11091 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11092         if test $ol_cv_berkeley_db2_db_thread != no ; then
11093                 ol_link_bdb2=yes
11094         else
11095                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11096         fi
11097 fi
11098
11099 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11100         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11101 echo "configure:11102: checking for Berkeley DB library" >&5
11102 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11103   echo $ac_n "(cached) $ac_c" 1>&6
11104 else
11105   
11106         for ac_hdr in db1/db.h
11107 do
11108 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11109 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11110 echo "configure:11111: checking for $ac_hdr" >&5
11111 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117 #include <$ac_hdr>
11118 EOF
11119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11120 { (eval echo configure:11121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11122 if test -z "$ac_err"; then
11123   rm -rf conftest*
11124   eval "ac_cv_header_$ac_safe=yes"
11125 else
11126   echo "$ac_err" >&5
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_header_$ac_safe=no"
11131 fi
11132 rm -f conftest*
11133 fi
11134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11135   echo "$ac_t""yes" 1>&6
11136     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11137   cat >> confdefs.h <<EOF
11138 #define $ac_tr_hdr 1
11139 EOF
11140  
11141 else
11142   echo "$ac_t""no" 1>&6
11143 fi
11144 done
11145
11146         ol_LIBS="$LIBS"
11147         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11148 echo "configure:11149: checking for dbopen" >&5
11149 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 /* System header to define __stub macros and hopefully few prototypes,
11156     which can conflict with char dbopen(); below.  */
11157 #include <assert.h>
11158 /* Override any gcc2 internal prototype to avoid an error.  */
11159 /* We use char because int might match the return type of a gcc2
11160     builtin and then its argument prototype would still apply.  */
11161 char dbopen();
11162 char (*f)();
11163
11164 int main() {
11165
11166 /* The GNU C library defines this for functions which it implements
11167     to always fail with ENOSYS.  Some functions are actually named
11168     something starting with __ and the normal name is an alias.  */
11169 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11170 choke me
11171 #else
11172 f = dbopen;
11173 #endif
11174
11175 ; return 0; }
11176 EOF
11177 if { (eval echo configure:11178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11178   rm -rf conftest*
11179   eval "ac_cv_func_dbopen=yes"
11180 else
11181   echo "configure: failed program was:" >&5
11182   cat conftest.$ac_ext >&5
11183   rm -rf conftest*
11184   eval "ac_cv_func_dbopen=no"
11185 fi
11186 rm -f conftest*
11187 fi
11188
11189 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11190   echo "$ac_t""yes" 1>&6
11191   ol_cv_lib_db=yes
11192 else
11193   echo "$ac_t""no" 1>&6
11194
11195                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11196 echo "configure:11197: checking for dbopen in -ldb1" >&5
11197 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11198 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11199   echo $ac_n "(cached) $ac_c" 1>&6
11200 else
11201   ac_save_LIBS="$LIBS"
11202 LIBS="-ldb1  $LIBS"
11203 cat > conftest.$ac_ext <<EOF
11204 #line 11205 "configure"
11205 #include "confdefs.h"
11206 /* Override any gcc2 internal prototype to avoid an error.  */
11207 /* We use char because int might match the return type of a gcc2
11208     builtin and then its argument prototype would still apply.  */
11209 char dbopen();
11210
11211 int main() {
11212 dbopen()
11213 ; return 0; }
11214 EOF
11215 if { (eval echo configure:11216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11216   rm -rf conftest*
11217   eval "ac_cv_lib_$ac_lib_var=yes"
11218 else
11219   echo "configure: failed program was:" >&5
11220   cat conftest.$ac_ext >&5
11221   rm -rf conftest*
11222   eval "ac_cv_lib_$ac_lib_var=no"
11223 fi
11224 rm -f conftest*
11225 LIBS="$ac_save_LIBS"
11226
11227 fi
11228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11229   echo "$ac_t""yes" 1>&6
11230   ol_cv_lib_db=-ldb1
11231 else
11232   echo "$ac_t""no" 1>&6
11233
11234                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11235 echo "configure:11236: checking for dbopen in -ldb" >&5
11236 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11238   echo $ac_n "(cached) $ac_c" 1>&6
11239 else
11240   ac_save_LIBS="$LIBS"
11241 LIBS="-ldb  $LIBS"
11242 cat > conftest.$ac_ext <<EOF
11243 #line 11244 "configure"
11244 #include "confdefs.h"
11245 /* Override any gcc2 internal prototype to avoid an error.  */
11246 /* We use char because int might match the return type of a gcc2
11247     builtin and then its argument prototype would still apply.  */
11248 char dbopen();
11249
11250 int main() {
11251 dbopen()
11252 ; return 0; }
11253 EOF
11254 if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11255   rm -rf conftest*
11256   eval "ac_cv_lib_$ac_lib_var=yes"
11257 else
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_lib_$ac_lib_var=no"
11262 fi
11263 rm -f conftest*
11264 LIBS="$ac_save_LIBS"
11265
11266 fi
11267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11268   echo "$ac_t""yes" 1>&6
11269   ol_cv_lib_db=-ldb
11270 else
11271   echo "$ac_t""no" 1>&6
11272 ol_cv_lib_db=no
11273 fi
11274
11275                 
11276 fi
11277
11278         
11279 fi
11280
11281         LIBS="$ol_LIBS"
11282
11283 fi
11284
11285 echo "$ac_t""$ol_cv_lib_db" 1>&6
11286
11287
11288 for ac_hdr in db_185.h
11289 do
11290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11292 echo "configure:11293: checking for $ac_hdr" >&5
11293 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11294   echo $ac_n "(cached) $ac_c" 1>&6
11295 else
11296   cat > conftest.$ac_ext <<EOF
11297 #line 11298 "configure"
11298 #include "confdefs.h"
11299 #include <$ac_hdr>
11300 EOF
11301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11302 { (eval echo configure:11303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11304 if test -z "$ac_err"; then
11305   rm -rf conftest*
11306   eval "ac_cv_header_$ac_safe=yes"
11307 else
11308   echo "$ac_err" >&5
11309   echo "configure: failed program was:" >&5
11310   cat conftest.$ac_ext >&5
11311   rm -rf conftest*
11312   eval "ac_cv_header_$ac_safe=no"
11313 fi
11314 rm -f conftest*
11315 fi
11316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11317   echo "$ac_t""yes" 1>&6
11318     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11319   cat >> confdefs.h <<EOF
11320 #define $ac_tr_hdr 1
11321 EOF
11322  
11323 else
11324   echo "$ac_t""no" 1>&6
11325 fi
11326 done
11327
11328 if test "$ol_cv_header_db2" = yes ; then
11329         
11330         ol_cv_header_db=$ac_cv_header_db_185_h
11331 else
11332         ol_cv_header_db=$ac_cv_header_db_h
11333 fi
11334
11335
11336  
11337  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11338 echo "configure:11339: checking for Berkeley DB" >&5
11339 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   
11343         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11344                 ol_cv_berkeley_db=no
11345         else
11346                 ol_cv_berkeley_db=yes
11347         fi
11348
11349 fi
11350
11351 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11352  if test $ol_cv_berkeley_db = yes ; then
11353         cat >> confdefs.h <<\EOF
11354 #define HAVE_BERKELEY_DB 1
11355 EOF
11356
11357  fi
11358
11359
11360         if test $ol_cv_berkeley_db = yes ; then
11361                 ol_link_ldbm=db
11362                 ol_with_ldbm_api=db
11363
11364                 if test $ol_with_ldbm_type = hash ; then
11365                         cat >> confdefs.h <<\EOF
11366 #define LDBM_USE_DBHASH 1
11367 EOF
11368
11369                 else
11370                         cat >> confdefs.h <<\EOF
11371 #define LDBM_USE_DBBTREE 1
11372 EOF
11373
11374                 fi
11375
11376                                                 if test $ol_cv_lib_db != yes ; then
11377                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11378                 fi
11379         fi
11380 fi
11381
11382 if test $ol_with_ldbm_api = manual ; then
11383                 ol_link_ldbm=yes
11384
11385         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11386
11387         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11388 do
11389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11391 echo "configure:11392: checking for $ac_hdr" >&5
11392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11393   echo $ac_n "(cached) $ac_c" 1>&6
11394 else
11395   cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 #include <$ac_hdr>
11399 EOF
11400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11401 { (eval echo configure:11402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11403 if test -z "$ac_err"; then
11404   rm -rf conftest*
11405   eval "ac_cv_header_$ac_safe=yes"
11406 else
11407   echo "$ac_err" >&5
11408   echo "configure: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   rm -rf conftest*
11411   eval "ac_cv_header_$ac_safe=no"
11412 fi
11413 rm -f conftest*
11414 fi
11415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11416   echo "$ac_t""yes" 1>&6
11417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11418   cat >> confdefs.h <<EOF
11419 #define $ac_tr_hdr 1
11420 EOF
11421  
11422 else
11423   echo "$ac_t""no" 1>&6
11424 fi
11425 done
11426
11427 fi
11428
11429 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11430         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11431         ol_with_ldbm_api=none
11432 fi
11433
11434 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11435         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11436 echo "configure:11437: checking for MDBM library" >&5
11437 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440         ol_LIBS="$LIBS"
11441         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11442 echo "configure:11443: checking for mdbm_set_chain" >&5
11443 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11444   echo $ac_n "(cached) $ac_c" 1>&6
11445 else
11446   cat > conftest.$ac_ext <<EOF
11447 #line 11448 "configure"
11448 #include "confdefs.h"
11449 /* System header to define __stub macros and hopefully few prototypes,
11450     which can conflict with char mdbm_set_chain(); below.  */
11451 #include <assert.h>
11452 /* Override any gcc2 internal prototype to avoid an error.  */
11453 /* We use char because int might match the return type of a gcc2
11454     builtin and then its argument prototype would still apply.  */
11455 char mdbm_set_chain();
11456 char (*f)();
11457
11458 int main() {
11459
11460 /* The GNU C library defines this for functions which it implements
11461     to always fail with ENOSYS.  Some functions are actually named
11462     something starting with __ and the normal name is an alias.  */
11463 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11464 choke me
11465 #else
11466 f = mdbm_set_chain;
11467 #endif
11468
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11472   rm -rf conftest*
11473   eval "ac_cv_func_mdbm_set_chain=yes"
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   eval "ac_cv_func_mdbm_set_chain=no"
11479 fi
11480 rm -f conftest*
11481 fi
11482
11483 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11484   echo "$ac_t""yes" 1>&6
11485   ol_cv_lib_mdbm=yes
11486 else
11487   echo "$ac_t""no" 1>&6
11488
11489                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11490 echo "configure:11491: checking for mdbm_set_chain in -lmdbm" >&5
11491 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11493   echo $ac_n "(cached) $ac_c" 1>&6
11494 else
11495   ac_save_LIBS="$LIBS"
11496 LIBS="-lmdbm  $LIBS"
11497 cat > conftest.$ac_ext <<EOF
11498 #line 11499 "configure"
11499 #include "confdefs.h"
11500 /* Override any gcc2 internal prototype to avoid an error.  */
11501 /* We use char because int might match the return type of a gcc2
11502     builtin and then its argument prototype would still apply.  */
11503 char mdbm_set_chain();
11504
11505 int main() {
11506 mdbm_set_chain()
11507 ; return 0; }
11508 EOF
11509 if { (eval echo configure:11510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11510   rm -rf conftest*
11511   eval "ac_cv_lib_$ac_lib_var=yes"
11512 else
11513   echo "configure: failed program was:" >&5
11514   cat conftest.$ac_ext >&5
11515   rm -rf conftest*
11516   eval "ac_cv_lib_$ac_lib_var=no"
11517 fi
11518 rm -f conftest*
11519 LIBS="$ac_save_LIBS"
11520
11521 fi
11522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11523   echo "$ac_t""yes" 1>&6
11524   ol_cv_lib_mdbm=-lmdbm
11525 else
11526   echo "$ac_t""no" 1>&6
11527 ol_cv_lib_mdbm=no
11528 fi
11529
11530         
11531 fi
11532
11533         LIBS="$ol_LIBS"
11534
11535 fi
11536
11537 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11538
11539
11540  for ac_hdr in mdbm.h
11541 do
11542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11543 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11544 echo "configure:11545: checking for $ac_hdr" >&5
11545 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11546   echo $ac_n "(cached) $ac_c" 1>&6
11547 else
11548   cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551 #include <$ac_hdr>
11552 EOF
11553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11554 { (eval echo configure:11555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11556 if test -z "$ac_err"; then
11557   rm -rf conftest*
11558   eval "ac_cv_header_$ac_safe=yes"
11559 else
11560   echo "$ac_err" >&5
11561   echo "configure: failed program was:" >&5
11562   cat conftest.$ac_ext >&5
11563   rm -rf conftest*
11564   eval "ac_cv_header_$ac_safe=no"
11565 fi
11566 rm -f conftest*
11567 fi
11568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11569   echo "$ac_t""yes" 1>&6
11570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11571   cat >> confdefs.h <<EOF
11572 #define $ac_tr_hdr 1
11573 EOF
11574  
11575 else
11576   echo "$ac_t""no" 1>&6
11577 fi
11578 done
11579
11580  echo $ac_n "checking for db""... $ac_c" 1>&6
11581 echo "configure:11582: checking for db" >&5
11582 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11583   echo $ac_n "(cached) $ac_c" 1>&6
11584 else
11585   
11586         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11587                 ol_cv_mdbm=no
11588         else
11589                 ol_cv_mdbm=yes
11590         fi
11591
11592 fi
11593
11594 echo "$ac_t""$ol_cv_mdbm" 1>&6
11595  if test $ol_cv_mdbm = yes ; then
11596         cat >> confdefs.h <<\EOF
11597 #define HAVE_MDBM 1
11598 EOF
11599
11600  fi
11601
11602
11603         if test $ol_cv_mdbm = yes ; then
11604                 ol_link_ldbm=mdbm
11605                 ol_with_ldbm_api=mdbm
11606                 if test $ol_cv_lib_mdbm != yes ; then
11607                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11608                 fi
11609         fi
11610 fi
11611
11612 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11613         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11614 echo "configure:11615: checking for GDBM library" >&5
11615 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11616   echo $ac_n "(cached) $ac_c" 1>&6
11617 else
11618         ol_LIBS="$LIBS"
11619         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11620 echo "configure:11621: checking for gdbm_open" >&5
11621 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11622   echo $ac_n "(cached) $ac_c" 1>&6
11623 else
11624   cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627 /* System header to define __stub macros and hopefully few prototypes,
11628     which can conflict with char gdbm_open(); below.  */
11629 #include <assert.h>
11630 /* Override any gcc2 internal prototype to avoid an error.  */
11631 /* We use char because int might match the return type of a gcc2
11632     builtin and then its argument prototype would still apply.  */
11633 char gdbm_open();
11634 char (*f)();
11635
11636 int main() {
11637
11638 /* The GNU C library defines this for functions which it implements
11639     to always fail with ENOSYS.  Some functions are actually named
11640     something starting with __ and the normal name is an alias.  */
11641 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11642 choke me
11643 #else
11644 f = gdbm_open;
11645 #endif
11646
11647 ; return 0; }
11648 EOF
11649 if { (eval echo configure:11650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11650   rm -rf conftest*
11651   eval "ac_cv_func_gdbm_open=yes"
11652 else
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -rf conftest*
11656   eval "ac_cv_func_gdbm_open=no"
11657 fi
11658 rm -f conftest*
11659 fi
11660
11661 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11662   echo "$ac_t""yes" 1>&6
11663   ol_cv_lib_gdbm=yes
11664 else
11665   echo "$ac_t""no" 1>&6
11666
11667                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11668 echo "configure:11669: checking for gdbm_open in -lgdbm" >&5
11669 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11670 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11671   echo $ac_n "(cached) $ac_c" 1>&6
11672 else
11673   ac_save_LIBS="$LIBS"
11674 LIBS="-lgdbm  $LIBS"
11675 cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 /* Override any gcc2 internal prototype to avoid an error.  */
11679 /* We use char because int might match the return type of a gcc2
11680     builtin and then its argument prototype would still apply.  */
11681 char gdbm_open();
11682
11683 int main() {
11684 gdbm_open()
11685 ; return 0; }
11686 EOF
11687 if { (eval echo configure:11688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11688   rm -rf conftest*
11689   eval "ac_cv_lib_$ac_lib_var=yes"
11690 else
11691   echo "configure: failed program was:" >&5
11692   cat conftest.$ac_ext >&5
11693   rm -rf conftest*
11694   eval "ac_cv_lib_$ac_lib_var=no"
11695 fi
11696 rm -f conftest*
11697 LIBS="$ac_save_LIBS"
11698
11699 fi
11700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11701   echo "$ac_t""yes" 1>&6
11702   ol_cv_lib_gdbm=-lgdbm
11703 else
11704   echo "$ac_t""no" 1>&6
11705 ol_cv_lib_gdbm=no
11706 fi
11707
11708         
11709 fi
11710
11711         LIBS="$ol_LIBS"
11712
11713 fi
11714
11715 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11716
11717
11718  for ac_hdr in gdbm.h
11719 do
11720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11722 echo "configure:11723: checking for $ac_hdr" >&5
11723 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11724   echo $ac_n "(cached) $ac_c" 1>&6
11725 else
11726   cat > conftest.$ac_ext <<EOF
11727 #line 11728 "configure"
11728 #include "confdefs.h"
11729 #include <$ac_hdr>
11730 EOF
11731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11732 { (eval echo configure:11733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11734 if test -z "$ac_err"; then
11735   rm -rf conftest*
11736   eval "ac_cv_header_$ac_safe=yes"
11737 else
11738   echo "$ac_err" >&5
11739   echo "configure: failed program was:" >&5
11740   cat conftest.$ac_ext >&5
11741   rm -rf conftest*
11742   eval "ac_cv_header_$ac_safe=no"
11743 fi
11744 rm -f conftest*
11745 fi
11746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11747   echo "$ac_t""yes" 1>&6
11748     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11749   cat >> confdefs.h <<EOF
11750 #define $ac_tr_hdr 1
11751 EOF
11752  
11753 else
11754   echo "$ac_t""no" 1>&6
11755 fi
11756 done
11757
11758  echo $ac_n "checking for db""... $ac_c" 1>&6
11759 echo "configure:11760: checking for db" >&5
11760 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11761   echo $ac_n "(cached) $ac_c" 1>&6
11762 else
11763   
11764         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11765                 ol_cv_gdbm=no
11766         else
11767                 ol_cv_gdbm=yes
11768         fi
11769
11770 fi
11771
11772 echo "$ac_t""$ol_cv_gdbm" 1>&6
11773  if test $ol_cv_gdbm = yes ; then
11774         cat >> confdefs.h <<\EOF
11775 #define HAVE_GDBM 1
11776 EOF
11777
11778  fi
11779
11780
11781         if test $ol_cv_gdbm = yes ; then
11782                 ol_link_ldbm=gdbm
11783                 ol_with_ldbm_api=gdbm
11784
11785                 if test $ol_cv_lib_gdbm != yes ; then
11786                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11787                 fi
11788         fi
11789 fi
11790
11791 if test $ol_with_ldbm_api = auto ; then
11792         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11793 elif test $ol_with_ldbm_api = ndbm ; then
11794         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11795 echo "configure:11796: checking for NDBM library" >&5
11796 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11797   echo $ac_n "(cached) $ac_c" 1>&6
11798 else
11799         ol_LIBS="$LIBS"
11800         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11801 echo "configure:11802: checking for dbm_open" >&5
11802 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11803   echo $ac_n "(cached) $ac_c" 1>&6
11804 else
11805   cat > conftest.$ac_ext <<EOF
11806 #line 11807 "configure"
11807 #include "confdefs.h"
11808 /* System header to define __stub macros and hopefully few prototypes,
11809     which can conflict with char dbm_open(); below.  */
11810 #include <assert.h>
11811 /* Override any gcc2 internal prototype to avoid an error.  */
11812 /* We use char because int might match the return type of a gcc2
11813     builtin and then its argument prototype would still apply.  */
11814 char dbm_open();
11815 char (*f)();
11816
11817 int main() {
11818
11819 /* The GNU C library defines this for functions which it implements
11820     to always fail with ENOSYS.  Some functions are actually named
11821     something starting with __ and the normal name is an alias.  */
11822 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11823 choke me
11824 #else
11825 f = dbm_open;
11826 #endif
11827
11828 ; return 0; }
11829 EOF
11830 if { (eval echo configure:11831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11831   rm -rf conftest*
11832   eval "ac_cv_func_dbm_open=yes"
11833 else
11834   echo "configure: failed program was:" >&5
11835   cat conftest.$ac_ext >&5
11836   rm -rf conftest*
11837   eval "ac_cv_func_dbm_open=no"
11838 fi
11839 rm -f conftest*
11840 fi
11841
11842 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11843   echo "$ac_t""yes" 1>&6
11844   ol_cv_lib_ndbm=yes
11845 else
11846   echo "$ac_t""no" 1>&6
11847
11848                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11849 echo "configure:11850: checking for dbm_open in -lndbm" >&5
11850 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11851 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11852   echo $ac_n "(cached) $ac_c" 1>&6
11853 else
11854   ac_save_LIBS="$LIBS"
11855 LIBS="-lndbm  $LIBS"
11856 cat > conftest.$ac_ext <<EOF
11857 #line 11858 "configure"
11858 #include "confdefs.h"
11859 /* Override any gcc2 internal prototype to avoid an error.  */
11860 /* We use char because int might match the return type of a gcc2
11861     builtin and then its argument prototype would still apply.  */
11862 char dbm_open();
11863
11864 int main() {
11865 dbm_open()
11866 ; return 0; }
11867 EOF
11868 if { (eval echo configure:11869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11869   rm -rf conftest*
11870   eval "ac_cv_lib_$ac_lib_var=yes"
11871 else
11872   echo "configure: failed program was:" >&5
11873   cat conftest.$ac_ext >&5
11874   rm -rf conftest*
11875   eval "ac_cv_lib_$ac_lib_var=no"
11876 fi
11877 rm -f conftest*
11878 LIBS="$ac_save_LIBS"
11879
11880 fi
11881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11882   echo "$ac_t""yes" 1>&6
11883   ol_cv_lib_ndbm=-lndbm
11884 else
11885   echo "$ac_t""no" 1>&6
11886
11887                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11888 echo "configure:11889: checking for dbm_open in -ldbm" >&5
11889 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11891   echo $ac_n "(cached) $ac_c" 1>&6
11892 else
11893   ac_save_LIBS="$LIBS"
11894 LIBS="-ldbm  $LIBS"
11895 cat > conftest.$ac_ext <<EOF
11896 #line 11897 "configure"
11897 #include "confdefs.h"
11898 /* Override any gcc2 internal prototype to avoid an error.  */
11899 /* We use char because int might match the return type of a gcc2
11900     builtin and then its argument prototype would still apply.  */
11901 char dbm_open();
11902
11903 int main() {
11904 dbm_open()
11905 ; return 0; }
11906 EOF
11907 if { (eval echo configure:11908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11908   rm -rf conftest*
11909   eval "ac_cv_lib_$ac_lib_var=yes"
11910 else
11911   echo "configure: failed program was:" >&5
11912   cat conftest.$ac_ext >&5
11913   rm -rf conftest*
11914   eval "ac_cv_lib_$ac_lib_var=no"
11915 fi
11916 rm -f conftest*
11917 LIBS="$ac_save_LIBS"
11918
11919 fi
11920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11921   echo "$ac_t""yes" 1>&6
11922   ol_cv_lib_ndbm=-ldbm
11923 else
11924   echo "$ac_t""no" 1>&6
11925 ol_cv_lib_ndbm=no
11926 fi
11927                 
11928 fi
11929
11930         
11931 fi
11932
11933         LIBS="$ol_LIBS"
11934
11935 fi
11936
11937 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11938
11939
11940  for ac_hdr in ndbm.h
11941 do
11942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11944 echo "configure:11945: checking for $ac_hdr" >&5
11945 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11946   echo $ac_n "(cached) $ac_c" 1>&6
11947 else
11948   cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 #include <$ac_hdr>
11952 EOF
11953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11954 { (eval echo configure:11955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11956 if test -z "$ac_err"; then
11957   rm -rf conftest*
11958   eval "ac_cv_header_$ac_safe=yes"
11959 else
11960   echo "$ac_err" >&5
11961   echo "configure: failed program was:" >&5
11962   cat conftest.$ac_ext >&5
11963   rm -rf conftest*
11964   eval "ac_cv_header_$ac_safe=no"
11965 fi
11966 rm -f conftest*
11967 fi
11968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11969   echo "$ac_t""yes" 1>&6
11970     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11971   cat >> confdefs.h <<EOF
11972 #define $ac_tr_hdr 1
11973 EOF
11974  
11975 else
11976   echo "$ac_t""no" 1>&6
11977 fi
11978 done
11979
11980  echo $ac_n "checking for db""... $ac_c" 1>&6
11981 echo "configure:11982: checking for db" >&5
11982 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11983   echo $ac_n "(cached) $ac_c" 1>&6
11984 else
11985   
11986         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11987                 ol_cv_ndbm=no
11988         else
11989                 ol_cv_ndbm=yes
11990         fi
11991
11992 fi
11993
11994 echo "$ac_t""$ol_cv_ndbm" 1>&6
11995  if test $ol_cv_ndbm = yes ; then
11996         cat >> confdefs.h <<\EOF
11997 #define HAVE_NDBM 1
11998 EOF
11999
12000  fi
12001
12002
12003         if test $ol_cv_ndbm = yes ; then
12004                 ol_link_ldbm=ndbm
12005                 ol_with_ldbm_api=ndbm
12006
12007                 if test $ol_cv_lib_ndbm != yes ; then
12008                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12009                 fi
12010         fi
12011 fi
12012
12013 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12014         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12015         if test $ol_enable_ldbm = yes ; then
12016                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12017         fi
12018
12019         echo "configure: warning: disabling LDBM" 1>&2
12020         ol_enable_ldbm=no
12021 fi
12022
12023 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12024         LINK_BINS_DYNAMIC="yes"
12025 else
12026         LINK_BINS_DYNAMIC="no"
12027 fi
12028
12029 if test $ol_enable_wrappers != no ; then
12030         for ac_hdr in tcpd.h
12031 do
12032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12034 echo "configure:12035: checking for $ac_hdr" >&5
12035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12036   echo $ac_n "(cached) $ac_c" 1>&6
12037 else
12038   cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 #include <$ac_hdr>
12042 EOF
12043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12044 { (eval echo configure:12045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12046 if test -z "$ac_err"; then
12047   rm -rf conftest*
12048   eval "ac_cv_header_$ac_safe=yes"
12049 else
12050   echo "$ac_err" >&5
12051   echo "configure: failed program was:" >&5
12052   cat conftest.$ac_ext >&5
12053   rm -rf conftest*
12054   eval "ac_cv_header_$ac_safe=no"
12055 fi
12056 rm -f conftest*
12057 fi
12058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12059   echo "$ac_t""yes" 1>&6
12060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12061   cat >> confdefs.h <<EOF
12062 #define $ac_tr_hdr 1
12063 EOF
12064  
12065 else
12066   echo "$ac_t""no" 1>&6
12067 fi
12068 done
12069
12070
12071         if test $ac_cv_header_tcpd_h != yes ; then
12072                 have_wrappers=no
12073         else
12074                 cat > conftest.$ac_ext <<EOF
12075 #line 12076 "configure"
12076 #include "confdefs.h"
12077
12078 int allow_severity = 0;
12079 int deny_severity  = 0;
12080                 
12081 int main() {
12082 hosts_access()
12083 ; return 0; }
12084 EOF
12085 if { (eval echo configure:12086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12086   rm -rf conftest*
12087   have_wrappers=yes
12088 else
12089   echo "configure: failed program was:" >&5
12090   cat conftest.$ac_ext >&5
12091   rm -rf conftest*
12092   have_wrappers=no
12093 fi
12094 rm -f conftest*
12095         fi
12096
12097         if test $have_wrappers = yes ; then
12098                 cat >> confdefs.h <<\EOF
12099 #define HAVE_TCPD 1
12100 EOF
12101
12102                 WRAP_LIBS="-lwrap"
12103
12104                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12105 echo "configure:12106: checking for main in -lnsl" >&5
12106 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12108   echo $ac_n "(cached) $ac_c" 1>&6
12109 else
12110   ac_save_LIBS="$LIBS"
12111 LIBS="-lnsl  $LIBS"
12112 cat > conftest.$ac_ext <<EOF
12113 #line 12114 "configure"
12114 #include "confdefs.h"
12115
12116 int main() {
12117 main()
12118 ; return 0; }
12119 EOF
12120 if { (eval echo configure:12121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12121   rm -rf conftest*
12122   eval "ac_cv_lib_$ac_lib_var=yes"
12123 else
12124   echo "configure: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   rm -rf conftest*
12127   eval "ac_cv_lib_$ac_lib_var=no"
12128 fi
12129 rm -f conftest*
12130 LIBS="$ac_save_LIBS"
12131
12132 fi
12133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12134   echo "$ac_t""yes" 1>&6
12135     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12136     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12137   cat >> confdefs.h <<EOF
12138 #define $ac_tr_lib 1
12139 EOF
12140
12141   LIBS="-lnsl $LIBS"
12142
12143 else
12144   echo "$ac_t""no" 1>&6
12145 fi
12146
12147         else
12148                 echo "configure: warning: could not find -lwrap" 1>&2
12149                 if test $ol_enable_wrappers = yes ; then
12150                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12151                 fi
12152
12153                 echo "configure: warning: disabling wrappers support" 1>&2
12154                 ol_enable_wrappers=no
12155                 WRAP_LIBS=""
12156         fi
12157 fi
12158
12159 if test $ol_enable_syslog != no ; then
12160         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12161 echo "configure:12162: checking for openlog" >&5
12162 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12163   echo $ac_n "(cached) $ac_c" 1>&6
12164 else
12165   cat > conftest.$ac_ext <<EOF
12166 #line 12167 "configure"
12167 #include "confdefs.h"
12168 /* System header to define __stub macros and hopefully few prototypes,
12169     which can conflict with char openlog(); below.  */
12170 #include <assert.h>
12171 /* Override any gcc2 internal prototype to avoid an error.  */
12172 /* We use char because int might match the return type of a gcc2
12173     builtin and then its argument prototype would still apply.  */
12174 char openlog();
12175 char (*f)();
12176
12177 int main() {
12178
12179 /* The GNU C library defines this for functions which it implements
12180     to always fail with ENOSYS.  Some functions are actually named
12181     something starting with __ and the normal name is an alias.  */
12182 #if defined (__stub_openlog) || defined (__stub___openlog)
12183 choke me
12184 #else
12185 f = openlog;
12186 #endif
12187
12188 ; return 0; }
12189 EOF
12190 if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12191   rm -rf conftest*
12192   eval "ac_cv_func_openlog=yes"
12193 else
12194   echo "configure: failed program was:" >&5
12195   cat conftest.$ac_ext >&5
12196   rm -rf conftest*
12197   eval "ac_cv_func_openlog=no"
12198 fi
12199 rm -f conftest*
12200 fi
12201
12202 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12203   echo "$ac_t""yes" 1>&6
12204   :
12205 else
12206   echo "$ac_t""no" 1>&6
12207 fi
12208
12209         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12210                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12211         fi
12212         ol_enable_syslog=$ac_cv_func_openlog
12213 fi
12214
12215 if test $ol_enable_dmalloc != no ; then
12216         for ac_hdr in dmalloc.h
12217 do
12218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12220 echo "configure:12221: checking for $ac_hdr" >&5
12221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12222   echo $ac_n "(cached) $ac_c" 1>&6
12223 else
12224   cat > conftest.$ac_ext <<EOF
12225 #line 12226 "configure"
12226 #include "confdefs.h"
12227 #include <$ac_hdr>
12228 EOF
12229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12230 { (eval echo configure:12231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12232 if test -z "$ac_err"; then
12233   rm -rf conftest*
12234   eval "ac_cv_header_$ac_safe=yes"
12235 else
12236   echo "$ac_err" >&5
12237   echo "configure: failed program was:" >&5
12238   cat conftest.$ac_ext >&5
12239   rm -rf conftest*
12240   eval "ac_cv_header_$ac_safe=no"
12241 fi
12242 rm -f conftest*
12243 fi
12244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12245   echo "$ac_t""yes" 1>&6
12246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12247   cat >> confdefs.h <<EOF
12248 #define $ac_tr_hdr 1
12249 EOF
12250  
12251 else
12252   echo "$ac_t""no" 1>&6
12253 fi
12254 done
12255
12256         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12257 echo "configure:12258: checking for dmalloc_shutdown in -ldmalloc" >&5
12258 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12260   echo $ac_n "(cached) $ac_c" 1>&6
12261 else
12262   ac_save_LIBS="$LIBS"
12263 LIBS="-ldmalloc  $LIBS"
12264 cat > conftest.$ac_ext <<EOF
12265 #line 12266 "configure"
12266 #include "confdefs.h"
12267 /* Override any gcc2 internal prototype to avoid an error.  */
12268 /* We use char because int might match the return type of a gcc2
12269     builtin and then its argument prototype would still apply.  */
12270 char dmalloc_shutdown();
12271
12272 int main() {
12273 dmalloc_shutdown()
12274 ; return 0; }
12275 EOF
12276 if { (eval echo configure:12277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12277   rm -rf conftest*
12278   eval "ac_cv_lib_$ac_lib_var=yes"
12279 else
12280   echo "configure: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   rm -rf conftest*
12283   eval "ac_cv_lib_$ac_lib_var=no"
12284 fi
12285 rm -f conftest*
12286 LIBS="$ac_save_LIBS"
12287
12288 fi
12289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12290   echo "$ac_t""yes" 1>&6
12291     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12292     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12293   cat >> confdefs.h <<EOF
12294 #define $ac_tr_lib 1
12295 EOF
12296
12297   LIBS="-ldmalloc $LIBS"
12298
12299 else
12300   echo "$ac_t""no" 1>&6
12301 fi
12302
12303 fi
12304
12305 if test $ol_enable_tcl != no ; then
12306         for ac_hdr in tcl.h
12307 do
12308 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12309 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12310 echo "configure:12311: checking for $ac_hdr" >&5
12311 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12312   echo $ac_n "(cached) $ac_c" 1>&6
12313 else
12314   cat > conftest.$ac_ext <<EOF
12315 #line 12316 "configure"
12316 #include "confdefs.h"
12317 #include <$ac_hdr>
12318 EOF
12319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12320 { (eval echo configure:12321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12322 if test -z "$ac_err"; then
12323   rm -rf conftest*
12324   eval "ac_cv_header_$ac_safe=yes"
12325 else
12326   echo "$ac_err" >&5
12327   echo "configure: failed program was:" >&5
12328   cat conftest.$ac_ext >&5
12329   rm -rf conftest*
12330   eval "ac_cv_header_$ac_safe=no"
12331 fi
12332 rm -f conftest*
12333 fi
12334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12335   echo "$ac_t""yes" 1>&6
12336     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12337   cat >> confdefs.h <<EOF
12338 #define $ac_tr_hdr 1
12339 EOF
12340  
12341 else
12342   echo "$ac_t""no" 1>&6
12343 fi
12344 done
12345
12346
12347         if test $ac_cv_header_tcl_h != yes ; then
12348                 have_tcl=no
12349         else
12350                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12351                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12352 echo "configure:12353: checking for main in -l$lib" >&5
12353 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12354 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12355   echo $ac_n "(cached) $ac_c" 1>&6
12356 else
12357   ac_save_LIBS="$LIBS"
12358 LIBS="-l$lib  $LIBS"
12359 cat > conftest.$ac_ext <<EOF
12360 #line 12361 "configure"
12361 #include "confdefs.h"
12362
12363 int main() {
12364 main()
12365 ; return 0; }
12366 EOF
12367 if { (eval echo configure:12368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12368   rm -rf conftest*
12369   eval "ac_cv_lib_$ac_lib_var=yes"
12370 else
12371   echo "configure: failed program was:" >&5
12372   cat conftest.$ac_ext >&5
12373   rm -rf conftest*
12374   eval "ac_cv_lib_$ac_lib_var=no"
12375 fi
12376 rm -f conftest*
12377 LIBS="$ac_save_LIBS"
12378
12379 fi
12380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12381   echo "$ac_t""yes" 1>&6
12382   have_tcl=yes
12383                            if test x"$ol_with_tcl_module" == "xstatic" ; then
12384                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12385                            else
12386                                MOD_TCL_LIB="-l${lib}"
12387                            fi;break
12388 else
12389   echo "$ac_t""no" 1>&6
12390 have_tcl=no
12391 fi
12392
12393                 done
12394         fi
12395
12396         if test $have_tcl != yes ; then
12397                 echo "configure: warning: could not find -ltcl" 1>&2
12398                 if test $ol_enable_tcl = yes ; then
12399                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12400                 fi
12401
12402                 ol_enable_tcl=no
12403         fi
12404 fi
12405
12406 ol_link_termcap=no
12407 for ac_hdr in termcap.h ncurses.h
12408 do
12409 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12410 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12411 echo "configure:12412: checking for $ac_hdr" >&5
12412 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12413   echo $ac_n "(cached) $ac_c" 1>&6
12414 else
12415   cat > conftest.$ac_ext <<EOF
12416 #line 12417 "configure"
12417 #include "confdefs.h"
12418 #include <$ac_hdr>
12419 EOF
12420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12421 { (eval echo configure:12422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12423 if test -z "$ac_err"; then
12424   rm -rf conftest*
12425   eval "ac_cv_header_$ac_safe=yes"
12426 else
12427   echo "$ac_err" >&5
12428   echo "configure: failed program was:" >&5
12429   cat conftest.$ac_ext >&5
12430   rm -rf conftest*
12431   eval "ac_cv_header_$ac_safe=no"
12432 fi
12433 rm -f conftest*
12434 fi
12435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12436   echo "$ac_t""yes" 1>&6
12437     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12438   cat >> confdefs.h <<EOF
12439 #define $ac_tr_hdr 1
12440 EOF
12441  
12442 else
12443   echo "$ac_t""no" 1>&6
12444 fi
12445 done
12446
12447
12448 if test $ol_link_termcap = no ; then
12449         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12450 echo "configure:12451: checking for tputs in -ltermcap" >&5
12451 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12452 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12453   echo $ac_n "(cached) $ac_c" 1>&6
12454 else
12455   ac_save_LIBS="$LIBS"
12456 LIBS="-ltermcap  $LIBS"
12457 cat > conftest.$ac_ext <<EOF
12458 #line 12459 "configure"
12459 #include "confdefs.h"
12460 /* Override any gcc2 internal prototype to avoid an error.  */
12461 /* We use char because int might match the return type of a gcc2
12462     builtin and then its argument prototype would still apply.  */
12463 char tputs();
12464
12465 int main() {
12466 tputs()
12467 ; return 0; }
12468 EOF
12469 if { (eval echo configure:12470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12470   rm -rf conftest*
12471   eval "ac_cv_lib_$ac_lib_var=yes"
12472 else
12473   echo "configure: failed program was:" >&5
12474   cat conftest.$ac_ext >&5
12475   rm -rf conftest*
12476   eval "ac_cv_lib_$ac_lib_var=no"
12477 fi
12478 rm -f conftest*
12479 LIBS="$ac_save_LIBS"
12480
12481 fi
12482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12483   echo "$ac_t""yes" 1>&6
12484   have_termcap=yes
12485 else
12486   echo "$ac_t""no" 1>&6
12487 have_termcap=no
12488 fi
12489
12490         if test $have_termcap = yes ; then
12491                 cat >> confdefs.h <<\EOF
12492 #define HAVE_TERMCAP 1
12493 EOF
12494
12495                 ol_link_termcap=yes
12496                 TERMCAP_LIBS=-ltermcap
12497         fi
12498 fi
12499
12500 if test $ol_link_termcap = no ; then
12501         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12502 echo "configure:12503: checking for initscr in -lncurses" >&5
12503 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12505   echo $ac_n "(cached) $ac_c" 1>&6
12506 else
12507   ac_save_LIBS="$LIBS"
12508 LIBS="-lncurses  $LIBS"
12509 cat > conftest.$ac_ext <<EOF
12510 #line 12511 "configure"
12511 #include "confdefs.h"
12512 /* Override any gcc2 internal prototype to avoid an error.  */
12513 /* We use char because int might match the return type of a gcc2
12514     builtin and then its argument prototype would still apply.  */
12515 char initscr();
12516
12517 int main() {
12518 initscr()
12519 ; return 0; }
12520 EOF
12521 if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12522   rm -rf conftest*
12523   eval "ac_cv_lib_$ac_lib_var=yes"
12524 else
12525   echo "configure: failed program was:" >&5
12526   cat conftest.$ac_ext >&5
12527   rm -rf conftest*
12528   eval "ac_cv_lib_$ac_lib_var=no"
12529 fi
12530 rm -f conftest*
12531 LIBS="$ac_save_LIBS"
12532
12533 fi
12534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12535   echo "$ac_t""yes" 1>&6
12536   have_ncurses=yes
12537 else
12538   echo "$ac_t""no" 1>&6
12539 have_ncurses=no
12540 fi
12541
12542         if test $have_ncurses = yes ; then
12543                 cat >> confdefs.h <<\EOF
12544 #define HAVE_NCURSES 1
12545 EOF
12546
12547                 ol_link_termcap=yes
12548                 TERMCAP_LIBS=-lncurses
12549         fi
12550 fi
12551
12552 if test $ol_link_termcap = no ; then
12553         cat >> confdefs.h <<\EOF
12554 #define NO_TERMCAP 1
12555 EOF
12556
12557         TERMCAP_LIBS=
12558 fi
12559
12560 ol_link_sasl=no
12561 if test $ol_with_cyrus_sasl != no ; then
12562         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12563 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12564 echo "configure:12565: checking for sasl.h" >&5
12565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12566   echo $ac_n "(cached) $ac_c" 1>&6
12567 else
12568   cat > conftest.$ac_ext <<EOF
12569 #line 12570 "configure"
12570 #include "confdefs.h"
12571 #include <sasl.h>
12572 EOF
12573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12574 { (eval echo configure:12575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12576 if test -z "$ac_err"; then
12577   rm -rf conftest*
12578   eval "ac_cv_header_$ac_safe=yes"
12579 else
12580   echo "$ac_err" >&5
12581   echo "configure: failed program was:" >&5
12582   cat conftest.$ac_ext >&5
12583   rm -rf conftest*
12584   eval "ac_cv_header_$ac_safe=no"
12585 fi
12586 rm -f conftest*
12587 fi
12588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12589   echo "$ac_t""yes" 1>&6
12590   :
12591 else
12592   echo "$ac_t""no" 1>&6
12593 fi
12594
12595
12596         if test $ac_cv_header_sasl_h = yes ; then
12597                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12598 echo "configure:12599: checking for sasl_client_init in -lsasl" >&5
12599 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12601   echo $ac_n "(cached) $ac_c" 1>&6
12602 else
12603   ac_save_LIBS="$LIBS"
12604 LIBS="-lsasl  $LIBS"
12605 cat > conftest.$ac_ext <<EOF
12606 #line 12607 "configure"
12607 #include "confdefs.h"
12608 /* Override any gcc2 internal prototype to avoid an error.  */
12609 /* We use char because int might match the return type of a gcc2
12610     builtin and then its argument prototype would still apply.  */
12611 char sasl_client_init();
12612
12613 int main() {
12614 sasl_client_init()
12615 ; return 0; }
12616 EOF
12617 if { (eval echo configure:12618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12618   rm -rf conftest*
12619   eval "ac_cv_lib_$ac_lib_var=yes"
12620 else
12621   echo "configure: failed program was:" >&5
12622   cat conftest.$ac_ext >&5
12623   rm -rf conftest*
12624   eval "ac_cv_lib_$ac_lib_var=no"
12625 fi
12626 rm -f conftest*
12627 LIBS="$ac_save_LIBS"
12628
12629 fi
12630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12631   echo "$ac_t""yes" 1>&6
12632   have_cyrus_sasl=yes
12633 else
12634   echo "$ac_t""no" 1>&6
12635 have_cyrus_sasl=no
12636 fi
12637
12638
12639                 if test $have_cyrus_sasl != no ; then
12640                         SASL_LIBS="-lsasl"
12641                         cat >> confdefs.h <<\EOF
12642 #define HAVE_CYRUS_SASL 1
12643 EOF
12644
12645                         ol_link_sasl=yes
12646                 fi
12647         fi
12648
12649         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12650                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12651         fi
12652 fi
12653
12654 if test $cross_compiling != yes ; then
12655         dev=no
12656         if test -r /dev/urandom ; then
12657                 dev="/dev/urandom";
12658         elif test -r /idev/urandom ; then
12659                 dev="/idev/urandom";
12660         elif test -r /dev/srandom ; then
12661                 dev="/dev/srandom";
12662         elif test -r /dev/random ; then
12663                 dev="/dev/random";
12664         elif test -r /idev/random ; then
12665                 dev="/idev/random";
12666         fi
12667
12668         if test $dev != no ; then
12669                 cat >> confdefs.h <<EOF
12670 #define URANDOM_DEVICE "$dev"
12671 EOF
12672
12673         fi
12674 fi
12675
12676 ol_link_fetch=no
12677 if test $ol_with_fetch != no ; then
12678         ol=$LIBS
12679 LIBS="-lfetch -lcom_err $LIBS"
12680 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12681 echo "configure:12682: checking fetch(3) library" >&5
12682 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12683   echo $ac_n "(cached) $ac_c" 1>&6
12684 else
12685   
12686         cat > conftest.$ac_ext <<EOF
12687 #line 12688 "configure"
12688 #include "confdefs.h"
12689
12690 #include <sys/param.h>
12691 #include <stdio.h>
12692 #include <fetch.h>
12693 int main() {
12694 struct url *u = fetchParseURL("file:///"); 
12695 ; return 0; }
12696 EOF
12697 if { (eval echo configure:12698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12698   rm -rf conftest*
12699   ol_cv_lib_fetch=yes
12700 else
12701   echo "configure: failed program was:" >&5
12702   cat conftest.$ac_ext >&5
12703   rm -rf conftest*
12704   ol_cv_lib_fetch=no
12705 fi
12706 rm -f conftest*
12707 fi
12708
12709 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12710 LIBS=$ol_LIBS
12711 if test $ol_cv_lib_fetch != no ; then
12712         ol_link_fetch="-lfetch -lcom_err"
12713         cat >> confdefs.h <<\EOF
12714 #define HAVE_FETCH 1
12715 EOF
12716
12717 fi
12718
12719
12720         if test $ol_cv_lib_fetch != no ; then
12721                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12722                 ol_link_fetch=freebsd
12723
12724         elif test $ol_with_fetch != auto ; then
12725                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12726         fi 
12727 fi
12728
12729 ol_link_readline=no
12730 if test $ol_with_readline != no ; then
12731         for ac_hdr in readline/readline.h readline/history.h
12732 do
12733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12735 echo "configure:12736: checking for $ac_hdr" >&5
12736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12737   echo $ac_n "(cached) $ac_c" 1>&6
12738 else
12739   cat > conftest.$ac_ext <<EOF
12740 #line 12741 "configure"
12741 #include "confdefs.h"
12742 #include <$ac_hdr>
12743 EOF
12744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12745 { (eval echo configure:12746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12747 if test -z "$ac_err"; then
12748   rm -rf conftest*
12749   eval "ac_cv_header_$ac_safe=yes"
12750 else
12751   echo "$ac_err" >&5
12752   echo "configure: failed program was:" >&5
12753   cat conftest.$ac_ext >&5
12754   rm -rf conftest*
12755   eval "ac_cv_header_$ac_safe=no"
12756 fi
12757 rm -f conftest*
12758 fi
12759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12760   echo "$ac_t""yes" 1>&6
12761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12762   cat >> confdefs.h <<EOF
12763 #define $ac_tr_hdr 1
12764 EOF
12765  
12766 else
12767   echo "$ac_t""no" 1>&6
12768 fi
12769 done
12770
12771
12772         if test $ac_cv_header_readline_readline_h = yes ; then
12773                 save_LIBS="$LIBS"
12774                 LIBS="$TERMCAP_LIBS $LIBS"
12775                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12776 echo "configure:12777: checking for readline in -lreadline" >&5
12777 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12779   echo $ac_n "(cached) $ac_c" 1>&6
12780 else
12781   ac_save_LIBS="$LIBS"
12782 LIBS="-lreadline  $LIBS"
12783 cat > conftest.$ac_ext <<EOF
12784 #line 12785 "configure"
12785 #include "confdefs.h"
12786 /* Override any gcc2 internal prototype to avoid an error.  */
12787 /* We use char because int might match the return type of a gcc2
12788     builtin and then its argument prototype would still apply.  */
12789 char readline();
12790
12791 int main() {
12792 readline()
12793 ; return 0; }
12794 EOF
12795 if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12796   rm -rf conftest*
12797   eval "ac_cv_lib_$ac_lib_var=yes"
12798 else
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -rf conftest*
12802   eval "ac_cv_lib_$ac_lib_var=no"
12803 fi
12804 rm -f conftest*
12805 LIBS="$ac_save_LIBS"
12806
12807 fi
12808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12809   echo "$ac_t""yes" 1>&6
12810   have_readline=yes
12811 else
12812   echo "$ac_t""no" 1>&6
12813 have_readline=no
12814 fi
12815
12816                 LIBS="$save_LIBS"
12817                         
12818                 if test $have_readline = yes ; then
12819                         ol_with_readline=found
12820                         ol_link_readline=yes
12821
12822                         READLINE_LIBS="-lreadline"
12823                 fi
12824         fi
12825 fi
12826
12827 if test $ol_link_readline = yes ; then
12828         cat >> confdefs.h <<\EOF
12829 #define HAVE_READLINE 1
12830 EOF
12831
12832 fi
12833
12834
12835 if test $ol_enable_crypt != no ; then
12836         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12837 echo "configure:12838: checking for crypt" >&5
12838 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12839   echo $ac_n "(cached) $ac_c" 1>&6
12840 else
12841   cat > conftest.$ac_ext <<EOF
12842 #line 12843 "configure"
12843 #include "confdefs.h"
12844 /* System header to define __stub macros and hopefully few prototypes,
12845     which can conflict with char crypt(); below.  */
12846 #include <assert.h>
12847 /* Override any gcc2 internal prototype to avoid an error.  */
12848 /* We use char because int might match the return type of a gcc2
12849     builtin and then its argument prototype would still apply.  */
12850 char crypt();
12851 char (*f)();
12852
12853 int main() {
12854
12855 /* The GNU C library defines this for functions which it implements
12856     to always fail with ENOSYS.  Some functions are actually named
12857     something starting with __ and the normal name is an alias.  */
12858 #if defined (__stub_crypt) || defined (__stub___crypt)
12859 choke me
12860 #else
12861 f = crypt;
12862 #endif
12863
12864 ; return 0; }
12865 EOF
12866 if { (eval echo configure:12867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12867   rm -rf conftest*
12868   eval "ac_cv_func_crypt=yes"
12869 else
12870   echo "configure: failed program was:" >&5
12871   cat conftest.$ac_ext >&5
12872   rm -rf conftest*
12873   eval "ac_cv_func_crypt=no"
12874 fi
12875 rm -f conftest*
12876 fi
12877
12878 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12879   echo "$ac_t""yes" 1>&6
12880   have_crypt=yes
12881 else
12882   echo "$ac_t""no" 1>&6
12883
12884                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12885 echo "configure:12886: checking for crypt in -lcrypt" >&5
12886 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12888   echo $ac_n "(cached) $ac_c" 1>&6
12889 else
12890   ac_save_LIBS="$LIBS"
12891 LIBS="-lcrypt  $LIBS"
12892 cat > conftest.$ac_ext <<EOF
12893 #line 12894 "configure"
12894 #include "confdefs.h"
12895 /* Override any gcc2 internal prototype to avoid an error.  */
12896 /* We use char because int might match the return type of a gcc2
12897     builtin and then its argument prototype would still apply.  */
12898 char crypt();
12899
12900 int main() {
12901 crypt()
12902 ; return 0; }
12903 EOF
12904 if { (eval echo configure:12905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12905   rm -rf conftest*
12906   eval "ac_cv_lib_$ac_lib_var=yes"
12907 else
12908   echo "configure: failed program was:" >&5
12909   cat conftest.$ac_ext >&5
12910   rm -rf conftest*
12911   eval "ac_cv_lib_$ac_lib_var=no"
12912 fi
12913 rm -f conftest*
12914 LIBS="$ac_save_LIBS"
12915
12916 fi
12917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12918   echo "$ac_t""yes" 1>&6
12919   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12920                         have_crypt=yes
12921 else
12922   echo "$ac_t""no" 1>&6
12923 have_crypt=no
12924 fi
12925
12926 fi
12927
12928
12929         if test $have_crypt = yes ; then
12930                 cat >> confdefs.h <<\EOF
12931 #define HAVE_CRYPT 1
12932 EOF
12933
12934         else
12935                 echo "configure: warning: could not find crypt" 1>&2
12936                 if test $ol_enable_crypt = yes ; then
12937                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12938                 fi
12939
12940                 echo "configure: warning: disabling crypt support" 1>&2
12941                 ol_enable_crypt=no
12942         fi
12943 fi
12944
12945 if test $ol_enable_proctitle != no ; then
12946         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12947 echo "configure:12948: checking for setproctitle" >&5
12948 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12949   echo $ac_n "(cached) $ac_c" 1>&6
12950 else
12951   cat > conftest.$ac_ext <<EOF
12952 #line 12953 "configure"
12953 #include "confdefs.h"
12954 /* System header to define __stub macros and hopefully few prototypes,
12955     which can conflict with char setproctitle(); below.  */
12956 #include <assert.h>
12957 /* Override any gcc2 internal prototype to avoid an error.  */
12958 /* We use char because int might match the return type of a gcc2
12959     builtin and then its argument prototype would still apply.  */
12960 char setproctitle();
12961 char (*f)();
12962
12963 int main() {
12964
12965 /* The GNU C library defines this for functions which it implements
12966     to always fail with ENOSYS.  Some functions are actually named
12967     something starting with __ and the normal name is an alias.  */
12968 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12969 choke me
12970 #else
12971 f = setproctitle;
12972 #endif
12973
12974 ; return 0; }
12975 EOF
12976 if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12977   rm -rf conftest*
12978   eval "ac_cv_func_setproctitle=yes"
12979 else
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -rf conftest*
12983   eval "ac_cv_func_setproctitle=no"
12984 fi
12985 rm -f conftest*
12986 fi
12987
12988 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12989   echo "$ac_t""yes" 1>&6
12990   have_setproctitle=yes
12991 else
12992   echo "$ac_t""no" 1>&6
12993
12994                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12995 echo "configure:12996: checking for setproctitle in -lutil" >&5
12996 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12997 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12998   echo $ac_n "(cached) $ac_c" 1>&6
12999 else
13000   ac_save_LIBS="$LIBS"
13001 LIBS="-lutil  $LIBS"
13002 cat > conftest.$ac_ext <<EOF
13003 #line 13004 "configure"
13004 #include "confdefs.h"
13005 /* Override any gcc2 internal prototype to avoid an error.  */
13006 /* We use char because int might match the return type of a gcc2
13007     builtin and then its argument prototype would still apply.  */
13008 char setproctitle();
13009
13010 int main() {
13011 setproctitle()
13012 ; return 0; }
13013 EOF
13014 if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13015   rm -rf conftest*
13016   eval "ac_cv_lib_$ac_lib_var=yes"
13017 else
13018   echo "configure: failed program was:" >&5
13019   cat conftest.$ac_ext >&5
13020   rm -rf conftest*
13021   eval "ac_cv_lib_$ac_lib_var=no"
13022 fi
13023 rm -f conftest*
13024 LIBS="$ac_save_LIBS"
13025
13026 fi
13027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13028   echo "$ac_t""yes" 1>&6
13029   have_setproctitle=yes
13030                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13031 else
13032   echo "$ac_t""no" 1>&6
13033 have_setproctitle=no
13034                         LIBOBJS="$LIBOBJS setproctitle.o"
13035                         LIBSRCS="$LIBSRCS setproctitle.c"
13036 fi
13037
13038 fi
13039
13040
13041         if test $have_setproctitle = yes ; then
13042                 cat >> confdefs.h <<\EOF
13043 #define HAVE_SETPROCTITLE 1
13044 EOF
13045
13046         fi
13047 fi
13048
13049 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13050 echo "configure:13051: checking for ANSI C header files" >&5
13051 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13052   echo $ac_n "(cached) $ac_c" 1>&6
13053 else
13054   cat > conftest.$ac_ext <<EOF
13055 #line 13056 "configure"
13056 #include "confdefs.h"
13057 #include <stdlib.h>
13058 #include <stdarg.h>
13059 #include <string.h>
13060 #include <float.h>
13061 EOF
13062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13063 { (eval echo configure:13064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13065 if test -z "$ac_err"; then
13066   rm -rf conftest*
13067   ac_cv_header_stdc=yes
13068 else
13069   echo "$ac_err" >&5
13070   echo "configure: failed program was:" >&5
13071   cat conftest.$ac_ext >&5
13072   rm -rf conftest*
13073   ac_cv_header_stdc=no
13074 fi
13075 rm -f conftest*
13076
13077 if test $ac_cv_header_stdc = yes; then
13078   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13079 cat > conftest.$ac_ext <<EOF
13080 #line 13081 "configure"
13081 #include "confdefs.h"
13082 #include <string.h>
13083 EOF
13084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13085   egrep "memchr" >/dev/null 2>&1; then
13086   :
13087 else
13088   rm -rf conftest*
13089   ac_cv_header_stdc=no
13090 fi
13091 rm -f conftest*
13092
13093 fi
13094
13095 if test $ac_cv_header_stdc = yes; then
13096   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13097 cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 #include <stdlib.h>
13101 EOF
13102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13103   egrep "free" >/dev/null 2>&1; then
13104   :
13105 else
13106   rm -rf conftest*
13107   ac_cv_header_stdc=no
13108 fi
13109 rm -f conftest*
13110
13111 fi
13112
13113 if test $ac_cv_header_stdc = yes; then
13114   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13115 if test "$cross_compiling" = yes; then
13116   :
13117 else
13118   cat > conftest.$ac_ext <<EOF
13119 #line 13120 "configure"
13120 #include "confdefs.h"
13121 #include <ctype.h>
13122 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13123 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13124 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13125 int main () { int i; for (i = 0; i < 256; i++)
13126 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13127 exit (0); }
13128
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13131 then
13132   :
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -fr conftest*
13137   ac_cv_header_stdc=no
13138 fi
13139 rm -fr conftest*
13140 fi
13141
13142 fi
13143 fi
13144
13145 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13146 if test $ac_cv_header_stdc = yes; then
13147   cat >> confdefs.h <<\EOF
13148 #define STDC_HEADERS 1
13149 EOF
13150
13151 fi
13152
13153 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13154 echo "configure:13155: checking for mode_t" >&5
13155 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13156   echo $ac_n "(cached) $ac_c" 1>&6
13157 else
13158   cat > conftest.$ac_ext <<EOF
13159 #line 13160 "configure"
13160 #include "confdefs.h"
13161 #include <sys/types.h>
13162 #if STDC_HEADERS
13163 #include <stdlib.h>
13164 #include <stddef.h>
13165 #endif
13166 EOF
13167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13168   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13169   rm -rf conftest*
13170   eval "ac_cv_type_mode_t=yes"
13171 else
13172   rm -rf conftest*
13173   eval "ac_cv_type_mode_t=no"
13174 fi
13175 rm -f conftest*
13176
13177 fi
13178 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13179   echo "$ac_t""yes" 1>&6
13180 else
13181   echo "$ac_t""no" 1>&6
13182   cat >> confdefs.h <<EOF
13183 #define mode_t int
13184 EOF
13185
13186 fi
13187
13188 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13189 echo "configure:13190: checking for off_t" >&5
13190 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13191   echo $ac_n "(cached) $ac_c" 1>&6
13192 else
13193   cat > conftest.$ac_ext <<EOF
13194 #line 13195 "configure"
13195 #include "confdefs.h"
13196 #include <sys/types.h>
13197 #if STDC_HEADERS
13198 #include <stdlib.h>
13199 #include <stddef.h>
13200 #endif
13201 EOF
13202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13203   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13204   rm -rf conftest*
13205   eval "ac_cv_type_off_t=yes"
13206 else
13207   rm -rf conftest*
13208   eval "ac_cv_type_off_t=no"
13209 fi
13210 rm -f conftest*
13211
13212 fi
13213 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13214   echo "$ac_t""yes" 1>&6
13215 else
13216   echo "$ac_t""no" 1>&6
13217   cat >> confdefs.h <<EOF
13218 #define off_t long
13219 EOF
13220
13221 fi
13222
13223 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13224 echo "configure:13225: checking for pid_t" >&5
13225 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13226   echo $ac_n "(cached) $ac_c" 1>&6
13227 else
13228   cat > conftest.$ac_ext <<EOF
13229 #line 13230 "configure"
13230 #include "confdefs.h"
13231 #include <sys/types.h>
13232 #if STDC_HEADERS
13233 #include <stdlib.h>
13234 #include <stddef.h>
13235 #endif
13236 EOF
13237 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13238   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13239   rm -rf conftest*
13240   eval "ac_cv_type_pid_t=yes"
13241 else
13242   rm -rf conftest*
13243   eval "ac_cv_type_pid_t=no"
13244 fi
13245 rm -f conftest*
13246
13247 fi
13248 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13249   echo "$ac_t""yes" 1>&6
13250 else
13251   echo "$ac_t""no" 1>&6
13252   cat >> confdefs.h <<EOF
13253 #define pid_t int
13254 EOF
13255
13256 fi
13257
13258 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13259 echo "configure:13260: checking for ptrdiff_t" >&5
13260 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13261   echo $ac_n "(cached) $ac_c" 1>&6
13262 else
13263   cat > conftest.$ac_ext <<EOF
13264 #line 13265 "configure"
13265 #include "confdefs.h"
13266 #include <stddef.h>
13267 int main() {
13268 ptrdiff_t p
13269 ; return 0; }
13270 EOF
13271 if { (eval echo configure:13272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13272   rm -rf conftest*
13273   am_cv_type_ptrdiff_t=yes
13274 else
13275   echo "configure: failed program was:" >&5
13276   cat conftest.$ac_ext >&5
13277   rm -rf conftest*
13278   am_cv_type_ptrdiff_t=no
13279 fi
13280 rm -f conftest*
13281 fi
13282
13283 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13284    if test $am_cv_type_ptrdiff_t = yes; then
13285      cat >> confdefs.h <<\EOF
13286 #define HAVE_PTRDIFF_T 1
13287 EOF
13288
13289    fi
13290
13291 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13292 echo "configure:13293: checking return type of signal handlers" >&5
13293 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13294   echo $ac_n "(cached) $ac_c" 1>&6
13295 else
13296   cat > conftest.$ac_ext <<EOF
13297 #line 13298 "configure"
13298 #include "confdefs.h"
13299 #include <sys/types.h>
13300 #include <signal.h>
13301 #ifdef signal
13302 #undef signal
13303 #endif
13304 #ifdef __cplusplus
13305 extern "C" void (*signal (int, void (*)(int)))(int);
13306 #else
13307 void (*signal ()) ();
13308 #endif
13309
13310 int main() {
13311 int i;
13312 ; return 0; }
13313 EOF
13314 if { (eval echo configure:13315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13315   rm -rf conftest*
13316   ac_cv_type_signal=void
13317 else
13318   echo "configure: failed program was:" >&5
13319   cat conftest.$ac_ext >&5
13320   rm -rf conftest*
13321   ac_cv_type_signal=int
13322 fi
13323 rm -f conftest*
13324 fi
13325
13326 echo "$ac_t""$ac_cv_type_signal" 1>&6
13327 cat >> confdefs.h <<EOF
13328 #define RETSIGTYPE $ac_cv_type_signal
13329 EOF
13330
13331
13332 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13333 echo "configure:13334: checking for size_t" >&5
13334 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13335   echo $ac_n "(cached) $ac_c" 1>&6
13336 else
13337   cat > conftest.$ac_ext <<EOF
13338 #line 13339 "configure"
13339 #include "confdefs.h"
13340 #include <sys/types.h>
13341 #if STDC_HEADERS
13342 #include <stdlib.h>
13343 #include <stddef.h>
13344 #endif
13345 EOF
13346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13347   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13348   rm -rf conftest*
13349   eval "ac_cv_type_size_t=yes"
13350 else
13351   rm -rf conftest*
13352   eval "ac_cv_type_size_t=no"
13353 fi
13354 rm -f conftest*
13355
13356 fi
13357 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13358   echo "$ac_t""yes" 1>&6
13359 else
13360   echo "$ac_t""no" 1>&6
13361   cat >> confdefs.h <<EOF
13362 #define size_t unsigned
13363 EOF
13364
13365 fi
13366
13367
13368 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13369 echo "configure:13370: checking for ssize_t" >&5
13370 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13371   echo $ac_n "(cached) $ac_c" 1>&6
13372 else
13373   cat > conftest.$ac_ext <<EOF
13374 #line 13375 "configure"
13375 #include "confdefs.h"
13376 #include <sys/types.h>
13377 #if STDC_HEADERS
13378 #include <stdlib.h>
13379 #include <stddef.h>
13380 #endif
13381 EOF
13382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13383   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13384   rm -rf conftest*
13385   eval "ac_cv_type_ssize_t=yes"
13386 else
13387   rm -rf conftest*
13388   eval "ac_cv_type_ssize_t=no"
13389 fi
13390 rm -f conftest*
13391
13392 fi
13393 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13394   echo "$ac_t""yes" 1>&6
13395 else
13396   echo "$ac_t""no" 1>&6
13397   cat >> confdefs.h <<EOF
13398 #define ssize_t signed int
13399 EOF
13400
13401 fi
13402
13403 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13404 echo "configure:13405: checking for caddr_t" >&5
13405 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13406   echo $ac_n "(cached) $ac_c" 1>&6
13407 else
13408   cat > conftest.$ac_ext <<EOF
13409 #line 13410 "configure"
13410 #include "confdefs.h"
13411 #include <sys/types.h>
13412 #if STDC_HEADERS
13413 #include <stdlib.h>
13414 #include <stddef.h>
13415 #endif
13416 EOF
13417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13418   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13419   rm -rf conftest*
13420   eval "ac_cv_type_caddr_t=yes"
13421 else
13422   rm -rf conftest*
13423   eval "ac_cv_type_caddr_t=no"
13424 fi
13425 rm -f conftest*
13426
13427 fi
13428 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13429   echo "$ac_t""yes" 1>&6
13430 else
13431   echo "$ac_t""no" 1>&6
13432   cat >> confdefs.h <<EOF
13433 #define caddr_t char *
13434 EOF
13435
13436 fi
13437
13438
13439 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13440 echo "configure:13441: checking for socklen_t" >&5
13441 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13442   echo $ac_n "(cached) $ac_c" 1>&6
13443 else
13444   cat > conftest.$ac_ext <<EOF
13445 #line 13446 "configure"
13446 #include "confdefs.h"
13447
13448 #ifdef HAVE_SYS_TYPES_H
13449 #include <sys/types.h>
13450 #endif
13451 #ifdef HAVE_SYS_SOCKET_H
13452 #include <sys/socket.h>
13453 #endif
13454
13455 int main() {
13456 socklen_t len;
13457 ; return 0; }
13458 EOF
13459 if { (eval echo configure:13460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13460   rm -rf conftest*
13461   ol_cv_type_socklen_t=yes
13462 else
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -rf conftest*
13466   ol_cv_type_socklen_t=no
13467 fi
13468 rm -f conftest*
13469 fi
13470
13471 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13472   if test $ol_cv_type_socklen_t = no; then
13473     cat >> confdefs.h <<\EOF
13474 #define socklen_t int
13475 EOF
13476
13477   fi
13478  
13479 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13480 echo "configure:13481: checking for member st_blksize in aggregate type struct stat" >&5
13481 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13482   echo $ac_n "(cached) $ac_c" 1>&6
13483 else
13484   cat > conftest.$ac_ext <<EOF
13485 #line 13486 "configure"
13486 #include "confdefs.h"
13487 #include <sys/types.h>
13488 #include <sys/stat.h>
13489 int main() {
13490 struct stat foo; foo.st_blksize;
13491 ; return 0; }
13492 EOF
13493 if { (eval echo configure:13494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13494   rm -rf conftest*
13495   ac_cv_c_struct_member_st_blksize=yes
13496 else
13497   echo "configure: failed program was:" >&5
13498   cat conftest.$ac_ext >&5
13499   rm -rf conftest*
13500   ac_cv_c_struct_member_st_blksize=no
13501 fi
13502 rm -f conftest*
13503 fi
13504
13505 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13506 st_blksize="$ac_cv_c_struct_member_st_blksize"
13507 if test $ac_cv_c_struct_member_st_blksize = yes; then
13508   cat >> confdefs.h <<\EOF
13509 #define HAVE_ST_BLKSIZE 1
13510 EOF
13511
13512 fi
13513
13514 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13515 echo "configure:13516: checking whether time.h and sys/time.h may both be included" >&5
13516 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13517   echo $ac_n "(cached) $ac_c" 1>&6
13518 else
13519   cat > conftest.$ac_ext <<EOF
13520 #line 13521 "configure"
13521 #include "confdefs.h"
13522 #include <sys/types.h>
13523 #include <sys/time.h>
13524 #include <time.h>
13525 int main() {
13526 struct tm *tp;
13527 ; return 0; }
13528 EOF
13529 if { (eval echo configure:13530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13530   rm -rf conftest*
13531   ac_cv_header_time=yes
13532 else
13533   echo "configure: failed program was:" >&5
13534   cat conftest.$ac_ext >&5
13535   rm -rf conftest*
13536   ac_cv_header_time=no
13537 fi
13538 rm -f conftest*
13539 fi
13540
13541 echo "$ac_t""$ac_cv_header_time" 1>&6
13542 if test $ac_cv_header_time = yes; then
13543   cat >> confdefs.h <<\EOF
13544 #define TIME_WITH_SYS_TIME 1
13545 EOF
13546
13547 fi
13548
13549 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13550 echo "configure:13551: checking whether struct tm is in sys/time.h or time.h" >&5
13551 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13552   echo $ac_n "(cached) $ac_c" 1>&6
13553 else
13554   cat > conftest.$ac_ext <<EOF
13555 #line 13556 "configure"
13556 #include "confdefs.h"
13557 #include <sys/types.h>
13558 #include <time.h>
13559 int main() {
13560 struct tm *tp; tp->tm_sec;
13561 ; return 0; }
13562 EOF
13563 if { (eval echo configure:13564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13564   rm -rf conftest*
13565   ac_cv_struct_tm=time.h
13566 else
13567   echo "configure: failed program was:" >&5
13568   cat conftest.$ac_ext >&5
13569   rm -rf conftest*
13570   ac_cv_struct_tm=sys/time.h
13571 fi
13572 rm -f conftest*
13573 fi
13574
13575 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13576 if test $ac_cv_struct_tm = sys/time.h; then
13577   cat >> confdefs.h <<\EOF
13578 #define TM_IN_SYS_TIME 1
13579 EOF
13580
13581 fi
13582
13583 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13584 echo "configure:13585: checking for uid_t in sys/types.h" >&5
13585 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13586   echo $ac_n "(cached) $ac_c" 1>&6
13587 else
13588   cat > conftest.$ac_ext <<EOF
13589 #line 13590 "configure"
13590 #include "confdefs.h"
13591 #include <sys/types.h>
13592 EOF
13593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13594   egrep "uid_t" >/dev/null 2>&1; then
13595   rm -rf conftest*
13596   ac_cv_type_uid_t=yes
13597 else
13598   rm -rf conftest*
13599   ac_cv_type_uid_t=no
13600 fi
13601 rm -f conftest*
13602
13603 fi
13604
13605 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13606 if test $ac_cv_type_uid_t = no; then
13607   cat >> confdefs.h <<\EOF
13608 #define uid_t int
13609 EOF
13610
13611   cat >> confdefs.h <<\EOF
13612 #define gid_t int
13613 EOF
13614
13615 fi
13616
13617 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13618 echo "configure:13619: checking for sig_atomic_t" >&5
13619 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13620   echo $ac_n "(cached) $ac_c" 1>&6
13621 else
13622   cat > conftest.$ac_ext <<EOF
13623 #line 13624 "configure"
13624 #include "confdefs.h"
13625 #include <signal.h>
13626 int main() {
13627 sig_atomic_t atomic;
13628 ; return 0; }
13629 EOF
13630 if { (eval echo configure:13631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13631   rm -rf conftest*
13632   ol_cv_type_sig_atomic_t=yes
13633 else
13634   echo "configure: failed program was:" >&5
13635   cat conftest.$ac_ext >&5
13636   rm -rf conftest*
13637   ol_cv_type_sig_atomic_t=no
13638 fi
13639 rm -f conftest*
13640 fi
13641
13642 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13643   if test $ol_cv_type_sig_atomic_t = no; then
13644     cat >> confdefs.h <<\EOF
13645 #define sig_atomic_t int
13646 EOF
13647
13648   fi
13649  
13650
13651
13652 # test for pw_gecos in struct passwd
13653 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13654 echo "configure:13655: checking struct passwd for pw_gecos" >&5
13655 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13656   echo $ac_n "(cached) $ac_c" 1>&6
13657 else
13658   
13659         cat > conftest.$ac_ext <<EOF
13660 #line 13661 "configure"
13661 #include "confdefs.h"
13662 #include <pwd.h>
13663 int main() {
13664
13665         struct passwd pwd;
13666         pwd.pw_gecos = pwd.pw_name;
13667
13668 ; return 0; }
13669 EOF
13670 if { (eval echo configure:13671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13671   rm -rf conftest*
13672   ol_cv_struct_passwd_pw_gecos=yes
13673 else
13674   echo "configure: failed program was:" >&5
13675   cat conftest.$ac_ext >&5
13676   rm -rf conftest*
13677   ol_cv_struct_passwd_pw_gecos=no
13678 fi
13679 rm -f conftest*
13680 fi
13681
13682 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13683 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13684         cat >> confdefs.h <<\EOF
13685 #define HAVE_PW_GECOS 1
13686 EOF
13687
13688 fi
13689
13690 # test for pw_passwd in struct passwd
13691 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13692 echo "configure:13693: checking struct passwd for pw_passwd" >&5
13693 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13694   echo $ac_n "(cached) $ac_c" 1>&6
13695 else
13696   
13697         cat > conftest.$ac_ext <<EOF
13698 #line 13699 "configure"
13699 #include "confdefs.h"
13700 #include <pwd.h>
13701 int main() {
13702
13703         struct passwd pwd;
13704         pwd.pw_passwd = pwd.pw_name;
13705
13706 ; return 0; }
13707 EOF
13708 if { (eval echo configure:13709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13709   rm -rf conftest*
13710   ol_cv_struct_passwd_pw_passwd=yes
13711 else
13712   echo "configure: failed program was:" >&5
13713   cat conftest.$ac_ext >&5
13714   rm -rf conftest*
13715   ol_cv_struct_passwd_pw_passwd=no
13716 fi
13717 rm -f conftest*
13718 fi
13719
13720 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13721 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13722         cat >> confdefs.h <<\EOF
13723 #define HAVE_PW_PASSWD 1
13724 EOF
13725
13726 fi
13727
13728
13729 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13730 echo "configure:13731: checking if toupper() requires islower()" >&5
13731 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13732   echo $ac_n "(cached) $ac_c" 1>&6
13733 else
13734   
13735         if test "$cross_compiling" = yes; then
13736   ol_cv_c_upper_lower=safe
13737 else
13738   cat > conftest.$ac_ext <<EOF
13739 #line 13740 "configure"
13740 #include "confdefs.h"
13741
13742 #include <ctype.h>
13743 main()
13744 {
13745         if ('C' == toupper('C'))
13746                 exit(0);
13747         else
13748                 exit(1);
13749 }
13750 EOF
13751 if { (eval echo configure:13752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13752 then
13753   ol_cv_c_upper_lower=no
13754 else
13755   echo "configure: failed program was:" >&5
13756   cat conftest.$ac_ext >&5
13757   rm -fr conftest*
13758   ol_cv_c_upper_lower=yes
13759 fi
13760 rm -fr conftest*
13761 fi
13762
13763 fi
13764
13765 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13766 if test $ol_cv_c_upper_lower != no ; then
13767         cat >> confdefs.h <<\EOF
13768 #define C_UPPER_LOWER 1
13769 EOF
13770
13771 fi
13772
13773 echo $ac_n "checking for working const""... $ac_c" 1>&6
13774 echo "configure:13775: checking for working const" >&5
13775 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13776   echo $ac_n "(cached) $ac_c" 1>&6
13777 else
13778   cat > conftest.$ac_ext <<EOF
13779 #line 13780 "configure"
13780 #include "confdefs.h"
13781
13782 int main() {
13783
13784 /* Ultrix mips cc rejects this.  */
13785 typedef int charset[2]; const charset x;
13786 /* SunOS 4.1.1 cc rejects this.  */
13787 char const *const *ccp;
13788 char **p;
13789 /* NEC SVR4.0.2 mips cc rejects this.  */
13790 struct point {int x, y;};
13791 static struct point const zero = {0,0};
13792 /* AIX XL C 1.02.0.0 rejects this.
13793    It does not let you subtract one const X* pointer from another in an arm
13794    of an if-expression whose if-part is not a constant expression */
13795 const char *g = "string";
13796 ccp = &g + (g ? g-g : 0);
13797 /* HPUX 7.0 cc rejects these. */
13798 ++ccp;
13799 p = (char**) ccp;
13800 ccp = (char const *const *) p;
13801 { /* SCO 3.2v4 cc rejects this.  */
13802   char *t;
13803   char const *s = 0 ? (char *) 0 : (char const *) 0;
13804
13805   *t++ = 0;
13806 }
13807 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13808   int x[] = {25, 17};
13809   const int *foo = &x[0];
13810   ++foo;
13811 }
13812 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13813   typedef const int *iptr;
13814   iptr p = 0;
13815   ++p;
13816 }
13817 { /* AIX XL C 1.02.0.0 rejects this saying
13818      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13819   struct s { int j; const int *ap[3]; };
13820   struct s *b; b->j = 5;
13821 }
13822 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13823   const int foo = 10;
13824 }
13825
13826 ; return 0; }
13827 EOF
13828 if { (eval echo configure:13829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13829   rm -rf conftest*
13830   ac_cv_c_const=yes
13831 else
13832   echo "configure: failed program was:" >&5
13833   cat conftest.$ac_ext >&5
13834   rm -rf conftest*
13835   ac_cv_c_const=no
13836 fi
13837 rm -f conftest*
13838 fi
13839
13840 echo "$ac_t""$ac_cv_c_const" 1>&6
13841 if test $ac_cv_c_const = no; then
13842   cat >> confdefs.h <<\EOF
13843 #define const 
13844 EOF
13845
13846 fi
13847
13848 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13849 echo "configure:13850: checking if compiler understands volatile" >&5
13850 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13851   echo $ac_n "(cached) $ac_c" 1>&6
13852 else
13853   cat > conftest.$ac_ext <<EOF
13854 #line 13855 "configure"
13855 #include "confdefs.h"
13856 int x, y, z;
13857 int main() {
13858 volatile int a; int * volatile b = x ? &y : &z;
13859       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13860       *b = 0;
13861 ; return 0; }
13862 EOF
13863 if { (eval echo configure:13864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13864   rm -rf conftest*
13865   ol_cv_c_volatile=yes
13866 else
13867   echo "configure: failed program was:" >&5
13868   cat conftest.$ac_ext >&5
13869   rm -rf conftest*
13870   ol_cv_c_volatile=no
13871 fi
13872 rm -f conftest*
13873 fi
13874
13875 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13876   if test $ol_cv_c_volatile = yes; then
13877     : 
13878   else
13879     cat >> confdefs.h <<\EOF
13880 #define volatile 
13881 EOF
13882
13883   fi
13884  
13885
13886 if test $cross_compiling = yes ; then
13887         cat >> confdefs.h <<\EOF
13888 #define CROSS_COMPILING 1
13889 EOF
13890
13891 else
13892         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13893 echo "configure:13894: checking whether byte ordering is bigendian" >&5
13894 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13895   echo $ac_n "(cached) $ac_c" 1>&6
13896 else
13897   ac_cv_c_bigendian=unknown
13898 # See if sys/param.h defines the BYTE_ORDER macro.
13899 cat > conftest.$ac_ext <<EOF
13900 #line 13901 "configure"
13901 #include "confdefs.h"
13902 #include <sys/types.h>
13903 #include <sys/param.h>
13904 int main() {
13905
13906 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13907  bogus endian macros
13908 #endif
13909 ; return 0; }
13910 EOF
13911 if { (eval echo configure:13912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13912   rm -rf conftest*
13913   # It does; now see whether it defined to BIG_ENDIAN or not.
13914 cat > conftest.$ac_ext <<EOF
13915 #line 13916 "configure"
13916 #include "confdefs.h"
13917 #include <sys/types.h>
13918 #include <sys/param.h>
13919 int main() {
13920
13921 #if BYTE_ORDER != BIG_ENDIAN
13922  not big endian
13923 #endif
13924 ; return 0; }
13925 EOF
13926 if { (eval echo configure:13927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13927   rm -rf conftest*
13928   ac_cv_c_bigendian=yes
13929 else
13930   echo "configure: failed program was:" >&5
13931   cat conftest.$ac_ext >&5
13932   rm -rf conftest*
13933   ac_cv_c_bigendian=no
13934 fi
13935 rm -f conftest*
13936 else
13937   echo "configure: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939 fi
13940 rm -f conftest*
13941 if test $ac_cv_c_bigendian = unknown; then
13942 if test "$cross_compiling" = yes; then
13943     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13944 else
13945   cat > conftest.$ac_ext <<EOF
13946 #line 13947 "configure"
13947 #include "confdefs.h"
13948 main () {
13949   /* Are we little or big endian?  From Harbison&Steele.  */
13950   union
13951   {
13952     long l;
13953     char c[sizeof (long)];
13954   } u;
13955   u.l = 1;
13956   exit (u.c[sizeof (long) - 1] == 1);
13957 }
13958 EOF
13959 if { (eval echo configure:13960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13960 then
13961   ac_cv_c_bigendian=no
13962 else
13963   echo "configure: failed program was:" >&5
13964   cat conftest.$ac_ext >&5
13965   rm -fr conftest*
13966   ac_cv_c_bigendian=yes
13967 fi
13968 rm -fr conftest*
13969 fi
13970
13971 fi
13972 fi
13973
13974 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13975 if test $ac_cv_c_bigendian = yes; then
13976   cat >> confdefs.h <<\EOF
13977 #define WORDS_BIGENDIAN 1
13978 EOF
13979
13980 fi
13981
13982 fi
13983
13984 echo $ac_n "checking size of short""... $ac_c" 1>&6
13985 echo "configure:13986: checking size of short" >&5 
13986 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13987   echo $ac_n "(cached) $ac_c" 1>&6
13988 else
13989   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
13990   cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 #include "confdefs.h" 
13994 #include <sys/types.h> 
13995  
13996
13997 int main() {
13998 switch (0) case 0: case (sizeof (short) == $ac_size):;
13999 ; return 0; }
14000 EOF
14001 if { (eval echo configure:14002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14002   rm -rf conftest*
14003   ac_cv_sizeof_short=$ac_size
14004 else
14005   echo "configure: failed program was:" >&5
14006   cat conftest.$ac_ext >&5
14007 fi
14008 rm -f conftest* 
14009   if test x$ac_cv_sizeof_short != x ; then break; fi 
14010 done 
14011
14012 fi
14013  
14014 if test x$ac_cv_sizeof_short = x ; then 
14015   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14016 fi 
14017 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14018 cat >> confdefs.h <<EOF
14019 #define SIZEOF_SHORT $ac_cv_sizeof_short
14020 EOF
14021  
14022  
14023 echo $ac_n "checking size of int""... $ac_c" 1>&6
14024 echo "configure:14025: checking size of int" >&5 
14025 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14026   echo $ac_n "(cached) $ac_c" 1>&6
14027 else
14028   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14029   cat > conftest.$ac_ext <<EOF
14030 #line 14031 "configure"
14031 #include "confdefs.h"
14032 #include "confdefs.h" 
14033 #include <sys/types.h> 
14034  
14035
14036 int main() {
14037 switch (0) case 0: case (sizeof (int) == $ac_size):;
14038 ; return 0; }
14039 EOF
14040 if { (eval echo configure:14041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14041   rm -rf conftest*
14042   ac_cv_sizeof_int=$ac_size
14043 else
14044   echo "configure: failed program was:" >&5
14045   cat conftest.$ac_ext >&5
14046 fi
14047 rm -f conftest* 
14048   if test x$ac_cv_sizeof_int != x ; then break; fi 
14049 done 
14050
14051 fi
14052  
14053 if test x$ac_cv_sizeof_int = x ; then 
14054   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14055 fi 
14056 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14057 cat >> confdefs.h <<EOF
14058 #define SIZEOF_INT $ac_cv_sizeof_int
14059 EOF
14060  
14061  
14062 echo $ac_n "checking size of long""... $ac_c" 1>&6
14063 echo "configure:14064: checking size of long" >&5 
14064 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14065   echo $ac_n "(cached) $ac_c" 1>&6
14066 else
14067   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14068   cat > conftest.$ac_ext <<EOF
14069 #line 14070 "configure"
14070 #include "confdefs.h"
14071 #include "confdefs.h" 
14072 #include <sys/types.h> 
14073  
14074
14075 int main() {
14076 switch (0) case 0: case (sizeof (long) == $ac_size):;
14077 ; return 0; }
14078 EOF
14079 if { (eval echo configure:14080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14080   rm -rf conftest*
14081   ac_cv_sizeof_long=$ac_size
14082 else
14083   echo "configure: failed program was:" >&5
14084   cat conftest.$ac_ext >&5
14085 fi
14086 rm -f conftest* 
14087   if test x$ac_cv_sizeof_long != x ; then break; fi 
14088 done 
14089
14090 fi
14091  
14092 if test x$ac_cv_sizeof_long = x ; then 
14093   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14094 fi 
14095 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14096 cat >> confdefs.h <<EOF
14097 #define SIZEOF_LONG $ac_cv_sizeof_long
14098 EOF
14099  
14100
14101
14102 if test "$ac_cv_sizeof_int" -lt 4 ; then
14103         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14104
14105         cat >> confdefs.h <<\EOF
14106 #define LBER_INT_T long
14107 EOF
14108
14109         cat >> confdefs.h <<\EOF
14110 #define LBER_TAG_T long
14111 EOF
14112
14113         cat >> confdefs.h <<\EOF
14114 #define LBER_SOCKET_T int
14115 EOF
14116
14117 else
14118         cat >> confdefs.h <<\EOF
14119 #define LBER_INT_T int
14120 EOF
14121
14122         cat >> confdefs.h <<\EOF
14123 #define LBER_TAG_T long
14124 EOF
14125
14126         cat >> confdefs.h <<\EOF
14127 #define LBER_SOCKET_T int
14128 EOF
14129
14130 fi
14131
14132 cat >> confdefs.h <<\EOF
14133 #define LBER_LEN_T long
14134 EOF
14135
14136
14137 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14138 echo "configure:14139: checking for 8-bit clean memcmp" >&5
14139 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14140   echo $ac_n "(cached) $ac_c" 1>&6
14141 else
14142   if test "$cross_compiling" = yes; then
14143   ac_cv_func_memcmp_clean=no
14144 else
14145   cat > conftest.$ac_ext <<EOF
14146 #line 14147 "configure"
14147 #include "confdefs.h"
14148
14149 main()
14150 {
14151   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14152   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14153 }
14154
14155 EOF
14156 if { (eval echo configure:14157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14157 then
14158   ac_cv_func_memcmp_clean=yes
14159 else
14160   echo "configure: failed program was:" >&5
14161   cat conftest.$ac_ext >&5
14162   rm -fr conftest*
14163   ac_cv_func_memcmp_clean=no
14164 fi
14165 rm -fr conftest*
14166 fi
14167
14168 fi
14169
14170 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14171 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14172
14173 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14174 echo "configure:14175: checking for strftime" >&5
14175 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14176   echo $ac_n "(cached) $ac_c" 1>&6
14177 else
14178   cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 /* System header to define __stub macros and hopefully few prototypes,
14182     which can conflict with char strftime(); below.  */
14183 #include <assert.h>
14184 /* Override any gcc2 internal prototype to avoid an error.  */
14185 /* We use char because int might match the return type of a gcc2
14186     builtin and then its argument prototype would still apply.  */
14187 char strftime();
14188 char (*f)();
14189
14190 int main() {
14191
14192 /* The GNU C library defines this for functions which it implements
14193     to always fail with ENOSYS.  Some functions are actually named
14194     something starting with __ and the normal name is an alias.  */
14195 #if defined (__stub_strftime) || defined (__stub___strftime)
14196 choke me
14197 #else
14198 f = strftime;
14199 #endif
14200
14201 ; return 0; }
14202 EOF
14203 if { (eval echo configure:14204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14204   rm -rf conftest*
14205   eval "ac_cv_func_strftime=yes"
14206 else
14207   echo "configure: failed program was:" >&5
14208   cat conftest.$ac_ext >&5
14209   rm -rf conftest*
14210   eval "ac_cv_func_strftime=no"
14211 fi
14212 rm -f conftest*
14213 fi
14214
14215 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14216   echo "$ac_t""yes" 1>&6
14217   cat >> confdefs.h <<\EOF
14218 #define HAVE_STRFTIME 1
14219 EOF
14220
14221 else
14222   echo "$ac_t""no" 1>&6
14223 # strftime is in -lintl on SCO UNIX.
14224 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14225 echo "configure:14226: checking for strftime in -lintl" >&5
14226 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14227 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14228   echo $ac_n "(cached) $ac_c" 1>&6
14229 else
14230   ac_save_LIBS="$LIBS"
14231 LIBS="-lintl  $LIBS"
14232 cat > conftest.$ac_ext <<EOF
14233 #line 14234 "configure"
14234 #include "confdefs.h"
14235 /* Override any gcc2 internal prototype to avoid an error.  */
14236 /* We use char because int might match the return type of a gcc2
14237     builtin and then its argument prototype would still apply.  */
14238 char strftime();
14239
14240 int main() {
14241 strftime()
14242 ; return 0; }
14243 EOF
14244 if { (eval echo configure:14245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14245   rm -rf conftest*
14246   eval "ac_cv_lib_$ac_lib_var=yes"
14247 else
14248   echo "configure: failed program was:" >&5
14249   cat conftest.$ac_ext >&5
14250   rm -rf conftest*
14251   eval "ac_cv_lib_$ac_lib_var=no"
14252 fi
14253 rm -f conftest*
14254 LIBS="$ac_save_LIBS"
14255
14256 fi
14257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14258   echo "$ac_t""yes" 1>&6
14259   cat >> confdefs.h <<\EOF
14260 #define HAVE_STRFTIME 1
14261 EOF
14262
14263 LIBS="-lintl $LIBS"
14264 else
14265   echo "$ac_t""no" 1>&6
14266 fi
14267
14268 fi
14269
14270
14271 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14272 echo "configure:14273: checking for inet_aton()" >&5
14273 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14274   echo $ac_n "(cached) $ac_c" 1>&6
14275 else
14276   cat > conftest.$ac_ext <<EOF
14277 #line 14278 "configure"
14278 #include "confdefs.h"
14279
14280 #ifdef HAVE_SYS_TYPES_H
14281 #       include <sys/types.h>
14282 #endif
14283 #ifdef HAVE_SYS_SOCKET_H
14284 #       include <sys/socket.h>
14285 #       ifdef HAVE_SYS_SELECT_H
14286 #               include <sys/select.h>
14287 #       endif
14288 #       include <netinet/in.h>
14289 #       ifdef HAVE_ARPA_INET_H
14290 #               include <arpa/inet.h>
14291 #       endif
14292 #endif
14293
14294 int main() {
14295 struct in_addr in;
14296 int rc = inet_aton( "255.255.255.255", &in );
14297 ; return 0; }
14298 EOF
14299 if { (eval echo configure:14300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14300   rm -rf conftest*
14301   ol_cv_func_inet_aton=yes
14302 else
14303   echo "configure: failed program was:" >&5
14304   cat conftest.$ac_ext >&5
14305   rm -rf conftest*
14306   ol_cv_func_inet_aton=no
14307 fi
14308 rm -f conftest*
14309 fi
14310
14311 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14312   if test $ol_cv_func_inet_aton != no; then
14313     cat >> confdefs.h <<\EOF
14314 #define HAVE_INET_ATON 1
14315 EOF
14316
14317   fi
14318  
14319
14320 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14321 echo "configure:14322: checking for _spawnlp" >&5
14322 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14323   echo $ac_n "(cached) $ac_c" 1>&6
14324 else
14325   cat > conftest.$ac_ext <<EOF
14326 #line 14327 "configure"
14327 #include "confdefs.h"
14328 /* System header to define __stub macros and hopefully few prototypes,
14329     which can conflict with char _spawnlp(); below.  */
14330 #include <assert.h>
14331 /* Override any gcc2 internal prototype to avoid an error.  */
14332 /* We use char because int might match the return type of a gcc2
14333     builtin and then its argument prototype would still apply.  */
14334 char _spawnlp();
14335 char (*f)();
14336
14337 int main() {
14338
14339 /* The GNU C library defines this for functions which it implements
14340     to always fail with ENOSYS.  Some functions are actually named
14341     something starting with __ and the normal name is an alias.  */
14342 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14343 choke me
14344 #else
14345 f = _spawnlp;
14346 #endif
14347
14348 ; return 0; }
14349 EOF
14350 if { (eval echo configure:14351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14351   rm -rf conftest*
14352   eval "ac_cv_func__spawnlp=yes"
14353 else
14354   echo "configure: failed program was:" >&5
14355   cat conftest.$ac_ext >&5
14356   rm -rf conftest*
14357   eval "ac_cv_func__spawnlp=no"
14358 fi
14359 rm -f conftest*
14360 fi
14361
14362 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14363   echo "$ac_t""yes" 1>&6
14364   cat >> confdefs.h <<\EOF
14365 #define HAVE_SPAWNLP 1
14366 EOF
14367
14368 else
14369   echo "$ac_t""no" 1>&6
14370 fi
14371
14372
14373 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14374 echo "configure:14375: checking for _snprintf" >&5
14375 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14376   echo $ac_n "(cached) $ac_c" 1>&6
14377 else
14378   cat > conftest.$ac_ext <<EOF
14379 #line 14380 "configure"
14380 #include "confdefs.h"
14381 /* System header to define __stub macros and hopefully few prototypes,
14382     which can conflict with char _snprintf(); below.  */
14383 #include <assert.h>
14384 /* Override any gcc2 internal prototype to avoid an error.  */
14385 /* We use char because int might match the return type of a gcc2
14386     builtin and then its argument prototype would still apply.  */
14387 char _snprintf();
14388 char (*f)();
14389
14390 int main() {
14391
14392 /* The GNU C library defines this for functions which it implements
14393     to always fail with ENOSYS.  Some functions are actually named
14394     something starting with __ and the normal name is an alias.  */
14395 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14396 choke me
14397 #else
14398 f = _snprintf;
14399 #endif
14400
14401 ; return 0; }
14402 EOF
14403 if { (eval echo configure:14404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14404   rm -rf conftest*
14405   eval "ac_cv_func__snprintf=yes"
14406 else
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -rf conftest*
14410   eval "ac_cv_func__snprintf=no"
14411 fi
14412 rm -f conftest*
14413 fi
14414
14415 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14416   echo "$ac_t""yes" 1>&6
14417   ac_cv_func_snprintf=yes
14418         cat >> confdefs.h <<\EOF
14419 #define snprintf _snprintf
14420 EOF
14421
14422
14423 else
14424   echo "$ac_t""no" 1>&6
14425 fi
14426
14427
14428 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14429 echo "configure:14430: checking for _vsnprintf" >&5
14430 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14431   echo $ac_n "(cached) $ac_c" 1>&6
14432 else
14433   cat > conftest.$ac_ext <<EOF
14434 #line 14435 "configure"
14435 #include "confdefs.h"
14436 /* System header to define __stub macros and hopefully few prototypes,
14437     which can conflict with char _vsnprintf(); below.  */
14438 #include <assert.h>
14439 /* Override any gcc2 internal prototype to avoid an error.  */
14440 /* We use char because int might match the return type of a gcc2
14441     builtin and then its argument prototype would still apply.  */
14442 char _vsnprintf();
14443 char (*f)();
14444
14445 int main() {
14446
14447 /* The GNU C library defines this for functions which it implements
14448     to always fail with ENOSYS.  Some functions are actually named
14449     something starting with __ and the normal name is an alias.  */
14450 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14451 choke me
14452 #else
14453 f = _vsnprintf;
14454 #endif
14455
14456 ; return 0; }
14457 EOF
14458 if { (eval echo configure:14459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14459   rm -rf conftest*
14460   eval "ac_cv_func__vsnprintf=yes"
14461 else
14462   echo "configure: failed program was:" >&5
14463   cat conftest.$ac_ext >&5
14464   rm -rf conftest*
14465   eval "ac_cv_func__vsnprintf=no"
14466 fi
14467 rm -f conftest*
14468 fi
14469
14470 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14471   echo "$ac_t""yes" 1>&6
14472   ac_cv_func_vsnprintf=yes
14473         cat >> confdefs.h <<\EOF
14474 #define vsnprintf _vsnprintf
14475 EOF
14476
14477
14478 else
14479   echo "$ac_t""no" 1>&6
14480 fi
14481
14482
14483 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14484 echo "configure:14485: checking for vprintf" >&5
14485 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14486   echo $ac_n "(cached) $ac_c" 1>&6
14487 else
14488   cat > conftest.$ac_ext <<EOF
14489 #line 14490 "configure"
14490 #include "confdefs.h"
14491 /* System header to define __stub macros and hopefully few prototypes,
14492     which can conflict with char vprintf(); below.  */
14493 #include <assert.h>
14494 /* Override any gcc2 internal prototype to avoid an error.  */
14495 /* We use char because int might match the return type of a gcc2
14496     builtin and then its argument prototype would still apply.  */
14497 char vprintf();
14498 char (*f)();
14499
14500 int main() {
14501
14502 /* The GNU C library defines this for functions which it implements
14503     to always fail with ENOSYS.  Some functions are actually named
14504     something starting with __ and the normal name is an alias.  */
14505 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14506 choke me
14507 #else
14508 f = vprintf;
14509 #endif
14510
14511 ; return 0; }
14512 EOF
14513 if { (eval echo configure:14514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14514   rm -rf conftest*
14515   eval "ac_cv_func_vprintf=yes"
14516 else
14517   echo "configure: failed program was:" >&5
14518   cat conftest.$ac_ext >&5
14519   rm -rf conftest*
14520   eval "ac_cv_func_vprintf=no"
14521 fi
14522 rm -f conftest*
14523 fi
14524
14525 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14526   echo "$ac_t""yes" 1>&6
14527   cat >> confdefs.h <<\EOF
14528 #define HAVE_VPRINTF 1
14529 EOF
14530
14531 else
14532   echo "$ac_t""no" 1>&6
14533 fi
14534
14535 if test "$ac_cv_func_vprintf" != yes; then
14536 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14537 echo "configure:14538: checking for _doprnt" >&5
14538 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14539   echo $ac_n "(cached) $ac_c" 1>&6
14540 else
14541   cat > conftest.$ac_ext <<EOF
14542 #line 14543 "configure"
14543 #include "confdefs.h"
14544 /* System header to define __stub macros and hopefully few prototypes,
14545     which can conflict with char _doprnt(); below.  */
14546 #include <assert.h>
14547 /* Override any gcc2 internal prototype to avoid an error.  */
14548 /* We use char because int might match the return type of a gcc2
14549     builtin and then its argument prototype would still apply.  */
14550 char _doprnt();
14551 char (*f)();
14552
14553 int main() {
14554
14555 /* The GNU C library defines this for functions which it implements
14556     to always fail with ENOSYS.  Some functions are actually named
14557     something starting with __ and the normal name is an alias.  */
14558 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14559 choke me
14560 #else
14561 f = _doprnt;
14562 #endif
14563
14564 ; return 0; }
14565 EOF
14566 if { (eval echo configure:14567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14567   rm -rf conftest*
14568   eval "ac_cv_func__doprnt=yes"
14569 else
14570   echo "configure: failed program was:" >&5
14571   cat conftest.$ac_ext >&5
14572   rm -rf conftest*
14573   eval "ac_cv_func__doprnt=no"
14574 fi
14575 rm -f conftest*
14576 fi
14577
14578 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14579   echo "$ac_t""yes" 1>&6
14580   cat >> confdefs.h <<\EOF
14581 #define HAVE_DOPRNT 1
14582 EOF
14583
14584 else
14585   echo "$ac_t""no" 1>&6
14586 fi
14587
14588 fi
14589
14590
14591 if test $ac_cv_func_vprintf = yes ; then
14592                 for ac_func in vsnprintf vsprintf
14593 do
14594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14595 echo "configure:14596: checking for $ac_func" >&5
14596 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14597   echo $ac_n "(cached) $ac_c" 1>&6
14598 else
14599   cat > conftest.$ac_ext <<EOF
14600 #line 14601 "configure"
14601 #include "confdefs.h"
14602 /* System header to define __stub macros and hopefully few prototypes,
14603     which can conflict with char $ac_func(); below.  */
14604 #include <assert.h>
14605 /* Override any gcc2 internal prototype to avoid an error.  */
14606 /* We use char because int might match the return type of a gcc2
14607     builtin and then its argument prototype would still apply.  */
14608 char $ac_func();
14609 char (*f)();
14610
14611 int main() {
14612
14613 /* The GNU C library defines this for functions which it implements
14614     to always fail with ENOSYS.  Some functions are actually named
14615     something starting with __ and the normal name is an alias.  */
14616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14617 choke me
14618 #else
14619 f = $ac_func;
14620 #endif
14621
14622 ; return 0; }
14623 EOF
14624 if { (eval echo configure:14625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14625   rm -rf conftest*
14626   eval "ac_cv_func_$ac_func=yes"
14627 else
14628   echo "configure: failed program was:" >&5
14629   cat conftest.$ac_ext >&5
14630   rm -rf conftest*
14631   eval "ac_cv_func_$ac_func=no"
14632 fi
14633 rm -f conftest*
14634 fi
14635
14636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14637   echo "$ac_t""yes" 1>&6
14638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14639   cat >> confdefs.h <<EOF
14640 #define $ac_tr_func 1
14641 EOF
14642  
14643 else
14644   echo "$ac_t""no" 1>&6
14645 fi
14646 done
14647
14648 fi
14649
14650 for ac_func in \
14651         bcopy                   \
14652         closesocket             \
14653         endgrent                \
14654         endpwent                \
14655         flock                   \
14656         getdtablesize   \
14657         getgrgid                \
14658         gethostname             \
14659         getpass                 \
14660         getpwuid                \
14661         getpwnam                \
14662         getspnam                \
14663         gettimeofday    \
14664         initgroups              \
14665         lockf                   \
14666         memcpy                  \
14667         memmove                 \
14668         mkstemp                 \
14669         pipe                    \
14670         read                    \
14671         recv                    \
14672         recvfrom                \
14673         setpwfile               \
14674         setgid                  \
14675         setegid                 \
14676         setsid                  \
14677         setuid                  \
14678         seteuid                 \
14679         sigaction               \
14680         signal                  \
14681         sigset                  \
14682         snprintf                \
14683         strdup                  \
14684         strerror                \
14685         strpbrk                 \
14686         strrchr                 \
14687         strsep                  \
14688         strstr                  \
14689         strtol                  \
14690         strtoul                 \
14691         strspn                  \
14692         sysconf                 \
14693         waitpid                 \
14694         wait4                   \
14695         write                   \
14696         send                    \
14697         sendto                  \
14698
14699 do
14700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14701 echo "configure:14702: checking for $ac_func" >&5
14702 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14703   echo $ac_n "(cached) $ac_c" 1>&6
14704 else
14705   cat > conftest.$ac_ext <<EOF
14706 #line 14707 "configure"
14707 #include "confdefs.h"
14708 /* System header to define __stub macros and hopefully few prototypes,
14709     which can conflict with char $ac_func(); below.  */
14710 #include <assert.h>
14711 /* Override any gcc2 internal prototype to avoid an error.  */
14712 /* We use char because int might match the return type of a gcc2
14713     builtin and then its argument prototype would still apply.  */
14714 char $ac_func();
14715 char (*f)();
14716
14717 int main() {
14718
14719 /* The GNU C library defines this for functions which it implements
14720     to always fail with ENOSYS.  Some functions are actually named
14721     something starting with __ and the normal name is an alias.  */
14722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14723 choke me
14724 #else
14725 f = $ac_func;
14726 #endif
14727
14728 ; return 0; }
14729 EOF
14730 if { (eval echo configure:14731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14731   rm -rf conftest*
14732   eval "ac_cv_func_$ac_func=yes"
14733 else
14734   echo "configure: failed program was:" >&5
14735   cat conftest.$ac_ext >&5
14736   rm -rf conftest*
14737   eval "ac_cv_func_$ac_func=no"
14738 fi
14739 rm -f conftest*
14740 fi
14741
14742 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14743   echo "$ac_t""yes" 1>&6
14744     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14745   cat >> confdefs.h <<EOF
14746 #define $ac_tr_func 1
14747 EOF
14748  
14749 else
14750   echo "$ac_t""no" 1>&6
14751 fi
14752 done
14753
14754
14755 for ac_func in getopt tempnam
14756 do
14757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14758 echo "configure:14759: checking for $ac_func" >&5
14759 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14760   echo $ac_n "(cached) $ac_c" 1>&6
14761 else
14762   cat > conftest.$ac_ext <<EOF
14763 #line 14764 "configure"
14764 #include "confdefs.h"
14765 /* System header to define __stub macros and hopefully few prototypes,
14766     which can conflict with char $ac_func(); below.  */
14767 #include <assert.h>
14768 /* Override any gcc2 internal prototype to avoid an error.  */
14769 /* We use char because int might match the return type of a gcc2
14770     builtin and then its argument prototype would still apply.  */
14771 char $ac_func();
14772 char (*f)();
14773
14774 int main() {
14775
14776 /* The GNU C library defines this for functions which it implements
14777     to always fail with ENOSYS.  Some functions are actually named
14778     something starting with __ and the normal name is an alias.  */
14779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14780 choke me
14781 #else
14782 f = $ac_func;
14783 #endif
14784
14785 ; return 0; }
14786 EOF
14787 if { (eval echo configure:14788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14788   rm -rf conftest*
14789   eval "ac_cv_func_$ac_func=yes"
14790 else
14791   echo "configure: failed program was:" >&5
14792   cat conftest.$ac_ext >&5
14793   rm -rf conftest*
14794   eval "ac_cv_func_$ac_func=no"
14795 fi
14796 rm -f conftest*
14797 fi
14798
14799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14800   echo "$ac_t""yes" 1>&6
14801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14802   cat >> confdefs.h <<EOF
14803 #define $ac_tr_func 1
14804 EOF
14805  
14806 else
14807   echo "$ac_t""no" 1>&6
14808 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14809 fi
14810 done
14811
14812
14813
14814 if test "$ac_cv_func_getopt" != yes; then
14815     LIBSRCS="$LIBSRCS getopt.c"
14816 fi
14817
14818 if test "$ac_cv_func_tempnam" != yes; then
14819     LIBSRCS="$LIBSRCS tempnam.c"
14820 fi
14821
14822 # Check Configuration
14823 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14824 echo "configure:14825: checking declaration of sys_errlist" >&5
14825 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14826   echo $ac_n "(cached) $ac_c" 1>&6
14827 else
14828   
14829         cat > conftest.$ac_ext <<EOF
14830 #line 14831 "configure"
14831 #include "confdefs.h"
14832
14833 #include <stdio.h>
14834 #include <sys/types.h>
14835 #include <errno.h>
14836 #ifdef WINNT
14837 #include <stdlib.h>
14838 #endif 
14839 int main() {
14840 char *c = (char *) *sys_errlist
14841 ; return 0; }
14842 EOF
14843 if { (eval echo configure:14844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14844   rm -rf conftest*
14845   ol_cv_dcl_sys_errlist=yes
14846         ol_cv_have_sys_errlist=yes
14847 else
14848   echo "configure: failed program was:" >&5
14849   cat conftest.$ac_ext >&5
14850   rm -rf conftest*
14851   ol_cv_dcl_sys_errlist=no
14852 fi
14853 rm -f conftest*
14854 fi
14855
14856 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14857 #
14858 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14859 if test $ol_cv_dcl_sys_errlist = no ; then
14860         cat >> confdefs.h <<\EOF
14861 #define DECL_SYS_ERRLIST 1
14862 EOF
14863
14864
14865         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14866 echo "configure:14867: checking existence of sys_errlist" >&5
14867 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14868   echo $ac_n "(cached) $ac_c" 1>&6
14869 else
14870   
14871                 cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874 #include <errno.h>
14875 int main() {
14876 char *c = (char *) *sys_errlist
14877 ; return 0; }
14878 EOF
14879 if { (eval echo configure:14880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14880   rm -rf conftest*
14881   ol_cv_have_sys_errlist=yes
14882 else
14883   echo "configure: failed program was:" >&5
14884   cat conftest.$ac_ext >&5
14885   rm -rf conftest*
14886   ol_cv_have_sys_errlist=no
14887 fi
14888 rm -f conftest*
14889 fi
14890
14891 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14892 fi
14893 if test $ol_cv_have_sys_errlist = yes ; then
14894         cat >> confdefs.h <<\EOF
14895 #define HAVE_SYS_ERRLIST 1
14896 EOF
14897
14898 fi
14899
14900
14901
14902 if test "$ol_enable_debug" != no ; then
14903         cat >> confdefs.h <<\EOF
14904 #define LDAP_DEBUG 1
14905 EOF
14906
14907 fi
14908 if test "$ol_enable_syslog" = yes ; then
14909         cat >> confdefs.h <<\EOF
14910 #define LDAP_SYSLOG 1
14911 EOF
14912
14913 fi
14914 if test "$ol_enable_libui" = yes ; then
14915         cat >> confdefs.h <<\EOF
14916 #define LDAP_LIBUI 1
14917 EOF
14918
14919 fi
14920 if test "$ol_enable_cache" = no ; then
14921         cat >> confdefs.h <<\EOF
14922 #define LDAP_NOCACHE 1
14923 EOF
14924
14925 fi
14926 if test "$ol_enable_dns" != no ; then
14927         cat >> confdefs.h <<\EOF
14928 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14929 EOF
14930
14931 fi
14932 if test "$ol_enable_proctitle" != no ; then
14933         cat >> confdefs.h <<\EOF
14934 #define LDAP_PROCTITLE 1
14935 EOF
14936
14937 fi
14938 if test "$ol_enable_referrals" != no ; then
14939         cat >> confdefs.h <<\EOF
14940 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14941 EOF
14942
14943 fi
14944 if test "$ol_enable_cldap" != no ; then
14945         cat >> confdefs.h <<\EOF
14946 #define LDAP_CONNECTIONLESS 1
14947 EOF
14948
14949 fi
14950
14951 if test "$ol_enable_crypt" != no ; then
14952         cat >> confdefs.h <<\EOF
14953 #define SLAPD_CRYPT 1
14954 EOF
14955
14956 fi
14957 if test "$ol_enable_cleartext" != no ; then
14958         cat >> confdefs.h <<\EOF
14959 #define SLAPD_CLEARTEXT 1
14960 EOF
14961
14962 fi
14963 if test "$ol_enable_multimaster" != no ; then
14964         cat >> confdefs.h <<\EOF
14965 #define SLAPD_MULTIMASTER 1
14966 EOF
14967
14968 fi
14969 if test "$ol_enable_phonetic" != no ; then
14970         cat >> confdefs.h <<\EOF
14971 #define SLAPD_PHONETIC 1
14972 EOF
14973
14974 fi
14975 if test "$ol_enable_rlookups" != no ; then
14976         cat >> confdefs.h <<\EOF
14977 #define SLAPD_RLOOKUPS 1
14978 EOF
14979
14980 fi
14981 if test "$ol_enable_aci" != no ; then
14982         cat >> confdefs.h <<\EOF
14983 #define SLAPD_ACI_ENABLED 1
14984 EOF
14985
14986 fi
14987 if test "$ol_enable_discreteaci" != no ; then
14988         cat >> confdefs.h <<\EOF
14989 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14990 EOF
14991
14992 fi
14993
14994 if test "$ol_link_modules" != no ; then
14995         cat >> confdefs.h <<\EOF
14996 #define SLAPD_MODULES 1
14997 EOF
14998
14999         BUILD_SLAPD=yes
15000         SLAPD_MODULES_LDFLAGS="-dlopen self"
15001 fi
15002
15003 if test "$ol_link_bdb2" != no ; then
15004         cat >> confdefs.h <<\EOF
15005 #define SLAPD_BDB2 1
15006 EOF
15007
15008         BUILD_SLAPD=yes
15009         BUILD_BDB2=yes
15010         if test "$ol_with_bdb2_module" != static ; then
15011                 cat >> confdefs.h <<\EOF
15012 #define SLAPD_BDB2_DYNAMIC 1
15013 EOF
15014
15015                 BUILD_BDB2=mod
15016                 BUILD_BDB2_DYNAMIC=shared
15017                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15018         fi
15019 fi
15020
15021 if test "$ol_enable_ldap" != no ; then
15022         cat >> confdefs.h <<\EOF
15023 #define SLAPD_LDAP 1
15024 EOF
15025
15026         BUILD_SLAPD=yes
15027         BUILD_LDAP=yes
15028         if test "$ol_with_ldap_module" != static ; then
15029                 cat >> confdefs.h <<\EOF
15030 #define SLAPD_LDAP_DYNAMIC 1
15031 EOF
15032
15033                 BUILD_LDAP=mod
15034                 BUILD_LDAP_DYNAMIC=shared
15035                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15036         fi
15037 fi
15038
15039 if test "$ol_link_ldbm" != no ; then
15040         cat >> confdefs.h <<\EOF
15041 #define SLAPD_LDBM 1
15042 EOF
15043
15044         BUILD_SLAPD=yes
15045         BUILD_LDBM=yes
15046         if test "$ol_with_ldbm_module" != static ; then
15047                 cat >> confdefs.h <<\EOF
15048 #define SLAPD_LDBM_DYNAMIC 1
15049 EOF
15050
15051                 BUILD_LDBM=mod
15052                 BUILD_LDBM_DYNAMIC=shared
15053                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15054         fi
15055 fi
15056
15057 if test "$ol_enable_passwd" != no ; then
15058         cat >> confdefs.h <<\EOF
15059 #define SLAPD_PASSWD 1
15060 EOF
15061
15062         BUILD_SLAPD=yes
15063         BUILD_PASSWD=yes
15064         if test "$ol_with_passwd_module" != static ; then
15065                 cat >> confdefs.h <<\EOF
15066 #define SLAPD_PASSWD_DYNAMIC 1
15067 EOF
15068
15069                 BUILD_PASSWD=mod
15070                 BUILD_PASSWD_DYNAMIC=shared
15071                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15072         fi
15073 fi
15074
15075 if test "$ol_link_perl" != no ; then
15076         cat >> confdefs.h <<\EOF
15077 #define SLAPD_PERL 1
15078 EOF
15079
15080         BUILD_SLAPD=yes
15081         BUILD_PERL=yes
15082         if test "$ol_with_perl_module" != static ; then
15083                 cat >> confdefs.h <<\EOF
15084 #define SLAPD_PERL_DYNAMIC 1
15085 EOF
15086
15087                 BUILD_PERL=mod
15088                 BUILD_PERL_DYNAMIC=shared
15089                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15090         fi
15091 fi
15092
15093 if test "$ol_enable_shell" != no ; then
15094         cat >> confdefs.h <<\EOF
15095 #define SLAPD_SHELL 1
15096 EOF
15097
15098         BUILD_SLAPD=yes
15099         BUILD_SHELL=yes
15100         if test "$ol_with_shell_module" != static ; then
15101                 cat >> confdefs.h <<\EOF
15102 #define SLAPD_SHELL_DYNAMIC 1
15103 EOF
15104
15105                 BUILD_SHELL=mod
15106                 BUILD_SHELL_DYNAMIC=shared
15107                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15108         fi
15109 fi
15110
15111 if test "$ol_enable_tcl" != no ; then
15112         cat >> confdefs.h <<\EOF
15113 #define SLAPD_TCL 1
15114 EOF
15115
15116         BUILD_SLAPD=yes
15117         BUILD_TCL=yes
15118         if test "$ol_with_tcl_module" != static; then
15119                 cat >> confdefs.h <<\EOF
15120 #define SLAPD_TCL_DYNAMIC 1
15121 EOF
15122
15123                 BUILD_TCL=mod
15124                 BUILD_TCL_DYNAMIC=shared
15125                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15126         fi
15127 fi
15128
15129 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15130         $BUILD_SLAPD = yes ; then
15131         BUILD_SLURPD=yes
15132 fi
15133
15134 if test "$ol_link_isode" != no ; then
15135         BUILD_LDAPD=yes
15136 fi
15137
15138
15139 if test "$LINK_BINS_DYNAMIC" = yes; then
15140     LIB_LINKAGE=DYN
15141     LT_LIB_LINKAGE=shared
15142 else
15143     LIB_LINKAGE=STAT
15144     LT_LIB_LINKAGE=static
15145 fi
15146
15147 if test "$ac_cv_mingw32" = yes ; then
15148     PLAT=NT
15149     DYN_EXT=dll
15150 else
15151     PLAT=UNIX
15152     DYN_EXT=so
15153 fi
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164   
15165   
15166   
15167   
15168   
15169   
15170   
15171   
15172   
15173   
15174   
15175   
15176   
15177   
15178   
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 trap '' 1 2 15
15210
15211 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15212
15213 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15214 # Let make expand exec_prefix.
15215 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15216
15217 # Any assignment to VPATH causes Sun make to only execute
15218 # the first set of double-colon rules, so remove it if not needed.
15219 # If there is a colon in the path, we need to keep it.
15220 if test "x$srcdir" = x.; then
15221   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15222 fi
15223
15224 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15225
15226 DEFS=-DHAVE_CONFIG_H
15227
15228 # Without the "./", some shells look in PATH for config.status.
15229 : ${CONFIG_STATUS=./config.status}
15230
15231 echo creating $CONFIG_STATUS
15232 rm -f $CONFIG_STATUS
15233 cat > $CONFIG_STATUS <<EOF
15234 #! /bin/sh
15235 # Generated automatically by configure.
15236 # Run this file to recreate the current configuration.
15237 # This directory was configured as follows,
15238 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15239 #
15240 # $0 $ac_configure_args
15241 #
15242 # Compiler output produced by configure, useful for debugging
15243 # configure, is in ./config.log if it exists.
15244
15245 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15246 for ac_option
15247 do
15248   case "\$ac_option" in
15249   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15250     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15251     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15252   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15253     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15254     exit 0 ;;
15255   -help | --help | --hel | --he | --h)
15256     echo "\$ac_cs_usage"; exit 0 ;;
15257   *) echo "\$ac_cs_usage"; exit 1 ;;
15258   esac
15259 done
15260
15261 ac_given_srcdir=$srcdir
15262 ac_given_INSTALL="$INSTALL"
15263
15264 trap 'rm -fr `echo "\
15265 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15266 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15267 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15268 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15269 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15270 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15271 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15272 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15273 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15274 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15275 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15276 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15277 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15278 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15279 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15280 include/Makefile:build/top.mk:include/Makefile.in \
15281 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15282 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15283 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15284 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15285 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15286 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15287 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15288 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15289 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15290 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15291 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15292 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15293 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15294 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15295 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15296 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15297 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15298 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15299 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15300 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15301 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15302 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15303 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15304 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15305 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15306 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15307  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15308 EOF
15309 cat >> $CONFIG_STATUS <<EOF
15310
15311 # Protect against being on the right side of a sed subst in config.status.
15312 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15313  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15314 $ac_vpsub
15315 $extrasub
15316 s%@SHELL@%$SHELL%g
15317 s%@CFLAGS@%$CFLAGS%g
15318 s%@CPPFLAGS@%$CPPFLAGS%g
15319 s%@CXXFLAGS@%$CXXFLAGS%g
15320 s%@FFLAGS@%$FFLAGS%g
15321 s%@DEFS@%$DEFS%g
15322 s%@LDFLAGS@%$LDFLAGS%g
15323 s%@LIBS@%$LIBS%g
15324 s%@exec_prefix@%$exec_prefix%g
15325 s%@prefix@%$prefix%g
15326 s%@program_transform_name@%$program_transform_name%g
15327 s%@bindir@%$bindir%g
15328 s%@sbindir@%$sbindir%g
15329 s%@libexecdir@%$libexecdir%g
15330 s%@datadir@%$datadir%g
15331 s%@sysconfdir@%$sysconfdir%g
15332 s%@sharedstatedir@%$sharedstatedir%g
15333 s%@localstatedir@%$localstatedir%g
15334 s%@libdir@%$libdir%g
15335 s%@includedir@%$includedir%g
15336 s%@oldincludedir@%$oldincludedir%g
15337 s%@infodir@%$infodir%g
15338 s%@mandir@%$mandir%g
15339 s%@host@%$host%g
15340 s%@host_alias@%$host_alias%g
15341 s%@host_cpu@%$host_cpu%g
15342 s%@host_vendor@%$host_vendor%g
15343 s%@host_os@%$host_os%g
15344 s%@target@%$target%g
15345 s%@target_alias@%$target_alias%g
15346 s%@target_cpu@%$target_cpu%g
15347 s%@target_vendor@%$target_vendor%g
15348 s%@target_os@%$target_os%g
15349 s%@build@%$build%g
15350 s%@build_alias@%$build_alias%g
15351 s%@build_cpu@%$build_cpu%g
15352 s%@build_vendor@%$build_vendor%g
15353 s%@build_os@%$build_os%g
15354 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15355 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15356 s%@INSTALL_DATA@%$INSTALL_DATA%g
15357 s%@PACKAGE@%$PACKAGE%g
15358 s%@VERSION@%$VERSION%g
15359 s%@ACLOCAL@%$ACLOCAL%g
15360 s%@AUTOCONF@%$AUTOCONF%g
15361 s%@AUTOMAKE@%$AUTOMAKE%g
15362 s%@AUTOHEADER@%$AUTOHEADER%g
15363 s%@MAKEINFO@%$MAKEINFO%g
15364 s%@install_sh@%$install_sh%g
15365 s%@AMTAR@%$AMTAR%g
15366 s%@AWK@%$AWK%g
15367 s%@AMTARFLAGS@%$AMTARFLAGS%g
15368 s%@SET_MAKE@%$SET_MAKE%g
15369 s%@top_builddir@%$top_builddir%g
15370 s%@ldap_subdir@%$ldap_subdir%g
15371 s%@CC@%$CC%g
15372 s%@RANLIB@%$RANLIB%g
15373 s%@LD@%$LD%g
15374 s%@NM@%$NM%g
15375 s%@LN_S@%$LN_S%g
15376 s%@DLLTOOL@%$DLLTOOL%g
15377 s%@AS@%$AS%g
15378 s%@OBJDUMP@%$OBJDUMP%g
15379 s%@LIBTOOL@%$LIBTOOL%g
15380 s%@LN_H@%$LN_H%g
15381 s%@SENDMAIL@%$SENDMAIL%g
15382 s%@EDITOR@%$EDITOR%g
15383 s%@FINGER@%$FINGER%g
15384 s%@PERLBIN@%$PERLBIN%g
15385 s%@CPP@%$CPP%g
15386 s%@EXEEXT@%$EXEEXT%g
15387 s%@OBJEXT@%$OBJEXT%g
15388 s%@OL_MKDEP@%$OL_MKDEP%g
15389 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15390 s%@PEPSY@%$PEPSY%g
15391 s%@LIBOBJS@%$LIBOBJS%g
15392 s%@LIBSRCS@%$LIBSRCS%g
15393 s%@PLAT@%$PLAT%g
15394 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15395 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15396 s%@DYN_EXT@%$DYN_EXT%g
15397 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15398 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15399 s%@BUILD_BDB2@%$BUILD_BDB2%g
15400 s%@BUILD_LDAP@%$BUILD_LDAP%g
15401 s%@BUILD_LDBM@%$BUILD_LDBM%g
15402 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15403 s%@BUILD_PERL@%$BUILD_PERL%g
15404 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15405 s%@BUILD_SHELL@%$BUILD_SHELL%g
15406 s%@BUILD_TCL@%$BUILD_TCL%g
15407 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15408 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15409 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15410 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15411 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15412 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15413 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15414 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15415 s%@LDAP_LIBS@%$LDAP_LIBS%g
15416 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15417 s%@LDIF_LIBS@%$LDIF_LIBS%g
15418 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15419 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15420 s%@LDBM_LIBS@%$LDBM_LIBS%g
15421 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15422 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15423 s%@WRAP_LIBS@%$WRAP_LIBS%g
15424 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15425 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15426 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15427 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15428 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15429 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15430 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15431 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15432 s%@KRB_LIBS@%$KRB_LIBS%g
15433 s%@READLINE_LIBS@%$READLINE_LIBS%g
15434 s%@SASL_LIBS@%$SASL_LIBS%g
15435 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15436 s%@TLS_LIBS@%$TLS_LIBS%g
15437 s%@MODULES_LIBS@%$MODULES_LIBS%g
15438
15439 CEOF
15440 EOF
15441
15442 cat >> $CONFIG_STATUS <<\EOF
15443
15444 # Split the substitutions into bite-sized pieces for seds with
15445 # small command number limits, like on Digital OSF/1 and HP-UX.
15446 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15447 ac_file=1 # Number of current file.
15448 ac_beg=1 # First line for current file.
15449 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15450 ac_more_lines=:
15451 ac_sed_cmds=""
15452 while $ac_more_lines; do
15453   if test $ac_beg -gt 1; then
15454     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15455   else
15456     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15457   fi
15458   if test ! -s conftest.s$ac_file; then
15459     ac_more_lines=false
15460     rm -f conftest.s$ac_file
15461   else
15462     if test -z "$ac_sed_cmds"; then
15463       ac_sed_cmds="sed -f conftest.s$ac_file"
15464     else
15465       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15466     fi
15467     ac_file=`expr $ac_file + 1`
15468     ac_beg=$ac_end
15469     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15470   fi
15471 done
15472 if test -z "$ac_sed_cmds"; then
15473   ac_sed_cmds=cat
15474 fi
15475 EOF
15476
15477 cat >> $CONFIG_STATUS <<EOF
15478
15479 CONFIG_FILES=\${CONFIG_FILES-"\
15480 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15481 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15482 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15483 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15484 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15485 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15486 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15487 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15488 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15489 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15490 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15491 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15492 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15493 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15494 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15495 include/Makefile:build/top.mk:include/Makefile.in \
15496 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15497 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15498 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15499 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15500 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15501 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15502 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15503 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15504 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15505 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15506 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15507 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15508 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15509 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15510 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15511 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15512 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15513 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15514 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15515 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15516 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15517 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15518 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15519 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15520 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15521 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15522 "}
15523 EOF
15524 cat >> $CONFIG_STATUS <<\EOF
15525 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15526   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15527   case "$ac_file" in
15528   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15529        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15530   *) ac_file_in="${ac_file}.in" ;;
15531   esac
15532
15533   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15534
15535   # Remove last slash and all that follows it.  Not all systems have dirname.
15536   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15537   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15538     # The file is in a subdirectory.
15539     test ! -d "$ac_dir" && mkdir "$ac_dir"
15540     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15541     # A "../" for each directory in $ac_dir_suffix.
15542     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15543   else
15544     ac_dir_suffix= ac_dots=
15545   fi
15546
15547   case "$ac_given_srcdir" in
15548   .)  srcdir=.
15549       if test -z "$ac_dots"; then top_srcdir=.
15550       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15551   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15552   *) # Relative path.
15553     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15554     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15555   esac
15556
15557   case "$ac_given_INSTALL" in
15558   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15559   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15560   esac
15561
15562   echo creating "$ac_file"
15563   rm -f "$ac_file"
15564   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15565   case "$ac_file" in
15566   *Makefile*) ac_comsub="1i\\
15567 # $configure_input" ;;
15568   *) ac_comsub= ;;
15569   esac
15570
15571   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15572   sed -e "$ac_comsub
15573 s%@configure_input@%$configure_input%g
15574 s%@srcdir@%$srcdir%g
15575 s%@top_srcdir@%$top_srcdir%g
15576 s%@INSTALL@%$INSTALL%g
15577 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15578 fi; done
15579 rm -f conftest.s*
15580
15581 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15582 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15583 #
15584 # ac_d sets the value in "#define NAME VALUE" lines.
15585 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15586 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15587 ac_dC='\3'
15588 ac_dD='%g'
15589 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15590 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15591 ac_uB='\([      ]\)%\1#\2define\3'
15592 ac_uC=' '
15593 ac_uD='\4%g'
15594 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15595 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15596 ac_eB='$%\1#\2define\3'
15597 ac_eC=' '
15598 ac_eD='%g'
15599
15600 if test "${CONFIG_HEADERS+set}" != set; then
15601 EOF
15602 cat >> $CONFIG_STATUS <<EOF
15603   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15604 EOF
15605 cat >> $CONFIG_STATUS <<\EOF
15606 fi
15607 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15608   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15609   case "$ac_file" in
15610   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15611        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15612   *) ac_file_in="${ac_file}.in" ;;
15613   esac
15614
15615   echo creating $ac_file
15616
15617   rm -f conftest.frag conftest.in conftest.out
15618   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15619   cat $ac_file_inputs > conftest.in
15620
15621 EOF
15622
15623 # Transform confdefs.h into a sed script conftest.vals that substitutes
15624 # the proper values into config.h.in to produce config.h.  And first:
15625 # Protect against being on the right side of a sed subst in config.status.
15626 # Protect against being in an unquoted here document in config.status.
15627 rm -f conftest.vals
15628 cat > conftest.hdr <<\EOF
15629 s/[\\&%]/\\&/g
15630 s%[\\$`]%\\&%g
15631 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15632 s%ac_d%ac_u%gp
15633 s%ac_u%ac_e%gp
15634 EOF
15635 sed -n -f conftest.hdr confdefs.h > conftest.vals
15636 rm -f conftest.hdr
15637
15638 # This sed command replaces #undef with comments.  This is necessary, for
15639 # example, in the case of _POSIX_SOURCE, which is predefined and required
15640 # on some systems where configure will not decide to define it.
15641 cat >> conftest.vals <<\EOF
15642 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15643 EOF
15644
15645 # Break up conftest.vals because some shells have a limit on
15646 # the size of here documents, and old seds have small limits too.
15647
15648 rm -f conftest.tail
15649 while :
15650 do
15651   ac_lines=`grep -c . conftest.vals`
15652   # grep -c gives empty output for an empty file on some AIX systems.
15653   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15654   # Write a limited-size here document to conftest.frag.
15655   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15656   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15657   echo 'CEOF
15658   sed -f conftest.frag conftest.in > conftest.out
15659   rm -f conftest.in
15660   mv conftest.out conftest.in
15661 ' >> $CONFIG_STATUS
15662   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15663   rm -f conftest.vals
15664   mv conftest.tail conftest.vals
15665 done
15666 rm -f conftest.vals
15667
15668 cat >> $CONFIG_STATUS <<\EOF
15669   rm -f conftest.frag conftest.h
15670   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15671   cat conftest.in >> conftest.h
15672   rm -f conftest.in
15673   if cmp -s $ac_file conftest.h 2>/dev/null; then
15674     echo "$ac_file is unchanged"
15675     rm -f conftest.h
15676   else
15677     # Remove last slash and all that follows it.  Not all systems have dirname.
15678       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15679       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15680       # The file is in a subdirectory.
15681       test ! -d "$ac_dir" && mkdir "$ac_dir"
15682     fi
15683     rm -f $ac_file
15684     mv conftest.h $ac_file
15685   fi
15686 fi; done
15687
15688 EOF
15689 cat >> $CONFIG_STATUS <<EOF
15690
15691 EOF
15692 cat >> $CONFIG_STATUS <<\EOF
15693
15694 date > stamp-h
15695 echo Please \"make depend\" to build dependencies
15696
15697 exit 0
15698 EOF
15699 chmod +x $CONFIG_STATUS
15700 rm -fr confdefs* $ac_clean_files
15701 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15702