]> git.sur5r.net Git - openldap/blob - configure
e6559b5df19d2c510b1957ec567c5bbf76b41b43
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.264 1999/10/01 03:11:40 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 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 # Check whether --enable-fast-install or --disable-fast-install was given.
2532 if test "${enable_fast_install+set}" = set; then
2533   enableval="$enable_fast_install"
2534   p=${PACKAGE-default}
2535 case "$enableval" in
2536 yes) enable_fast_install=yes ;;
2537 no) enable_fast_install=no ;;
2538 *)
2539   enable_fast_install=no
2540   # Look at the argument we got.  We use all the common list separators.
2541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2542   for pkg in $enableval; do
2543     if test "X$pkg" = "X$p"; then
2544       enable_fast_install=yes
2545     fi
2546   done
2547   IFS="$ac_save_ifs"
2548   ;;
2549 esac
2550 else
2551   enable_fast_install=yes
2552 fi
2553
2554 # Extract the first word of "ranlib", so it can be a program name with args.
2555 set dummy ranlib; ac_word=$2
2556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2557 echo "configure:2558: checking for $ac_word" >&5
2558 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2559   echo $ac_n "(cached) $ac_c" 1>&6
2560 else
2561   if test -n "$RANLIB"; then
2562   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2563 else
2564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2565   ac_dummy="$PATH"
2566   for ac_dir in $ac_dummy; do
2567     test -z "$ac_dir" && ac_dir=.
2568     if test -f $ac_dir/$ac_word; then
2569       ac_cv_prog_RANLIB="ranlib"
2570       break
2571     fi
2572   done
2573   IFS="$ac_save_ifs"
2574   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2575 fi
2576 fi
2577 RANLIB="$ac_cv_prog_RANLIB"
2578 if test -n "$RANLIB"; then
2579   echo "$ac_t""$RANLIB" 1>&6
2580 else
2581   echo "$ac_t""no" 1>&6
2582 fi
2583
2584 # Extract the first word of "gcc", so it can be a program name with args.
2585 set dummy gcc; ac_word=$2
2586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2587 echo "configure:2588: checking for $ac_word" >&5
2588 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2589   echo $ac_n "(cached) $ac_c" 1>&6
2590 else
2591   if test -n "$CC"; then
2592   ac_cv_prog_CC="$CC" # Let the user override the test.
2593 else
2594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2595   ac_dummy="$PATH"
2596   for ac_dir in $ac_dummy; do
2597     test -z "$ac_dir" && ac_dir=.
2598     if test -f $ac_dir/$ac_word; then
2599       ac_cv_prog_CC="gcc"
2600       break
2601     fi
2602   done
2603   IFS="$ac_save_ifs"
2604 fi
2605 fi
2606 CC="$ac_cv_prog_CC"
2607 if test -n "$CC"; then
2608   echo "$ac_t""$CC" 1>&6
2609 else
2610   echo "$ac_t""no" 1>&6
2611 fi
2612
2613 if test -z "$CC"; then
2614   # Extract the first word of "cc", so it can be a program name with args.
2615 set dummy cc; ac_word=$2
2616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2617 echo "configure:2618: checking for $ac_word" >&5
2618 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2619   echo $ac_n "(cached) $ac_c" 1>&6
2620 else
2621   if test -n "$CC"; then
2622   ac_cv_prog_CC="$CC" # Let the user override the test.
2623 else
2624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2625   ac_prog_rejected=no
2626   ac_dummy="$PATH"
2627   for ac_dir in $ac_dummy; do
2628     test -z "$ac_dir" && ac_dir=.
2629     if test -f $ac_dir/$ac_word; then
2630       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2631         ac_prog_rejected=yes
2632         continue
2633       fi
2634       ac_cv_prog_CC="cc"
2635       break
2636     fi
2637   done
2638   IFS="$ac_save_ifs"
2639 if test $ac_prog_rejected = yes; then
2640   # We found a bogon in the path, so make sure we never use it.
2641   set dummy $ac_cv_prog_CC
2642   shift
2643   if test $# -gt 0; then
2644     # We chose a different compiler from the bogus one.
2645     # However, it has the same basename, so the bogon will be chosen
2646     # first if we set CC to just the basename; use the full file name.
2647     shift
2648     set dummy "$ac_dir/$ac_word" "$@"
2649     shift
2650     ac_cv_prog_CC="$@"
2651   fi
2652 fi
2653 fi
2654 fi
2655 CC="$ac_cv_prog_CC"
2656 if test -n "$CC"; then
2657   echo "$ac_t""$CC" 1>&6
2658 else
2659   echo "$ac_t""no" 1>&6
2660 fi
2661
2662   if test -z "$CC"; then
2663     case "`uname -s`" in
2664     *win32* | *WIN32* | *CYGWIN*)
2665       # Extract the first word of "cl", so it can be a program name with args.
2666 set dummy cl; ac_word=$2
2667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2668 echo "configure:2669: checking for $ac_word" >&5
2669 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2670   echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672   if test -n "$CC"; then
2673   ac_cv_prog_CC="$CC" # Let the user override the test.
2674 else
2675   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2676   ac_dummy="$PATH"
2677   for ac_dir in $ac_dummy; do
2678     test -z "$ac_dir" && ac_dir=.
2679     if test -f $ac_dir/$ac_word; then
2680       ac_cv_prog_CC="cl"
2681       break
2682     fi
2683   done
2684   IFS="$ac_save_ifs"
2685 fi
2686 fi
2687 CC="$ac_cv_prog_CC"
2688 if test -n "$CC"; then
2689   echo "$ac_t""$CC" 1>&6
2690 else
2691   echo "$ac_t""no" 1>&6
2692 fi
2693  ;;
2694     esac
2695   fi
2696   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2697 fi
2698
2699 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2700 echo "configure:2701: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2701
2702 ac_ext=c
2703 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2704 ac_cpp='$CPP $CPPFLAGS'
2705 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2706 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2707 cross_compiling=$ac_cv_prog_cc_cross
2708
2709 cat > conftest.$ac_ext << EOF
2710
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713
2714 main(){return(0);}
2715 EOF
2716 if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2717   ac_cv_prog_cc_works=yes
2718   # If we can't run a trivial program, we are probably using a cross compiler.
2719   if (./conftest; exit) 2>/dev/null; then
2720     ac_cv_prog_cc_cross=no
2721   else
2722     ac_cv_prog_cc_cross=yes
2723   fi
2724 else
2725   echo "configure: failed program was:" >&5
2726   cat conftest.$ac_ext >&5
2727   ac_cv_prog_cc_works=no
2728 fi
2729 rm -fr conftest*
2730 ac_ext=c
2731 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2732 ac_cpp='$CPP $CPPFLAGS'
2733 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2734 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2735 cross_compiling=$ac_cv_prog_cc_cross
2736
2737 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2738 if test $ac_cv_prog_cc_works = no; then
2739   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2740 fi
2741 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2742 echo "configure:2743: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2743 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2744 cross_compiling=$ac_cv_prog_cc_cross
2745
2746 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2747 echo "configure:2748: checking whether we are using GNU C" >&5
2748 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2749   echo $ac_n "(cached) $ac_c" 1>&6
2750 else
2751   cat > conftest.c <<EOF
2752 #ifdef __GNUC__
2753   yes;
2754 #endif
2755 EOF
2756 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2757   ac_cv_prog_gcc=yes
2758 else
2759   ac_cv_prog_gcc=no
2760 fi
2761 fi
2762
2763 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2764
2765 if test $ac_cv_prog_gcc = yes; then
2766   GCC=yes
2767 else
2768   GCC=
2769 fi
2770
2771 ac_test_CFLAGS="${CFLAGS+set}"
2772 ac_save_CFLAGS="$CFLAGS"
2773 CFLAGS=
2774 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2775 echo "configure:2776: checking whether ${CC-cc} accepts -g" >&5
2776 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   echo 'void f(){}' > conftest.c
2780 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2781   ac_cv_prog_cc_g=yes
2782 else
2783   ac_cv_prog_cc_g=no
2784 fi
2785 rm -f conftest*
2786
2787 fi
2788
2789 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2790 if test "$ac_test_CFLAGS" = set; then
2791   CFLAGS="$ac_save_CFLAGS"
2792 elif test $ac_cv_prog_cc_g = yes; then
2793   if test "$GCC" = yes; then
2794     CFLAGS="-g -O2"
2795   else
2796     CFLAGS="-g"
2797   fi
2798 else
2799   if test "$GCC" = yes; then
2800     CFLAGS="-O2"
2801   else
2802     CFLAGS=
2803   fi
2804 fi
2805
2806 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2807 if test "${with_gnu_ld+set}" = set; then
2808   withval="$with_gnu_ld"
2809   test "$withval" = no || with_gnu_ld=yes
2810 else
2811   with_gnu_ld=no
2812 fi
2813
2814 ac_prog=ld
2815 if test "$ac_cv_prog_gcc" = yes; then
2816   # Check if gcc -print-prog-name=ld gives a path.
2817   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2818 echo "configure:2819: checking for ld used by GCC" >&5
2819   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2820   case "$ac_prog" in
2821     # Accept absolute paths.
2822     [\\/]* | [A-Za-z]:[\\/]*)
2823       re_direlt='/[^/][^/]*/\.\./'
2824       # Canonicalize the path of ld
2825       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2826       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2827         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2828       done
2829       test -z "$LD" && LD="$ac_prog"
2830       ;;
2831   "")
2832     # If it fails, then pretend we aren't using GCC.
2833     ac_prog=ld
2834     ;;
2835   *)
2836     # If it is relative, then search for the first ld in PATH.
2837     with_gnu_ld=unknown
2838     ;;
2839   esac
2840 elif test "$with_gnu_ld" = yes; then
2841   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2842 echo "configure:2843: checking for GNU ld" >&5
2843 else
2844   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2845 echo "configure:2846: checking for non-GNU ld" >&5
2846 fi
2847 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2848   echo $ac_n "(cached) $ac_c" 1>&6
2849 else
2850   if test -z "$LD"; then
2851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2852   for ac_dir in $PATH; do
2853     test -z "$ac_dir" && ac_dir=.
2854     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2855       ac_cv_path_LD="$ac_dir/$ac_prog"
2856       # Check to see if the program is GNU ld.  I'd rather use --version,
2857       # but apparently some GNU ld's only accept -v.
2858       # Break only if it was the GNU/non-GNU ld that we prefer.
2859       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2860         test "$with_gnu_ld" != no && break
2861       else
2862         test "$with_gnu_ld" != yes && break
2863       fi
2864     fi
2865   done
2866   IFS="$ac_save_ifs"
2867 else
2868   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2869 fi
2870 fi
2871
2872 LD="$ac_cv_path_LD"
2873 if test -n "$LD"; then
2874   echo "$ac_t""$LD" 1>&6
2875 else
2876   echo "$ac_t""no" 1>&6
2877 fi
2878 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2879
2880 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2881 echo "configure:2882: checking if the linker ($LD) is GNU ld" >&5
2882 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2883   echo $ac_n "(cached) $ac_c" 1>&6
2884 else
2885   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2886 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2887   ac_cv_prog_gnu_ld=yes
2888 else
2889   ac_cv_prog_gnu_ld=no
2890 fi
2891 fi
2892
2893 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2894
2895
2896 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2897 echo "configure:2898: checking for BSD-compatible nm" >&5
2898 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2899   echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901   if test -n "$NM"; then
2902   # Let the user override the test.
2903   ac_cv_path_NM="$NM"
2904 else
2905   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2906   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2907     test -z "$ac_dir" && ac_dir=.
2908     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2909       # Check to see if the nm accepts a BSD-compat flag.
2910       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2911       #   nm: unknown option "B" ignored
2912       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2913         ac_cv_path_NM="$ac_dir/nm -B"
2914         break
2915       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2916         ac_cv_path_NM="$ac_dir/nm -p"
2917         break
2918       else
2919         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2920         continue # so that we can try to find one that supports BSD flags
2921       fi
2922     fi
2923   done
2924   IFS="$ac_save_ifs"
2925   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2926 fi
2927 fi
2928
2929 NM="$ac_cv_path_NM"
2930 echo "$ac_t""$NM" 1>&6
2931
2932
2933 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2934 echo "configure:2935: checking whether ln -s works" >&5
2935 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2936   echo $ac_n "(cached) $ac_c" 1>&6
2937 else
2938   rm -f conftestdata
2939 if ln -s X conftestdata 2>/dev/null
2940 then
2941   rm -f conftestdata
2942   ac_cv_prog_LN_S="ln -s"
2943 else
2944   ac_cv_prog_LN_S=ln
2945 fi
2946 fi
2947 LN_S="$ac_cv_prog_LN_S"
2948 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2949   echo "$ac_t""yes" 1>&6
2950 else
2951   echo "$ac_t""no" 1>&6
2952 fi
2953
2954
2955 # Check for any special flags to pass to ltconfig.
2956 libtool_flags="--cache-file=$cache_file"
2957 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2958 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2959 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2960 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2961 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2962 libtool_flags="$libtool_flags --enable-dlopen"
2963
2964 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2965 if test "${enable_libtool_lock+set}" = set; then
2966   enableval="$enable_libtool_lock"
2967   :
2968 fi
2969
2970 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2971 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2972
2973 # Some flags need to be propagated to the compiler or linker for good
2974 # libtool support.
2975 case "$host" in
2976 *-*-irix6*)
2977   # Find out which ABI we are using.
2978   echo '#line 2979 "configure"' > conftest.$ac_ext
2979   if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2980     case "`/usr/bin/file conftest.o`" in
2981     *32-bit*)
2982       LD="${LD-ld} -32"
2983       ;;
2984     *N32*)
2985       LD="${LD-ld} -n32"
2986       ;;
2987     *64-bit*)
2988       LD="${LD-ld} -64"
2989       ;;
2990     esac
2991   fi
2992   rm -rf conftest*
2993   ;;
2994
2995 *-*-sco3.2v5*)
2996   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2997   SAVE_CFLAGS="$CFLAGS"
2998   CFLAGS="$CFLAGS -belf"
2999   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3000 echo "configure:3001: checking whether the C compiler needs -belf" >&5
3001 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3002   echo $ac_n "(cached) $ac_c" 1>&6
3003 else
3004   cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3007
3008 int main() {
3009
3010 ; return 0; }
3011 EOF
3012 if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3013   rm -rf conftest*
3014   lt_cv_cc_needs_belf=yes
3015 else
3016   echo "configure: failed program was:" >&5
3017   cat conftest.$ac_ext >&5
3018   rm -rf conftest*
3019   lt_cv_cc_needs_belf=no
3020 fi
3021 rm -f conftest*
3022 fi
3023
3024 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3025   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3026     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3027     CFLAGS="$SAVE_CFLAGS"
3028   fi
3029   ;;
3030
3031
3032 esac
3033
3034
3035 # Save cache, so that ltconfig can load it
3036
3037
3038 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3039 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3040 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3041 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3042 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3043 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3044 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3045 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3046
3047 # Reload cache, that may have been modified by ltconfig
3048
3049
3050 # This can be used to rebuild libtool when needed
3051 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3052
3053 # Always use our own libtool.
3054 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3055
3056 # Redirect the config.log output again, so that the ltconfig log is not
3057 # clobbered by the next message.
3058 exec 5>>./config.log
3059
3060
3061 for ac_prog in mawk gawk nawk awk
3062 do
3063 # Extract the first word of "$ac_prog", so it can be a program name with args.
3064 set dummy $ac_prog; ac_word=$2
3065 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3066 echo "configure:3067: checking for $ac_word" >&5
3067 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   if test -n "$AWK"; then
3071   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3072 else
3073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3074   ac_dummy="$PATH"
3075   for ac_dir in $ac_dummy; do
3076     test -z "$ac_dir" && ac_dir=.
3077     if test -f $ac_dir/$ac_word; then
3078       ac_cv_prog_AWK="$ac_prog"
3079       break
3080     fi
3081   done
3082   IFS="$ac_save_ifs"
3083 fi
3084 fi
3085 AWK="$ac_cv_prog_AWK"
3086 if test -n "$AWK"; then
3087   echo "$ac_t""$AWK" 1>&6
3088 else
3089   echo "$ac_t""no" 1>&6
3090 fi
3091
3092 test -n "$AWK" && break
3093 done
3094
3095 # test for ln hardlink support
3096 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3097 echo "configure:3098: checking whether ln works" >&5
3098 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   rm -f conftest.src conftest.dst
3102 echo "conftest" > conftest.src
3103 if ln conftest.src conftest.dst 2>/dev/null
3104 then
3105   ol_cv_prog_LN_H="ln"
3106 else
3107   ol_cv_prog_LN_H="cp"
3108 fi
3109 rm -f conftest.src conftest.dst
3110
3111 fi
3112 LN_H="$ol_cv_prog_LN_H"
3113 if test "$ol_cv_prog_LN_H" = "ln"; then
3114         echo "$ac_t""yes" 1>&6
3115 else
3116         echo "$ac_t""no" 1>&6
3117 fi
3118
3119 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3120 echo "configure:3121: checking whether ln -s works" >&5
3121 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3122   echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124   rm -f conftestdata
3125 if ln -s X conftestdata 2>/dev/null
3126 then
3127   rm -f conftestdata
3128   ac_cv_prog_LN_S="ln -s"
3129 else
3130   ac_cv_prog_LN_S=ln
3131 fi
3132 fi
3133 LN_S="$ac_cv_prog_LN_S"
3134 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3135   echo "$ac_t""yes" 1>&6
3136 else
3137   echo "$ac_t""no" 1>&6
3138 fi
3139
3140
3141 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3142         LN_S="$LN_H"
3143 fi
3144
3145 # Extract the first word of "sendmail", so it can be a program name with args.
3146 set dummy sendmail; ac_word=$2
3147 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3148 echo "configure:3149: checking for $ac_word" >&5
3149 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   case "$SENDMAIL" in
3153   /*)
3154   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3155   ;;
3156   ?:/*)                  
3157   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3158   ;;
3159   *)
3160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3161   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3162   for ac_dir in $ac_dummy; do 
3163     test -z "$ac_dir" && ac_dir=.
3164     if test -f $ac_dir/$ac_word; then
3165       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3166       break
3167     fi
3168   done
3169   IFS="$ac_save_ifs"
3170   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3171   ;;
3172 esac
3173 fi
3174 SENDMAIL="$ac_cv_path_SENDMAIL"
3175 if test -n "$SENDMAIL"; then
3176   echo "$ac_t""$SENDMAIL" 1>&6
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180
3181 # Extract the first word of "vi", so it can be a program name with args.
3182 set dummy vi; ac_word=$2
3183 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3184 echo "configure:3185: checking for $ac_word" >&5
3185 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   case "$EDITOR" in
3189   /*)
3190   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3191   ;;
3192   ?:/*)                  
3193   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3194   ;;
3195   *)
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3197   ac_dummy="$PATH:/usr/ucb"
3198   for ac_dir in $ac_dummy; do 
3199     test -z "$ac_dir" && ac_dir=.
3200     if test -f $ac_dir/$ac_word; then
3201       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3202       break
3203     fi
3204   done
3205   IFS="$ac_save_ifs"
3206   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3207   ;;
3208 esac
3209 fi
3210 EDITOR="$ac_cv_path_EDITOR"
3211 if test -n "$EDITOR"; then
3212   echo "$ac_t""$EDITOR" 1>&6
3213 else
3214   echo "$ac_t""no" 1>&6
3215 fi
3216
3217 # Extract the first word of "finger", so it can be a program name with args.
3218 set dummy finger; ac_word=$2
3219 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3220 echo "configure:3221: checking for $ac_word" >&5
3221 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   case "$FINGER" in
3225   /*)
3226   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3227   ;;
3228   ?:/*)                  
3229   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3230   ;;
3231   *)
3232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3233   ac_dummy="$PATH:/usr/ucb"
3234   for ac_dir in $ac_dummy; do 
3235     test -z "$ac_dir" && ac_dir=.
3236     if test -f $ac_dir/$ac_word; then
3237       ac_cv_path_FINGER="$ac_dir/$ac_word"
3238       break
3239     fi
3240   done
3241   IFS="$ac_save_ifs"
3242   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3243   ;;
3244 esac
3245 fi
3246 FINGER="$ac_cv_path_FINGER"
3247 if test -n "$FINGER"; then
3248   echo "$ac_t""$FINGER" 1>&6
3249 else
3250   echo "$ac_t""no" 1>&6
3251 fi
3252
3253
3254 ol_link_perl=no
3255 if test $ol_enable_perl != no ; then
3256         # Extract the first word of "perl", so it can be a program name with args.
3257 set dummy perl; ac_word=$2
3258 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3259 echo "configure:3260: checking for $ac_word" >&5
3260 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   case "$PERLBIN" in
3264   /*)
3265   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3266   ;;
3267   ?:/*)                  
3268   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3269   ;;
3270   *)
3271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3272   ac_dummy="$PATH"
3273   for ac_dir in $ac_dummy; do 
3274     test -z "$ac_dir" && ac_dir=.
3275     if test -f $ac_dir/$ac_word; then
3276       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3277       break
3278     fi
3279   done
3280   IFS="$ac_save_ifs"
3281   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3282   ;;
3283 esac
3284 fi
3285 PERLBIN="$ac_cv_path_PERLBIN"
3286 if test -n "$PERLBIN"; then
3287   echo "$ac_t""$PERLBIN" 1>&6
3288 else
3289   echo "$ac_t""no" 1>&6
3290 fi
3291
3292
3293         if test "no$PERLBIN" = "no" ; then
3294                 if test $ol_enable_perl = yes ; then
3295                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3296                 fi
3297
3298         else
3299                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3300                 if test x"$ol_with_perl_module" == "xstatic" ; then
3301                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3302                 else
3303                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3304                 fi
3305                                 ol_link_perl=yes
3306         fi
3307 fi
3308
3309 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3310 echo "configure:3311: checking how to run the C preprocessor" >&5
3311 # On Suns, sometimes $CPP names a directory.
3312 if test -n "$CPP" && test -d "$CPP"; then
3313   CPP=
3314 fi
3315 if test -z "$CPP"; then
3316 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319     # This must be in double quotes, not single quotes, because CPP may get
3320   # substituted into the Makefile and "${CC-cc}" will confuse make.
3321   CPP="${CC-cc} -E"
3322   # On the NeXT, cc -E runs the code through the compiler's parser,
3323   # not just through cpp.
3324   cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 #include <assert.h>
3328 Syntax Error
3329 EOF
3330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3331 { (eval echo configure:3332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3333 if test -z "$ac_err"; then
3334   :
3335 else
3336   echo "$ac_err" >&5
3337   echo "configure: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   rm -rf conftest*
3340   CPP="${CC-cc} -E -traditional-cpp"
3341   cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 #include <assert.h>
3345 Syntax Error
3346 EOF
3347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3348 { (eval echo configure:3349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3350 if test -z "$ac_err"; then
3351   :
3352 else
3353   echo "$ac_err" >&5
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   rm -rf conftest*
3357   CPP="${CC-cc} -nologo -E"
3358   cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361 #include <assert.h>
3362 Syntax Error
3363 EOF
3364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3365 { (eval echo configure:3366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3367 if test -z "$ac_err"; then
3368   :
3369 else
3370   echo "$ac_err" >&5
3371   echo "configure: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373   rm -rf conftest*
3374   CPP=/lib/cpp
3375 fi
3376 rm -f conftest*
3377 fi
3378 rm -f conftest*
3379 fi
3380 rm -f conftest*
3381   ac_cv_prog_CPP="$CPP"
3382 fi
3383   CPP="$ac_cv_prog_CPP"
3384 else
3385   ac_cv_prog_CPP="$CPP"
3386 fi
3387 echo "$ac_t""$CPP" 1>&6
3388
3389
3390 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3391         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3392
3393 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3394         echo "configure: warning: programs compiled here do run here..." 1>&2
3395         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3396
3397 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3398         echo "configure: warning: programs compiled here do not run here..." 1>&2
3399         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3400 fi
3401
3402 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3403 echo "configure:3404: checking for AIX" >&5
3404 cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #ifdef _AIX
3408   yes
3409 #endif
3410
3411 EOF
3412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3413   egrep "yes" >/dev/null 2>&1; then
3414   rm -rf conftest*
3415   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3416 #define _ALL_SOURCE 1
3417 EOF
3418
3419 else
3420   rm -rf conftest*
3421   echo "$ac_t""no" 1>&6
3422 fi
3423 rm -f conftest*
3424
3425
3426 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3427 echo "configure:3428: checking for POSIXized ISC" >&5
3428 if test -d /etc/conf/kconfig.d &&
3429   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3430 then
3431   echo "$ac_t""yes" 1>&6
3432   ISC=yes # If later tests want to check for ISC.
3433   cat >> confdefs.h <<\EOF
3434 #define _POSIX_SOURCE 1
3435 EOF
3436
3437   if test "$GCC" = yes; then
3438     CC="$CC -posix"
3439   else
3440     CC="$CC -Xp"
3441   fi
3442 else
3443   echo "$ac_t""no" 1>&6
3444   ISC=
3445 fi
3446
3447 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3448 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3449 echo "configure:3450: checking for minix/config.h" >&5
3450 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3451   echo $ac_n "(cached) $ac_c" 1>&6
3452 else
3453   cat > conftest.$ac_ext <<EOF
3454 #line 3455 "configure"
3455 #include "confdefs.h"
3456 #include <minix/config.h>
3457 EOF
3458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3459 { (eval echo configure:3460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3461 if test -z "$ac_err"; then
3462   rm -rf conftest*
3463   eval "ac_cv_header_$ac_safe=yes"
3464 else
3465   echo "$ac_err" >&5
3466   echo "configure: failed program was:" >&5
3467   cat conftest.$ac_ext >&5
3468   rm -rf conftest*
3469   eval "ac_cv_header_$ac_safe=no"
3470 fi
3471 rm -f conftest*
3472 fi
3473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3474   echo "$ac_t""yes" 1>&6
3475   MINIX=yes
3476 else
3477   echo "$ac_t""no" 1>&6
3478 MINIX=
3479 fi
3480
3481 if test "$MINIX" = yes; then
3482   cat >> confdefs.h <<\EOF
3483 #define _POSIX_SOURCE 1
3484 EOF
3485
3486   cat >> confdefs.h <<\EOF
3487 #define _POSIX_1_SOURCE 2
3488 EOF
3489
3490   cat >> confdefs.h <<\EOF
3491 #define _MINIX 1
3492 EOF
3493
3494 fi
3495
3496
3497 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3498 echo "configure:3499: checking for Cygwin environment" >&5
3499 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505
3506 int main() {
3507
3508 #ifndef __CYGWIN__
3509 #define __CYGWIN__ __CYGWIN32__
3510 #endif
3511 return __CYGWIN__;
3512 ; return 0; }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3515   rm -rf conftest*
3516   ac_cv_cygwin=yes
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520   rm -rf conftest*
3521   ac_cv_cygwin=no
3522 fi
3523 rm -f conftest*
3524 fi
3525
3526 echo "$ac_t""$ac_cv_cygwin" 1>&6
3527 CYGWIN=
3528 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3529 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3530 echo "configure:3531: checking for mingw32 environment" >&5
3531 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537
3538 int main() {
3539 return __MINGW32__;
3540 ; return 0; }
3541 EOF
3542 if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3543   rm -rf conftest*
3544   ac_cv_mingw32=yes
3545 else
3546   echo "configure: failed program was:" >&5
3547   cat conftest.$ac_ext >&5
3548   rm -rf conftest*
3549   ac_cv_mingw32=no
3550 fi
3551 rm -f conftest*
3552 fi
3553
3554 echo "$ac_t""$ac_cv_mingw32" 1>&6
3555 MINGW32=
3556 test "$ac_cv_mingw32" = yes && MINGW32=yes
3557 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3558 echo "configure:3559: checking for EMX OS/2 environment" >&5
3559 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3560   echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562   cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565
3566 int main() {
3567 return __EMX__;
3568 ; return 0; }
3569 EOF
3570 if { (eval echo configure:3571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3571   rm -rf conftest*
3572   ac_cv_emxos2=yes
3573 else
3574   echo "configure: failed program was:" >&5
3575   cat conftest.$ac_ext >&5
3576   rm -rf conftest*
3577   ac_cv_emxos2=no
3578 fi
3579 rm -f conftest*
3580 fi
3581
3582 echo "$ac_t""$ac_cv_emxos2" 1>&6
3583 EMXOS2=
3584 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3585
3586
3587
3588 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3589 echo "configure:3590: checking for executable suffix" >&5
3590 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3591   echo $ac_n "(cached) $ac_c" 1>&6
3592 else
3593   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3594   ac_cv_exeext=.exe
3595 else
3596   rm -f conftest*
3597   echo 'int main () { return 0; }' > conftest.$ac_ext
3598   ac_cv_exeext=
3599   if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3600     for file in conftest.*; do
3601       case $file in
3602       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3603       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3604       esac
3605     done
3606   else
3607     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3608   fi
3609   rm -f conftest*
3610   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3611 fi
3612 fi
3613
3614 EXEEXT=""
3615 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3616 echo "$ac_t""${ac_cv_exeext}" 1>&6
3617 ac_exeext=$EXEEXT
3618
3619 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3620 echo "configure:3621: checking for object suffix" >&5
3621 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3622   echo $ac_n "(cached) $ac_c" 1>&6
3623 else
3624   rm -f conftest*
3625 echo 'int i = 1;' > conftest.$ac_ext
3626 if { (eval echo configure:3627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3627   for ac_file in conftest.*; do
3628     case $ac_file in
3629     *.c) ;;
3630     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3631     esac
3632   done
3633 else
3634   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3635 fi
3636 rm -f conftest*
3637 fi
3638
3639 echo "$ac_t""$ac_cv_objext" 1>&6
3640 OBJEXT=$ac_cv_objext
3641 ac_objext=$ac_cv_objext
3642
3643
3644 cat >> confdefs.h <<EOF
3645 #define EXEEXT "${EXEEXT}"
3646 EOF
3647
3648
3649 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3650 echo "configure:3651: checking for be_app in -lbe" >&5
3651 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   ac_save_LIBS="$LIBS"
3656 LIBS="-lbe -lroot -lnet $LIBS"
3657 cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660 /* Override any gcc2 internal prototype to avoid an error.  */
3661 /* We use char because int might match the return type of a gcc2
3662     builtin and then its argument prototype would still apply.  */
3663 char be_app();
3664
3665 int main() {
3666 be_app()
3667 ; return 0; }
3668 EOF
3669 if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3670   rm -rf conftest*
3671   eval "ac_cv_lib_$ac_lib_var=yes"
3672 else
3673   echo "configure: failed program was:" >&5
3674   cat conftest.$ac_ext >&5
3675   rm -rf conftest*
3676   eval "ac_cv_lib_$ac_lib_var=no"
3677 fi
3678 rm -f conftest*
3679 LIBS="$ac_save_LIBS"
3680
3681 fi
3682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3683   echo "$ac_t""yes" 1>&6
3684   LIBS="$LIBS -lbe -lroot -lnet"
3685 else
3686   echo "$ac_t""no" 1>&6
3687 :
3688 fi
3689
3690
3691
3692
3693
3694 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3695 echo "configure:3696: checking for ${CC-cc} option to accept ANSI C" >&5
3696 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3697   echo $ac_n "(cached) $ac_c" 1>&6
3698 else
3699   am_cv_prog_cc_stdc=no
3700 ac_save_CC="$CC"
3701 # Don't try gcc -ansi; that turns off useful extensions and
3702 # breaks some systems' header files.
3703 # AIX                   -qlanglvl=ansi
3704 # Ultrix and OSF/1      -std1
3705 # HP-UX 10.20 and later -Ae
3706 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3707 # SVR4                  -Xc -D__EXTENSIONS__
3708 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3709 do
3710   CC="$ac_save_CC $ac_arg"
3711   cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 #include <stdarg.h>
3715 #include <stdio.h>
3716 #include <sys/types.h>
3717 #include <sys/stat.h>
3718 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3719 struct buf { int x; };
3720 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3721 static char *e (p, i)
3722      char **p;
3723      int i;
3724 {
3725   return p[i];
3726 }
3727 static char *f (char * (*g) (char **, int), char **p, ...)
3728 {
3729   char *s;
3730   va_list v;
3731   va_start (v,p);
3732   s = g (p, va_arg (v,int));
3733   va_end (v);
3734   return s;
3735 }
3736 int test (int i, double x);
3737 struct s1 {int (*f) (int a);};
3738 struct s2 {int (*f) (double a);};
3739 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3740 int argc;
3741 char **argv;
3742
3743 int main() {
3744
3745 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3746
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3750   rm -rf conftest*
3751   am_cv_prog_cc_stdc="$ac_arg"; break
3752 else
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755 fi
3756 rm -f conftest*
3757 done
3758 CC="$ac_save_CC"
3759
3760 fi
3761
3762 if test -z "$am_cv_prog_cc_stdc"; then
3763   echo "$ac_t""none needed" 1>&6
3764 else
3765   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3766 fi
3767 case "x$am_cv_prog_cc_stdc" in
3768   x|xno) ;;
3769   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3770 esac
3771
3772 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3773         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3774 fi
3775
3776 # test for make depend flag
3777 OL_MKDEP=
3778 OL_MKDEP_FLAGS=
3779 if test -z "${MKDEP}"; then
3780         OL_MKDEP="${CC-cc}"
3781         if test -z "${MKDEP_FLAGS}"; then
3782                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3783 echo "configure:3784: checking for ${OL_MKDEP} depend flag" >&5
3784 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3785   echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787   
3788                         ol_cv_mkdep=no
3789                         for flag in "-M" "-xM"; do
3790                                 cat > conftest.c <<EOF
3791  noCode;
3792 EOF
3793                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3794                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3795                                 then
3796                                         if test ! -f conftest."${ac_object}" ; then
3797                                                 ol_cv_mkdep=$flag
3798                                                 OL_MKDEP_FLAGS="$flag"
3799                                                 break
3800                                         fi
3801                                 fi
3802                         done
3803                         rm -f conftest*
3804                 
3805 fi
3806
3807 echo "$ac_t""$ol_cv_mkdep" 1>&6
3808         else
3809                 cc_cv_mkdep=yes
3810                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3811         fi
3812 else
3813         cc_cv_mkdep=yes
3814         OL_MKDEP="${MKDEP}"
3815         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3816 fi
3817
3818
3819
3820 if test "${ol_cv_mkdep}" = no ; then
3821         # this will soon become an error
3822         echo "configure: warning: do not know how to generate dependencies" 1>&2
3823 fi
3824
3825 ol_link_modules=no
3826 if test $ol_enable_modules != no ; then
3827         for ac_hdr in ltdl.h
3828 do
3829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3831 echo "configure:3832: checking for $ac_hdr" >&5
3832 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <$ac_hdr>
3839 EOF
3840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3841 { (eval echo configure:3842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3843 if test -z "$ac_err"; then
3844   rm -rf conftest*
3845   eval "ac_cv_header_$ac_safe=yes"
3846 else
3847   echo "$ac_err" >&5
3848   echo "configure: failed program was:" >&5
3849   cat conftest.$ac_ext >&5
3850   rm -rf conftest*
3851   eval "ac_cv_header_$ac_safe=no"
3852 fi
3853 rm -f conftest*
3854 fi
3855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3856   echo "$ac_t""yes" 1>&6
3857     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3858   cat >> confdefs.h <<EOF
3859 #define $ac_tr_hdr 1
3860 EOF
3861  
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865 done
3866
3867
3868         if test $ac_cv_header_ltdl_h = no ; then
3869                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3870         fi
3871
3872         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3873 echo "configure:3874: checking for lt_dlinit in -lltdl" >&5
3874 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3876   echo $ac_n "(cached) $ac_c" 1>&6
3877 else
3878   ac_save_LIBS="$LIBS"
3879 LIBS="-lltdl  $LIBS"
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883 /* Override any gcc2 internal prototype to avoid an error.  */
3884 /* We use char because int might match the return type of a gcc2
3885     builtin and then its argument prototype would still apply.  */
3886 char lt_dlinit();
3887
3888 int main() {
3889 lt_dlinit()
3890 ; return 0; }
3891 EOF
3892 if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3893   rm -rf conftest*
3894   eval "ac_cv_lib_$ac_lib_var=yes"
3895 else
3896   echo "configure: failed program was:" >&5
3897   cat conftest.$ac_ext >&5
3898   rm -rf conftest*
3899   eval "ac_cv_lib_$ac_lib_var=no"
3900 fi
3901 rm -f conftest*
3902 LIBS="$ac_save_LIBS"
3903
3904 fi
3905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3906   echo "$ac_t""yes" 1>&6
3907     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3908     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3909   cat >> confdefs.h <<EOF
3910 #define $ac_tr_lib 1
3911 EOF
3912
3913   LIBS="-lltdl $LIBS"
3914
3915 else
3916   echo "$ac_t""no" 1>&6
3917 fi
3918
3919         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3920                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3921         fi
3922         ol_link_modules=yes
3923
3924 else
3925         ol_with_bdb2_module=static
3926         ol_with_ldap_module=static
3927         ol_with_ldbm_module=static
3928         ol_with_passwd_module=static
3929         ol_with_perl_module=static
3930         ol_with_shell_module=static
3931         ol_with_tcl_module=static
3932 fi
3933
3934 # test for EBCDIC
3935 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3936 echo "configure:3937: checking for EBCDIC" >&5
3937 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3938   echo $ac_n "(cached) $ac_c" 1>&6
3939 else
3940   
3941         cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944
3945 #if !('M' == 0xd4)
3946 #include <__ASCII__/generate_error.h>
3947 #endif
3948
3949 EOF
3950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3951 { (eval echo configure:3952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3953 if test -z "$ac_err"; then
3954   rm -rf conftest*
3955   ol_cv_cpp_ebcdic=yes
3956 else
3957   echo "$ac_err" >&5
3958   echo "configure: failed program was:" >&5
3959   cat conftest.$ac_ext >&5
3960   rm -rf conftest*
3961   ol_cv_cpp_ebcdic=no
3962 fi
3963 rm -f conftest*
3964 fi
3965
3966 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3967 if test $ol_cv_cpp_ebcdic = yes ; then
3968         cat >> confdefs.h <<\EOF
3969 #define HAVE_EBCDIC 1
3970 EOF
3971
3972 fi
3973
3974 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3975 echo "configure:3976: checking for ANSI C header files" >&5
3976 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3977   echo $ac_n "(cached) $ac_c" 1>&6
3978 else
3979   cat > conftest.$ac_ext <<EOF
3980 #line 3981 "configure"
3981 #include "confdefs.h"
3982 #include <stdlib.h>
3983 #include <stdarg.h>
3984 #include <string.h>
3985 #include <float.h>
3986 EOF
3987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3988 { (eval echo configure:3989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3990 if test -z "$ac_err"; then
3991   rm -rf conftest*
3992   ol_cv_header_stdc=yes
3993 else
3994   echo "$ac_err" >&5
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   ol_cv_header_stdc=no
3999 fi
4000 rm -f conftest*
4001
4002 if test $ol_cv_header_stdc = yes; then
4003   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 #include <string.h>
4008 EOF
4009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4010   egrep "memchr" >/dev/null 2>&1; then
4011   :
4012 else
4013   rm -rf conftest*
4014   ol_cv_header_stdc=no
4015 fi
4016 rm -f conftest*
4017
4018 fi
4019
4020 if test $ol_cv_header_stdc = yes; then
4021   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4022 cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4025 #include <stdlib.h>
4026 EOF
4027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4028   egrep "free" >/dev/null 2>&1; then
4029   :
4030 else
4031   rm -rf conftest*
4032   ol_cv_header_stdc=no
4033 fi
4034 rm -f conftest*
4035
4036 fi
4037
4038 if test $ol_cv_header_stdc = yes; then
4039   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4040 if test "$cross_compiling" = yes; then
4041   :
4042 else
4043   cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 #include <ctype.h>
4047 #ifndef HAVE_EBCDIC
4048 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4049 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4050 #else
4051 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4052                 || ('j' <= (c) && (c) <= 'r') \
4053                 || ('s' <= (c) && (c) <= 'z'))
4054 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4055 #endif
4056 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4057 int main () { int i; for (i = 0; i < 256; i++)
4058 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4059 exit (0); }
4060
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4063 then
4064   :
4065 else
4066   echo "configure: failed program was:" >&5
4067   cat conftest.$ac_ext >&5
4068   rm -fr conftest*
4069   ol_cv_header_stdc=no
4070 fi
4071 rm -fr conftest*
4072 fi
4073
4074 fi
4075 fi
4076
4077 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4078 if test $ol_cv_header_stdc = yes; then
4079   cat >> confdefs.h <<\EOF
4080 #define STDC_HEADERS 1
4081 EOF
4082
4083 fi
4084 ac_cv_header_stdc=disable
4085
4086
4087 if test $ol_cv_header_stdc != yes; then
4088         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4089 fi
4090
4091 ac_header_dirent=no
4092 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4093 do
4094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4095 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4096 echo "configure:4097: checking for $ac_hdr that defines DIR" >&5
4097 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4098   echo $ac_n "(cached) $ac_c" 1>&6
4099 else
4100   cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103 #include <sys/types.h>
4104 #include <$ac_hdr>
4105 int main() {
4106 DIR *dirp = 0;
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4110   rm -rf conftest*
4111   eval "ac_cv_header_dirent_$ac_safe=yes"
4112 else
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115   rm -rf conftest*
4116   eval "ac_cv_header_dirent_$ac_safe=no"
4117 fi
4118 rm -f conftest*
4119 fi
4120 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4121   echo "$ac_t""yes" 1>&6
4122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4123   cat >> confdefs.h <<EOF
4124 #define $ac_tr_hdr 1
4125 EOF
4126  ac_header_dirent=$ac_hdr; break
4127 else
4128   echo "$ac_t""no" 1>&6
4129 fi
4130 done
4131 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4132 if test $ac_header_dirent = dirent.h; then
4133 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4134 echo "configure:4135: checking for opendir in -ldir" >&5
4135 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   ac_save_LIBS="$LIBS"
4140 LIBS="-ldir  $LIBS"
4141 cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144 /* Override any gcc2 internal prototype to avoid an error.  */
4145 /* We use char because int might match the return type of a gcc2
4146     builtin and then its argument prototype would still apply.  */
4147 char opendir();
4148
4149 int main() {
4150 opendir()
4151 ; return 0; }
4152 EOF
4153 if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4154   rm -rf conftest*
4155   eval "ac_cv_lib_$ac_lib_var=yes"
4156 else
4157   echo "configure: failed program was:" >&5
4158   cat conftest.$ac_ext >&5
4159   rm -rf conftest*
4160   eval "ac_cv_lib_$ac_lib_var=no"
4161 fi
4162 rm -f conftest*
4163 LIBS="$ac_save_LIBS"
4164
4165 fi
4166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4167   echo "$ac_t""yes" 1>&6
4168   LIBS="$LIBS -ldir"
4169 else
4170   echo "$ac_t""no" 1>&6
4171 fi
4172
4173 else
4174 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4175 echo "configure:4176: checking for opendir in -lx" >&5
4176 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4178   echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180   ac_save_LIBS="$LIBS"
4181 LIBS="-lx  $LIBS"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 /* Override any gcc2 internal prototype to avoid an error.  */
4186 /* We use char because int might match the return type of a gcc2
4187     builtin and then its argument prototype would still apply.  */
4188 char opendir();
4189
4190 int main() {
4191 opendir()
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4195   rm -rf conftest*
4196   eval "ac_cv_lib_$ac_lib_var=yes"
4197 else
4198   echo "configure: failed program was:" >&5
4199   cat conftest.$ac_ext >&5
4200   rm -rf conftest*
4201   eval "ac_cv_lib_$ac_lib_var=no"
4202 fi
4203 rm -f conftest*
4204 LIBS="$ac_save_LIBS"
4205
4206 fi
4207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4208   echo "$ac_t""yes" 1>&6
4209   LIBS="$LIBS -lx"
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213
4214 fi
4215
4216 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4217 echo "configure:4218: checking for sys/wait.h that is POSIX.1 compatible" >&5
4218 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 #include <sys/types.h>
4225 #include <sys/wait.h>
4226 #ifndef WEXITSTATUS
4227 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4228 #endif
4229 #ifndef WIFEXITED
4230 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4231 #endif
4232 int main() {
4233 int s;
4234 wait (&s);
4235 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4239   rm -rf conftest*
4240   ac_cv_header_sys_wait_h=yes
4241 else
4242   echo "configure: failed program was:" >&5
4243   cat conftest.$ac_ext >&5
4244   rm -rf conftest*
4245   ac_cv_header_sys_wait_h=no
4246 fi
4247 rm -f conftest*
4248 fi
4249
4250 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4251 if test $ac_cv_header_sys_wait_h = yes; then
4252   cat >> confdefs.h <<\EOF
4253 #define HAVE_SYS_WAIT_H 1
4254 EOF
4255
4256 fi
4257
4258 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4259 echo "configure:4260: checking POSIX termios" >&5
4260 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4261   echo $ac_n "(cached) $ac_c" 1>&6
4262 else
4263   cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 #include <sys/types.h>
4267 #include <unistd.h>
4268 #include <termios.h>
4269 int main() {
4270 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4271    tcgetattr(0, 0);
4272 ; return 0; }
4273 EOF
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4275   rm -rf conftest*
4276   am_cv_sys_posix_termios=yes
4277 else
4278   echo "configure: failed program was:" >&5
4279   cat conftest.$ac_ext >&5
4280   rm -rf conftest*
4281   am_cv_sys_posix_termios=no
4282 fi
4283 rm -f conftest*
4284 fi
4285
4286 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4287
4288
4289  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4290 echo "configure:4291: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4291 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4292   echo $ac_n "(cached) $ac_c" 1>&6
4293 else
4294   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4295
4296   gwinsz_in_termios_h=no
4297   if test $am_cv_sys_posix_termios = yes; then
4298     cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4301 #include <sys/types.h>
4302 #     include <termios.h>
4303 #     ifdef TIOCGWINSZ
4304         yes
4305 #     endif
4306     
4307 EOF
4308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4309   egrep "yes" >/dev/null 2>&1; then
4310   rm -rf conftest*
4311   gwinsz_in_termios_h=yes
4312 fi
4313 rm -f conftest*
4314
4315   fi
4316
4317   if test $gwinsz_in_termios_h = no; then
4318     cat > conftest.$ac_ext <<EOF
4319 #line 4320 "configure"
4320 #include "confdefs.h"
4321 #include <sys/types.h>
4322 #     include <sys/ioctl.h>
4323 #     ifdef TIOCGWINSZ
4324         yes
4325 #     endif
4326     
4327 EOF
4328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4329   egrep "yes" >/dev/null 2>&1; then
4330   rm -rf conftest*
4331   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4332 fi
4333 rm -f conftest*
4334
4335   fi
4336   
4337 fi
4338
4339 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4340   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4341     cat >> confdefs.h <<\EOF
4342 #define GWINSZ_IN_SYS_IOCTL 1
4343 EOF
4344
4345   fi
4346
4347 if test $am_cv_sys_posix_termios = yes ; then
4348         cat >> confdefs.h <<\EOF
4349 #define HAVE_POSIX_TERMIOS 1
4350 EOF
4351
4352 fi
4353
4354 for ac_hdr in \
4355         arpa/inet.h             \
4356         arpa/nameser.h  \
4357         assert.h                \
4358         crypt.h                 \
4359         errno.h                 \
4360         fcntl.h                 \
4361         filio.h                 \
4362         getopt.h                \
4363         grp.h                   \
4364         libutil.h               \
4365         limits.h                \
4366         locale.h                \
4367         netinet/tcp.h   \
4368         malloc.h                \
4369         memory.h                \
4370         psap.h                  \
4371         pwd.h                   \
4372         resolv.h                \
4373         sgtty.h                 \
4374         shadow.h                \
4375         stddef.h                \
4376         string.h                \
4377         strings.h               \
4378         sysexits.h              \
4379         sys/file.h              \
4380         sys/filio.h             \
4381         sys/errno.h             \
4382         sys/ioctl.h             \
4383         sys/param.h             \
4384         sys/resource.h  \
4385         sys/select.h    \
4386         sys/socket.h    \
4387         sys/syslog.h    \
4388         sys/time.h              \
4389         sys/types.h             \
4390         syslog.h                \
4391         termios.h               \
4392         unistd.h                \
4393
4394 do
4395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4397 echo "configure:4398: checking for $ac_hdr" >&5
4398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 #include <$ac_hdr>
4405 EOF
4406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4407 { (eval echo configure:4408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4409 if test -z "$ac_err"; then
4410   rm -rf conftest*
4411   eval "ac_cv_header_$ac_safe=yes"
4412 else
4413   echo "$ac_err" >&5
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -rf conftest*
4417   eval "ac_cv_header_$ac_safe=no"
4418 fi
4419 rm -f conftest*
4420 fi
4421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4422   echo "$ac_t""yes" 1>&6
4423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4424   cat >> confdefs.h <<EOF
4425 #define $ac_tr_hdr 1
4426 EOF
4427  
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431 done
4432
4433
4434
4435 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4436 echo "configure:4437: checking for sigset in -lV3" >&5
4437 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4438 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4439   echo $ac_n "(cached) $ac_c" 1>&6
4440 else
4441   ac_save_LIBS="$LIBS"
4442 LIBS="-lV3  $LIBS"
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 /* Override any gcc2 internal prototype to avoid an error.  */
4447 /* We use char because int might match the return type of a gcc2
4448     builtin and then its argument prototype would still apply.  */
4449 char sigset();
4450
4451 int main() {
4452 sigset()
4453 ; return 0; }
4454 EOF
4455 if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4456   rm -rf conftest*
4457   eval "ac_cv_lib_$ac_lib_var=yes"
4458 else
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -rf conftest*
4462   eval "ac_cv_lib_$ac_lib_var=no"
4463 fi
4464 rm -f conftest*
4465 LIBS="$ac_save_LIBS"
4466
4467 fi
4468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4469   echo "$ac_t""yes" 1>&6
4470     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4471     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4472   cat >> confdefs.h <<EOF
4473 #define $ac_tr_lib 1
4474 EOF
4475
4476   LIBS="-lV3 $LIBS"
4477
4478 else
4479   echo "$ac_t""no" 1>&6
4480 fi
4481
4482
4483
4484 echo $ac_n "checking for socket""... $ac_c" 1>&6
4485 echo "configure:4486: checking for socket" >&5
4486 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492 /* System header to define __stub macros and hopefully few prototypes,
4493     which can conflict with char socket(); below.  */
4494 #include <assert.h>
4495 /* Override any gcc2 internal prototype to avoid an error.  */
4496 /* We use char because int might match the return type of a gcc2
4497     builtin and then its argument prototype would still apply.  */
4498 char socket();
4499 char (*f)();
4500
4501 int main() {
4502
4503 /* The GNU C library defines this for functions which it implements
4504     to always fail with ENOSYS.  Some functions are actually named
4505     something starting with __ and the normal name is an alias.  */
4506 #if defined (__stub_socket) || defined (__stub___socket)
4507 choke me
4508 #else
4509 f = socket;
4510 #endif
4511
4512 ; return 0; }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4515   rm -rf conftest*
4516   eval "ac_cv_func_socket=yes"
4517 else
4518   echo "configure: failed program was:" >&5
4519   cat conftest.$ac_ext >&5
4520   rm -rf conftest*
4521   eval "ac_cv_func_socket=no"
4522 fi
4523 rm -f conftest*
4524 fi
4525
4526 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4527   echo "$ac_t""yes" 1>&6
4528   :
4529 else
4530   echo "$ac_t""no" 1>&6
4531         
4532         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4533 echo "configure:4534: checking for main in -lsocket" >&5
4534 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4535 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4536   echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538   ac_save_LIBS="$LIBS"
4539 LIBS="-lsocket  $LIBS"
4540 cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543
4544 int main() {
4545 main()
4546 ; return 0; }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4549   rm -rf conftest*
4550   eval "ac_cv_lib_$ac_lib_var=yes"
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   eval "ac_cv_lib_$ac_lib_var=no"
4556 fi
4557 rm -f conftest*
4558 LIBS="$ac_save_LIBS"
4559
4560 fi
4561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4562   echo "$ac_t""yes" 1>&6
4563     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4564     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4565   cat >> confdefs.h <<EOF
4566 #define $ac_tr_lib 1
4567 EOF
4568
4569   LIBS="-lsocket $LIBS"
4570
4571 else
4572   echo "$ac_t""no" 1>&6
4573 fi
4574
4575         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4576 echo "configure:4577: checking for main in -lnet" >&5
4577 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   ac_save_LIBS="$LIBS"
4582 LIBS="-lnet  $LIBS"
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586
4587 int main() {
4588 main()
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   eval "ac_cv_lib_$ac_lib_var=yes"
4594 else
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   eval "ac_cv_lib_$ac_lib_var=no"
4599 fi
4600 rm -f conftest*
4601 LIBS="$ac_save_LIBS"
4602
4603 fi
4604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4605   echo "$ac_t""yes" 1>&6
4606     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4607     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4608   cat >> confdefs.h <<EOF
4609 #define $ac_tr_lib 1
4610 EOF
4611
4612   LIBS="-lnet $LIBS"
4613
4614 else
4615   echo "$ac_t""no" 1>&6
4616 fi
4617
4618         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4619 echo "configure:4620: checking for socket in -lnet" >&5
4620 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   ac_save_LIBS="$LIBS"
4625 LIBS="-lnet  $LIBS"
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 /* Override any gcc2 internal prototype to avoid an error.  */
4630 /* We use char because int might match the return type of a gcc2
4631     builtin and then its argument prototype would still apply.  */
4632 char socket();
4633
4634 int main() {
4635 socket()
4636 ; return 0; }
4637 EOF
4638 if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4639   rm -rf conftest*
4640   eval "ac_cv_lib_$ac_lib_var=yes"
4641 else
4642   echo "configure: failed program was:" >&5
4643   cat conftest.$ac_ext >&5
4644   rm -rf conftest*
4645   eval "ac_cv_lib_$ac_lib_var=no"
4646 fi
4647 rm -f conftest*
4648 LIBS="$ac_save_LIBS"
4649
4650 fi
4651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4652   echo "$ac_t""yes" 1>&6
4653     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4654     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4655   cat >> confdefs.h <<EOF
4656 #define $ac_tr_lib 1
4657 EOF
4658
4659   LIBS="-lnet $LIBS"
4660
4661 else
4662   echo "$ac_t""no" 1>&6
4663 fi
4664
4665         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4666 echo "configure:4667: checking for main in -lnsl_s" >&5
4667 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   ac_save_LIBS="$LIBS"
4672 LIBS="-lnsl_s  $LIBS"
4673 cat > conftest.$ac_ext <<EOF
4674 #line 4675 "configure"
4675 #include "confdefs.h"
4676
4677 int main() {
4678 main()
4679 ; return 0; }
4680 EOF
4681 if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4682   rm -rf conftest*
4683   eval "ac_cv_lib_$ac_lib_var=yes"
4684 else
4685   echo "configure: failed program was:" >&5
4686   cat conftest.$ac_ext >&5
4687   rm -rf conftest*
4688   eval "ac_cv_lib_$ac_lib_var=no"
4689 fi
4690 rm -f conftest*
4691 LIBS="$ac_save_LIBS"
4692
4693 fi
4694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4695   echo "$ac_t""yes" 1>&6
4696     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4697     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4698   cat >> confdefs.h <<EOF
4699 #define $ac_tr_lib 1
4700 EOF
4701
4702   LIBS="-lnsl_s $LIBS"
4703
4704 else
4705   echo "$ac_t""no" 1>&6
4706 fi
4707
4708         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4709 echo "configure:4710: checking for main in -lnsl" >&5
4710 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4711 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4712   echo $ac_n "(cached) $ac_c" 1>&6
4713 else
4714   ac_save_LIBS="$LIBS"
4715 LIBS="-lnsl  $LIBS"
4716 cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719
4720 int main() {
4721 main()
4722 ; return 0; }
4723 EOF
4724 if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4725   rm -rf conftest*
4726   eval "ac_cv_lib_$ac_lib_var=yes"
4727 else
4728   echo "configure: failed program was:" >&5
4729   cat conftest.$ac_ext >&5
4730   rm -rf conftest*
4731   eval "ac_cv_lib_$ac_lib_var=no"
4732 fi
4733 rm -f conftest*
4734 LIBS="$ac_save_LIBS"
4735
4736 fi
4737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4738   echo "$ac_t""yes" 1>&6
4739     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4740     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4741   cat >> confdefs.h <<EOF
4742 #define $ac_tr_lib 1
4743 EOF
4744
4745   LIBS="-lnsl $LIBS"
4746
4747 else
4748   echo "$ac_t""no" 1>&6
4749 fi
4750
4751         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4752 echo "configure:4753: checking for socket in -linet" >&5
4753 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4755   echo $ac_n "(cached) $ac_c" 1>&6
4756 else
4757   ac_save_LIBS="$LIBS"
4758 LIBS="-linet  $LIBS"
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 /* Override any gcc2 internal prototype to avoid an error.  */
4763 /* We use char because int might match the return type of a gcc2
4764     builtin and then its argument prototype would still apply.  */
4765 char socket();
4766
4767 int main() {
4768 socket()
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   eval "ac_cv_lib_$ac_lib_var=yes"
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_lib_$ac_lib_var=no"
4779 fi
4780 rm -f conftest*
4781 LIBS="$ac_save_LIBS"
4782
4783 fi
4784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4785   echo "$ac_t""yes" 1>&6
4786     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4788   cat >> confdefs.h <<EOF
4789 #define $ac_tr_lib 1
4790 EOF
4791
4792   LIBS="-linet $LIBS"
4793
4794 else
4795   echo "$ac_t""no" 1>&6
4796 fi
4797
4798         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4799 echo "configure:4800: checking for main in -lgen" >&5
4800 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4802   echo $ac_n "(cached) $ac_c" 1>&6
4803 else
4804   ac_save_LIBS="$LIBS"
4805 LIBS="-lgen  $LIBS"
4806 cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809
4810 int main() {
4811 main()
4812 ; return 0; }
4813 EOF
4814 if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4815   rm -rf conftest*
4816   eval "ac_cv_lib_$ac_lib_var=yes"
4817 else
4818   echo "configure: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   rm -rf conftest*
4821   eval "ac_cv_lib_$ac_lib_var=no"
4822 fi
4823 rm -f conftest*
4824 LIBS="$ac_save_LIBS"
4825
4826 fi
4827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4828   echo "$ac_t""yes" 1>&6
4829     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4830     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4831   cat >> confdefs.h <<EOF
4832 #define $ac_tr_lib 1
4833 EOF
4834
4835   LIBS="-lgen $LIBS"
4836
4837 else
4838   echo "$ac_t""no" 1>&6
4839 fi
4840
4841
4842 fi
4843
4844
4845 echo $ac_n "checking for select""... $ac_c" 1>&6
4846 echo "configure:4847: checking for select" >&5
4847 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4848   echo $ac_n "(cached) $ac_c" 1>&6
4849 else
4850   cat > conftest.$ac_ext <<EOF
4851 #line 4852 "configure"
4852 #include "confdefs.h"
4853 /* System header to define __stub macros and hopefully few prototypes,
4854     which can conflict with char select(); below.  */
4855 #include <assert.h>
4856 /* Override any gcc2 internal prototype to avoid an error.  */
4857 /* We use char because int might match the return type of a gcc2
4858     builtin and then its argument prototype would still apply.  */
4859 char select();
4860 char (*f)();
4861
4862 int main() {
4863
4864 /* The GNU C library defines this for functions which it implements
4865     to always fail with ENOSYS.  Some functions are actually named
4866     something starting with __ and the normal name is an alias.  */
4867 #if defined (__stub_select) || defined (__stub___select)
4868 choke me
4869 #else
4870 f = select;
4871 #endif
4872
4873 ; return 0; }
4874 EOF
4875 if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4876   rm -rf conftest*
4877   eval "ac_cv_func_select=yes"
4878 else
4879   echo "configure: failed program was:" >&5
4880   cat conftest.$ac_ext >&5
4881   rm -rf conftest*
4882   eval "ac_cv_func_select=no"
4883 fi
4884 rm -f conftest*
4885 fi
4886
4887 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4888   echo "$ac_t""yes" 1>&6
4889   :
4890 else
4891   echo "$ac_t""no" 1>&6
4892 { echo "configure: error: select() required." 1>&2; exit 1; }
4893 fi
4894
4895
4896 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4897 echo "configure:4898: checking types of arguments for select()" >&5
4898  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4902   echo $ac_n "(cached) $ac_c" 1>&6
4903 else
4904     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4905   echo $ac_n "(cached) $ac_c" 1>&6
4906 else
4907      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4908      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4909       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4910        cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4913 #ifdef HAVE_SYS_TYPES_H
4914 #include <sys/types.h>
4915 #endif
4916 #ifdef HAVE_SYS_TIME_H
4917 #include <sys/time.h>
4918 #endif
4919 #ifdef HAVE_SYS_SELECT_H
4920 #include <sys/select.h>
4921 #endif
4922 #ifdef HAVE_SYS_SOCKET_H
4923 #include <sys/socket.h>
4924 #endif
4925 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);
4926 int main() {
4927
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4931   rm -rf conftest*
4932           ac_not_found=no ; break 3
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   ac_not_found=yes
4938 fi
4939 rm -f conftest*
4940       done
4941      done
4942     done
4943    
4944 fi
4945   
4946 fi
4947  
4948 fi
4949  if test "$ac_not_found" = yes; then
4950   ac_cv_func_select_arg1=int 
4951   ac_cv_func_select_arg234='int *' 
4952   ac_cv_func_select_arg5='struct timeval *'
4953  fi
4954  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4955  cat >> confdefs.h <<EOF
4956 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4957 EOF
4958
4959  cat >> confdefs.h <<EOF
4960 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4961 EOF
4962
4963  cat >> confdefs.h <<EOF
4964 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4965 EOF
4966
4967
4968
4969
4970 for ac_hdr in regex.h 
4971 do
4972 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4973 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4974 echo "configure:4975: checking for $ac_hdr" >&5
4975 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4976   echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978   cat > conftest.$ac_ext <<EOF
4979 #line 4980 "configure"
4980 #include "confdefs.h"
4981 #include <$ac_hdr>
4982 EOF
4983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4984 { (eval echo configure:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4986 if test -z "$ac_err"; then
4987   rm -rf conftest*
4988   eval "ac_cv_header_$ac_safe=yes"
4989 else
4990   echo "$ac_err" >&5
4991   echo "configure: failed program was:" >&5
4992   cat conftest.$ac_ext >&5
4993   rm -rf conftest*
4994   eval "ac_cv_header_$ac_safe=no"
4995 fi
4996 rm -f conftest*
4997 fi
4998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4999   echo "$ac_t""yes" 1>&6
5000     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5001   cat >> confdefs.h <<EOF
5002 #define $ac_tr_hdr 1
5003 EOF
5004  
5005 else
5006   echo "$ac_t""no" 1>&6
5007 fi
5008 done
5009
5010 if test "$ac_cv_header_regex_h" != yes ; then
5011         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5012 fi
5013 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5014 echo "configure:5015: checking for regfree" >&5
5015 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5016   echo $ac_n "(cached) $ac_c" 1>&6
5017 else
5018   cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021 /* System header to define __stub macros and hopefully few prototypes,
5022     which can conflict with char regfree(); below.  */
5023 #include <assert.h>
5024 /* Override any gcc2 internal prototype to avoid an error.  */
5025 /* We use char because int might match the return type of a gcc2
5026     builtin and then its argument prototype would still apply.  */
5027 char regfree();
5028 char (*f)();
5029
5030 int main() {
5031
5032 /* The GNU C library defines this for functions which it implements
5033     to always fail with ENOSYS.  Some functions are actually named
5034     something starting with __ and the normal name is an alias.  */
5035 #if defined (__stub_regfree) || defined (__stub___regfree)
5036 choke me
5037 #else
5038 f = regfree;
5039 #endif
5040
5041 ; return 0; }
5042 EOF
5043 if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5044   rm -rf conftest*
5045   eval "ac_cv_func_regfree=yes"
5046 else
5047   echo "configure: failed program was:" >&5
5048   cat conftest.$ac_ext >&5
5049   rm -rf conftest*
5050   eval "ac_cv_func_regfree=no"
5051 fi
5052 rm -f conftest*
5053 fi
5054
5055 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5056   echo "$ac_t""yes" 1>&6
5057   :
5058 else
5059   echo "$ac_t""no" 1>&6
5060 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5061 fi
5062
5063
5064
5065 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5066 echo "configure:5067: checking for compatible POSIX regex" >&5
5067 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5068   echo $ac_n "(cached) $ac_c" 1>&6
5069 else
5070   
5071         if test "$cross_compiling" = yes; then
5072   ol_cv_c_posix_regex=cross
5073 else
5074   cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077
5078 #include <sys/types.h>
5079 #include <regex.h>
5080 static char *pattern, *string;
5081 main()
5082 {
5083         int rc;
5084         regex_t re;
5085
5086         pattern = "^A";
5087
5088         if(regcomp(&re, pattern, 0)) {
5089                 return -1;
5090         }
5091         
5092         string = "ALL MATCH";
5093         
5094         rc = regexec(&re, string, 0, (void*)0, 0);
5095
5096         regfree(&re);
5097
5098         return rc;
5099 }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5102 then
5103   ol_cv_c_posix_regex=yes
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -fr conftest*
5108   ol_cv_c_posix_regex=no
5109 fi
5110 rm -fr conftest*
5111 fi
5112
5113 fi
5114
5115 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5116
5117 if test "$ol_cv_c_posix_regex" = no ; then
5118         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5119 fi
5120
5121 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5122 echo "configure:5123: checking for res_search" >&5
5123 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5124   echo $ac_n "(cached) $ac_c" 1>&6
5125 else
5126   cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* System header to define __stub macros and hopefully few prototypes,
5130     which can conflict with char res_search(); below.  */
5131 #include <assert.h>
5132 /* Override any gcc2 internal prototype to avoid an error.  */
5133 /* We use char because int might match the return type of a gcc2
5134     builtin and then its argument prototype would still apply.  */
5135 char res_search();
5136 char (*f)();
5137
5138 int main() {
5139
5140 /* The GNU C library defines this for functions which it implements
5141     to always fail with ENOSYS.  Some functions are actually named
5142     something starting with __ and the normal name is an alias.  */
5143 #if defined (__stub_res_search) || defined (__stub___res_search)
5144 choke me
5145 #else
5146 f = res_search;
5147 #endif
5148
5149 ; return 0; }
5150 EOF
5151 if { (eval echo configure:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5152   rm -rf conftest*
5153   eval "ac_cv_func_res_search=yes"
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   eval "ac_cv_func_res_search=no"
5159 fi
5160 rm -f conftest*
5161 fi
5162
5163 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5164   echo "$ac_t""yes" 1>&6
5165   :
5166 else
5167   echo "$ac_t""no" 1>&6
5168 fi
5169
5170 if test $ac_cv_func_res_search = no ; then 
5171         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5172 echo "configure:5173: checking for res_search in -lbind" >&5
5173 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5175   echo $ac_n "(cached) $ac_c" 1>&6
5176 else
5177   ac_save_LIBS="$LIBS"
5178 LIBS="-lbind  $LIBS"
5179 cat > conftest.$ac_ext <<EOF
5180 #line 5181 "configure"
5181 #include "confdefs.h"
5182 /* Override any gcc2 internal prototype to avoid an error.  */
5183 /* We use char because int might match the return type of a gcc2
5184     builtin and then its argument prototype would still apply.  */
5185 char res_search();
5186
5187 int main() {
5188 res_search()
5189 ; return 0; }
5190 EOF
5191 if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5192   rm -rf conftest*
5193   eval "ac_cv_lib_$ac_lib_var=yes"
5194 else
5195   echo "configure: failed program was:" >&5
5196   cat conftest.$ac_ext >&5
5197   rm -rf conftest*
5198   eval "ac_cv_lib_$ac_lib_var=no"
5199 fi
5200 rm -f conftest*
5201 LIBS="$ac_save_LIBS"
5202
5203 fi
5204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5205   echo "$ac_t""yes" 1>&6
5206     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5207     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5208   cat >> confdefs.h <<EOF
5209 #define $ac_tr_lib 1
5210 EOF
5211
5212   LIBS="-lbind $LIBS"
5213
5214 else
5215   echo "$ac_t""no" 1>&6
5216 fi
5217
5218         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5219 fi
5220
5221 if test $ac_cv_func_res_search = no ; then 
5222         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5223 echo "configure:5224: checking for __res_search in -lbind" >&5
5224 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5226   echo $ac_n "(cached) $ac_c" 1>&6
5227 else
5228   ac_save_LIBS="$LIBS"
5229 LIBS="-lbind  $LIBS"
5230 cat > conftest.$ac_ext <<EOF
5231 #line 5232 "configure"
5232 #include "confdefs.h"
5233 /* Override any gcc2 internal prototype to avoid an error.  */
5234 /* We use char because int might match the return type of a gcc2
5235     builtin and then its argument prototype would still apply.  */
5236 char __res_search();
5237
5238 int main() {
5239 __res_search()
5240 ; return 0; }
5241 EOF
5242 if { (eval echo configure:5243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5243   rm -rf conftest*
5244   eval "ac_cv_lib_$ac_lib_var=yes"
5245 else
5246   echo "configure: failed program was:" >&5
5247   cat conftest.$ac_ext >&5
5248   rm -rf conftest*
5249   eval "ac_cv_lib_$ac_lib_var=no"
5250 fi
5251 rm -f conftest*
5252 LIBS="$ac_save_LIBS"
5253
5254 fi
5255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5256   echo "$ac_t""yes" 1>&6
5257     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5259   cat >> confdefs.h <<EOF
5260 #define $ac_tr_lib 1
5261 EOF
5262
5263   LIBS="-lbind $LIBS"
5264
5265 else
5266   echo "$ac_t""no" 1>&6
5267 fi
5268
5269         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5270 fi
5271
5272 if test $ac_cv_func_res_search = no ; then 
5273         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5274 echo "configure:5275: checking for res_search in -lresolv" >&5
5275 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5277   echo $ac_n "(cached) $ac_c" 1>&6
5278 else
5279   ac_save_LIBS="$LIBS"
5280 LIBS="-lresolv  $LIBS"
5281 cat > conftest.$ac_ext <<EOF
5282 #line 5283 "configure"
5283 #include "confdefs.h"
5284 /* Override any gcc2 internal prototype to avoid an error.  */
5285 /* We use char because int might match the return type of a gcc2
5286     builtin and then its argument prototype would still apply.  */
5287 char res_search();
5288
5289 int main() {
5290 res_search()
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   eval "ac_cv_lib_$ac_lib_var=yes"
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   eval "ac_cv_lib_$ac_lib_var=no"
5301 fi
5302 rm -f conftest*
5303 LIBS="$ac_save_LIBS"
5304
5305 fi
5306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5309     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5310   cat >> confdefs.h <<EOF
5311 #define $ac_tr_lib 1
5312 EOF
5313
5314   LIBS="-lresolv $LIBS"
5315
5316 else
5317   echo "$ac_t""no" 1>&6
5318 fi
5319
5320         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5321 fi
5322
5323 if test "$ac_cv_func_res_search" = yes ; then
5324         cat >> confdefs.h <<\EOF
5325 #define HAVE_RES_SEARCH 1
5326 EOF
5327
5328 elif test $ol_enable_dns = yes ; then
5329         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5330 elif test $ol_enable_dns != no ; then
5331         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5332 fi
5333
5334
5335 ol_link_isode=no
5336 if test $ol_enable_ldapd != no ; then
5337         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5338
5339                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5340 echo "configure:5341: checking for main in -lxtpp" >&5
5341 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5342 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   ac_save_LIBS="$LIBS"
5346 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350
5351 int main() {
5352 main()
5353 ; return 0; }
5354 EOF
5355 if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5356   rm -rf conftest*
5357   eval "ac_cv_lib_$ac_lib_var=yes"
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361   rm -rf conftest*
5362   eval "ac_cv_lib_$ac_lib_var=no"
5363 fi
5364 rm -f conftest*
5365 LIBS="$ac_save_LIBS"
5366
5367 fi
5368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5369   echo "$ac_t""yes" 1>&6
5370   
5371                 ol_link_isode=yes
5372                 cat >> confdefs.h <<\EOF
5373 #define HAVE_XTPP 1
5374 EOF
5375
5376                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5377                 
5378 else
5379   echo "$ac_t""no" 1>&6
5380 :
5381 fi
5382
5383         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5384 echo "configure:5385: checking for main in -ldsap" >&5
5385 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5387   echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389   ac_save_LIBS="$LIBS"
5390 LIBS="-ldsap -lisode $LIBS"
5391 cat > conftest.$ac_ext <<EOF
5392 #line 5393 "configure"
5393 #include "confdefs.h"
5394
5395 int main() {
5396 main()
5397 ; return 0; }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5400   rm -rf conftest*
5401   eval "ac_cv_lib_$ac_lib_var=yes"
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -rf conftest*
5406   eval "ac_cv_lib_$ac_lib_var=no"
5407 fi
5408 rm -f conftest*
5409 LIBS="$ac_save_LIBS"
5410
5411 fi
5412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5413   echo "$ac_t""yes" 1>&6
5414   
5415                 ol_link_isode=yes
5416                 cat >> confdefs.h <<\EOF
5417 #define HAVE_DSAP 1
5418 EOF
5419
5420                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5421                 
5422 else
5423   echo "$ac_t""no" 1>&6
5424 :
5425 fi
5426
5427         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5428 echo "configure:5429: checking for main in -lisode" >&5
5429 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5430 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5431   echo $ac_n "(cached) $ac_c" 1>&6
5432 else
5433   ac_save_LIBS="$LIBS"
5434 LIBS="-lisode  $LIBS"
5435 cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438
5439 int main() {
5440 main()
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_lib_$ac_lib_var=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_lib_$ac_lib_var=no"
5451 fi
5452 rm -f conftest*
5453 LIBS="$ac_save_LIBS"
5454
5455 fi
5456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5457   echo "$ac_t""yes" 1>&6
5458   
5459                 ol_link_isode=yes
5460                 cat >> confdefs.h <<\EOF
5461 #define HAVE_ISODE 1
5462 EOF
5463
5464                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5465                 
5466 else
5467   echo "$ac_t""no" 1>&6
5468 :
5469 fi
5470
5471 fi
5472
5473 if test $ol_link_isode != no; then
5474         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5475 echo "configure:5476: checking for main in -lpp" >&5
5476 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5478   echo $ac_n "(cached) $ac_c" 1>&6
5479 else
5480   ac_save_LIBS="$LIBS"
5481 LIBS="-lpp  $LIBS"
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485
5486 int main() {
5487 main()
5488 ; return 0; }
5489 EOF
5490 if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5491   rm -rf conftest*
5492   eval "ac_cv_lib_$ac_lib_var=yes"
5493 else
5494   echo "configure: failed program was:" >&5
5495   cat conftest.$ac_ext >&5
5496   rm -rf conftest*
5497   eval "ac_cv_lib_$ac_lib_var=no"
5498 fi
5499 rm -f conftest*
5500 LIBS="$ac_save_LIBS"
5501
5502 fi
5503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5504   echo "$ac_t""yes" 1>&6
5505   
5506                 cat >> confdefs.h <<\EOF
5507 #define HAVE_PP 1
5508 EOF
5509
5510                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5511                 
5512 else
5513   echo "$ac_t""no" 1>&6
5514 :
5515 fi
5516
5517
5518         # Extract the first word of "pepsy", so it can be a program name with args.
5519 set dummy pepsy; ac_word=$2
5520 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5521 echo "configure:5522: checking for $ac_word" >&5
5522 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5523   echo $ac_n "(cached) $ac_c" 1>&6
5524 else
5525   case "$PEPSY" in
5526   /*)
5527   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5528   ;;
5529   ?:/*)                  
5530   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5531   ;;
5532   *)
5533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5534   ac_dummy="$PATH"
5535   for ac_dir in $ac_dummy; do 
5536     test -z "$ac_dir" && ac_dir=.
5537     if test -f $ac_dir/$ac_word; then
5538       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5539       break
5540     fi
5541   done
5542   IFS="$ac_save_ifs"
5543   ;;
5544 esac
5545 fi
5546 PEPSY="$ac_cv_path_PEPSY"
5547 if test -n "$PEPSY"; then
5548   echo "$ac_t""$PEPSY" 1>&6
5549 else
5550   echo "$ac_t""no" 1>&6
5551 fi
5552
5553 fi
5554
5555 if test $ol_enable_quipu != no ; then
5556         for ac_hdr in quipu/commonarg.h
5557 do
5558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5560 echo "configure:5561: checking for $ac_hdr" >&5
5561 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5562   echo $ac_n "(cached) $ac_c" 1>&6
5563 else
5564   cat > conftest.$ac_ext <<EOF
5565 #line 5566 "configure"
5566 #include "confdefs.h"
5567 #include <$ac_hdr>
5568 EOF
5569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5570 { (eval echo configure:5571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5572 if test -z "$ac_err"; then
5573   rm -rf conftest*
5574   eval "ac_cv_header_$ac_safe=yes"
5575 else
5576   echo "$ac_err" >&5
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   eval "ac_cv_header_$ac_safe=no"
5581 fi
5582 rm -f conftest*
5583 fi
5584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5585   echo "$ac_t""yes" 1>&6
5586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5587   cat >> confdefs.h <<EOF
5588 #define $ac_tr_hdr 1
5589 EOF
5590  
5591 else
5592   echo "$ac_t""no" 1>&6
5593 fi
5594 done
5595
5596
5597         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5598                 BUILD_QUIPU=yes
5599         elif test $ol_enable_quipu = auto ; then
5600                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5601         else
5602                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5603         fi
5604 fi
5605
5606 ol_link_kerberos=no
5607
5608 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5609         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5610 do
5611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5613 echo "configure:5614: checking for $ac_hdr" >&5
5614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5615   echo $ac_n "(cached) $ac_c" 1>&6
5616 else
5617   cat > conftest.$ac_ext <<EOF
5618 #line 5619 "configure"
5619 #include "confdefs.h"
5620 #include <$ac_hdr>
5621 EOF
5622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5623 { (eval echo configure:5624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5625 if test -z "$ac_err"; then
5626   rm -rf conftest*
5627   eval "ac_cv_header_$ac_safe=yes"
5628 else
5629   echo "$ac_err" >&5
5630   echo "configure: failed program was:" >&5
5631   cat conftest.$ac_ext >&5
5632   rm -rf conftest*
5633   eval "ac_cv_header_$ac_safe=no"
5634 fi
5635 rm -f conftest*
5636 fi
5637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5638   echo "$ac_t""yes" 1>&6
5639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5640   cat >> confdefs.h <<EOF
5641 #define $ac_tr_hdr 1
5642 EOF
5643  
5644 else
5645   echo "$ac_t""no" 1>&6
5646 fi
5647 done
5648
5649
5650         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5651                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5652 echo "configure:5653: checking for main in -lkrb4" >&5
5653 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5654 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5655   echo $ac_n "(cached) $ac_c" 1>&6
5656 else
5657   ac_save_LIBS="$LIBS"
5658 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5659 cat > conftest.$ac_ext <<EOF
5660 #line 5661 "configure"
5661 #include "confdefs.h"
5662
5663 int main() {
5664 main()
5665 ; return 0; }
5666 EOF
5667 if { (eval echo configure:5668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5668   rm -rf conftest*
5669   eval "ac_cv_lib_$ac_lib_var=yes"
5670 else
5671   echo "configure: failed program was:" >&5
5672   cat conftest.$ac_ext >&5
5673   rm -rf conftest*
5674   eval "ac_cv_lib_$ac_lib_var=no"
5675 fi
5676 rm -f conftest*
5677 LIBS="$ac_save_LIBS"
5678
5679 fi
5680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5681   echo "$ac_t""yes" 1>&6
5682   have_k5=yes
5683 else
5684   echo "$ac_t""no" 1>&6
5685 have_k5=no
5686 fi
5687
5688
5689                 if test $have_k5 = yes ; then
5690                         ol_with_kerberos=found
5691                         ol_link_kerberos=yes
5692
5693                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5694
5695                         LIBS="$KRB_LIBS $LIBS"
5696
5697                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5698 echo "configure:5699: checking for des_debug in Kerberos libraries" >&5
5699 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5700   echo $ac_n "(cached) $ac_c" 1>&6
5701 else
5702   
5703                                                                 save_LIBS="$LIBS"
5704                                 LIBS="$KRB_LIBS $LIBS"
5705                                 cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708
5709 #include <kerberosIV/krb.h>
5710 #include <kerberosIV/des.h>
5711 extern int des_debug;
5712
5713 int main() {
5714
5715 des_debug = 1;
5716
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   ol_cv_var_des_debug=yes
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   ol_cv_var_des_debug=no
5727 fi
5728 rm -f conftest*
5729                                                                 LIBS="$save_LIBS"
5730                         
5731 fi
5732
5733 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5734
5735                         if test $ol_cv_var_des_debug = yes ; then
5736                                 cat >> confdefs.h <<\EOF
5737 #define HAVE_DES_DEBUG 1
5738 EOF
5739
5740                         fi
5741
5742                         LIBS="$save_LIBS"
5743                 fi
5744         fi
5745 fi
5746
5747 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
5748         -o $ol_with_kerberos = kth ; then
5749
5750         for ac_hdr in krb.h des.h krb-archaeology.h 
5751 do
5752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5754 echo "configure:5755: checking for $ac_hdr" >&5
5755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5756   echo $ac_n "(cached) $ac_c" 1>&6
5757 else
5758   cat > conftest.$ac_ext <<EOF
5759 #line 5760 "configure"
5760 #include "confdefs.h"
5761 #include <$ac_hdr>
5762 EOF
5763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5764 { (eval echo configure:5765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5766 if test -z "$ac_err"; then
5767   rm -rf conftest*
5768   eval "ac_cv_header_$ac_safe=yes"
5769 else
5770   echo "$ac_err" >&5
5771   echo "configure: failed program was:" >&5
5772   cat conftest.$ac_ext >&5
5773   rm -rf conftest*
5774   eval "ac_cv_header_$ac_safe=no"
5775 fi
5776 rm -f conftest*
5777 fi
5778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5779   echo "$ac_t""yes" 1>&6
5780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5781   cat >> confdefs.h <<EOF
5782 #define $ac_tr_hdr 1
5783 EOF
5784  
5785 else
5786   echo "$ac_t""no" 1>&6
5787 fi
5788 done
5789
5790
5791         if test $ac_cv_header_krb_h = yes ; then
5792                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5793 echo "configure:5794: checking for main in -lkrb" >&5
5794 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5796   echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798   ac_save_LIBS="$LIBS"
5799 LIBS="-lkrb -ldes $LIBS"
5800 cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5803
5804 int main() {
5805 main()
5806 ; return 0; }
5807 EOF
5808 if { (eval echo configure:5809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5809   rm -rf conftest*
5810   eval "ac_cv_lib_$ac_lib_var=yes"
5811 else
5812   echo "configure: failed program was:" >&5
5813   cat conftest.$ac_ext >&5
5814   rm -rf conftest*
5815   eval "ac_cv_lib_$ac_lib_var=no"
5816 fi
5817 rm -f conftest*
5818 LIBS="$ac_save_LIBS"
5819
5820 fi
5821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5822   echo "$ac_t""yes" 1>&6
5823   have_k4=yes
5824 else
5825   echo "$ac_t""no" 1>&6
5826 have_k4=no
5827 fi
5828
5829
5830                 if test $have_k4 = yes ; then
5831                         ol_with_kerberos=found
5832                         ol_link_kerberos=yes
5833
5834                         KRB_LIBS="-lkrb -ldes"
5835
5836                         if test $ac_cv_header_krb_archaeology_h = yes ; then
5837                                 cat >> confdefs.h <<\EOF
5838 #define HAVE_KTH_KERBEROS 1
5839 EOF
5840
5841                         fi
5842                 fi
5843         fi
5844 fi
5845
5846 if test $ol_link_kerberos = yes ; then
5847         cat >> confdefs.h <<\EOF
5848 #define HAVE_KERBEROS 1
5849 EOF
5850
5851
5852 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
5853         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
5854 fi
5855
5856 ol_link_tls=no
5857 if test $ol_with_tls != no ; then
5858         
5859         for ac_hdr in openssl/ssl.h ssl.h
5860 do
5861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5863 echo "configure:5864: checking for $ac_hdr" >&5
5864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5865   echo $ac_n "(cached) $ac_c" 1>&6
5866 else
5867   cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 #include <$ac_hdr>
5871 EOF
5872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5873 { (eval echo configure:5874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5875 if test -z "$ac_err"; then
5876   rm -rf conftest*
5877   eval "ac_cv_header_$ac_safe=yes"
5878 else
5879   echo "$ac_err" >&5
5880   echo "configure: failed program was:" >&5
5881   cat conftest.$ac_ext >&5
5882   rm -rf conftest*
5883   eval "ac_cv_header_$ac_safe=no"
5884 fi
5885 rm -f conftest*
5886 fi
5887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5888   echo "$ac_t""yes" 1>&6
5889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5890   cat >> confdefs.h <<EOF
5891 #define $ac_tr_hdr 1
5892 EOF
5893  
5894 else
5895   echo "$ac_t""no" 1>&6
5896 fi
5897 done
5898
5899         
5900         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5901                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5902 echo "configure:5903: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5903 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5905   echo $ac_n "(cached) $ac_c" 1>&6
5906 else
5907   ac_save_LIBS="$LIBS"
5908 LIBS="-lssl -lcrypto $LIBS"
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 /* Override any gcc2 internal prototype to avoid an error.  */
5913 /* We use char because int might match the return type of a gcc2
5914     builtin and then its argument prototype would still apply.  */
5915 char SSLeay_add_ssl_algorithms();
5916
5917 int main() {
5918 SSLeay_add_ssl_algorithms()
5919 ; return 0; }
5920 EOF
5921 if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=yes"
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927   rm -rf conftest*
5928   eval "ac_cv_lib_$ac_lib_var=no"
5929 fi
5930 rm -f conftest*
5931 LIBS="$ac_save_LIBS"
5932
5933 fi
5934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5935   echo "$ac_t""yes" 1>&6
5936   have_ssleay=yes
5937                         need_rsaref=no
5938 else
5939   echo "$ac_t""no" 1>&6
5940 have_ssleay=no
5941 fi
5942
5943                         
5944                 if test $have_ssleay = no ; then
5945                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5946 echo "configure:5947: checking for SSL_library_init in -lssl" >&5
5947 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5948 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5949   echo $ac_n "(cached) $ac_c" 1>&6
5950 else
5951   ac_save_LIBS="$LIBS"
5952 LIBS="-lssl -lcrypto $LIBS"
5953 cat > conftest.$ac_ext <<EOF
5954 #line 5955 "configure"
5955 #include "confdefs.h"
5956 /* Override any gcc2 internal prototype to avoid an error.  */
5957 /* We use char because int might match the return type of a gcc2
5958     builtin and then its argument prototype would still apply.  */
5959 char SSL_library_init();
5960
5961 int main() {
5962 SSL_library_init()
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_lib_$ac_lib_var=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_lib_$ac_lib_var=no"
5973 fi
5974 rm -f conftest*
5975 LIBS="$ac_save_LIBS"
5976
5977 fi
5978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5979   echo "$ac_t""yes" 1>&6
5980   have_ssleay=yes
5981                                 need_rsaref=no
5982 else
5983   echo "$ac_t""no" 1>&6
5984 have_ssleay=no
5985 fi
5986
5987                 fi
5988
5989                 if test $have_ssleay = no ; then
5990                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5991 echo "configure:5992: checking for ssl3_accept in -lssl" >&5
5992 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5994   echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996   ac_save_LIBS="$LIBS"
5997 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5998 cat > conftest.$ac_ext <<EOF
5999 #line 6000 "configure"
6000 #include "confdefs.h"
6001 /* Override any gcc2 internal prototype to avoid an error.  */
6002 /* We use char because int might match the return type of a gcc2
6003     builtin and then its argument prototype would still apply.  */
6004 char ssl3_accept();
6005
6006 int main() {
6007 ssl3_accept()
6008 ; return 0; }
6009 EOF
6010 if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=yes"
6013 else
6014   echo "configure: failed program was:" >&5
6015   cat conftest.$ac_ext >&5
6016   rm -rf conftest*
6017   eval "ac_cv_lib_$ac_lib_var=no"
6018 fi
6019 rm -f conftest*
6020 LIBS="$ac_save_LIBS"
6021
6022 fi
6023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6024   echo "$ac_t""yes" 1>&6
6025   have_ssleay=yes
6026                                 need_rsaref=yes
6027 else
6028   echo "$ac_t""no" 1>&6
6029 have_ssleay=no
6030 fi
6031
6032                 fi
6033
6034                 if test $have_ssleay = yes ; then
6035                         ol_with_tls=found
6036                         ol_link_tls=yes
6037
6038                         cat >> confdefs.h <<\EOF
6039 #define HAVE_SSLEAY 1
6040 EOF
6041
6042
6043                         if test $need_rsaref = yes; then
6044                                 cat >> confdefs.h <<\EOF
6045 #define HAVE_RSAREF 1
6046 EOF
6047
6048
6049                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6050                         else
6051                                 TLS_LIBS="-lssl -lcrypto"
6052                         fi
6053                 fi
6054         fi
6055 fi
6056
6057 if test $ol_link_tls = yes ; then
6058         cat >> confdefs.h <<\EOF
6059 #define HAVE_TLS 1
6060 EOF
6061
6062 fi      
6063
6064 for ac_func in \
6065         ctime_r                 \
6066         gethostbyname_r gethostbyaddr_r \
6067
6068 do
6069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6070 echo "configure:6071: checking for $ac_func" >&5
6071 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6072   echo $ac_n "(cached) $ac_c" 1>&6
6073 else
6074   cat > conftest.$ac_ext <<EOF
6075 #line 6076 "configure"
6076 #include "confdefs.h"
6077 /* System header to define __stub macros and hopefully few prototypes,
6078     which can conflict with char $ac_func(); below.  */
6079 #include <assert.h>
6080 /* Override any gcc2 internal prototype to avoid an error.  */
6081 /* We use char because int might match the return type of a gcc2
6082     builtin and then its argument prototype would still apply.  */
6083 char $ac_func();
6084 char (*f)();
6085
6086 int main() {
6087
6088 /* The GNU C library defines this for functions which it implements
6089     to always fail with ENOSYS.  Some functions are actually named
6090     something starting with __ and the normal name is an alias.  */
6091 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6092 choke me
6093 #else
6094 f = $ac_func;
6095 #endif
6096
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100   rm -rf conftest*
6101   eval "ac_cv_func_$ac_func=yes"
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105   rm -rf conftest*
6106   eval "ac_cv_func_$ac_func=no"
6107 fi
6108 rm -f conftest*
6109 fi
6110
6111 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6112   echo "$ac_t""yes" 1>&6
6113     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6114   cat >> confdefs.h <<EOF
6115 #define $ac_tr_func 1
6116 EOF
6117  
6118 else
6119   echo "$ac_t""no" 1>&6
6120 fi
6121 done
6122
6123
6124 if test "$ac_cv_func_ctime_r" = no ; then
6125         ol_cv_func_ctime_r_nargs=0
6126 else
6127         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6128 echo "configure:6129: checking number of arguments of ctime_r" >&5
6129 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6130   echo $ac_n "(cached) $ac_c" 1>&6
6131 else
6132   cat > conftest.$ac_ext <<EOF
6133 #line 6134 "configure"
6134 #include "confdefs.h"
6135 #include <time.h>
6136 int main() {
6137 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6141   rm -rf conftest*
6142   ol_cv_func_ctime_r_nargs=3
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150 #include <time.h>
6151 int main() {
6152 time_t ti; char *buffer; ctime_r(&ti,buffer);
6153 ; return 0; }
6154 EOF
6155 if { (eval echo configure:6156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6156   rm -rf conftest*
6157   ol_cv_func_ctime_r_nargs=2
6158 else
6159   echo "configure: failed program was:" >&5
6160   cat conftest.$ac_ext >&5
6161   rm -rf conftest*
6162   ol_cv_func_ctime_r_nargs=0
6163 fi
6164 rm -f conftest*
6165 fi
6166 rm -f conftest*
6167 fi
6168
6169 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6170   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6171     cat >> confdefs.h <<EOF
6172 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6173 EOF
6174
6175   fi
6176
6177 fi
6178
6179 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6180         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6181 echo "configure:6182: checking number of arguments of gethostbyname_r" >&5
6182 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6183   echo $ac_n "(cached) $ac_c" 1>&6
6184 else
6185   cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 #include <sys/types.h>
6189 #include <sys/socket.h>
6190 #include <netinet/in.h>
6191 #include <netdb.h>
6192 #define BUFSIZE (sizeof(struct hostent)+10)
6193 int main() {
6194 struct hostent hent; char buffer[BUFSIZE];
6195                 int bufsize=BUFSIZE;int h_errno;
6196                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6197                         buffer, bufsize, &h_errno);
6198 ; return 0; }
6199 EOF
6200 if { (eval echo configure:6201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6201   rm -rf conftest*
6202   ol_cv_func_gethostbyname_r_nargs=5
6203 else
6204   echo "configure: failed program was:" >&5
6205   cat conftest.$ac_ext >&5
6206   rm -rf conftest*
6207   cat > conftest.$ac_ext <<EOF
6208 #line 6209 "configure"
6209 #include "confdefs.h"
6210 #include <sys/types.h>
6211 #include <sys/socket.h>
6212 #include <netinet/in.h>
6213 #include <netdb.h>
6214 #define BUFSIZE (sizeof(struct hostent)+10)
6215 int main() {
6216 struct hostent hent;struct hostent *rhent;
6217                         char buffer[BUFSIZE];
6218                         int bufsize=BUFSIZE;int h_errno;
6219                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6220                                 &rhent, &h_errno);
6221 ; return 0; }
6222 EOF
6223 if { (eval echo configure:6224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6224   rm -rf conftest*
6225   ol_cv_func_gethostbyname_r_nargs=6
6226 else
6227   echo "configure: failed program was:" >&5
6228   cat conftest.$ac_ext >&5
6229   rm -rf conftest*
6230   ol_cv_func_gethostbyname_r_nargs=0
6231 fi
6232 rm -f conftest*
6233 fi
6234 rm -f conftest*
6235 fi
6236
6237 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6238   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6239         cat >> confdefs.h <<EOF
6240 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6241 EOF
6242
6243   fi
6244
6245 else
6246         ol_cv_func_gethostbyname_r_nargs=0
6247 fi
6248  
6249 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6250         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6251 echo "configure:6252: checking number of arguments of gethostbyaddr_r" >&5
6252 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6253   echo $ac_n "(cached) $ac_c" 1>&6
6254 else
6255   cat > conftest.$ac_ext <<EOF
6256 #line 6257 "configure"
6257 #include "confdefs.h"
6258 #include <sys/types.h>
6259 #include <sys/socket.h>
6260 #include <netinet/in.h>
6261 #include <netdb.h>
6262 #define BUFSIZE (sizeof(struct hostent)+10)
6263 int main() {
6264 struct hostent hent; char buffer[BUFSIZE]; 
6265             struct in_addr add;
6266             size_t alen=sizeof(struct in_addr);
6267             int bufsize=BUFSIZE;int h_errno;
6268                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6269                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6270 ; return 0; }
6271 EOF
6272 if { (eval echo configure:6273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6273   rm -rf conftest*
6274   ol_cv_func_gethostbyaddr_r_nargs=7
6275 else
6276   echo "configure: failed program was:" >&5
6277   cat conftest.$ac_ext >&5
6278   rm -rf conftest*
6279   cat > conftest.$ac_ext <<EOF
6280 #line 6281 "configure"
6281 #include "confdefs.h"
6282 #include <sys/types.h>
6283 #include <sys/socket.h>
6284 #include <netinet/in.h>
6285 #include <netdb.h>
6286 #define BUFSIZE (sizeof(struct hostent)+10)
6287 int main() {
6288 struct hostent hent;
6289                         struct hostent *rhent; char buffer[BUFSIZE]; 
6290                         struct in_addr add;
6291                         size_t alen=sizeof(struct in_addr);
6292                         int bufsize=BUFSIZE;int h_errno;
6293                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6294                                 alen, AF_INET, &hent, buffer, bufsize, 
6295                                 &rhent, &h_errno);
6296 ; return 0; }
6297 EOF
6298 if { (eval echo configure:6299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6299   rm -rf conftest*
6300   ol_cv_func_gethostbyaddr_r_nargs=8
6301 else
6302   echo "configure: failed program was:" >&5
6303   cat conftest.$ac_ext >&5
6304   rm -rf conftest*
6305   ol_cv_func_gethostbyaddr_r_nargs=0
6306 fi
6307 rm -f conftest*
6308 fi
6309 rm -f conftest*
6310 fi
6311
6312 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6313   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6314     cat >> confdefs.h <<EOF
6315 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6316 EOF
6317
6318   fi
6319
6320 else
6321         ol_cv_func_gethostbyaddr_r_nargs=0
6322 fi
6323
6324 if test "$ac_cv_func_ctime_r" = yes \
6325         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6326         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6327         -a "$ac_cv_func_gethostbyname_r" = yes \
6328         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6329         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6330         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6331         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6332         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6333         ; then
6334  
6335         cat >> confdefs.h <<\EOF
6336 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6337 EOF
6338
6339 fi
6340
6341 ol_link_threads=no
6342 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6343         -o $ol_with_threads = posix ; then
6344
6345         for ac_hdr in pthread.h
6346 do
6347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6349 echo "configure:6350: checking for $ac_hdr" >&5
6350 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6351   echo $ac_n "(cached) $ac_c" 1>&6
6352 else
6353   cat > conftest.$ac_ext <<EOF
6354 #line 6355 "configure"
6355 #include "confdefs.h"
6356 #include <$ac_hdr>
6357 EOF
6358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6359 { (eval echo configure:6360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6361 if test -z "$ac_err"; then
6362   rm -rf conftest*
6363   eval "ac_cv_header_$ac_safe=yes"
6364 else
6365   echo "$ac_err" >&5
6366   echo "configure: failed program was:" >&5
6367   cat conftest.$ac_ext >&5
6368   rm -rf conftest*
6369   eval "ac_cv_header_$ac_safe=no"
6370 fi
6371 rm -f conftest*
6372 fi
6373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6374   echo "$ac_t""yes" 1>&6
6375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6376   cat >> confdefs.h <<EOF
6377 #define $ac_tr_hdr 1
6378 EOF
6379  
6380 else
6381   echo "$ac_t""no" 1>&6
6382 fi
6383 done
6384
6385
6386         if test $ac_cv_header_pthread_h = yes ; then
6387                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6388 echo "configure:6389: checking POSIX thread version" >&5
6389 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6390   echo $ac_n "(cached) $ac_c" 1>&6
6391 else
6392   
6393         cat > conftest.$ac_ext <<EOF
6394 #line 6395 "configure"
6395 #include "confdefs.h"
6396
6397 #               include <pthread.h>
6398                 /* this check could be improved */
6399 #               ifdef PTHREAD_ONCE_INIT
6400                         pthread_version_final;
6401 #               endif
6402         
6403 EOF
6404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6405   egrep "pthread_version_final" >/dev/null 2>&1; then
6406   rm -rf conftest*
6407   ol_pthread_final=yes
6408 else
6409   rm -rf conftest*
6410   ol_pthread_final=no
6411 fi
6412 rm -f conftest*
6413
6414
6415         cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418
6419 #               include <pthread.h>
6420                 /* this check could be improved */
6421 #               ifdef pthread_once_init
6422                         pthread_version_draft4;
6423 #               endif
6424         
6425 EOF
6426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6427   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6428   rm -rf conftest*
6429   ol_pthread_draft4=yes
6430 else
6431   rm -rf conftest*
6432   ol_pthread_draft4=no
6433 fi
6434 rm -f conftest*
6435
6436
6437         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6438                 ol_cv_pthread_version=final
6439         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6440                 ol_cv_pthread_version=draft4
6441         else
6442                 ol_cv_pthread_version=unknown
6443         fi
6444
6445 fi
6446
6447 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6448
6449
6450                 if test $ol_cv_pthread_version = final ; then
6451                         cat >> confdefs.h <<\EOF
6452 #define HAVE_PTHREADS_FINAL 1
6453 EOF
6454
6455                 elif test $ol_cv_pthread_version = draft4 ; then
6456                         cat >> confdefs.h <<\EOF
6457 #define HAVE_PTHREADS_D4 1
6458 EOF
6459
6460                 else
6461                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6462                 fi
6463
6464                 # consider threads found
6465                 ol_with_threads=found
6466
6467                 
6468         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6469 echo "configure:6470: checking for LinuxThreads pthread.h" >&5
6470 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6471   echo $ac_n "(cached) $ac_c" 1>&6
6472 else
6473   cat > conftest.$ac_ext <<EOF
6474 #line 6475 "configure"
6475 #include "confdefs.h"
6476 #include <pthread.h>
6477 EOF
6478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6479   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6480   rm -rf conftest*
6481   ol_cv_header_linux_threads=yes
6482 else
6483   rm -rf conftest*
6484   ol_cv_header_linux_threads=no
6485 fi
6486 rm -f conftest*
6487
6488                 
6489 fi
6490
6491 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6492         if test $ol_cv_header_linux_threads = yes; then
6493                 cat >> confdefs.h <<\EOF
6494 #define HAVE_LINUX_THREADS 1
6495 EOF
6496
6497         fi
6498
6499                 
6500         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6501 echo "configure:6502: checking for GNU Pth pthread.h" >&5
6502 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6503   echo $ac_n "(cached) $ac_c" 1>&6
6504 else
6505   cat > conftest.$ac_ext <<EOF
6506 #line 6507 "configure"
6507 #include "confdefs.h"
6508 #include <pthread.h>
6509 #ifdef _POSIX_THREAD_IS_GNU_PTH
6510         __gnu_pth__;
6511 #endif
6512
6513 EOF
6514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6515   egrep "__gnu_pth__" >/dev/null 2>&1; then
6516   rm -rf conftest*
6517   ol_cv_header_gnu_pth_pthread_h=yes
6518 else
6519   rm -rf conftest*
6520   ol_cv_header_gnu_pth_pthread_h=no
6521 fi
6522 rm -f conftest*
6523
6524                 
6525 fi
6526
6527 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6528
6529
6530                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6531                         for ac_hdr in sched.h
6532 do
6533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6535 echo "configure:6536: checking for $ac_hdr" >&5
6536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   cat > conftest.$ac_ext <<EOF
6540 #line 6541 "configure"
6541 #include "confdefs.h"
6542 #include <$ac_hdr>
6543 EOF
6544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6545 { (eval echo configure:6546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6547 if test -z "$ac_err"; then
6548   rm -rf conftest*
6549   eval "ac_cv_header_$ac_safe=yes"
6550 else
6551   echo "$ac_err" >&5
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554   rm -rf conftest*
6555   eval "ac_cv_header_$ac_safe=no"
6556 fi
6557 rm -f conftest*
6558 fi
6559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6560   echo "$ac_t""yes" 1>&6
6561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6562   cat >> confdefs.h <<EOF
6563 #define $ac_tr_hdr 1
6564 EOF
6565  
6566 else
6567   echo "$ac_t""no" 1>&6
6568 fi
6569 done
6570
6571                 fi
6572
6573                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6574                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6575 echo "configure:6576: checking for pthread_create in default libraries" >&5
6576 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6577   echo $ac_n "(cached) $ac_c" 1>&6
6578 else
6579   
6580                 if test "$cross_compiling" = yes; then
6581   cat > conftest.$ac_ext <<EOF
6582 #line 6583 "configure"
6583 #include "confdefs.h"
6584 /* pthread test headers */
6585 #include <pthread.h>
6586 #ifndef NULL
6587 #define NULL (void*)0
6588 #endif
6589
6590 static void *task(p)
6591         void *p;
6592 {
6593         return (void *) (p == NULL);
6594 }
6595
6596 int main() {
6597
6598         /* pthread test function */
6599         pthread_t t;
6600         int status;
6601
6602         /* make sure pthread_create() isn't just a stub */
6603 #if HAVE_PTHREADS_D4
6604         status = pthread_create(&t, pthread_attr_default, task, NULL);
6605 #else
6606         status = pthread_create(&t, NULL, task, NULL);
6607 #endif
6608
6609         if( status ) exit( status );
6610
6611         /* make sure pthread_detach() isn't just a stub */
6612 #if HAVE_PTHREADS_D4
6613         status = pthread_detach( &t );
6614 #else
6615         status = pthread_detach( t );
6616 #endif
6617
6618 #ifdef HAVE_LINUX_THREADS
6619         pthread_kill_other_threads_np();
6620 #endif
6621
6622         exit( status );
6623
6624 ; return 0; }
6625 EOF
6626 if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6627   rm -rf conftest*
6628   ol_cv_pthread_create=yes
6629 else
6630   echo "configure: failed program was:" >&5
6631   cat conftest.$ac_ext >&5
6632   rm -rf conftest*
6633   ol_cv_pthread_create=no
6634 fi
6635 rm -f conftest*
6636 else
6637   cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6640 /* pthread test headers */
6641 #include <pthread.h>
6642 #ifndef NULL
6643 #define NULL (void*)0
6644 #endif
6645
6646 static void *task(p)
6647         void *p;
6648 {
6649         return (void *) (p == NULL);
6650 }
6651
6652
6653 int main(argc, argv)
6654         int argc;
6655         char **argv;
6656 {
6657
6658         /* pthread test function */
6659         pthread_t t;
6660         int status;
6661
6662         /* make sure pthread_create() isn't just a stub */
6663 #if HAVE_PTHREADS_D4
6664         status = pthread_create(&t, pthread_attr_default, task, NULL);
6665 #else
6666         status = pthread_create(&t, NULL, task, NULL);
6667 #endif
6668
6669         if( status ) exit( status );
6670
6671         /* make sure pthread_detach() isn't just a stub */
6672 #if HAVE_PTHREADS_D4
6673         status = pthread_detach( &t );
6674 #else
6675         status = pthread_detach( t );
6676 #endif
6677
6678 #ifdef HAVE_LINUX_THREADS
6679         pthread_kill_other_threads_np();
6680 #endif
6681
6682         exit( status );
6683
6684 }
6685
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6688 then
6689   ol_cv_pthread_create=yes
6690 else
6691   echo "configure: failed program was:" >&5
6692   cat conftest.$ac_ext >&5
6693   rm -fr conftest*
6694   ol_cv_pthread_create=no
6695 fi
6696 rm -fr conftest*
6697 fi
6698
6699 fi
6700
6701 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6702
6703                 if test $ol_cv_pthread_create != no ; then
6704                         ol_link_threads=posix
6705                         ol_link_pthreads=""
6706                 fi
6707                 
6708                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6709 if test "$ol_link_threads" = no ; then
6710         # try -kthread
6711         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6712 echo "configure:6713: checking for pthread link with -kthread" >&5
6713 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716   
6717                 # save the flags
6718                 ol_LIBS="$LIBS"
6719                 LIBS="-kthread $LIBS"
6720
6721                 if test "$cross_compiling" = yes; then
6722   cat > conftest.$ac_ext <<EOF
6723 #line 6724 "configure"
6724 #include "confdefs.h"
6725 /* pthread test headers */
6726 #include <pthread.h>
6727 #ifndef NULL
6728 #define NULL (void*)0
6729 #endif
6730
6731 static void *task(p)
6732         void *p;
6733 {
6734         return (void *) (p == NULL);
6735 }
6736
6737 int main() {
6738
6739         /* pthread test function */
6740         pthread_t t;
6741         int status;
6742
6743         /* make sure pthread_create() isn't just a stub */
6744 #if HAVE_PTHREADS_D4
6745         status = pthread_create(&t, pthread_attr_default, task, NULL);
6746 #else
6747         status = pthread_create(&t, NULL, task, NULL);
6748 #endif
6749
6750         if( status ) exit( status );
6751
6752         /* make sure pthread_detach() isn't just a stub */
6753 #if HAVE_PTHREADS_D4
6754         status = pthread_detach( &t );
6755 #else
6756         status = pthread_detach( t );
6757 #endif
6758
6759 #ifdef HAVE_LINUX_THREADS
6760         pthread_kill_other_threads_np();
6761 #endif
6762
6763         exit( status );
6764
6765 ; return 0; }
6766 EOF
6767 if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6768   rm -rf conftest*
6769   ol_cv_pthread_kthread=yes
6770 else
6771   echo "configure: failed program was:" >&5
6772   cat conftest.$ac_ext >&5
6773   rm -rf conftest*
6774   ol_cv_pthread_kthread=no
6775 fi
6776 rm -f conftest*
6777 else
6778   cat > conftest.$ac_ext <<EOF
6779 #line 6780 "configure"
6780 #include "confdefs.h"
6781 /* pthread test headers */
6782 #include <pthread.h>
6783 #ifndef NULL
6784 #define NULL (void*)0
6785 #endif
6786
6787 static void *task(p)
6788         void *p;
6789 {
6790         return (void *) (p == NULL);
6791 }
6792
6793
6794 int main(argc, argv)
6795         int argc;
6796         char **argv;
6797 {
6798
6799         /* pthread test function */
6800         pthread_t t;
6801         int status;
6802
6803         /* make sure pthread_create() isn't just a stub */
6804 #if HAVE_PTHREADS_D4
6805         status = pthread_create(&t, pthread_attr_default, task, NULL);
6806 #else
6807         status = pthread_create(&t, NULL, task, NULL);
6808 #endif
6809
6810         if( status ) exit( status );
6811
6812         /* make sure pthread_detach() isn't just a stub */
6813 #if HAVE_PTHREADS_D4
6814         status = pthread_detach( &t );
6815 #else
6816         status = pthread_detach( t );
6817 #endif
6818
6819 #ifdef HAVE_LINUX_THREADS
6820         pthread_kill_other_threads_np();
6821 #endif
6822
6823         exit( status );
6824
6825 }
6826
6827 EOF
6828 if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6829 then
6830   ol_cv_pthread_kthread=yes
6831 else
6832   echo "configure: failed program was:" >&5
6833   cat conftest.$ac_ext >&5
6834   rm -fr conftest*
6835   ol_cv_pthread_kthread=no
6836 fi
6837 rm -fr conftest*
6838 fi
6839
6840
6841                 # restore the LIBS
6842                 LIBS="$ol_LIBS"
6843         
6844 fi
6845
6846 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6847
6848         if test $ol_cv_pthread_kthread = yes ; then
6849                 ol_link_pthreads="-kthread"
6850                 ol_link_threads=posix
6851         fi
6852 fi
6853
6854                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6855 if test "$ol_link_threads" = no ; then
6856         # try -pthread
6857         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6858 echo "configure:6859: checking for pthread link with -pthread" >&5
6859 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6860   echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862   
6863                 # save the flags
6864                 ol_LIBS="$LIBS"
6865                 LIBS="-pthread $LIBS"
6866
6867                 if test "$cross_compiling" = yes; then
6868   cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871 /* pthread test headers */
6872 #include <pthread.h>
6873 #ifndef NULL
6874 #define NULL (void*)0
6875 #endif
6876
6877 static void *task(p)
6878         void *p;
6879 {
6880         return (void *) (p == NULL);
6881 }
6882
6883 int main() {
6884
6885         /* pthread test function */
6886         pthread_t t;
6887         int status;
6888
6889         /* make sure pthread_create() isn't just a stub */
6890 #if HAVE_PTHREADS_D4
6891         status = pthread_create(&t, pthread_attr_default, task, NULL);
6892 #else
6893         status = pthread_create(&t, NULL, task, NULL);
6894 #endif
6895
6896         if( status ) exit( status );
6897
6898         /* make sure pthread_detach() isn't just a stub */
6899 #if HAVE_PTHREADS_D4
6900         status = pthread_detach( &t );
6901 #else
6902         status = pthread_detach( t );
6903 #endif
6904
6905 #ifdef HAVE_LINUX_THREADS
6906         pthread_kill_other_threads_np();
6907 #endif
6908
6909         exit( status );
6910
6911 ; return 0; }
6912 EOF
6913 if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6914   rm -rf conftest*
6915   ol_cv_pthread_pthread=yes
6916 else
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   ol_cv_pthread_pthread=no
6921 fi
6922 rm -f conftest*
6923 else
6924   cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927 /* pthread test headers */
6928 #include <pthread.h>
6929 #ifndef NULL
6930 #define NULL (void*)0
6931 #endif
6932
6933 static void *task(p)
6934         void *p;
6935 {
6936         return (void *) (p == NULL);
6937 }
6938
6939
6940 int main(argc, argv)
6941         int argc;
6942         char **argv;
6943 {
6944
6945         /* pthread test function */
6946         pthread_t t;
6947         int status;
6948
6949         /* make sure pthread_create() isn't just a stub */
6950 #if HAVE_PTHREADS_D4
6951         status = pthread_create(&t, pthread_attr_default, task, NULL);
6952 #else
6953         status = pthread_create(&t, NULL, task, NULL);
6954 #endif
6955
6956         if( status ) exit( status );
6957
6958         /* make sure pthread_detach() isn't just a stub */
6959 #if HAVE_PTHREADS_D4
6960         status = pthread_detach( &t );
6961 #else
6962         status = pthread_detach( t );
6963 #endif
6964
6965 #ifdef HAVE_LINUX_THREADS
6966         pthread_kill_other_threads_np();
6967 #endif
6968
6969         exit( status );
6970
6971 }
6972
6973 EOF
6974 if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6975 then
6976   ol_cv_pthread_pthread=yes
6977 else
6978   echo "configure: failed program was:" >&5
6979   cat conftest.$ac_ext >&5
6980   rm -fr conftest*
6981   ol_cv_pthread_pthread=no
6982 fi
6983 rm -fr conftest*
6984 fi
6985
6986
6987                 # restore the LIBS
6988                 LIBS="$ol_LIBS"
6989         
6990 fi
6991
6992 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6993
6994         if test $ol_cv_pthread_pthread = yes ; then
6995                 ol_link_pthreads="-pthread"
6996                 ol_link_threads=posix
6997         fi
6998 fi
6999
7000                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7001 if test "$ol_link_threads" = no ; then
7002         # try -pthreads
7003         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7004 echo "configure:7005: checking for pthread link with -pthreads" >&5
7005 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7006   echo $ac_n "(cached) $ac_c" 1>&6
7007 else
7008   
7009                 # save the flags
7010                 ol_LIBS="$LIBS"
7011                 LIBS="-pthreads $LIBS"
7012
7013                 if test "$cross_compiling" = yes; then
7014   cat > conftest.$ac_ext <<EOF
7015 #line 7016 "configure"
7016 #include "confdefs.h"
7017 /* pthread test headers */
7018 #include <pthread.h>
7019 #ifndef NULL
7020 #define NULL (void*)0
7021 #endif
7022
7023 static void *task(p)
7024         void *p;
7025 {
7026         return (void *) (p == NULL);
7027 }
7028
7029 int main() {
7030
7031         /* pthread test function */
7032         pthread_t t;
7033         int status;
7034
7035         /* make sure pthread_create() isn't just a stub */
7036 #if HAVE_PTHREADS_D4
7037         status = pthread_create(&t, pthread_attr_default, task, NULL);
7038 #else
7039         status = pthread_create(&t, NULL, task, NULL);
7040 #endif
7041
7042         if( status ) exit( status );
7043
7044         /* make sure pthread_detach() isn't just a stub */
7045 #if HAVE_PTHREADS_D4
7046         status = pthread_detach( &t );
7047 #else
7048         status = pthread_detach( t );
7049 #endif
7050
7051 #ifdef HAVE_LINUX_THREADS
7052         pthread_kill_other_threads_np();
7053 #endif
7054
7055         exit( status );
7056
7057 ; return 0; }
7058 EOF
7059 if { (eval echo configure:7060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7060   rm -rf conftest*
7061   ol_cv_pthread_pthreads=yes
7062 else
7063   echo "configure: failed program was:" >&5
7064   cat conftest.$ac_ext >&5
7065   rm -rf conftest*
7066   ol_cv_pthread_pthreads=no
7067 fi
7068 rm -f conftest*
7069 else
7070   cat > conftest.$ac_ext <<EOF
7071 #line 7072 "configure"
7072 #include "confdefs.h"
7073 /* pthread test headers */
7074 #include <pthread.h>
7075 #ifndef NULL
7076 #define NULL (void*)0
7077 #endif
7078
7079 static void *task(p)
7080         void *p;
7081 {
7082         return (void *) (p == NULL);
7083 }
7084
7085
7086 int main(argc, argv)
7087         int argc;
7088         char **argv;
7089 {
7090
7091         /* pthread test function */
7092         pthread_t t;
7093         int status;
7094
7095         /* make sure pthread_create() isn't just a stub */
7096 #if HAVE_PTHREADS_D4
7097         status = pthread_create(&t, pthread_attr_default, task, NULL);
7098 #else
7099         status = pthread_create(&t, NULL, task, NULL);
7100 #endif
7101
7102         if( status ) exit( status );
7103
7104         /* make sure pthread_detach() isn't just a stub */
7105 #if HAVE_PTHREADS_D4
7106         status = pthread_detach( &t );
7107 #else
7108         status = pthread_detach( t );
7109 #endif
7110
7111 #ifdef HAVE_LINUX_THREADS
7112         pthread_kill_other_threads_np();
7113 #endif
7114
7115         exit( status );
7116
7117 }
7118
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7121 then
7122   ol_cv_pthread_pthreads=yes
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -fr conftest*
7127   ol_cv_pthread_pthreads=no
7128 fi
7129 rm -fr conftest*
7130 fi
7131
7132
7133                 # restore the LIBS
7134                 LIBS="$ol_LIBS"
7135         
7136 fi
7137
7138 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7139
7140         if test $ol_cv_pthread_pthreads = yes ; then
7141                 ol_link_pthreads="-pthreads"
7142                 ol_link_threads=posix
7143         fi
7144 fi
7145
7146                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7147 if test "$ol_link_threads" = no ; then
7148         # try -mthreads
7149         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7150 echo "configure:7151: checking for pthread link with -mthreads" >&5
7151 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7152   echo $ac_n "(cached) $ac_c" 1>&6
7153 else
7154   
7155                 # save the flags
7156                 ol_LIBS="$LIBS"
7157                 LIBS="-mthreads $LIBS"
7158
7159                 if test "$cross_compiling" = yes; then
7160   cat > conftest.$ac_ext <<EOF
7161 #line 7162 "configure"
7162 #include "confdefs.h"
7163 /* pthread test headers */
7164 #include <pthread.h>
7165 #ifndef NULL
7166 #define NULL (void*)0
7167 #endif
7168
7169 static void *task(p)
7170         void *p;
7171 {
7172         return (void *) (p == NULL);
7173 }
7174
7175 int main() {
7176
7177         /* pthread test function */
7178         pthread_t t;
7179         int status;
7180
7181         /* make sure pthread_create() isn't just a stub */
7182 #if HAVE_PTHREADS_D4
7183         status = pthread_create(&t, pthread_attr_default, task, NULL);
7184 #else
7185         status = pthread_create(&t, NULL, task, NULL);
7186 #endif
7187
7188         if( status ) exit( status );
7189
7190         /* make sure pthread_detach() isn't just a stub */
7191 #if HAVE_PTHREADS_D4
7192         status = pthread_detach( &t );
7193 #else
7194         status = pthread_detach( t );
7195 #endif
7196
7197 #ifdef HAVE_LINUX_THREADS
7198         pthread_kill_other_threads_np();
7199 #endif
7200
7201         exit( status );
7202
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   ol_cv_pthread_mthreads=yes
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   ol_cv_pthread_mthreads=no
7213 fi
7214 rm -f conftest*
7215 else
7216   cat > conftest.$ac_ext <<EOF
7217 #line 7218 "configure"
7218 #include "confdefs.h"
7219 /* pthread test headers */
7220 #include <pthread.h>
7221 #ifndef NULL
7222 #define NULL (void*)0
7223 #endif
7224
7225 static void *task(p)
7226         void *p;
7227 {
7228         return (void *) (p == NULL);
7229 }
7230
7231
7232 int main(argc, argv)
7233         int argc;
7234         char **argv;
7235 {
7236
7237         /* pthread test function */
7238         pthread_t t;
7239         int status;
7240
7241         /* make sure pthread_create() isn't just a stub */
7242 #if HAVE_PTHREADS_D4
7243         status = pthread_create(&t, pthread_attr_default, task, NULL);
7244 #else
7245         status = pthread_create(&t, NULL, task, NULL);
7246 #endif
7247
7248         if( status ) exit( status );
7249
7250         /* make sure pthread_detach() isn't just a stub */
7251 #if HAVE_PTHREADS_D4
7252         status = pthread_detach( &t );
7253 #else
7254         status = pthread_detach( t );
7255 #endif
7256
7257 #ifdef HAVE_LINUX_THREADS
7258         pthread_kill_other_threads_np();
7259 #endif
7260
7261         exit( status );
7262
7263 }
7264
7265 EOF
7266 if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7267 then
7268   ol_cv_pthread_mthreads=yes
7269 else
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -fr conftest*
7273   ol_cv_pthread_mthreads=no
7274 fi
7275 rm -fr conftest*
7276 fi
7277
7278
7279                 # restore the LIBS
7280                 LIBS="$ol_LIBS"
7281         
7282 fi
7283
7284 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7285
7286         if test $ol_cv_pthread_mthreads = yes ; then
7287                 ol_link_pthreads="-mthreads"
7288                 ol_link_threads=posix
7289         fi
7290 fi
7291
7292                 # Pthread try link: -thread (ol_cv_pthread_thread)
7293 if test "$ol_link_threads" = no ; then
7294         # try -thread
7295         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7296 echo "configure:7297: checking for pthread link with -thread" >&5
7297 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7298   echo $ac_n "(cached) $ac_c" 1>&6
7299 else
7300   
7301                 # save the flags
7302                 ol_LIBS="$LIBS"
7303                 LIBS="-thread $LIBS"
7304
7305                 if test "$cross_compiling" = yes; then
7306   cat > conftest.$ac_ext <<EOF
7307 #line 7308 "configure"
7308 #include "confdefs.h"
7309 /* pthread test headers */
7310 #include <pthread.h>
7311 #ifndef NULL
7312 #define NULL (void*)0
7313 #endif
7314
7315 static void *task(p)
7316         void *p;
7317 {
7318         return (void *) (p == NULL);
7319 }
7320
7321 int main() {
7322
7323         /* pthread test function */
7324         pthread_t t;
7325         int status;
7326
7327         /* make sure pthread_create() isn't just a stub */
7328 #if HAVE_PTHREADS_D4
7329         status = pthread_create(&t, pthread_attr_default, task, NULL);
7330 #else
7331         status = pthread_create(&t, NULL, task, NULL);
7332 #endif
7333
7334         if( status ) exit( status );
7335
7336         /* make sure pthread_detach() isn't just a stub */
7337 #if HAVE_PTHREADS_D4
7338         status = pthread_detach( &t );
7339 #else
7340         status = pthread_detach( t );
7341 #endif
7342
7343 #ifdef HAVE_LINUX_THREADS
7344         pthread_kill_other_threads_np();
7345 #endif
7346
7347         exit( status );
7348
7349 ; return 0; }
7350 EOF
7351 if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7352   rm -rf conftest*
7353   ol_cv_pthread_thread=yes
7354 else
7355   echo "configure: failed program was:" >&5
7356   cat conftest.$ac_ext >&5
7357   rm -rf conftest*
7358   ol_cv_pthread_thread=no
7359 fi
7360 rm -f conftest*
7361 else
7362   cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 /* pthread test headers */
7366 #include <pthread.h>
7367 #ifndef NULL
7368 #define NULL (void*)0
7369 #endif
7370
7371 static void *task(p)
7372         void *p;
7373 {
7374         return (void *) (p == NULL);
7375 }
7376
7377
7378 int main(argc, argv)
7379         int argc;
7380         char **argv;
7381 {
7382
7383         /* pthread test function */
7384         pthread_t t;
7385         int status;
7386
7387         /* make sure pthread_create() isn't just a stub */
7388 #if HAVE_PTHREADS_D4
7389         status = pthread_create(&t, pthread_attr_default, task, NULL);
7390 #else
7391         status = pthread_create(&t, NULL, task, NULL);
7392 #endif
7393
7394         if( status ) exit( status );
7395
7396         /* make sure pthread_detach() isn't just a stub */
7397 #if HAVE_PTHREADS_D4
7398         status = pthread_detach( &t );
7399 #else
7400         status = pthread_detach( t );
7401 #endif
7402
7403 #ifdef HAVE_LINUX_THREADS
7404         pthread_kill_other_threads_np();
7405 #endif
7406
7407         exit( status );
7408
7409 }
7410
7411 EOF
7412 if { (eval echo configure:7413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7413 then
7414   ol_cv_pthread_thread=yes
7415 else
7416   echo "configure: failed program was:" >&5
7417   cat conftest.$ac_ext >&5
7418   rm -fr conftest*
7419   ol_cv_pthread_thread=no
7420 fi
7421 rm -fr conftest*
7422 fi
7423
7424
7425                 # restore the LIBS
7426                 LIBS="$ol_LIBS"
7427         
7428 fi
7429
7430 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7431
7432         if test $ol_cv_pthread_thread = yes ; then
7433                 ol_link_pthreads="-thread"
7434                 ol_link_threads=posix
7435         fi
7436 fi
7437
7438
7439                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7440 if test "$ol_link_threads" = no ; then
7441         # try -lpthread -lmach -lexc -lc_r
7442         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7443 echo "configure:7444: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7444 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7445   echo $ac_n "(cached) $ac_c" 1>&6
7446 else
7447   
7448                 # save the flags
7449                 ol_LIBS="$LIBS"
7450                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7451
7452                 if test "$cross_compiling" = yes; then
7453   cat > conftest.$ac_ext <<EOF
7454 #line 7455 "configure"
7455 #include "confdefs.h"
7456 /* pthread test headers */
7457 #include <pthread.h>
7458 #ifndef NULL
7459 #define NULL (void*)0
7460 #endif
7461
7462 static void *task(p)
7463         void *p;
7464 {
7465         return (void *) (p == NULL);
7466 }
7467
7468 int main() {
7469
7470         /* pthread test function */
7471         pthread_t t;
7472         int status;
7473
7474         /* make sure pthread_create() isn't just a stub */
7475 #if HAVE_PTHREADS_D4
7476         status = pthread_create(&t, pthread_attr_default, task, NULL);
7477 #else
7478         status = pthread_create(&t, NULL, task, NULL);
7479 #endif
7480
7481         if( status ) exit( status );
7482
7483         /* make sure pthread_detach() isn't just a stub */
7484 #if HAVE_PTHREADS_D4
7485         status = pthread_detach( &t );
7486 #else
7487         status = pthread_detach( t );
7488 #endif
7489
7490 #ifdef HAVE_LINUX_THREADS
7491         pthread_kill_other_threads_np();
7492 #endif
7493
7494         exit( status );
7495
7496 ; return 0; }
7497 EOF
7498 if { (eval echo configure:7499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7499   rm -rf conftest*
7500   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7501 else
7502   echo "configure: failed program was:" >&5
7503   cat conftest.$ac_ext >&5
7504   rm -rf conftest*
7505   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7506 fi
7507 rm -f conftest*
7508 else
7509   cat > conftest.$ac_ext <<EOF
7510 #line 7511 "configure"
7511 #include "confdefs.h"
7512 /* pthread test headers */
7513 #include <pthread.h>
7514 #ifndef NULL
7515 #define NULL (void*)0
7516 #endif
7517
7518 static void *task(p)
7519         void *p;
7520 {
7521         return (void *) (p == NULL);
7522 }
7523
7524
7525 int main(argc, argv)
7526         int argc;
7527         char **argv;
7528 {
7529
7530         /* pthread test function */
7531         pthread_t t;
7532         int status;
7533
7534         /* make sure pthread_create() isn't just a stub */
7535 #if HAVE_PTHREADS_D4
7536         status = pthread_create(&t, pthread_attr_default, task, NULL);
7537 #else
7538         status = pthread_create(&t, NULL, task, NULL);
7539 #endif
7540
7541         if( status ) exit( status );
7542
7543         /* make sure pthread_detach() isn't just a stub */
7544 #if HAVE_PTHREADS_D4
7545         status = pthread_detach( &t );
7546 #else
7547         status = pthread_detach( t );
7548 #endif
7549
7550 #ifdef HAVE_LINUX_THREADS
7551         pthread_kill_other_threads_np();
7552 #endif
7553
7554         exit( status );
7555
7556 }
7557
7558 EOF
7559 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7560 then
7561   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7562 else
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -fr conftest*
7566   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7567 fi
7568 rm -fr conftest*
7569 fi
7570
7571
7572                 # restore the LIBS
7573                 LIBS="$ol_LIBS"
7574         
7575 fi
7576
7577 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7578
7579         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7580                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7581                 ol_link_threads=posix
7582         fi
7583 fi
7584
7585                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7586 if test "$ol_link_threads" = no ; then
7587         # try -lpthread -lmach -lexc
7588         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7589 echo "configure:7590: checking for pthread link with -lpthread -lmach -lexc" >&5
7590 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7591   echo $ac_n "(cached) $ac_c" 1>&6
7592 else
7593   
7594                 # save the flags
7595                 ol_LIBS="$LIBS"
7596                 LIBS="-lpthread -lmach -lexc $LIBS"
7597
7598                 if test "$cross_compiling" = yes; then
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 /* pthread test headers */
7603 #include <pthread.h>
7604 #ifndef NULL
7605 #define NULL (void*)0
7606 #endif
7607
7608 static void *task(p)
7609         void *p;
7610 {
7611         return (void *) (p == NULL);
7612 }
7613
7614 int main() {
7615
7616         /* pthread test function */
7617         pthread_t t;
7618         int status;
7619
7620         /* make sure pthread_create() isn't just a stub */
7621 #if HAVE_PTHREADS_D4
7622         status = pthread_create(&t, pthread_attr_default, task, NULL);
7623 #else
7624         status = pthread_create(&t, NULL, task, NULL);
7625 #endif
7626
7627         if( status ) exit( status );
7628
7629         /* make sure pthread_detach() isn't just a stub */
7630 #if HAVE_PTHREADS_D4
7631         status = pthread_detach( &t );
7632 #else
7633         status = pthread_detach( t );
7634 #endif
7635
7636 #ifdef HAVE_LINUX_THREADS
7637         pthread_kill_other_threads_np();
7638 #endif
7639
7640         exit( status );
7641
7642 ; return 0; }
7643 EOF
7644 if { (eval echo configure:7645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7645   rm -rf conftest*
7646   ol_cv_pthread_lpthread_lmach_lexc=yes
7647 else
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   ol_cv_pthread_lpthread_lmach_lexc=no
7652 fi
7653 rm -f conftest*
7654 else
7655   cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658 /* pthread test headers */
7659 #include <pthread.h>
7660 #ifndef NULL
7661 #define NULL (void*)0
7662 #endif
7663
7664 static void *task(p)
7665         void *p;
7666 {
7667         return (void *) (p == NULL);
7668 }
7669
7670
7671 int main(argc, argv)
7672         int argc;
7673         char **argv;
7674 {
7675
7676         /* pthread test function */
7677         pthread_t t;
7678         int status;
7679
7680         /* make sure pthread_create() isn't just a stub */
7681 #if HAVE_PTHREADS_D4
7682         status = pthread_create(&t, pthread_attr_default, task, NULL);
7683 #else
7684         status = pthread_create(&t, NULL, task, NULL);
7685 #endif
7686
7687         if( status ) exit( status );
7688
7689         /* make sure pthread_detach() isn't just a stub */
7690 #if HAVE_PTHREADS_D4
7691         status = pthread_detach( &t );
7692 #else
7693         status = pthread_detach( t );
7694 #endif
7695
7696 #ifdef HAVE_LINUX_THREADS
7697         pthread_kill_other_threads_np();
7698 #endif
7699
7700         exit( status );
7701
7702 }
7703
7704 EOF
7705 if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7706 then
7707   ol_cv_pthread_lpthread_lmach_lexc=yes
7708 else
7709   echo "configure: failed program was:" >&5
7710   cat conftest.$ac_ext >&5
7711   rm -fr conftest*
7712   ol_cv_pthread_lpthread_lmach_lexc=no
7713 fi
7714 rm -fr conftest*
7715 fi
7716
7717
7718                 # restore the LIBS
7719                 LIBS="$ol_LIBS"
7720         
7721 fi
7722
7723 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7724
7725         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7726                 ol_link_pthreads="-lpthread -lmach -lexc"
7727                 ol_link_threads=posix
7728         fi
7729 fi
7730
7731
7732                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7733 if test "$ol_link_threads" = no ; then
7734         # try -lpthread -Wl,-woff,85
7735         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7736 echo "configure:7737: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7737 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7738   echo $ac_n "(cached) $ac_c" 1>&6
7739 else
7740   
7741                 # save the flags
7742                 ol_LIBS="$LIBS"
7743                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7744
7745                 if test "$cross_compiling" = yes; then
7746   cat > conftest.$ac_ext <<EOF
7747 #line 7748 "configure"
7748 #include "confdefs.h"
7749 /* pthread test headers */
7750 #include <pthread.h>
7751 #ifndef NULL
7752 #define NULL (void*)0
7753 #endif
7754
7755 static void *task(p)
7756         void *p;
7757 {
7758         return (void *) (p == NULL);
7759 }
7760
7761 int main() {
7762
7763         /* pthread test function */
7764         pthread_t t;
7765         int status;
7766
7767         /* make sure pthread_create() isn't just a stub */
7768 #if HAVE_PTHREADS_D4
7769         status = pthread_create(&t, pthread_attr_default, task, NULL);
7770 #else
7771         status = pthread_create(&t, NULL, task, NULL);
7772 #endif
7773
7774         if( status ) exit( status );
7775
7776         /* make sure pthread_detach() isn't just a stub */
7777 #if HAVE_PTHREADS_D4
7778         status = pthread_detach( &t );
7779 #else
7780         status = pthread_detach( t );
7781 #endif
7782
7783 #ifdef HAVE_LINUX_THREADS
7784         pthread_kill_other_threads_np();
7785 #endif
7786
7787         exit( status );
7788
7789 ; return 0; }
7790 EOF
7791 if { (eval echo configure:7792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7792   rm -rf conftest*
7793   ol_cv_pthread_lib_lpthread_woff=yes
7794 else
7795   echo "configure: failed program was:" >&5
7796   cat conftest.$ac_ext >&5
7797   rm -rf conftest*
7798   ol_cv_pthread_lib_lpthread_woff=no
7799 fi
7800 rm -f conftest*
7801 else
7802   cat > conftest.$ac_ext <<EOF
7803 #line 7804 "configure"
7804 #include "confdefs.h"
7805 /* pthread test headers */
7806 #include <pthread.h>
7807 #ifndef NULL
7808 #define NULL (void*)0
7809 #endif
7810
7811 static void *task(p)
7812         void *p;
7813 {
7814         return (void *) (p == NULL);
7815 }
7816
7817
7818 int main(argc, argv)
7819         int argc;
7820         char **argv;
7821 {
7822
7823         /* pthread test function */
7824         pthread_t t;
7825         int status;
7826
7827         /* make sure pthread_create() isn't just a stub */
7828 #if HAVE_PTHREADS_D4
7829         status = pthread_create(&t, pthread_attr_default, task, NULL);
7830 #else
7831         status = pthread_create(&t, NULL, task, NULL);
7832 #endif
7833
7834         if( status ) exit( status );
7835
7836         /* make sure pthread_detach() isn't just a stub */
7837 #if HAVE_PTHREADS_D4
7838         status = pthread_detach( &t );
7839 #else
7840         status = pthread_detach( t );
7841 #endif
7842
7843 #ifdef HAVE_LINUX_THREADS
7844         pthread_kill_other_threads_np();
7845 #endif
7846
7847         exit( status );
7848
7849 }
7850
7851 EOF
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7853 then
7854   ol_cv_pthread_lib_lpthread_woff=yes
7855 else
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -fr conftest*
7859   ol_cv_pthread_lib_lpthread_woff=no
7860 fi
7861 rm -fr conftest*
7862 fi
7863
7864
7865                 # restore the LIBS
7866                 LIBS="$ol_LIBS"
7867         
7868 fi
7869
7870 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7871
7872         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7873                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7874                 ol_link_threads=posix
7875         fi
7876 fi
7877
7878
7879                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7880 if test "$ol_link_threads" = no ; then
7881         # try -lpthread
7882         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7883 echo "configure:7884: checking for pthread link with -lpthread" >&5
7884 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7885   echo $ac_n "(cached) $ac_c" 1>&6
7886 else
7887   
7888                 # save the flags
7889                 ol_LIBS="$LIBS"
7890                 LIBS="-lpthread $LIBS"
7891
7892                 if test "$cross_compiling" = yes; then
7893   cat > conftest.$ac_ext <<EOF
7894 #line 7895 "configure"
7895 #include "confdefs.h"
7896 /* pthread test headers */
7897 #include <pthread.h>
7898 #ifndef NULL
7899 #define NULL (void*)0
7900 #endif
7901
7902 static void *task(p)
7903         void *p;
7904 {
7905         return (void *) (p == NULL);
7906 }
7907
7908 int main() {
7909
7910         /* pthread test function */
7911         pthread_t t;
7912         int status;
7913
7914         /* make sure pthread_create() isn't just a stub */
7915 #if HAVE_PTHREADS_D4
7916         status = pthread_create(&t, pthread_attr_default, task, NULL);
7917 #else
7918         status = pthread_create(&t, NULL, task, NULL);
7919 #endif
7920
7921         if( status ) exit( status );
7922
7923         /* make sure pthread_detach() isn't just a stub */
7924 #if HAVE_PTHREADS_D4
7925         status = pthread_detach( &t );
7926 #else
7927         status = pthread_detach( t );
7928 #endif
7929
7930 #ifdef HAVE_LINUX_THREADS
7931         pthread_kill_other_threads_np();
7932 #endif
7933
7934         exit( status );
7935
7936 ; return 0; }
7937 EOF
7938 if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7939   rm -rf conftest*
7940   ol_cv_pthread_lpthread=yes
7941 else
7942   echo "configure: failed program was:" >&5
7943   cat conftest.$ac_ext >&5
7944   rm -rf conftest*
7945   ol_cv_pthread_lpthread=no
7946 fi
7947 rm -f conftest*
7948 else
7949   cat > conftest.$ac_ext <<EOF
7950 #line 7951 "configure"
7951 #include "confdefs.h"
7952 /* pthread test headers */
7953 #include <pthread.h>
7954 #ifndef NULL
7955 #define NULL (void*)0
7956 #endif
7957
7958 static void *task(p)
7959         void *p;
7960 {
7961         return (void *) (p == NULL);
7962 }
7963
7964
7965 int main(argc, argv)
7966         int argc;
7967         char **argv;
7968 {
7969
7970         /* pthread test function */
7971         pthread_t t;
7972         int status;
7973
7974         /* make sure pthread_create() isn't just a stub */
7975 #if HAVE_PTHREADS_D4
7976         status = pthread_create(&t, pthread_attr_default, task, NULL);
7977 #else
7978         status = pthread_create(&t, NULL, task, NULL);
7979 #endif
7980
7981         if( status ) exit( status );
7982
7983         /* make sure pthread_detach() isn't just a stub */
7984 #if HAVE_PTHREADS_D4
7985         status = pthread_detach( &t );
7986 #else
7987         status = pthread_detach( t );
7988 #endif
7989
7990 #ifdef HAVE_LINUX_THREADS
7991         pthread_kill_other_threads_np();
7992 #endif
7993
7994         exit( status );
7995
7996 }
7997
7998 EOF
7999 if { (eval echo configure:8000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8000 then
8001   ol_cv_pthread_lpthread=yes
8002 else
8003   echo "configure: failed program was:" >&5
8004   cat conftest.$ac_ext >&5
8005   rm -fr conftest*
8006   ol_cv_pthread_lpthread=no
8007 fi
8008 rm -fr conftest*
8009 fi
8010
8011
8012                 # restore the LIBS
8013                 LIBS="$ol_LIBS"
8014         
8015 fi
8016
8017 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8018
8019         if test $ol_cv_pthread_lpthread = yes ; then
8020                 ol_link_pthreads="-lpthread"
8021                 ol_link_threads=posix
8022         fi
8023 fi
8024
8025                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8026 if test "$ol_link_threads" = no ; then
8027         # try -lc_r
8028         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8029 echo "configure:8030: checking for pthread link with -lc_r" >&5
8030 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8031   echo $ac_n "(cached) $ac_c" 1>&6
8032 else
8033   
8034                 # save the flags
8035                 ol_LIBS="$LIBS"
8036                 LIBS="-lc_r $LIBS"
8037
8038                 if test "$cross_compiling" = yes; then
8039   cat > conftest.$ac_ext <<EOF
8040 #line 8041 "configure"
8041 #include "confdefs.h"
8042 /* pthread test headers */
8043 #include <pthread.h>
8044 #ifndef NULL
8045 #define NULL (void*)0
8046 #endif
8047
8048 static void *task(p)
8049         void *p;
8050 {
8051         return (void *) (p == NULL);
8052 }
8053
8054 int main() {
8055
8056         /* pthread test function */
8057         pthread_t t;
8058         int status;
8059
8060         /* make sure pthread_create() isn't just a stub */
8061 #if HAVE_PTHREADS_D4
8062         status = pthread_create(&t, pthread_attr_default, task, NULL);
8063 #else
8064         status = pthread_create(&t, NULL, task, NULL);
8065 #endif
8066
8067         if( status ) exit( status );
8068
8069         /* make sure pthread_detach() isn't just a stub */
8070 #if HAVE_PTHREADS_D4
8071         status = pthread_detach( &t );
8072 #else
8073         status = pthread_detach( t );
8074 #endif
8075
8076 #ifdef HAVE_LINUX_THREADS
8077         pthread_kill_other_threads_np();
8078 #endif
8079
8080         exit( status );
8081
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8085   rm -rf conftest*
8086   ol_cv_pthread_lc_r=yes
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   ol_cv_pthread_lc_r=no
8092 fi
8093 rm -f conftest*
8094 else
8095   cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 /* pthread test headers */
8099 #include <pthread.h>
8100 #ifndef NULL
8101 #define NULL (void*)0
8102 #endif
8103
8104 static void *task(p)
8105         void *p;
8106 {
8107         return (void *) (p == NULL);
8108 }
8109
8110
8111 int main(argc, argv)
8112         int argc;
8113         char **argv;
8114 {
8115
8116         /* pthread test function */
8117         pthread_t t;
8118         int status;
8119
8120         /* make sure pthread_create() isn't just a stub */
8121 #if HAVE_PTHREADS_D4
8122         status = pthread_create(&t, pthread_attr_default, task, NULL);
8123 #else
8124         status = pthread_create(&t, NULL, task, NULL);
8125 #endif
8126
8127         if( status ) exit( status );
8128
8129         /* make sure pthread_detach() isn't just a stub */
8130 #if HAVE_PTHREADS_D4
8131         status = pthread_detach( &t );
8132 #else
8133         status = pthread_detach( t );
8134 #endif
8135
8136 #ifdef HAVE_LINUX_THREADS
8137         pthread_kill_other_threads_np();
8138 #endif
8139
8140         exit( status );
8141
8142 }
8143
8144 EOF
8145 if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8146 then
8147   ol_cv_pthread_lc_r=yes
8148 else
8149   echo "configure: failed program was:" >&5
8150   cat conftest.$ac_ext >&5
8151   rm -fr conftest*
8152   ol_cv_pthread_lc_r=no
8153 fi
8154 rm -fr conftest*
8155 fi
8156
8157
8158                 # restore the LIBS
8159                 LIBS="$ol_LIBS"
8160         
8161 fi
8162
8163 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8164
8165         if test $ol_cv_pthread_lc_r = yes ; then
8166                 ol_link_pthreads="-lc_r"
8167                 ol_link_threads=posix
8168         fi
8169 fi
8170
8171
8172                 # Pthread try link: -threads (ol_cv_pthread_threads)
8173 if test "$ol_link_threads" = no ; then
8174         # try -threads
8175         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8176 echo "configure:8177: checking for pthread link with -threads" >&5
8177 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8178   echo $ac_n "(cached) $ac_c" 1>&6
8179 else
8180   
8181                 # save the flags
8182                 ol_LIBS="$LIBS"
8183                 LIBS="-threads $LIBS"
8184
8185                 if test "$cross_compiling" = yes; then
8186   cat > conftest.$ac_ext <<EOF
8187 #line 8188 "configure"
8188 #include "confdefs.h"
8189 /* pthread test headers */
8190 #include <pthread.h>
8191 #ifndef NULL
8192 #define NULL (void*)0
8193 #endif
8194
8195 static void *task(p)
8196         void *p;
8197 {
8198         return (void *) (p == NULL);
8199 }
8200
8201 int main() {
8202
8203         /* pthread test function */
8204         pthread_t t;
8205         int status;
8206
8207         /* make sure pthread_create() isn't just a stub */
8208 #if HAVE_PTHREADS_D4
8209         status = pthread_create(&t, pthread_attr_default, task, NULL);
8210 #else
8211         status = pthread_create(&t, NULL, task, NULL);
8212 #endif
8213
8214         if( status ) exit( status );
8215
8216         /* make sure pthread_detach() isn't just a stub */
8217 #if HAVE_PTHREADS_D4
8218         status = pthread_detach( &t );
8219 #else
8220         status = pthread_detach( t );
8221 #endif
8222
8223 #ifdef HAVE_LINUX_THREADS
8224         pthread_kill_other_threads_np();
8225 #endif
8226
8227         exit( status );
8228
8229 ; return 0; }
8230 EOF
8231 if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8232   rm -rf conftest*
8233   ol_cv_pthread_threads=yes
8234 else
8235   echo "configure: failed program was:" >&5
8236   cat conftest.$ac_ext >&5
8237   rm -rf conftest*
8238   ol_cv_pthread_threads=no
8239 fi
8240 rm -f conftest*
8241 else
8242   cat > conftest.$ac_ext <<EOF
8243 #line 8244 "configure"
8244 #include "confdefs.h"
8245 /* pthread test headers */
8246 #include <pthread.h>
8247 #ifndef NULL
8248 #define NULL (void*)0
8249 #endif
8250
8251 static void *task(p)
8252         void *p;
8253 {
8254         return (void *) (p == NULL);
8255 }
8256
8257
8258 int main(argc, argv)
8259         int argc;
8260         char **argv;
8261 {
8262
8263         /* pthread test function */
8264         pthread_t t;
8265         int status;
8266
8267         /* make sure pthread_create() isn't just a stub */
8268 #if HAVE_PTHREADS_D4
8269         status = pthread_create(&t, pthread_attr_default, task, NULL);
8270 #else
8271         status = pthread_create(&t, NULL, task, NULL);
8272 #endif
8273
8274         if( status ) exit( status );
8275
8276         /* make sure pthread_detach() isn't just a stub */
8277 #if HAVE_PTHREADS_D4
8278         status = pthread_detach( &t );
8279 #else
8280         status = pthread_detach( t );
8281 #endif
8282
8283 #ifdef HAVE_LINUX_THREADS
8284         pthread_kill_other_threads_np();
8285 #endif
8286
8287         exit( status );
8288
8289 }
8290
8291 EOF
8292 if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8293 then
8294   ol_cv_pthread_threads=yes
8295 else
8296   echo "configure: failed program was:" >&5
8297   cat conftest.$ac_ext >&5
8298   rm -fr conftest*
8299   ol_cv_pthread_threads=no
8300 fi
8301 rm -fr conftest*
8302 fi
8303
8304
8305                 # restore the LIBS
8306                 LIBS="$ol_LIBS"
8307         
8308 fi
8309
8310 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8311
8312         if test $ol_cv_pthread_threads = yes ; then
8313                 ol_link_pthreads="-threads"
8314                 ol_link_threads=posix
8315         fi
8316 fi
8317
8318
8319                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8320 if test "$ol_link_threads" = no ; then
8321         # try -lpthreads -lmach -lexc -lc_r
8322         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8323 echo "configure:8324: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8324 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8325   echo $ac_n "(cached) $ac_c" 1>&6
8326 else
8327   
8328                 # save the flags
8329                 ol_LIBS="$LIBS"
8330                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8331
8332                 if test "$cross_compiling" = yes; then
8333   cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 /* pthread test headers */
8337 #include <pthread.h>
8338 #ifndef NULL
8339 #define NULL (void*)0
8340 #endif
8341
8342 static void *task(p)
8343         void *p;
8344 {
8345         return (void *) (p == NULL);
8346 }
8347
8348 int main() {
8349
8350         /* pthread test function */
8351         pthread_t t;
8352         int status;
8353
8354         /* make sure pthread_create() isn't just a stub */
8355 #if HAVE_PTHREADS_D4
8356         status = pthread_create(&t, pthread_attr_default, task, NULL);
8357 #else
8358         status = pthread_create(&t, NULL, task, NULL);
8359 #endif
8360
8361         if( status ) exit( status );
8362
8363         /* make sure pthread_detach() isn't just a stub */
8364 #if HAVE_PTHREADS_D4
8365         status = pthread_detach( &t );
8366 #else
8367         status = pthread_detach( t );
8368 #endif
8369
8370 #ifdef HAVE_LINUX_THREADS
8371         pthread_kill_other_threads_np();
8372 #endif
8373
8374         exit( status );
8375
8376 ; return 0; }
8377 EOF
8378 if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8379   rm -rf conftest*
8380   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8381 else
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8386 fi
8387 rm -f conftest*
8388 else
8389   cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392 /* pthread test headers */
8393 #include <pthread.h>
8394 #ifndef NULL
8395 #define NULL (void*)0
8396 #endif
8397
8398 static void *task(p)
8399         void *p;
8400 {
8401         return (void *) (p == NULL);
8402 }
8403
8404
8405 int main(argc, argv)
8406         int argc;
8407         char **argv;
8408 {
8409
8410         /* pthread test function */
8411         pthread_t t;
8412         int status;
8413
8414         /* make sure pthread_create() isn't just a stub */
8415 #if HAVE_PTHREADS_D4
8416         status = pthread_create(&t, pthread_attr_default, task, NULL);
8417 #else
8418         status = pthread_create(&t, NULL, task, NULL);
8419 #endif
8420
8421         if( status ) exit( status );
8422
8423         /* make sure pthread_detach() isn't just a stub */
8424 #if HAVE_PTHREADS_D4
8425         status = pthread_detach( &t );
8426 #else
8427         status = pthread_detach( t );
8428 #endif
8429
8430 #ifdef HAVE_LINUX_THREADS
8431         pthread_kill_other_threads_np();
8432 #endif
8433
8434         exit( status );
8435
8436 }
8437
8438 EOF
8439 if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8440 then
8441   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8442 else
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -fr conftest*
8446   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8447 fi
8448 rm -fr conftest*
8449 fi
8450
8451
8452                 # restore the LIBS
8453                 LIBS="$ol_LIBS"
8454         
8455 fi
8456
8457 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8458
8459         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8460                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8461                 ol_link_threads=posix
8462         fi
8463 fi
8464
8465                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8466 if test "$ol_link_threads" = no ; then
8467         # try -lpthreads -lmach -lexc
8468         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8469 echo "configure:8470: checking for pthread link with -lpthreads -lmach -lexc" >&5
8470 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8471   echo $ac_n "(cached) $ac_c" 1>&6
8472 else
8473   
8474                 # save the flags
8475                 ol_LIBS="$LIBS"
8476                 LIBS="-lpthreads -lmach -lexc $LIBS"
8477
8478                 if test "$cross_compiling" = yes; then
8479   cat > conftest.$ac_ext <<EOF
8480 #line 8481 "configure"
8481 #include "confdefs.h"
8482 /* pthread test headers */
8483 #include <pthread.h>
8484 #ifndef NULL
8485 #define NULL (void*)0
8486 #endif
8487
8488 static void *task(p)
8489         void *p;
8490 {
8491         return (void *) (p == NULL);
8492 }
8493
8494 int main() {
8495
8496         /* pthread test function */
8497         pthread_t t;
8498         int status;
8499
8500         /* make sure pthread_create() isn't just a stub */
8501 #if HAVE_PTHREADS_D4
8502         status = pthread_create(&t, pthread_attr_default, task, NULL);
8503 #else
8504         status = pthread_create(&t, NULL, task, NULL);
8505 #endif
8506
8507         if( status ) exit( status );
8508
8509         /* make sure pthread_detach() isn't just a stub */
8510 #if HAVE_PTHREADS_D4
8511         status = pthread_detach( &t );
8512 #else
8513         status = pthread_detach( t );
8514 #endif
8515
8516 #ifdef HAVE_LINUX_THREADS
8517         pthread_kill_other_threads_np();
8518 #endif
8519
8520         exit( status );
8521
8522 ; return 0; }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8525   rm -rf conftest*
8526   ol_cv_pthread_lpthreads_lmach_lexc=yes
8527 else
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -rf conftest*
8531   ol_cv_pthread_lpthreads_lmach_lexc=no
8532 fi
8533 rm -f conftest*
8534 else
8535   cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 /* pthread test headers */
8539 #include <pthread.h>
8540 #ifndef NULL
8541 #define NULL (void*)0
8542 #endif
8543
8544 static void *task(p)
8545         void *p;
8546 {
8547         return (void *) (p == NULL);
8548 }
8549
8550
8551 int main(argc, argv)
8552         int argc;
8553         char **argv;
8554 {
8555
8556         /* pthread test function */
8557         pthread_t t;
8558         int status;
8559
8560         /* make sure pthread_create() isn't just a stub */
8561 #if HAVE_PTHREADS_D4
8562         status = pthread_create(&t, pthread_attr_default, task, NULL);
8563 #else
8564         status = pthread_create(&t, NULL, task, NULL);
8565 #endif
8566
8567         if( status ) exit( status );
8568
8569         /* make sure pthread_detach() isn't just a stub */
8570 #if HAVE_PTHREADS_D4
8571         status = pthread_detach( &t );
8572 #else
8573         status = pthread_detach( t );
8574 #endif
8575
8576 #ifdef HAVE_LINUX_THREADS
8577         pthread_kill_other_threads_np();
8578 #endif
8579
8580         exit( status );
8581
8582 }
8583
8584 EOF
8585 if { (eval echo configure:8586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8586 then
8587   ol_cv_pthread_lpthreads_lmach_lexc=yes
8588 else
8589   echo "configure: failed program was:" >&5
8590   cat conftest.$ac_ext >&5
8591   rm -fr conftest*
8592   ol_cv_pthread_lpthreads_lmach_lexc=no
8593 fi
8594 rm -fr conftest*
8595 fi
8596
8597
8598                 # restore the LIBS
8599                 LIBS="$ol_LIBS"
8600         
8601 fi
8602
8603 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8604
8605         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8606                 ol_link_pthreads="-lpthreads -lmach -lexc"
8607                 ol_link_threads=posix
8608         fi
8609 fi
8610
8611                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8612 if test "$ol_link_threads" = no ; then
8613         # try -lpthreads -lexc
8614         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8615 echo "configure:8616: checking for pthread link with -lpthreads -lexc" >&5
8616 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8617   echo $ac_n "(cached) $ac_c" 1>&6
8618 else
8619   
8620                 # save the flags
8621                 ol_LIBS="$LIBS"
8622                 LIBS="-lpthreads -lexc $LIBS"
8623
8624                 if test "$cross_compiling" = yes; then
8625   cat > conftest.$ac_ext <<EOF
8626 #line 8627 "configure"
8627 #include "confdefs.h"
8628 /* pthread test headers */
8629 #include <pthread.h>
8630 #ifndef NULL
8631 #define NULL (void*)0
8632 #endif
8633
8634 static void *task(p)
8635         void *p;
8636 {
8637         return (void *) (p == NULL);
8638 }
8639
8640 int main() {
8641
8642         /* pthread test function */
8643         pthread_t t;
8644         int status;
8645
8646         /* make sure pthread_create() isn't just a stub */
8647 #if HAVE_PTHREADS_D4
8648         status = pthread_create(&t, pthread_attr_default, task, NULL);
8649 #else
8650         status = pthread_create(&t, NULL, task, NULL);
8651 #endif
8652
8653         if( status ) exit( status );
8654
8655         /* make sure pthread_detach() isn't just a stub */
8656 #if HAVE_PTHREADS_D4
8657         status = pthread_detach( &t );
8658 #else
8659         status = pthread_detach( t );
8660 #endif
8661
8662 #ifdef HAVE_LINUX_THREADS
8663         pthread_kill_other_threads_np();
8664 #endif
8665
8666         exit( status );
8667
8668 ; return 0; }
8669 EOF
8670 if { (eval echo configure:8671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8671   rm -rf conftest*
8672   ol_cv_pthread_lpthreads_lexc=yes
8673 else
8674   echo "configure: failed program was:" >&5
8675   cat conftest.$ac_ext >&5
8676   rm -rf conftest*
8677   ol_cv_pthread_lpthreads_lexc=no
8678 fi
8679 rm -f conftest*
8680 else
8681   cat > conftest.$ac_ext <<EOF
8682 #line 8683 "configure"
8683 #include "confdefs.h"
8684 /* pthread test headers */
8685 #include <pthread.h>
8686 #ifndef NULL
8687 #define NULL (void*)0
8688 #endif
8689
8690 static void *task(p)
8691         void *p;
8692 {
8693         return (void *) (p == NULL);
8694 }
8695
8696
8697 int main(argc, argv)
8698         int argc;
8699         char **argv;
8700 {
8701
8702         /* pthread test function */
8703         pthread_t t;
8704         int status;
8705
8706         /* make sure pthread_create() isn't just a stub */
8707 #if HAVE_PTHREADS_D4
8708         status = pthread_create(&t, pthread_attr_default, task, NULL);
8709 #else
8710         status = pthread_create(&t, NULL, task, NULL);
8711 #endif
8712
8713         if( status ) exit( status );
8714
8715         /* make sure pthread_detach() isn't just a stub */
8716 #if HAVE_PTHREADS_D4
8717         status = pthread_detach( &t );
8718 #else
8719         status = pthread_detach( t );
8720 #endif
8721
8722 #ifdef HAVE_LINUX_THREADS
8723         pthread_kill_other_threads_np();
8724 #endif
8725
8726         exit( status );
8727
8728 }
8729
8730 EOF
8731 if { (eval echo configure:8732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8732 then
8733   ol_cv_pthread_lpthreads_lexc=yes
8734 else
8735   echo "configure: failed program was:" >&5
8736   cat conftest.$ac_ext >&5
8737   rm -fr conftest*
8738   ol_cv_pthread_lpthreads_lexc=no
8739 fi
8740 rm -fr conftest*
8741 fi
8742
8743
8744                 # restore the LIBS
8745                 LIBS="$ol_LIBS"
8746         
8747 fi
8748
8749 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8750
8751         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8752                 ol_link_pthreads="-lpthreads -lexc"
8753                 ol_link_threads=posix
8754         fi
8755 fi
8756
8757
8758                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8759 if test "$ol_link_threads" = no ; then
8760         # try -lpthreads
8761         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8762 echo "configure:8763: checking for pthread link with -lpthreads" >&5
8763 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   
8767                 # save the flags
8768                 ol_LIBS="$LIBS"
8769                 LIBS="-lpthreads $LIBS"
8770
8771                 if test "$cross_compiling" = yes; then
8772   cat > conftest.$ac_ext <<EOF
8773 #line 8774 "configure"
8774 #include "confdefs.h"
8775 /* pthread test headers */
8776 #include <pthread.h>
8777 #ifndef NULL
8778 #define NULL (void*)0
8779 #endif
8780
8781 static void *task(p)
8782         void *p;
8783 {
8784         return (void *) (p == NULL);
8785 }
8786
8787 int main() {
8788
8789         /* pthread test function */
8790         pthread_t t;
8791         int status;
8792
8793         /* make sure pthread_create() isn't just a stub */
8794 #if HAVE_PTHREADS_D4
8795         status = pthread_create(&t, pthread_attr_default, task, NULL);
8796 #else
8797         status = pthread_create(&t, NULL, task, NULL);
8798 #endif
8799
8800         if( status ) exit( status );
8801
8802         /* make sure pthread_detach() isn't just a stub */
8803 #if HAVE_PTHREADS_D4
8804         status = pthread_detach( &t );
8805 #else
8806         status = pthread_detach( t );
8807 #endif
8808
8809 #ifdef HAVE_LINUX_THREADS
8810         pthread_kill_other_threads_np();
8811 #endif
8812
8813         exit( status );
8814
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8818   rm -rf conftest*
8819   ol_cv_pthread_lib_lpthreads=yes
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   ol_cv_pthread_lib_lpthreads=no
8825 fi
8826 rm -f conftest*
8827 else
8828   cat > conftest.$ac_ext <<EOF
8829 #line 8830 "configure"
8830 #include "confdefs.h"
8831 /* pthread test headers */
8832 #include <pthread.h>
8833 #ifndef NULL
8834 #define NULL (void*)0
8835 #endif
8836
8837 static void *task(p)
8838         void *p;
8839 {
8840         return (void *) (p == NULL);
8841 }
8842
8843
8844 int main(argc, argv)
8845         int argc;
8846         char **argv;
8847 {
8848
8849         /* pthread test function */
8850         pthread_t t;
8851         int status;
8852
8853         /* make sure pthread_create() isn't just a stub */
8854 #if HAVE_PTHREADS_D4
8855         status = pthread_create(&t, pthread_attr_default, task, NULL);
8856 #else
8857         status = pthread_create(&t, NULL, task, NULL);
8858 #endif
8859
8860         if( status ) exit( status );
8861
8862         /* make sure pthread_detach() isn't just a stub */
8863 #if HAVE_PTHREADS_D4
8864         status = pthread_detach( &t );
8865 #else
8866         status = pthread_detach( t );
8867 #endif
8868
8869 #ifdef HAVE_LINUX_THREADS
8870         pthread_kill_other_threads_np();
8871 #endif
8872
8873         exit( status );
8874
8875 }
8876
8877 EOF
8878 if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8879 then
8880   ol_cv_pthread_lib_lpthreads=yes
8881 else
8882   echo "configure: failed program was:" >&5
8883   cat conftest.$ac_ext >&5
8884   rm -fr conftest*
8885   ol_cv_pthread_lib_lpthreads=no
8886 fi
8887 rm -fr conftest*
8888 fi
8889
8890
8891                 # restore the LIBS
8892                 LIBS="$ol_LIBS"
8893         
8894 fi
8895
8896 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8897
8898         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8899                 ol_link_pthreads="-lpthreads"
8900                 ol_link_threads=posix
8901         fi
8902 fi
8903
8904
8905                 if test $ol_link_threads != no ; then
8906                         cat >> confdefs.h <<\EOF
8907 #define HAVE_PTHREADS 1
8908 EOF
8909
8910
8911                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8912
8913                                                 save_CPPFLAGS="$CPPFLAGS"
8914                         save_LIBS="$LIBS"
8915                         LIBS="$LTHREAD_LIBS $LIBS"
8916
8917                                                                                                 for ac_func in sched_yield pthread_yield
8918 do
8919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8920 echo "configure:8921: checking for $ac_func" >&5
8921 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8922   echo $ac_n "(cached) $ac_c" 1>&6
8923 else
8924   cat > conftest.$ac_ext <<EOF
8925 #line 8926 "configure"
8926 #include "confdefs.h"
8927 /* System header to define __stub macros and hopefully few prototypes,
8928     which can conflict with char $ac_func(); below.  */
8929 #include <assert.h>
8930 /* Override any gcc2 internal prototype to avoid an error.  */
8931 /* We use char because int might match the return type of a gcc2
8932     builtin and then its argument prototype would still apply.  */
8933 char $ac_func();
8934 char (*f)();
8935
8936 int main() {
8937
8938 /* The GNU C library defines this for functions which it implements
8939     to always fail with ENOSYS.  Some functions are actually named
8940     something starting with __ and the normal name is an alias.  */
8941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8942 choke me
8943 #else
8944 f = $ac_func;
8945 #endif
8946
8947 ; return 0; }
8948 EOF
8949 if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8950   rm -rf conftest*
8951   eval "ac_cv_func_$ac_func=yes"
8952 else
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_func_$ac_func=no"
8957 fi
8958 rm -f conftest*
8959 fi
8960
8961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8962   echo "$ac_t""yes" 1>&6
8963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8964   cat >> confdefs.h <<EOF
8965 #define $ac_tr_func 1
8966 EOF
8967  
8968 else
8969   echo "$ac_t""no" 1>&6
8970 fi
8971 done
8972
8973
8974                         if test $ac_cv_func_sched_yield = no -a \
8975                                 $ac_cv_func_pthread_yield = no ; then
8976                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8977 echo "configure:8978: checking for sched_yield in -lrt" >&5
8978 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8980   echo $ac_n "(cached) $ac_c" 1>&6
8981 else
8982   ac_save_LIBS="$LIBS"
8983 LIBS="-lrt  $LIBS"
8984 cat > conftest.$ac_ext <<EOF
8985 #line 8986 "configure"
8986 #include "confdefs.h"
8987 /* Override any gcc2 internal prototype to avoid an error.  */
8988 /* We use char because int might match the return type of a gcc2
8989     builtin and then its argument prototype would still apply.  */
8990 char sched_yield();
8991
8992 int main() {
8993 sched_yield()
8994 ; return 0; }
8995 EOF
8996 if { (eval echo configure:8997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8997   rm -rf conftest*
8998   eval "ac_cv_lib_$ac_lib_var=yes"
8999 else
9000   echo "configure: failed program was:" >&5
9001   cat conftest.$ac_ext >&5
9002   rm -rf conftest*
9003   eval "ac_cv_lib_$ac_lib_var=no"
9004 fi
9005 rm -f conftest*
9006 LIBS="$ac_save_LIBS"
9007
9008 fi
9009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9010   echo "$ac_t""yes" 1>&6
9011   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9012                                         cat >> confdefs.h <<\EOF
9013 #define HAVE_SCHED_YIELD 1
9014 EOF
9015
9016                                         ac_cv_func_sched_yield=yes
9017 else
9018   echo "$ac_t""no" 1>&6
9019 ac_cv_func_sched_yield=no
9020 fi
9021
9022                         fi
9023                         if test $ac_cv_func_sched_yield = no -a \
9024                                 $ac_cv_func_pthread_yield = no ; then
9025                                                                                                 for ac_func in thr_yield
9026 do
9027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9028 echo "configure:9029: checking for $ac_func" >&5
9029 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   cat > conftest.$ac_ext <<EOF
9033 #line 9034 "configure"
9034 #include "confdefs.h"
9035 /* System header to define __stub macros and hopefully few prototypes,
9036     which can conflict with char $ac_func(); below.  */
9037 #include <assert.h>
9038 /* Override any gcc2 internal prototype to avoid an error.  */
9039 /* We use char because int might match the return type of a gcc2
9040     builtin and then its argument prototype would still apply.  */
9041 char $ac_func();
9042 char (*f)();
9043
9044 int main() {
9045
9046 /* The GNU C library defines this for functions which it implements
9047     to always fail with ENOSYS.  Some functions are actually named
9048     something starting with __ and the normal name is an alias.  */
9049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9050 choke me
9051 #else
9052 f = $ac_func;
9053 #endif
9054
9055 ; return 0; }
9056 EOF
9057 if { (eval echo configure:9058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9058   rm -rf conftest*
9059   eval "ac_cv_func_$ac_func=yes"
9060 else
9061   echo "configure: failed program was:" >&5
9062   cat conftest.$ac_ext >&5
9063   rm -rf conftest*
9064   eval "ac_cv_func_$ac_func=no"
9065 fi
9066 rm -f conftest*
9067 fi
9068
9069 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9070   echo "$ac_t""yes" 1>&6
9071     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9072   cat >> confdefs.h <<EOF
9073 #define $ac_tr_func 1
9074 EOF
9075  
9076 else
9077   echo "$ac_t""no" 1>&6
9078 fi
9079 done
9080
9081                         fi
9082                         if test $ac_cv_func_sched_yield = no -a \
9083                                 $ac_cv_func_pthread_yield = no -a \
9084                                 "$ac_cv_func_thr_yield" = no ; then
9085                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9086                         fi
9087
9088                                                 for ac_func in pthread_kill
9089 do
9090 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9091 echo "configure:9092: checking for $ac_func" >&5
9092 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9093   echo $ac_n "(cached) $ac_c" 1>&6
9094 else
9095   cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 /* System header to define __stub macros and hopefully few prototypes,
9099     which can conflict with char $ac_func(); below.  */
9100 #include <assert.h>
9101 /* Override any gcc2 internal prototype to avoid an error.  */
9102 /* We use char because int might match the return type of a gcc2
9103     builtin and then its argument prototype would still apply.  */
9104 char $ac_func();
9105 char (*f)();
9106
9107 int main() {
9108
9109 /* The GNU C library defines this for functions which it implements
9110     to always fail with ENOSYS.  Some functions are actually named
9111     something starting with __ and the normal name is an alias.  */
9112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9113 choke me
9114 #else
9115 f = $ac_func;
9116 #endif
9117
9118 ; return 0; }
9119 EOF
9120 if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9121   rm -rf conftest*
9122   eval "ac_cv_func_$ac_func=yes"
9123 else
9124   echo "configure: failed program was:" >&5
9125   cat conftest.$ac_ext >&5
9126   rm -rf conftest*
9127   eval "ac_cv_func_$ac_func=no"
9128 fi
9129 rm -f conftest*
9130 fi
9131
9132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9133   echo "$ac_t""yes" 1>&6
9134     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9135   cat >> confdefs.h <<EOF
9136 #define $ac_tr_func 1
9137 EOF
9138  
9139 else
9140   echo "$ac_t""no" 1>&6
9141 fi
9142 done
9143
9144
9145                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9146 echo "configure:9147: checking for pthread_detach with <pthread.h>" >&5
9147 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9148   echo $ac_n "(cached) $ac_c" 1>&6
9149 else
9150   
9151                                                                 cat > conftest.$ac_ext <<EOF
9152 #line 9153 "configure"
9153 #include "confdefs.h"
9154
9155 #include <pthread.h>
9156 #ifndef NULL
9157 #define NULL (void*)0
9158 #endif
9159
9160 int main() {
9161 pthread_detach(NULL);
9162 ; return 0; }
9163 EOF
9164 if { (eval echo configure:9165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9165   rm -rf conftest*
9166   ol_cv_func_pthread_detach=yes
9167 else
9168   echo "configure: failed program was:" >&5
9169   cat conftest.$ac_ext >&5
9170   rm -rf conftest*
9171   ol_cv_func_pthread_detach=no
9172 fi
9173 rm -f conftest*
9174                         
9175 fi
9176
9177 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9178
9179                         if test $ol_cv_func_pthread_detach = no ; then
9180                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9181                         fi
9182
9183                         cat >> confdefs.h <<\EOF
9184 #define HAVE_PTHREAD_DETACH 1
9185 EOF
9186
9187
9188                                                 for ac_func in \
9189                                 pthread_setconcurrency \
9190                                 pthread_getconcurrency \
9191                                 thr_setconcurrency \
9192                                 thr_getconcurrency \
9193                         
9194 do
9195 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9196 echo "configure:9197: checking for $ac_func" >&5
9197 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9198   echo $ac_n "(cached) $ac_c" 1>&6
9199 else
9200   cat > conftest.$ac_ext <<EOF
9201 #line 9202 "configure"
9202 #include "confdefs.h"
9203 /* System header to define __stub macros and hopefully few prototypes,
9204     which can conflict with char $ac_func(); below.  */
9205 #include <assert.h>
9206 /* Override any gcc2 internal prototype to avoid an error.  */
9207 /* We use char because int might match the return type of a gcc2
9208     builtin and then its argument prototype would still apply.  */
9209 char $ac_func();
9210 char (*f)();
9211
9212 int main() {
9213
9214 /* The GNU C library defines this for functions which it implements
9215     to always fail with ENOSYS.  Some functions are actually named
9216     something starting with __ and the normal name is an alias.  */
9217 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9218 choke me
9219 #else
9220 f = $ac_func;
9221 #endif
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   eval "ac_cv_func_$ac_func=yes"
9228 else
9229   echo "configure: failed program was:" >&5
9230   cat conftest.$ac_ext >&5
9231   rm -rf conftest*
9232   eval "ac_cv_func_$ac_func=no"
9233 fi
9234 rm -f conftest*
9235 fi
9236
9237 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9238   echo "$ac_t""yes" 1>&6
9239     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9240   cat >> confdefs.h <<EOF
9241 #define $ac_tr_func 1
9242 EOF
9243  
9244 else
9245   echo "$ac_t""no" 1>&6
9246 fi
9247 done
9248
9249
9250                         
9251         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9252 echo "configure:9253: checking for pthread_kill_other_threads_np" >&5
9253 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9254   echo $ac_n "(cached) $ac_c" 1>&6
9255 else
9256   cat > conftest.$ac_ext <<EOF
9257 #line 9258 "configure"
9258 #include "confdefs.h"
9259 /* System header to define __stub macros and hopefully few prototypes,
9260     which can conflict with char pthread_kill_other_threads_np(); below.  */
9261 #include <assert.h>
9262 /* Override any gcc2 internal prototype to avoid an error.  */
9263 /* We use char because int might match the return type of a gcc2
9264     builtin and then its argument prototype would still apply.  */
9265 char pthread_kill_other_threads_np();
9266 char (*f)();
9267
9268 int main() {
9269
9270 /* The GNU C library defines this for functions which it implements
9271     to always fail with ENOSYS.  Some functions are actually named
9272     something starting with __ and the normal name is an alias.  */
9273 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9274 choke me
9275 #else
9276 f = pthread_kill_other_threads_np;
9277 #endif
9278
9279 ; return 0; }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9282   rm -rf conftest*
9283   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -rf conftest*
9288   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9289 fi
9290 rm -f conftest*
9291 fi
9292
9293 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9294   echo "$ac_t""yes" 1>&6
9295   :
9296 else
9297   echo "$ac_t""no" 1>&6
9298 fi
9299
9300         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9301 echo "configure:9302: checking for LinuxThreads implementation" >&5
9302 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9303   echo $ac_n "(cached) $ac_c" 1>&6
9304 else
9305   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9306 fi
9307
9308 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9309
9310                         
9311         
9312         
9313         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9314 echo "configure:9315: checking for LinuxThreads consistency" >&5
9315 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   
9319                 if test $ol_cv_header_linux_threads = yes -a \
9320                         $ol_cv_sys_linux_threads = yes; then
9321                         ol_cv_linux_threads=yes
9322                 elif test $ol_cv_header_linux_threads = no -a \
9323                         $ol_cv_sys_linux_threads = no; then
9324                         ol_cv_linux_threads=no
9325                 else
9326                         ol_cv_linux_threads=error
9327                 fi
9328         
9329 fi
9330
9331 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9332
9333
9334                         if test $ol_cv_linux_threads = error; then
9335                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9336                         fi
9337
9338                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9339 echo "configure:9340: checking if pthread_create() works" >&5
9340 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   
9344                         if test "$cross_compiling" = yes; then
9345                                 ol_cv_pthread_create_works=yes
9346 else
9347   cat > conftest.$ac_ext <<EOF
9348 #line 9349 "configure"
9349 #include "confdefs.h"
9350 /* pthread test headers */
9351 #include <pthread.h>
9352 #ifndef NULL
9353 #define NULL (void*)0
9354 #endif
9355
9356 static void *task(p)
9357         void *p;
9358 {
9359         return (void *) (p == NULL);
9360 }
9361
9362
9363 int main(argc, argv)
9364         int argc;
9365         char **argv;
9366 {
9367
9368         /* pthread test function */
9369         pthread_t t;
9370         int status;
9371
9372         /* make sure pthread_create() isn't just a stub */
9373 #if HAVE_PTHREADS_D4
9374         status = pthread_create(&t, pthread_attr_default, task, NULL);
9375 #else
9376         status = pthread_create(&t, NULL, task, NULL);
9377 #endif
9378
9379         if( status ) exit( status );
9380
9381         /* make sure pthread_detach() isn't just a stub */
9382 #if HAVE_PTHREADS_D4
9383         status = pthread_detach( &t );
9384 #else
9385         status = pthread_detach( t );
9386 #endif
9387
9388 #ifdef HAVE_LINUX_THREADS
9389         pthread_kill_other_threads_np();
9390 #endif
9391
9392         exit( status );
9393
9394 }
9395
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9398 then
9399   ol_cv_pthread_create_works=yes
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -fr conftest*
9404   ol_cv_pthread_create_works=no
9405 fi
9406 rm -fr conftest*
9407 fi
9408
9409 fi
9410
9411 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9412
9413                         if test $ol_cv_pthread_create_works = no ; then
9414                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9415                         fi
9416
9417                                                 if test $ol_with_yielding_select = auto ; then
9418                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9419 echo "configure:9420: checking if select yields when using pthreads" >&5
9420 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9421   echo $ac_n "(cached) $ac_c" 1>&6
9422 else
9423   
9424                                 if test "$cross_compiling" = yes; then
9425   ol_cv_pthread_select_yields=cross
9426 else
9427   cat > conftest.$ac_ext <<EOF
9428 #line 9429 "configure"
9429 #include "confdefs.h"
9430
9431 #include <sys/types.h>
9432 #include <sys/time.h>
9433 #include <unistd.h>
9434 #include <pthread.h>
9435 #ifndef NULL
9436 #define NULL (void*) 0
9437 #endif
9438
9439 static int fildes[2];
9440
9441 static void *task(p)
9442         void *p;
9443 {
9444         int i;
9445         struct timeval tv;
9446
9447         fd_set rfds;
9448
9449         tv.tv_sec=10;
9450         tv.tv_usec=0;
9451
9452         FD_ZERO(&rfds);
9453         FD_SET(fildes[0], &rfds);
9454
9455         /* we're not interested in any fds */
9456         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9457
9458         if(i < 0) {
9459                 perror("select");
9460                 exit(10);
9461         }
9462
9463         exit(0); /* if we exit here, the select blocked the whole process */
9464 }
9465
9466 int main(argc, argv)
9467         int argc;
9468         char **argv;
9469 {
9470         pthread_t t;
9471
9472         /* create a pipe to select */
9473         if(pipe(&fildes[0])) {
9474                 perror("select");
9475                 exit(1);
9476         }
9477
9478 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9479         (void) pthread_setconcurrency(2);
9480 #else
9481 #ifdef HAVE_THR_SETCONCURRENCY
9482         /* Set Solaris LWP concurrency to 2 */
9483         thr_setconcurrency(2);
9484 #endif
9485 #endif
9486
9487 #if HAVE_PTHREADS_D4
9488         pthread_create(&t, pthread_attr_default, task, NULL);
9489 #else
9490         pthread_create(&t, NULL, task, NULL);
9491 #endif
9492
9493 #if HAVE_SCHED_YIELD
9494         sched_yield();  /* make sure task runs first */
9495 #else
9496 #ifdef HAVE_PTHREAD_YIELD
9497         pthread_yield();        /* make sure task runs first */
9498 #endif
9499 #endif
9500
9501         exit(2);
9502 }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9505 then
9506   ol_cv_pthread_select_yields=no
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -fr conftest*
9511   ol_cv_pthread_select_yields=yes
9512 fi
9513 rm -fr conftest*
9514 fi
9515
9516 fi
9517
9518 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9519
9520                                 if test $ol_cv_pthread_select_yields = cross ; then
9521                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9522                                 fi
9523
9524                                 if test $ol_cv_pthread_select_yields = yes ; then
9525                                         ol_with_yielding_select=yes
9526                                 fi
9527                         fi
9528
9529                                                 CPPFLAGS="$save_CPPFLAGS"
9530                         LIBS="$save_LIBS"
9531                 else
9532                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9533                 fi
9534         fi
9535
9536         if test $ol_with_threads = posix ; then
9537                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9538         fi
9539 fi
9540
9541 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9542         -o $ol_with_threads = mach ; then
9543
9544                 for ac_hdr in mach/cthreads.h
9545 do
9546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9548 echo "configure:9549: checking for $ac_hdr" >&5
9549 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9550   echo $ac_n "(cached) $ac_c" 1>&6
9551 else
9552   cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 #include <$ac_hdr>
9556 EOF
9557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9558 { (eval echo configure:9559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9560 if test -z "$ac_err"; then
9561   rm -rf conftest*
9562   eval "ac_cv_header_$ac_safe=yes"
9563 else
9564   echo "$ac_err" >&5
9565   echo "configure: failed program was:" >&5
9566   cat conftest.$ac_ext >&5
9567   rm -rf conftest*
9568   eval "ac_cv_header_$ac_safe=no"
9569 fi
9570 rm -f conftest*
9571 fi
9572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9573   echo "$ac_t""yes" 1>&6
9574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9575   cat >> confdefs.h <<EOF
9576 #define $ac_tr_hdr 1
9577 EOF
9578  
9579 else
9580   echo "$ac_t""no" 1>&6
9581 fi
9582 done
9583
9584         if test $ac_cv_header_mach_cthreads_h = yes ; then
9585                 ol_with_threads=found
9586
9587                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9588 echo "configure:9589: checking for cthread_fork" >&5
9589 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9590   echo $ac_n "(cached) $ac_c" 1>&6
9591 else
9592   cat > conftest.$ac_ext <<EOF
9593 #line 9594 "configure"
9594 #include "confdefs.h"
9595 /* System header to define __stub macros and hopefully few prototypes,
9596     which can conflict with char cthread_fork(); below.  */
9597 #include <assert.h>
9598 /* Override any gcc2 internal prototype to avoid an error.  */
9599 /* We use char because int might match the return type of a gcc2
9600     builtin and then its argument prototype would still apply.  */
9601 char cthread_fork();
9602 char (*f)();
9603
9604 int main() {
9605
9606 /* The GNU C library defines this for functions which it implements
9607     to always fail with ENOSYS.  Some functions are actually named
9608     something starting with __ and the normal name is an alias.  */
9609 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9610 choke me
9611 #else
9612 f = cthread_fork;
9613 #endif
9614
9615 ; return 0; }
9616 EOF
9617 if { (eval echo configure:9618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9618   rm -rf conftest*
9619   eval "ac_cv_func_cthread_fork=yes"
9620 else
9621   echo "configure: failed program was:" >&5
9622   cat conftest.$ac_ext >&5
9623   rm -rf conftest*
9624   eval "ac_cv_func_cthread_fork=no"
9625 fi
9626 rm -f conftest*
9627 fi
9628
9629 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9630   echo "$ac_t""yes" 1>&6
9631   ol_link_threads=yes
9632 else
9633   echo "$ac_t""no" 1>&6
9634 fi
9635
9636
9637                 if test $ol_link_threads = no ; then
9638                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9639 echo "configure:9640: checking for cthread_fork with -all_load" >&5
9640 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9641   echo $ac_n "(cached) $ac_c" 1>&6
9642 else
9643   
9644                                                                 save_LIBS="$LIBS"
9645                                 LIBS="-all_load $LIBS"
9646                                 cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9649 #include <mach/cthreads.h>
9650 int main() {
9651
9652                                         cthread_fork((void *)0, (void *)0);
9653                                         
9654 ; return 0; }
9655 EOF
9656 if { (eval echo configure:9657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9657   rm -rf conftest*
9658   ol_cv_cthread_all_load=yes
9659 else
9660   echo "configure: failed program was:" >&5
9661   cat conftest.$ac_ext >&5
9662   rm -rf conftest*
9663   ol_cv_cthread_all_load=no
9664 fi
9665 rm -f conftest*
9666                                                                 LIBS="$save_LIBS"
9667                         
9668 fi
9669
9670 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9671
9672                         if test $ol_cv_cthread_all_load = yes ; then
9673                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9674                                 ol_link_threads=mach
9675                         fi
9676                 fi
9677
9678                 if test $ol_link_threads != no ; then
9679                         : check for cthread specific functionality here
9680                         cat >> confdefs.h <<\EOF
9681 #define HAVE_MACH_CTHREADS 1
9682 EOF
9683
9684                 else
9685                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9686                 fi
9687         fi
9688
9689         if test $ol_with_threads = mach ; then
9690                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9691         fi
9692 fi
9693
9694 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9695         -o $ol_with_threads = pth ; then
9696
9697         for ac_hdr in pth.h
9698 do
9699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9701 echo "configure:9702: checking for $ac_hdr" >&5
9702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708 #include <$ac_hdr>
9709 EOF
9710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9711 { (eval echo configure:9712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9713 if test -z "$ac_err"; then
9714   rm -rf conftest*
9715   eval "ac_cv_header_$ac_safe=yes"
9716 else
9717   echo "$ac_err" >&5
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   eval "ac_cv_header_$ac_safe=no"
9722 fi
9723 rm -f conftest*
9724 fi
9725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9726   echo "$ac_t""yes" 1>&6
9727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9728   cat >> confdefs.h <<EOF
9729 #define $ac_tr_hdr 1
9730 EOF
9731  
9732 else
9733   echo "$ac_t""no" 1>&6
9734 fi
9735 done
9736
9737
9738         if test $ac_cv_header_pth_h = yes ; then
9739                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9740 echo "configure:9741: checking for pth_version in -lpth" >&5
9741 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9742 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9743   echo $ac_n "(cached) $ac_c" 1>&6
9744 else
9745   ac_save_LIBS="$LIBS"
9746 LIBS="-lpth  $LIBS"
9747 cat > conftest.$ac_ext <<EOF
9748 #line 9749 "configure"
9749 #include "confdefs.h"
9750 /* Override any gcc2 internal prototype to avoid an error.  */
9751 /* We use char because int might match the return type of a gcc2
9752     builtin and then its argument prototype would still apply.  */
9753 char pth_version();
9754
9755 int main() {
9756 pth_version()
9757 ; return 0; }
9758 EOF
9759 if { (eval echo configure:9760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9760   rm -rf conftest*
9761   eval "ac_cv_lib_$ac_lib_var=yes"
9762 else
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -rf conftest*
9766   eval "ac_cv_lib_$ac_lib_var=no"
9767 fi
9768 rm -f conftest*
9769 LIBS="$ac_save_LIBS"
9770
9771 fi
9772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9773   echo "$ac_t""yes" 1>&6
9774   have_pth=yes
9775 else
9776   echo "$ac_t""no" 1>&6
9777 have_pth=no
9778 fi
9779
9780
9781                 if test $have_pth = yes ; then
9782                         cat >> confdefs.h <<\EOF
9783 #define HAVE_GNU_PTH 1
9784 EOF
9785
9786                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9787                         ol_link_threads=pth
9788
9789                         if test $ol_with_yielding_select = auto ; then
9790                                 ol_with_yielding_select=yes
9791                         fi
9792                 fi
9793         fi
9794 fi
9795
9796 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9797         -o $ol_with_threads = lwp ; then
9798
9799                 for ac_hdr in thread.h synch.h
9800 do
9801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9803 echo "configure:9804: checking for $ac_hdr" >&5
9804 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9805   echo $ac_n "(cached) $ac_c" 1>&6
9806 else
9807   cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <$ac_hdr>
9811 EOF
9812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9813 { (eval echo configure:9814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9815 if test -z "$ac_err"; then
9816   rm -rf conftest*
9817   eval "ac_cv_header_$ac_safe=yes"
9818 else
9819   echo "$ac_err" >&5
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   eval "ac_cv_header_$ac_safe=no"
9824 fi
9825 rm -f conftest*
9826 fi
9827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9828   echo "$ac_t""yes" 1>&6
9829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9830   cat >> confdefs.h <<EOF
9831 #define $ac_tr_hdr 1
9832 EOF
9833  
9834 else
9835   echo "$ac_t""no" 1>&6
9836 fi
9837 done
9838
9839         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9840                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9841 echo "configure:9842: checking for thr_create in -lthread" >&5
9842 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9844   echo $ac_n "(cached) $ac_c" 1>&6
9845 else
9846   ac_save_LIBS="$LIBS"
9847 LIBS="-lthread  $LIBS"
9848 cat > conftest.$ac_ext <<EOF
9849 #line 9850 "configure"
9850 #include "confdefs.h"
9851 /* Override any gcc2 internal prototype to avoid an error.  */
9852 /* We use char because int might match the return type of a gcc2
9853     builtin and then its argument prototype would still apply.  */
9854 char thr_create();
9855
9856 int main() {
9857 thr_create()
9858 ; return 0; }
9859 EOF
9860 if { (eval echo configure:9861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9861   rm -rf conftest*
9862   eval "ac_cv_lib_$ac_lib_var=yes"
9863 else
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -rf conftest*
9867   eval "ac_cv_lib_$ac_lib_var=no"
9868 fi
9869 rm -f conftest*
9870 LIBS="$ac_save_LIBS"
9871
9872 fi
9873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9874   echo "$ac_t""yes" 1>&6
9875   have_thr=yes
9876 else
9877   echo "$ac_t""no" 1>&6
9878 have_thr=no
9879 fi
9880
9881
9882                 if test $have_thr = yes ; then
9883                         cat >> confdefs.h <<\EOF
9884 #define HAVE_THR 1
9885 EOF
9886
9887                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9888                         ol_link_threads=thr
9889
9890                         if test $ol_with_yielding_select = auto ; then
9891                                 ol_with_yielding_select=yes
9892                         fi
9893
9894                                                 for ac_func in \
9895                                 thr_setconcurrency \
9896                                 thr_getconcurrency \
9897                         
9898 do
9899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9900 echo "configure:9901: checking for $ac_func" >&5
9901 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9902   echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904   cat > conftest.$ac_ext <<EOF
9905 #line 9906 "configure"
9906 #include "confdefs.h"
9907 /* System header to define __stub macros and hopefully few prototypes,
9908     which can conflict with char $ac_func(); below.  */
9909 #include <assert.h>
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char $ac_func();
9914 char (*f)();
9915
9916 int main() {
9917
9918 /* The GNU C library defines this for functions which it implements
9919     to always fail with ENOSYS.  Some functions are actually named
9920     something starting with __ and the normal name is an alias.  */
9921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9922 choke me
9923 #else
9924 f = $ac_func;
9925 #endif
9926
9927 ; return 0; }
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9930   rm -rf conftest*
9931   eval "ac_cv_func_$ac_func=yes"
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   eval "ac_cv_func_$ac_func=no"
9937 fi
9938 rm -f conftest*
9939 fi
9940
9941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9944   cat >> confdefs.h <<EOF
9945 #define $ac_tr_func 1
9946 EOF
9947  
9948 else
9949   echo "$ac_t""no" 1>&6
9950 fi
9951 done
9952
9953                 fi
9954         fi
9955
9956                 for ac_hdr in lwp/lwp.h
9957 do
9958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9960 echo "configure:9961: checking for $ac_hdr" >&5
9961 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9962   echo $ac_n "(cached) $ac_c" 1>&6
9963 else
9964   cat > conftest.$ac_ext <<EOF
9965 #line 9966 "configure"
9966 #include "confdefs.h"
9967 #include <$ac_hdr>
9968 EOF
9969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9970 { (eval echo configure:9971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9972 if test -z "$ac_err"; then
9973   rm -rf conftest*
9974   eval "ac_cv_header_$ac_safe=yes"
9975 else
9976   echo "$ac_err" >&5
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   eval "ac_cv_header_$ac_safe=no"
9981 fi
9982 rm -f conftest*
9983 fi
9984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9985   echo "$ac_t""yes" 1>&6
9986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9987   cat >> confdefs.h <<EOF
9988 #define $ac_tr_hdr 1
9989 EOF
9990  
9991 else
9992   echo "$ac_t""no" 1>&6
9993 fi
9994 done
9995
9996         if test $ac_cv_header_lwp_lwp_h = yes ; then
9997                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9998 echo "configure:9999: checking for lwp_create in -llwp" >&5
9999 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   ac_save_LIBS="$LIBS"
10004 LIBS="-llwp  $LIBS"
10005 cat > conftest.$ac_ext <<EOF
10006 #line 10007 "configure"
10007 #include "confdefs.h"
10008 /* Override any gcc2 internal prototype to avoid an error.  */
10009 /* We use char because int might match the return type of a gcc2
10010     builtin and then its argument prototype would still apply.  */
10011 char lwp_create();
10012
10013 int main() {
10014 lwp_create()
10015 ; return 0; }
10016 EOF
10017 if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10018   rm -rf conftest*
10019   eval "ac_cv_lib_$ac_lib_var=yes"
10020 else
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   eval "ac_cv_lib_$ac_lib_var=no"
10025 fi
10026 rm -f conftest*
10027 LIBS="$ac_save_LIBS"
10028
10029 fi
10030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10031   echo "$ac_t""yes" 1>&6
10032   have_lwp=yes
10033 else
10034   echo "$ac_t""no" 1>&6
10035 have_lwp=no
10036 fi
10037
10038
10039                 if test $have_lwp = yes ; then
10040                         cat >> confdefs.h <<\EOF
10041 #define HAVE_LWP 1
10042 EOF
10043
10044                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10045                         ol_link_threads=lwp
10046
10047                         if test $ol_with_yielding_select = auto ; then
10048                                 ol_with_yielding_select=no
10049                         fi
10050                 fi
10051         fi
10052 fi
10053
10054 if test $ol_with_yielding_select = yes ; then
10055         cat >> confdefs.h <<\EOF
10056 #define HAVE_YIELDING_SELECT 1
10057 EOF
10058
10059 fi
10060
10061 if test $ol_with_threads = manual ; then
10062                 ol_link_threads=yes
10063
10064         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10065
10066         for ac_hdr in pthread.h sched.h
10067 do
10068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10070 echo "configure:10071: checking for $ac_hdr" >&5
10071 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <$ac_hdr>
10078 EOF
10079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10080 { (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10082 if test -z "$ac_err"; then
10083   rm -rf conftest*
10084   eval "ac_cv_header_$ac_safe=yes"
10085 else
10086   echo "$ac_err" >&5
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   eval "ac_cv_header_$ac_safe=no"
10091 fi
10092 rm -f conftest*
10093 fi
10094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10097   cat >> confdefs.h <<EOF
10098 #define $ac_tr_hdr 1
10099 EOF
10100  
10101 else
10102   echo "$ac_t""no" 1>&6
10103 fi
10104 done
10105
10106         for ac_func in sched_yield pthread_yield
10107 do
10108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10109 echo "configure:10110: checking for $ac_func" >&5
10110 if eval "test \"\${ac_cv_func_$ac_func+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 /* System header to define __stub macros and hopefully few prototypes,
10117     which can conflict with char $ac_func(); below.  */
10118 #include <assert.h>
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char $ac_func();
10123 char (*f)();
10124
10125 int main() {
10126
10127 /* The GNU C library defines this for functions which it implements
10128     to always fail with ENOSYS.  Some functions are actually named
10129     something starting with __ and the normal name is an alias.  */
10130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10131 choke me
10132 #else
10133 f = $ac_func;
10134 #endif
10135
10136 ; return 0; }
10137 EOF
10138 if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10139   rm -rf conftest*
10140   eval "ac_cv_func_$ac_func=yes"
10141 else
10142   echo "configure: failed program was:" >&5
10143   cat conftest.$ac_ext >&5
10144   rm -rf conftest*
10145   eval "ac_cv_func_$ac_func=no"
10146 fi
10147 rm -f conftest*
10148 fi
10149
10150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10151   echo "$ac_t""yes" 1>&6
10152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10153   cat >> confdefs.h <<EOF
10154 #define $ac_tr_func 1
10155 EOF
10156  
10157 else
10158   echo "$ac_t""no" 1>&6
10159 fi
10160 done
10161
10162         
10163         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10164 echo "configure:10165: checking for LinuxThreads pthread.h" >&5
10165 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 #include <pthread.h>
10172 EOF
10173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10174   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10175   rm -rf conftest*
10176   ol_cv_header_linux_threads=yes
10177 else
10178   rm -rf conftest*
10179   ol_cv_header_linux_threads=no
10180 fi
10181 rm -f conftest*
10182
10183                 
10184 fi
10185
10186 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10187         if test $ol_cv_header_linux_threads = yes; then
10188                 cat >> confdefs.h <<\EOF
10189 #define HAVE_LINUX_THREADS 1
10190 EOF
10191
10192         fi
10193
10194
10195         for ac_hdr in mach/cthreads.h
10196 do
10197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10199 echo "configure:10200: checking for $ac_hdr" >&5
10200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10201   echo $ac_n "(cached) $ac_c" 1>&6
10202 else
10203   cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206 #include <$ac_hdr>
10207 EOF
10208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10209 { (eval echo configure:10210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10211 if test -z "$ac_err"; then
10212   rm -rf conftest*
10213   eval "ac_cv_header_$ac_safe=yes"
10214 else
10215   echo "$ac_err" >&5
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   eval "ac_cv_header_$ac_safe=no"
10220 fi
10221 rm -f conftest*
10222 fi
10223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10224   echo "$ac_t""yes" 1>&6
10225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10226   cat >> confdefs.h <<EOF
10227 #define $ac_tr_hdr 1
10228 EOF
10229  
10230 else
10231   echo "$ac_t""no" 1>&6
10232 fi
10233 done
10234
10235         for ac_hdr in lwp/lwp.h
10236 do
10237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10239 echo "configure:10240: checking for $ac_hdr" >&5
10240 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   cat > conftest.$ac_ext <<EOF
10244 #line 10245 "configure"
10245 #include "confdefs.h"
10246 #include <$ac_hdr>
10247 EOF
10248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10249 { (eval echo configure:10250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10251 if test -z "$ac_err"; then
10252   rm -rf conftest*
10253   eval "ac_cv_header_$ac_safe=yes"
10254 else
10255   echo "$ac_err" >&5
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_header_$ac_safe=no"
10260 fi
10261 rm -f conftest*
10262 fi
10263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10264   echo "$ac_t""yes" 1>&6
10265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10266   cat >> confdefs.h <<EOF
10267 #define $ac_tr_hdr 1
10268 EOF
10269  
10270 else
10271   echo "$ac_t""no" 1>&6
10272 fi
10273 done
10274
10275         for ac_hdr in thread.h synch.h
10276 do
10277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10279 echo "configure:10280: checking for $ac_hdr" >&5
10280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10281   echo $ac_n "(cached) $ac_c" 1>&6
10282 else
10283   cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286 #include <$ac_hdr>
10287 EOF
10288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10289 { (eval echo configure:10290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10291 if test -z "$ac_err"; then
10292   rm -rf conftest*
10293   eval "ac_cv_header_$ac_safe=yes"
10294 else
10295   echo "$ac_err" >&5
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -rf conftest*
10299   eval "ac_cv_header_$ac_safe=no"
10300 fi
10301 rm -f conftest*
10302 fi
10303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10304   echo "$ac_t""yes" 1>&6
10305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10306   cat >> confdefs.h <<EOF
10307 #define $ac_tr_hdr 1
10308 EOF
10309  
10310 else
10311   echo "$ac_t""no" 1>&6
10312 fi
10313 done
10314
10315 fi
10316
10317 if test $ol_link_threads != no ; then  
10318                         cat >> confdefs.h <<\EOF
10319 #define REENTRANT 1
10320 EOF
10321
10322         cat >> confdefs.h <<\EOF
10323 #define _REENTRANT 1
10324 EOF
10325
10326         cat >> confdefs.h <<\EOF
10327 #define THREAD_SAFE 1
10328 EOF
10329
10330         cat >> confdefs.h <<\EOF
10331 #define _THREAD_SAFE 1
10332 EOF
10333
10334         cat >> confdefs.h <<\EOF
10335 #define THREADSAFE 1
10336 EOF
10337
10338         cat >> confdefs.h <<\EOF
10339 #define _THREADSAFE 1
10340 EOF
10341
10342         cat >> confdefs.h <<\EOF
10343 #define _SGI_MP_SOURCE 1
10344 EOF
10345
10346
10347                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10348 echo "configure:10349: checking for thread specific errno" >&5
10349 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10350   echo $ac_n "(cached) $ac_c" 1>&6
10351 else
10352   
10353                 cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include <errno.h>
10357 int main() {
10358 errno = 0;
10359 ; return 0; }
10360 EOF
10361 if { (eval echo configure:10362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10362   rm -rf conftest*
10363   ol_cv_errno_thread_specific=yes
10364 else
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   ol_cv_errno_thread_specific=no
10369 fi
10370 rm -f conftest*
10371         
10372 fi
10373
10374 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10375
10376                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10377 echo "configure:10378: checking for thread specific h_errno" >&5
10378 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   
10382                 cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385 #include <netdb.h>
10386 int main() {
10387 h_errno = 0;
10388 ; return 0; }
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10391   rm -rf conftest*
10392   ol_cv_h_errno_thread_specific=yes
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   ol_cv_h_errno_thread_specific=no
10398 fi
10399 rm -f conftest*
10400         
10401 fi
10402
10403 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10404
10405         if test $ol_cv_errno_thread_specific != yes \
10406                 -o $ol_cv_h_errno_thread_specific != yes ; then
10407                 LIBS="$LTHREAD_LIBS $LIBS"
10408                 LTHREAD_LIBS=""
10409         fi
10410
10411 fi  
10412
10413 if test $ol_link_threads = no ; then
10414         if test $ol_with_threads = yes ; then
10415                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10416         fi
10417
10418         if test $ol_with_threads = auto ; then
10419                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10420                 ol_with_threads=no
10421         fi
10422
10423         cat >> confdefs.h <<\EOF
10424 #define NO_THREADS 1
10425 EOF
10426
10427         LTHREAD_LIBS=""
10428 fi
10429
10430 if test $ol_link_threads != no ; then
10431         cat >> confdefs.h <<\EOF
10432 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10433 EOF
10434
10435 fi
10436
10437
10438 ol_link_ldbm=no 
10439 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10440         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10441 echo "configure:10442: checking for DB2 library" >&5
10442 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10443   echo $ac_n "(cached) $ac_c" 1>&6
10444 else
10445         ol_LIBS="$LIBS"
10446         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
10447 echo "configure:10448: checking for db_appexit in -ldb" >&5
10448 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
10449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   ac_save_LIBS="$LIBS"
10453 LIBS="-ldb  $LIBS"
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457 /* Override any gcc2 internal prototype to avoid an error.  */
10458 /* We use char because int might match the return type of a gcc2
10459     builtin and then its argument prototype would still apply.  */
10460 char db_appexit();
10461
10462 int main() {
10463 db_appexit()
10464 ; return 0; }
10465 EOF
10466 if { (eval echo configure:10467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10467   rm -rf conftest*
10468   eval "ac_cv_lib_$ac_lib_var=yes"
10469 else
10470   echo "configure: failed program was:" >&5
10471   cat conftest.$ac_ext >&5
10472   rm -rf conftest*
10473   eval "ac_cv_lib_$ac_lib_var=no"
10474 fi
10475 rm -f conftest*
10476 LIBS="$ac_save_LIBS"
10477
10478 fi
10479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10480   echo "$ac_t""yes" 1>&6
10481   ol_cv_lib_db2=-ldb
10482 else
10483   echo "$ac_t""no" 1>&6
10484 ol_cv_lib_db2=no
10485 fi
10486
10487         LIBS="$ol_LIBS"
10488
10489 fi
10490
10491 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10492
10493 for ac_hdr in db.h
10494 do
10495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10497 echo "configure:10498: checking for $ac_hdr" >&5
10498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   cat > conftest.$ac_ext <<EOF
10502 #line 10503 "configure"
10503 #include "confdefs.h"
10504 #include <$ac_hdr>
10505 EOF
10506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10507 { (eval echo configure:10508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10509 if test -z "$ac_err"; then
10510   rm -rf conftest*
10511   eval "ac_cv_header_$ac_safe=yes"
10512 else
10513   echo "$ac_err" >&5
10514   echo "configure: failed program was:" >&5
10515   cat conftest.$ac_ext >&5
10516   rm -rf conftest*
10517   eval "ac_cv_header_$ac_safe=no"
10518 fi
10519 rm -f conftest*
10520 fi
10521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10522   echo "$ac_t""yes" 1>&6
10523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10524   cat >> confdefs.h <<EOF
10525 #define $ac_tr_hdr 1
10526 EOF
10527  
10528 else
10529   echo "$ac_t""no" 1>&6
10530 fi
10531 done
10532
10533 if test $ac_cv_header_db_h = yes ; then
10534         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10535 echo "configure:10536: checking if db.h is DB2" >&5
10536 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10537   echo $ac_n "(cached) $ac_c" 1>&6
10538 else
10539   
10540                 cat > conftest.$ac_ext <<EOF
10541 #line 10542 "configure"
10542 #include "confdefs.h"
10543
10544 #                       include <db.h>
10545                         /* this check could be improved */
10546 #                       ifdef DB_VERSION_MAJOR
10547 #                               if DB_VERSION_MAJOR == 2
10548                                         __db_version_2;
10549 #                               endif
10550 #                       endif
10551                 
10552 EOF
10553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10554   egrep "__db_version_2" >/dev/null 2>&1; then
10555   rm -rf conftest*
10556   ol_cv_header_db2=yes
10557 else
10558   rm -rf conftest*
10559   ol_cv_header_db2=no
10560 fi
10561 rm -f conftest*
10562
10563 fi
10564
10565 echo "$ac_t""$ol_cv_header_db2" 1>&6
10566 else
10567         ol_cv_header_db2=no
10568 fi
10569
10570
10571  
10572  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10573 echo "configure:10574: checking for Berkeley DB2" >&5
10574 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10575   echo $ac_n "(cached) $ac_c" 1>&6
10576 else
10577   
10578         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10579                 ol_cv_berkeley_db2=no
10580         else
10581                 ol_cv_berkeley_db2=yes
10582         fi
10583
10584 fi
10585
10586 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10587  if test $ol_cv_berkeley_db2 = yes ; then
10588         cat >> confdefs.h <<\EOF
10589 #define HAVE_BERKELEY_DB2 1
10590 EOF
10591
10592  fi
10593
10594
10595         if test $ol_cv_berkeley_db2 = yes ; then
10596                 ol_link_ldbm=db2
10597                 ol_with_ldbm_api=db2
10598
10599                 if test $ol_with_ldbm_type = hash ; then
10600                         cat >> confdefs.h <<\EOF
10601 #define LDBM_USE_DBHASH 1
10602 EOF
10603
10604                 else
10605                         cat >> confdefs.h <<\EOF
10606 #define LDBM_USE_DBBTREE 1
10607 EOF
10608
10609                 fi
10610
10611                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
10612 echo "configure:10613: checking for DB_THREAD support" >&5
10613 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
10614   echo $ac_n "(cached) $ac_c" 1>&6
10615 else
10616   
10617         ol_LIBS="$LIBS"
10618         if test $ol_cv_lib_db2 != yes ; then
10619                 LIBS="$ol_cv_lib_db2"
10620         fi
10621
10622         if test "$cross_compiling" = yes; then
10623   ol_cv_berkeley_db2_db_thread=cross
10624 else
10625   cat > conftest.$ac_ext <<EOF
10626 #line 10627 "configure"
10627 #include "confdefs.h"
10628
10629 #include <db.h>
10630 #ifndef NULL
10631 #define NULL ((void *)0)
10632 #endif
10633 main()
10634 {
10635         int rc;
10636         DB_ENV env;
10637         u_int32_t flags = DB_CREATE | DB_THREAD;
10638
10639         memset( &env, '\0', sizeof(env) );
10640
10641         rc = db_appinit( NULL, NULL, &env, flags );
10642
10643         if( rc == 0 ) {
10644                 db_appexit( &env );
10645         }
10646
10647         return rc;
10648 }
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10651 then
10652   ol_cv_berkeley_db2_db_thread=yes
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -fr conftest*
10657   ol_cv_berkeley_db2_db_thread=no
10658 fi
10659 rm -fr conftest*
10660 fi
10661
10662
10663         LIBS="$ol_LIBS"
10664
10665         if test $ol_cv_berkeley_db2_db_thread != no ; then
10666                 cat >> confdefs.h <<\EOF
10667 #define HAVE_BERKELEY_DB2_DB_THREAD 1
10668 EOF
10669
10670         fi
10671
10672 fi
10673
10674 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
10675
10676                                                 if test $ol_cv_lib_db2 != yes ; then
10677                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10678                 fi
10679         fi
10680 fi
10681
10682 ol_link_bdb2=no
10683 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10684         if test $ol_cv_berkeley_db2_db_thread != no ; then
10685                 ol_link_bdb2=yes
10686         else
10687                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
10688         fi
10689 fi
10690
10691 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10692         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10693 echo "configure:10694: checking for Berkeley DB library" >&5
10694 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10695   echo $ac_n "(cached) $ac_c" 1>&6
10696 else
10697   
10698         for ac_hdr in db1/db.h
10699 do
10700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10702 echo "configure:10703: checking for $ac_hdr" >&5
10703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10704   echo $ac_n "(cached) $ac_c" 1>&6
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709 #include <$ac_hdr>
10710 EOF
10711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10712 { (eval echo configure:10713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10714 if test -z "$ac_err"; then
10715   rm -rf conftest*
10716   eval "ac_cv_header_$ac_safe=yes"
10717 else
10718   echo "$ac_err" >&5
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -rf conftest*
10722   eval "ac_cv_header_$ac_safe=no"
10723 fi
10724 rm -f conftest*
10725 fi
10726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10727   echo "$ac_t""yes" 1>&6
10728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10729   cat >> confdefs.h <<EOF
10730 #define $ac_tr_hdr 1
10731 EOF
10732  
10733 else
10734   echo "$ac_t""no" 1>&6
10735 fi
10736 done
10737
10738         ol_LIBS="$LIBS"
10739         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10740 echo "configure:10741: checking for dbopen" >&5
10741 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747 /* System header to define __stub macros and hopefully few prototypes,
10748     which can conflict with char dbopen(); below.  */
10749 #include <assert.h>
10750 /* Override any gcc2 internal prototype to avoid an error.  */
10751 /* We use char because int might match the return type of a gcc2
10752     builtin and then its argument prototype would still apply.  */
10753 char dbopen();
10754 char (*f)();
10755
10756 int main() {
10757
10758 /* The GNU C library defines this for functions which it implements
10759     to always fail with ENOSYS.  Some functions are actually named
10760     something starting with __ and the normal name is an alias.  */
10761 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10762 choke me
10763 #else
10764 f = dbopen;
10765 #endif
10766
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   eval "ac_cv_func_dbopen=yes"
10772 else
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   eval "ac_cv_func_dbopen=no"
10777 fi
10778 rm -f conftest*
10779 fi
10780
10781 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10782   echo "$ac_t""yes" 1>&6
10783   ol_cv_lib_db=yes
10784 else
10785   echo "$ac_t""no" 1>&6
10786
10787                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10788 echo "configure:10789: checking for dbopen in -ldb1" >&5
10789 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10791   echo $ac_n "(cached) $ac_c" 1>&6
10792 else
10793   ac_save_LIBS="$LIBS"
10794 LIBS="-ldb1  $LIBS"
10795 cat > conftest.$ac_ext <<EOF
10796 #line 10797 "configure"
10797 #include "confdefs.h"
10798 /* Override any gcc2 internal prototype to avoid an error.  */
10799 /* We use char because int might match the return type of a gcc2
10800     builtin and then its argument prototype would still apply.  */
10801 char dbopen();
10802
10803 int main() {
10804 dbopen()
10805 ; return 0; }
10806 EOF
10807 if { (eval echo configure:10808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10808   rm -rf conftest*
10809   eval "ac_cv_lib_$ac_lib_var=yes"
10810 else
10811   echo "configure: failed program was:" >&5
10812   cat conftest.$ac_ext >&5
10813   rm -rf conftest*
10814   eval "ac_cv_lib_$ac_lib_var=no"
10815 fi
10816 rm -f conftest*
10817 LIBS="$ac_save_LIBS"
10818
10819 fi
10820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10821   echo "$ac_t""yes" 1>&6
10822   ol_cv_lib_db=-ldb1
10823 else
10824   echo "$ac_t""no" 1>&6
10825
10826                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10827 echo "configure:10828: checking for dbopen in -ldb" >&5
10828 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10830   echo $ac_n "(cached) $ac_c" 1>&6
10831 else
10832   ac_save_LIBS="$LIBS"
10833 LIBS="-ldb  $LIBS"
10834 cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837 /* Override any gcc2 internal prototype to avoid an error.  */
10838 /* We use char because int might match the return type of a gcc2
10839     builtin and then its argument prototype would still apply.  */
10840 char dbopen();
10841
10842 int main() {
10843 dbopen()
10844 ; return 0; }
10845 EOF
10846 if { (eval echo configure:10847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10847   rm -rf conftest*
10848   eval "ac_cv_lib_$ac_lib_var=yes"
10849 else
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   eval "ac_cv_lib_$ac_lib_var=no"
10854 fi
10855 rm -f conftest*
10856 LIBS="$ac_save_LIBS"
10857
10858 fi
10859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10860   echo "$ac_t""yes" 1>&6
10861   ol_cv_lib_db=-ldb
10862 else
10863   echo "$ac_t""no" 1>&6
10864 ol_cv_lib_db=no
10865 fi
10866
10867                 
10868 fi
10869
10870         
10871 fi
10872
10873         LIBS="$ol_LIBS"
10874
10875 fi
10876
10877 echo "$ac_t""$ol_cv_lib_db" 1>&6
10878
10879
10880 for ac_hdr in db_185.h
10881 do
10882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10884 echo "configure:10885: checking for $ac_hdr" >&5
10885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10886   echo $ac_n "(cached) $ac_c" 1>&6
10887 else
10888   cat > conftest.$ac_ext <<EOF
10889 #line 10890 "configure"
10890 #include "confdefs.h"
10891 #include <$ac_hdr>
10892 EOF
10893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10894 { (eval echo configure:10895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10896 if test -z "$ac_err"; then
10897   rm -rf conftest*
10898   eval "ac_cv_header_$ac_safe=yes"
10899 else
10900   echo "$ac_err" >&5
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -rf conftest*
10904   eval "ac_cv_header_$ac_safe=no"
10905 fi
10906 rm -f conftest*
10907 fi
10908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10909   echo "$ac_t""yes" 1>&6
10910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10911   cat >> confdefs.h <<EOF
10912 #define $ac_tr_hdr 1
10913 EOF
10914  
10915 else
10916   echo "$ac_t""no" 1>&6
10917 fi
10918 done
10919
10920 if test "$ol_cv_header_db2" = yes ; then
10921         
10922         ol_cv_header_db=$ac_cv_header_db_185_h
10923 else
10924         ol_cv_header_db=$ac_cv_header_db_h
10925 fi
10926
10927
10928  
10929  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10930 echo "configure:10931: checking for Berkeley DB" >&5
10931 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   
10935         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10936                 ol_cv_berkeley_db=no
10937         else
10938                 ol_cv_berkeley_db=yes
10939         fi
10940
10941 fi
10942
10943 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10944  if test $ol_cv_berkeley_db = yes ; then
10945         cat >> confdefs.h <<\EOF
10946 #define HAVE_BERKELEY_DB 1
10947 EOF
10948
10949  fi
10950
10951
10952         if test $ol_cv_berkeley_db = yes ; then
10953                 ol_link_ldbm=db
10954                 ol_with_ldbm_api=db
10955
10956                 if test $ol_with_ldbm_type = hash ; then
10957                         cat >> confdefs.h <<\EOF
10958 #define LDBM_USE_DBHASH 1
10959 EOF
10960
10961                 else
10962                         cat >> confdefs.h <<\EOF
10963 #define LDBM_USE_DBBTREE 1
10964 EOF
10965
10966                 fi
10967
10968                                                 if test $ol_cv_lib_db != yes ; then
10969                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10970                 fi
10971         fi
10972 fi
10973
10974 if test $ol_with_ldbm_api = manual ; then
10975                 ol_link_ldbm=yes
10976
10977         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10978
10979         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10980 do
10981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10983 echo "configure:10984: checking for $ac_hdr" >&5
10984 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10985   echo $ac_n "(cached) $ac_c" 1>&6
10986 else
10987   cat > conftest.$ac_ext <<EOF
10988 #line 10989 "configure"
10989 #include "confdefs.h"
10990 #include <$ac_hdr>
10991 EOF
10992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10993 { (eval echo configure:10994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10995 if test -z "$ac_err"; then
10996   rm -rf conftest*
10997   eval "ac_cv_header_$ac_safe=yes"
10998 else
10999   echo "$ac_err" >&5
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   eval "ac_cv_header_$ac_safe=no"
11004 fi
11005 rm -f conftest*
11006 fi
11007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11008   echo "$ac_t""yes" 1>&6
11009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11010   cat >> confdefs.h <<EOF
11011 #define $ac_tr_hdr 1
11012 EOF
11013  
11014 else
11015   echo "$ac_t""no" 1>&6
11016 fi
11017 done
11018
11019 fi
11020
11021 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11022         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11023         ol_with_ldbm_api=none
11024 fi
11025
11026 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11027         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11028 echo "configure:11029: checking for MDBM library" >&5
11029 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11030   echo $ac_n "(cached) $ac_c" 1>&6
11031 else
11032         ol_LIBS="$LIBS"
11033         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11034 echo "configure:11035: checking for mdbm_set_chain" >&5
11035 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11036   echo $ac_n "(cached) $ac_c" 1>&6
11037 else
11038   cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 /* System header to define __stub macros and hopefully few prototypes,
11042     which can conflict with char mdbm_set_chain(); below.  */
11043 #include <assert.h>
11044 /* Override any gcc2 internal prototype to avoid an error.  */
11045 /* We use char because int might match the return type of a gcc2
11046     builtin and then its argument prototype would still apply.  */
11047 char mdbm_set_chain();
11048 char (*f)();
11049
11050 int main() {
11051
11052 /* The GNU C library defines this for functions which it implements
11053     to always fail with ENOSYS.  Some functions are actually named
11054     something starting with __ and the normal name is an alias.  */
11055 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11056 choke me
11057 #else
11058 f = mdbm_set_chain;
11059 #endif
11060
11061 ; return 0; }
11062 EOF
11063 if { (eval echo configure:11064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11064   rm -rf conftest*
11065   eval "ac_cv_func_mdbm_set_chain=yes"
11066 else
11067   echo "configure: failed program was:" >&5
11068   cat conftest.$ac_ext >&5
11069   rm -rf conftest*
11070   eval "ac_cv_func_mdbm_set_chain=no"
11071 fi
11072 rm -f conftest*
11073 fi
11074
11075 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11076   echo "$ac_t""yes" 1>&6
11077   ol_cv_lib_mdbm=yes
11078 else
11079   echo "$ac_t""no" 1>&6
11080
11081                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11082 echo "configure:11083: checking for mdbm_set_chain in -lmdbm" >&5
11083 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11085   echo $ac_n "(cached) $ac_c" 1>&6
11086 else
11087   ac_save_LIBS="$LIBS"
11088 LIBS="-lmdbm  $LIBS"
11089 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 /* Override any gcc2 internal prototype to avoid an error.  */
11093 /* We use char because int might match the return type of a gcc2
11094     builtin and then its argument prototype would still apply.  */
11095 char mdbm_set_chain();
11096
11097 int main() {
11098 mdbm_set_chain()
11099 ; return 0; }
11100 EOF
11101 if { (eval echo configure:11102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11102   rm -rf conftest*
11103   eval "ac_cv_lib_$ac_lib_var=yes"
11104 else
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_lib_$ac_lib_var=no"
11109 fi
11110 rm -f conftest*
11111 LIBS="$ac_save_LIBS"
11112
11113 fi
11114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116   ol_cv_lib_mdbm=-lmdbm
11117 else
11118   echo "$ac_t""no" 1>&6
11119 ol_cv_lib_mdbm=no
11120 fi
11121
11122         
11123 fi
11124
11125         LIBS="$ol_LIBS"
11126
11127 fi
11128
11129 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11130
11131
11132  for ac_hdr in mdbm.h
11133 do
11134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11136 echo "configure:11137: checking for $ac_hdr" >&5
11137 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11138   echo $ac_n "(cached) $ac_c" 1>&6
11139 else
11140   cat > conftest.$ac_ext <<EOF
11141 #line 11142 "configure"
11142 #include "confdefs.h"
11143 #include <$ac_hdr>
11144 EOF
11145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11146 { (eval echo configure:11147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11148 if test -z "$ac_err"; then
11149   rm -rf conftest*
11150   eval "ac_cv_header_$ac_safe=yes"
11151 else
11152   echo "$ac_err" >&5
11153   echo "configure: failed program was:" >&5
11154   cat conftest.$ac_ext >&5
11155   rm -rf conftest*
11156   eval "ac_cv_header_$ac_safe=no"
11157 fi
11158 rm -f conftest*
11159 fi
11160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11161   echo "$ac_t""yes" 1>&6
11162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11163   cat >> confdefs.h <<EOF
11164 #define $ac_tr_hdr 1
11165 EOF
11166  
11167 else
11168   echo "$ac_t""no" 1>&6
11169 fi
11170 done
11171
11172  echo $ac_n "checking for db""... $ac_c" 1>&6
11173 echo "configure:11174: checking for db" >&5
11174 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11175   echo $ac_n "(cached) $ac_c" 1>&6
11176 else
11177   
11178         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11179                 ol_cv_mdbm=no
11180         else
11181                 ol_cv_mdbm=yes
11182         fi
11183
11184 fi
11185
11186 echo "$ac_t""$ol_cv_mdbm" 1>&6
11187  if test $ol_cv_mdbm = yes ; then
11188         cat >> confdefs.h <<\EOF
11189 #define HAVE_MDBM 1
11190 EOF
11191
11192  fi
11193
11194
11195         if test $ol_cv_mdbm = yes ; then
11196                 ol_link_ldbm=mdbm
11197                 ol_with_ldbm_api=mdbm
11198                 if test $ol_cv_lib_mdbm != yes ; then
11199                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11200                 fi
11201         fi
11202 fi
11203
11204 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11205         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11206 echo "configure:11207: checking for GDBM library" >&5
11207 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210         ol_LIBS="$LIBS"
11211         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11212 echo "configure:11213: checking for gdbm_open" >&5
11213 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11214   echo $ac_n "(cached) $ac_c" 1>&6
11215 else
11216   cat > conftest.$ac_ext <<EOF
11217 #line 11218 "configure"
11218 #include "confdefs.h"
11219 /* System header to define __stub macros and hopefully few prototypes,
11220     which can conflict with char gdbm_open(); below.  */
11221 #include <assert.h>
11222 /* Override any gcc2 internal prototype to avoid an error.  */
11223 /* We use char because int might match the return type of a gcc2
11224     builtin and then its argument prototype would still apply.  */
11225 char gdbm_open();
11226 char (*f)();
11227
11228 int main() {
11229
11230 /* The GNU C library defines this for functions which it implements
11231     to always fail with ENOSYS.  Some functions are actually named
11232     something starting with __ and the normal name is an alias.  */
11233 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11234 choke me
11235 #else
11236 f = gdbm_open;
11237 #endif
11238
11239 ; return 0; }
11240 EOF
11241 if { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11242   rm -rf conftest*
11243   eval "ac_cv_func_gdbm_open=yes"
11244 else
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   eval "ac_cv_func_gdbm_open=no"
11249 fi
11250 rm -f conftest*
11251 fi
11252
11253 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11254   echo "$ac_t""yes" 1>&6
11255   ol_cv_lib_gdbm=yes
11256 else
11257   echo "$ac_t""no" 1>&6
11258
11259                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11260 echo "configure:11261: checking for gdbm_open in -lgdbm" >&5
11261 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11263   echo $ac_n "(cached) $ac_c" 1>&6
11264 else
11265   ac_save_LIBS="$LIBS"
11266 LIBS="-lgdbm  $LIBS"
11267 cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 /* Override any gcc2 internal prototype to avoid an error.  */
11271 /* We use char because int might match the return type of a gcc2
11272     builtin and then its argument prototype would still apply.  */
11273 char gdbm_open();
11274
11275 int main() {
11276 gdbm_open()
11277 ; return 0; }
11278 EOF
11279 if { (eval echo configure:11280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11280   rm -rf conftest*
11281   eval "ac_cv_lib_$ac_lib_var=yes"
11282 else
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -rf conftest*
11286   eval "ac_cv_lib_$ac_lib_var=no"
11287 fi
11288 rm -f conftest*
11289 LIBS="$ac_save_LIBS"
11290
11291 fi
11292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294   ol_cv_lib_gdbm=-lgdbm
11295 else
11296   echo "$ac_t""no" 1>&6
11297 ol_cv_lib_gdbm=no
11298 fi
11299
11300         
11301 fi
11302
11303         LIBS="$ol_LIBS"
11304
11305 fi
11306
11307 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11308
11309
11310  for ac_hdr in gdbm.h
11311 do
11312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11314 echo "configure:11315: checking for $ac_hdr" >&5
11315 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11316   echo $ac_n "(cached) $ac_c" 1>&6
11317 else
11318   cat > conftest.$ac_ext <<EOF
11319 #line 11320 "configure"
11320 #include "confdefs.h"
11321 #include <$ac_hdr>
11322 EOF
11323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11324 { (eval echo configure:11325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11326 if test -z "$ac_err"; then
11327   rm -rf conftest*
11328   eval "ac_cv_header_$ac_safe=yes"
11329 else
11330   echo "$ac_err" >&5
11331   echo "configure: failed program was:" >&5
11332   cat conftest.$ac_ext >&5
11333   rm -rf conftest*
11334   eval "ac_cv_header_$ac_safe=no"
11335 fi
11336 rm -f conftest*
11337 fi
11338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11339   echo "$ac_t""yes" 1>&6
11340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11341   cat >> confdefs.h <<EOF
11342 #define $ac_tr_hdr 1
11343 EOF
11344  
11345 else
11346   echo "$ac_t""no" 1>&6
11347 fi
11348 done
11349
11350  echo $ac_n "checking for db""... $ac_c" 1>&6
11351 echo "configure:11352: checking for db" >&5
11352 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11353   echo $ac_n "(cached) $ac_c" 1>&6
11354 else
11355   
11356         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11357                 ol_cv_gdbm=no
11358         else
11359                 ol_cv_gdbm=yes
11360         fi
11361
11362 fi
11363
11364 echo "$ac_t""$ol_cv_gdbm" 1>&6
11365  if test $ol_cv_gdbm = yes ; then
11366         cat >> confdefs.h <<\EOF
11367 #define HAVE_GDBM 1
11368 EOF
11369
11370  fi
11371
11372
11373         if test $ol_cv_gdbm = yes ; then
11374                 ol_link_ldbm=gdbm
11375                 ol_with_ldbm_api=gdbm
11376
11377                 if test $ol_cv_lib_gdbm != yes ; then
11378                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11379                 fi
11380         fi
11381 fi
11382
11383 if test $ol_with_ldbm_api = auto ; then
11384         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11385 elif test $ol_with_ldbm_api = ndbm ; then
11386         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11387 echo "configure:11388: checking for NDBM library" >&5
11388 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11389   echo $ac_n "(cached) $ac_c" 1>&6
11390 else
11391         ol_LIBS="$LIBS"
11392         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11393 echo "configure:11394: checking for dbm_open" >&5
11394 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397   cat > conftest.$ac_ext <<EOF
11398 #line 11399 "configure"
11399 #include "confdefs.h"
11400 /* System header to define __stub macros and hopefully few prototypes,
11401     which can conflict with char dbm_open(); below.  */
11402 #include <assert.h>
11403 /* Override any gcc2 internal prototype to avoid an error.  */
11404 /* We use char because int might match the return type of a gcc2
11405     builtin and then its argument prototype would still apply.  */
11406 char dbm_open();
11407 char (*f)();
11408
11409 int main() {
11410
11411 /* The GNU C library defines this for functions which it implements
11412     to always fail with ENOSYS.  Some functions are actually named
11413     something starting with __ and the normal name is an alias.  */
11414 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11415 choke me
11416 #else
11417 f = dbm_open;
11418 #endif
11419
11420 ; return 0; }
11421 EOF
11422 if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11423   rm -rf conftest*
11424   eval "ac_cv_func_dbm_open=yes"
11425 else
11426   echo "configure: failed program was:" >&5
11427   cat conftest.$ac_ext >&5
11428   rm -rf conftest*
11429   eval "ac_cv_func_dbm_open=no"
11430 fi
11431 rm -f conftest*
11432 fi
11433
11434 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11435   echo "$ac_t""yes" 1>&6
11436   ol_cv_lib_ndbm=yes
11437 else
11438   echo "$ac_t""no" 1>&6
11439
11440                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11441 echo "configure:11442: checking for dbm_open in -lndbm" >&5
11442 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11443 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11444   echo $ac_n "(cached) $ac_c" 1>&6
11445 else
11446   ac_save_LIBS="$LIBS"
11447 LIBS="-lndbm  $LIBS"
11448 cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451 /* Override any gcc2 internal prototype to avoid an error.  */
11452 /* We use char because int might match the return type of a gcc2
11453     builtin and then its argument prototype would still apply.  */
11454 char dbm_open();
11455
11456 int main() {
11457 dbm_open()
11458 ; return 0; }
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11461   rm -rf conftest*
11462   eval "ac_cv_lib_$ac_lib_var=yes"
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   eval "ac_cv_lib_$ac_lib_var=no"
11468 fi
11469 rm -f conftest*
11470 LIBS="$ac_save_LIBS"
11471
11472 fi
11473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11474   echo "$ac_t""yes" 1>&6
11475   ol_cv_lib_ndbm=-lndbm
11476 else
11477   echo "$ac_t""no" 1>&6
11478
11479                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11480 echo "configure:11481: checking for dbm_open in -ldbm" >&5
11481 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11483   echo $ac_n "(cached) $ac_c" 1>&6
11484 else
11485   ac_save_LIBS="$LIBS"
11486 LIBS="-ldbm  $LIBS"
11487 cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 /* Override any gcc2 internal prototype to avoid an error.  */
11491 /* We use char because int might match the return type of a gcc2
11492     builtin and then its argument prototype would still apply.  */
11493 char dbm_open();
11494
11495 int main() {
11496 dbm_open()
11497 ; return 0; }
11498 EOF
11499 if { (eval echo configure:11500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11500   rm -rf conftest*
11501   eval "ac_cv_lib_$ac_lib_var=yes"
11502 else
11503   echo "configure: failed program was:" >&5
11504   cat conftest.$ac_ext >&5
11505   rm -rf conftest*
11506   eval "ac_cv_lib_$ac_lib_var=no"
11507 fi
11508 rm -f conftest*
11509 LIBS="$ac_save_LIBS"
11510
11511 fi
11512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11513   echo "$ac_t""yes" 1>&6
11514   ol_cv_lib_ndbm=-ldbm
11515 else
11516   echo "$ac_t""no" 1>&6
11517 ol_cv_lib_ndbm=no
11518 fi
11519                 
11520 fi
11521
11522         
11523 fi
11524
11525         LIBS="$ol_LIBS"
11526
11527 fi
11528
11529 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11530
11531
11532  for ac_hdr in ndbm.h
11533 do
11534 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11535 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11536 echo "configure:11537: checking for $ac_hdr" >&5
11537 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11538   echo $ac_n "(cached) $ac_c" 1>&6
11539 else
11540   cat > conftest.$ac_ext <<EOF
11541 #line 11542 "configure"
11542 #include "confdefs.h"
11543 #include <$ac_hdr>
11544 EOF
11545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11546 { (eval echo configure:11547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11548 if test -z "$ac_err"; then
11549   rm -rf conftest*
11550   eval "ac_cv_header_$ac_safe=yes"
11551 else
11552   echo "$ac_err" >&5
11553   echo "configure: failed program was:" >&5
11554   cat conftest.$ac_ext >&5
11555   rm -rf conftest*
11556   eval "ac_cv_header_$ac_safe=no"
11557 fi
11558 rm -f conftest*
11559 fi
11560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11561   echo "$ac_t""yes" 1>&6
11562     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11563   cat >> confdefs.h <<EOF
11564 #define $ac_tr_hdr 1
11565 EOF
11566  
11567 else
11568   echo "$ac_t""no" 1>&6
11569 fi
11570 done
11571
11572  echo $ac_n "checking for db""... $ac_c" 1>&6
11573 echo "configure:11574: checking for db" >&5
11574 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11575   echo $ac_n "(cached) $ac_c" 1>&6
11576 else
11577   
11578         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11579                 ol_cv_ndbm=no
11580         else
11581                 ol_cv_ndbm=yes
11582         fi
11583
11584 fi
11585
11586 echo "$ac_t""$ol_cv_ndbm" 1>&6
11587  if test $ol_cv_ndbm = yes ; then
11588         cat >> confdefs.h <<\EOF
11589 #define HAVE_NDBM 1
11590 EOF
11591
11592  fi
11593
11594
11595         if test $ol_cv_ndbm = yes ; then
11596                 ol_link_ldbm=ndbm
11597                 ol_with_ldbm_api=ndbm
11598
11599                 if test $ol_cv_lib_ndbm != yes ; then
11600                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11601                 fi
11602         fi
11603 fi
11604
11605 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11606         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11607         if test $ol_enable_ldbm = yes ; then
11608                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11609         fi
11610
11611         echo "configure: warning: disabling LDBM" 1>&2
11612         ol_enable_ldbm=no
11613 fi
11614
11615 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
11616         LINK_BINS_DYNAMIC="yes"
11617 else
11618         LINK_BINS_DYNAMIC="no"
11619 fi
11620
11621 if test $ol_enable_wrappers != no ; then
11622         for ac_hdr in tcpd.h
11623 do
11624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11626 echo "configure:11627: checking for $ac_hdr" >&5
11627 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11628   echo $ac_n "(cached) $ac_c" 1>&6
11629 else
11630   cat > conftest.$ac_ext <<EOF
11631 #line 11632 "configure"
11632 #include "confdefs.h"
11633 #include <$ac_hdr>
11634 EOF
11635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11636 { (eval echo configure:11637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11638 if test -z "$ac_err"; then
11639   rm -rf conftest*
11640   eval "ac_cv_header_$ac_safe=yes"
11641 else
11642   echo "$ac_err" >&5
11643   echo "configure: failed program was:" >&5
11644   cat conftest.$ac_ext >&5
11645   rm -rf conftest*
11646   eval "ac_cv_header_$ac_safe=no"
11647 fi
11648 rm -f conftest*
11649 fi
11650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11651   echo "$ac_t""yes" 1>&6
11652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11653   cat >> confdefs.h <<EOF
11654 #define $ac_tr_hdr 1
11655 EOF
11656  
11657 else
11658   echo "$ac_t""no" 1>&6
11659 fi
11660 done
11661
11662
11663         if test $ac_cv_header_tcpd_h != yes ; then
11664                 have_wrappers=no
11665         else
11666                 cat > conftest.$ac_ext <<EOF
11667 #line 11668 "configure"
11668 #include "confdefs.h"
11669
11670 int allow_severity = 0;
11671 int deny_severity  = 0;
11672                 
11673 int main() {
11674 hosts_access()
11675 ; return 0; }
11676 EOF
11677 if { (eval echo configure:11678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11678   rm -rf conftest*
11679   have_wrappers=yes
11680 else
11681   echo "configure: failed program was:" >&5
11682   cat conftest.$ac_ext >&5
11683   rm -rf conftest*
11684   have_wrappers=no
11685 fi
11686 rm -f conftest*
11687         fi
11688
11689         if test $have_wrappers = yes ; then
11690                 cat >> confdefs.h <<\EOF
11691 #define HAVE_TCPD 1
11692 EOF
11693
11694                 WRAP_LIBS="-lwrap"
11695
11696                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11697 echo "configure:11698: checking for main in -lnsl" >&5
11698 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11700   echo $ac_n "(cached) $ac_c" 1>&6
11701 else
11702   ac_save_LIBS="$LIBS"
11703 LIBS="-lnsl  $LIBS"
11704 cat > conftest.$ac_ext <<EOF
11705 #line 11706 "configure"
11706 #include "confdefs.h"
11707
11708 int main() {
11709 main()
11710 ; return 0; }
11711 EOF
11712 if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11713   rm -rf conftest*
11714   eval "ac_cv_lib_$ac_lib_var=yes"
11715 else
11716   echo "configure: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   rm -rf conftest*
11719   eval "ac_cv_lib_$ac_lib_var=no"
11720 fi
11721 rm -f conftest*
11722 LIBS="$ac_save_LIBS"
11723
11724 fi
11725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11726   echo "$ac_t""yes" 1>&6
11727     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11728     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11729   cat >> confdefs.h <<EOF
11730 #define $ac_tr_lib 1
11731 EOF
11732
11733   LIBS="-lnsl $LIBS"
11734
11735 else
11736   echo "$ac_t""no" 1>&6
11737 fi
11738
11739         else
11740                 echo "configure: warning: could not find -lwrap" 1>&2
11741                 if test $ol_enable_wrappers = yes ; then
11742                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11743                 fi
11744
11745                 echo "configure: warning: disabling wrappers support" 1>&2
11746                 ol_enable_wrappers=no
11747                 WRAP_LIBS=""
11748         fi
11749 fi
11750
11751 if test $ol_enable_syslog != no ; then
11752         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11753 echo "configure:11754: checking for openlog" >&5
11754 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11755   echo $ac_n "(cached) $ac_c" 1>&6
11756 else
11757   cat > conftest.$ac_ext <<EOF
11758 #line 11759 "configure"
11759 #include "confdefs.h"
11760 /* System header to define __stub macros and hopefully few prototypes,
11761     which can conflict with char openlog(); below.  */
11762 #include <assert.h>
11763 /* Override any gcc2 internal prototype to avoid an error.  */
11764 /* We use char because int might match the return type of a gcc2
11765     builtin and then its argument prototype would still apply.  */
11766 char openlog();
11767 char (*f)();
11768
11769 int main() {
11770
11771 /* The GNU C library defines this for functions which it implements
11772     to always fail with ENOSYS.  Some functions are actually named
11773     something starting with __ and the normal name is an alias.  */
11774 #if defined (__stub_openlog) || defined (__stub___openlog)
11775 choke me
11776 #else
11777 f = openlog;
11778 #endif
11779
11780 ; return 0; }
11781 EOF
11782 if { (eval echo configure:11783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11783   rm -rf conftest*
11784   eval "ac_cv_func_openlog=yes"
11785 else
11786   echo "configure: failed program was:" >&5
11787   cat conftest.$ac_ext >&5
11788   rm -rf conftest*
11789   eval "ac_cv_func_openlog=no"
11790 fi
11791 rm -f conftest*
11792 fi
11793
11794 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11795   echo "$ac_t""yes" 1>&6
11796   :
11797 else
11798   echo "$ac_t""no" 1>&6
11799 fi
11800
11801         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11802                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11803         fi
11804         ol_enable_syslog=$ac_cv_func_openlog
11805 fi
11806
11807 if test $ol_enable_dmalloc != no ; then
11808         for ac_hdr in dmalloc.h
11809 do
11810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11812 echo "configure:11813: checking for $ac_hdr" >&5
11813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11814   echo $ac_n "(cached) $ac_c" 1>&6
11815 else
11816   cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819 #include <$ac_hdr>
11820 EOF
11821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11822 { (eval echo configure:11823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11824 if test -z "$ac_err"; then
11825   rm -rf conftest*
11826   eval "ac_cv_header_$ac_safe=yes"
11827 else
11828   echo "$ac_err" >&5
11829   echo "configure: failed program was:" >&5
11830   cat conftest.$ac_ext >&5
11831   rm -rf conftest*
11832   eval "ac_cv_header_$ac_safe=no"
11833 fi
11834 rm -f conftest*
11835 fi
11836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11837   echo "$ac_t""yes" 1>&6
11838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11839   cat >> confdefs.h <<EOF
11840 #define $ac_tr_hdr 1
11841 EOF
11842  
11843 else
11844   echo "$ac_t""no" 1>&6
11845 fi
11846 done
11847
11848         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11849 echo "configure:11850: checking for dmalloc_shutdown in -ldmalloc" >&5
11850 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | 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="-ldmalloc  $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 dmalloc_shutdown();
11863
11864 int main() {
11865 dmalloc_shutdown()
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     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11884     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11885   cat >> confdefs.h <<EOF
11886 #define $ac_tr_lib 1
11887 EOF
11888
11889   LIBS="-ldmalloc $LIBS"
11890
11891 else
11892   echo "$ac_t""no" 1>&6
11893 fi
11894
11895 fi
11896
11897 if test $ol_enable_tcl != no ; then
11898         for ac_hdr in tcl.h
11899 do
11900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11902 echo "configure:11903: checking for $ac_hdr" >&5
11903 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11904   echo $ac_n "(cached) $ac_c" 1>&6
11905 else
11906   cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909 #include <$ac_hdr>
11910 EOF
11911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11912 { (eval echo configure:11913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11914 if test -z "$ac_err"; then
11915   rm -rf conftest*
11916   eval "ac_cv_header_$ac_safe=yes"
11917 else
11918   echo "$ac_err" >&5
11919   echo "configure: failed program was:" >&5
11920   cat conftest.$ac_ext >&5
11921   rm -rf conftest*
11922   eval "ac_cv_header_$ac_safe=no"
11923 fi
11924 rm -f conftest*
11925 fi
11926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11927   echo "$ac_t""yes" 1>&6
11928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11929   cat >> confdefs.h <<EOF
11930 #define $ac_tr_hdr 1
11931 EOF
11932  
11933 else
11934   echo "$ac_t""no" 1>&6
11935 fi
11936 done
11937
11938
11939         if test $ac_cv_header_tcl_h != yes ; then
11940                 have_tcl=no
11941         else
11942                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
11943                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
11944 echo "configure:11945: checking for main in -l$lib" >&5
11945 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
11946 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11947   echo $ac_n "(cached) $ac_c" 1>&6
11948 else
11949   ac_save_LIBS="$LIBS"
11950 LIBS="-l$lib  $LIBS"
11951 cat > conftest.$ac_ext <<EOF
11952 #line 11953 "configure"
11953 #include "confdefs.h"
11954
11955 int main() {
11956 main()
11957 ; return 0; }
11958 EOF
11959 if { (eval echo configure:11960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11960   rm -rf conftest*
11961   eval "ac_cv_lib_$ac_lib_var=yes"
11962 else
11963   echo "configure: failed program was:" >&5
11964   cat conftest.$ac_ext >&5
11965   rm -rf conftest*
11966   eval "ac_cv_lib_$ac_lib_var=no"
11967 fi
11968 rm -f conftest*
11969 LIBS="$ac_save_LIBS"
11970
11971 fi
11972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11973   echo "$ac_t""yes" 1>&6
11974   have_tcl=yes
11975                            if test x"$ol_with_tcl_module" == "xstatic" ; then
11976                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
11977                            else
11978                                MOD_TCL_LIB="-l${lib}"
11979                            fi;break
11980 else
11981   echo "$ac_t""no" 1>&6
11982 have_tcl=no
11983 fi
11984
11985                 done
11986         fi
11987
11988         if test $have_tcl != yes ; then
11989                 echo "configure: warning: could not find -ltcl" 1>&2
11990                 if test $ol_enable_tcl = yes ; then
11991                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11992                 fi
11993
11994                 ol_enable_tcl=no
11995         fi
11996 fi
11997
11998 ol_link_termcap=no
11999 for ac_hdr in termcap.h ncurses.h
12000 do
12001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12003 echo "configure:12004: checking for $ac_hdr" >&5
12004 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12005   echo $ac_n "(cached) $ac_c" 1>&6
12006 else
12007   cat > conftest.$ac_ext <<EOF
12008 #line 12009 "configure"
12009 #include "confdefs.h"
12010 #include <$ac_hdr>
12011 EOF
12012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12013 { (eval echo configure:12014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12015 if test -z "$ac_err"; then
12016   rm -rf conftest*
12017   eval "ac_cv_header_$ac_safe=yes"
12018 else
12019   echo "$ac_err" >&5
12020   echo "configure: failed program was:" >&5
12021   cat conftest.$ac_ext >&5
12022   rm -rf conftest*
12023   eval "ac_cv_header_$ac_safe=no"
12024 fi
12025 rm -f conftest*
12026 fi
12027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12028   echo "$ac_t""yes" 1>&6
12029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12030   cat >> confdefs.h <<EOF
12031 #define $ac_tr_hdr 1
12032 EOF
12033  
12034 else
12035   echo "$ac_t""no" 1>&6
12036 fi
12037 done
12038
12039
12040 if test $ol_link_termcap = no ; then
12041         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12042 echo "configure:12043: checking for tputs in -ltermcap" >&5
12043 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12045   echo $ac_n "(cached) $ac_c" 1>&6
12046 else
12047   ac_save_LIBS="$LIBS"
12048 LIBS="-ltermcap  $LIBS"
12049 cat > conftest.$ac_ext <<EOF
12050 #line 12051 "configure"
12051 #include "confdefs.h"
12052 /* Override any gcc2 internal prototype to avoid an error.  */
12053 /* We use char because int might match the return type of a gcc2
12054     builtin and then its argument prototype would still apply.  */
12055 char tputs();
12056
12057 int main() {
12058 tputs()
12059 ; return 0; }
12060 EOF
12061 if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12062   rm -rf conftest*
12063   eval "ac_cv_lib_$ac_lib_var=yes"
12064 else
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -rf conftest*
12068   eval "ac_cv_lib_$ac_lib_var=no"
12069 fi
12070 rm -f conftest*
12071 LIBS="$ac_save_LIBS"
12072
12073 fi
12074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12075   echo "$ac_t""yes" 1>&6
12076   have_termcap=yes
12077 else
12078   echo "$ac_t""no" 1>&6
12079 have_termcap=no
12080 fi
12081
12082         if test $have_termcap = yes ; then
12083                 cat >> confdefs.h <<\EOF
12084 #define HAVE_TERMCAP 1
12085 EOF
12086
12087                 ol_link_termcap=yes
12088                 TERMCAP_LIBS=-ltermcap
12089         fi
12090 fi
12091
12092 if test $ol_link_termcap = no ; then
12093         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12094 echo "configure:12095: checking for initscr in -lncurses" >&5
12095 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12097   echo $ac_n "(cached) $ac_c" 1>&6
12098 else
12099   ac_save_LIBS="$LIBS"
12100 LIBS="-lncurses  $LIBS"
12101 cat > conftest.$ac_ext <<EOF
12102 #line 12103 "configure"
12103 #include "confdefs.h"
12104 /* Override any gcc2 internal prototype to avoid an error.  */
12105 /* We use char because int might match the return type of a gcc2
12106     builtin and then its argument prototype would still apply.  */
12107 char initscr();
12108
12109 int main() {
12110 initscr()
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   eval "ac_cv_lib_$ac_lib_var=yes"
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   eval "ac_cv_lib_$ac_lib_var=no"
12121 fi
12122 rm -f conftest*
12123 LIBS="$ac_save_LIBS"
12124
12125 fi
12126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12127   echo "$ac_t""yes" 1>&6
12128   have_ncurses=yes
12129 else
12130   echo "$ac_t""no" 1>&6
12131 have_ncurses=no
12132 fi
12133
12134         if test $have_ncurses = yes ; then
12135                 cat >> confdefs.h <<\EOF
12136 #define HAVE_NCURSES 1
12137 EOF
12138
12139                 ol_link_termcap=yes
12140                 TERMCAP_LIBS=-lncurses
12141         fi
12142 fi
12143
12144 if test $ol_link_termcap = no ; then
12145         cat >> confdefs.h <<\EOF
12146 #define NO_TERMCAP 1
12147 EOF
12148
12149         TERMCAP_LIBS=
12150 fi
12151
12152 ol_link_sasl=no
12153 if test $ol_with_cyrus_sasl != no ; then
12154         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12155 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12156 echo "configure:12157: checking for sasl.h" >&5
12157 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12158   echo $ac_n "(cached) $ac_c" 1>&6
12159 else
12160   cat > conftest.$ac_ext <<EOF
12161 #line 12162 "configure"
12162 #include "confdefs.h"
12163 #include <sasl.h>
12164 EOF
12165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12166 { (eval echo configure:12167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12168 if test -z "$ac_err"; then
12169   rm -rf conftest*
12170   eval "ac_cv_header_$ac_safe=yes"
12171 else
12172   echo "$ac_err" >&5
12173   echo "configure: failed program was:" >&5
12174   cat conftest.$ac_ext >&5
12175   rm -rf conftest*
12176   eval "ac_cv_header_$ac_safe=no"
12177 fi
12178 rm -f conftest*
12179 fi
12180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12181   echo "$ac_t""yes" 1>&6
12182   :
12183 else
12184   echo "$ac_t""no" 1>&6
12185 fi
12186
12187
12188         if test $ac_cv_header_sasl_h = yes ; then
12189                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12190 echo "configure:12191: checking for sasl_client_init in -lsasl" >&5
12191 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12193   echo $ac_n "(cached) $ac_c" 1>&6
12194 else
12195   ac_save_LIBS="$LIBS"
12196 LIBS="-lsasl  $LIBS"
12197 cat > conftest.$ac_ext <<EOF
12198 #line 12199 "configure"
12199 #include "confdefs.h"
12200 /* Override any gcc2 internal prototype to avoid an error.  */
12201 /* We use char because int might match the return type of a gcc2
12202     builtin and then its argument prototype would still apply.  */
12203 char sasl_client_init();
12204
12205 int main() {
12206 sasl_client_init()
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   eval "ac_cv_lib_$ac_lib_var=yes"
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   eval "ac_cv_lib_$ac_lib_var=no"
12217 fi
12218 rm -f conftest*
12219 LIBS="$ac_save_LIBS"
12220
12221 fi
12222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12223   echo "$ac_t""yes" 1>&6
12224   have_cyrus_sasl=yes
12225 else
12226   echo "$ac_t""no" 1>&6
12227 have_cyrus_sasl=no
12228 fi
12229
12230
12231                 if test $have_cyrus_sasl != no ; then
12232                         SASL_LIBS="-lsasl"
12233                         cat >> confdefs.h <<\EOF
12234 #define HAVE_CYRUS_SASL 1
12235 EOF
12236
12237                         ol_link_sasl=yes
12238                 fi
12239         fi
12240
12241         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12242                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12243         fi
12244 fi
12245
12246 ol_link_fetch=no
12247 if test $ol_with_fetch != no ; then
12248         ol=$LIBS
12249 LIBS="-lfetch -lcom_err $LIBS"
12250 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12251 echo "configure:12252: checking fetch(3) library" >&5
12252 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12253   echo $ac_n "(cached) $ac_c" 1>&6
12254 else
12255   
12256         cat > conftest.$ac_ext <<EOF
12257 #line 12258 "configure"
12258 #include "confdefs.h"
12259
12260 #include <sys/param.h>
12261 #include <stdio.h>
12262 #include <fetch.h>
12263 int main() {
12264 struct url *u = fetchParseURL("file:///"); 
12265 ; return 0; }
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12268   rm -rf conftest*
12269   ol_cv_lib_fetch=yes
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   ol_cv_lib_fetch=no
12275 fi
12276 rm -f conftest*
12277 fi
12278
12279 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12280 LIBS=$ol_LIBS
12281 if test $ol_cv_lib_fetch != no ; then
12282         ol_link_fetch="-lfetch -lcom_err"
12283         cat >> confdefs.h <<\EOF
12284 #define HAVE_FETCH 1
12285 EOF
12286
12287 fi
12288
12289
12290         if test $ol_cv_lib_fetch != no ; then
12291                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12292                 ol_link_fetch=freebsd
12293
12294         elif test $ol_with_fetch != auto ; then
12295                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12296         fi 
12297 fi
12298
12299 ol_link_readline=no
12300 if test $ol_with_readline != no ; then
12301         for ac_hdr in readline/readline.h readline/history.h
12302 do
12303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12305 echo "configure:12306: checking for $ac_hdr" >&5
12306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12307   echo $ac_n "(cached) $ac_c" 1>&6
12308 else
12309   cat > conftest.$ac_ext <<EOF
12310 #line 12311 "configure"
12311 #include "confdefs.h"
12312 #include <$ac_hdr>
12313 EOF
12314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12315 { (eval echo configure:12316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12317 if test -z "$ac_err"; then
12318   rm -rf conftest*
12319   eval "ac_cv_header_$ac_safe=yes"
12320 else
12321   echo "$ac_err" >&5
12322   echo "configure: failed program was:" >&5
12323   cat conftest.$ac_ext >&5
12324   rm -rf conftest*
12325   eval "ac_cv_header_$ac_safe=no"
12326 fi
12327 rm -f conftest*
12328 fi
12329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12330   echo "$ac_t""yes" 1>&6
12331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12332   cat >> confdefs.h <<EOF
12333 #define $ac_tr_hdr 1
12334 EOF
12335  
12336 else
12337   echo "$ac_t""no" 1>&6
12338 fi
12339 done
12340
12341
12342         if test $ac_cv_header_readline_readline_h = yes ; then
12343                 save_LIBS="$LIBS"
12344                 LIBS="$TERMCAP_LIBS $LIBS"
12345                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12346 echo "configure:12347: checking for readline in -lreadline" >&5
12347 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12348 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12349   echo $ac_n "(cached) $ac_c" 1>&6
12350 else
12351   ac_save_LIBS="$LIBS"
12352 LIBS="-lreadline  $LIBS"
12353 cat > conftest.$ac_ext <<EOF
12354 #line 12355 "configure"
12355 #include "confdefs.h"
12356 /* Override any gcc2 internal prototype to avoid an error.  */
12357 /* We use char because int might match the return type of a gcc2
12358     builtin and then its argument prototype would still apply.  */
12359 char readline();
12360
12361 int main() {
12362 readline()
12363 ; return 0; }
12364 EOF
12365 if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12366   rm -rf conftest*
12367   eval "ac_cv_lib_$ac_lib_var=yes"
12368 else
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -rf conftest*
12372   eval "ac_cv_lib_$ac_lib_var=no"
12373 fi
12374 rm -f conftest*
12375 LIBS="$ac_save_LIBS"
12376
12377 fi
12378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12379   echo "$ac_t""yes" 1>&6
12380   have_readline=yes
12381 else
12382   echo "$ac_t""no" 1>&6
12383 have_readline=no
12384 fi
12385
12386                 LIBS="$save_LIBS"
12387                         
12388                 if test $have_readline = yes ; then
12389                         ol_with_readline=found
12390                         ol_link_readline=yes
12391
12392                         READLINE_LIBS="-lreadline"
12393                 fi
12394         fi
12395 fi
12396
12397 if test $ol_link_readline = yes ; then
12398         cat >> confdefs.h <<\EOF
12399 #define HAVE_READLINE 1
12400 EOF
12401
12402 fi
12403
12404
12405 if test $ol_enable_crypt != no ; then
12406         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12407 echo "configure:12408: checking for crypt" >&5
12408 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12409   echo $ac_n "(cached) $ac_c" 1>&6
12410 else
12411   cat > conftest.$ac_ext <<EOF
12412 #line 12413 "configure"
12413 #include "confdefs.h"
12414 /* System header to define __stub macros and hopefully few prototypes,
12415     which can conflict with char crypt(); below.  */
12416 #include <assert.h>
12417 /* Override any gcc2 internal prototype to avoid an error.  */
12418 /* We use char because int might match the return type of a gcc2
12419     builtin and then its argument prototype would still apply.  */
12420 char crypt();
12421 char (*f)();
12422
12423 int main() {
12424
12425 /* The GNU C library defines this for functions which it implements
12426     to always fail with ENOSYS.  Some functions are actually named
12427     something starting with __ and the normal name is an alias.  */
12428 #if defined (__stub_crypt) || defined (__stub___crypt)
12429 choke me
12430 #else
12431 f = crypt;
12432 #endif
12433
12434 ; return 0; }
12435 EOF
12436 if { (eval echo configure:12437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12437   rm -rf conftest*
12438   eval "ac_cv_func_crypt=yes"
12439 else
12440   echo "configure: failed program was:" >&5
12441   cat conftest.$ac_ext >&5
12442   rm -rf conftest*
12443   eval "ac_cv_func_crypt=no"
12444 fi
12445 rm -f conftest*
12446 fi
12447
12448 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12449   echo "$ac_t""yes" 1>&6
12450   have_crypt=yes
12451 else
12452   echo "$ac_t""no" 1>&6
12453
12454                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12455 echo "configure:12456: checking for crypt in -lcrypt" >&5
12456 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12458   echo $ac_n "(cached) $ac_c" 1>&6
12459 else
12460   ac_save_LIBS="$LIBS"
12461 LIBS="-lcrypt  $LIBS"
12462 cat > conftest.$ac_ext <<EOF
12463 #line 12464 "configure"
12464 #include "confdefs.h"
12465 /* Override any gcc2 internal prototype to avoid an error.  */
12466 /* We use char because int might match the return type of a gcc2
12467     builtin and then its argument prototype would still apply.  */
12468 char crypt();
12469
12470 int main() {
12471 crypt()
12472 ; return 0; }
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12475   rm -rf conftest*
12476   eval "ac_cv_lib_$ac_lib_var=yes"
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   eval "ac_cv_lib_$ac_lib_var=no"
12482 fi
12483 rm -f conftest*
12484 LIBS="$ac_save_LIBS"
12485
12486 fi
12487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12488   echo "$ac_t""yes" 1>&6
12489   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12490                         have_crypt=yes
12491 else
12492   echo "$ac_t""no" 1>&6
12493 have_crypt=no
12494 fi
12495
12496 fi
12497
12498
12499         if test $have_crypt = yes ; then
12500                 cat >> confdefs.h <<\EOF
12501 #define HAVE_CRYPT 1
12502 EOF
12503
12504         else
12505                 echo "configure: warning: could not find crypt" 1>&2
12506                 if test $ol_enable_crypt = yes ; then
12507                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12508                 fi
12509
12510                 echo "configure: warning: disabling crypt support" 1>&2
12511                 ol_enable_crypt=no
12512         fi
12513 fi
12514
12515 if test $ol_enable_proctitle != no ; then
12516         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12517 echo "configure:12518: checking for setproctitle" >&5
12518 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12519   echo $ac_n "(cached) $ac_c" 1>&6
12520 else
12521   cat > conftest.$ac_ext <<EOF
12522 #line 12523 "configure"
12523 #include "confdefs.h"
12524 /* System header to define __stub macros and hopefully few prototypes,
12525     which can conflict with char setproctitle(); below.  */
12526 #include <assert.h>
12527 /* Override any gcc2 internal prototype to avoid an error.  */
12528 /* We use char because int might match the return type of a gcc2
12529     builtin and then its argument prototype would still apply.  */
12530 char setproctitle();
12531 char (*f)();
12532
12533 int main() {
12534
12535 /* The GNU C library defines this for functions which it implements
12536     to always fail with ENOSYS.  Some functions are actually named
12537     something starting with __ and the normal name is an alias.  */
12538 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12539 choke me
12540 #else
12541 f = setproctitle;
12542 #endif
12543
12544 ; return 0; }
12545 EOF
12546 if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12547   rm -rf conftest*
12548   eval "ac_cv_func_setproctitle=yes"
12549 else
12550   echo "configure: failed program was:" >&5
12551   cat conftest.$ac_ext >&5
12552   rm -rf conftest*
12553   eval "ac_cv_func_setproctitle=no"
12554 fi
12555 rm -f conftest*
12556 fi
12557
12558 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12559   echo "$ac_t""yes" 1>&6
12560   have_setproctitle=yes
12561 else
12562   echo "$ac_t""no" 1>&6
12563
12564                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12565 echo "configure:12566: checking for setproctitle in -lutil" >&5
12566 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12568   echo $ac_n "(cached) $ac_c" 1>&6
12569 else
12570   ac_save_LIBS="$LIBS"
12571 LIBS="-lutil  $LIBS"
12572 cat > conftest.$ac_ext <<EOF
12573 #line 12574 "configure"
12574 #include "confdefs.h"
12575 /* Override any gcc2 internal prototype to avoid an error.  */
12576 /* We use char because int might match the return type of a gcc2
12577     builtin and then its argument prototype would still apply.  */
12578 char setproctitle();
12579
12580 int main() {
12581 setproctitle()
12582 ; return 0; }
12583 EOF
12584 if { (eval echo configure:12585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12585   rm -rf conftest*
12586   eval "ac_cv_lib_$ac_lib_var=yes"
12587 else
12588   echo "configure: failed program was:" >&5
12589   cat conftest.$ac_ext >&5
12590   rm -rf conftest*
12591   eval "ac_cv_lib_$ac_lib_var=no"
12592 fi
12593 rm -f conftest*
12594 LIBS="$ac_save_LIBS"
12595
12596 fi
12597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12598   echo "$ac_t""yes" 1>&6
12599   have_setproctitle=yes
12600                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12601 else
12602   echo "$ac_t""no" 1>&6
12603 have_setproctitle=no
12604                         LIBOBJS="$LIBOBJS setproctitle.o"
12605 fi
12606
12607 fi
12608
12609
12610         if test $have_setproctitle = yes ; then
12611                 cat >> confdefs.h <<\EOF
12612 #define HAVE_SETPROCTITLE 1
12613 EOF
12614
12615         fi
12616 fi
12617
12618 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12619 echo "configure:12620: checking for uid_t in sys/types.h" >&5
12620 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12621   echo $ac_n "(cached) $ac_c" 1>&6
12622 else
12623   cat > conftest.$ac_ext <<EOF
12624 #line 12625 "configure"
12625 #include "confdefs.h"
12626 #include <sys/types.h>
12627 EOF
12628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12629   egrep "uid_t" >/dev/null 2>&1; then
12630   rm -rf conftest*
12631   ac_cv_type_uid_t=yes
12632 else
12633   rm -rf conftest*
12634   ac_cv_type_uid_t=no
12635 fi
12636 rm -f conftest*
12637
12638 fi
12639
12640 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12641 if test $ac_cv_type_uid_t = no; then
12642   cat >> confdefs.h <<\EOF
12643 #define uid_t int
12644 EOF
12645
12646   cat >> confdefs.h <<\EOF
12647 #define gid_t int
12648 EOF
12649
12650 fi
12651
12652 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12653 echo "configure:12654: checking type of array argument to getgroups" >&5
12654 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12655   echo $ac_n "(cached) $ac_c" 1>&6
12656 else
12657   if test "$cross_compiling" = yes; then
12658   ac_cv_type_getgroups=cross
12659 else
12660   cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663
12664 /* Thanks to Mike Rendell for this test.  */
12665 #include <sys/types.h>
12666 #define NGID 256
12667 #undef MAX
12668 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12669 main()
12670 {
12671   gid_t gidset[NGID];
12672   int i, n;
12673   union { gid_t gval; long lval; }  val;
12674
12675   val.lval = -1;
12676   for (i = 0; i < NGID; i++)
12677     gidset[i] = val.gval;
12678   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12679                  gidset);
12680   /* Exit non-zero if getgroups seems to require an array of ints.  This
12681      happens when gid_t is short but getgroups modifies an array of ints.  */
12682   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12683 }
12684
12685 EOF
12686 if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12687 then
12688     ac_cv_type_getgroups=gid_t
12689 else
12690   echo "configure: failed program was:" >&5
12691   cat conftest.$ac_ext >&5
12692   rm -fr conftest*
12693   ac_cv_type_getgroups=int
12694 fi
12695 rm -fr conftest*
12696 fi
12697
12698 if test $ac_cv_type_getgroups = cross; then
12699         cat > conftest.$ac_ext <<EOF
12700 #line 12701 "configure"
12701 #include "confdefs.h"
12702 #include <unistd.h>
12703 EOF
12704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12705   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12706   rm -rf conftest*
12707   ac_cv_type_getgroups=gid_t
12708 else
12709   rm -rf conftest*
12710   ac_cv_type_getgroups=int
12711 fi
12712 rm -f conftest*
12713
12714 fi
12715 fi
12716
12717 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12718 cat >> confdefs.h <<EOF
12719 #define GETGROUPS_T $ac_cv_type_getgroups
12720 EOF
12721
12722  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12723 echo "configure:12724: checking for ANSI C header files" >&5
12724 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12725   echo $ac_n "(cached) $ac_c" 1>&6
12726 else
12727   cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 #include <stdlib.h>
12731 #include <stdarg.h>
12732 #include <string.h>
12733 #include <float.h>
12734 EOF
12735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12736 { (eval echo configure:12737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12738 if test -z "$ac_err"; then
12739   rm -rf conftest*
12740   ac_cv_header_stdc=yes
12741 else
12742   echo "$ac_err" >&5
12743   echo "configure: failed program was:" >&5
12744   cat conftest.$ac_ext >&5
12745   rm -rf conftest*
12746   ac_cv_header_stdc=no
12747 fi
12748 rm -f conftest*
12749
12750 if test $ac_cv_header_stdc = yes; then
12751   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12752 cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755 #include <string.h>
12756 EOF
12757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12758   egrep "memchr" >/dev/null 2>&1; then
12759   :
12760 else
12761   rm -rf conftest*
12762   ac_cv_header_stdc=no
12763 fi
12764 rm -f conftest*
12765
12766 fi
12767
12768 if test $ac_cv_header_stdc = yes; then
12769   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12770 cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773 #include <stdlib.h>
12774 EOF
12775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12776   egrep "free" >/dev/null 2>&1; then
12777   :
12778 else
12779   rm -rf conftest*
12780   ac_cv_header_stdc=no
12781 fi
12782 rm -f conftest*
12783
12784 fi
12785
12786 if test $ac_cv_header_stdc = yes; then
12787   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12788 if test "$cross_compiling" = yes; then
12789   :
12790 else
12791   cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794 #include <ctype.h>
12795 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12796 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12797 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12798 int main () { int i; for (i = 0; i < 256; i++)
12799 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12800 exit (0); }
12801
12802 EOF
12803 if { (eval echo configure:12804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12804 then
12805   :
12806 else
12807   echo "configure: failed program was:" >&5
12808   cat conftest.$ac_ext >&5
12809   rm -fr conftest*
12810   ac_cv_header_stdc=no
12811 fi
12812 rm -fr conftest*
12813 fi
12814
12815 fi
12816 fi
12817
12818 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12819 if test $ac_cv_header_stdc = yes; then
12820   cat >> confdefs.h <<\EOF
12821 #define STDC_HEADERS 1
12822 EOF
12823
12824 fi
12825
12826 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12827 echo "configure:12828: checking for mode_t" >&5
12828 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12829   echo $ac_n "(cached) $ac_c" 1>&6
12830 else
12831   cat > conftest.$ac_ext <<EOF
12832 #line 12833 "configure"
12833 #include "confdefs.h"
12834 #include <sys/types.h>
12835 #if STDC_HEADERS
12836 #include <stdlib.h>
12837 #include <stddef.h>
12838 #endif
12839 EOF
12840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12841   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12842   rm -rf conftest*
12843   eval "ac_cv_type_mode_t=yes"
12844 else
12845   rm -rf conftest*
12846   eval "ac_cv_type_mode_t=no"
12847 fi
12848 rm -f conftest*
12849
12850 fi
12851 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12852   echo "$ac_t""yes" 1>&6
12853 else
12854   echo "$ac_t""no" 1>&6
12855   cat >> confdefs.h <<EOF
12856 #define mode_t int
12857 EOF
12858
12859 fi
12860
12861 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12862 echo "configure:12863: checking for off_t" >&5
12863 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12864   echo $ac_n "(cached) $ac_c" 1>&6
12865 else
12866   cat > conftest.$ac_ext <<EOF
12867 #line 12868 "configure"
12868 #include "confdefs.h"
12869 #include <sys/types.h>
12870 #if STDC_HEADERS
12871 #include <stdlib.h>
12872 #include <stddef.h>
12873 #endif
12874 EOF
12875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12876   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12877   rm -rf conftest*
12878   eval "ac_cv_type_off_t=yes"
12879 else
12880   rm -rf conftest*
12881   eval "ac_cv_type_off_t=no"
12882 fi
12883 rm -f conftest*
12884
12885 fi
12886 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12887   echo "$ac_t""yes" 1>&6
12888 else
12889   echo "$ac_t""no" 1>&6
12890   cat >> confdefs.h <<EOF
12891 #define off_t long
12892 EOF
12893
12894 fi
12895
12896 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12897 echo "configure:12898: checking for pid_t" >&5
12898 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12899   echo $ac_n "(cached) $ac_c" 1>&6
12900 else
12901   cat > conftest.$ac_ext <<EOF
12902 #line 12903 "configure"
12903 #include "confdefs.h"
12904 #include <sys/types.h>
12905 #if STDC_HEADERS
12906 #include <stdlib.h>
12907 #include <stddef.h>
12908 #endif
12909 EOF
12910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12911   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12912   rm -rf conftest*
12913   eval "ac_cv_type_pid_t=yes"
12914 else
12915   rm -rf conftest*
12916   eval "ac_cv_type_pid_t=no"
12917 fi
12918 rm -f conftest*
12919
12920 fi
12921 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12922   echo "$ac_t""yes" 1>&6
12923 else
12924   echo "$ac_t""no" 1>&6
12925   cat >> confdefs.h <<EOF
12926 #define pid_t int
12927 EOF
12928
12929 fi
12930
12931 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12932 echo "configure:12933: checking for ptrdiff_t" >&5
12933 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12934   echo $ac_n "(cached) $ac_c" 1>&6
12935 else
12936   cat > conftest.$ac_ext <<EOF
12937 #line 12938 "configure"
12938 #include "confdefs.h"
12939 #include <stddef.h>
12940 int main() {
12941 ptrdiff_t p
12942 ; return 0; }
12943 EOF
12944 if { (eval echo configure:12945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12945   rm -rf conftest*
12946   am_cv_type_ptrdiff_t=yes
12947 else
12948   echo "configure: failed program was:" >&5
12949   cat conftest.$ac_ext >&5
12950   rm -rf conftest*
12951   am_cv_type_ptrdiff_t=no
12952 fi
12953 rm -f conftest*
12954 fi
12955
12956 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12957    if test $am_cv_type_ptrdiff_t = yes; then
12958      cat >> confdefs.h <<\EOF
12959 #define HAVE_PTRDIFF_T 1
12960 EOF
12961
12962    fi
12963
12964 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12965 echo "configure:12966: checking return type of signal handlers" >&5
12966 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12967   echo $ac_n "(cached) $ac_c" 1>&6
12968 else
12969   cat > conftest.$ac_ext <<EOF
12970 #line 12971 "configure"
12971 #include "confdefs.h"
12972 #include <sys/types.h>
12973 #include <signal.h>
12974 #ifdef signal
12975 #undef signal
12976 #endif
12977 #ifdef __cplusplus
12978 extern "C" void (*signal (int, void (*)(int)))(int);
12979 #else
12980 void (*signal ()) ();
12981 #endif
12982
12983 int main() {
12984 int i;
12985 ; return 0; }
12986 EOF
12987 if { (eval echo configure:12988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12988   rm -rf conftest*
12989   ac_cv_type_signal=void
12990 else
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -rf conftest*
12994   ac_cv_type_signal=int
12995 fi
12996 rm -f conftest*
12997 fi
12998
12999 echo "$ac_t""$ac_cv_type_signal" 1>&6
13000 cat >> confdefs.h <<EOF
13001 #define RETSIGTYPE $ac_cv_type_signal
13002 EOF
13003
13004
13005 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13006 echo "configure:13007: checking for sig_atomic_t" >&5
13007 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
13008   echo $ac_n "(cached) $ac_c" 1>&6
13009 else
13010   cat > conftest.$ac_ext <<EOF
13011 #line 13012 "configure"
13012 #include "confdefs.h"
13013 #include <signal.h>
13014 int main() {
13015 sig_atomic_t atomic;
13016 ; return 0; }
13017 EOF
13018 if { (eval echo configure:13019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13019   rm -rf conftest*
13020   ol_cv_type_sig_atomic_t=yes
13021 else
13022   echo "configure: failed program was:" >&5
13023   cat conftest.$ac_ext >&5
13024   rm -rf conftest*
13025   ol_cv_type_sig_atomic_t=no
13026 fi
13027 rm -f conftest*
13028 fi
13029
13030 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13031   if test $ol_cv_type_sig_atomic_t = no; then
13032     cat >> confdefs.h <<\EOF
13033 #define sig_atomic_t int
13034 EOF
13035
13036   fi
13037  
13038 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13039 echo "configure:13040: checking for size_t" >&5
13040 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13041   echo $ac_n "(cached) $ac_c" 1>&6
13042 else
13043   cat > conftest.$ac_ext <<EOF
13044 #line 13045 "configure"
13045 #include "confdefs.h"
13046 #include <sys/types.h>
13047 #if STDC_HEADERS
13048 #include <stdlib.h>
13049 #include <stddef.h>
13050 #endif
13051 EOF
13052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13053   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13054   rm -rf conftest*
13055   eval "ac_cv_type_size_t=yes"
13056 else
13057   rm -rf conftest*
13058   eval "ac_cv_type_size_t=no"
13059 fi
13060 rm -f conftest*
13061
13062 fi
13063 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13064   echo "$ac_t""yes" 1>&6
13065 else
13066   echo "$ac_t""no" 1>&6
13067   cat >> confdefs.h <<EOF
13068 #define size_t unsigned
13069 EOF
13070
13071 fi
13072
13073 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13074 echo "configure:13075: checking for socklen_t" >&5
13075 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13076   echo $ac_n "(cached) $ac_c" 1>&6
13077 else
13078   cat > conftest.$ac_ext <<EOF
13079 #line 13080 "configure"
13080 #include "confdefs.h"
13081
13082 #ifdef HAVE_SYS_TYPES_H
13083 #include <sys/types.h>
13084 #endif
13085 #ifdef HAVE_SYS_SOCKET_H
13086 #include <sys/socket.h>
13087 #endif
13088
13089 int main() {
13090 socklen_t len;
13091 ; return 0; }
13092 EOF
13093 if { (eval echo configure:13094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13094   rm -rf conftest*
13095   ol_cv_type_socklen_t=yes
13096 else
13097   echo "configure: failed program was:" >&5
13098   cat conftest.$ac_ext >&5
13099   rm -rf conftest*
13100   ol_cv_type_socklen_t=no
13101 fi
13102 rm -f conftest*
13103 fi
13104
13105 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13106   if test $ol_cv_type_socklen_t = no; then
13107     cat >> confdefs.h <<\EOF
13108 #define socklen_t int
13109 EOF
13110
13111   fi
13112  
13113 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13114 echo "configure:13115: checking for member st_blksize in aggregate type struct stat" >&5
13115 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13116   echo $ac_n "(cached) $ac_c" 1>&6
13117 else
13118   cat > conftest.$ac_ext <<EOF
13119 #line 13120 "configure"
13120 #include "confdefs.h"
13121 #include <sys/types.h>
13122 #include <sys/stat.h>
13123 int main() {
13124 struct stat foo; foo.st_blksize;
13125 ; return 0; }
13126 EOF
13127 if { (eval echo configure:13128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13128   rm -rf conftest*
13129   ac_cv_c_struct_member_st_blksize=yes
13130 else
13131   echo "configure: failed program was:" >&5
13132   cat conftest.$ac_ext >&5
13133   rm -rf conftest*
13134   ac_cv_c_struct_member_st_blksize=no
13135 fi
13136 rm -f conftest*
13137 fi
13138
13139 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13140 st_blksize="$ac_cv_c_struct_member_st_blksize"
13141 if test $ac_cv_c_struct_member_st_blksize = yes; then
13142   cat >> confdefs.h <<\EOF
13143 #define HAVE_ST_BLKSIZE 1
13144 EOF
13145
13146 fi
13147
13148 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13149 echo "configure:13150: checking whether time.h and sys/time.h may both be included" >&5
13150 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13151   echo $ac_n "(cached) $ac_c" 1>&6
13152 else
13153   cat > conftest.$ac_ext <<EOF
13154 #line 13155 "configure"
13155 #include "confdefs.h"
13156 #include <sys/types.h>
13157 #include <sys/time.h>
13158 #include <time.h>
13159 int main() {
13160 struct tm *tp;
13161 ; return 0; }
13162 EOF
13163 if { (eval echo configure:13164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13164   rm -rf conftest*
13165   ac_cv_header_time=yes
13166 else
13167   echo "configure: failed program was:" >&5
13168   cat conftest.$ac_ext >&5
13169   rm -rf conftest*
13170   ac_cv_header_time=no
13171 fi
13172 rm -f conftest*
13173 fi
13174
13175 echo "$ac_t""$ac_cv_header_time" 1>&6
13176 if test $ac_cv_header_time = yes; then
13177   cat >> confdefs.h <<\EOF
13178 #define TIME_WITH_SYS_TIME 1
13179 EOF
13180
13181 fi
13182
13183 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13184 echo "configure:13185: checking whether struct tm is in sys/time.h or time.h" >&5
13185 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13186   echo $ac_n "(cached) $ac_c" 1>&6
13187 else
13188   cat > conftest.$ac_ext <<EOF
13189 #line 13190 "configure"
13190 #include "confdefs.h"
13191 #include <sys/types.h>
13192 #include <time.h>
13193 int main() {
13194 struct tm *tp; tp->tm_sec;
13195 ; return 0; }
13196 EOF
13197 if { (eval echo configure:13198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13198   rm -rf conftest*
13199   ac_cv_struct_tm=time.h
13200 else
13201   echo "configure: failed program was:" >&5
13202   cat conftest.$ac_ext >&5
13203   rm -rf conftest*
13204   ac_cv_struct_tm=sys/time.h
13205 fi
13206 rm -f conftest*
13207 fi
13208
13209 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13210 if test $ac_cv_struct_tm = sys/time.h; then
13211   cat >> confdefs.h <<\EOF
13212 #define TM_IN_SYS_TIME 1
13213 EOF
13214
13215 fi
13216
13217 # test for pw_gecos in struct passwd
13218 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13219 echo "configure:13220: checking struct passwd for pw_gecos" >&5
13220 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13221   echo $ac_n "(cached) $ac_c" 1>&6
13222 else
13223   
13224         cat > conftest.$ac_ext <<EOF
13225 #line 13226 "configure"
13226 #include "confdefs.h"
13227 #include <pwd.h>
13228 int main() {
13229
13230         struct passwd pwd;
13231         pwd.pw_gecos = pwd.pw_name;
13232
13233 ; return 0; }
13234 EOF
13235 if { (eval echo configure:13236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13236   rm -rf conftest*
13237   ol_cv_struct_passwd_pw_gecos=yes
13238 else
13239   echo "configure: failed program was:" >&5
13240   cat conftest.$ac_ext >&5
13241   rm -rf conftest*
13242   ol_cv_struct_passwd_pw_gecos=no
13243 fi
13244 rm -f conftest*
13245 fi
13246
13247 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13248 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13249         cat >> confdefs.h <<\EOF
13250 #define HAVE_PW_GECOS 1
13251 EOF
13252
13253 fi
13254
13255 # test for pw_passwd in struct passwd
13256 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13257 echo "configure:13258: checking struct passwd for pw_passwd" >&5
13258 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13259   echo $ac_n "(cached) $ac_c" 1>&6
13260 else
13261   
13262         cat > conftest.$ac_ext <<EOF
13263 #line 13264 "configure"
13264 #include "confdefs.h"
13265 #include <pwd.h>
13266 int main() {
13267
13268         struct passwd pwd;
13269         pwd.pw_passwd = pwd.pw_name;
13270
13271 ; return 0; }
13272 EOF
13273 if { (eval echo configure:13274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13274   rm -rf conftest*
13275   ol_cv_struct_passwd_pw_passwd=yes
13276 else
13277   echo "configure: failed program was:" >&5
13278   cat conftest.$ac_ext >&5
13279   rm -rf conftest*
13280   ol_cv_struct_passwd_pw_passwd=no
13281 fi
13282 rm -f conftest*
13283 fi
13284
13285 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13286 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13287         cat >> confdefs.h <<\EOF
13288 #define HAVE_PW_PASSWD 1
13289 EOF
13290
13291 fi
13292
13293
13294 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13295 echo "configure:13296: checking if toupper() requires islower()" >&5
13296 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13297   echo $ac_n "(cached) $ac_c" 1>&6
13298 else
13299   
13300         if test "$cross_compiling" = yes; then
13301   ol_cv_c_upper_lower=safe
13302 else
13303   cat > conftest.$ac_ext <<EOF
13304 #line 13305 "configure"
13305 #include "confdefs.h"
13306
13307 #include <ctype.h>
13308 main()
13309 {
13310         if ('C' == toupper('C'))
13311                 exit(0);
13312         else
13313                 exit(1);
13314 }
13315 EOF
13316 if { (eval echo configure:13317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13317 then
13318   ol_cv_c_upper_lower=no
13319 else
13320   echo "configure: failed program was:" >&5
13321   cat conftest.$ac_ext >&5
13322   rm -fr conftest*
13323   ol_cv_c_upper_lower=yes
13324 fi
13325 rm -fr conftest*
13326 fi
13327
13328 fi
13329
13330 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13331 if test $ol_cv_c_upper_lower != no ; then
13332         cat >> confdefs.h <<\EOF
13333 #define C_UPPER_LOWER 1
13334 EOF
13335
13336 fi
13337
13338 echo $ac_n "checking for working const""... $ac_c" 1>&6
13339 echo "configure:13340: checking for working const" >&5
13340 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13341   echo $ac_n "(cached) $ac_c" 1>&6
13342 else
13343   cat > conftest.$ac_ext <<EOF
13344 #line 13345 "configure"
13345 #include "confdefs.h"
13346
13347 int main() {
13348
13349 /* Ultrix mips cc rejects this.  */
13350 typedef int charset[2]; const charset x;
13351 /* SunOS 4.1.1 cc rejects this.  */
13352 char const *const *ccp;
13353 char **p;
13354 /* NEC SVR4.0.2 mips cc rejects this.  */
13355 struct point {int x, y;};
13356 static struct point const zero = {0,0};
13357 /* AIX XL C 1.02.0.0 rejects this.
13358    It does not let you subtract one const X* pointer from another in an arm
13359    of an if-expression whose if-part is not a constant expression */
13360 const char *g = "string";
13361 ccp = &g + (g ? g-g : 0);
13362 /* HPUX 7.0 cc rejects these. */
13363 ++ccp;
13364 p = (char**) ccp;
13365 ccp = (char const *const *) p;
13366 { /* SCO 3.2v4 cc rejects this.  */
13367   char *t;
13368   char const *s = 0 ? (char *) 0 : (char const *) 0;
13369
13370   *t++ = 0;
13371 }
13372 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13373   int x[] = {25, 17};
13374   const int *foo = &x[0];
13375   ++foo;
13376 }
13377 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13378   typedef const int *iptr;
13379   iptr p = 0;
13380   ++p;
13381 }
13382 { /* AIX XL C 1.02.0.0 rejects this saying
13383      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13384   struct s { int j; const int *ap[3]; };
13385   struct s *b; b->j = 5;
13386 }
13387 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13388   const int foo = 10;
13389 }
13390
13391 ; return 0; }
13392 EOF
13393 if { (eval echo configure:13394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13394   rm -rf conftest*
13395   ac_cv_c_const=yes
13396 else
13397   echo "configure: failed program was:" >&5
13398   cat conftest.$ac_ext >&5
13399   rm -rf conftest*
13400   ac_cv_c_const=no
13401 fi
13402 rm -f conftest*
13403 fi
13404
13405 echo "$ac_t""$ac_cv_c_const" 1>&6
13406 if test $ac_cv_c_const = no; then
13407   cat >> confdefs.h <<\EOF
13408 #define const 
13409 EOF
13410
13411 fi
13412
13413 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13414 echo "configure:13415: checking if compiler understands volatile" >&5
13415 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13416   echo $ac_n "(cached) $ac_c" 1>&6
13417 else
13418   cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421 int x, y, z;
13422 int main() {
13423 volatile int a; int * volatile b = x ? &y : &z;
13424       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13425       *b = 0;
13426 ; return 0; }
13427 EOF
13428 if { (eval echo configure:13429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13429   rm -rf conftest*
13430   ol_cv_c_volatile=yes
13431 else
13432   echo "configure: failed program was:" >&5
13433   cat conftest.$ac_ext >&5
13434   rm -rf conftest*
13435   ol_cv_c_volatile=no
13436 fi
13437 rm -f conftest*
13438 fi
13439
13440 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13441   if test $ol_cv_c_volatile = yes; then
13442     : 
13443   else
13444     cat >> confdefs.h <<\EOF
13445 #define volatile 
13446 EOF
13447
13448   fi
13449  
13450
13451 if test $cross_compiling = yes ; then
13452         cat >> confdefs.h <<\EOF
13453 #define CROSS_COMPILING 1
13454 EOF
13455
13456
13457         cat >> confdefs.h <<\EOF
13458 #define LBER_INT_T long
13459 EOF
13460
13461         cat >> confdefs.h <<\EOF
13462 #define LBER_TAG_T long
13463 EOF
13464
13465         cat >> confdefs.h <<\EOF
13466 #define LBER_SOCKET_T int
13467 EOF
13468
13469
13470 else
13471         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13472 echo "configure:13473: checking whether byte ordering is bigendian" >&5
13473 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13474   echo $ac_n "(cached) $ac_c" 1>&6
13475 else
13476   ac_cv_c_bigendian=unknown
13477 # See if sys/param.h defines the BYTE_ORDER macro.
13478 cat > conftest.$ac_ext <<EOF
13479 #line 13480 "configure"
13480 #include "confdefs.h"
13481 #include <sys/types.h>
13482 #include <sys/param.h>
13483 int main() {
13484
13485 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13486  bogus endian macros
13487 #endif
13488 ; return 0; }
13489 EOF
13490 if { (eval echo configure:13491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13491   rm -rf conftest*
13492   # It does; now see whether it defined to BIG_ENDIAN or not.
13493 cat > conftest.$ac_ext <<EOF
13494 #line 13495 "configure"
13495 #include "confdefs.h"
13496 #include <sys/types.h>
13497 #include <sys/param.h>
13498 int main() {
13499
13500 #if BYTE_ORDER != BIG_ENDIAN
13501  not big endian
13502 #endif
13503 ; return 0; }
13504 EOF
13505 if { (eval echo configure:13506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13506   rm -rf conftest*
13507   ac_cv_c_bigendian=yes
13508 else
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -rf conftest*
13512   ac_cv_c_bigendian=no
13513 fi
13514 rm -f conftest*
13515 else
13516   echo "configure: failed program was:" >&5
13517   cat conftest.$ac_ext >&5
13518 fi
13519 rm -f conftest*
13520 if test $ac_cv_c_bigendian = unknown; then
13521 if test "$cross_compiling" = yes; then
13522     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13523 else
13524   cat > conftest.$ac_ext <<EOF
13525 #line 13526 "configure"
13526 #include "confdefs.h"
13527 main () {
13528   /* Are we little or big endian?  From Harbison&Steele.  */
13529   union
13530   {
13531     long l;
13532     char c[sizeof (long)];
13533   } u;
13534   u.l = 1;
13535   exit (u.c[sizeof (long) - 1] == 1);
13536 }
13537 EOF
13538 if { (eval echo configure:13539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13539 then
13540   ac_cv_c_bigendian=no
13541 else
13542   echo "configure: failed program was:" >&5
13543   cat conftest.$ac_ext >&5
13544   rm -fr conftest*
13545   ac_cv_c_bigendian=yes
13546 fi
13547 rm -fr conftest*
13548 fi
13549
13550 fi
13551 fi
13552
13553 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13554 if test $ac_cv_c_bigendian = yes; then
13555   cat >> confdefs.h <<\EOF
13556 #define WORDS_BIGENDIAN 1
13557 EOF
13558
13559 fi
13560
13561         echo $ac_n "checking size of short""... $ac_c" 1>&6
13562 echo "configure:13563: checking size of short" >&5
13563 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13564   echo $ac_n "(cached) $ac_c" 1>&6
13565 else
13566   if test "$cross_compiling" = yes; then
13567     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13568 else
13569   cat > conftest.$ac_ext <<EOF
13570 #line 13571 "configure"
13571 #include "confdefs.h"
13572 #include <stdio.h>
13573 main()
13574 {
13575   FILE *f=fopen("conftestval", "w");
13576   if (!f) exit(1);
13577   fprintf(f, "%d\n", sizeof(short));
13578   exit(0);
13579 }
13580 EOF
13581 if { (eval echo configure:13582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13582 then
13583   ac_cv_sizeof_short=`cat conftestval`
13584 else
13585   echo "configure: failed program was:" >&5
13586   cat conftest.$ac_ext >&5
13587   rm -fr conftest*
13588   ac_cv_sizeof_short=0
13589 fi
13590 rm -fr conftest*
13591 fi
13592
13593 fi
13594 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13595 cat >> confdefs.h <<EOF
13596 #define SIZEOF_SHORT $ac_cv_sizeof_short
13597 EOF
13598
13599  
13600         echo $ac_n "checking size of int""... $ac_c" 1>&6
13601 echo "configure:13602: checking size of int" >&5
13602 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13603   echo $ac_n "(cached) $ac_c" 1>&6
13604 else
13605   if test "$cross_compiling" = yes; then
13606     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13607 else
13608   cat > conftest.$ac_ext <<EOF
13609 #line 13610 "configure"
13610 #include "confdefs.h"
13611 #include <stdio.h>
13612 main()
13613 {
13614   FILE *f=fopen("conftestval", "w");
13615   if (!f) exit(1);
13616   fprintf(f, "%d\n", sizeof(int));
13617   exit(0);
13618 }
13619 EOF
13620 if { (eval echo configure:13621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13621 then
13622   ac_cv_sizeof_int=`cat conftestval`
13623 else
13624   echo "configure: failed program was:" >&5
13625   cat conftest.$ac_ext >&5
13626   rm -fr conftest*
13627   ac_cv_sizeof_int=0
13628 fi
13629 rm -fr conftest*
13630 fi
13631
13632 fi
13633 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13634 cat >> confdefs.h <<EOF
13635 #define SIZEOF_INT $ac_cv_sizeof_int
13636 EOF
13637
13638  
13639         echo $ac_n "checking size of long""... $ac_c" 1>&6
13640 echo "configure:13641: checking size of long" >&5
13641 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13642   echo $ac_n "(cached) $ac_c" 1>&6
13643 else
13644   if test "$cross_compiling" = yes; then
13645     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13646 else
13647   cat > conftest.$ac_ext <<EOF
13648 #line 13649 "configure"
13649 #include "confdefs.h"
13650 #include <stdio.h>
13651 main()
13652 {
13653   FILE *f=fopen("conftestval", "w");
13654   if (!f) exit(1);
13655   fprintf(f, "%d\n", sizeof(long));
13656   exit(0);
13657 }
13658 EOF
13659 if { (eval echo configure:13660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13660 then
13661   ac_cv_sizeof_long=`cat conftestval`
13662 else
13663   echo "configure: failed program was:" >&5
13664   cat conftest.$ac_ext >&5
13665   rm -fr conftest*
13666   ac_cv_sizeof_long=0
13667 fi
13668 rm -fr conftest*
13669 fi
13670
13671 fi
13672 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13673 cat >> confdefs.h <<EOF
13674 #define SIZEOF_LONG $ac_cv_sizeof_long
13675 EOF
13676
13677
13678
13679         if test "$ac_cv_sizeof_int" -lt 4 ; then
13680                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13681
13682                 cat >> confdefs.h <<\EOF
13683 #define LBER_INT_T long
13684 EOF
13685
13686                 cat >> confdefs.h <<\EOF
13687 #define LBER_TAG_T long
13688 EOF
13689
13690                 cat >> confdefs.h <<\EOF
13691 #define LBER_SOCKET_T int
13692 EOF
13693
13694         else
13695                 cat >> confdefs.h <<\EOF
13696 #define LBER_INT_T int
13697 EOF
13698
13699                 cat >> confdefs.h <<\EOF
13700 #define LBER_TAG_T long
13701 EOF
13702
13703                 cat >> confdefs.h <<\EOF
13704 #define LBER_SOCKET_T int
13705 EOF
13706
13707         fi
13708 fi
13709
13710 cat >> confdefs.h <<\EOF
13711 #define LBER_LEN_T long
13712 EOF
13713
13714
13715 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13716 echo "configure:13717: checking for 8-bit clean memcmp" >&5
13717 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13718   echo $ac_n "(cached) $ac_c" 1>&6
13719 else
13720   if test "$cross_compiling" = yes; then
13721   ac_cv_func_memcmp_clean=no
13722 else
13723   cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726
13727 main()
13728 {
13729   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13730   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13731 }
13732
13733 EOF
13734 if { (eval echo configure:13735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13735 then
13736   ac_cv_func_memcmp_clean=yes
13737 else
13738   echo "configure: failed program was:" >&5
13739   cat conftest.$ac_ext >&5
13740   rm -fr conftest*
13741   ac_cv_func_memcmp_clean=no
13742 fi
13743 rm -fr conftest*
13744 fi
13745
13746 fi
13747
13748 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13749 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13750
13751 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13752 echo "configure:13753: checking for strftime" >&5
13753 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13754   echo $ac_n "(cached) $ac_c" 1>&6
13755 else
13756   cat > conftest.$ac_ext <<EOF
13757 #line 13758 "configure"
13758 #include "confdefs.h"
13759 /* System header to define __stub macros and hopefully few prototypes,
13760     which can conflict with char strftime(); below.  */
13761 #include <assert.h>
13762 /* Override any gcc2 internal prototype to avoid an error.  */
13763 /* We use char because int might match the return type of a gcc2
13764     builtin and then its argument prototype would still apply.  */
13765 char strftime();
13766 char (*f)();
13767
13768 int main() {
13769
13770 /* The GNU C library defines this for functions which it implements
13771     to always fail with ENOSYS.  Some functions are actually named
13772     something starting with __ and the normal name is an alias.  */
13773 #if defined (__stub_strftime) || defined (__stub___strftime)
13774 choke me
13775 #else
13776 f = strftime;
13777 #endif
13778
13779 ; return 0; }
13780 EOF
13781 if { (eval echo configure:13782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13782   rm -rf conftest*
13783   eval "ac_cv_func_strftime=yes"
13784 else
13785   echo "configure: failed program was:" >&5
13786   cat conftest.$ac_ext >&5
13787   rm -rf conftest*
13788   eval "ac_cv_func_strftime=no"
13789 fi
13790 rm -f conftest*
13791 fi
13792
13793 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13794   echo "$ac_t""yes" 1>&6
13795   cat >> confdefs.h <<\EOF
13796 #define HAVE_STRFTIME 1
13797 EOF
13798
13799 else
13800   echo "$ac_t""no" 1>&6
13801 # strftime is in -lintl on SCO UNIX.
13802 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13803 echo "configure:13804: checking for strftime in -lintl" >&5
13804 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13806   echo $ac_n "(cached) $ac_c" 1>&6
13807 else
13808   ac_save_LIBS="$LIBS"
13809 LIBS="-lintl  $LIBS"
13810 cat > conftest.$ac_ext <<EOF
13811 #line 13812 "configure"
13812 #include "confdefs.h"
13813 /* Override any gcc2 internal prototype to avoid an error.  */
13814 /* We use char because int might match the return type of a gcc2
13815     builtin and then its argument prototype would still apply.  */
13816 char strftime();
13817
13818 int main() {
13819 strftime()
13820 ; return 0; }
13821 EOF
13822 if { (eval echo configure:13823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13823   rm -rf conftest*
13824   eval "ac_cv_lib_$ac_lib_var=yes"
13825 else
13826   echo "configure: failed program was:" >&5
13827   cat conftest.$ac_ext >&5
13828   rm -rf conftest*
13829   eval "ac_cv_lib_$ac_lib_var=no"
13830 fi
13831 rm -f conftest*
13832 LIBS="$ac_save_LIBS"
13833
13834 fi
13835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13836   echo "$ac_t""yes" 1>&6
13837   cat >> confdefs.h <<\EOF
13838 #define HAVE_STRFTIME 1
13839 EOF
13840
13841 LIBS="-lintl $LIBS"
13842 else
13843   echo "$ac_t""no" 1>&6
13844 fi
13845
13846 fi
13847
13848
13849 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13850 echo "configure:13851: checking for inet_aton()" >&5
13851 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13852   echo $ac_n "(cached) $ac_c" 1>&6
13853 else
13854   cat > conftest.$ac_ext <<EOF
13855 #line 13856 "configure"
13856 #include "confdefs.h"
13857
13858 #ifdef HAVE_SYS_TYPES_H
13859 #       include <sys/types.h>
13860 #endif
13861 #ifdef HAVE_SYS_SOCKET_H
13862 #       include <sys/socket.h>
13863 #       ifdef HAVE_SYS_SELECT_H
13864 #               include <sys/select.h>
13865 #       endif
13866 #       include <netinet/in.h>
13867 #       ifdef HAVE_ARPA_INET_H
13868 #               include <arpa/inet.h>
13869 #       endif
13870 #endif
13871
13872 int main() {
13873 struct in_addr in;
13874 int rc = inet_aton( "255.255.255.255", &in );
13875 ; return 0; }
13876 EOF
13877 if { (eval echo configure:13878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13878   rm -rf conftest*
13879   ol_cv_func_inet_aton=yes
13880 else
13881   echo "configure: failed program was:" >&5
13882   cat conftest.$ac_ext >&5
13883   rm -rf conftest*
13884   ol_cv_func_inet_aton=no
13885 fi
13886 rm -f conftest*
13887 fi
13888
13889 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13890   if test $ol_cv_func_inet_aton != no; then
13891     cat >> confdefs.h <<\EOF
13892 #define HAVE_INET_ATON 1
13893 EOF
13894
13895   fi
13896  
13897
13898 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13899 echo "configure:13900: checking for vprintf" >&5
13900 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13901   echo $ac_n "(cached) $ac_c" 1>&6
13902 else
13903   cat > conftest.$ac_ext <<EOF
13904 #line 13905 "configure"
13905 #include "confdefs.h"
13906 /* System header to define __stub macros and hopefully few prototypes,
13907     which can conflict with char vprintf(); below.  */
13908 #include <assert.h>
13909 /* Override any gcc2 internal prototype to avoid an error.  */
13910 /* We use char because int might match the return type of a gcc2
13911     builtin and then its argument prototype would still apply.  */
13912 char vprintf();
13913 char (*f)();
13914
13915 int main() {
13916
13917 /* The GNU C library defines this for functions which it implements
13918     to always fail with ENOSYS.  Some functions are actually named
13919     something starting with __ and the normal name is an alias.  */
13920 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13921 choke me
13922 #else
13923 f = vprintf;
13924 #endif
13925
13926 ; return 0; }
13927 EOF
13928 if { (eval echo configure:13929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13929   rm -rf conftest*
13930   eval "ac_cv_func_vprintf=yes"
13931 else
13932   echo "configure: failed program was:" >&5
13933   cat conftest.$ac_ext >&5
13934   rm -rf conftest*
13935   eval "ac_cv_func_vprintf=no"
13936 fi
13937 rm -f conftest*
13938 fi
13939
13940 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13941   echo "$ac_t""yes" 1>&6
13942   cat >> confdefs.h <<\EOF
13943 #define HAVE_VPRINTF 1
13944 EOF
13945
13946 else
13947   echo "$ac_t""no" 1>&6
13948 fi
13949
13950 if test "$ac_cv_func_vprintf" != yes; then
13951 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13952 echo "configure:13953: checking for _doprnt" >&5
13953 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13954   echo $ac_n "(cached) $ac_c" 1>&6
13955 else
13956   cat > conftest.$ac_ext <<EOF
13957 #line 13958 "configure"
13958 #include "confdefs.h"
13959 /* System header to define __stub macros and hopefully few prototypes,
13960     which can conflict with char _doprnt(); below.  */
13961 #include <assert.h>
13962 /* Override any gcc2 internal prototype to avoid an error.  */
13963 /* We use char because int might match the return type of a gcc2
13964     builtin and then its argument prototype would still apply.  */
13965 char _doprnt();
13966 char (*f)();
13967
13968 int main() {
13969
13970 /* The GNU C library defines this for functions which it implements
13971     to always fail with ENOSYS.  Some functions are actually named
13972     something starting with __ and the normal name is an alias.  */
13973 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13974 choke me
13975 #else
13976 f = _doprnt;
13977 #endif
13978
13979 ; return 0; }
13980 EOF
13981 if { (eval echo configure:13982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13982   rm -rf conftest*
13983   eval "ac_cv_func__doprnt=yes"
13984 else
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -rf conftest*
13988   eval "ac_cv_func__doprnt=no"
13989 fi
13990 rm -f conftest*
13991 fi
13992
13993 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13994   echo "$ac_t""yes" 1>&6
13995   cat >> confdefs.h <<\EOF
13996 #define HAVE_DOPRNT 1
13997 EOF
13998
13999 else
14000   echo "$ac_t""no" 1>&6
14001 fi
14002
14003 fi
14004
14005
14006 if test $ac_cv_func_vprintf = yes ; then
14007                 for ac_func in vsnprintf vsprintf
14008 do
14009 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14010 echo "configure:14011: checking for $ac_func" >&5
14011 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14012   echo $ac_n "(cached) $ac_c" 1>&6
14013 else
14014   cat > conftest.$ac_ext <<EOF
14015 #line 14016 "configure"
14016 #include "confdefs.h"
14017 /* System header to define __stub macros and hopefully few prototypes,
14018     which can conflict with char $ac_func(); below.  */
14019 #include <assert.h>
14020 /* Override any gcc2 internal prototype to avoid an error.  */
14021 /* We use char because int might match the return type of a gcc2
14022     builtin and then its argument prototype would still apply.  */
14023 char $ac_func();
14024 char (*f)();
14025
14026 int main() {
14027
14028 /* The GNU C library defines this for functions which it implements
14029     to always fail with ENOSYS.  Some functions are actually named
14030     something starting with __ and the normal name is an alias.  */
14031 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14032 choke me
14033 #else
14034 f = $ac_func;
14035 #endif
14036
14037 ; return 0; }
14038 EOF
14039 if { (eval echo configure:14040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14040   rm -rf conftest*
14041   eval "ac_cv_func_$ac_func=yes"
14042 else
14043   echo "configure: failed program was:" >&5
14044   cat conftest.$ac_ext >&5
14045   rm -rf conftest*
14046   eval "ac_cv_func_$ac_func=no"
14047 fi
14048 rm -f conftest*
14049 fi
14050
14051 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14052   echo "$ac_t""yes" 1>&6
14053     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14054   cat >> confdefs.h <<EOF
14055 #define $ac_tr_func 1
14056 EOF
14057  
14058 else
14059   echo "$ac_t""no" 1>&6
14060 fi
14061 done
14062
14063 fi
14064
14065 for ac_func in \
14066         bcopy                   \
14067         closesocket             \
14068         endgrent                \
14069         endpwent                \
14070         flock                   \
14071         getdtablesize   \
14072         getgrgid                \
14073         gethostname             \
14074         getpass                 \
14075         getpwuid                \
14076         getpwnam                \
14077         getspnam                \
14078         gettimeofday    \
14079         initgroups              \
14080         lockf                   \
14081         memcpy                  \
14082         memmove                 \
14083         mkstemp                 \
14084         pipe                    \
14085         read                    \
14086         recv                    \
14087         recvfrom                \
14088         setpwfile               \
14089         setgid                  \
14090         setegid                 \
14091         setsid                  \
14092         setuid                  \
14093         seteuid                 \
14094         sigaction               \
14095         signal                  \
14096         sigset                  \
14097         snprintf                \
14098         strdup                  \
14099         strerror                \
14100         strpbrk                 \
14101         strrchr                 \
14102         strsep                  \
14103         strstr                  \
14104         strtol                  \
14105         strtoul                 \
14106         strspn                  \
14107         sysconf                 \
14108         waitpid                 \
14109         wait4                   \
14110         write                   \
14111         send                    \
14112         sendto                  \
14113
14114 do
14115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14116 echo "configure:14117: checking for $ac_func" >&5
14117 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14118   echo $ac_n "(cached) $ac_c" 1>&6
14119 else
14120   cat > conftest.$ac_ext <<EOF
14121 #line 14122 "configure"
14122 #include "confdefs.h"
14123 /* System header to define __stub macros and hopefully few prototypes,
14124     which can conflict with char $ac_func(); below.  */
14125 #include <assert.h>
14126 /* Override any gcc2 internal prototype to avoid an error.  */
14127 /* We use char because int might match the return type of a gcc2
14128     builtin and then its argument prototype would still apply.  */
14129 char $ac_func();
14130 char (*f)();
14131
14132 int main() {
14133
14134 /* The GNU C library defines this for functions which it implements
14135     to always fail with ENOSYS.  Some functions are actually named
14136     something starting with __ and the normal name is an alias.  */
14137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14138 choke me
14139 #else
14140 f = $ac_func;
14141 #endif
14142
14143 ; return 0; }
14144 EOF
14145 if { (eval echo configure:14146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14146   rm -rf conftest*
14147   eval "ac_cv_func_$ac_func=yes"
14148 else
14149   echo "configure: failed program was:" >&5
14150   cat conftest.$ac_ext >&5
14151   rm -rf conftest*
14152   eval "ac_cv_func_$ac_func=no"
14153 fi
14154 rm -f conftest*
14155 fi
14156
14157 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14158   echo "$ac_t""yes" 1>&6
14159     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14160   cat >> confdefs.h <<EOF
14161 #define $ac_tr_func 1
14162 EOF
14163  
14164 else
14165   echo "$ac_t""no" 1>&6
14166 fi
14167 done
14168
14169
14170 for ac_func in getopt tempnam
14171 do
14172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14173 echo "configure:14174: checking for $ac_func" >&5
14174 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14175   echo $ac_n "(cached) $ac_c" 1>&6
14176 else
14177   cat > conftest.$ac_ext <<EOF
14178 #line 14179 "configure"
14179 #include "confdefs.h"
14180 /* System header to define __stub macros and hopefully few prototypes,
14181     which can conflict with char $ac_func(); below.  */
14182 #include <assert.h>
14183 /* Override any gcc2 internal prototype to avoid an error.  */
14184 /* We use char because int might match the return type of a gcc2
14185     builtin and then its argument prototype would still apply.  */
14186 char $ac_func();
14187 char (*f)();
14188
14189 int main() {
14190
14191 /* The GNU C library defines this for functions which it implements
14192     to always fail with ENOSYS.  Some functions are actually named
14193     something starting with __ and the normal name is an alias.  */
14194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14195 choke me
14196 #else
14197 f = $ac_func;
14198 #endif
14199
14200 ; return 0; }
14201 EOF
14202 if { (eval echo configure:14203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14203   rm -rf conftest*
14204   eval "ac_cv_func_$ac_func=yes"
14205 else
14206   echo "configure: failed program was:" >&5
14207   cat conftest.$ac_ext >&5
14208   rm -rf conftest*
14209   eval "ac_cv_func_$ac_func=no"
14210 fi
14211 rm -f conftest*
14212 fi
14213
14214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14215   echo "$ac_t""yes" 1>&6
14216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14217   cat >> confdefs.h <<EOF
14218 #define $ac_tr_func 1
14219 EOF
14220  
14221 else
14222   echo "$ac_t""no" 1>&6
14223 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14224 fi
14225 done
14226
14227
14228
14229 # Check Configuration
14230 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14231 echo "configure:14232: checking declaration of sys_errlist" >&5
14232 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14233   echo $ac_n "(cached) $ac_c" 1>&6
14234 else
14235   
14236         cat > conftest.$ac_ext <<EOF
14237 #line 14238 "configure"
14238 #include "confdefs.h"
14239
14240 #include <stdio.h>
14241 #include <sys/types.h>
14242 #include <errno.h> 
14243 int main() {
14244 char *c = (char *) *sys_errlist
14245 ; return 0; }
14246 EOF
14247 if { (eval echo configure:14248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14248   rm -rf conftest*
14249   ol_cv_dcl_sys_errlist=yes
14250         ol_cv_have_sys_errlist=yes
14251 else
14252   echo "configure: failed program was:" >&5
14253   cat conftest.$ac_ext >&5
14254   rm -rf conftest*
14255   ol_cv_dcl_sys_errlist=no
14256 fi
14257 rm -f conftest*
14258 fi
14259
14260 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14261 #
14262 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14263 if test $ol_cv_dcl_sys_errlist = no ; then
14264         cat >> confdefs.h <<\EOF
14265 #define DECL_SYS_ERRLIST 1
14266 EOF
14267
14268
14269         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14270 echo "configure:14271: checking existence of sys_errlist" >&5
14271 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14272   echo $ac_n "(cached) $ac_c" 1>&6
14273 else
14274   
14275                 cat > conftest.$ac_ext <<EOF
14276 #line 14277 "configure"
14277 #include "confdefs.h"
14278 #include <errno.h>
14279 int main() {
14280 char *c = (char *) *sys_errlist
14281 ; return 0; }
14282 EOF
14283 if { (eval echo configure:14284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14284   rm -rf conftest*
14285   ol_cv_have_sys_errlist=yes
14286 else
14287   echo "configure: failed program was:" >&5
14288   cat conftest.$ac_ext >&5
14289   rm -rf conftest*
14290   ol_cv_have_sys_errlist=no
14291 fi
14292 rm -f conftest*
14293 fi
14294
14295 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14296 fi
14297 if test $ol_cv_have_sys_errlist = yes ; then
14298         cat >> confdefs.h <<\EOF
14299 #define HAVE_SYS_ERRLIST 1
14300 EOF
14301
14302 fi
14303
14304
14305
14306 if test "$ol_enable_debug" != no ; then
14307         cat >> confdefs.h <<\EOF
14308 #define LDAP_DEBUG 1
14309 EOF
14310
14311 fi
14312 if test "$ol_enable_syslog" = yes ; then
14313         cat >> confdefs.h <<\EOF
14314 #define LDAP_SYSLOG 1
14315 EOF
14316
14317 fi
14318 if test "$ol_enable_libui" = yes ; then
14319         cat >> confdefs.h <<\EOF
14320 #define LDAP_LIBUI 1
14321 EOF
14322
14323 fi
14324 if test "$ol_enable_cache" = no ; then
14325         cat >> confdefs.h <<\EOF
14326 #define LDAP_NOCACHE 1
14327 EOF
14328
14329 fi
14330 if test "$ol_enable_dns" != no ; then
14331         cat >> confdefs.h <<\EOF
14332 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14333 EOF
14334
14335 fi
14336 if test "$ol_enable_proctitle" != no ; then
14337         cat >> confdefs.h <<\EOF
14338 #define LDAP_PROCTITLE 1
14339 EOF
14340
14341 fi
14342 if test "$ol_enable_referrals" != no ; then
14343         cat >> confdefs.h <<\EOF
14344 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14345 EOF
14346
14347 fi
14348 if test "$ol_enable_cldap" != no ; then
14349         cat >> confdefs.h <<\EOF
14350 #define LDAP_CONNECTIONLESS 1
14351 EOF
14352
14353 fi
14354
14355 if test "$ol_enable_crypt" != no ; then
14356         cat >> confdefs.h <<\EOF
14357 #define SLAPD_CRYPT 1
14358 EOF
14359
14360 fi
14361 if test "$ol_enable_cleartext" != no ; then
14362         cat >> confdefs.h <<\EOF
14363 #define SLAPD_CLEARTEXT 1
14364 EOF
14365
14366 fi
14367 if test "$ol_enable_multimaster" != no ; then
14368         cat >> confdefs.h <<\EOF
14369 #define SLAPD_MULTIMASTER 1
14370 EOF
14371
14372 fi
14373 if test "$ol_enable_phonetic" != no ; then
14374         cat >> confdefs.h <<\EOF
14375 #define SLAPD_PHONETIC 1
14376 EOF
14377
14378 fi
14379 if test "$ol_enable_rlookups" != no ; then
14380         cat >> confdefs.h <<\EOF
14381 #define SLAPD_RLOOKUPS 1
14382 EOF
14383
14384 fi
14385 if test "$ol_enable_aci" != no ; then
14386         cat >> confdefs.h <<\EOF
14387 #define SLAPD_ACI_ENABLED 1
14388 EOF
14389
14390 fi
14391 if test "$ol_enable_discreteaci" != no ; then
14392         cat >> confdefs.h <<\EOF
14393 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14394 EOF
14395
14396 fi
14397
14398 if test "$ol_link_modules" != no ; then
14399         cat >> confdefs.h <<\EOF
14400 #define SLAPD_MODULES 1
14401 EOF
14402
14403         BUILD_SLAPD=yes
14404         MODULES_LIBS=-lltdl
14405         SLAPD_MODULES_LDFLAGS="-dlopen self"
14406 fi
14407
14408 if test "$ol_link_bdb2" != no ; then
14409         cat >> confdefs.h <<\EOF
14410 #define SLAPD_BDB2 1
14411 EOF
14412
14413         BUILD_SLAPD=yes
14414         BUILD_BDB2=yes
14415         if test "$ol_with_bdb2_module" != static ; then
14416                 cat >> confdefs.h <<\EOF
14417 #define SLAPD_BDB2_DYNAMIC 1
14418 EOF
14419
14420                 BUILD_BDB2=mod
14421                 BUILD_BDB2_DYNAMIC=shared
14422                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14423         fi
14424 fi
14425
14426 if test "$ol_enable_ldap" != no ; then
14427         cat >> confdefs.h <<\EOF
14428 #define SLAPD_LDAP 1
14429 EOF
14430
14431         BUILD_SLAPD=yes
14432         BUILD_LDAP=yes
14433         if test "$ol_with_ldap_module" != static ; then
14434                 cat >> confdefs.h <<\EOF
14435 #define SLAPD_LDAP_DYNAMIC 1
14436 EOF
14437
14438                 BUILD_LDAP=mod
14439                 BUILD_LDAP_DYNAMIC=shared
14440                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14441         fi
14442 fi
14443
14444 if test "$ol_link_ldbm" != no ; then
14445         cat >> confdefs.h <<\EOF
14446 #define SLAPD_LDBM 1
14447 EOF
14448
14449         BUILD_SLAPD=yes
14450         BUILD_LDBM=yes
14451         if test "$ol_with_ldbm_module" != static ; then
14452                 cat >> confdefs.h <<\EOF
14453 #define SLAPD_LDBM_DYNAMIC 1
14454 EOF
14455
14456                 BUILD_LDBM=mod
14457                 BUILD_LDBM_DYNAMIC=shared
14458                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14459         fi
14460 fi
14461
14462 if test "$ol_enable_passwd" != no ; then
14463         cat >> confdefs.h <<\EOF
14464 #define SLAPD_PASSWD 1
14465 EOF
14466
14467         BUILD_SLAPD=yes
14468         BUILD_PASSWD=yes
14469         if test "$ol_with_passwd_module" != static ; then
14470                 cat >> confdefs.h <<\EOF
14471 #define SLAPD_PASSWD_DYNAMIC 1
14472 EOF
14473
14474                 BUILD_PASSWD=mod
14475                 BUILD_PASSWD_DYNAMIC=shared
14476                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14477         fi
14478 fi
14479
14480 if test "$ol_link_perl" != no ; then
14481         cat >> confdefs.h <<\EOF
14482 #define SLAPD_PERL 1
14483 EOF
14484
14485         BUILD_SLAPD=yes
14486         BUILD_PERL=yes
14487         if test "$ol_with_perl_module" != static ; then
14488                 cat >> confdefs.h <<\EOF
14489 #define SLAPD_PERL_DYNAMIC 1
14490 EOF
14491
14492                 BUILD_PERL=mod
14493                 BUILD_PERL_DYNAMIC=shared
14494                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14495         fi
14496 fi
14497
14498 if test "$ol_enable_shell" != no ; then
14499         cat >> confdefs.h <<\EOF
14500 #define SLAPD_SHELL 1
14501 EOF
14502
14503         BUILD_SLAPD=yes
14504         BUILD_SHELL=yes
14505         if test "$ol_with_shell_module" != static ; then
14506                 cat >> confdefs.h <<\EOF
14507 #define SLAPD_SHELL_DYNAMIC 1
14508 EOF
14509
14510                 BUILD_SHELL=mod
14511                 BUILD_SHELL_DYNAMIC=shared
14512                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14513         fi
14514 fi
14515
14516 if test "$ol_enable_tcl" != no ; then
14517         cat >> confdefs.h <<\EOF
14518 #define SLAPD_TCL 1
14519 EOF
14520
14521         BUILD_SLAPD=yes
14522         BUILD_TCL=yes
14523         if test "$ol_with_tcl_module" != static; then
14524                 cat >> confdefs.h <<\EOF
14525 #define SLAPD_TCL_DYNAMIC 1
14526 EOF
14527
14528                 BUILD_TCL=mod
14529                 BUILD_TCL_DYNAMIC=shared
14530                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14531         fi
14532 fi
14533
14534 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14535         $BUILD_SLAPD = yes ; then
14536         BUILD_SLURPD=yes
14537 fi
14538
14539 if test "$ol_link_isode" != no ; then
14540         BUILD_LDAPD=yes
14541 fi
14542
14543
14544
14545
14546   
14547   
14548   
14549   
14550   
14551   
14552   
14553   
14554   
14555   
14556   
14557   
14558   
14559   
14560   
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591 trap '' 1 2 15
14592
14593 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14594
14595 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14596 # Let make expand exec_prefix.
14597 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14598
14599 # Any assignment to VPATH causes Sun make to only execute
14600 # the first set of double-colon rules, so remove it if not needed.
14601 # If there is a colon in the path, we need to keep it.
14602 if test "x$srcdir" = x.; then
14603   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14604 fi
14605
14606 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14607
14608 DEFS=-DHAVE_CONFIG_H
14609
14610 # Without the "./", some shells look in PATH for config.status.
14611 : ${CONFIG_STATUS=./config.status}
14612
14613 echo creating $CONFIG_STATUS
14614 rm -f $CONFIG_STATUS
14615 cat > $CONFIG_STATUS <<EOF
14616 #! /bin/sh
14617 # Generated automatically by configure.
14618 # Run this file to recreate the current configuration.
14619 # This directory was configured as follows,
14620 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14621 #
14622 # $0 $ac_configure_args
14623 #
14624 # Compiler output produced by configure, useful for debugging
14625 # configure, is in ./config.log if it exists.
14626
14627 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14628 for ac_option
14629 do
14630   case "\$ac_option" in
14631   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14632     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14633     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14634   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14635     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14636     exit 0 ;;
14637   -help | --help | --hel | --he | --h)
14638     echo "\$ac_cs_usage"; exit 0 ;;
14639   *) echo "\$ac_cs_usage"; exit 1 ;;
14640   esac
14641 done
14642
14643 ac_given_srcdir=$srcdir
14644 ac_given_INSTALL="$INSTALL"
14645
14646 trap 'rm -fr `echo "\
14647 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14648 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14649 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14650 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14651 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14652 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14653 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14654 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14655 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14656 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14657 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14658 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14659 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14660 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14661 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14662 include/Makefile:build/top.mk:include/Makefile.in \
14663 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14664 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14665 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14666 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14667 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14668 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14669 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14670 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14671 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14672 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14673 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14674 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14675 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14676 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14677 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14678 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14679 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14680 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14681 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14682 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14683 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14684 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14685 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14686 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14687 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14688 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14689  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14690 EOF
14691 cat >> $CONFIG_STATUS <<EOF
14692
14693 # Protect against being on the right side of a sed subst in config.status.
14694 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14695  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14696 $ac_vpsub
14697 $extrasub
14698 s%@SHELL@%$SHELL%g
14699 s%@CFLAGS@%$CFLAGS%g
14700 s%@CPPFLAGS@%$CPPFLAGS%g
14701 s%@CXXFLAGS@%$CXXFLAGS%g
14702 s%@FFLAGS@%$FFLAGS%g
14703 s%@DEFS@%$DEFS%g
14704 s%@LDFLAGS@%$LDFLAGS%g
14705 s%@LIBS@%$LIBS%g
14706 s%@exec_prefix@%$exec_prefix%g
14707 s%@prefix@%$prefix%g
14708 s%@program_transform_name@%$program_transform_name%g
14709 s%@bindir@%$bindir%g
14710 s%@sbindir@%$sbindir%g
14711 s%@libexecdir@%$libexecdir%g
14712 s%@datadir@%$datadir%g
14713 s%@sysconfdir@%$sysconfdir%g
14714 s%@sharedstatedir@%$sharedstatedir%g
14715 s%@localstatedir@%$localstatedir%g
14716 s%@libdir@%$libdir%g
14717 s%@includedir@%$includedir%g
14718 s%@oldincludedir@%$oldincludedir%g
14719 s%@infodir@%$infodir%g
14720 s%@mandir@%$mandir%g
14721 s%@host@%$host%g
14722 s%@host_alias@%$host_alias%g
14723 s%@host_cpu@%$host_cpu%g
14724 s%@host_vendor@%$host_vendor%g
14725 s%@host_os@%$host_os%g
14726 s%@target@%$target%g
14727 s%@target_alias@%$target_alias%g
14728 s%@target_cpu@%$target_cpu%g
14729 s%@target_vendor@%$target_vendor%g
14730 s%@target_os@%$target_os%g
14731 s%@build@%$build%g
14732 s%@build_alias@%$build_alias%g
14733 s%@build_cpu@%$build_cpu%g
14734 s%@build_vendor@%$build_vendor%g
14735 s%@build_os@%$build_os%g
14736 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14737 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14738 s%@INSTALL_DATA@%$INSTALL_DATA%g
14739 s%@PACKAGE@%$PACKAGE%g
14740 s%@VERSION@%$VERSION%g
14741 s%@ACLOCAL@%$ACLOCAL%g
14742 s%@AUTOCONF@%$AUTOCONF%g
14743 s%@AUTOMAKE@%$AUTOMAKE%g
14744 s%@AUTOHEADER@%$AUTOHEADER%g
14745 s%@MAKEINFO@%$MAKEINFO%g
14746 s%@install_sh@%$install_sh%g
14747 s%@AMTAR@%$AMTAR%g
14748 s%@AWK@%$AWK%g
14749 s%@AMTARFLAGS@%$AMTARFLAGS%g
14750 s%@SET_MAKE@%$SET_MAKE%g
14751 s%@top_builddir@%$top_builddir%g
14752 s%@ldap_subdir@%$ldap_subdir%g
14753 s%@CC@%$CC%g
14754 s%@RANLIB@%$RANLIB%g
14755 s%@LD@%$LD%g
14756 s%@NM@%$NM%g
14757 s%@LN_S@%$LN_S%g
14758 s%@LIBTOOL@%$LIBTOOL%g
14759 s%@LN_H@%$LN_H%g
14760 s%@SENDMAIL@%$SENDMAIL%g
14761 s%@EDITOR@%$EDITOR%g
14762 s%@FINGER@%$FINGER%g
14763 s%@PERLBIN@%$PERLBIN%g
14764 s%@CPP@%$CPP%g
14765 s%@EXEEXT@%$EXEEXT%g
14766 s%@OBJEXT@%$OBJEXT%g
14767 s%@OL_MKDEP@%$OL_MKDEP%g
14768 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14769 s%@PEPSY@%$PEPSY%g
14770 s%@LIBOBJS@%$LIBOBJS%g
14771 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14772 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14773 s%@BUILD_BDB2@%$BUILD_BDB2%g
14774 s%@BUILD_LDAP@%$BUILD_LDAP%g
14775 s%@BUILD_LDBM@%$BUILD_LDBM%g
14776 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14777 s%@BUILD_PERL@%$BUILD_PERL%g
14778 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14779 s%@BUILD_SHELL@%$BUILD_SHELL%g
14780 s%@BUILD_TCL@%$BUILD_TCL%g
14781 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14782 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14783 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14784 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14785 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14786 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14787 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14788 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14789 s%@LDAP_LIBS@%$LDAP_LIBS%g
14790 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14791 s%@LDIF_LIBS@%$LDIF_LIBS%g
14792 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14793 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14794 s%@LDBM_LIBS@%$LDBM_LIBS%g
14795 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14796 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14797 s%@WRAP_LIBS@%$WRAP_LIBS%g
14798 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
14799 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
14800 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14801 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14802 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14803 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
14804 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14805 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
14806 s%@KRB_LIBS@%$KRB_LIBS%g
14807 s%@READLINE_LIBS@%$READLINE_LIBS%g
14808 s%@SASL_LIBS@%$SASL_LIBS%g
14809 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14810 s%@TLS_LIBS@%$TLS_LIBS%g
14811 s%@MODULES_LIBS@%$MODULES_LIBS%g
14812
14813 CEOF
14814 EOF
14815
14816 cat >> $CONFIG_STATUS <<\EOF
14817
14818 # Split the substitutions into bite-sized pieces for seds with
14819 # small command number limits, like on Digital OSF/1 and HP-UX.
14820 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14821 ac_file=1 # Number of current file.
14822 ac_beg=1 # First line for current file.
14823 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14824 ac_more_lines=:
14825 ac_sed_cmds=""
14826 while $ac_more_lines; do
14827   if test $ac_beg -gt 1; then
14828     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14829   else
14830     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14831   fi
14832   if test ! -s conftest.s$ac_file; then
14833     ac_more_lines=false
14834     rm -f conftest.s$ac_file
14835   else
14836     if test -z "$ac_sed_cmds"; then
14837       ac_sed_cmds="sed -f conftest.s$ac_file"
14838     else
14839       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14840     fi
14841     ac_file=`expr $ac_file + 1`
14842     ac_beg=$ac_end
14843     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14844   fi
14845 done
14846 if test -z "$ac_sed_cmds"; then
14847   ac_sed_cmds=cat
14848 fi
14849 EOF
14850
14851 cat >> $CONFIG_STATUS <<EOF
14852
14853 CONFIG_FILES=\${CONFIG_FILES-"\
14854 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14855 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14856 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14857 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14858 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14859 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14860 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14861 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14862 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14863 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14864 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14865 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14866 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14867 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14868 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14869 include/Makefile:build/top.mk:include/Makefile.in \
14870 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14871 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14872 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14873 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14874 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14875 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14876 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14877 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14878 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14879 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14880 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14881 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14882 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14883 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14884 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14885 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14886 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14887 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14888 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14889 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14890 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14891 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14892 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14893 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14894 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14895 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14896 "}
14897 EOF
14898 cat >> $CONFIG_STATUS <<\EOF
14899 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14900   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14901   case "$ac_file" in
14902   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14903        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14904   *) ac_file_in="${ac_file}.in" ;;
14905   esac
14906
14907   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14908
14909   # Remove last slash and all that follows it.  Not all systems have dirname.
14910   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14911   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14912     # The file is in a subdirectory.
14913     test ! -d "$ac_dir" && mkdir "$ac_dir"
14914     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14915     # A "../" for each directory in $ac_dir_suffix.
14916     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14917   else
14918     ac_dir_suffix= ac_dots=
14919   fi
14920
14921   case "$ac_given_srcdir" in
14922   .)  srcdir=.
14923       if test -z "$ac_dots"; then top_srcdir=.
14924       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14925   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14926   *) # Relative path.
14927     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14928     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14929   esac
14930
14931   case "$ac_given_INSTALL" in
14932   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14933   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14934   esac
14935
14936   echo creating "$ac_file"
14937   rm -f "$ac_file"
14938   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14939   case "$ac_file" in
14940   *Makefile*) ac_comsub="1i\\
14941 # $configure_input" ;;
14942   *) ac_comsub= ;;
14943   esac
14944
14945   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14946   sed -e "$ac_comsub
14947 s%@configure_input@%$configure_input%g
14948 s%@srcdir@%$srcdir%g
14949 s%@top_srcdir@%$top_srcdir%g
14950 s%@INSTALL@%$INSTALL%g
14951 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14952 fi; done
14953 rm -f conftest.s*
14954
14955 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14956 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14957 #
14958 # ac_d sets the value in "#define NAME VALUE" lines.
14959 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14960 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14961 ac_dC='\3'
14962 ac_dD='%g'
14963 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14964 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14965 ac_uB='\([      ]\)%\1#\2define\3'
14966 ac_uC=' '
14967 ac_uD='\4%g'
14968 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14969 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14970 ac_eB='$%\1#\2define\3'
14971 ac_eC=' '
14972 ac_eD='%g'
14973
14974 if test "${CONFIG_HEADERS+set}" != set; then
14975 EOF
14976 cat >> $CONFIG_STATUS <<EOF
14977   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14978 EOF
14979 cat >> $CONFIG_STATUS <<\EOF
14980 fi
14981 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14982   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14983   case "$ac_file" in
14984   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14985        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14986   *) ac_file_in="${ac_file}.in" ;;
14987   esac
14988
14989   echo creating $ac_file
14990
14991   rm -f conftest.frag conftest.in conftest.out
14992   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14993   cat $ac_file_inputs > conftest.in
14994
14995 EOF
14996
14997 # Transform confdefs.h into a sed script conftest.vals that substitutes
14998 # the proper values into config.h.in to produce config.h.  And first:
14999 # Protect against being on the right side of a sed subst in config.status.
15000 # Protect against being in an unquoted here document in config.status.
15001 rm -f conftest.vals
15002 cat > conftest.hdr <<\EOF
15003 s/[\\&%]/\\&/g
15004 s%[\\$`]%\\&%g
15005 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15006 s%ac_d%ac_u%gp
15007 s%ac_u%ac_e%gp
15008 EOF
15009 sed -n -f conftest.hdr confdefs.h > conftest.vals
15010 rm -f conftest.hdr
15011
15012 # This sed command replaces #undef with comments.  This is necessary, for
15013 # example, in the case of _POSIX_SOURCE, which is predefined and required
15014 # on some systems where configure will not decide to define it.
15015 cat >> conftest.vals <<\EOF
15016 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15017 EOF
15018
15019 # Break up conftest.vals because some shells have a limit on
15020 # the size of here documents, and old seds have small limits too.
15021
15022 rm -f conftest.tail
15023 while :
15024 do
15025   ac_lines=`grep -c . conftest.vals`
15026   # grep -c gives empty output for an empty file on some AIX systems.
15027   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15028   # Write a limited-size here document to conftest.frag.
15029   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15030   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15031   echo 'CEOF
15032   sed -f conftest.frag conftest.in > conftest.out
15033   rm -f conftest.in
15034   mv conftest.out conftest.in
15035 ' >> $CONFIG_STATUS
15036   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15037   rm -f conftest.vals
15038   mv conftest.tail conftest.vals
15039 done
15040 rm -f conftest.vals
15041
15042 cat >> $CONFIG_STATUS <<\EOF
15043   rm -f conftest.frag conftest.h
15044   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15045   cat conftest.in >> conftest.h
15046   rm -f conftest.in
15047   if cmp -s $ac_file conftest.h 2>/dev/null; then
15048     echo "$ac_file is unchanged"
15049     rm -f conftest.h
15050   else
15051     # Remove last slash and all that follows it.  Not all systems have dirname.
15052       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15053       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15054       # The file is in a subdirectory.
15055       test ! -d "$ac_dir" && mkdir "$ac_dir"
15056     fi
15057     rm -f $ac_file
15058     mv conftest.h $ac_file
15059   fi
15060 fi; done
15061
15062 EOF
15063 cat >> $CONFIG_STATUS <<EOF
15064
15065 EOF
15066 cat >> $CONFIG_STATUS <<\EOF
15067
15068 date > stamp-h
15069 echo Please \"make depend\" to build dependencies
15070
15071 exit 0
15072 EOF
15073 chmod +x $CONFIG_STATUS
15074 rm -fr confdefs* $ac_clean_files
15075 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15076