]> git.sur5r.net Git - openldap/blob - configure
Minor fixes.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.283 2000/01/02 00:21:29 lukeh Exp  
4
5 # Copyright 1998-2000 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-2000 The OpenLDAP Foundation,  All Rights Reserved."
13 echo "Copying restrictions apply, see COPYRIGHT file."
14
15 # Guess values for system-dependent variables and create Makefiles.
16 # Generated automatically using autoconf version 2.13 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-kbind        enable V2 Kerberos IV bind (auto)"
43 ac_help="$ac_help
44   --enable-cldap        enable connectionless ldap (no)"
45 ac_help="$ac_help
46   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
47 ac_help="$ac_help
48   --enable-x-compile    enable cross compiling (no)"
49 ac_help="$ac_help
50   --enable-dmalloc      enable debug malloc support (no)"
51 ac_help="$ac_help
52   --with-cyrus-sasl     with Cyrus SASL support (auto)"
53 ac_help="$ac_help
54   --with-fetch          with fetch URL support (auto)"
55 ac_help="$ac_help
56   --with-kerberos       with support (auto)"
57 ac_help="$ac_help
58   --with-readline       with readline support (auto)"
59 ac_help="$ac_help
60   --with-threads        use threads (auto)"
61 ac_help="$ac_help
62   --with-tls            with TLS/SSL support (auto)"
63 ac_help="$ac_help
64   --with-yielding-select        with implicitly yielding select (auto)"
65 ac_help="$ac_help
66 LDAPD (X.500-to-LDAP Gateway) Options:"
67 ac_help="$ac_help
68   --enable-ldapd        enable building ldapd (no)"
69 ac_help="$ac_help
70 SLAPD (Standalone LDAP Daemon) Options:"
71 ac_help="$ac_help
72   --enable-slapd        enable building slapd (yes)"
73 ac_help="$ac_help
74     --enable-cleartext  enable cleartext passwords (yes)"
75 ac_help="$ac_help
76     --enable-crypt      enable crypt(3) passwords (auto)"
77 ac_help="$ac_help
78     --enable-kpasswd    enable kerberos password verification (no)"
79 ac_help="$ac_help
80     --enable-modules    enable dynamic module support (no)"
81 ac_help="$ac_help
82     --enable-multimaster        enable multimaster replication (no)"
83 ac_help="$ac_help
84     --enable-phonetic   enable phonetic/soundex (no)"
85 ac_help="$ac_help
86     --enable-quipu      build quipu migration tools (no)"
87 ac_help="$ac_help
88     --enable-rlookups   enable reverse lookups (auto)"
89 ac_help="$ac_help
90     --enable-aci        enable per-object ACIs (no)"
91 ac_help="$ac_help
92     --enable-discreteaci        enable discrete rights in ACIs (no)"
93 ac_help="$ac_help
94     --enable-wrappers   enable tcp wrapper support (no)"
95 ac_help="$ac_help
96     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
97 ac_help="$ac_help
98     --enable-bdb2       enable bdb2 backend (no)"
99 ac_help="$ac_help
100       --with-bdb2-module        module type (static)"
101 ac_help="$ac_help
102     --enable-ldap       enable ldap backend (no)"
103 ac_help="$ac_help
104       --with-ldap-module        module type (static)"
105 ac_help="$ac_help
106     --enable-ldbm       enable ldbm backend (yes)"
107 ac_help="$ac_help
108       --with-ldbm-api   use LDBM API (auto)"
109 ac_help="$ac_help
110       --with-ldbm-module        module type (static)"
111 ac_help="$ac_help
112       --with-ldbm-type  use LDBM type (auto)"
113 ac_help="$ac_help
114     --enable-passwd     enable passwd backend (no)"
115 ac_help="$ac_help
116       --with-passwd-module      module type (static)"
117 ac_help="$ac_help
118     --enable-perl       enable perl backend (no)"
119 ac_help="$ac_help
120       --with-perl-module        module type (static)"
121 ac_help="$ac_help
122     --enable-shell      enable shell backend (no)"
123 ac_help="$ac_help
124       --with-shell-module       module type (static)"
125 ac_help="$ac_help
126     --enable-tcl        enable tcl backend (no)"
127 ac_help="$ac_help
128       --with-tcl-module module type (static)"
129 ac_help="$ac_help
130 SLURPD (Replication Daemon) Options:"
131 ac_help="$ac_help
132   --enable-slurpd       enable building slurpd (auto)"
133 ac_help="$ac_help
134 Library Generation & Linking Options"
135 ac_help="$ac_help
136   --enable-static[=PKGS]  build static libraries [default=yes]"
137 ac_help="$ac_help
138   --enable-shared[=PKGS]  build shared libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
141 ac_help="$ac_help
142   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
143 ac_help="$ac_help
144   --disable-libtool-lock  avoid locking (might break parallel builds)"
145
146 # Initialize some variables set by options.
147 # The variables have the same names as the options, with
148 # dashes changed to underlines.
149 build=NONE
150 cache_file=./config.cache
151 exec_prefix=NONE
152 host=NONE
153 no_create=
154 nonopt=NONE
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 target=NONE
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167 bindir='${exec_prefix}/bin'
168 sbindir='${exec_prefix}/sbin'
169 libexecdir='${exec_prefix}/libexec'
170 datadir='${prefix}/share'
171 sysconfdir='${prefix}/etc'
172 sharedstatedir='${prefix}/com'
173 localstatedir='${prefix}/var'
174 libdir='${exec_prefix}/lib'
175 includedir='${prefix}/include'
176 oldincludedir='/usr/include'
177 infodir='${prefix}/info'
178 mandir='${prefix}/man'
179
180 # Initialize some other variables.
181 subdirs=
182 MFLAGS= MAKEFLAGS=
183 SHELL=${CONFIG_SHELL-/bin/sh}
184 # Maximum number of lines to put in a shell here document.
185 ac_max_here_lines=12
186
187 ac_prev=
188 for ac_option
189 do
190
191   # If the previous option needs an argument, assign it.
192   if test -n "$ac_prev"; then
193     eval "$ac_prev=\$ac_option"
194     ac_prev=
195     continue
196   fi
197
198   case "$ac_option" in
199   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
200   *) ac_optarg= ;;
201   esac
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case "$ac_option" in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir="$ac_optarg" ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build="$ac_optarg" ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file="$ac_optarg" ;;
223
224   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
225     ac_prev=datadir ;;
226   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
227   | --da=*)
228     datadir="$ac_optarg" ;;
229
230   -disable-* | --disable-*)
231     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
232     # Reject names that are not valid shell variable names.
233     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
234       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
235     fi
236     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
237     eval "enable_${ac_feature}=no" ;;
238
239   -enable-* | --enable-*)
240     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
241     # Reject names that are not valid shell variable names.
242     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
243       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
244     fi
245     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
246     case "$ac_option" in
247       *=*) ;;
248       *) ac_optarg=yes ;;
249     esac
250     eval "enable_${ac_feature}='$ac_optarg'" ;;
251
252   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
253   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
254   | --exec | --exe | --ex)
255     ac_prev=exec_prefix ;;
256   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
257   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
258   | --exec=* | --exe=* | --ex=*)
259     exec_prefix="$ac_optarg" ;;
260
261   -gas | --gas | --ga | --g)
262     # Obsolete; use --with-gas.
263     with_gas=yes ;;
264
265   -help | --help | --hel | --he)
266     # Omit some internal or obsolete options to make the list less imposing.
267     # This message is too long to be a string in the A/UX 3.1 sh.
268     cat << EOF
269 Usage: configure [options] [host]
270 Options: [defaults in brackets after descriptions]
271 Configuration:
272   --cache-file=FILE       cache test results in FILE
273   --help                  print this message
274   --no-create             do not create output files
275   --quiet, --silent       do not print \`checking...' messages
276   --version               print the version of autoconf that created configure
277 Directory and file names:
278   --prefix=PREFIX         install architecture-independent files in PREFIX
279                           [$ac_default_prefix]
280   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
281                           [same as prefix]
282   --bindir=DIR            user executables in DIR [EPREFIX/bin]
283   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
284   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
285   --datadir=DIR           read-only architecture-independent data in DIR
286                           [PREFIX/share]
287   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
288   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
289                           [PREFIX/com]
290   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
291   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
292   --includedir=DIR        C header files in DIR [PREFIX/include]
293   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
294   --infodir=DIR           info documentation in DIR [PREFIX/info]
295   --mandir=DIR            man documentation in DIR [PREFIX/man]
296   --srcdir=DIR            find the sources in DIR [configure dir or ..]
297   --program-prefix=PREFIX prepend PREFIX to installed program names
298   --program-suffix=SUFFIX append SUFFIX to installed program names
299   --program-transform-name=PROGRAM
300                           run sed PROGRAM on installed program names
301 EOF
302     cat << EOF
303 Host type:
304   --build=BUILD           configure for building on BUILD [BUILD=HOST]
305   --host=HOST             configure for HOST [guessed]
306   --target=TARGET         configure for TARGET [TARGET=HOST]
307 Features and packages:
308   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
309   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
310   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
311   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
312   --x-includes=DIR        X include files are in DIR
313   --x-libraries=DIR       X library files are in DIR
314 EOF
315     if test -n "$ac_help"; then
316       echo "--enable and --with options recognized:$ac_help"
317     fi
318     exit 0 ;;
319
320   -host | --host | --hos | --ho)
321     ac_prev=host ;;
322   -host=* | --host=* | --hos=* | --ho=*)
323     host="$ac_optarg" ;;
324
325   -includedir | --includedir | --includedi | --included | --include \
326   | --includ | --inclu | --incl | --inc)
327     ac_prev=includedir ;;
328   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
329   | --includ=* | --inclu=* | --incl=* | --inc=*)
330     includedir="$ac_optarg" ;;
331
332   -infodir | --infodir | --infodi | --infod | --info | --inf)
333     ac_prev=infodir ;;
334   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
335     infodir="$ac_optarg" ;;
336
337   -libdir | --libdir | --libdi | --libd)
338     ac_prev=libdir ;;
339   -libdir=* | --libdir=* | --libdi=* | --libd=*)
340     libdir="$ac_optarg" ;;
341
342   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
343   | --libexe | --libex | --libe)
344     ac_prev=libexecdir ;;
345   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
346   | --libexe=* | --libex=* | --libe=*)
347     libexecdir="$ac_optarg" ;;
348
349   -localstatedir | --localstatedir | --localstatedi | --localstated \
350   | --localstate | --localstat | --localsta | --localst \
351   | --locals | --local | --loca | --loc | --lo)
352     ac_prev=localstatedir ;;
353   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
354   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
355   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
356     localstatedir="$ac_optarg" ;;
357
358   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
359     ac_prev=mandir ;;
360   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
361     mandir="$ac_optarg" ;;
362
363   -nfp | --nfp | --nf)
364     # Obsolete; use --without-fp.
365     with_fp=no ;;
366
367   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
368   | --no-cr | --no-c)
369     no_create=yes ;;
370
371   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
372   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
373     no_recursion=yes ;;
374
375   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
376   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
377   | --oldin | --oldi | --old | --ol | --o)
378     ac_prev=oldincludedir ;;
379   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
380   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
381   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
382     oldincludedir="$ac_optarg" ;;
383
384   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
385     ac_prev=prefix ;;
386   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
387     prefix="$ac_optarg" ;;
388
389   -program-prefix | --program-prefix | --program-prefi | --program-pref \
390   | --program-pre | --program-pr | --program-p)
391     ac_prev=program_prefix ;;
392   -program-prefix=* | --program-prefix=* | --program-prefi=* \
393   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
394     program_prefix="$ac_optarg" ;;
395
396   -program-suffix | --program-suffix | --program-suffi | --program-suff \
397   | --program-suf | --program-su | --program-s)
398     ac_prev=program_suffix ;;
399   -program-suffix=* | --program-suffix=* | --program-suffi=* \
400   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
401     program_suffix="$ac_optarg" ;;
402
403   -program-transform-name | --program-transform-name \
404   | --program-transform-nam | --program-transform-na \
405   | --program-transform-n | --program-transform- \
406   | --program-transform | --program-transfor \
407   | --program-transfo | --program-transf \
408   | --program-trans | --program-tran \
409   | --progr-tra | --program-tr | --program-t)
410     ac_prev=program_transform_name ;;
411   -program-transform-name=* | --program-transform-name=* \
412   | --program-transform-nam=* | --program-transform-na=* \
413   | --program-transform-n=* | --program-transform-=* \
414   | --program-transform=* | --program-transfor=* \
415   | --program-transfo=* | --program-transf=* \
416   | --program-trans=* | --program-tran=* \
417   | --progr-tra=* | --program-tr=* | --program-t=*)
418     program_transform_name="$ac_optarg" ;;
419
420   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
421   | -silent | --silent | --silen | --sile | --sil)
422     silent=yes ;;
423
424   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
425     ac_prev=sbindir ;;
426   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
427   | --sbi=* | --sb=*)
428     sbindir="$ac_optarg" ;;
429
430   -sharedstatedir | --sharedstatedir | --sharedstatedi \
431   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
432   | --sharedst | --shareds | --shared | --share | --shar \
433   | --sha | --sh)
434     ac_prev=sharedstatedir ;;
435   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
436   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
437   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
438   | --sha=* | --sh=*)
439     sharedstatedir="$ac_optarg" ;;
440
441   -site | --site | --sit)
442     ac_prev=site ;;
443   -site=* | --site=* | --sit=*)
444     site="$ac_optarg" ;;
445
446   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
447     ac_prev=srcdir ;;
448   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
449     srcdir="$ac_optarg" ;;
450
451   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
452   | --syscon | --sysco | --sysc | --sys | --sy)
453     ac_prev=sysconfdir ;;
454   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
455   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
456     sysconfdir="$ac_optarg" ;;
457
458   -target | --target | --targe | --targ | --tar | --ta | --t)
459     ac_prev=target ;;
460   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
461     target="$ac_optarg" ;;
462
463   -v | -verbose | --verbose | --verbos | --verbo | --verb)
464     verbose=yes ;;
465
466   -version | --version | --versio | --versi | --vers)
467     echo "configure generated by autoconf version 2.13"
468     exit 0 ;;
469
470   -with-* | --with-*)
471     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
472     # Reject names that are not valid shell variable names.
473     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
474       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
475     fi
476     ac_package=`echo $ac_package| sed 's/-/_/g'`
477     case "$ac_option" in
478       *=*) ;;
479       *) ac_optarg=yes ;;
480     esac
481     eval "with_${ac_package}='$ac_optarg'" ;;
482
483   -without-* | --without-*)
484     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
485     # Reject names that are not valid shell variable names.
486     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
487       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
488     fi
489     ac_package=`echo $ac_package| sed 's/-/_/g'`
490     eval "with_${ac_package}=no" ;;
491
492   --x)
493     # Obsolete; use --with-x.
494     with_x=yes ;;
495
496   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
497   | --x-incl | --x-inc | --x-in | --x-i)
498     ac_prev=x_includes ;;
499   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
500   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
501     x_includes="$ac_optarg" ;;
502
503   -x-libraries | --x-libraries | --x-librarie | --x-librari \
504   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
505     ac_prev=x_libraries ;;
506   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
507   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
508     x_libraries="$ac_optarg" ;;
509
510   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
511     ;;
512
513   *)
514     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
515       echo "configure: warning: $ac_option: invalid host type" 1>&2
516     fi
517     if test "x$nonopt" != xNONE; then
518       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
519     fi
520     nonopt="$ac_option"
521     ;;
522
523   esac
524 done
525
526 if test -n "$ac_prev"; then
527   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
528 fi
529
530 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
531
532 # File descriptor usage:
533 # 0 standard input
534 # 1 file creation
535 # 2 errors and warnings
536 # 3 some systems may open it to /dev/tty
537 # 4 used on the Kubota Titan
538 # 6 checking for... messages and results
539 # 5 compiler messages saved in config.log
540 if test "$silent" = yes; then
541   exec 6>/dev/null
542 else
543   exec 6>&1
544 fi
545 exec 5>./config.log
546
547 echo "\
548 This file contains any messages produced by compilers while
549 running configure, to aid debugging if configure makes a mistake.
550 " 1>&5
551
552 # Strip out --no-create and --no-recursion so they do not pile up.
553 # Also quote any args containing shell metacharacters.
554 ac_configure_args=
555 for ac_arg
556 do
557   case "$ac_arg" in
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c) ;;
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
562   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
563   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
564   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
565   esac
566 done
567
568 # NLS nuisances.
569 # Only set these to C if already set.  These must not be set unconditionally
570 # because not all systems understand e.g. LANG=C (notably SCO).
571 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
572 # Non-C LC_CTYPE values break the ctype check.
573 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
574 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
575 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
576 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
577
578 # confdefs.h avoids OS command line length limits that DEFS can exceed.
579 rm -rf conftest* confdefs.h
580 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
581 echo > confdefs.h
582
583 # A filename unique to this package, relative to the directory that
584 # configure is in, which we can look for to find out if srcdir is correct.
585 ac_unique_file=build/version
586
587 # Find the source files, if location was not specified.
588 if test -z "$srcdir"; then
589   ac_srcdir_defaulted=yes
590   # Try the directory containing this script, then its parent.
591   ac_prog=$0
592   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
593   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
594   srcdir=$ac_confdir
595   if test ! -r $srcdir/$ac_unique_file; then
596     srcdir=..
597   fi
598 else
599   ac_srcdir_defaulted=no
600 fi
601 if test ! -r $srcdir/$ac_unique_file; then
602   if test "$ac_srcdir_defaulted" = yes; then
603     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
604   else
605     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
606   fi
607 fi
608 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
609
610 # Prefer explicitly selected file to automatically selected ones.
611 if test -z "$CONFIG_SITE"; then
612   if test "x$prefix" != xNONE; then
613     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
614   else
615     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
616   fi
617 fi
618 for ac_site_file in $CONFIG_SITE; do
619   if test -r "$ac_site_file"; then
620     echo "loading site script $ac_site_file"
621     . "$ac_site_file"
622   fi
623 done
624
625
626 ac_ext=c
627 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
628 ac_cpp='$CPP $CPPFLAGS'
629 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
630 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
631 cross_compiling=$ac_cv_prog_cc_cross
632
633 ac_exeext=
634 ac_objext=o
635 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
636   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
637   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
638     ac_n= ac_c='
639 ' ac_t='        '
640   else
641     ac_n=-n ac_c= ac_t=
642   fi
643 else
644   ac_n= ac_c='\c' ac_t=
645 fi
646
647 ac_aux_dir=
648 for ac_dir in build $srcdir/build; do
649   if test -f $ac_dir/install-sh; then
650     ac_aux_dir=$ac_dir
651     ac_install_sh="$ac_aux_dir/install-sh -c"
652     break
653   elif test -f $ac_dir/install.sh; then
654     ac_aux_dir=$ac_dir
655     ac_install_sh="$ac_aux_dir/install.sh -c"
656     break
657   fi
658 done
659 if test -z "$ac_aux_dir"; then
660   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
661 fi
662 ac_config_guess=$ac_aux_dir/config.guess
663 ac_config_sub=$ac_aux_dir/config.sub
664 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
665
666 OL_VERSION=`cat $ac_aux_dir/version`
667 if test -z "$OL_VERSION"; then
668         { echo "configure: error: could not determine version" 1>&2; exit 1; }
669 fi
670
671 echo "Configuring OpenLDAP $OL_VERSION ..."
672
673
674 # Do some error checking and defaulting for the host and target type.
675 # The inputs are:
676 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
677 #
678 # The rules are:
679 # 1. You are not allowed to specify --host, --target, and nonopt at the
680 #    same time.
681 # 2. Host defaults to nonopt.
682 # 3. If nonopt is not specified, then host defaults to the current host,
683 #    as determined by config.guess.
684 # 4. Target and build default to nonopt.
685 # 5. If nonopt is not specified, then target and build default to host.
686
687 # The aliases save the names the user supplied, while $host etc.
688 # will get canonicalized.
689 case $host---$target---$nonopt in
690 NONE---*---* | *---NONE---* | *---*---NONE) ;;
691 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
692 esac
693
694
695 # Make sure we can run config.sub.
696 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
697 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
698 fi
699
700 echo $ac_n "checking host system type""... $ac_c" 1>&6
701 echo "configure:702: checking host system type" >&5
702
703 host_alias=$host
704 case "$host_alias" in
705 NONE)
706   case $nonopt in
707   NONE)
708     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
709     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
710     fi ;;
711   *) host_alias=$nonopt ;;
712   esac ;;
713 esac
714
715 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
716 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
717 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
718 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
719 echo "$ac_t""$host" 1>&6
720
721 echo $ac_n "checking target system type""... $ac_c" 1>&6
722 echo "configure:723: checking target system type" >&5
723
724 target_alias=$target
725 case "$target_alias" in
726 NONE)
727   case $nonopt in
728   NONE) target_alias=$host_alias ;;
729   *) target_alias=$nonopt ;;
730   esac ;;
731 esac
732
733 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
734 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
735 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
736 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
737 echo "$ac_t""$target" 1>&6
738
739 echo $ac_n "checking build system type""... $ac_c" 1>&6
740 echo "configure:741: checking build system type" >&5
741
742 build_alias=$build
743 case "$build_alias" in
744 NONE)
745   case $nonopt in
746   NONE) build_alias=$host_alias ;;
747   *) build_alias=$nonopt ;;
748   esac ;;
749 esac
750
751 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
752 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
753 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
754 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
755 echo "$ac_t""$build" 1>&6
756
757 test "$host_alias" != "$target_alias" &&
758   test "$program_prefix$program_suffix$program_transform_name" = \
759     NONENONEs,x,x, &&
760   program_prefix=${target_alias}-
761
762
763 # Find a good install program.  We prefer a C program (faster),
764 # so one script is as good as another.  But avoid the broken or
765 # incompatible versions:
766 # SysV /etc/install, /usr/sbin/install
767 # SunOS /usr/etc/install
768 # IRIX /sbin/install
769 # AIX /bin/install
770 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
771 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
772 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
773 # ./install, which can be erroneously created by make from ./install.sh.
774 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
775 echo "configure:776: checking for a BSD compatible install" >&5
776 if test -z "$INSTALL"; then
777 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
778   echo $ac_n "(cached) $ac_c" 1>&6
779 else
780     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
781   for ac_dir in $PATH; do
782     # Account for people who put trailing slashes in PATH elements.
783     case "$ac_dir/" in
784     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
785     *)
786       # OSF1 and SCO ODT 3.0 have their own names for install.
787       # Don't use installbsd from OSF since it installs stuff as root
788       # by default.
789       for ac_prog in ginstall scoinst install; do
790         if test -f $ac_dir/$ac_prog; then
791           if test $ac_prog = install &&
792             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
793             # AIX install.  It has an incompatible calling convention.
794             :
795           else
796             ac_cv_path_install="$ac_dir/$ac_prog -c"
797             break 2
798           fi
799         fi
800       done
801       ;;
802     esac
803   done
804   IFS="$ac_save_IFS"
805
806 fi
807   if test "${ac_cv_path_install+set}" = set; then
808     INSTALL="$ac_cv_path_install"
809   else
810     # As a last resort, use the slow shell script.  We don't cache a
811     # path for INSTALL within a source directory, because that will
812     # break other packages using the cache if that directory is
813     # removed, or if the path is relative.
814     INSTALL="$ac_install_sh"
815   fi
816 fi
817 echo "$ac_t""$INSTALL" 1>&6
818
819 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
820 # It thinks the first close brace ends the variable substitution.
821 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
822
823 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
824
825 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
826
827 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
828 echo "configure:829: checking whether build environment is sane" >&5
829 # Just in case
830 sleep 1
831 echo timestamp > conftestfile
832 # Do `set' in a subshell so we don't clobber the current shell's
833 # arguments.  Must try -L first in case configure is actually a
834 # symlink; some systems play weird games with the mod time of symlinks
835 # (eg FreeBSD returns the mod time of the symlink's containing
836 # directory).
837 if (
838    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
839    if test "$*" = "X"; then
840       # -L didn't work.
841       set X `ls -t $srcdir/configure conftestfile`
842    fi
843    if test "$*" != "X $srcdir/configure conftestfile" \
844       && test "$*" != "X conftestfile $srcdir/configure"; then
845
846       # If neither matched, then we have a broken ls.  This can happen
847       # if, for instance, CONFIG_SHELL is bash and it inherits a
848       # broken ls alias from the environment.  This has actually
849       # happened.  Such a system could not be considered "sane".
850       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
851 alias in your environment" 1>&2; exit 1; }
852    fi
853
854    test "$2" = conftestfile
855    )
856 then
857    # Ok.
858    :
859 else
860    { echo "configure: error: newly created file is older than distributed files!
861 Check your system clock" 1>&2; exit 1; }
862 fi
863 rm -f conftest*
864 echo "$ac_t""yes" 1>&6
865 if test "$program_transform_name" = s,x,x,; then
866   program_transform_name=
867 else
868   # Double any \ or $.  echo might interpret backslashes.
869   cat <<\EOF_SED > conftestsed
870 s,\\,\\\\,g; s,\$,$$,g
871 EOF_SED
872   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
873   rm -f conftestsed
874 fi
875 test "$program_prefix" != NONE &&
876   program_transform_name="s,^,${program_prefix},; $program_transform_name"
877 # Use a double $ so make ignores it.
878 test "$program_suffix" != NONE &&
879   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
880
881 # sed with no file args requires a program.
882 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
883
884 for ac_prog in mawk gawk nawk awk
885 do
886 # Extract the first word of "$ac_prog", so it can be a program name with args.
887 set dummy $ac_prog; ac_word=$2
888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
889 echo "configure:890: checking for $ac_word" >&5
890 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
891   echo $ac_n "(cached) $ac_c" 1>&6
892 else
893   if test -n "$AWK"; then
894   ac_cv_prog_AWK="$AWK" # Let the user override the test.
895 else
896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
897   ac_dummy="$PATH"
898   for ac_dir in $ac_dummy; do
899     test -z "$ac_dir" && ac_dir=.
900     if test -f $ac_dir/$ac_word; then
901       ac_cv_prog_AWK="$ac_prog"
902       break
903     fi
904   done
905   IFS="$ac_save_ifs"
906 fi
907 fi
908 AWK="$ac_cv_prog_AWK"
909 if test -n "$AWK"; then
910   echo "$ac_t""$AWK" 1>&6
911 else
912   echo "$ac_t""no" 1>&6
913 fi
914
915 test -n "$AWK" && break
916 done
917
918 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
919 echo "configure:920: checking whether ${MAKE-make} sets \${MAKE}" >&5
920 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
921 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
922   echo $ac_n "(cached) $ac_c" 1>&6
923 else
924   cat > conftestmake <<\EOF
925 all:
926         @echo 'ac_maketemp="${MAKE}"'
927 EOF
928 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
929 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
930 if test -n "$ac_maketemp"; then
931   eval ac_cv_prog_make_${ac_make}_set=yes
932 else
933   eval ac_cv_prog_make_${ac_make}_set=no
934 fi
935 rm -f conftestmake
936 fi
937 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
938   echo "$ac_t""yes" 1>&6
939   SET_MAKE=
940 else
941   echo "$ac_t""no" 1>&6
942   SET_MAKE="MAKE=${MAKE-make}"
943 fi
944
945
946
947 PACKAGE=OpenLDAP
948
949 VERSION=$OL_VERSION
950
951 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
952   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
953 fi
954
955
956
957 missing_dir=`cd $ac_aux_dir && pwd`
958 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
959 echo "configure:960: checking for working aclocal" >&5
960 # Run test in a subshell; some versions of sh will print an error if
961 # an executable is not found, even if stderr is redirected.
962 # Redirect stdin to placate older versions of autoconf.  Sigh.
963 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
964    ACLOCAL=aclocal
965    echo "$ac_t""found" 1>&6
966 else
967    ACLOCAL="$missing_dir/missing aclocal"
968    echo "$ac_t""missing" 1>&6
969 fi
970
971 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
972 echo "configure:973: checking for working autoconf" >&5
973 # Run test in a subshell; some versions of sh will print an error if
974 # an executable is not found, even if stderr is redirected.
975 # Redirect stdin to placate older versions of autoconf.  Sigh.
976 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
977    AUTOCONF=autoconf
978    echo "$ac_t""found" 1>&6
979 else
980    AUTOCONF="$missing_dir/missing autoconf"
981    echo "$ac_t""missing" 1>&6
982 fi
983
984 echo $ac_n "checking for working automake""... $ac_c" 1>&6
985 echo "configure:986: checking for working automake" >&5
986 # Run test in a subshell; some versions of sh will print an error if
987 # an executable is not found, even if stderr is redirected.
988 # Redirect stdin to placate older versions of autoconf.  Sigh.
989 if (automake --version) < /dev/null > /dev/null 2>&1; then
990    AUTOMAKE=automake
991    echo "$ac_t""found" 1>&6
992 else
993    AUTOMAKE="$missing_dir/missing automake"
994    echo "$ac_t""missing" 1>&6
995 fi
996
997 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
998 echo "configure:999: checking for working autoheader" >&5
999 # Run test in a subshell; some versions of sh will print an error if
1000 # an executable is not found, even if stderr is redirected.
1001 # Redirect stdin to placate older versions of autoconf.  Sigh.
1002 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1003    AUTOHEADER=autoheader
1004    echo "$ac_t""found" 1>&6
1005 else
1006    AUTOHEADER="$missing_dir/missing autoheader"
1007    echo "$ac_t""missing" 1>&6
1008 fi
1009
1010 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1011 echo "configure:1012: checking for working makeinfo" >&5
1012 # Run test in a subshell; some versions of sh will print an error if
1013 # an executable is not found, even if stderr is redirected.
1014 # Redirect stdin to placate older versions of autoconf.  Sigh.
1015 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1016    MAKEINFO=makeinfo
1017    echo "$ac_t""found" 1>&6
1018 else
1019    MAKEINFO="$missing_dir/missing makeinfo"
1020    echo "$ac_t""missing" 1>&6
1021 fi
1022
1023 install_sh="$missing_dir/install-sh"
1024 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1025
1026 for ac_prog in gnutar gtar tar
1027 do
1028 # Extract the first word of "$ac_prog", so it can be a program name with args.
1029 set dummy $ac_prog; ac_word=$2
1030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1031 echo "configure:1032: checking for $ac_word" >&5
1032 if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
1033   echo $ac_n "(cached) $ac_c" 1>&6
1034 else
1035   if test -n "$AMTAR"; then
1036   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1037 else
1038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1039   ac_dummy="$PATH"
1040   for ac_dir in $ac_dummy; do
1041     test -z "$ac_dir" && ac_dir=.
1042     if test -f $ac_dir/$ac_word; then
1043       ac_cv_prog_AMTAR="$ac_prog"
1044       break
1045     fi
1046   done
1047   IFS="$ac_save_ifs"
1048 fi
1049 fi
1050 AMTAR="$ac_cv_prog_AMTAR"
1051 if test -n "$AMTAR"; then
1052   echo "$ac_t""$AMTAR" 1>&6
1053 else
1054   echo "$ac_t""no" 1>&6
1055 fi
1056
1057 test -n "$AMTAR" && break
1058 done
1059
1060
1061 AMTARFLAGS=
1062 if test -n "$AMTAR"; then
1063   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1064         AMTARFLAGS=o
1065   fi
1066 fi
1067
1068
1069
1070 cat >> confdefs.h <<EOF
1071 #define OPENLDAP_PACKAGE "$PACKAGE"
1072 EOF
1073
1074 cat >> confdefs.h <<EOF
1075 #define OPENLDAP_VERSION "$VERSION"
1076 EOF
1077
1078
1079
1080
1081 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1082 echo "configure:1083: checking configure arguments" >&5
1083
1084
1085 top_builddir=`pwd`
1086
1087 ldap_subdir="/openldap"
1088
1089 # Check whether --with-subdir or --without-subdir was given.
1090 if test "${with_subdir+set}" = set; then
1091   withval="$with_subdir"
1092   case "$withval" in
1093         no) ldap_subdir=""
1094                 ;;
1095         yes)
1096                 ;;
1097         /*|\\*)
1098                 ldap_subdir="$withval"
1099                 ;;
1100         *)
1101                 ldap_subdir="/$withval"
1102                 ;;
1103 esac
1104
1105 fi
1106
1107
1108 # OpenLDAP --enable-debug
1109         # Check whether --enable-debug or --disable-debug was given.
1110 if test "${enable_debug+set}" = set; then
1111   enableval="$enable_debug"
1112   
1113         ol_arg=invalid
1114         for ol_val in auto yes no ; do
1115                 if test "$enableval" = "$ol_val" ; then
1116                         ol_arg="$ol_val"
1117                 fi
1118         done
1119         if test "$ol_arg" = "invalid" ; then
1120                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1121         fi
1122         ol_enable_debug="$ol_arg"
1123
1124 else
1125         ol_enable_debug="yes"
1126 fi
1127 # end --enable-debug
1128 # OpenLDAP --enable-syslog
1129         # Check whether --enable-syslog or --disable-syslog was given.
1130 if test "${enable_syslog+set}" = set; then
1131   enableval="$enable_syslog"
1132   
1133         ol_arg=invalid
1134         for ol_val in auto yes no ; do
1135                 if test "$enableval" = "$ol_val" ; then
1136                         ol_arg="$ol_val"
1137                 fi
1138         done
1139         if test "$ol_arg" = "invalid" ; then
1140                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1141         fi
1142         ol_enable_syslog="$ol_arg"
1143
1144 else
1145         ol_enable_syslog="auto"
1146 fi
1147 # end --enable-syslog
1148 # OpenLDAP --enable-proctitle
1149         # Check whether --enable-proctitle or --disable-proctitle was given.
1150 if test "${enable_proctitle+set}" = set; then
1151   enableval="$enable_proctitle"
1152   
1153         ol_arg=invalid
1154         for ol_val in auto yes no ; do
1155                 if test "$enableval" = "$ol_val" ; then
1156                         ol_arg="$ol_val"
1157                 fi
1158         done
1159         if test "$ol_arg" = "invalid" ; then
1160                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1161         fi
1162         ol_enable_proctitle="$ol_arg"
1163
1164 else
1165         ol_enable_proctitle="yes"
1166 fi
1167 # end --enable-proctitle
1168 # OpenLDAP --enable-cache
1169         # Check whether --enable-cache or --disable-cache was given.
1170 if test "${enable_cache+set}" = set; then
1171   enableval="$enable_cache"
1172   
1173         ol_arg=invalid
1174         for ol_val in auto yes no ; do
1175                 if test "$enableval" = "$ol_val" ; then
1176                         ol_arg="$ol_val"
1177                 fi
1178         done
1179         if test "$ol_arg" = "invalid" ; then
1180                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1181         fi
1182         ol_enable_cache="$ol_arg"
1183
1184 else
1185         ol_enable_cache="yes"
1186 fi
1187 # end --enable-cache
1188 # OpenLDAP --enable-dns
1189         # Check whether --enable-dns or --disable-dns was given.
1190 if test "${enable_dns+set}" = set; then
1191   enableval="$enable_dns"
1192   
1193         ol_arg=invalid
1194         for ol_val in auto yes no ; do
1195                 if test "$enableval" = "$ol_val" ; then
1196                         ol_arg="$ol_val"
1197                 fi
1198         done
1199         if test "$ol_arg" = "invalid" ; then
1200                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1201         fi
1202         ol_enable_dns="$ol_arg"
1203
1204 else
1205         ol_enable_dns="no"
1206 fi
1207 # end --enable-dns
1208 # OpenLDAP --enable-referrals
1209         # Check whether --enable-referrals or --disable-referrals was given.
1210 if test "${enable_referrals+set}" = set; then
1211   enableval="$enable_referrals"
1212   
1213         ol_arg=invalid
1214         for ol_val in auto yes no ; do
1215                 if test "$enableval" = "$ol_val" ; then
1216                         ol_arg="$ol_val"
1217                 fi
1218         done
1219         if test "$ol_arg" = "invalid" ; then
1220                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1221         fi
1222         ol_enable_referrals="$ol_arg"
1223
1224 else
1225         ol_enable_referrals="yes"
1226 fi
1227 # end --enable-referrals
1228 # OpenLDAP --enable-kbind
1229         # Check whether --enable-kbind or --disable-kbind was given.
1230 if test "${enable_kbind+set}" = set; then
1231   enableval="$enable_kbind"
1232   
1233         ol_arg=invalid
1234         for ol_val in auto yes no ; do
1235                 if test "$enableval" = "$ol_val" ; then
1236                         ol_arg="$ol_val"
1237                 fi
1238         done
1239         if test "$ol_arg" = "invalid" ; then
1240                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1241         fi
1242         ol_enable_kbind="$ol_arg"
1243
1244 else
1245         ol_enable_kbind="auto"
1246 fi
1247 # end --enable-kbind
1248 # OpenLDAP --enable-cldap
1249         # Check whether --enable-cldap or --disable-cldap was given.
1250 if test "${enable_cldap+set}" = set; then
1251   enableval="$enable_cldap"
1252   
1253         ol_arg=invalid
1254         for ol_val in auto yes no ; do
1255                 if test "$enableval" = "$ol_val" ; then
1256                         ol_arg="$ol_val"
1257                 fi
1258         done
1259         if test "$ol_arg" = "invalid" ; then
1260                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1261         fi
1262         ol_enable_cldap="$ol_arg"
1263
1264 else
1265         ol_enable_cldap="no"
1266 fi
1267 # end --enable-cldap
1268 # OpenLDAP --enable-ldapi
1269         # Check whether --enable-ldapi or --disable-ldapi was given.
1270 if test "${enable_ldapi+set}" = set; then
1271   enableval="$enable_ldapi"
1272   
1273         ol_arg=invalid
1274         for ol_val in auto yes no ; do
1275                 if test "$enableval" = "$ol_val" ; then
1276                         ol_arg="$ol_val"
1277                 fi
1278         done
1279         if test "$ol_arg" = "invalid" ; then
1280                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1281         fi
1282         ol_enable_ldapi="$ol_arg"
1283
1284 else
1285         ol_enable_ldapi="no"
1286 fi
1287 # end --enable-ldapi
1288 # OpenLDAP --enable-x_compile
1289         # Check whether --enable-x_compile or --disable-x_compile was given.
1290 if test "${enable_x_compile+set}" = set; then
1291   enableval="$enable_x_compile"
1292   
1293         ol_arg=invalid
1294         for ol_val in yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1301         fi
1302         ol_enable_x_compile="$ol_arg"
1303
1304 else
1305         ol_enable_x_compile="no"
1306 fi
1307 # end --enable-x_compile
1308
1309 # OpenLDAP --enable-dmalloc
1310         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1311 if test "${enable_dmalloc+set}" = set; then
1312   enableval="$enable_dmalloc"
1313   
1314         ol_arg=invalid
1315         for ol_val in auto yes no ; do
1316                 if test "$enableval" = "$ol_val" ; then
1317                         ol_arg="$ol_val"
1318                 fi
1319         done
1320         if test "$ol_arg" = "invalid" ; then
1321                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1322         fi
1323         ol_enable_dmalloc="$ol_arg"
1324
1325 else
1326         ol_enable_dmalloc="no"
1327 fi
1328 # end --enable-dmalloc
1329
1330 # OpenLDAP --with-cyrus_sasl
1331         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1332 if test "${with_cyrus_sasl+set}" = set; then
1333   withval="$with_cyrus_sasl"
1334   
1335         ol_arg=invalid
1336         for ol_val in auto yes no  ; do
1337                 if test "$withval" = "$ol_val" ; then
1338                         ol_arg="$ol_val"
1339                 fi
1340         done
1341         if test "$ol_arg" = "invalid" ; then
1342                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1343         fi
1344         ol_with_cyrus_sasl="$ol_arg"
1345
1346 else
1347         ol_with_cyrus_sasl="auto"
1348 fi
1349 # end --with-cyrus_sasl
1350
1351 # OpenLDAP --with-fetch
1352         # Check whether --with-fetch or --without-fetch was given.
1353 if test "${with_fetch+set}" = set; then
1354   withval="$with_fetch"
1355   
1356         ol_arg=invalid
1357         for ol_val in auto yes no  ; do
1358                 if test "$withval" = "$ol_val" ; then
1359                         ol_arg="$ol_val"
1360                 fi
1361         done
1362         if test "$ol_arg" = "invalid" ; then
1363                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1364         fi
1365         ol_with_fetch="$ol_arg"
1366
1367 else
1368         ol_with_fetch="auto"
1369 fi
1370 # end --with-fetch
1371
1372 # OpenLDAP --with-kerberos
1373         # Check whether --with-kerberos or --without-kerberos was given.
1374 if test "${with_kerberos+set}" = set; then
1375   withval="$with_kerberos"
1376   
1377         ol_arg=invalid
1378         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1379                 if test "$withval" = "$ol_val" ; then
1380                         ol_arg="$ol_val"
1381                 fi
1382         done
1383         if test "$ol_arg" = "invalid" ; then
1384                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1385         fi
1386         ol_with_kerberos="$ol_arg"
1387
1388 else
1389         ol_with_kerberos="auto"
1390 fi
1391 # end --with-kerberos
1392
1393 # OpenLDAP --with-readline
1394         # Check whether --with-readline or --without-readline was given.
1395 if test "${with_readline+set}" = set; then
1396   withval="$with_readline"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no  ; do
1400                 if test "$withval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1406         fi
1407         ol_with_readline="$ol_arg"
1408
1409 else
1410         ol_with_readline="auto"
1411 fi
1412 # end --with-readline
1413
1414 # OpenLDAP --with-threads
1415         # Check whether --with-threads or --without-threads was given.
1416 if test "${with_threads+set}" = set; then
1417   withval="$with_threads"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1421                 if test "$withval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1427         fi
1428         ol_with_threads="$ol_arg"
1429
1430 else
1431         ol_with_threads="auto"
1432 fi
1433 # end --with-threads
1434
1435 # OpenLDAP --with-tls
1436         # Check whether --with-tls or --without-tls was given.
1437 if test "${with_tls+set}" = set; then
1438   withval="$with_tls"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto ssleay openssl yes no  ; do
1442                 if test "$withval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1448         fi
1449         ol_with_tls="$ol_arg"
1450
1451 else
1452         ol_with_tls="auto"
1453 fi
1454 # end --with-tls
1455
1456 # OpenLDAP --with-yielding_select
1457         # Check whether --with-yielding_select or --without-yielding_select was given.
1458 if test "${with_yielding_select+set}" = set; then
1459   withval="$with_yielding_select"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto yes no manual  ; do
1463                 if test "$withval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1469         fi
1470         ol_with_yielding_select="$ol_arg"
1471
1472 else
1473         ol_with_yielding_select="auto"
1474 fi
1475 # end --with-yielding_select
1476
1477
1478 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1479 if test "${with_xxldapdoptions+set}" = set; then
1480   withval="$with_xxldapdoptions"
1481   :
1482 fi
1483
1484 # OpenLDAP --enable-ldapd
1485         # Check whether --enable-ldapd or --disable-ldapd was given.
1486 if test "${enable_ldapd+set}" = set; then
1487   enableval="$enable_ldapd"
1488   
1489         ol_arg=invalid
1490         for ol_val in auto yes no ; do
1491                 if test "$enableval" = "$ol_val" ; then
1492                         ol_arg="$ol_val"
1493                 fi
1494         done
1495         if test "$ol_arg" = "invalid" ; then
1496                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1497         fi
1498         ol_enable_ldapd="$ol_arg"
1499
1500 else
1501         ol_enable_ldapd="no"
1502 fi
1503 # end --enable-ldapd
1504
1505 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1506 if test "${with_xxslapdoptions+set}" = set; then
1507   withval="$with_xxslapdoptions"
1508   :
1509 fi
1510
1511 # OpenLDAP --enable-slapd
1512         # Check whether --enable-slapd or --disable-slapd was given.
1513 if test "${enable_slapd+set}" = set; then
1514   enableval="$enable_slapd"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1524         fi
1525         ol_enable_slapd="$ol_arg"
1526
1527 else
1528         ol_enable_slapd="yes"
1529 fi
1530 # end --enable-slapd
1531 # OpenLDAP --enable-cleartext
1532         # Check whether --enable-cleartext or --disable-cleartext was given.
1533 if test "${enable_cleartext+set}" = set; then
1534   enableval="$enable_cleartext"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1544         fi
1545         ol_enable_cleartext="$ol_arg"
1546
1547 else
1548         ol_enable_cleartext="yes"
1549 fi
1550 # end --enable-cleartext
1551 # OpenLDAP --enable-crypt
1552         # Check whether --enable-crypt or --disable-crypt was given.
1553 if test "${enable_crypt+set}" = set; then
1554   enableval="$enable_crypt"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1564         fi
1565         ol_enable_crypt="$ol_arg"
1566
1567 else
1568         ol_enable_crypt="auto"
1569 fi
1570 # end --enable-crypt
1571 # OpenLDAP --enable-kpasswd
1572         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1573 if test "${enable_kpasswd+set}" = set; then
1574   enableval="$enable_kpasswd"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1584         fi
1585         ol_enable_kpasswd="$ol_arg"
1586
1587 else
1588         ol_enable_kpasswd="no"
1589 fi
1590 # end --enable-kpasswd
1591 # OpenLDAP --enable-modules
1592         # Check whether --enable-modules or --disable-modules was given.
1593 if test "${enable_modules+set}" = set; then
1594   enableval="$enable_modules"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto yes no ; do
1598                 if test "$enableval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1604         fi
1605         ol_enable_modules="$ol_arg"
1606
1607 else
1608         ol_enable_modules="no"
1609 fi
1610 # end --enable-modules
1611 # OpenLDAP --enable-multimaster
1612         # Check whether --enable-multimaster or --disable-multimaster was given.
1613 if test "${enable_multimaster+set}" = set; then
1614   enableval="$enable_multimaster"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no ; do
1618                 if test "$enableval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1624         fi
1625         ol_enable_multimaster="$ol_arg"
1626
1627 else
1628         ol_enable_multimaster="no"
1629 fi
1630 # end --enable-multimaster
1631 # OpenLDAP --enable-phonetic
1632         # Check whether --enable-phonetic or --disable-phonetic was given.
1633 if test "${enable_phonetic+set}" = set; then
1634   enableval="$enable_phonetic"
1635   
1636         ol_arg=invalid
1637         for ol_val in auto yes no ; do
1638                 if test "$enableval" = "$ol_val" ; then
1639                         ol_arg="$ol_val"
1640                 fi
1641         done
1642         if test "$ol_arg" = "invalid" ; then
1643                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1644         fi
1645         ol_enable_phonetic="$ol_arg"
1646
1647 else
1648         ol_enable_phonetic="no"
1649 fi
1650 # end --enable-phonetic
1651 # OpenLDAP --enable-quipu
1652         # Check whether --enable-quipu or --disable-quipu was given.
1653 if test "${enable_quipu+set}" = set; then
1654   enableval="$enable_quipu"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1664         fi
1665         ol_enable_quipu="$ol_arg"
1666
1667 else
1668         ol_enable_quipu="no"
1669 fi
1670 # end --enable-quipu
1671 # OpenLDAP --enable-rlookups
1672         # Check whether --enable-rlookups or --disable-rlookups was given.
1673 if test "${enable_rlookups+set}" = set; then
1674   enableval="$enable_rlookups"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1684         fi
1685         ol_enable_rlookups="$ol_arg"
1686
1687 else
1688         ol_enable_rlookups="auto"
1689 fi
1690 # end --enable-rlookups
1691 # OpenLDAP --enable-aci
1692         # Check whether --enable-aci or --disable-aci was given.
1693 if test "${enable_aci+set}" = set; then
1694   enableval="$enable_aci"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1704         fi
1705         ol_enable_aci="$ol_arg"
1706
1707 else
1708         ol_enable_aci="no"
1709 fi
1710 # end --enable-aci
1711 # OpenLDAP --enable-discreteaci
1712         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1713 if test "${enable_discreteaci+set}" = set; then
1714   enableval="$enable_discreteaci"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1724         fi
1725         ol_enable_discreteaci="$ol_arg"
1726
1727 else
1728         ol_enable_discreteaci="no"
1729 fi
1730 # end --enable-discreteaci
1731 # OpenLDAP --enable-wrappers
1732         # Check whether --enable-wrappers or --disable-wrappers was given.
1733 if test "${enable_wrappers+set}" = set; then
1734   enableval="$enable_wrappers"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1744         fi
1745         ol_enable_wrappers="$ol_arg"
1746
1747 else
1748         ol_enable_wrappers="no"
1749 fi
1750 # end --enable-wrappers
1751 # OpenLDAP --enable-dynamic
1752         # Check whether --enable-dynamic or --disable-dynamic was given.
1753 if test "${enable_dynamic+set}" = set; then
1754   enableval="$enable_dynamic"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1764         fi
1765         ol_enable_dynamic="$ol_arg"
1766
1767 else
1768         ol_enable_dynamic="no"
1769 fi
1770 # end --enable-dynamic
1771
1772 # OpenLDAP --enable-bdb2
1773         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1774 if test "${enable_bdb2+set}" = set; then
1775   enableval="$enable_bdb2"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1785         fi
1786         ol_enable_bdb2="$ol_arg"
1787
1788 else
1789         ol_enable_bdb2="no"
1790 fi
1791 # end --enable-bdb2
1792 # OpenLDAP --with-bdb2_module
1793         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1794 if test "${with_bdb2_module+set}" = set; then
1795   withval="$with_bdb2_module"
1796   
1797         ol_arg=invalid
1798         for ol_val in static dynamic ; do
1799                 if test "$withval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1805         fi
1806         ol_with_bdb2_module="$ol_arg"
1807
1808 else
1809         ol_with_bdb2_module="static"
1810 fi
1811 # end --with-bdb2_module
1812
1813 # OpenLDAP --enable-ldap
1814         # Check whether --enable-ldap or --disable-ldap was given.
1815 if test "${enable_ldap+set}" = set; then
1816   enableval="$enable_ldap"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1826         fi
1827         ol_enable_ldap="$ol_arg"
1828
1829 else
1830         ol_enable_ldap="no"
1831 fi
1832 # end --enable-ldap
1833 # OpenLDAP --with-ldap_module
1834         # Check whether --with-ldap_module or --without-ldap_module was given.
1835 if test "${with_ldap_module+set}" = set; then
1836   withval="$with_ldap_module"
1837   
1838         ol_arg=invalid
1839         for ol_val in static dynamic ; do
1840                 if test "$withval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1846         fi
1847         ol_with_ldap_module="$ol_arg"
1848
1849 else
1850         ol_with_ldap_module="static"
1851 fi
1852 # end --with-ldap_module
1853
1854 # OpenLDAP --enable-ldbm
1855         # Check whether --enable-ldbm or --disable-ldbm was given.
1856 if test "${enable_ldbm+set}" = set; then
1857   enableval="$enable_ldbm"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1867         fi
1868         ol_enable_ldbm="$ol_arg"
1869
1870 else
1871         ol_enable_ldbm="yes"
1872 fi
1873 # end --enable-ldbm
1874 # OpenLDAP --with-ldbm_api
1875         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1876 if test "${with_ldbm_api+set}" = set; then
1877   withval="$with_ldbm_api"
1878   
1879         ol_arg=invalid
1880         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1881                 if test "$withval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1887         fi
1888         ol_with_ldbm_api="$ol_arg"
1889
1890 else
1891         ol_with_ldbm_api="auto"
1892 fi
1893 # end --with-ldbm_api
1894
1895 # OpenLDAP --with-ldbm_module
1896         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1897 if test "${with_ldbm_module+set}" = set; then
1898   withval="$with_ldbm_module"
1899   
1900         ol_arg=invalid
1901         for ol_val in static dynamic ; do
1902                 if test "$withval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1908         fi
1909         ol_with_ldbm_module="$ol_arg"
1910
1911 else
1912         ol_with_ldbm_module="static"
1913 fi
1914 # end --with-ldbm_module
1915
1916 # OpenLDAP --with-ldbm_type
1917         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1918 if test "${with_ldbm_type+set}" = set; then
1919   withval="$with_ldbm_type"
1920   
1921         ol_arg=invalid
1922         for ol_val in auto btree hash ; do
1923                 if test "$withval" = "$ol_val" ; then
1924                         ol_arg="$ol_val"
1925                 fi
1926         done
1927         if test "$ol_arg" = "invalid" ; then
1928                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1929         fi
1930         ol_with_ldbm_type="$ol_arg"
1931
1932 else
1933         ol_with_ldbm_type="auto"
1934 fi
1935 # end --with-ldbm_type
1936
1937
1938 # OpenLDAP --enable-passwd
1939         # Check whether --enable-passwd or --disable-passwd was given.
1940 if test "${enable_passwd+set}" = set; then
1941   enableval="$enable_passwd"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto yes no ; do
1945                 if test "$enableval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1951         fi
1952         ol_enable_passwd="$ol_arg"
1953
1954 else
1955         ol_enable_passwd="no"
1956 fi
1957 # end --enable-passwd
1958 # OpenLDAP --with-passwd_module
1959         # Check whether --with-passwd_module or --without-passwd_module was given.
1960 if test "${with_passwd_module+set}" = set; then
1961   withval="$with_passwd_module"
1962   
1963         ol_arg=invalid
1964         for ol_val in static dynamic ; do
1965                 if test "$withval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1971         fi
1972         ol_with_passwd_module="$ol_arg"
1973
1974 else
1975         ol_with_passwd_module="static"
1976 fi
1977 # end --with-passwd_module
1978
1979 # OpenLDAP --enable-perl
1980         # Check whether --enable-perl or --disable-perl was given.
1981 if test "${enable_perl+set}" = set; then
1982   enableval="$enable_perl"
1983   
1984         ol_arg=invalid
1985         for ol_val in auto yes no ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1992         fi
1993         ol_enable_perl="$ol_arg"
1994
1995 else
1996         ol_enable_perl="no"
1997 fi
1998 # end --enable-perl
1999 # OpenLDAP --with-perl_module
2000         # Check whether --with-perl_module or --without-perl_module was given.
2001 if test "${with_perl_module+set}" = set; then
2002   withval="$with_perl_module"
2003   
2004         ol_arg=invalid
2005         for ol_val in static dynamic ; do
2006                 if test "$withval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2012         fi
2013         ol_with_perl_module="$ol_arg"
2014
2015 else
2016         ol_with_perl_module="static"
2017 fi
2018 # end --with-perl_module
2019
2020 # OpenLDAP --enable-shell
2021         # Check whether --enable-shell or --disable-shell was given.
2022 if test "${enable_shell+set}" = set; then
2023   enableval="$enable_shell"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2033         fi
2034         ol_enable_shell="$ol_arg"
2035
2036 else
2037         ol_enable_shell="no"
2038 fi
2039 # end --enable-shell
2040 # OpenLDAP --with-shell_module
2041         # Check whether --with-shell_module or --without-shell_module was given.
2042 if test "${with_shell_module+set}" = set; then
2043   withval="$with_shell_module"
2044   
2045         ol_arg=invalid
2046         for ol_val in static dynamic ; do
2047                 if test "$withval" = "$ol_val" ; then
2048                         ol_arg="$ol_val"
2049                 fi
2050         done
2051         if test "$ol_arg" = "invalid" ; then
2052                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2053         fi
2054         ol_with_shell_module="$ol_arg"
2055
2056 else
2057         ol_with_shell_module="static"
2058 fi
2059 # end --with-shell_module
2060
2061 # OpenLDAP --enable-tcl
2062         # Check whether --enable-tcl or --disable-tcl was given.
2063 if test "${enable_tcl+set}" = set; then
2064   enableval="$enable_tcl"
2065   
2066         ol_arg=invalid
2067         for ol_val in auto yes no ; do
2068                 if test "$enableval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2074         fi
2075         ol_enable_tcl="$ol_arg"
2076
2077 else
2078         ol_enable_tcl="no"
2079 fi
2080 # end --enable-tcl
2081 # OpenLDAP --with-tcl_module
2082         # Check whether --with-tcl_module or --without-tcl_module was given.
2083 if test "${with_tcl_module+set}" = set; then
2084   withval="$with_tcl_module"
2085   
2086         ol_arg=invalid
2087         for ol_val in static dynamic ; do
2088                 if test "$withval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2094         fi
2095         ol_with_tcl_module="$ol_arg"
2096
2097 else
2098         ol_with_tcl_module="static"
2099 fi
2100 # end --with-tcl_module
2101
2102
2103 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2104 if test "${with_xxslurpdoptions+set}" = set; then
2105   withval="$with_xxslurpdoptions"
2106   :
2107 fi
2108
2109 # OpenLDAP --enable-slurpd
2110         # Check whether --enable-slurpd or --disable-slurpd was given.
2111 if test "${enable_slurpd+set}" = set; then
2112   enableval="$enable_slurpd"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto yes no ; do
2116                 if test "$enableval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2122         fi
2123         ol_enable_slurpd="$ol_arg"
2124
2125 else
2126         ol_enable_slurpd="auto"
2127 fi
2128 # end --enable-slurpd
2129
2130 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2131 if test "${with_xxliboptions+set}" = set; then
2132   withval="$with_xxliboptions"
2133   :
2134 fi
2135
2136 # Check whether --enable-static or --disable-static was given.
2137 if test "${enable_static+set}" = set; then
2138   enableval="$enable_static"
2139   p=${PACKAGE-default}
2140 case "$enableval" in
2141 yes) enable_static=yes ;;
2142 no) enable_static=no ;;
2143 *)
2144   enable_static=no
2145   # Look at the argument we got.  We use all the common list separators.
2146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2147   for pkg in $enableval; do
2148     if test "X$pkg" = "X$p"; then
2149       enable_static=yes
2150     fi
2151   done
2152   IFS="$ac_save_ifs"
2153   ;;
2154 esac
2155 else
2156   enable_static=yes
2157 fi
2158
2159 # Check whether --enable-shared or --disable-shared was given.
2160 if test "${enable_shared+set}" = set; then
2161   enableval="$enable_shared"
2162   p=${PACKAGE-default}
2163 case "$enableval" in
2164 yes) enable_shared=yes ;;
2165 no) enable_shared=no ;;
2166 *)
2167   enable_shared=no
2168   # Look at the argument we got.  We use all the common list separators.
2169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2170   for pkg in $enableval; do
2171     if test "X$pkg" = "X$p"; then
2172       enable_shared=yes
2173     fi
2174   done
2175   IFS="$ac_save_ifs"
2176   ;;
2177 esac
2178 else
2179   enable_shared=yes
2180 fi
2181
2182
2183
2184 # validate options
2185 if test $ol_enable_dns = yes ; then
2186         if test $ol_enable_referrals = no ; then
2187                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2188         fi
2189         if test $ol_enable_referrals = auto ; then
2190                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2191                 ol_enable_referrals=yes
2192         fi
2193 fi
2194
2195 if test $ol_enable_slapd = no ; then
2196                 if test $ol_enable_bdb2 = yes ; then
2197                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2198         fi
2199         if test $ol_enable_ldap = yes ; then
2200                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2201         fi
2202         if test $ol_enable_ldbm = yes ; then
2203                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2204         fi
2205         if test $ol_enable_passwd = yes ; then
2206                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2207         fi
2208         if test $ol_enable_perl = yes ; then
2209                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2210         fi
2211         if test $ol_enable_shell = yes ; then
2212                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2213         fi
2214         if test $ol_enable_tcl = yes ; then
2215                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2216         fi
2217         if test $ol_enable_modules = yes ; then
2218                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2219         fi
2220         if test $ol_enable_multimaster = yes ; then
2221                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2222         fi
2223         if test $ol_enable_wrappers = yes ; then
2224                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2225         fi
2226         if test $ol_enable_phonetic = yes ; then
2227                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2228         fi
2229         if test $ol_enable_quipu = yes ; then
2230                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2231         fi
2232         if test $ol_enable_rlookups = yes ; then
2233                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2234         fi
2235         if test $ol_enable_aci = yes ; then
2236                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2237         fi
2238         if test $ol_enable_discreteaci = yes ; then
2239                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2240         fi
2241         if test $ol_with_ldbm_api != auto ; then
2242                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2243         fi
2244         if test $ol_with_ldbm_type != auto ; then
2245                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2246         fi
2247         if test $ol_with_bdb2_module != static ; then
2248                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2249         fi
2250         if test $ol_with_ldap_module != static ; then
2251                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2252         fi
2253         if test $ol_with_ldbm_module != static ; then
2254                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2255         fi
2256         if test $ol_with_passwd_module != static ; then
2257                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2258         fi
2259         if test $ol_with_perl_module != static ; then
2260                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2261         fi
2262         if test $ol_with_shell_module != static ; then
2263                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2264         fi
2265         if test $ol_with_tcl_module != static ; then
2266                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2267         fi
2268         if test $ol_enable_slurpd = yes ; then
2269                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2270         fi
2271
2272         # force settings to no
2273         ol_enable_bdb2=no
2274         ol_enable_ldap=no
2275         ol_enable_ldbm=no
2276         ol_enable_passwd=no
2277         ol_enable_perl=no
2278         ol_enable_shell=no
2279         ol_enable_tcl=no
2280
2281         ol_enable_modules=no
2282         ol_enable_multimaster=no
2283         ol_enable_phonetic=no
2284         ol_enable_quipu=no
2285         ol_enable_rlookups=no
2286         ol_enable_aci=no
2287         ol_enable_discreteaci=no
2288         ol_enable_wrappers=no
2289         ol_enable_dynamic=no
2290
2291         ol_with_ldbm_api=no
2292         ol_with_ldbm_type=no
2293
2294         ol_with_bdb2_module=static
2295         ol_with_ldap_module=static
2296         ol_with_ldbm_module=static
2297         ol_with_passwd_module=static
2298         ol_with_perl_module=static
2299         ol_with_shell_module=static
2300         ol_with_tcl_module=static
2301
2302         ol_enable_slurpd=no
2303
2304 elif test $ol_enable_ldbm = no ; then
2305         
2306         if test $ol_with_ldbm_api != auto ; then
2307                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2308         fi
2309
2310         if test $ol_with_ldbm_type != auto ; then
2311                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2312         fi
2313
2314         if test $ol_with_ldbm_module != static ; then
2315                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2316         fi
2317
2318         if test $ol_enable_bdb2 = yes ; then
2319                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2320         fi
2321
2322         if test $ol_enable_modules != yes -a \
2323                 $ol_enable_ldap = no -a \
2324                 $ol_enable_passwd = no -a \
2325                 $ol_enable_perl = no -a \
2326                 $ol_enable_shell = no -a \
2327                 $ol_enable_tcl = no ; then
2328                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2329         fi
2330
2331         ol_with_ldbm_api=no
2332         ol_with_ldbm_type=no
2333         ol_with_ldbm_module=static
2334
2335 elif test $ol_enable_bdb2 = yes ; then
2336         
2337         if test $ol_with_ldbm_api != auto -a \
2338                 $ol_with_ldbm_api != db2 ; then
2339                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2340         fi
2341
2342         ol_with_ldbm_api=db2
2343
2344 else
2345         
2346         if test $ol_enable_bdb2 != no ; then
2347                 if test $ol_with_ldbm_api != auto -a \
2348                         $ol_with_ldbm_api != db2 ; then
2349                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2350                         ol_enable_bdb2=no
2351                 fi
2352         fi
2353
2354         if test $ol_with_ldbm_api = gdbm -a \
2355                 $ol_with_ldbm_type = btree ; then
2356                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2357         fi
2358         if test $ol_with_ldbm_api = mdbm -a \
2359                 $ol_with_ldbm_type = btree ; then
2360                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2361         fi
2362         if test $ol_with_ldbm_api = ndbm -a \
2363                 $ol_with_ldbm_type = btree ; then
2364                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2365         fi
2366 fi
2367
2368 if test $ol_enable_slurpd = yes ; then
2369                 if test $ol_with_threads = no ; then
2370                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2371         fi
2372 fi
2373
2374 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2375         if test $ol_with_kerberos = no ; then
2376                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2377         fi
2378 fi
2379
2380 echo "$ac_t""done" 1>&6
2381
2382 LDAP_LIBS=
2383 LDIF_LIBS=
2384 LDBM_LIBS=
2385 LTHREAD_LIBS=
2386 LUTIL_LIBS=
2387
2388 LDAPD_LIBS=
2389 SLAPD_LIBS=
2390 SLURPD_LIBS=
2391
2392 BUILD_LDAPD=no
2393 BUILD_SLAPD=no
2394 BUILD_SLURPD=no
2395
2396 BUILD_BDB2=no
2397 BUILD_LDAP=no
2398 BUILD_LDBM=no
2399 BUILD_PASSWD=no
2400 BUILD_PERL=no
2401 BUILD_QUIPU=no
2402 BUILD_SHELL=no
2403 BUILD_TCL=no
2404 BUILD_THREAD=no
2405
2406 BUILD_BDB2_DYNAMIC=static
2407 BUILD_LDAP_DYNAMIC=static
2408 BUILD_LDBM_DYNAMIC=static
2409 BUILD_PASSWD_DYNAMIC=static
2410 BUILD_PERL_DYNAMIC=static
2411 BUILD_SHELL_DYNAMIC=static
2412 BUILD_TCL_DYNAMIC=static
2413
2414 SLAPD_MODULES_LDFLAGS=
2415 SLAPD_MODULES_CPPFLAGS=
2416 SLAPD_MODULES_LIST=
2417
2418 SLAPD_PERL_LDFLAGS=
2419 MOD_PERL_LDFLAGS=
2420 PERL_CPPFLAGS=
2421
2422 MOD_TCL_LIB=
2423 KRB4_LIBS=
2424 KRB5_LIBS=
2425 READLINE_LIBS=
2426 SASL_LIBS=
2427 TERMCAP_LIBS=
2428 TLS_LIBS=
2429 MODULES_LIBS=
2430
2431
2432
2433 cat >> confdefs.h <<\EOF
2434 #define HAVE_MKVERSION 1
2435 EOF
2436
2437
2438
2439
2440 ol_aix_threads=no
2441 case "$target" in
2442 *-*-aix*)       if test -z "$CC" ; then
2443                 case "$ol_with_threads" in
2444                 auto | yes |  posix) ol_aix_threads=yes ;;
2445                 esac
2446         fi
2447 ;;
2448 esac
2449
2450 if test $ol_aix_threads = yes ; then
2451         if test -z "${CC}" ; then
2452                 for ac_prog in cc_r xlc_r cc
2453 do
2454 # Extract the first word of "$ac_prog", so it can be a program name with args.
2455 set dummy $ac_prog; ac_word=$2
2456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2457 echo "configure:2458: checking for $ac_word" >&5
2458 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2459   echo $ac_n "(cached) $ac_c" 1>&6
2460 else
2461   if test -n "$CC"; then
2462   ac_cv_prog_CC="$CC" # Let the user override the test.
2463 else
2464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2465   ac_dummy="$PATH"
2466   for ac_dir in $ac_dummy; do
2467     test -z "$ac_dir" && ac_dir=.
2468     if test -f $ac_dir/$ac_word; then
2469       ac_cv_prog_CC="$ac_prog"
2470       break
2471     fi
2472   done
2473   IFS="$ac_save_ifs"
2474 fi
2475 fi
2476 CC="$ac_cv_prog_CC"
2477 if test -n "$CC"; then
2478   echo "$ac_t""$CC" 1>&6
2479 else
2480   echo "$ac_t""no" 1>&6
2481 fi
2482
2483 test -n "$CC" && break
2484 done
2485
2486
2487                 if test "$CC" = cc ; then
2488                                                 if test $ol_with_threads != auto ; then
2489                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2490                         else
2491                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2492                         fi
2493                         ol_with_threads=no
2494                 fi
2495         fi
2496
2497         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2498                 ol_with_threads=posix
2499                 ol_cv_pthread_create=yes
2500         fi
2501 fi
2502
2503 if test -z "${CC}"; then
2504         for ac_prog in cc
2505 do
2506 # Extract the first word of "$ac_prog", so it can be a program name with args.
2507 set dummy $ac_prog; ac_word=$2
2508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2509 echo "configure:2510: checking for $ac_word" >&5
2510 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2511   echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513   if test -n "$CC"; then
2514   ac_cv_prog_CC="$CC" # Let the user override the test.
2515 else
2516   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2517   ac_dummy="$PATH"
2518   for ac_dir in $ac_dummy; do
2519     test -z "$ac_dir" && ac_dir=.
2520     if test -f $ac_dir/$ac_word; then
2521       ac_cv_prog_CC="$ac_prog"
2522       break
2523     fi
2524   done
2525   IFS="$ac_save_ifs"
2526 fi
2527 fi
2528 CC="$ac_cv_prog_CC"
2529 if test -n "$CC"; then
2530   echo "$ac_t""$CC" 1>&6
2531 else
2532   echo "$ac_t""no" 1>&6
2533 fi
2534
2535 test -n "$CC" && break
2536 done
2537
2538 fi
2539
2540
2541
2542
2543 # Check whether --enable-fast-install or --disable-fast-install was given.
2544 if test "${enable_fast_install+set}" = set; then
2545   enableval="$enable_fast_install"
2546   p=${PACKAGE-default}
2547 case "$enableval" in
2548 yes) enable_fast_install=yes ;;
2549 no) enable_fast_install=no ;;
2550 *)
2551   enable_fast_install=no
2552   # Look at the argument we got.  We use all the common list separators.
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2554   for pkg in $enableval; do
2555     if test "X$pkg" = "X$p"; then
2556       enable_fast_install=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_fast_install=yes
2564 fi
2565
2566 # Extract the first word of "ranlib", so it can be a program name with args.
2567 set dummy ranlib; ac_word=$2
2568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2569 echo "configure:2570: checking for $ac_word" >&5
2570 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2571   echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573   if test -n "$RANLIB"; then
2574   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2575 else
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2577   ac_dummy="$PATH"
2578   for ac_dir in $ac_dummy; do
2579     test -z "$ac_dir" && ac_dir=.
2580     if test -f $ac_dir/$ac_word; then
2581       ac_cv_prog_RANLIB="ranlib"
2582       break
2583     fi
2584   done
2585   IFS="$ac_save_ifs"
2586   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2587 fi
2588 fi
2589 RANLIB="$ac_cv_prog_RANLIB"
2590 if test -n "$RANLIB"; then
2591   echo "$ac_t""$RANLIB" 1>&6
2592 else
2593   echo "$ac_t""no" 1>&6
2594 fi
2595
2596 # Extract the first word of "gcc", so it can be a program name with args.
2597 set dummy gcc; ac_word=$2
2598 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2599 echo "configure:2600: checking for $ac_word" >&5
2600 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2601   echo $ac_n "(cached) $ac_c" 1>&6
2602 else
2603   if test -n "$CC"; then
2604   ac_cv_prog_CC="$CC" # Let the user override the test.
2605 else
2606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2607   ac_dummy="$PATH"
2608   for ac_dir in $ac_dummy; do
2609     test -z "$ac_dir" && ac_dir=.
2610     if test -f $ac_dir/$ac_word; then
2611       ac_cv_prog_CC="gcc"
2612       break
2613     fi
2614   done
2615   IFS="$ac_save_ifs"
2616 fi
2617 fi
2618 CC="$ac_cv_prog_CC"
2619 if test -n "$CC"; then
2620   echo "$ac_t""$CC" 1>&6
2621 else
2622   echo "$ac_t""no" 1>&6
2623 fi
2624
2625 if test -z "$CC"; then
2626   # Extract the first word of "cc", so it can be a program name with args.
2627 set dummy cc; ac_word=$2
2628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2629 echo "configure:2630: checking for $ac_word" >&5
2630 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2631   echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633   if test -n "$CC"; then
2634   ac_cv_prog_CC="$CC" # Let the user override the test.
2635 else
2636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2637   ac_prog_rejected=no
2638   ac_dummy="$PATH"
2639   for ac_dir in $ac_dummy; do
2640     test -z "$ac_dir" && ac_dir=.
2641     if test -f $ac_dir/$ac_word; then
2642       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2643         ac_prog_rejected=yes
2644         continue
2645       fi
2646       ac_cv_prog_CC="cc"
2647       break
2648     fi
2649   done
2650   IFS="$ac_save_ifs"
2651 if test $ac_prog_rejected = yes; then
2652   # We found a bogon in the path, so make sure we never use it.
2653   set dummy $ac_cv_prog_CC
2654   shift
2655   if test $# -gt 0; then
2656     # We chose a different compiler from the bogus one.
2657     # However, it has the same basename, so the bogon will be chosen
2658     # first if we set CC to just the basename; use the full file name.
2659     shift
2660     set dummy "$ac_dir/$ac_word" "$@"
2661     shift
2662     ac_cv_prog_CC="$@"
2663   fi
2664 fi
2665 fi
2666 fi
2667 CC="$ac_cv_prog_CC"
2668 if test -n "$CC"; then
2669   echo "$ac_t""$CC" 1>&6
2670 else
2671   echo "$ac_t""no" 1>&6
2672 fi
2673
2674   if test -z "$CC"; then
2675     case "`uname -s`" in
2676     *win32* | *WIN32*)
2677       # Extract the first word of "cl", so it can be a program name with args.
2678 set dummy cl; ac_word=$2
2679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2680 echo "configure:2681: checking for $ac_word" >&5
2681 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   if test -n "$CC"; then
2685   ac_cv_prog_CC="$CC" # Let the user override the test.
2686 else
2687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2688   ac_dummy="$PATH"
2689   for ac_dir in $ac_dummy; do
2690     test -z "$ac_dir" && ac_dir=.
2691     if test -f $ac_dir/$ac_word; then
2692       ac_cv_prog_CC="cl"
2693       break
2694     fi
2695   done
2696   IFS="$ac_save_ifs"
2697 fi
2698 fi
2699 CC="$ac_cv_prog_CC"
2700 if test -n "$CC"; then
2701   echo "$ac_t""$CC" 1>&6
2702 else
2703   echo "$ac_t""no" 1>&6
2704 fi
2705  ;;
2706     esac
2707   fi
2708   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2709 fi
2710
2711 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2712 echo "configure:2713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2713
2714 ac_ext=c
2715 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2716 ac_cpp='$CPP $CPPFLAGS'
2717 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2718 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2719 cross_compiling=$ac_cv_prog_cc_cross
2720
2721 cat > conftest.$ac_ext << EOF
2722
2723 #line 2724 "configure"
2724 #include "confdefs.h"
2725
2726 main(){return(0);}
2727 EOF
2728 if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2729   ac_cv_prog_cc_works=yes
2730   # If we can't run a trivial program, we are probably using a cross compiler.
2731   if (./conftest; exit) 2>/dev/null; then
2732     ac_cv_prog_cc_cross=no
2733   else
2734     ac_cv_prog_cc_cross=yes
2735   fi
2736 else
2737   echo "configure: failed program was:" >&5
2738   cat conftest.$ac_ext >&5
2739   ac_cv_prog_cc_works=no
2740 fi
2741 rm -fr conftest*
2742 ac_ext=c
2743 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2744 ac_cpp='$CPP $CPPFLAGS'
2745 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2746 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2747 cross_compiling=$ac_cv_prog_cc_cross
2748
2749 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2750 if test $ac_cv_prog_cc_works = no; then
2751   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2752 fi
2753 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2754 echo "configure:2755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2755 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2756 cross_compiling=$ac_cv_prog_cc_cross
2757
2758 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2759 echo "configure:2760: checking whether we are using GNU C" >&5
2760 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   cat > conftest.c <<EOF
2764 #ifdef __GNUC__
2765   yes;
2766 #endif
2767 EOF
2768 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2769   ac_cv_prog_gcc=yes
2770 else
2771   ac_cv_prog_gcc=no
2772 fi
2773 fi
2774
2775 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2776
2777 if test $ac_cv_prog_gcc = yes; then
2778   GCC=yes
2779 else
2780   GCC=
2781 fi
2782
2783 ac_test_CFLAGS="${CFLAGS+set}"
2784 ac_save_CFLAGS="$CFLAGS"
2785 CFLAGS=
2786 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2787 echo "configure:2788: checking whether ${CC-cc} accepts -g" >&5
2788 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2789   echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791   echo 'void f(){}' > conftest.c
2792 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2793   ac_cv_prog_cc_g=yes
2794 else
2795   ac_cv_prog_cc_g=no
2796 fi
2797 rm -f conftest*
2798
2799 fi
2800
2801 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2802 if test "$ac_test_CFLAGS" = set; then
2803   CFLAGS="$ac_save_CFLAGS"
2804 elif test $ac_cv_prog_cc_g = yes; then
2805   if test "$GCC" = yes; then
2806     CFLAGS="-g -O2"
2807   else
2808     CFLAGS="-g"
2809   fi
2810 else
2811   if test "$GCC" = yes; then
2812     CFLAGS="-O2"
2813   else
2814     CFLAGS=
2815   fi
2816 fi
2817
2818 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2819 if test "${with_gnu_ld+set}" = set; then
2820   withval="$with_gnu_ld"
2821   test "$withval" = no || with_gnu_ld=yes
2822 else
2823   with_gnu_ld=no
2824 fi
2825
2826 ac_prog=ld
2827 if test "$ac_cv_prog_gcc" = yes; then
2828   # Check if gcc -print-prog-name=ld gives a path.
2829   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2830 echo "configure:2831: checking for ld used by GCC" >&5
2831   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2832   case "$ac_prog" in
2833     # Accept absolute paths.
2834     [\\/]* | [A-Za-z]:[\\/]*)
2835       re_direlt='/[^/][^/]*/\.\./'
2836       # Canonicalize the path of ld
2837       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2838       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2839         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2840       done
2841       test -z "$LD" && LD="$ac_prog"
2842       ;;
2843   "")
2844     # If it fails, then pretend we aren't using GCC.
2845     ac_prog=ld
2846     ;;
2847   *)
2848     # If it is relative, then search for the first ld in PATH.
2849     with_gnu_ld=unknown
2850     ;;
2851   esac
2852 elif test "$with_gnu_ld" = yes; then
2853   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2854 echo "configure:2855: checking for GNU ld" >&5
2855 else
2856   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2857 echo "configure:2858: checking for non-GNU ld" >&5
2858 fi
2859 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2860   echo $ac_n "(cached) $ac_c" 1>&6
2861 else
2862   if test -z "$LD"; then
2863   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2864   for ac_dir in $PATH; do
2865     test -z "$ac_dir" && ac_dir=.
2866     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2867       ac_cv_path_LD="$ac_dir/$ac_prog"
2868       # Check to see if the program is GNU ld.  I'd rather use --version,
2869       # but apparently some GNU ld's only accept -v.
2870       # Break only if it was the GNU/non-GNU ld that we prefer.
2871       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2872         test "$with_gnu_ld" != no && break
2873       else
2874         test "$with_gnu_ld" != yes && break
2875       fi
2876     fi
2877   done
2878   IFS="$ac_save_ifs"
2879 else
2880   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2881 fi
2882 fi
2883
2884 LD="$ac_cv_path_LD"
2885 if test -n "$LD"; then
2886   echo "$ac_t""$LD" 1>&6
2887 else
2888   echo "$ac_t""no" 1>&6
2889 fi
2890 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2891
2892 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2893 echo "configure:2894: checking if the linker ($LD) is GNU ld" >&5
2894 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2895   echo $ac_n "(cached) $ac_c" 1>&6
2896 else
2897   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2898 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2899   ac_cv_prog_gnu_ld=yes
2900 else
2901   ac_cv_prog_gnu_ld=no
2902 fi
2903 fi
2904
2905 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2906
2907
2908 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2909 echo "configure:2910: checking for BSD-compatible nm" >&5
2910 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   if test -n "$NM"; then
2914   # Let the user override the test.
2915   ac_cv_path_NM="$NM"
2916 else
2917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2918   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2919     test -z "$ac_dir" && ac_dir=.
2920     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2921       # Check to see if the nm accepts a BSD-compat flag.
2922       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2923       #   nm: unknown option "B" ignored
2924       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2925         ac_cv_path_NM="$ac_dir/nm -B"
2926         break
2927       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2928         ac_cv_path_NM="$ac_dir/nm -p"
2929         break
2930       else
2931         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2932         continue # so that we can try to find one that supports BSD flags
2933       fi
2934     fi
2935   done
2936   IFS="$ac_save_ifs"
2937   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2938 fi
2939 fi
2940
2941 NM="$ac_cv_path_NM"
2942 echo "$ac_t""$NM" 1>&6
2943
2944
2945 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2946 echo "configure:2947: checking whether ln -s works" >&5
2947 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2948   echo $ac_n "(cached) $ac_c" 1>&6
2949 else
2950   rm -f conftestdata
2951 if ln -s X conftestdata 2>/dev/null
2952 then
2953   rm -f conftestdata
2954   ac_cv_prog_LN_S="ln -s"
2955 else
2956   ac_cv_prog_LN_S=ln
2957 fi
2958 fi
2959 LN_S="$ac_cv_prog_LN_S"
2960 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2961   echo "$ac_t""yes" 1>&6
2962 else
2963   echo "$ac_t""no" 1>&6
2964 fi
2965
2966 if test $host != $build; then
2967   ac_tool_prefix=${host_alias}-
2968 else
2969   ac_tool_prefix=
2970 fi
2971
2972
2973 # Check for any special flags to pass to ltconfig.
2974 libtool_flags="--cache-file=$cache_file"
2975 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2976 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2977 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2978 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2979 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2980 libtool_flags="$libtool_flags --enable-dlopen"
2981 libtool_flags="$libtool_flags --enable-win32-dll"
2982 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2983 if test "${enable_libtool_lock+set}" = set; then
2984   enableval="$enable_libtool_lock"
2985   :
2986 fi
2987
2988 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2989 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2990
2991 # Some flags need to be propagated to the compiler or linker for good
2992 # libtool support.
2993 case "$host" in
2994 *-*-irix6*)
2995   # Find out which ABI we are using.
2996   echo '#line 2997 "configure"' > conftest.$ac_ext
2997   if { (eval echo configure:2998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2998     case "`/usr/bin/file conftest.o`" in
2999     *32-bit*)
3000       LD="${LD-ld} -32"
3001       ;;
3002     *N32*)
3003       LD="${LD-ld} -n32"
3004       ;;
3005     *64-bit*)
3006       LD="${LD-ld} -64"
3007       ;;
3008     esac
3009   fi
3010   rm -rf conftest*
3011   ;;
3012
3013 *-*-sco3.2v5*)
3014   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3015   SAVE_CFLAGS="$CFLAGS"
3016   CFLAGS="$CFLAGS -belf"
3017   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3018 echo "configure:3019: checking whether the C compiler needs -belf" >&5
3019 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
3020   echo $ac_n "(cached) $ac_c" 1>&6
3021 else
3022   cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025
3026 int main() {
3027
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3031   rm -rf conftest*
3032   lt_cv_cc_needs_belf=yes
3033 else
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   lt_cv_cc_needs_belf=no
3038 fi
3039 rm -f conftest*
3040 fi
3041
3042 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3043   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3044     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3045     CFLAGS="$SAVE_CFLAGS"
3046   fi
3047   ;;
3048
3049 *-*-cygwin* | *-*-mingw*)
3050   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3051 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3052 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3053 echo "configure:3054: checking for $ac_word" >&5
3054 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   if test -n "$DLLTOOL"; then
3058   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3059 else
3060   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3061   ac_dummy="$PATH"
3062   for ac_dir in $ac_dummy; do
3063     test -z "$ac_dir" && ac_dir=.
3064     if test -f $ac_dir/$ac_word; then
3065       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3066       break
3067     fi
3068   done
3069   IFS="$ac_save_ifs"
3070 fi
3071 fi
3072 DLLTOOL="$ac_cv_prog_DLLTOOL"
3073 if test -n "$DLLTOOL"; then
3074   echo "$ac_t""$DLLTOOL" 1>&6
3075 else
3076   echo "$ac_t""no" 1>&6
3077 fi
3078
3079
3080 if test -z "$ac_cv_prog_DLLTOOL"; then
3081 if test -n "$ac_tool_prefix"; then
3082   # Extract the first word of "dlltool", so it can be a program name with args.
3083 set dummy dlltool; ac_word=$2
3084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3085 echo "configure:3086: checking for $ac_word" >&5
3086 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3087   echo $ac_n "(cached) $ac_c" 1>&6
3088 else
3089   if test -n "$DLLTOOL"; then
3090   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3091 else
3092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3093   ac_dummy="$PATH"
3094   for ac_dir in $ac_dummy; do
3095     test -z "$ac_dir" && ac_dir=.
3096     if test -f $ac_dir/$ac_word; then
3097       ac_cv_prog_DLLTOOL="dlltool"
3098       break
3099     fi
3100   done
3101   IFS="$ac_save_ifs"
3102   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3103 fi
3104 fi
3105 DLLTOOL="$ac_cv_prog_DLLTOOL"
3106 if test -n "$DLLTOOL"; then
3107   echo "$ac_t""$DLLTOOL" 1>&6
3108 else
3109   echo "$ac_t""no" 1>&6
3110 fi
3111
3112 else
3113   DLLTOOL="false"
3114 fi
3115 fi
3116
3117   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3118 set dummy ${ac_tool_prefix}as; ac_word=$2
3119 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3120 echo "configure:3121: checking for $ac_word" >&5
3121 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3122   echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124   if test -n "$AS"; then
3125   ac_cv_prog_AS="$AS" # Let the user override the test.
3126 else
3127   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3128   ac_dummy="$PATH"
3129   for ac_dir in $ac_dummy; do
3130     test -z "$ac_dir" && ac_dir=.
3131     if test -f $ac_dir/$ac_word; then
3132       ac_cv_prog_AS="${ac_tool_prefix}as"
3133       break
3134     fi
3135   done
3136   IFS="$ac_save_ifs"
3137 fi
3138 fi
3139 AS="$ac_cv_prog_AS"
3140 if test -n "$AS"; then
3141   echo "$ac_t""$AS" 1>&6
3142 else
3143   echo "$ac_t""no" 1>&6
3144 fi
3145
3146
3147 if test -z "$ac_cv_prog_AS"; then
3148 if test -n "$ac_tool_prefix"; then
3149   # Extract the first word of "as", so it can be a program name with args.
3150 set dummy as; ac_word=$2
3151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3152 echo "configure:3153: checking for $ac_word" >&5
3153 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   if test -n "$AS"; then
3157   ac_cv_prog_AS="$AS" # Let the user override the test.
3158 else
3159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3160   ac_dummy="$PATH"
3161   for ac_dir in $ac_dummy; do
3162     test -z "$ac_dir" && ac_dir=.
3163     if test -f $ac_dir/$ac_word; then
3164       ac_cv_prog_AS="as"
3165       break
3166     fi
3167   done
3168   IFS="$ac_save_ifs"
3169   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3170 fi
3171 fi
3172 AS="$ac_cv_prog_AS"
3173 if test -n "$AS"; then
3174   echo "$ac_t""$AS" 1>&6
3175 else
3176   echo "$ac_t""no" 1>&6
3177 fi
3178
3179 else
3180   AS="false"
3181 fi
3182 fi
3183
3184   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3185 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3186 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3187 echo "configure:3188: checking for $ac_word" >&5
3188 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3189   echo $ac_n "(cached) $ac_c" 1>&6
3190 else
3191   if test -n "$OBJDUMP"; then
3192   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3193 else
3194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3195   ac_dummy="$PATH"
3196   for ac_dir in $ac_dummy; do
3197     test -z "$ac_dir" && ac_dir=.
3198     if test -f $ac_dir/$ac_word; then
3199       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3200       break
3201     fi
3202   done
3203   IFS="$ac_save_ifs"
3204 fi
3205 fi
3206 OBJDUMP="$ac_cv_prog_OBJDUMP"
3207 if test -n "$OBJDUMP"; then
3208   echo "$ac_t""$OBJDUMP" 1>&6
3209 else
3210   echo "$ac_t""no" 1>&6
3211 fi
3212
3213
3214 if test -z "$ac_cv_prog_OBJDUMP"; then
3215 if test -n "$ac_tool_prefix"; then
3216   # Extract the first word of "objdump", so it can be a program name with args.
3217 set dummy objdump; ac_word=$2
3218 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3219 echo "configure:3220: checking for $ac_word" >&5
3220 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3221   echo $ac_n "(cached) $ac_c" 1>&6
3222 else
3223   if test -n "$OBJDUMP"; then
3224   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3225 else
3226   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3227   ac_dummy="$PATH"
3228   for ac_dir in $ac_dummy; do
3229     test -z "$ac_dir" && ac_dir=.
3230     if test -f $ac_dir/$ac_word; then
3231       ac_cv_prog_OBJDUMP="objdump"
3232       break
3233     fi
3234   done
3235   IFS="$ac_save_ifs"
3236   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3237 fi
3238 fi
3239 OBJDUMP="$ac_cv_prog_OBJDUMP"
3240 if test -n "$OBJDUMP"; then
3241   echo "$ac_t""$OBJDUMP" 1>&6
3242 else
3243   echo "$ac_t""no" 1>&6
3244 fi
3245
3246 else
3247   OBJDUMP="false"
3248 fi
3249 fi
3250
3251   ;;
3252
3253 esac
3254
3255
3256 # Save cache, so that ltconfig can load it
3257
3258
3259 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3260 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3261 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3262 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3263 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3264 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3265 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3266 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3267
3268 # Reload cache, that may have been modified by ltconfig
3269
3270
3271 # This can be used to rebuild libtool when needed
3272 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3273
3274 # Always use our own libtool.
3275 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3276
3277 # Redirect the config.log output again, so that the ltconfig log is not
3278 # clobbered by the next message.
3279 exec 5>>./config.log
3280
3281
3282 for ac_prog in mawk gawk nawk awk
3283 do
3284 # Extract the first word of "$ac_prog", so it can be a program name with args.
3285 set dummy $ac_prog; ac_word=$2
3286 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3287 echo "configure:3288: checking for $ac_word" >&5
3288 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   if test -n "$AWK"; then
3292   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3293 else
3294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3295   ac_dummy="$PATH"
3296   for ac_dir in $ac_dummy; do
3297     test -z "$ac_dir" && ac_dir=.
3298     if test -f $ac_dir/$ac_word; then
3299       ac_cv_prog_AWK="$ac_prog"
3300       break
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304 fi
3305 fi
3306 AWK="$ac_cv_prog_AWK"
3307 if test -n "$AWK"; then
3308   echo "$ac_t""$AWK" 1>&6
3309 else
3310   echo "$ac_t""no" 1>&6
3311 fi
3312
3313 test -n "$AWK" && break
3314 done
3315
3316 # test for ln hardlink support
3317 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3318 echo "configure:3319: checking whether ln works" >&5
3319 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
3320   echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322   rm -f conftest.src conftest.dst
3323 echo "conftest" > conftest.src
3324 if ln conftest.src conftest.dst 2>/dev/null
3325 then
3326   ol_cv_prog_LN_H="ln"
3327 else
3328   ol_cv_prog_LN_H="cp"
3329 fi
3330 rm -f conftest.src conftest.dst
3331
3332 fi
3333 LN_H="$ol_cv_prog_LN_H"
3334 if test "$ol_cv_prog_LN_H" = "ln"; then
3335         echo "$ac_t""yes" 1>&6
3336 else
3337         echo "$ac_t""no" 1>&6
3338 fi
3339
3340 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3341 echo "configure:3342: checking whether ln -s works" >&5
3342 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3343   echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345   rm -f conftestdata
3346 if ln -s X conftestdata 2>/dev/null
3347 then
3348   rm -f conftestdata
3349   ac_cv_prog_LN_S="ln -s"
3350 else
3351   ac_cv_prog_LN_S=ln
3352 fi
3353 fi
3354 LN_S="$ac_cv_prog_LN_S"
3355 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3356   echo "$ac_t""yes" 1>&6
3357 else
3358   echo "$ac_t""no" 1>&6
3359 fi
3360
3361
3362 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3363         LN_S="$LN_H"
3364 fi
3365
3366 # Extract the first word of "sendmail", so it can be a program name with args.
3367 set dummy sendmail; ac_word=$2
3368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3369 echo "configure:3370: checking for $ac_word" >&5
3370 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   case "$SENDMAIL" in
3374   /*)
3375   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3376   ;;
3377   ?:/*)                  
3378   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3379   ;;
3380   *)
3381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3382   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3383   for ac_dir in $ac_dummy; do 
3384     test -z "$ac_dir" && ac_dir=.
3385     if test -f $ac_dir/$ac_word; then
3386       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3387       break
3388     fi
3389   done
3390   IFS="$ac_save_ifs"
3391   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3392   ;;
3393 esac
3394 fi
3395 SENDMAIL="$ac_cv_path_SENDMAIL"
3396 if test -n "$SENDMAIL"; then
3397   echo "$ac_t""$SENDMAIL" 1>&6
3398 else
3399   echo "$ac_t""no" 1>&6
3400 fi
3401
3402 # Extract the first word of "vi", so it can be a program name with args.
3403 set dummy vi; ac_word=$2
3404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3405 echo "configure:3406: checking for $ac_word" >&5
3406 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   case "$EDITOR" in
3410   /*)
3411   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3412   ;;
3413   ?:/*)                  
3414   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3415   ;;
3416   *)
3417   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3418   ac_dummy="$PATH:/usr/ucb"
3419   for ac_dir in $ac_dummy; do 
3420     test -z "$ac_dir" && ac_dir=.
3421     if test -f $ac_dir/$ac_word; then
3422       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3423       break
3424     fi
3425   done
3426   IFS="$ac_save_ifs"
3427   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3428   ;;
3429 esac
3430 fi
3431 EDITOR="$ac_cv_path_EDITOR"
3432 if test -n "$EDITOR"; then
3433   echo "$ac_t""$EDITOR" 1>&6
3434 else
3435   echo "$ac_t""no" 1>&6
3436 fi
3437
3438 # Extract the first word of "finger", so it can be a program name with args.
3439 set dummy finger; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   case "$FINGER" in
3446   /*)
3447   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3448   ;;
3449   ?:/*)                  
3450   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3451   ;;
3452   *)
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH:/usr/ucb"
3455   for ac_dir in $ac_dummy; do 
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_path_FINGER="$ac_dir/$ac_word"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3464   ;;
3465 esac
3466 fi
3467 FINGER="$ac_cv_path_FINGER"
3468 if test -n "$FINGER"; then
3469   echo "$ac_t""$FINGER" 1>&6
3470 else
3471   echo "$ac_t""no" 1>&6
3472 fi
3473
3474
3475 ol_link_perl=no
3476 if test $ol_enable_perl != no ; then
3477         # Extract the first word of "perl", so it can be a program name with args.
3478 set dummy perl; ac_word=$2
3479 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3480 echo "configure:3481: checking for $ac_word" >&5
3481 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
3482   echo $ac_n "(cached) $ac_c" 1>&6
3483 else
3484   case "$PERLBIN" in
3485   /*)
3486   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3487   ;;
3488   ?:/*)                  
3489   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3490   ;;
3491   *)
3492   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3493   ac_dummy="$PATH"
3494   for ac_dir in $ac_dummy; do 
3495     test -z "$ac_dir" && ac_dir=.
3496     if test -f $ac_dir/$ac_word; then
3497       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3498       break
3499     fi
3500   done
3501   IFS="$ac_save_ifs"
3502   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3503   ;;
3504 esac
3505 fi
3506 PERLBIN="$ac_cv_path_PERLBIN"
3507 if test -n "$PERLBIN"; then
3508   echo "$ac_t""$PERLBIN" 1>&6
3509 else
3510   echo "$ac_t""no" 1>&6
3511 fi
3512
3513
3514         if test "no$PERLBIN" = "no" ; then
3515                 if test $ol_enable_perl = yes ; then
3516                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3517                 fi
3518
3519         else
3520                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3521                 if test x"$ol_with_perl_module" = "xstatic" ; then
3522                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3523                 else
3524                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3525                 fi
3526                                 ol_link_perl=yes
3527         fi
3528 fi
3529
3530 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3531 echo "configure:3532: checking how to run the C preprocessor" >&5
3532 # On Suns, sometimes $CPP names a directory.
3533 if test -n "$CPP" && test -d "$CPP"; then
3534   CPP=
3535 fi
3536 if test -z "$CPP"; then
3537 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540     # This must be in double quotes, not single quotes, because CPP may get
3541   # substituted into the Makefile and "${CC-cc}" will confuse make.
3542   CPP="${CC-cc} -E"
3543   # On the NeXT, cc -E runs the code through the compiler's parser,
3544   # not just through cpp.
3545   cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548 #include <assert.h>
3549 Syntax Error
3550 EOF
3551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3552 { (eval echo configure:3553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3554 if test -z "$ac_err"; then
3555   :
3556 else
3557   echo "$ac_err" >&5
3558   echo "configure: failed program was:" >&5
3559   cat conftest.$ac_ext >&5
3560   rm -rf conftest*
3561   CPP="${CC-cc} -E -traditional-cpp"
3562   cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565 #include <assert.h>
3566 Syntax Error
3567 EOF
3568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3569 { (eval echo configure:3570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3571 if test -z "$ac_err"; then
3572   :
3573 else
3574   echo "$ac_err" >&5
3575   echo "configure: failed program was:" >&5
3576   cat conftest.$ac_ext >&5
3577   rm -rf conftest*
3578   CPP="${CC-cc} -nologo -E"
3579   cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <assert.h>
3583 Syntax Error
3584 EOF
3585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3586 { (eval echo configure:3587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3588 if test -z "$ac_err"; then
3589   :
3590 else
3591   echo "$ac_err" >&5
3592   echo "configure: failed program was:" >&5
3593   cat conftest.$ac_ext >&5
3594   rm -rf conftest*
3595   CPP=/lib/cpp
3596 fi
3597 rm -f conftest*
3598 fi
3599 rm -f conftest*
3600 fi
3601 rm -f conftest*
3602   ac_cv_prog_CPP="$CPP"
3603 fi
3604   CPP="$ac_cv_prog_CPP"
3605 else
3606   ac_cv_prog_CPP="$CPP"
3607 fi
3608 echo "$ac_t""$CPP" 1>&6
3609
3610
3611 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3612         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3613
3614 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3615         echo "configure: warning: programs compiled here do run here..." 1>&2
3616         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3617
3618 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3619         echo "configure: warning: programs compiled here do not run here..." 1>&2
3620         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3621 fi
3622
3623 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3624 echo "configure:3625: checking for AIX" >&5
3625 cat > conftest.$ac_ext <<EOF
3626 #line 3627 "configure"
3627 #include "confdefs.h"
3628 #ifdef _AIX
3629   yes
3630 #endif
3631
3632 EOF
3633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3634   egrep "yes" >/dev/null 2>&1; then
3635   rm -rf conftest*
3636   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3637 #define _ALL_SOURCE 1
3638 EOF
3639
3640 else
3641   rm -rf conftest*
3642   echo "$ac_t""no" 1>&6
3643 fi
3644 rm -f conftest*
3645
3646
3647 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3648 echo "configure:3649: checking for POSIXized ISC" >&5
3649 if test -d /etc/conf/kconfig.d &&
3650   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3651 then
3652   echo "$ac_t""yes" 1>&6
3653   ISC=yes # If later tests want to check for ISC.
3654   cat >> confdefs.h <<\EOF
3655 #define _POSIX_SOURCE 1
3656 EOF
3657
3658   if test "$GCC" = yes; then
3659     CC="$CC -posix"
3660   else
3661     CC="$CC -Xp"
3662   fi
3663 else
3664   echo "$ac_t""no" 1>&6
3665   ISC=
3666 fi
3667
3668 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3669 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3670 echo "configure:3671: checking for minix/config.h" >&5
3671 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3672   echo $ac_n "(cached) $ac_c" 1>&6
3673 else
3674   cat > conftest.$ac_ext <<EOF
3675 #line 3676 "configure"
3676 #include "confdefs.h"
3677 #include <minix/config.h>
3678 EOF
3679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3680 { (eval echo configure:3681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3682 if test -z "$ac_err"; then
3683   rm -rf conftest*
3684   eval "ac_cv_header_$ac_safe=yes"
3685 else
3686   echo "$ac_err" >&5
3687   echo "configure: failed program was:" >&5
3688   cat conftest.$ac_ext >&5
3689   rm -rf conftest*
3690   eval "ac_cv_header_$ac_safe=no"
3691 fi
3692 rm -f conftest*
3693 fi
3694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3695   echo "$ac_t""yes" 1>&6
3696   MINIX=yes
3697 else
3698   echo "$ac_t""no" 1>&6
3699 MINIX=
3700 fi
3701
3702 if test "$MINIX" = yes; then
3703   cat >> confdefs.h <<\EOF
3704 #define _POSIX_SOURCE 1
3705 EOF
3706
3707   cat >> confdefs.h <<\EOF
3708 #define _POSIX_1_SOURCE 2
3709 EOF
3710
3711   cat >> confdefs.h <<\EOF
3712 #define _MINIX 1
3713 EOF
3714
3715 fi
3716
3717
3718 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3719 echo "configure:3720: checking for Cygwin environment" >&5
3720 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3721   echo $ac_n "(cached) $ac_c" 1>&6
3722 else
3723   cat > conftest.$ac_ext <<EOF
3724 #line 3725 "configure"
3725 #include "confdefs.h"
3726
3727 int main() {
3728
3729 #ifndef __CYGWIN__
3730 #define __CYGWIN__ __CYGWIN32__
3731 #endif
3732 return __CYGWIN__;
3733 ; return 0; }
3734 EOF
3735 if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3736   rm -rf conftest*
3737   ac_cv_cygwin=yes
3738 else
3739   echo "configure: failed program was:" >&5
3740   cat conftest.$ac_ext >&5
3741   rm -rf conftest*
3742   ac_cv_cygwin=no
3743 fi
3744 rm -f conftest*
3745 rm -f conftest*
3746 fi
3747
3748 echo "$ac_t""$ac_cv_cygwin" 1>&6
3749 CYGWIN=
3750 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3751 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3752 echo "configure:3753: checking for mingw32 environment" >&5
3753 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759
3760 int main() {
3761 return __MINGW32__;
3762 ; return 0; }
3763 EOF
3764 if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3765   rm -rf conftest*
3766   ac_cv_mingw32=yes
3767 else
3768   echo "configure: failed program was:" >&5
3769   cat conftest.$ac_ext >&5
3770   rm -rf conftest*
3771   ac_cv_mingw32=no
3772 fi
3773 rm -f conftest*
3774 rm -f conftest*
3775 fi
3776
3777 echo "$ac_t""$ac_cv_mingw32" 1>&6
3778 MINGW32=
3779 test "$ac_cv_mingw32" = yes && MINGW32=yes
3780
3781
3782 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3783 echo "configure:3784: checking for executable suffix" >&5
3784 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3785   echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3788   ac_cv_exeext=.exe
3789 else
3790   rm -f conftest*
3791   echo 'int main () { return 0; }' > conftest.$ac_ext
3792   ac_cv_exeext=
3793   if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3794     for file in conftest.*; do
3795       case $file in
3796       *.c | *.o | *.obj) ;;
3797       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3798       esac
3799     done
3800   else
3801     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3802   fi
3803   rm -f conftest*
3804   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3805 fi
3806 fi
3807
3808 EXEEXT=""
3809 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3810 echo "$ac_t""${ac_cv_exeext}" 1>&6
3811 ac_exeext=$EXEEXT
3812
3813 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3814 echo "configure:3815: checking for object suffix" >&5
3815 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   rm -f conftest*
3819 echo 'int i = 1;' > conftest.$ac_ext
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821   for ac_file in conftest.*; do
3822     case $ac_file in
3823     *.c) ;;
3824     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3825     esac
3826   done
3827 else
3828   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3829 fi
3830 rm -f conftest*
3831 fi
3832
3833 echo "$ac_t""$ac_cv_objext" 1>&6
3834 OBJEXT=$ac_cv_objext
3835 ac_objext=$ac_cv_objext
3836
3837
3838 cat >> confdefs.h <<EOF
3839 #define EXEEXT "${EXEEXT}"
3840 EOF
3841
3842
3843 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3844 echo "configure:3845: checking for be_app in -lbe" >&5
3845 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3847   echo $ac_n "(cached) $ac_c" 1>&6
3848 else
3849   ac_save_LIBS="$LIBS"
3850 LIBS="-lbe -lroot -lnet $LIBS"
3851 cat > conftest.$ac_ext <<EOF
3852 #line 3853 "configure"
3853 #include "confdefs.h"
3854 /* Override any gcc2 internal prototype to avoid an error.  */
3855 /* We use char because int might match the return type of a gcc2
3856     builtin and then its argument prototype would still apply.  */
3857 char be_app();
3858
3859 int main() {
3860 be_app()
3861 ; return 0; }
3862 EOF
3863 if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3864   rm -rf conftest*
3865   eval "ac_cv_lib_$ac_lib_var=yes"
3866 else
3867   echo "configure: failed program was:" >&5
3868   cat conftest.$ac_ext >&5
3869   rm -rf conftest*
3870   eval "ac_cv_lib_$ac_lib_var=no"
3871 fi
3872 rm -f conftest*
3873 LIBS="$ac_save_LIBS"
3874
3875 fi
3876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3877   echo "$ac_t""yes" 1>&6
3878   LIBS="$LIBS -lbe -lroot -lnet"
3879 else
3880   echo "$ac_t""no" 1>&6
3881 :
3882 fi
3883
3884
3885
3886
3887
3888 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3889 echo "configure:3890: checking for ${CC-cc} option to accept ANSI C" >&5
3890 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3891   echo $ac_n "(cached) $ac_c" 1>&6
3892 else
3893   am_cv_prog_cc_stdc=no
3894 ac_save_CC="$CC"
3895 # Don't try gcc -ansi; that turns off useful extensions and
3896 # breaks some systems' header files.
3897 # AIX                   -qlanglvl=ansi
3898 # Ultrix and OSF/1      -std1
3899 # HP-UX 10.20 and later -Ae
3900 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3901 # SVR4                  -Xc -D__EXTENSIONS__
3902 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3903 do
3904   CC="$ac_save_CC $ac_arg"
3905   cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 #include <stdarg.h>
3909 #include <stdio.h>
3910 #include <sys/types.h>
3911 #include <sys/stat.h>
3912 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3913 struct buf { int x; };
3914 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3915 static char *e (p, i)
3916      char **p;
3917      int i;
3918 {
3919   return p[i];
3920 }
3921 static char *f (char * (*g) (char **, int), char **p, ...)
3922 {
3923   char *s;
3924   va_list v;
3925   va_start (v,p);
3926   s = g (p, va_arg (v,int));
3927   va_end (v);
3928   return s;
3929 }
3930 int test (int i, double x);
3931 struct s1 {int (*f) (int a);};
3932 struct s2 {int (*f) (double a);};
3933 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3934 int argc;
3935 char **argv;
3936
3937 int main() {
3938
3939 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3940
3941 ; return 0; }
3942 EOF
3943 if { (eval echo configure:3944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3944   rm -rf conftest*
3945   am_cv_prog_cc_stdc="$ac_arg"; break
3946 else
3947   echo "configure: failed program was:" >&5
3948   cat conftest.$ac_ext >&5
3949 fi
3950 rm -f conftest*
3951 done
3952 CC="$ac_save_CC"
3953
3954 fi
3955
3956 if test -z "$am_cv_prog_cc_stdc"; then
3957   echo "$ac_t""none needed" 1>&6
3958 else
3959   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3960 fi
3961 case "x$am_cv_prog_cc_stdc" in
3962   x|xno) ;;
3963   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3964 esac
3965
3966 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3967         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3968 fi
3969
3970 # test for make depend flag
3971 OL_MKDEP=
3972 OL_MKDEP_FLAGS=
3973 if test -z "${MKDEP}"; then
3974         OL_MKDEP="${CC-cc}"
3975         if test -z "${MKDEP_FLAGS}"; then
3976                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3977 echo "configure:3978: checking for ${OL_MKDEP} depend flag" >&5
3978 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3979   echo $ac_n "(cached) $ac_c" 1>&6
3980 else
3981   
3982                         ol_cv_mkdep=no
3983                         for flag in "-M" "-xM"; do
3984                                 cat > conftest.c <<EOF
3985  noCode;
3986 EOF
3987                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3988                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3989                                 then
3990                                         if test ! -f conftest."${ac_object}" ; then
3991                                                 ol_cv_mkdep=$flag
3992                                                 OL_MKDEP_FLAGS="$flag"
3993                                                 break
3994                                         fi
3995                                 fi
3996                         done
3997                         rm -f conftest*
3998                 
3999 fi
4000
4001 echo "$ac_t""$ol_cv_mkdep" 1>&6
4002         else
4003                 cc_cv_mkdep=yes
4004                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4005         fi
4006 else
4007         cc_cv_mkdep=yes
4008         OL_MKDEP="${MKDEP}"
4009         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4010 fi
4011
4012
4013
4014 if test "${ol_cv_mkdep}" = no ; then
4015         # this will soon become an error
4016         echo "configure: warning: do not know how to generate dependencies" 1>&2
4017 fi
4018
4019 ol_link_modules=no
4020 if test $ol_enable_modules != no ; then
4021         for ac_hdr in ltdl.h
4022 do
4023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4025 echo "configure:4026: checking for $ac_hdr" >&5
4026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 #include <$ac_hdr>
4033 EOF
4034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4035 { (eval echo configure:4036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4037 if test -z "$ac_err"; then
4038   rm -rf conftest*
4039   eval "ac_cv_header_$ac_safe=yes"
4040 else
4041   echo "$ac_err" >&5
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -rf conftest*
4045   eval "ac_cv_header_$ac_safe=no"
4046 fi
4047 rm -f conftest*
4048 fi
4049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4050   echo "$ac_t""yes" 1>&6
4051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4052   cat >> confdefs.h <<EOF
4053 #define $ac_tr_hdr 1
4054 EOF
4055  
4056 else
4057   echo "$ac_t""no" 1>&6
4058 fi
4059 done
4060
4061
4062         if test $ac_cv_header_ltdl_h = no ; then
4063                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4064         fi
4065
4066         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4067 echo "configure:4068: checking for lt_dlinit in -lltdl" >&5
4068 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-%__p_%'`
4069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4070   echo $ac_n "(cached) $ac_c" 1>&6
4071 else
4072   ac_save_LIBS="$LIBS"
4073 LIBS="-lltdl  $LIBS"
4074 cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 /* Override any gcc2 internal prototype to avoid an error.  */
4078 /* We use char because int might match the return type of a gcc2
4079     builtin and then its argument prototype would still apply.  */
4080 char lt_dlinit();
4081
4082 int main() {
4083 lt_dlinit()
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4087   rm -rf conftest*
4088   eval "ac_cv_lib_$ac_lib_var=yes"
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   eval "ac_cv_lib_$ac_lib_var=no"
4094 fi
4095 rm -f conftest*
4096 LIBS="$ac_save_LIBS"
4097
4098 fi
4099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4100   echo "$ac_t""yes" 1>&6
4101   
4102             MODULES_LIBS=-lltdl
4103             cat >> confdefs.h <<\EOF
4104 #define HAVE_LIBLTDL 1
4105 EOF
4106
4107         
4108 else
4109   echo "$ac_t""no" 1>&6
4110 fi
4111
4112
4113         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4114                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4115         fi
4116         ol_link_modules=yes
4117 else
4118         ol_with_bdb2_module=static
4119         ol_with_ldap_module=static
4120         ol_with_ldbm_module=static
4121         ol_with_passwd_module=static
4122         ol_with_perl_module=static
4123         ol_with_shell_module=static
4124         ol_with_tcl_module=static
4125 fi
4126
4127 # test for EBCDIC
4128 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4129 echo "configure:4130: checking for EBCDIC" >&5
4130 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
4131   echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133   
4134         cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137
4138 #if !('M' == 0xd4)
4139 #include <__ASCII__/generate_error.h>
4140 #endif
4141
4142 EOF
4143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4144 { (eval echo configure:4145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4146 if test -z "$ac_err"; then
4147   rm -rf conftest*
4148   ol_cv_cpp_ebcdic=yes
4149 else
4150   echo "$ac_err" >&5
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   ol_cv_cpp_ebcdic=no
4155 fi
4156 rm -f conftest*
4157 fi
4158
4159 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4160 if test $ol_cv_cpp_ebcdic = yes ; then
4161         cat >> confdefs.h <<\EOF
4162 #define HAVE_EBCDIC 1
4163 EOF
4164
4165 fi
4166
4167 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4168 echo "configure:4169: checking for ANSI C header files" >&5
4169 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
4170   echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172   cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 #include <stdlib.h>
4176 #include <stdarg.h>
4177 #include <string.h>
4178 #include <float.h>
4179 EOF
4180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4181 { (eval echo configure:4182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4183 if test -z "$ac_err"; then
4184   rm -rf conftest*
4185   ol_cv_header_stdc=yes
4186 else
4187   echo "$ac_err" >&5
4188   echo "configure: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   rm -rf conftest*
4191   ol_cv_header_stdc=no
4192 fi
4193 rm -f conftest*
4194
4195 if test $ol_cv_header_stdc = yes; then
4196   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4197 cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 #include <string.h>
4201 EOF
4202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4203   egrep "memchr" >/dev/null 2>&1; then
4204   :
4205 else
4206   rm -rf conftest*
4207   ol_cv_header_stdc=no
4208 fi
4209 rm -f conftest*
4210
4211 fi
4212
4213 if test $ol_cv_header_stdc = yes; then
4214   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <stdlib.h>
4219 EOF
4220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4221   egrep "free" >/dev/null 2>&1; then
4222   :
4223 else
4224   rm -rf conftest*
4225   ol_cv_header_stdc=no
4226 fi
4227 rm -f conftest*
4228
4229 fi
4230
4231 if test $ol_cv_header_stdc = yes; then
4232   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4233 if test "$cross_compiling" = yes; then
4234   :
4235 else
4236   cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 #include <ctype.h>
4240 #ifndef HAVE_EBCDIC
4241 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4242 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4243 #else
4244 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4245                 || ('j' <= (c) && (c) <= 'r') \
4246                 || ('s' <= (c) && (c) <= 'z'))
4247 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4248 #endif
4249 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4250 int main () { int i; for (i = 0; i < 256; i++)
4251 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4252 exit (0); }
4253
4254 EOF
4255 if { (eval echo configure:4256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4256 then
4257   :
4258 else
4259   echo "configure: failed program was:" >&5
4260   cat conftest.$ac_ext >&5
4261   rm -fr conftest*
4262   ol_cv_header_stdc=no
4263 fi
4264 rm -fr conftest*
4265 fi
4266
4267 fi
4268 fi
4269
4270 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4271 if test $ol_cv_header_stdc = yes; then
4272   cat >> confdefs.h <<\EOF
4273 #define STDC_HEADERS 1
4274 EOF
4275
4276 fi
4277 ac_cv_header_stdc=disable
4278
4279
4280 if test $ol_cv_header_stdc != yes; then
4281         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4282 fi
4283
4284 ac_header_dirent=no
4285 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4286 do
4287 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4288 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4289 echo "configure:4290: checking for $ac_hdr that defines DIR" >&5
4290 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4291   echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293   cat > conftest.$ac_ext <<EOF
4294 #line 4295 "configure"
4295 #include "confdefs.h"
4296 #include <sys/types.h>
4297 #include <$ac_hdr>
4298 int main() {
4299 DIR *dirp = 0;
4300 ; return 0; }
4301 EOF
4302 if { (eval echo configure:4303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4303   rm -rf conftest*
4304   eval "ac_cv_header_dirent_$ac_safe=yes"
4305 else
4306   echo "configure: failed program was:" >&5
4307   cat conftest.$ac_ext >&5
4308   rm -rf conftest*
4309   eval "ac_cv_header_dirent_$ac_safe=no"
4310 fi
4311 rm -f conftest*
4312 fi
4313 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4314   echo "$ac_t""yes" 1>&6
4315     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4316   cat >> confdefs.h <<EOF
4317 #define $ac_tr_hdr 1
4318 EOF
4319  ac_header_dirent=$ac_hdr; break
4320 else
4321   echo "$ac_t""no" 1>&6
4322 fi
4323 done
4324 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4325 if test $ac_header_dirent = dirent.h; then
4326 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4327 echo "configure:4328: checking for opendir in -ldir" >&5
4328 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4330   echo $ac_n "(cached) $ac_c" 1>&6
4331 else
4332   ac_save_LIBS="$LIBS"
4333 LIBS="-ldir  $LIBS"
4334 cat > conftest.$ac_ext <<EOF
4335 #line 4336 "configure"
4336 #include "confdefs.h"
4337 /* Override any gcc2 internal prototype to avoid an error.  */
4338 /* We use char because int might match the return type of a gcc2
4339     builtin and then its argument prototype would still apply.  */
4340 char opendir();
4341
4342 int main() {
4343 opendir()
4344 ; return 0; }
4345 EOF
4346 if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4347   rm -rf conftest*
4348   eval "ac_cv_lib_$ac_lib_var=yes"
4349 else
4350   echo "configure: failed program was:" >&5
4351   cat conftest.$ac_ext >&5
4352   rm -rf conftest*
4353   eval "ac_cv_lib_$ac_lib_var=no"
4354 fi
4355 rm -f conftest*
4356 LIBS="$ac_save_LIBS"
4357
4358 fi
4359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4360   echo "$ac_t""yes" 1>&6
4361   LIBS="$LIBS -ldir"
4362 else
4363   echo "$ac_t""no" 1>&6
4364 fi
4365
4366 else
4367 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4368 echo "configure:4369: checking for opendir in -lx" >&5
4369 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   ac_save_LIBS="$LIBS"
4374 LIBS="-lx  $LIBS"
4375 cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 /* Override any gcc2 internal prototype to avoid an error.  */
4379 /* We use char because int might match the return type of a gcc2
4380     builtin and then its argument prototype would still apply.  */
4381 char opendir();
4382
4383 int main() {
4384 opendir()
4385 ; return 0; }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4388   rm -rf conftest*
4389   eval "ac_cv_lib_$ac_lib_var=yes"
4390 else
4391   echo "configure: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   rm -rf conftest*
4394   eval "ac_cv_lib_$ac_lib_var=no"
4395 fi
4396 rm -f conftest*
4397 LIBS="$ac_save_LIBS"
4398
4399 fi
4400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4401   echo "$ac_t""yes" 1>&6
4402   LIBS="$LIBS -lx"
4403 else
4404   echo "$ac_t""no" 1>&6
4405 fi
4406
4407 fi
4408
4409 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4410 echo "configure:4411: checking for sys/wait.h that is POSIX.1 compatible" >&5
4411 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417 #include <sys/types.h>
4418 #include <sys/wait.h>
4419 #ifndef WEXITSTATUS
4420 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4421 #endif
4422 #ifndef WIFEXITED
4423 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4424 #endif
4425 int main() {
4426 int s;
4427 wait (&s);
4428 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4429 ; return 0; }
4430 EOF
4431 if { (eval echo configure:4432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4432   rm -rf conftest*
4433   ac_cv_header_sys_wait_h=yes
4434 else
4435   echo "configure: failed program was:" >&5
4436   cat conftest.$ac_ext >&5
4437   rm -rf conftest*
4438   ac_cv_header_sys_wait_h=no
4439 fi
4440 rm -f conftest*
4441 fi
4442
4443 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4444 if test $ac_cv_header_sys_wait_h = yes; then
4445   cat >> confdefs.h <<\EOF
4446 #define HAVE_SYS_WAIT_H 1
4447 EOF
4448
4449 fi
4450
4451 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4452 echo "configure:4453: checking POSIX termios" >&5
4453 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
4454   echo $ac_n "(cached) $ac_c" 1>&6
4455 else
4456   cat > conftest.$ac_ext <<EOF
4457 #line 4458 "configure"
4458 #include "confdefs.h"
4459 #include <sys/types.h>
4460 #include <unistd.h>
4461 #include <termios.h>
4462 int main() {
4463 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4464    tcgetattr(0, 0);
4465 ; return 0; }
4466 EOF
4467 if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4468   rm -rf conftest*
4469   am_cv_sys_posix_termios=yes
4470 else
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -rf conftest*
4474   am_cv_sys_posix_termios=no
4475 fi
4476 rm -f conftest*
4477 fi
4478
4479 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4480
4481
4482  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4483 echo "configure:4484: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4484 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
4485   echo $ac_n "(cached) $ac_c" 1>&6
4486 else
4487   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4488
4489   gwinsz_in_termios_h=no
4490   if test $am_cv_sys_posix_termios = yes; then
4491     cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4494 #include <sys/types.h>
4495 #     include <termios.h>
4496 #     ifdef TIOCGWINSZ
4497         yes
4498 #     endif
4499     
4500 EOF
4501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4502   egrep "yes" >/dev/null 2>&1; then
4503   rm -rf conftest*
4504   gwinsz_in_termios_h=yes
4505 fi
4506 rm -f conftest*
4507
4508   fi
4509
4510   if test $gwinsz_in_termios_h = no; then
4511     cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <sys/types.h>
4515 #     include <sys/ioctl.h>
4516 #     ifdef TIOCGWINSZ
4517         yes
4518 #     endif
4519     
4520 EOF
4521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4522   egrep "yes" >/dev/null 2>&1; then
4523   rm -rf conftest*
4524   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4525 fi
4526 rm -f conftest*
4527
4528   fi
4529   
4530 fi
4531
4532 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4533   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4534     cat >> confdefs.h <<\EOF
4535 #define GWINSZ_IN_SYS_IOCTL 1
4536 EOF
4537
4538   fi
4539
4540 if test $am_cv_sys_posix_termios = yes ; then
4541         cat >> confdefs.h <<\EOF
4542 #define HAVE_POSIX_TERMIOS 1
4543 EOF
4544
4545 fi
4546
4547 for ac_hdr in \
4548         arpa/inet.h             \
4549         arpa/nameser.h  \
4550         assert.h                \
4551         conio.h                 \
4552         crypt.h                 \
4553         direct.h                \
4554         errno.h                 \
4555         fcntl.h                 \
4556         filio.h                 \
4557         getopt.h                \
4558         grp.h                   \
4559         io.h                    \
4560         libutil.h               \
4561         limits.h                \
4562         locale.h                \
4563         netinet/tcp.h   \
4564         malloc.h                \
4565         memory.h                \
4566         psap.h                  \
4567         pwd.h                   \
4568         process.h               \
4569         resolv.h                \
4570         sgtty.h                 \
4571         shadow.h                \
4572         stddef.h                \
4573         string.h                \
4574         strings.h               \
4575         sysexits.h              \
4576         sys/file.h              \
4577         sys/filio.h             \
4578         sys/errno.h             \
4579         sys/ioctl.h             \
4580         sys/param.h             \
4581         sys/resource.h  \
4582         sys/select.h    \
4583         sys/socket.h    \
4584         sys/syslog.h    \
4585         sys/time.h              \
4586         sys/types.h             \
4587         syslog.h                \
4588         termios.h               \
4589         unistd.h                \
4590         winsock.h               \
4591
4592 do
4593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4595 echo "configure:4596: checking for $ac_hdr" >&5
4596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <$ac_hdr>
4603 EOF
4604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4605 { (eval echo configure:4606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4607 if test -z "$ac_err"; then
4608   rm -rf conftest*
4609   eval "ac_cv_header_$ac_safe=yes"
4610 else
4611   echo "$ac_err" >&5
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -rf conftest*
4615   eval "ac_cv_header_$ac_safe=no"
4616 fi
4617 rm -f conftest*
4618 fi
4619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4620   echo "$ac_t""yes" 1>&6
4621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4622   cat >> confdefs.h <<EOF
4623 #define $ac_tr_hdr 1
4624 EOF
4625  
4626 else
4627   echo "$ac_t""no" 1>&6
4628 fi
4629 done
4630
4631
4632
4633
4634 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4635 echo "configure:4636: checking for sigset in -lV3" >&5
4636 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4637 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   ac_save_LIBS="$LIBS"
4641 LIBS="-lV3  $LIBS"
4642 cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645 /* Override any gcc2 internal prototype to avoid an error.  */
4646 /* We use char because int might match the return type of a gcc2
4647     builtin and then its argument prototype would still apply.  */
4648 char sigset();
4649
4650 int main() {
4651 sigset()
4652 ; return 0; }
4653 EOF
4654 if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4655   rm -rf conftest*
4656   eval "ac_cv_lib_$ac_lib_var=yes"
4657 else
4658   echo "configure: failed program was:" >&5
4659   cat conftest.$ac_ext >&5
4660   rm -rf conftest*
4661   eval "ac_cv_lib_$ac_lib_var=no"
4662 fi
4663 rm -f conftest*
4664 LIBS="$ac_save_LIBS"
4665
4666 fi
4667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4668   echo "$ac_t""yes" 1>&6
4669     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4670     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4671   cat >> confdefs.h <<EOF
4672 #define $ac_tr_lib 1
4673 EOF
4674
4675   LIBS="-lV3 $LIBS"
4676
4677 else
4678   echo "$ac_t""no" 1>&6
4679 fi
4680
4681
4682 if test $ac_cv_header_winsock_h = yes; then
4683         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4684 echo "configure:4685: checking for winsock" >&5
4685 if eval "test \"`echo '$''{'ol_cv_winsock'+set}'`\" = set"; then
4686   echo $ac_n "(cached) $ac_c" 1>&6
4687 else
4688   cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 #include <winsock.h>
4692 int main() {
4693
4694                         socket(0,0,0);
4695                         select(0,NULL,NULL,NULL,NULL);
4696                         closesocket(0);
4697                         gethostname(NULL,0);
4698         
4699 ; return 0; }
4700 EOF
4701 if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4702   rm -rf conftest*
4703   ol_cv_winsock=yes
4704 else
4705   echo "configure: failed program was:" >&5
4706   cat conftest.$ac_ext >&5
4707   rm -rf conftest*
4708   ol_cv_winsock=no
4709 fi
4710 rm -f conftest*]
4711 fi
4712
4713 echo "$ac_t""$ol_cv_winsock" 1>&6
4714
4715         if test $ol_cv_winsock = yes ; then
4716                 cat >> confdefs.h <<\EOF
4717 #define HAVE_WINSOCK 1
4718 EOF
4719
4720                 ac_cv_func_socket=yes
4721                 ac_cv_func_select=yes
4722                 ac_cv_func_closesocket=yes
4723                 ac_cv_func_gethostname=yes
4724         fi
4725 fi
4726
4727
4728 echo $ac_n "checking for socket""... $ac_c" 1>&6
4729 echo "configure:4730: checking for socket" >&5
4730 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 /* System header to define __stub macros and hopefully few prototypes,
4737     which can conflict with char socket(); below.  */
4738 #include <assert.h>
4739 /* Override any gcc2 internal prototype to avoid an error.  */
4740 /* We use char because int might match the return type of a gcc2
4741     builtin and then its argument prototype would still apply.  */
4742 char socket();
4743
4744 int main() {
4745
4746 /* The GNU C library defines this for functions which it implements
4747     to always fail with ENOSYS.  Some functions are actually named
4748     something starting with __ and the normal name is an alias.  */
4749 #if defined (__stub_socket) || defined (__stub___socket)
4750 choke me
4751 #else
4752 socket();
4753 #endif
4754
4755 ; return 0; }
4756 EOF
4757 if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4758   rm -rf conftest*
4759   eval "ac_cv_func_socket=yes"
4760 else
4761   echo "configure: failed program was:" >&5
4762   cat conftest.$ac_ext >&5
4763   rm -rf conftest*
4764   eval "ac_cv_func_socket=no"
4765 fi
4766 rm -f conftest*
4767 fi
4768
4769 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4770   echo "$ac_t""yes" 1>&6
4771   :
4772 else
4773   echo "$ac_t""no" 1>&6
4774         
4775         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4776 echo "configure:4777: checking for main in -lsocket" >&5
4777 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4778 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4779   echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781   ac_save_LIBS="$LIBS"
4782 LIBS="-lsocket  $LIBS"
4783 cat > conftest.$ac_ext <<EOF
4784 #line 4785 "configure"
4785 #include "confdefs.h"
4786
4787 int main() {
4788 main()
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4792   rm -rf conftest*
4793   eval "ac_cv_lib_$ac_lib_var=yes"
4794 else
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=no"
4799 fi
4800 rm -f conftest*
4801 LIBS="$ac_save_LIBS"
4802
4803 fi
4804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4805   echo "$ac_t""yes" 1>&6
4806     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4808   cat >> confdefs.h <<EOF
4809 #define $ac_tr_lib 1
4810 EOF
4811
4812   LIBS="-lsocket $LIBS"
4813
4814 else
4815   echo "$ac_t""no" 1>&6
4816 fi
4817
4818         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4819 echo "configure:4820: checking for main in -lnet" >&5
4820 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
4821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4822   echo $ac_n "(cached) $ac_c" 1>&6
4823 else
4824   ac_save_LIBS="$LIBS"
4825 LIBS="-lnet  $LIBS"
4826 cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829
4830 int main() {
4831 main()
4832 ; return 0; }
4833 EOF
4834 if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4835   rm -rf conftest*
4836   eval "ac_cv_lib_$ac_lib_var=yes"
4837 else
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   eval "ac_cv_lib_$ac_lib_var=no"
4842 fi
4843 rm -f conftest*
4844 LIBS="$ac_save_LIBS"
4845
4846 fi
4847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4848   echo "$ac_t""yes" 1>&6
4849     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4850     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4851   cat >> confdefs.h <<EOF
4852 #define $ac_tr_lib 1
4853 EOF
4854
4855   LIBS="-lnet $LIBS"
4856
4857 else
4858   echo "$ac_t""no" 1>&6
4859 fi
4860
4861         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4862 echo "configure:4863: checking for main in -lnsl_s" >&5
4863 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
4864 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4865   echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867   ac_save_LIBS="$LIBS"
4868 LIBS="-lnsl_s  $LIBS"
4869 cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872
4873 int main() {
4874 main()
4875 ; return 0; }
4876 EOF
4877 if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4878   rm -rf conftest*
4879   eval "ac_cv_lib_$ac_lib_var=yes"
4880 else
4881   echo "configure: failed program was:" >&5
4882   cat conftest.$ac_ext >&5
4883   rm -rf conftest*
4884   eval "ac_cv_lib_$ac_lib_var=no"
4885 fi
4886 rm -f conftest*
4887 LIBS="$ac_save_LIBS"
4888
4889 fi
4890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4891   echo "$ac_t""yes" 1>&6
4892     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4893     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4894   cat >> confdefs.h <<EOF
4895 #define $ac_tr_lib 1
4896 EOF
4897
4898   LIBS="-lnsl_s $LIBS"
4899
4900 else
4901   echo "$ac_t""no" 1>&6
4902 fi
4903
4904         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4905 echo "configure:4906: checking for main in -lnsl" >&5
4906 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   ac_save_LIBS="$LIBS"
4911 LIBS="-lnsl  $LIBS"
4912 cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915
4916 int main() {
4917 main()
4918 ; return 0; }
4919 EOF
4920 if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4921   rm -rf conftest*
4922   eval "ac_cv_lib_$ac_lib_var=yes"
4923 else
4924   echo "configure: failed program was:" >&5
4925   cat conftest.$ac_ext >&5
4926   rm -rf conftest*
4927   eval "ac_cv_lib_$ac_lib_var=no"
4928 fi
4929 rm -f conftest*
4930 LIBS="$ac_save_LIBS"
4931
4932 fi
4933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4934   echo "$ac_t""yes" 1>&6
4935     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4936     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4937   cat >> confdefs.h <<EOF
4938 #define $ac_tr_lib 1
4939 EOF
4940
4941   LIBS="-lnsl $LIBS"
4942
4943 else
4944   echo "$ac_t""no" 1>&6
4945 fi
4946
4947         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4948 echo "configure:4949: checking for socket in -linet" >&5
4949 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
4950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4951   echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953   ac_save_LIBS="$LIBS"
4954 LIBS="-linet  $LIBS"
4955 cat > conftest.$ac_ext <<EOF
4956 #line 4957 "configure"
4957 #include "confdefs.h"
4958 /* Override any gcc2 internal prototype to avoid an error.  */
4959 /* We use char because int might match the return type of a gcc2
4960     builtin and then its argument prototype would still apply.  */
4961 char socket();
4962
4963 int main() {
4964 socket()
4965 ; return 0; }
4966 EOF
4967 if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4968   rm -rf conftest*
4969   eval "ac_cv_lib_$ac_lib_var=yes"
4970 else
4971   echo "configure: failed program was:" >&5
4972   cat conftest.$ac_ext >&5
4973   rm -rf conftest*
4974   eval "ac_cv_lib_$ac_lib_var=no"
4975 fi
4976 rm -f conftest*
4977 LIBS="$ac_save_LIBS"
4978
4979 fi
4980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4981   echo "$ac_t""yes" 1>&6
4982     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4983     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4984   cat >> confdefs.h <<EOF
4985 #define $ac_tr_lib 1
4986 EOF
4987
4988   LIBS="-linet $LIBS"
4989
4990 else
4991   echo "$ac_t""no" 1>&6
4992 fi
4993
4994         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4995 echo "configure:4996: checking for main in -lgen" >&5
4996 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
4997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4998   echo $ac_n "(cached) $ac_c" 1>&6
4999 else
5000   ac_save_LIBS="$LIBS"
5001 LIBS="-lgen  $LIBS"
5002 cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005
5006 int main() {
5007 main()
5008 ; return 0; }
5009 EOF
5010 if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5011   rm -rf conftest*
5012   eval "ac_cv_lib_$ac_lib_var=yes"
5013 else
5014   echo "configure: failed program was:" >&5
5015   cat conftest.$ac_ext >&5
5016   rm -rf conftest*
5017   eval "ac_cv_lib_$ac_lib_var=no"
5018 fi
5019 rm -f conftest*
5020 LIBS="$ac_save_LIBS"
5021
5022 fi
5023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5024   echo "$ac_t""yes" 1>&6
5025     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5026     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5027   cat >> confdefs.h <<EOF
5028 #define $ac_tr_lib 1
5029 EOF
5030
5031   LIBS="-lgen $LIBS"
5032
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036
5037
5038 fi
5039
5040
5041 echo $ac_n "checking for select""... $ac_c" 1>&6
5042 echo "configure:5043: checking for select" >&5
5043 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
5044   echo $ac_n "(cached) $ac_c" 1>&6
5045 else
5046   cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 /* System header to define __stub macros and hopefully few prototypes,
5050     which can conflict with char select(); below.  */
5051 #include <assert.h>
5052 /* Override any gcc2 internal prototype to avoid an error.  */
5053 /* We use char because int might match the return type of a gcc2
5054     builtin and then its argument prototype would still apply.  */
5055 char select();
5056
5057 int main() {
5058
5059 /* The GNU C library defines this for functions which it implements
5060     to always fail with ENOSYS.  Some functions are actually named
5061     something starting with __ and the normal name is an alias.  */
5062 #if defined (__stub_select) || defined (__stub___select)
5063 choke me
5064 #else
5065 select();
5066 #endif
5067
5068 ; return 0; }
5069 EOF
5070 if { (eval echo configure:5071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5071   rm -rf conftest*
5072   eval "ac_cv_func_select=yes"
5073 else
5074   echo "configure: failed program was:" >&5
5075   cat conftest.$ac_ext >&5
5076   rm -rf conftest*
5077   eval "ac_cv_func_select=no"
5078 fi
5079 rm -f conftest*
5080 fi
5081
5082 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084   :
5085 else
5086   echo "$ac_t""no" 1>&6
5087 { echo "configure: error: select() required." 1>&2; exit 1; }
5088 fi
5089
5090
5091 if test "${ac_cv_header_winsock_h}" != yes; then
5092                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5093 echo "configure:5094: checking types of arguments for select()" >&5
5094  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
5101   echo $ac_n "(cached) $ac_c" 1>&6
5102 else
5103      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5104      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5105       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5106        cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109 #ifdef HAVE_SYS_TYPES_H
5110 #include <sys/types.h>
5111 #endif
5112 #ifdef HAVE_SYS_TIME_H
5113 #include <sys/time.h>
5114 #endif
5115 #ifdef HAVE_SYS_SELECT_H
5116 #include <sys/select.h>
5117 #endif
5118 #ifdef HAVE_SYS_SOCKET_H
5119 #include <sys/socket.h>
5120 #endif
5121 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);
5122 int main() {
5123
5124 ; return 0; }
5125 EOF
5126 if { (eval echo configure:5127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5127   rm -rf conftest*
5128           ac_not_found=no ; break 3
5129 else
5130   echo "configure: failed program was:" >&5
5131   cat conftest.$ac_ext >&5
5132   rm -rf conftest*
5133   ac_not_found=yes
5134 fi
5135 rm -f conftest*
5136       done
5137      done
5138     done
5139    
5140 fi
5141   
5142 fi
5143  
5144 fi
5145  if test "$ac_not_found" = yes; then
5146   ac_cv_func_select_arg1=int 
5147   ac_cv_func_select_arg234='int *' 
5148   ac_cv_func_select_arg5='struct timeval *'
5149  fi
5150  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5151  cat >> confdefs.h <<EOF
5152 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5153 EOF
5154
5155  cat >> confdefs.h <<EOF
5156 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5157 EOF
5158
5159  cat >> confdefs.h <<EOF
5160 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5161 EOF
5162
5163
5164 fi
5165
5166
5167 for ac_hdr in regex.h 
5168 do
5169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5171 echo "configure:5172: checking for $ac_hdr" >&5
5172 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175   cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 #include <$ac_hdr>
5179 EOF
5180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5181 { (eval echo configure:5182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5183 if test -z "$ac_err"; then
5184   rm -rf conftest*
5185   eval "ac_cv_header_$ac_safe=yes"
5186 else
5187   echo "$ac_err" >&5
5188   echo "configure: failed program was:" >&5
5189   cat conftest.$ac_ext >&5
5190   rm -rf conftest*
5191   eval "ac_cv_header_$ac_safe=no"
5192 fi
5193 rm -f conftest*
5194 fi
5195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5196   echo "$ac_t""yes" 1>&6
5197     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5198   cat >> confdefs.h <<EOF
5199 #define $ac_tr_hdr 1
5200 EOF
5201  
5202 else
5203   echo "$ac_t""no" 1>&6
5204 fi
5205 done
5206
5207 if test "$ac_cv_header_regex_h" != yes ; then
5208         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5209 fi
5210 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5211 echo "configure:5212: checking for regfree" >&5
5212 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
5213   echo $ac_n "(cached) $ac_c" 1>&6
5214 else
5215   cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 /* System header to define __stub macros and hopefully few prototypes,
5219     which can conflict with char regfree(); below.  */
5220 #include <assert.h>
5221 /* Override any gcc2 internal prototype to avoid an error.  */
5222 /* We use char because int might match the return type of a gcc2
5223     builtin and then its argument prototype would still apply.  */
5224 char regfree();
5225
5226 int main() {
5227
5228 /* The GNU C library defines this for functions which it implements
5229     to always fail with ENOSYS.  Some functions are actually named
5230     something starting with __ and the normal name is an alias.  */
5231 #if defined (__stub_regfree) || defined (__stub___regfree)
5232 choke me
5233 #else
5234 regfree();
5235 #endif
5236
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_func_regfree=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_func_regfree=no"
5247 fi
5248 rm -f conftest*
5249 fi
5250
5251 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5252   echo "$ac_t""yes" 1>&6
5253   :
5254 else
5255   echo "$ac_t""no" 1>&6
5256 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5257 fi
5258
5259
5260
5261 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5262 echo "configure:5263: checking for compatible POSIX regex" >&5
5263 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
5264   echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266   
5267         if test "$cross_compiling" = yes; then
5268   ol_cv_c_posix_regex=cross
5269 else
5270   cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273
5274 #include <sys/types.h>
5275 #include <regex.h>
5276 static char *pattern, *string;
5277 main()
5278 {
5279         int rc;
5280         regex_t re;
5281
5282         pattern = "^A";
5283
5284         if(regcomp(&re, pattern, 0)) {
5285                 return -1;
5286         }
5287         
5288         string = "ALL MATCH";
5289         
5290         rc = regexec(&re, string, 0, (void*)0, 0);
5291
5292         regfree(&re);
5293
5294         return rc;
5295 }
5296 EOF
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5298 then
5299   ol_cv_c_posix_regex=yes
5300 else
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303   rm -fr conftest*
5304   ol_cv_c_posix_regex=no
5305 fi
5306 rm -fr conftest*
5307 fi
5308
5309 fi
5310
5311 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5312
5313 if test "$ol_cv_c_posix_regex" = no ; then
5314         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5315 fi
5316
5317 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5318 echo "configure:5319: checking for res_search" >&5
5319 if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
5320   echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 /* System header to define __stub macros and hopefully few prototypes,
5326     which can conflict with char res_search(); below.  */
5327 #include <assert.h>
5328 /* Override any gcc2 internal prototype to avoid an error.  */
5329 /* We use char because int might match the return type of a gcc2
5330     builtin and then its argument prototype would still apply.  */
5331 char res_search();
5332
5333 int main() {
5334
5335 /* The GNU C library defines this for functions which it implements
5336     to always fail with ENOSYS.  Some functions are actually named
5337     something starting with __ and the normal name is an alias.  */
5338 #if defined (__stub_res_search) || defined (__stub___res_search)
5339 choke me
5340 #else
5341 res_search();
5342 #endif
5343
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5347   rm -rf conftest*
5348   eval "ac_cv_func_res_search=yes"
5349 else
5350   echo "configure: failed program was:" >&5
5351   cat conftest.$ac_ext >&5
5352   rm -rf conftest*
5353   eval "ac_cv_func_res_search=no"
5354 fi
5355 rm -f conftest*
5356 fi
5357
5358 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5359   echo "$ac_t""yes" 1>&6
5360   :
5361 else
5362   echo "$ac_t""no" 1>&6
5363 fi
5364
5365 if test $ac_cv_func_res_search = no ; then 
5366         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5367 echo "configure:5368: checking for res_search in -lbind" >&5
5368 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
5369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   ac_save_LIBS="$LIBS"
5373 LIBS="-lbind  $LIBS"
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377 /* Override any gcc2 internal prototype to avoid an error.  */
5378 /* We use char because int might match the return type of a gcc2
5379     builtin and then its argument prototype would still apply.  */
5380 char res_search();
5381
5382 int main() {
5383 res_search()
5384 ; return 0; }
5385 EOF
5386 if { (eval echo configure:5387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5387   rm -rf conftest*
5388   eval "ac_cv_lib_$ac_lib_var=yes"
5389 else
5390   echo "configure: failed program was:" >&5
5391   cat conftest.$ac_ext >&5
5392   rm -rf conftest*
5393   eval "ac_cv_lib_$ac_lib_var=no"
5394 fi
5395 rm -f conftest*
5396 LIBS="$ac_save_LIBS"
5397
5398 fi
5399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5400   echo "$ac_t""yes" 1>&6
5401     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5402     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5403   cat >> confdefs.h <<EOF
5404 #define $ac_tr_lib 1
5405 EOF
5406
5407   LIBS="-lbind $LIBS"
5408
5409 else
5410   echo "$ac_t""no" 1>&6
5411 fi
5412
5413         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5414 fi
5415
5416 if test $ac_cv_func_res_search = no ; then 
5417         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5418 echo "configure:5419: checking for __res_search in -lbind" >&5
5419 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'`
5420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5421   echo $ac_n "(cached) $ac_c" 1>&6
5422 else
5423   ac_save_LIBS="$LIBS"
5424 LIBS="-lbind  $LIBS"
5425 cat > conftest.$ac_ext <<EOF
5426 #line 5427 "configure"
5427 #include "confdefs.h"
5428 /* Override any gcc2 internal prototype to avoid an error.  */
5429 /* We use char because int might match the return type of a gcc2
5430     builtin and then its argument prototype would still apply.  */
5431 char __res_search();
5432
5433 int main() {
5434 __res_search()
5435 ; return 0; }
5436 EOF
5437 if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5438   rm -rf conftest*
5439   eval "ac_cv_lib_$ac_lib_var=yes"
5440 else
5441   echo "configure: failed program was:" >&5
5442   cat conftest.$ac_ext >&5
5443   rm -rf conftest*
5444   eval "ac_cv_lib_$ac_lib_var=no"
5445 fi
5446 rm -f conftest*
5447 LIBS="$ac_save_LIBS"
5448
5449 fi
5450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5451   echo "$ac_t""yes" 1>&6
5452     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5454   cat >> confdefs.h <<EOF
5455 #define $ac_tr_lib 1
5456 EOF
5457
5458   LIBS="-lbind $LIBS"
5459
5460 else
5461   echo "$ac_t""no" 1>&6
5462 fi
5463
5464         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5465 fi
5466
5467 if test $ac_cv_func_res_search = no ; then 
5468         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5469 echo "configure:5470: checking for res_search in -lresolv" >&5
5470 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
5471 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5472   echo $ac_n "(cached) $ac_c" 1>&6
5473 else
5474   ac_save_LIBS="$LIBS"
5475 LIBS="-lresolv  $LIBS"
5476 cat > conftest.$ac_ext <<EOF
5477 #line 5478 "configure"
5478 #include "confdefs.h"
5479 /* Override any gcc2 internal prototype to avoid an error.  */
5480 /* We use char because int might match the return type of a gcc2
5481     builtin and then its argument prototype would still apply.  */
5482 char res_search();
5483
5484 int main() {
5485 res_search()
5486 ; return 0; }
5487 EOF
5488 if { (eval echo configure:5489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5489   rm -rf conftest*
5490   eval "ac_cv_lib_$ac_lib_var=yes"
5491 else
5492   echo "configure: failed program was:" >&5
5493   cat conftest.$ac_ext >&5
5494   rm -rf conftest*
5495   eval "ac_cv_lib_$ac_lib_var=no"
5496 fi
5497 rm -f conftest*
5498 LIBS="$ac_save_LIBS"
5499
5500 fi
5501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5502   echo "$ac_t""yes" 1>&6
5503     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5504     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5505   cat >> confdefs.h <<EOF
5506 #define $ac_tr_lib 1
5507 EOF
5508
5509   LIBS="-lresolv $LIBS"
5510
5511 else
5512   echo "$ac_t""no" 1>&6
5513 fi
5514
5515         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5516 fi
5517
5518 if test "$ac_cv_func_res_search" = yes ; then
5519         cat >> confdefs.h <<\EOF
5520 #define HAVE_RES_SEARCH 1
5521 EOF
5522
5523 elif test $ol_enable_dns = yes ; then
5524         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5525 elif test $ol_enable_dns != no ; then
5526         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5527 fi
5528
5529
5530 ol_link_isode=no
5531 if test $ol_enable_ldapd != no ; then
5532         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5533
5534                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5535 echo "configure:5536: checking for main in -lxtpp" >&5
5536 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
5537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5538   echo $ac_n "(cached) $ac_c" 1>&6
5539 else
5540   ac_save_LIBS="$LIBS"
5541 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5542 cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545
5546 int main() {
5547 main()
5548 ; return 0; }
5549 EOF
5550 if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551   rm -rf conftest*
5552   eval "ac_cv_lib_$ac_lib_var=yes"
5553 else
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   eval "ac_cv_lib_$ac_lib_var=no"
5558 fi
5559 rm -f conftest*
5560 LIBS="$ac_save_LIBS"
5561
5562 fi
5563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5564   echo "$ac_t""yes" 1>&6
5565   
5566                 ol_link_isode=yes
5567                 cat >> confdefs.h <<\EOF
5568 #define HAVE_XTPP 1
5569 EOF
5570
5571                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5572                 
5573 else
5574   echo "$ac_t""no" 1>&6
5575 :
5576 fi
5577
5578         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5579 echo "configure:5580: checking for main in -ldsap" >&5
5580 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
5581 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5582   echo $ac_n "(cached) $ac_c" 1>&6
5583 else
5584   ac_save_LIBS="$LIBS"
5585 LIBS="-ldsap -lisode $LIBS"
5586 cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589
5590 int main() {
5591 main()
5592 ; return 0; }
5593 EOF
5594 if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5595   rm -rf conftest*
5596   eval "ac_cv_lib_$ac_lib_var=yes"
5597 else
5598   echo "configure: failed program was:" >&5
5599   cat conftest.$ac_ext >&5
5600   rm -rf conftest*
5601   eval "ac_cv_lib_$ac_lib_var=no"
5602 fi
5603 rm -f conftest*
5604 LIBS="$ac_save_LIBS"
5605
5606 fi
5607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5608   echo "$ac_t""yes" 1>&6
5609   
5610                 ol_link_isode=yes
5611                 cat >> confdefs.h <<\EOF
5612 #define HAVE_DSAP 1
5613 EOF
5614
5615                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5616                 
5617 else
5618   echo "$ac_t""no" 1>&6
5619 :
5620 fi
5621
5622         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5623 echo "configure:5624: checking for main in -lisode" >&5
5624 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
5625 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5626   echo $ac_n "(cached) $ac_c" 1>&6
5627 else
5628   ac_save_LIBS="$LIBS"
5629 LIBS="-lisode  $LIBS"
5630 cat > conftest.$ac_ext <<EOF
5631 #line 5632 "configure"
5632 #include "confdefs.h"
5633
5634 int main() {
5635 main()
5636 ; return 0; }
5637 EOF
5638 if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5639   rm -rf conftest*
5640   eval "ac_cv_lib_$ac_lib_var=yes"
5641 else
5642   echo "configure: failed program was:" >&5
5643   cat conftest.$ac_ext >&5
5644   rm -rf conftest*
5645   eval "ac_cv_lib_$ac_lib_var=no"
5646 fi
5647 rm -f conftest*
5648 LIBS="$ac_save_LIBS"
5649
5650 fi
5651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5652   echo "$ac_t""yes" 1>&6
5653   
5654                 ol_link_isode=yes
5655                 cat >> confdefs.h <<\EOF
5656 #define HAVE_ISODE 1
5657 EOF
5658
5659                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5660                 
5661 else
5662   echo "$ac_t""no" 1>&6
5663 :
5664 fi
5665
5666 fi
5667
5668 if test $ol_link_isode != no; then
5669         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5670 echo "configure:5671: checking for main in -lpp" >&5
5671 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
5672 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   ac_save_LIBS="$LIBS"
5676 LIBS="-lpp  $LIBS"
5677 cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680
5681 int main() {
5682 main()
5683 ; return 0; }
5684 EOF
5685 if { (eval echo configure:5686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5686   rm -rf conftest*
5687   eval "ac_cv_lib_$ac_lib_var=yes"
5688 else
5689   echo "configure: failed program was:" >&5
5690   cat conftest.$ac_ext >&5
5691   rm -rf conftest*
5692   eval "ac_cv_lib_$ac_lib_var=no"
5693 fi
5694 rm -f conftest*
5695 LIBS="$ac_save_LIBS"
5696
5697 fi
5698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5699   echo "$ac_t""yes" 1>&6
5700   
5701                 cat >> confdefs.h <<\EOF
5702 #define HAVE_PP 1
5703 EOF
5704
5705                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5706                 
5707 else
5708   echo "$ac_t""no" 1>&6
5709 :
5710 fi
5711
5712
5713         # Extract the first word of "pepsy", so it can be a program name with args.
5714 set dummy pepsy; ac_word=$2
5715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5716 echo "configure:5717: checking for $ac_word" >&5
5717 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
5718   echo $ac_n "(cached) $ac_c" 1>&6
5719 else
5720   case "$PEPSY" in
5721   /*)
5722   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5723   ;;
5724   ?:/*)                  
5725   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5726   ;;
5727   *)
5728   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5729   ac_dummy="$PATH"
5730   for ac_dir in $ac_dummy; do 
5731     test -z "$ac_dir" && ac_dir=.
5732     if test -f $ac_dir/$ac_word; then
5733       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5734       break
5735     fi
5736   done
5737   IFS="$ac_save_ifs"
5738   ;;
5739 esac
5740 fi
5741 PEPSY="$ac_cv_path_PEPSY"
5742 if test -n "$PEPSY"; then
5743   echo "$ac_t""$PEPSY" 1>&6
5744 else
5745   echo "$ac_t""no" 1>&6
5746 fi
5747
5748 fi
5749
5750 if test $ol_enable_quipu != no ; then
5751         for ac_hdr in quipu/commonarg.h
5752 do
5753 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5754 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5755 echo "configure:5756: checking for $ac_hdr" >&5
5756 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5757   echo $ac_n "(cached) $ac_c" 1>&6
5758 else
5759   cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762 #include <$ac_hdr>
5763 EOF
5764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5765 { (eval echo configure:5766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5767 if test -z "$ac_err"; then
5768   rm -rf conftest*
5769   eval "ac_cv_header_$ac_safe=yes"
5770 else
5771   echo "$ac_err" >&5
5772   echo "configure: failed program was:" >&5
5773   cat conftest.$ac_ext >&5
5774   rm -rf conftest*
5775   eval "ac_cv_header_$ac_safe=no"
5776 fi
5777 rm -f conftest*
5778 fi
5779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5780   echo "$ac_t""yes" 1>&6
5781     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5782   cat >> confdefs.h <<EOF
5783 #define $ac_tr_hdr 1
5784 EOF
5785  
5786 else
5787   echo "$ac_t""no" 1>&6
5788 fi
5789 done
5790
5791
5792         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5793                 BUILD_QUIPU=yes
5794         elif test $ol_enable_quipu = auto ; then
5795                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5796         else
5797                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5798         fi
5799 fi
5800
5801 ol_link_krb5=no
5802
5803 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5804         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5805
5806         for ac_hdr in krb5.h
5807 do
5808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5810 echo "configure:5811: checking for $ac_hdr" >&5
5811 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5812   echo $ac_n "(cached) $ac_c" 1>&6
5813 else
5814   cat > conftest.$ac_ext <<EOF
5815 #line 5816 "configure"
5816 #include "confdefs.h"
5817 #include <$ac_hdr>
5818 EOF
5819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5820 { (eval echo configure:5821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5822 if test -z "$ac_err"; then
5823   rm -rf conftest*
5824   eval "ac_cv_header_$ac_safe=yes"
5825 else
5826   echo "$ac_err" >&5
5827   echo "configure: failed program was:" >&5
5828   cat conftest.$ac_ext >&5
5829   rm -rf conftest*
5830   eval "ac_cv_header_$ac_safe=no"
5831 fi
5832 rm -f conftest*
5833 fi
5834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5835   echo "$ac_t""yes" 1>&6
5836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5837   cat >> confdefs.h <<EOF
5838 #define $ac_tr_hdr 1
5839 EOF
5840  
5841 else
5842   echo "$ac_t""no" 1>&6
5843 fi
5844 done
5845
5846
5847         if test $ac_cv_header_krb5_h = yes ; then
5848                                 for ac_hdr in heim_err.h
5849 do
5850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5852 echo "configure:5853: checking for $ac_hdr" >&5
5853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5854   echo $ac_n "(cached) $ac_c" 1>&6
5855 else
5856   cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 #include <$ac_hdr>
5860 EOF
5861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5862 { (eval echo configure:5863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5864 if test -z "$ac_err"; then
5865   rm -rf conftest*
5866   eval "ac_cv_header_$ac_safe=yes"
5867 else
5868   echo "$ac_err" >&5
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   eval "ac_cv_header_$ac_safe=no"
5873 fi
5874 rm -f conftest*
5875 fi
5876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5877   echo "$ac_t""yes" 1>&6
5878     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5879   cat >> confdefs.h <<EOF
5880 #define $ac_tr_hdr 1
5881 EOF
5882  
5883 else
5884   echo "$ac_t""no" 1>&6
5885 fi
5886 done
5887
5888                 if test $ac_cv_header_heim_err_h = yes ; then
5889                         krb5_impl=heimdal
5890                 else
5891                         krb5_impl=mit
5892                 fi
5893
5894                 if test $krb5_impl = mit; then
5895                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5896 echo "configure:5897: checking for main in -lkrb5" >&5
5897 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
5898 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5899   echo $ac_n "(cached) $ac_c" 1>&6
5900 else
5901   ac_save_LIBS="$LIBS"
5902 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5903 cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906
5907 int main() {
5908 main()
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_lib_$ac_lib_var=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=no"
5919 fi
5920 rm -f conftest*
5921 LIBS="$ac_save_LIBS"
5922
5923 fi
5924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5925   echo "$ac_t""yes" 1>&6
5926   have_krb5=yes
5927                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5928 else
5929   echo "$ac_t""no" 1>&6
5930 have_krb5=no
5931 fi
5932
5933
5934                 elif test $krb5_impl = heimdal; then
5935                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5936 echo "configure:5937: checking for main in -lkrb5" >&5
5937 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
5938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   ac_save_LIBS="$LIBS"
5942 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5943 cat > conftest.$ac_ext <<EOF
5944 #line 5945 "configure"
5945 #include "confdefs.h"
5946
5947 int main() {
5948 main()
5949 ; return 0; }
5950 EOF
5951 if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5952   rm -rf conftest*
5953   eval "ac_cv_lib_$ac_lib_var=yes"
5954 else
5955   echo "configure: failed program was:" >&5
5956   cat conftest.$ac_ext >&5
5957   rm -rf conftest*
5958   eval "ac_cv_lib_$ac_lib_var=no"
5959 fi
5960 rm -f conftest*
5961 LIBS="$ac_save_LIBS"
5962
5963 fi
5964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5965   echo "$ac_t""yes" 1>&6
5966   have_krb5=yes
5967                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5968 else
5969   echo "$ac_t""no" 1>&6
5970 have_krb5=no
5971 fi
5972
5973
5974                         cat >> confdefs.h <<\EOF
5975 #define HAVE_HEIMDAL_KERBEROS 1
5976 EOF
5977
5978                 else
5979                         have_krb5=no
5980                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5981                 fi
5982
5983                 if test $have_krb5 = yes ; then
5984                         ol_link_krb5=yes
5985
5986                         cat >> confdefs.h <<\EOF
5987 #define HAVE_KRB5 1
5988 EOF
5989
5990
5991                         if test $ol_with_kerberos = k5only ; then
5992                                 ol_with_kerberos=found
5993                         fi
5994
5995                 elif test $ol_with_kerberos != auto ; then
5996                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5997                 fi
5998
5999         fi
6000 fi
6001
6002 ol_link_krb4=no
6003 if test $ol_link_krb5 = yes -a \
6004         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6005
6006         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6007 do
6008 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6009 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6010 echo "configure:6011: checking for $ac_hdr" >&5
6011 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6012   echo $ac_n "(cached) $ac_c" 1>&6
6013 else
6014   cat > conftest.$ac_ext <<EOF
6015 #line 6016 "configure"
6016 #include "confdefs.h"
6017 #include <$ac_hdr>
6018 EOF
6019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6020 { (eval echo configure:6021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6022 if test -z "$ac_err"; then
6023   rm -rf conftest*
6024   eval "ac_cv_header_$ac_safe=yes"
6025 else
6026   echo "$ac_err" >&5
6027   echo "configure: failed program was:" >&5
6028   cat conftest.$ac_ext >&5
6029   rm -rf conftest*
6030   eval "ac_cv_header_$ac_safe=no"
6031 fi
6032 rm -f conftest*
6033 fi
6034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6035   echo "$ac_t""yes" 1>&6
6036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6037   cat >> confdefs.h <<EOF
6038 #define $ac_tr_hdr 1
6039 EOF
6040  
6041 else
6042   echo "$ac_t""no" 1>&6
6043 fi
6044 done
6045
6046
6047         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6048                 if test $krb5_impl = mit; then
6049                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6050 echo "configure:6051: checking for main in -lkrb4" >&5
6051 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
6052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6053   echo $ac_n "(cached) $ac_c" 1>&6
6054 else
6055   ac_save_LIBS="$LIBS"
6056 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6057 cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060
6061 int main() {
6062 main()
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   eval "ac_cv_lib_$ac_lib_var=yes"
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   eval "ac_cv_lib_$ac_lib_var=no"
6073 fi
6074 rm -f conftest*
6075 LIBS="$ac_save_LIBS"
6076
6077 fi
6078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6079   echo "$ac_t""yes" 1>&6
6080   have_k425=yes
6081                                 KRB4_LIBS="-lkrb4 -ldes425"
6082 else
6083   echo "$ac_t""no" 1>&6
6084 have_k425=no
6085 fi
6086
6087
6088                 elif test $krb5_impl = heimdal; then
6089                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6090 echo "configure:6091: checking for main in -lkrb4" >&5
6091 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
6092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6093   echo $ac_n "(cached) $ac_c" 1>&6
6094 else
6095   ac_save_LIBS="$LIBS"
6096 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6097 cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100
6101 int main() {
6102 main()
6103 ; return 0; }
6104 EOF
6105 if { (eval echo configure:6106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6106   rm -rf conftest*
6107   eval "ac_cv_lib_$ac_lib_var=yes"
6108 else
6109   echo "configure: failed program was:" >&5
6110   cat conftest.$ac_ext >&5
6111   rm -rf conftest*
6112   eval "ac_cv_lib_$ac_lib_var=no"
6113 fi
6114 rm -f conftest*
6115 LIBS="$ac_save_LIBS"
6116
6117 fi
6118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6119   echo "$ac_t""yes" 1>&6
6120   have_k425=yes
6121                                 KRB4_LIBS="-lkrb4"
6122 else
6123   echo "$ac_t""no" 1>&6
6124 have_k425=no
6125 fi
6126
6127
6128                 else
6129                         have_425=no
6130                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6131                 fi
6132
6133                 if test $have_k425 = yes ; then
6134                         ol_with_kerberos=found
6135                         ol_link_krb4=yes
6136
6137                         cat >> confdefs.h <<\EOF
6138 #define HAVE_KRB425 1
6139 EOF
6140
6141                         cat >> confdefs.h <<\EOF
6142 #define HAVE_KRB4 1
6143 EOF
6144
6145
6146                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6147 echo "configure:6148: checking for des_debug in Kerberos libraries" >&5
6148 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
6149   echo $ac_n "(cached) $ac_c" 1>&6
6150 else
6151   
6152                                                                 save_LIBS="$LIBS"
6153                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6154                                 cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157
6158 #include <kerberosIV/krb.h>
6159 #include <kerberosIV/des.h>
6160 extern int des_debug;
6161
6162 int main() {
6163
6164 des_debug = 1;
6165
6166 ; return 0; }
6167 EOF
6168 if { (eval echo configure:6169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6169   rm -rf conftest*
6170   ol_cv_var_des_debug=yes
6171 else
6172   echo "configure: failed program was:" >&5
6173   cat conftest.$ac_ext >&5
6174   rm -rf conftest*
6175   ol_cv_var_des_debug=no
6176 fi
6177 rm -f conftest*
6178                                                                 LIBS="$save_LIBS"
6179                         
6180 fi
6181
6182 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6183
6184                         if test $ol_cv_var_des_debug = yes ; then
6185                                 cat >> confdefs.h <<\EOF
6186 #define HAVE_DES_DEBUG 1
6187 EOF
6188
6189                         fi
6190
6191                         LIBS="$save_LIBS"
6192                 fi
6193         fi
6194 fi
6195
6196 if test $ol_link_krb5 = yes ; then
6197         ol_with_kerberos=found
6198 fi
6199
6200 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6201         -o $ol_with_kerberos = kth ; then
6202
6203         for ac_hdr in krb.h des.h krb-archaeology.h 
6204 do
6205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6207 echo "configure:6208: checking for $ac_hdr" >&5
6208 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6209   echo $ac_n "(cached) $ac_c" 1>&6
6210 else
6211   cat > conftest.$ac_ext <<EOF
6212 #line 6213 "configure"
6213 #include "confdefs.h"
6214 #include <$ac_hdr>
6215 EOF
6216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6217 { (eval echo configure:6218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6219 if test -z "$ac_err"; then
6220   rm -rf conftest*
6221   eval "ac_cv_header_$ac_safe=yes"
6222 else
6223   echo "$ac_err" >&5
6224   echo "configure: failed program was:" >&5
6225   cat conftest.$ac_ext >&5
6226   rm -rf conftest*
6227   eval "ac_cv_header_$ac_safe=no"
6228 fi
6229 rm -f conftest*
6230 fi
6231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6232   echo "$ac_t""yes" 1>&6
6233     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6234   cat >> confdefs.h <<EOF
6235 #define $ac_tr_hdr 1
6236 EOF
6237  
6238 else
6239   echo "$ac_t""no" 1>&6
6240 fi
6241 done
6242
6243
6244         if test $ac_cv_header_krb_h = yes ; then
6245                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6246 echo "configure:6247: checking for main in -lkrb" >&5
6247 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
6248 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6249   echo $ac_n "(cached) $ac_c" 1>&6
6250 else
6251   ac_save_LIBS="$LIBS"
6252 LIBS="-lkrb -ldes $LIBS"
6253 cat > conftest.$ac_ext <<EOF
6254 #line 6255 "configure"
6255 #include "confdefs.h"
6256
6257 int main() {
6258 main()
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262   rm -rf conftest*
6263   eval "ac_cv_lib_$ac_lib_var=yes"
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   eval "ac_cv_lib_$ac_lib_var=no"
6269 fi
6270 rm -f conftest*
6271 LIBS="$ac_save_LIBS"
6272
6273 fi
6274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6275   echo "$ac_t""yes" 1>&6
6276   have_k4=yes
6277 else
6278   echo "$ac_t""no" 1>&6
6279 have_k4=no
6280 fi
6281
6282
6283                 if test $have_k4 = yes ; then
6284                         ol_with_kerberos=found
6285                         ol_link_krb4=yes
6286
6287                         cat >> confdefs.h <<\EOF
6288 #define HAVE_KRB4 1
6289 EOF
6290
6291
6292                         KRB4_LIBS="-lkrb -ldes"
6293
6294                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6295                                 cat >> confdefs.h <<\EOF
6296 #define HAVE_KTH_KERBEROS 1
6297 EOF
6298
6299                         fi
6300                 fi
6301         fi
6302 fi
6303
6304 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6305         cat >> confdefs.h <<\EOF
6306 #define HAVE_KERBEROS 1
6307 EOF
6308
6309
6310 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6311         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6312 fi
6313
6314 ol_link_tls=no
6315 if test $ol_with_tls != no ; then
6316         
6317         for ac_hdr in openssl/ssl.h ssl.h
6318 do
6319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6321 echo "configure:6322: checking for $ac_hdr" >&5
6322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6323   echo $ac_n "(cached) $ac_c" 1>&6
6324 else
6325   cat > conftest.$ac_ext <<EOF
6326 #line 6327 "configure"
6327 #include "confdefs.h"
6328 #include <$ac_hdr>
6329 EOF
6330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6331 { (eval echo configure:6332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6333 if test -z "$ac_err"; then
6334   rm -rf conftest*
6335   eval "ac_cv_header_$ac_safe=yes"
6336 else
6337   echo "$ac_err" >&5
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   eval "ac_cv_header_$ac_safe=no"
6342 fi
6343 rm -f conftest*
6344 fi
6345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6346   echo "$ac_t""yes" 1>&6
6347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6348   cat >> confdefs.h <<EOF
6349 #define $ac_tr_hdr 1
6350 EOF
6351  
6352 else
6353   echo "$ac_t""no" 1>&6
6354 fi
6355 done
6356
6357         
6358         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6359                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6360 echo "configure:6361: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6361 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
6362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6363   echo $ac_n "(cached) $ac_c" 1>&6
6364 else
6365   ac_save_LIBS="$LIBS"
6366 LIBS="-lssl -lcrypto $LIBS"
6367 cat > conftest.$ac_ext <<EOF
6368 #line 6369 "configure"
6369 #include "confdefs.h"
6370 /* Override any gcc2 internal prototype to avoid an error.  */
6371 /* We use char because int might match the return type of a gcc2
6372     builtin and then its argument prototype would still apply.  */
6373 char SSLeay_add_ssl_algorithms();
6374
6375 int main() {
6376 SSLeay_add_ssl_algorithms()
6377 ; return 0; }
6378 EOF
6379 if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6380   rm -rf conftest*
6381   eval "ac_cv_lib_$ac_lib_var=yes"
6382 else
6383   echo "configure: failed program was:" >&5
6384   cat conftest.$ac_ext >&5
6385   rm -rf conftest*
6386   eval "ac_cv_lib_$ac_lib_var=no"
6387 fi
6388 rm -f conftest*
6389 LIBS="$ac_save_LIBS"
6390
6391 fi
6392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6393   echo "$ac_t""yes" 1>&6
6394   have_ssleay=yes
6395                         need_rsaref=no
6396 else
6397   echo "$ac_t""no" 1>&6
6398 have_ssleay=no
6399 fi
6400
6401                         
6402                 if test $have_ssleay = no ; then
6403                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6404 echo "configure:6405: checking for SSL_library_init in -lssl" >&5
6405 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
6406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6407   echo $ac_n "(cached) $ac_c" 1>&6
6408 else
6409   ac_save_LIBS="$LIBS"
6410 LIBS="-lssl -lcrypto $LIBS"
6411 cat > conftest.$ac_ext <<EOF
6412 #line 6413 "configure"
6413 #include "confdefs.h"
6414 /* Override any gcc2 internal prototype to avoid an error.  */
6415 /* We use char because int might match the return type of a gcc2
6416     builtin and then its argument prototype would still apply.  */
6417 char SSL_library_init();
6418
6419 int main() {
6420 SSL_library_init()
6421 ; return 0; }
6422 EOF
6423 if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=yes"
6426 else
6427   echo "configure: failed program was:" >&5
6428   cat conftest.$ac_ext >&5
6429   rm -rf conftest*
6430   eval "ac_cv_lib_$ac_lib_var=no"
6431 fi
6432 rm -f conftest*
6433 LIBS="$ac_save_LIBS"
6434
6435 fi
6436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6437   echo "$ac_t""yes" 1>&6
6438   have_ssleay=yes
6439                                 need_rsaref=no
6440 else
6441   echo "$ac_t""no" 1>&6
6442 have_ssleay=no
6443 fi
6444
6445                 fi
6446
6447                 if test $have_ssleay = no ; then
6448                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6449 echo "configure:6450: checking for ssl3_accept in -lssl" >&5
6450 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
6451 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6452   echo $ac_n "(cached) $ac_c" 1>&6
6453 else
6454   ac_save_LIBS="$LIBS"
6455 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6456 cat > conftest.$ac_ext <<EOF
6457 #line 6458 "configure"
6458 #include "confdefs.h"
6459 /* Override any gcc2 internal prototype to avoid an error.  */
6460 /* We use char because int might match the return type of a gcc2
6461     builtin and then its argument prototype would still apply.  */
6462 char ssl3_accept();
6463
6464 int main() {
6465 ssl3_accept()
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469   rm -rf conftest*
6470   eval "ac_cv_lib_$ac_lib_var=yes"
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474   rm -rf conftest*
6475   eval "ac_cv_lib_$ac_lib_var=no"
6476 fi
6477 rm -f conftest*
6478 LIBS="$ac_save_LIBS"
6479
6480 fi
6481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6482   echo "$ac_t""yes" 1>&6
6483   have_ssleay=yes
6484                                 need_rsaref=yes
6485 else
6486   echo "$ac_t""no" 1>&6
6487 have_ssleay=no
6488 fi
6489
6490                 fi
6491
6492                 if test $have_ssleay = yes ; then
6493                         ol_with_tls=found
6494                         ol_link_tls=yes
6495
6496                         cat >> confdefs.h <<\EOF
6497 #define HAVE_SSLEAY 1
6498 EOF
6499
6500
6501                         if test $need_rsaref = yes; then
6502                                 cat >> confdefs.h <<\EOF
6503 #define HAVE_RSAREF 1
6504 EOF
6505
6506
6507                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6508                         else
6509                                 TLS_LIBS="-lssl -lcrypto"
6510                         fi
6511                 fi
6512         fi
6513 fi
6514
6515 if test $ol_link_tls = yes ; then
6516         cat >> confdefs.h <<\EOF
6517 #define HAVE_TLS 1
6518 EOF
6519
6520 fi      
6521
6522 for ac_func in \
6523         ctime_r                 \
6524         gethostbyname_r gethostbyaddr_r \
6525
6526 do
6527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6528 echo "configure:6529: checking for $ac_func" >&5
6529 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 /* System header to define __stub macros and hopefully few prototypes,
6536     which can conflict with char $ac_func(); below.  */
6537 #include <assert.h>
6538 /* Override any gcc2 internal prototype to avoid an error.  */
6539 /* We use char because int might match the return type of a gcc2
6540     builtin and then its argument prototype would still apply.  */
6541 char $ac_func();
6542
6543 int main() {
6544
6545 /* The GNU C library defines this for functions which it implements
6546     to always fail with ENOSYS.  Some functions are actually named
6547     something starting with __ and the normal name is an alias.  */
6548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6549 choke me
6550 #else
6551 $ac_func();
6552 #endif
6553
6554 ; return 0; }
6555 EOF
6556 if { (eval echo configure:6557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6557   rm -rf conftest*
6558   eval "ac_cv_func_$ac_func=yes"
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   eval "ac_cv_func_$ac_func=no"
6564 fi
6565 rm -f conftest*
6566 fi
6567
6568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6569   echo "$ac_t""yes" 1>&6
6570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6571   cat >> confdefs.h <<EOF
6572 #define $ac_tr_func 1
6573 EOF
6574  
6575 else
6576   echo "$ac_t""no" 1>&6
6577 fi
6578 done
6579
6580
6581 if test "$ac_cv_func_ctime_r" = no ; then
6582         ol_cv_func_ctime_r_nargs=0
6583 else
6584         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6585 echo "configure:6586: checking number of arguments of ctime_r" >&5
6586 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
6587   echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589   cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 #include <time.h>
6593 int main() {
6594 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6598   rm -rf conftest*
6599   ol_cv_func_ctime_r_nargs3=yes
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   ol_cv_func_ctime_r_nargs3=no
6605 fi
6606 rm -f conftest*
6607
6608         cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 #include <time.h>
6612 int main() {
6613 time_t ti; char *buffer; ctime_r(&ti,buffer);
6614 ; return 0; }
6615 EOF
6616 if { (eval echo configure:6617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6617   rm -rf conftest*
6618   ol_cv_func_ctime_r_nargs2=yes
6619 else
6620   echo "configure: failed program was:" >&5
6621   cat conftest.$ac_ext >&5
6622   rm -rf conftest*
6623   ol_cv_func_ctime_r_nargs2=no
6624 fi
6625 rm -f conftest*
6626
6627         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6628                 $ol_cv_func_ctime_r_nargs2 = no ; then
6629
6630                 ol_cv_func_ctime_r_nargs=3
6631
6632         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6633                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6634
6635                 ol_cv_func_ctime_r_nargs=2
6636
6637         else
6638                 ol_cv_func_ctime_r_nargs=0
6639         fi
6640   
6641 fi
6642
6643 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6644
6645   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6646         cat >> confdefs.h <<EOF
6647 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6648 EOF
6649
6650   fi
6651
6652 fi
6653
6654 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6655         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6656 echo "configure:6657: checking number of arguments of gethostbyname_r" >&5
6657 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 #include <sys/types.h>
6664 #include <sys/socket.h>
6665 #include <netinet/in.h>
6666 #include <netdb.h>
6667 #define BUFSIZE (sizeof(struct hostent)+10)
6668 int main() {
6669 struct hostent hent; char buffer[BUFSIZE];
6670                 int bufsize=BUFSIZE;int h_errno;
6671                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6672                         buffer, bufsize, &h_errno);
6673 ; return 0; }
6674 EOF
6675 if { (eval echo configure:6676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6676   rm -rf conftest*
6677   ol_cv_func_gethostbyname_r_nargs5=yes
6678 else
6679   echo "configure: failed program was:" >&5
6680   cat conftest.$ac_ext >&5
6681   rm -rf conftest*
6682   ol_cv_func_gethostbyname_r_nargs5=no
6683 fi
6684 rm -f conftest*
6685
6686         cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 #include <sys/types.h>
6690 #include <sys/socket.h>
6691 #include <netinet/in.h>
6692 #include <netdb.h>
6693 #define BUFSIZE (sizeof(struct hostent)+10)
6694 int main() {
6695 struct hostent hent;struct hostent *rhent;
6696                 char buffer[BUFSIZE];
6697                 int bufsize=BUFSIZE;int h_errno;
6698                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6699                         &rhent, &h_errno);
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6703   rm -rf conftest*
6704   ol_cv_func_gethostbyname_r_nargs6=yes
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   ol_cv_func_gethostbyname_r_nargs6=no
6710 fi
6711 rm -f conftest*
6712
6713         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6714                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6715
6716                 ol_cv_func_gethostbyname_r_nargs=5
6717
6718         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6719                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6720
6721                 ol_cv_func_gethostbyname_r_nargs=6
6722
6723         else
6724                 ol_cv_func_gethostbyname_r_nargs=0
6725         fi
6726   
6727 fi
6728
6729 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6730   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6731         cat >> confdefs.h <<EOF
6732 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6733 EOF
6734
6735   fi
6736
6737 else
6738         ol_cv_func_gethostbyname_r_nargs=0
6739 fi
6740  
6741 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6742         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6743 echo "configure:6744: checking number of arguments of gethostbyaddr_r" >&5
6744 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
6745   echo $ac_n "(cached) $ac_c" 1>&6
6746 else
6747   cat > conftest.$ac_ext <<EOF
6748 #line 6749 "configure"
6749 #include "confdefs.h"
6750 #include <sys/types.h>
6751 #include <sys/socket.h>
6752 #include <netinet/in.h>
6753 #include <netdb.h>
6754 #define BUFSIZE (sizeof(struct hostent)+10)
6755 int main() {
6756 struct hostent hent; char buffer[BUFSIZE]; 
6757             struct in_addr add;
6758             size_t alen=sizeof(struct in_addr);
6759             int bufsize=BUFSIZE;int h_errno;
6760                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6761                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6762 ; return 0; }
6763 EOF
6764 if { (eval echo configure:6765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6765   rm -rf conftest*
6766   ol_cv_func_gethostbyaddr_r_nargs7=yes
6767 else
6768   echo "configure: failed program was:" >&5
6769   cat conftest.$ac_ext >&5
6770   rm -rf conftest*
6771   ol_cv_func_gethostbyaddr_r_nargs7=no
6772 fi
6773 rm -f conftest*
6774
6775         cat > conftest.$ac_ext <<EOF
6776 #line 6777 "configure"
6777 #include "confdefs.h"
6778 #include <sys/types.h>
6779 #include <sys/socket.h>
6780 #include <netinet/in.h>
6781 #include <netdb.h>
6782 #define BUFSIZE (sizeof(struct hostent)+10)
6783 int main() {
6784 struct hostent hent;
6785                 struct hostent *rhent; char buffer[BUFSIZE]; 
6786                 struct in_addr add;
6787                 size_t alen=sizeof(struct in_addr);
6788                 int bufsize=BUFSIZE;int h_errno;
6789                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6790                         alen, AF_INET, &hent, buffer, bufsize, 
6791                         &rhent, &h_errno);
6792 ; return 0; }
6793 EOF
6794 if { (eval echo configure:6795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6795   rm -rf conftest*
6796   ol_cv_func_gethostbyaddr_r_nargs8=yes
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   ol_cv_func_gethostbyaddr_r_nargs8=no
6802 fi
6803 rm -f conftest*
6804
6805         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6806                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6807
6808                 ol_cv_func_gethostbyaddr_r_nargs=7
6809
6810         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6811                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6812
6813                 ol_cv_func_gethostbyaddr_r_nargs=8
6814
6815         else
6816                 ol_cv_func_gethostbyaddr_r_nargs=0
6817         fi
6818   
6819 fi
6820
6821 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6822   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6823     cat >> confdefs.h <<EOF
6824 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6825 EOF
6826
6827   fi
6828
6829 else
6830         ol_cv_func_gethostbyaddr_r_nargs=0
6831 fi
6832
6833 if test "$ac_cv_func_ctime_r" = yes \
6834         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6835         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6836         -a "$ac_cv_func_gethostbyname_r" = yes \
6837         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6838         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6839         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6840         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6841         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6842         ; then
6843  
6844         cat >> confdefs.h <<\EOF
6845 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6846 EOF
6847
6848 fi
6849
6850 ol_link_threads=no
6851
6852 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6853         -o $ol_with_threads = nt ; then
6854
6855         
6856         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6857 echo "configure:6858: checking for NT Threads" >&5
6858 if eval "test \"`echo '$''{'ol_cv_nt_threads'+set}'`\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   
6862                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6863 echo "configure:6864: checking for _beginthread" >&5
6864 if eval "test \"`echo '$''{'ac_cv_func__beginthread'+set}'`\" = set"; then
6865   echo $ac_n "(cached) $ac_c" 1>&6
6866 else
6867   cat > conftest.$ac_ext <<EOF
6868 #line 6869 "configure"
6869 #include "confdefs.h"
6870 /* System header to define __stub macros and hopefully few prototypes,
6871     which can conflict with char _beginthread(); below.  */
6872 #include <assert.h>
6873 /* Override any gcc2 internal prototype to avoid an error.  */
6874 /* We use char because int might match the return type of a gcc2
6875     builtin and then its argument prototype would still apply.  */
6876 char _beginthread();
6877
6878 int main() {
6879
6880 /* The GNU C library defines this for functions which it implements
6881     to always fail with ENOSYS.  Some functions are actually named
6882     something starting with __ and the normal name is an alias.  */
6883 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6884 choke me
6885 #else
6886 _beginthread();
6887 #endif
6888
6889 ; return 0; }
6890 EOF
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6892   rm -rf conftest*
6893   eval "ac_cv_func__beginthread=yes"
6894 else
6895   echo "configure: failed program was:" >&5
6896   cat conftest.$ac_ext >&5
6897   rm -rf conftest*
6898   eval "ac_cv_func__beginthread=no"
6899 fi
6900 rm -f conftest*
6901 fi
6902
6903 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6904   echo "$ac_t""yes" 1>&6
6905   ol_cv_nt_threads=yes
6906 else
6907   echo "$ac_t""no" 1>&6
6908 ol_cv_nt_threads=no
6909 fi
6910
6911         
6912 fi
6913
6914 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6915
6916         if test $ol_cv_nt_threads = yes ; then
6917                 cat >> confdefs.h <<\EOF
6918 #define HAVE_NT_THREADS 1
6919 EOF
6920
6921         fi
6922
6923
6924         if test "$ol_cv_nt_threads" = yes ; then
6925         ol_link_threads=nt
6926         ol_with_threads=found
6927         ol_with_yielding_select=yes
6928
6929                 cat >> confdefs.h <<\EOF
6930 #define HAVE_NT_SERVICE_MANAGER 1
6931 EOF
6932
6933                 cat >> confdefs.h <<\EOF
6934 #define HAVE_NT_EVENT_LOG 1
6935 EOF
6936
6937         fi
6938
6939         if test $ol_with_threads = nt ; then
6940                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6941         fi
6942 fi
6943
6944 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6945         -o $ol_with_threads = posix ; then
6946
6947         for ac_hdr in pthread.h
6948 do
6949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6951 echo "configure:6952: checking for $ac_hdr" >&5
6952 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6953   echo $ac_n "(cached) $ac_c" 1>&6
6954 else
6955   cat > conftest.$ac_ext <<EOF
6956 #line 6957 "configure"
6957 #include "confdefs.h"
6958 #include <$ac_hdr>
6959 EOF
6960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6961 { (eval echo configure:6962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6963 if test -z "$ac_err"; then
6964   rm -rf conftest*
6965   eval "ac_cv_header_$ac_safe=yes"
6966 else
6967   echo "$ac_err" >&5
6968   echo "configure: failed program was:" >&5
6969   cat conftest.$ac_ext >&5
6970   rm -rf conftest*
6971   eval "ac_cv_header_$ac_safe=no"
6972 fi
6973 rm -f conftest*
6974 fi
6975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6976   echo "$ac_t""yes" 1>&6
6977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6978   cat >> confdefs.h <<EOF
6979 #define $ac_tr_hdr 1
6980 EOF
6981  
6982 else
6983   echo "$ac_t""no" 1>&6
6984 fi
6985 done
6986
6987
6988         if test $ac_cv_header_pthread_h = yes ; then
6989                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6990 echo "configure:6991: checking POSIX thread version" >&5
6991 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
6992   echo $ac_n "(cached) $ac_c" 1>&6
6993 else
6994   
6995         cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998
6999 #               include <pthread.h>
7000                 /* this check could be improved */
7001 #               ifdef PTHREAD_ONCE_INIT
7002                         pthread_version_final;
7003 #               endif
7004         
7005 EOF
7006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7007   egrep "pthread_version_final" >/dev/null 2>&1; then
7008   rm -rf conftest*
7009   ol_pthread_final=yes
7010 else
7011   rm -rf conftest*
7012   ol_pthread_final=no
7013 fi
7014 rm -f conftest*
7015
7016
7017         cat > conftest.$ac_ext <<EOF
7018 #line 7019 "configure"
7019 #include "confdefs.h"
7020
7021 #               include <pthread.h>
7022                 /* this check could be improved */
7023 #               ifdef pthread_once_init
7024                         pthread_version_draft4;
7025 #               endif
7026         
7027 EOF
7028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7029   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7030   rm -rf conftest*
7031   ol_pthread_draft4=yes
7032 else
7033   rm -rf conftest*
7034   ol_pthread_draft4=no
7035 fi
7036 rm -f conftest*
7037
7038
7039         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7040                 ol_cv_pthread_version=final
7041         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7042                 ol_cv_pthread_version=draft4
7043         else
7044                 ol_cv_pthread_version=unknown
7045         fi
7046
7047 fi
7048
7049 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7050
7051
7052                 if test $ol_cv_pthread_version = final ; then
7053                         cat >> confdefs.h <<\EOF
7054 #define HAVE_PTHREADS_FINAL 1
7055 EOF
7056
7057                 elif test $ol_cv_pthread_version = draft4 ; then
7058                         cat >> confdefs.h <<\EOF
7059 #define HAVE_PTHREADS_D4 1
7060 EOF
7061
7062                 else
7063                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7064                 fi
7065
7066                 # consider threads found
7067                 ol_with_threads=found
7068
7069                 
7070         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7071 echo "configure:7072: checking for LinuxThreads pthread.h" >&5
7072 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7073   echo $ac_n "(cached) $ac_c" 1>&6
7074 else
7075   cat > conftest.$ac_ext <<EOF
7076 #line 7077 "configure"
7077 #include "confdefs.h"
7078 #include <pthread.h>
7079 EOF
7080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7081   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7082   rm -rf conftest*
7083   ol_cv_header_linux_threads=yes
7084 else
7085   rm -rf conftest*
7086   ol_cv_header_linux_threads=no
7087 fi
7088 rm -f conftest*
7089
7090                 
7091 fi
7092
7093 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7094         if test $ol_cv_header_linux_threads = yes; then
7095                 cat >> confdefs.h <<\EOF
7096 #define HAVE_LINUX_THREADS 1
7097 EOF
7098
7099         fi
7100
7101                 
7102         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7103 echo "configure:7104: checking for GNU Pth pthread.h" >&5
7104 if eval "test \"`echo '$''{'ol_cv_header_gnu_pth_pthread_h'+set}'`\" = set"; then
7105   echo $ac_n "(cached) $ac_c" 1>&6
7106 else
7107   cat > conftest.$ac_ext <<EOF
7108 #line 7109 "configure"
7109 #include "confdefs.h"
7110 #include <pthread.h>
7111 #ifdef _POSIX_THREAD_IS_GNU_PTH
7112         __gnu_pth__;
7113 #endif
7114
7115 EOF
7116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7117   egrep "__gnu_pth__" >/dev/null 2>&1; then
7118   rm -rf conftest*
7119   ol_cv_header_gnu_pth_pthread_h=yes
7120 else
7121   rm -rf conftest*
7122   ol_cv_header_gnu_pth_pthread_h=no
7123 fi
7124 rm -f conftest*
7125
7126                 
7127 fi
7128
7129 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7130
7131
7132                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7133                         for ac_hdr in sched.h
7134 do
7135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7137 echo "configure:7138: checking for $ac_hdr" >&5
7138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7139   echo $ac_n "(cached) $ac_c" 1>&6
7140 else
7141   cat > conftest.$ac_ext <<EOF
7142 #line 7143 "configure"
7143 #include "confdefs.h"
7144 #include <$ac_hdr>
7145 EOF
7146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7147 { (eval echo configure:7148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7149 if test -z "$ac_err"; then
7150   rm -rf conftest*
7151   eval "ac_cv_header_$ac_safe=yes"
7152 else
7153   echo "$ac_err" >&5
7154   echo "configure: failed program was:" >&5
7155   cat conftest.$ac_ext >&5
7156   rm -rf conftest*
7157   eval "ac_cv_header_$ac_safe=no"
7158 fi
7159 rm -f conftest*
7160 fi
7161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7162   echo "$ac_t""yes" 1>&6
7163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7164   cat >> confdefs.h <<EOF
7165 #define $ac_tr_hdr 1
7166 EOF
7167  
7168 else
7169   echo "$ac_t""no" 1>&6
7170 fi
7171 done
7172
7173                 fi
7174
7175                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7176                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7177 echo "configure:7178: checking for pthread_create in default libraries" >&5
7178 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
7179   echo $ac_n "(cached) $ac_c" 1>&6
7180 else
7181   
7182                 if test "$cross_compiling" = yes; then
7183   cat > conftest.$ac_ext <<EOF
7184 #line 7185 "configure"
7185 #include "confdefs.h"
7186 /* pthread test headers */
7187 #include <pthread.h>
7188 #ifndef NULL
7189 #define NULL (void*)0
7190 #endif
7191
7192 static void *task(p)
7193         void *p;
7194 {
7195         return (void *) (p == NULL);
7196 }
7197
7198 int main() {
7199
7200         /* pthread test function */
7201         pthread_t t;
7202         int status;
7203
7204         /* make sure pthread_create() isn't just a stub */
7205 #if HAVE_PTHREADS_D4
7206         status = pthread_create(&t, pthread_attr_default, task, NULL);
7207 #else
7208         status = pthread_create(&t, NULL, task, NULL);
7209 #endif
7210
7211         if( status ) exit( status );
7212
7213         /* make sure pthread_detach() isn't just a stub */
7214 #if HAVE_PTHREADS_D4
7215         status = pthread_detach( &t );
7216 #else
7217         status = pthread_detach( t );
7218 #endif
7219
7220 #ifdef HAVE_LINUX_THREADS
7221         pthread_kill_other_threads_np();
7222 #endif
7223
7224         exit( status );
7225
7226 ; return 0; }
7227 EOF
7228 if { (eval echo configure:7229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7229   rm -rf conftest*
7230   ol_cv_pthread_create=yes
7231 else
7232   echo "configure: failed program was:" >&5
7233   cat conftest.$ac_ext >&5
7234   rm -rf conftest*
7235   ol_cv_pthread_create=no
7236 fi
7237 rm -f conftest*
7238 else
7239   cat > conftest.$ac_ext <<EOF
7240 #line 7241 "configure"
7241 #include "confdefs.h"
7242 /* pthread test headers */
7243 #include <pthread.h>
7244 #ifndef NULL
7245 #define NULL (void*)0
7246 #endif
7247
7248 static void *task(p)
7249         void *p;
7250 {
7251         return (void *) (p == NULL);
7252 }
7253
7254
7255 int main(argc, argv)
7256         int argc;
7257         char **argv;
7258 {
7259
7260         /* pthread test function */
7261         pthread_t t;
7262         int status;
7263
7264         /* make sure pthread_create() isn't just a stub */
7265 #if HAVE_PTHREADS_D4
7266         status = pthread_create(&t, pthread_attr_default, task, NULL);
7267 #else
7268         status = pthread_create(&t, NULL, task, NULL);
7269 #endif
7270
7271         if( status ) exit( status );
7272
7273         /* make sure pthread_detach() isn't just a stub */
7274 #if HAVE_PTHREADS_D4
7275         status = pthread_detach( &t );
7276 #else
7277         status = pthread_detach( t );
7278 #endif
7279
7280 #ifdef HAVE_LINUX_THREADS
7281         pthread_kill_other_threads_np();
7282 #endif
7283
7284         exit( status );
7285
7286 }
7287
7288 EOF
7289 if { (eval echo configure:7290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7290 then
7291   ol_cv_pthread_create=yes
7292 else
7293   echo "configure: failed program was:" >&5
7294   cat conftest.$ac_ext >&5
7295   rm -fr conftest*
7296   ol_cv_pthread_create=no
7297 fi
7298 rm -fr conftest*
7299 fi
7300
7301 fi
7302
7303 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7304
7305                 if test $ol_cv_pthread_create != no ; then
7306                         ol_link_threads=posix
7307                         ol_link_pthreads=""
7308                 fi
7309                 
7310                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7311 if test "$ol_link_threads" = no ; then
7312         # try -kthread
7313         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7314 echo "configure:7315: checking for pthread link with -kthread" >&5
7315 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
7316   echo $ac_n "(cached) $ac_c" 1>&6
7317 else
7318   
7319                 # save the flags
7320                 ol_LIBS="$LIBS"
7321                 LIBS="-kthread $LIBS"
7322
7323                 if test "$cross_compiling" = yes; then
7324   cat > conftest.$ac_ext <<EOF
7325 #line 7326 "configure"
7326 #include "confdefs.h"
7327 /* pthread test headers */
7328 #include <pthread.h>
7329 #ifndef NULL
7330 #define NULL (void*)0
7331 #endif
7332
7333 static void *task(p)
7334         void *p;
7335 {
7336         return (void *) (p == NULL);
7337 }
7338
7339 int main() {
7340
7341         /* pthread test function */
7342         pthread_t t;
7343         int status;
7344
7345         /* make sure pthread_create() isn't just a stub */
7346 #if HAVE_PTHREADS_D4
7347         status = pthread_create(&t, pthread_attr_default, task, NULL);
7348 #else
7349         status = pthread_create(&t, NULL, task, NULL);
7350 #endif
7351
7352         if( status ) exit( status );
7353
7354         /* make sure pthread_detach() isn't just a stub */
7355 #if HAVE_PTHREADS_D4
7356         status = pthread_detach( &t );
7357 #else
7358         status = pthread_detach( t );
7359 #endif
7360
7361 #ifdef HAVE_LINUX_THREADS
7362         pthread_kill_other_threads_np();
7363 #endif
7364
7365         exit( status );
7366
7367 ; return 0; }
7368 EOF
7369 if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7370   rm -rf conftest*
7371   ol_cv_pthread_kthread=yes
7372 else
7373   echo "configure: failed program was:" >&5
7374   cat conftest.$ac_ext >&5
7375   rm -rf conftest*
7376   ol_cv_pthread_kthread=no
7377 fi
7378 rm -f conftest*
7379 else
7380   cat > conftest.$ac_ext <<EOF
7381 #line 7382 "configure"
7382 #include "confdefs.h"
7383 /* pthread test headers */
7384 #include <pthread.h>
7385 #ifndef NULL
7386 #define NULL (void*)0
7387 #endif
7388
7389 static void *task(p)
7390         void *p;
7391 {
7392         return (void *) (p == NULL);
7393 }
7394
7395
7396 int main(argc, argv)
7397         int argc;
7398         char **argv;
7399 {
7400
7401         /* pthread test function */
7402         pthread_t t;
7403         int status;
7404
7405         /* make sure pthread_create() isn't just a stub */
7406 #if HAVE_PTHREADS_D4
7407         status = pthread_create(&t, pthread_attr_default, task, NULL);
7408 #else
7409         status = pthread_create(&t, NULL, task, NULL);
7410 #endif
7411
7412         if( status ) exit( status );
7413
7414         /* make sure pthread_detach() isn't just a stub */
7415 #if HAVE_PTHREADS_D4
7416         status = pthread_detach( &t );
7417 #else
7418         status = pthread_detach( t );
7419 #endif
7420
7421 #ifdef HAVE_LINUX_THREADS
7422         pthread_kill_other_threads_np();
7423 #endif
7424
7425         exit( status );
7426
7427 }
7428
7429 EOF
7430 if { (eval echo configure:7431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7431 then
7432   ol_cv_pthread_kthread=yes
7433 else
7434   echo "configure: failed program was:" >&5
7435   cat conftest.$ac_ext >&5
7436   rm -fr conftest*
7437   ol_cv_pthread_kthread=no
7438 fi
7439 rm -fr conftest*
7440 fi
7441
7442
7443                 # restore the LIBS
7444                 LIBS="$ol_LIBS"
7445         
7446 fi
7447
7448 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7449
7450         if test $ol_cv_pthread_kthread = yes ; then
7451                 ol_link_pthreads="-kthread"
7452                 ol_link_threads=posix
7453         fi
7454 fi
7455
7456                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7457 if test "$ol_link_threads" = no ; then
7458         # try -pthread
7459         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7460 echo "configure:7461: checking for pthread link with -pthread" >&5
7461 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
7462   echo $ac_n "(cached) $ac_c" 1>&6
7463 else
7464   
7465                 # save the flags
7466                 ol_LIBS="$LIBS"
7467                 LIBS="-pthread $LIBS"
7468
7469                 if test "$cross_compiling" = yes; then
7470   cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* pthread test headers */
7474 #include <pthread.h>
7475 #ifndef NULL
7476 #define NULL (void*)0
7477 #endif
7478
7479 static void *task(p)
7480         void *p;
7481 {
7482         return (void *) (p == NULL);
7483 }
7484
7485 int main() {
7486
7487         /* pthread test function */
7488         pthread_t t;
7489         int status;
7490
7491         /* make sure pthread_create() isn't just a stub */
7492 #if HAVE_PTHREADS_D4
7493         status = pthread_create(&t, pthread_attr_default, task, NULL);
7494 #else
7495         status = pthread_create(&t, NULL, task, NULL);
7496 #endif
7497
7498         if( status ) exit( status );
7499
7500         /* make sure pthread_detach() isn't just a stub */
7501 #if HAVE_PTHREADS_D4
7502         status = pthread_detach( &t );
7503 #else
7504         status = pthread_detach( t );
7505 #endif
7506
7507 #ifdef HAVE_LINUX_THREADS
7508         pthread_kill_other_threads_np();
7509 #endif
7510
7511         exit( status );
7512
7513 ; return 0; }
7514 EOF
7515 if { (eval echo configure:7516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7516   rm -rf conftest*
7517   ol_cv_pthread_pthread=yes
7518 else
7519   echo "configure: failed program was:" >&5
7520   cat conftest.$ac_ext >&5
7521   rm -rf conftest*
7522   ol_cv_pthread_pthread=no
7523 fi
7524 rm -f conftest*
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* pthread test headers */
7530 #include <pthread.h>
7531 #ifndef NULL
7532 #define NULL (void*)0
7533 #endif
7534
7535 static void *task(p)
7536         void *p;
7537 {
7538         return (void *) (p == NULL);
7539 }
7540
7541
7542 int main(argc, argv)
7543         int argc;
7544         char **argv;
7545 {
7546
7547         /* pthread test function */
7548         pthread_t t;
7549         int status;
7550
7551         /* make sure pthread_create() isn't just a stub */
7552 #if HAVE_PTHREADS_D4
7553         status = pthread_create(&t, pthread_attr_default, task, NULL);
7554 #else
7555         status = pthread_create(&t, NULL, task, NULL);
7556 #endif
7557
7558         if( status ) exit( status );
7559
7560         /* make sure pthread_detach() isn't just a stub */
7561 #if HAVE_PTHREADS_D4
7562         status = pthread_detach( &t );
7563 #else
7564         status = pthread_detach( t );
7565 #endif
7566
7567 #ifdef HAVE_LINUX_THREADS
7568         pthread_kill_other_threads_np();
7569 #endif
7570
7571         exit( status );
7572
7573 }
7574
7575 EOF
7576 if { (eval echo configure:7577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7577 then
7578   ol_cv_pthread_pthread=yes
7579 else
7580   echo "configure: failed program was:" >&5
7581   cat conftest.$ac_ext >&5
7582   rm -fr conftest*
7583   ol_cv_pthread_pthread=no
7584 fi
7585 rm -fr conftest*
7586 fi
7587
7588
7589                 # restore the LIBS
7590                 LIBS="$ol_LIBS"
7591         
7592 fi
7593
7594 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7595
7596         if test $ol_cv_pthread_pthread = yes ; then
7597                 ol_link_pthreads="-pthread"
7598                 ol_link_threads=posix
7599         fi
7600 fi
7601
7602                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7603 if test "$ol_link_threads" = no ; then
7604         # try -pthreads
7605         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7606 echo "configure:7607: checking for pthread link with -pthreads" >&5
7607 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
7608   echo $ac_n "(cached) $ac_c" 1>&6
7609 else
7610   
7611                 # save the flags
7612                 ol_LIBS="$LIBS"
7613                 LIBS="-pthreads $LIBS"
7614
7615                 if test "$cross_compiling" = yes; then
7616   cat > conftest.$ac_ext <<EOF
7617 #line 7618 "configure"
7618 #include "confdefs.h"
7619 /* pthread test headers */
7620 #include <pthread.h>
7621 #ifndef NULL
7622 #define NULL (void*)0
7623 #endif
7624
7625 static void *task(p)
7626         void *p;
7627 {
7628         return (void *) (p == NULL);
7629 }
7630
7631 int main() {
7632
7633         /* pthread test function */
7634         pthread_t t;
7635         int status;
7636
7637         /* make sure pthread_create() isn't just a stub */
7638 #if HAVE_PTHREADS_D4
7639         status = pthread_create(&t, pthread_attr_default, task, NULL);
7640 #else
7641         status = pthread_create(&t, NULL, task, NULL);
7642 #endif
7643
7644         if( status ) exit( status );
7645
7646         /* make sure pthread_detach() isn't just a stub */
7647 #if HAVE_PTHREADS_D4
7648         status = pthread_detach( &t );
7649 #else
7650         status = pthread_detach( t );
7651 #endif
7652
7653 #ifdef HAVE_LINUX_THREADS
7654         pthread_kill_other_threads_np();
7655 #endif
7656
7657         exit( status );
7658
7659 ; return 0; }
7660 EOF
7661 if { (eval echo configure:7662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7662   rm -rf conftest*
7663   ol_cv_pthread_pthreads=yes
7664 else
7665   echo "configure: failed program was:" >&5
7666   cat conftest.$ac_ext >&5
7667   rm -rf conftest*
7668   ol_cv_pthread_pthreads=no
7669 fi
7670 rm -f conftest*
7671 else
7672   cat > conftest.$ac_ext <<EOF
7673 #line 7674 "configure"
7674 #include "confdefs.h"
7675 /* pthread test headers */
7676 #include <pthread.h>
7677 #ifndef NULL
7678 #define NULL (void*)0
7679 #endif
7680
7681 static void *task(p)
7682         void *p;
7683 {
7684         return (void *) (p == NULL);
7685 }
7686
7687
7688 int main(argc, argv)
7689         int argc;
7690         char **argv;
7691 {
7692
7693         /* pthread test function */
7694         pthread_t t;
7695         int status;
7696
7697         /* make sure pthread_create() isn't just a stub */
7698 #if HAVE_PTHREADS_D4
7699         status = pthread_create(&t, pthread_attr_default, task, NULL);
7700 #else
7701         status = pthread_create(&t, NULL, task, NULL);
7702 #endif
7703
7704         if( status ) exit( status );
7705
7706         /* make sure pthread_detach() isn't just a stub */
7707 #if HAVE_PTHREADS_D4
7708         status = pthread_detach( &t );
7709 #else
7710         status = pthread_detach( t );
7711 #endif
7712
7713 #ifdef HAVE_LINUX_THREADS
7714         pthread_kill_other_threads_np();
7715 #endif
7716
7717         exit( status );
7718
7719 }
7720
7721 EOF
7722 if { (eval echo configure:7723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7723 then
7724   ol_cv_pthread_pthreads=yes
7725 else
7726   echo "configure: failed program was:" >&5
7727   cat conftest.$ac_ext >&5
7728   rm -fr conftest*
7729   ol_cv_pthread_pthreads=no
7730 fi
7731 rm -fr conftest*
7732 fi
7733
7734
7735                 # restore the LIBS
7736                 LIBS="$ol_LIBS"
7737         
7738 fi
7739
7740 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7741
7742         if test $ol_cv_pthread_pthreads = yes ; then
7743                 ol_link_pthreads="-pthreads"
7744                 ol_link_threads=posix
7745         fi
7746 fi
7747
7748                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7749 if test "$ol_link_threads" = no ; then
7750         # try -mthreads
7751         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7752 echo "configure:7753: checking for pthread link with -mthreads" >&5
7753 if eval "test \"`echo '$''{'ol_cv_pthread_mthreads'+set}'`\" = set"; then
7754   echo $ac_n "(cached) $ac_c" 1>&6
7755 else
7756   
7757                 # save the flags
7758                 ol_LIBS="$LIBS"
7759                 LIBS="-mthreads $LIBS"
7760
7761                 if test "$cross_compiling" = yes; then
7762   cat > conftest.$ac_ext <<EOF
7763 #line 7764 "configure"
7764 #include "confdefs.h"
7765 /* pthread test headers */
7766 #include <pthread.h>
7767 #ifndef NULL
7768 #define NULL (void*)0
7769 #endif
7770
7771 static void *task(p)
7772         void *p;
7773 {
7774         return (void *) (p == NULL);
7775 }
7776
7777 int main() {
7778
7779         /* pthread test function */
7780         pthread_t t;
7781         int status;
7782
7783         /* make sure pthread_create() isn't just a stub */
7784 #if HAVE_PTHREADS_D4
7785         status = pthread_create(&t, pthread_attr_default, task, NULL);
7786 #else
7787         status = pthread_create(&t, NULL, task, NULL);
7788 #endif
7789
7790         if( status ) exit( status );
7791
7792         /* make sure pthread_detach() isn't just a stub */
7793 #if HAVE_PTHREADS_D4
7794         status = pthread_detach( &t );
7795 #else
7796         status = pthread_detach( t );
7797 #endif
7798
7799 #ifdef HAVE_LINUX_THREADS
7800         pthread_kill_other_threads_np();
7801 #endif
7802
7803         exit( status );
7804
7805 ; return 0; }
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7808   rm -rf conftest*
7809   ol_cv_pthread_mthreads=yes
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -rf conftest*
7814   ol_cv_pthread_mthreads=no
7815 fi
7816 rm -f conftest*
7817 else
7818   cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 /* pthread test headers */
7822 #include <pthread.h>
7823 #ifndef NULL
7824 #define NULL (void*)0
7825 #endif
7826
7827 static void *task(p)
7828         void *p;
7829 {
7830         return (void *) (p == NULL);
7831 }
7832
7833
7834 int main(argc, argv)
7835         int argc;
7836         char **argv;
7837 {
7838
7839         /* pthread test function */
7840         pthread_t t;
7841         int status;
7842
7843         /* make sure pthread_create() isn't just a stub */
7844 #if HAVE_PTHREADS_D4
7845         status = pthread_create(&t, pthread_attr_default, task, NULL);
7846 #else
7847         status = pthread_create(&t, NULL, task, NULL);
7848 #endif
7849
7850         if( status ) exit( status );
7851
7852         /* make sure pthread_detach() isn't just a stub */
7853 #if HAVE_PTHREADS_D4
7854         status = pthread_detach( &t );
7855 #else
7856         status = pthread_detach( t );
7857 #endif
7858
7859 #ifdef HAVE_LINUX_THREADS
7860         pthread_kill_other_threads_np();
7861 #endif
7862
7863         exit( status );
7864
7865 }
7866
7867 EOF
7868 if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7869 then
7870   ol_cv_pthread_mthreads=yes
7871 else
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -fr conftest*
7875   ol_cv_pthread_mthreads=no
7876 fi
7877 rm -fr conftest*
7878 fi
7879
7880
7881                 # restore the LIBS
7882                 LIBS="$ol_LIBS"
7883         
7884 fi
7885
7886 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7887
7888         if test $ol_cv_pthread_mthreads = yes ; then
7889                 ol_link_pthreads="-mthreads"
7890                 ol_link_threads=posix
7891         fi
7892 fi
7893
7894                 # Pthread try link: -thread (ol_cv_pthread_thread)
7895 if test "$ol_link_threads" = no ; then
7896         # try -thread
7897         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7898 echo "configure:7899: checking for pthread link with -thread" >&5
7899 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902   
7903                 # save the flags
7904                 ol_LIBS="$LIBS"
7905                 LIBS="-thread $LIBS"
7906
7907                 if test "$cross_compiling" = yes; then
7908   cat > conftest.$ac_ext <<EOF
7909 #line 7910 "configure"
7910 #include "confdefs.h"
7911 /* pthread test headers */
7912 #include <pthread.h>
7913 #ifndef NULL
7914 #define NULL (void*)0
7915 #endif
7916
7917 static void *task(p)
7918         void *p;
7919 {
7920         return (void *) (p == NULL);
7921 }
7922
7923 int main() {
7924
7925         /* pthread test function */
7926         pthread_t t;
7927         int status;
7928
7929         /* make sure pthread_create() isn't just a stub */
7930 #if HAVE_PTHREADS_D4
7931         status = pthread_create(&t, pthread_attr_default, task, NULL);
7932 #else
7933         status = pthread_create(&t, NULL, task, NULL);
7934 #endif
7935
7936         if( status ) exit( status );
7937
7938         /* make sure pthread_detach() isn't just a stub */
7939 #if HAVE_PTHREADS_D4
7940         status = pthread_detach( &t );
7941 #else
7942         status = pthread_detach( t );
7943 #endif
7944
7945 #ifdef HAVE_LINUX_THREADS
7946         pthread_kill_other_threads_np();
7947 #endif
7948
7949         exit( status );
7950
7951 ; return 0; }
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7954   rm -rf conftest*
7955   ol_cv_pthread_thread=yes
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -rf conftest*
7960   ol_cv_pthread_thread=no
7961 fi
7962 rm -f conftest*
7963 else
7964   cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 /* pthread test headers */
7968 #include <pthread.h>
7969 #ifndef NULL
7970 #define NULL (void*)0
7971 #endif
7972
7973 static void *task(p)
7974         void *p;
7975 {
7976         return (void *) (p == NULL);
7977 }
7978
7979
7980 int main(argc, argv)
7981         int argc;
7982         char **argv;
7983 {
7984
7985         /* pthread test function */
7986         pthread_t t;
7987         int status;
7988
7989         /* make sure pthread_create() isn't just a stub */
7990 #if HAVE_PTHREADS_D4
7991         status = pthread_create(&t, pthread_attr_default, task, NULL);
7992 #else
7993         status = pthread_create(&t, NULL, task, NULL);
7994 #endif
7995
7996         if( status ) exit( status );
7997
7998         /* make sure pthread_detach() isn't just a stub */
7999 #if HAVE_PTHREADS_D4
8000         status = pthread_detach( &t );
8001 #else
8002         status = pthread_detach( t );
8003 #endif
8004
8005 #ifdef HAVE_LINUX_THREADS
8006         pthread_kill_other_threads_np();
8007 #endif
8008
8009         exit( status );
8010
8011 }
8012
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8015 then
8016   ol_cv_pthread_thread=yes
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020   rm -fr conftest*
8021   ol_cv_pthread_thread=no
8022 fi
8023 rm -fr conftest*
8024 fi
8025
8026
8027                 # restore the LIBS
8028                 LIBS="$ol_LIBS"
8029         
8030 fi
8031
8032 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8033
8034         if test $ol_cv_pthread_thread = yes ; then
8035                 ol_link_pthreads="-thread"
8036                 ol_link_threads=posix
8037         fi
8038 fi
8039
8040
8041                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8042 if test "$ol_link_threads" = no ; then
8043         # try -lpthread -lmach -lexc -lc_r
8044         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8045 echo "configure:8046: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8046 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
8047   echo $ac_n "(cached) $ac_c" 1>&6
8048 else
8049   
8050                 # save the flags
8051                 ol_LIBS="$LIBS"
8052                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8053
8054                 if test "$cross_compiling" = yes; then
8055   cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* pthread test headers */
8059 #include <pthread.h>
8060 #ifndef NULL
8061 #define NULL (void*)0
8062 #endif
8063
8064 static void *task(p)
8065         void *p;
8066 {
8067         return (void *) (p == NULL);
8068 }
8069
8070 int main() {
8071
8072         /* pthread test function */
8073         pthread_t t;
8074         int status;
8075
8076         /* make sure pthread_create() isn't just a stub */
8077 #if HAVE_PTHREADS_D4
8078         status = pthread_create(&t, pthread_attr_default, task, NULL);
8079 #else
8080         status = pthread_create(&t, NULL, task, NULL);
8081 #endif
8082
8083         if( status ) exit( status );
8084
8085         /* make sure pthread_detach() isn't just a stub */
8086 #if HAVE_PTHREADS_D4
8087         status = pthread_detach( &t );
8088 #else
8089         status = pthread_detach( t );
8090 #endif
8091
8092 #ifdef HAVE_LINUX_THREADS
8093         pthread_kill_other_threads_np();
8094 #endif
8095
8096         exit( status );
8097
8098 ; return 0; }
8099 EOF
8100 if { (eval echo configure:8101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8101   rm -rf conftest*
8102   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8103 else
8104   echo "configure: failed program was:" >&5
8105   cat conftest.$ac_ext >&5
8106   rm -rf conftest*
8107   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8108 fi
8109 rm -f conftest*
8110 else
8111   cat > conftest.$ac_ext <<EOF
8112 #line 8113 "configure"
8113 #include "confdefs.h"
8114 /* pthread test headers */
8115 #include <pthread.h>
8116 #ifndef NULL
8117 #define NULL (void*)0
8118 #endif
8119
8120 static void *task(p)
8121         void *p;
8122 {
8123         return (void *) (p == NULL);
8124 }
8125
8126
8127 int main(argc, argv)
8128         int argc;
8129         char **argv;
8130 {
8131
8132         /* pthread test function */
8133         pthread_t t;
8134         int status;
8135
8136         /* make sure pthread_create() isn't just a stub */
8137 #if HAVE_PTHREADS_D4
8138         status = pthread_create(&t, pthread_attr_default, task, NULL);
8139 #else
8140         status = pthread_create(&t, NULL, task, NULL);
8141 #endif
8142
8143         if( status ) exit( status );
8144
8145         /* make sure pthread_detach() isn't just a stub */
8146 #if HAVE_PTHREADS_D4
8147         status = pthread_detach( &t );
8148 #else
8149         status = pthread_detach( t );
8150 #endif
8151
8152 #ifdef HAVE_LINUX_THREADS
8153         pthread_kill_other_threads_np();
8154 #endif
8155
8156         exit( status );
8157
8158 }
8159
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8162 then
8163   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -fr conftest*
8168   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8169 fi
8170 rm -fr conftest*
8171 fi
8172
8173
8174                 # restore the LIBS
8175                 LIBS="$ol_LIBS"
8176         
8177 fi
8178
8179 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8180
8181         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8182                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8183                 ol_link_threads=posix
8184         fi
8185 fi
8186
8187                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8188 if test "$ol_link_threads" = no ; then
8189         # try -lpthread -lmach -lexc
8190         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8191 echo "configure:8192: checking for pthread link with -lpthread -lmach -lexc" >&5
8192 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
8193   echo $ac_n "(cached) $ac_c" 1>&6
8194 else
8195   
8196                 # save the flags
8197                 ol_LIBS="$LIBS"
8198                 LIBS="-lpthread -lmach -lexc $LIBS"
8199
8200                 if test "$cross_compiling" = yes; then
8201   cat > conftest.$ac_ext <<EOF
8202 #line 8203 "configure"
8203 #include "confdefs.h"
8204 /* pthread test headers */
8205 #include <pthread.h>
8206 #ifndef NULL
8207 #define NULL (void*)0
8208 #endif
8209
8210 static void *task(p)
8211         void *p;
8212 {
8213         return (void *) (p == NULL);
8214 }
8215
8216 int main() {
8217
8218         /* pthread test function */
8219         pthread_t t;
8220         int status;
8221
8222         /* make sure pthread_create() isn't just a stub */
8223 #if HAVE_PTHREADS_D4
8224         status = pthread_create(&t, pthread_attr_default, task, NULL);
8225 #else
8226         status = pthread_create(&t, NULL, task, NULL);
8227 #endif
8228
8229         if( status ) exit( status );
8230
8231         /* make sure pthread_detach() isn't just a stub */
8232 #if HAVE_PTHREADS_D4
8233         status = pthread_detach( &t );
8234 #else
8235         status = pthread_detach( t );
8236 #endif
8237
8238 #ifdef HAVE_LINUX_THREADS
8239         pthread_kill_other_threads_np();
8240 #endif
8241
8242         exit( status );
8243
8244 ; return 0; }
8245 EOF
8246 if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8247   rm -rf conftest*
8248   ol_cv_pthread_lpthread_lmach_lexc=yes
8249 else
8250   echo "configure: failed program was:" >&5
8251   cat conftest.$ac_ext >&5
8252   rm -rf conftest*
8253   ol_cv_pthread_lpthread_lmach_lexc=no
8254 fi
8255 rm -f conftest*
8256 else
8257   cat > conftest.$ac_ext <<EOF
8258 #line 8259 "configure"
8259 #include "confdefs.h"
8260 /* pthread test headers */
8261 #include <pthread.h>
8262 #ifndef NULL
8263 #define NULL (void*)0
8264 #endif
8265
8266 static void *task(p)
8267         void *p;
8268 {
8269         return (void *) (p == NULL);
8270 }
8271
8272
8273 int main(argc, argv)
8274         int argc;
8275         char **argv;
8276 {
8277
8278         /* pthread test function */
8279         pthread_t t;
8280         int status;
8281
8282         /* make sure pthread_create() isn't just a stub */
8283 #if HAVE_PTHREADS_D4
8284         status = pthread_create(&t, pthread_attr_default, task, NULL);
8285 #else
8286         status = pthread_create(&t, NULL, task, NULL);
8287 #endif
8288
8289         if( status ) exit( status );
8290
8291         /* make sure pthread_detach() isn't just a stub */
8292 #if HAVE_PTHREADS_D4
8293         status = pthread_detach( &t );
8294 #else
8295         status = pthread_detach( t );
8296 #endif
8297
8298 #ifdef HAVE_LINUX_THREADS
8299         pthread_kill_other_threads_np();
8300 #endif
8301
8302         exit( status );
8303
8304 }
8305
8306 EOF
8307 if { (eval echo configure:8308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8308 then
8309   ol_cv_pthread_lpthread_lmach_lexc=yes
8310 else
8311   echo "configure: failed program was:" >&5
8312   cat conftest.$ac_ext >&5
8313   rm -fr conftest*
8314   ol_cv_pthread_lpthread_lmach_lexc=no
8315 fi
8316 rm -fr conftest*
8317 fi
8318
8319
8320                 # restore the LIBS
8321                 LIBS="$ol_LIBS"
8322         
8323 fi
8324
8325 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8326
8327         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8328                 ol_link_pthreads="-lpthread -lmach -lexc"
8329                 ol_link_threads=posix
8330         fi
8331 fi
8332
8333
8334                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8335 if test "$ol_link_threads" = no ; then
8336         # try -lpthread -Wl,-woff,85
8337         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8338 echo "configure:8339: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8339 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
8340   echo $ac_n "(cached) $ac_c" 1>&6
8341 else
8342   
8343                 # save the flags
8344                 ol_LIBS="$LIBS"
8345                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8346
8347                 if test "$cross_compiling" = yes; then
8348   cat > conftest.$ac_ext <<EOF
8349 #line 8350 "configure"
8350 #include "confdefs.h"
8351 /* pthread test headers */
8352 #include <pthread.h>
8353 #ifndef NULL
8354 #define NULL (void*)0
8355 #endif
8356
8357 static void *task(p)
8358         void *p;
8359 {
8360         return (void *) (p == NULL);
8361 }
8362
8363 int main() {
8364
8365         /* pthread test function */
8366         pthread_t t;
8367         int status;
8368
8369         /* make sure pthread_create() isn't just a stub */
8370 #if HAVE_PTHREADS_D4
8371         status = pthread_create(&t, pthread_attr_default, task, NULL);
8372 #else
8373         status = pthread_create(&t, NULL, task, NULL);
8374 #endif
8375
8376         if( status ) exit( status );
8377
8378         /* make sure pthread_detach() isn't just a stub */
8379 #if HAVE_PTHREADS_D4
8380         status = pthread_detach( &t );
8381 #else
8382         status = pthread_detach( t );
8383 #endif
8384
8385 #ifdef HAVE_LINUX_THREADS
8386         pthread_kill_other_threads_np();
8387 #endif
8388
8389         exit( status );
8390
8391 ; return 0; }
8392 EOF
8393 if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8394   rm -rf conftest*
8395   ol_cv_pthread_lib_lpthread_woff=yes
8396 else
8397   echo "configure: failed program was:" >&5
8398   cat conftest.$ac_ext >&5
8399   rm -rf conftest*
8400   ol_cv_pthread_lib_lpthread_woff=no
8401 fi
8402 rm -f conftest*
8403 else
8404   cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 /* pthread test headers */
8408 #include <pthread.h>
8409 #ifndef NULL
8410 #define NULL (void*)0
8411 #endif
8412
8413 static void *task(p)
8414         void *p;
8415 {
8416         return (void *) (p == NULL);
8417 }
8418
8419
8420 int main(argc, argv)
8421         int argc;
8422         char **argv;
8423 {
8424
8425         /* pthread test function */
8426         pthread_t t;
8427         int status;
8428
8429         /* make sure pthread_create() isn't just a stub */
8430 #if HAVE_PTHREADS_D4
8431         status = pthread_create(&t, pthread_attr_default, task, NULL);
8432 #else
8433         status = pthread_create(&t, NULL, task, NULL);
8434 #endif
8435
8436         if( status ) exit( status );
8437
8438         /* make sure pthread_detach() isn't just a stub */
8439 #if HAVE_PTHREADS_D4
8440         status = pthread_detach( &t );
8441 #else
8442         status = pthread_detach( t );
8443 #endif
8444
8445 #ifdef HAVE_LINUX_THREADS
8446         pthread_kill_other_threads_np();
8447 #endif
8448
8449         exit( status );
8450
8451 }
8452
8453 EOF
8454 if { (eval echo configure:8455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8455 then
8456   ol_cv_pthread_lib_lpthread_woff=yes
8457 else
8458   echo "configure: failed program was:" >&5
8459   cat conftest.$ac_ext >&5
8460   rm -fr conftest*
8461   ol_cv_pthread_lib_lpthread_woff=no
8462 fi
8463 rm -fr conftest*
8464 fi
8465
8466
8467                 # restore the LIBS
8468                 LIBS="$ol_LIBS"
8469         
8470 fi
8471
8472 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8473
8474         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8475                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8476                 ol_link_threads=posix
8477         fi
8478 fi
8479
8480
8481                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8482 if test "$ol_link_threads" = no ; then
8483         # try -lpthread
8484         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8485 echo "configure:8486: checking for pthread link with -lpthread" >&5
8486 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
8487   echo $ac_n "(cached) $ac_c" 1>&6
8488 else
8489   
8490                 # save the flags
8491                 ol_LIBS="$LIBS"
8492                 LIBS="-lpthread $LIBS"
8493
8494                 if test "$cross_compiling" = yes; then
8495   cat > conftest.$ac_ext <<EOF
8496 #line 8497 "configure"
8497 #include "confdefs.h"
8498 /* pthread test headers */
8499 #include <pthread.h>
8500 #ifndef NULL
8501 #define NULL (void*)0
8502 #endif
8503
8504 static void *task(p)
8505         void *p;
8506 {
8507         return (void *) (p == NULL);
8508 }
8509
8510 int main() {
8511
8512         /* pthread test function */
8513         pthread_t t;
8514         int status;
8515
8516         /* make sure pthread_create() isn't just a stub */
8517 #if HAVE_PTHREADS_D4
8518         status = pthread_create(&t, pthread_attr_default, task, NULL);
8519 #else
8520         status = pthread_create(&t, NULL, task, NULL);
8521 #endif
8522
8523         if( status ) exit( status );
8524
8525         /* make sure pthread_detach() isn't just a stub */
8526 #if HAVE_PTHREADS_D4
8527         status = pthread_detach( &t );
8528 #else
8529         status = pthread_detach( t );
8530 #endif
8531
8532 #ifdef HAVE_LINUX_THREADS
8533         pthread_kill_other_threads_np();
8534 #endif
8535
8536         exit( status );
8537
8538 ; return 0; }
8539 EOF
8540 if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8541   rm -rf conftest*
8542   ol_cv_pthread_lpthread=yes
8543 else
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   ol_cv_pthread_lpthread=no
8548 fi
8549 rm -f conftest*
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* pthread test headers */
8555 #include <pthread.h>
8556 #ifndef NULL
8557 #define NULL (void*)0
8558 #endif
8559
8560 static void *task(p)
8561         void *p;
8562 {
8563         return (void *) (p == NULL);
8564 }
8565
8566
8567 int main(argc, argv)
8568         int argc;
8569         char **argv;
8570 {
8571
8572         /* pthread test function */
8573         pthread_t t;
8574         int status;
8575
8576         /* make sure pthread_create() isn't just a stub */
8577 #if HAVE_PTHREADS_D4
8578         status = pthread_create(&t, pthread_attr_default, task, NULL);
8579 #else
8580         status = pthread_create(&t, NULL, task, NULL);
8581 #endif
8582
8583         if( status ) exit( status );
8584
8585         /* make sure pthread_detach() isn't just a stub */
8586 #if HAVE_PTHREADS_D4
8587         status = pthread_detach( &t );
8588 #else
8589         status = pthread_detach( t );
8590 #endif
8591
8592 #ifdef HAVE_LINUX_THREADS
8593         pthread_kill_other_threads_np();
8594 #endif
8595
8596         exit( status );
8597
8598 }
8599
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8602 then
8603   ol_cv_pthread_lpthread=yes
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -fr conftest*
8608   ol_cv_pthread_lpthread=no
8609 fi
8610 rm -fr conftest*
8611 fi
8612
8613
8614                 # restore the LIBS
8615                 LIBS="$ol_LIBS"
8616         
8617 fi
8618
8619 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8620
8621         if test $ol_cv_pthread_lpthread = yes ; then
8622                 ol_link_pthreads="-lpthread"
8623                 ol_link_threads=posix
8624         fi
8625 fi
8626
8627                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8628 if test "$ol_link_threads" = no ; then
8629         # try -lc_r
8630         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8631 echo "configure:8632: checking for pthread link with -lc_r" >&5
8632 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635   
8636                 # save the flags
8637                 ol_LIBS="$LIBS"
8638                 LIBS="-lc_r $LIBS"
8639
8640                 if test "$cross_compiling" = yes; then
8641   cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 /* pthread test headers */
8645 #include <pthread.h>
8646 #ifndef NULL
8647 #define NULL (void*)0
8648 #endif
8649
8650 static void *task(p)
8651         void *p;
8652 {
8653         return (void *) (p == NULL);
8654 }
8655
8656 int main() {
8657
8658         /* pthread test function */
8659         pthread_t t;
8660         int status;
8661
8662         /* make sure pthread_create() isn't just a stub */
8663 #if HAVE_PTHREADS_D4
8664         status = pthread_create(&t, pthread_attr_default, task, NULL);
8665 #else
8666         status = pthread_create(&t, NULL, task, NULL);
8667 #endif
8668
8669         if( status ) exit( status );
8670
8671         /* make sure pthread_detach() isn't just a stub */
8672 #if HAVE_PTHREADS_D4
8673         status = pthread_detach( &t );
8674 #else
8675         status = pthread_detach( t );
8676 #endif
8677
8678 #ifdef HAVE_LINUX_THREADS
8679         pthread_kill_other_threads_np();
8680 #endif
8681
8682         exit( status );
8683
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687   rm -rf conftest*
8688   ol_cv_pthread_lc_r=yes
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   ol_cv_pthread_lc_r=no
8694 fi
8695 rm -f conftest*
8696 else
8697   cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* pthread test headers */
8701 #include <pthread.h>
8702 #ifndef NULL
8703 #define NULL (void*)0
8704 #endif
8705
8706 static void *task(p)
8707         void *p;
8708 {
8709         return (void *) (p == NULL);
8710 }
8711
8712
8713 int main(argc, argv)
8714         int argc;
8715         char **argv;
8716 {
8717
8718         /* pthread test function */
8719         pthread_t t;
8720         int status;
8721
8722         /* make sure pthread_create() isn't just a stub */
8723 #if HAVE_PTHREADS_D4
8724         status = pthread_create(&t, pthread_attr_default, task, NULL);
8725 #else
8726         status = pthread_create(&t, NULL, task, NULL);
8727 #endif
8728
8729         if( status ) exit( status );
8730
8731         /* make sure pthread_detach() isn't just a stub */
8732 #if HAVE_PTHREADS_D4
8733         status = pthread_detach( &t );
8734 #else
8735         status = pthread_detach( t );
8736 #endif
8737
8738 #ifdef HAVE_LINUX_THREADS
8739         pthread_kill_other_threads_np();
8740 #endif
8741
8742         exit( status );
8743
8744 }
8745
8746 EOF
8747 if { (eval echo configure:8748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8748 then
8749   ol_cv_pthread_lc_r=yes
8750 else
8751   echo "configure: failed program was:" >&5
8752   cat conftest.$ac_ext >&5
8753   rm -fr conftest*
8754   ol_cv_pthread_lc_r=no
8755 fi
8756 rm -fr conftest*
8757 fi
8758
8759
8760                 # restore the LIBS
8761                 LIBS="$ol_LIBS"
8762         
8763 fi
8764
8765 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8766
8767         if test $ol_cv_pthread_lc_r = yes ; then
8768                 ol_link_pthreads="-lc_r"
8769                 ol_link_threads=posix
8770         fi
8771 fi
8772
8773
8774                 # Pthread try link: -threads (ol_cv_pthread_threads)
8775 if test "$ol_link_threads" = no ; then
8776         # try -threads
8777         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8778 echo "configure:8779: checking for pthread link with -threads" >&5
8779 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   
8783                 # save the flags
8784                 ol_LIBS="$LIBS"
8785                 LIBS="-threads $LIBS"
8786
8787                 if test "$cross_compiling" = yes; then
8788   cat > conftest.$ac_ext <<EOF
8789 #line 8790 "configure"
8790 #include "confdefs.h"
8791 /* pthread test headers */
8792 #include <pthread.h>
8793 #ifndef NULL
8794 #define NULL (void*)0
8795 #endif
8796
8797 static void *task(p)
8798         void *p;
8799 {
8800         return (void *) (p == NULL);
8801 }
8802
8803 int main() {
8804
8805         /* pthread test function */
8806         pthread_t t;
8807         int status;
8808
8809         /* make sure pthread_create() isn't just a stub */
8810 #if HAVE_PTHREADS_D4
8811         status = pthread_create(&t, pthread_attr_default, task, NULL);
8812 #else
8813         status = pthread_create(&t, NULL, task, NULL);
8814 #endif
8815
8816         if( status ) exit( status );
8817
8818         /* make sure pthread_detach() isn't just a stub */
8819 #if HAVE_PTHREADS_D4
8820         status = pthread_detach( &t );
8821 #else
8822         status = pthread_detach( t );
8823 #endif
8824
8825 #ifdef HAVE_LINUX_THREADS
8826         pthread_kill_other_threads_np();
8827 #endif
8828
8829         exit( status );
8830
8831 ; return 0; }
8832 EOF
8833 if { (eval echo configure:8834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8834   rm -rf conftest*
8835   ol_cv_pthread_threads=yes
8836 else
8837   echo "configure: failed program was:" >&5
8838   cat conftest.$ac_ext >&5
8839   rm -rf conftest*
8840   ol_cv_pthread_threads=no
8841 fi
8842 rm -f conftest*
8843 else
8844   cat > conftest.$ac_ext <<EOF
8845 #line 8846 "configure"
8846 #include "confdefs.h"
8847 /* pthread test headers */
8848 #include <pthread.h>
8849 #ifndef NULL
8850 #define NULL (void*)0
8851 #endif
8852
8853 static void *task(p)
8854         void *p;
8855 {
8856         return (void *) (p == NULL);
8857 }
8858
8859
8860 int main(argc, argv)
8861         int argc;
8862         char **argv;
8863 {
8864
8865         /* pthread test function */
8866         pthread_t t;
8867         int status;
8868
8869         /* make sure pthread_create() isn't just a stub */
8870 #if HAVE_PTHREADS_D4
8871         status = pthread_create(&t, pthread_attr_default, task, NULL);
8872 #else
8873         status = pthread_create(&t, NULL, task, NULL);
8874 #endif
8875
8876         if( status ) exit( status );
8877
8878         /* make sure pthread_detach() isn't just a stub */
8879 #if HAVE_PTHREADS_D4
8880         status = pthread_detach( &t );
8881 #else
8882         status = pthread_detach( t );
8883 #endif
8884
8885 #ifdef HAVE_LINUX_THREADS
8886         pthread_kill_other_threads_np();
8887 #endif
8888
8889         exit( status );
8890
8891 }
8892
8893 EOF
8894 if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8895 then
8896   ol_cv_pthread_threads=yes
8897 else
8898   echo "configure: failed program was:" >&5
8899   cat conftest.$ac_ext >&5
8900   rm -fr conftest*
8901   ol_cv_pthread_threads=no
8902 fi
8903 rm -fr conftest*
8904 fi
8905
8906
8907                 # restore the LIBS
8908                 LIBS="$ol_LIBS"
8909         
8910 fi
8911
8912 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8913
8914         if test $ol_cv_pthread_threads = yes ; then
8915                 ol_link_pthreads="-threads"
8916                 ol_link_threads=posix
8917         fi
8918 fi
8919
8920
8921                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8922 if test "$ol_link_threads" = no ; then
8923         # try -lpthreads -lmach -lexc -lc_r
8924         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8925 echo "configure:8926: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8926 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
8927   echo $ac_n "(cached) $ac_c" 1>&6
8928 else
8929   
8930                 # save the flags
8931                 ol_LIBS="$LIBS"
8932                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8933
8934                 if test "$cross_compiling" = yes; then
8935   cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 /* pthread test headers */
8939 #include <pthread.h>
8940 #ifndef NULL
8941 #define NULL (void*)0
8942 #endif
8943
8944 static void *task(p)
8945         void *p;
8946 {
8947         return (void *) (p == NULL);
8948 }
8949
8950 int main() {
8951
8952         /* pthread test function */
8953         pthread_t t;
8954         int status;
8955
8956         /* make sure pthread_create() isn't just a stub */
8957 #if HAVE_PTHREADS_D4
8958         status = pthread_create(&t, pthread_attr_default, task, NULL);
8959 #else
8960         status = pthread_create(&t, NULL, task, NULL);
8961 #endif
8962
8963         if( status ) exit( status );
8964
8965         /* make sure pthread_detach() isn't just a stub */
8966 #if HAVE_PTHREADS_D4
8967         status = pthread_detach( &t );
8968 #else
8969         status = pthread_detach( t );
8970 #endif
8971
8972 #ifdef HAVE_LINUX_THREADS
8973         pthread_kill_other_threads_np();
8974 #endif
8975
8976         exit( status );
8977
8978 ; return 0; }
8979 EOF
8980 if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8981   rm -rf conftest*
8982   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8983 else
8984   echo "configure: failed program was:" >&5
8985   cat conftest.$ac_ext >&5
8986   rm -rf conftest*
8987   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8988 fi
8989 rm -f conftest*
8990 else
8991   cat > conftest.$ac_ext <<EOF
8992 #line 8993 "configure"
8993 #include "confdefs.h"
8994 /* pthread test headers */
8995 #include <pthread.h>
8996 #ifndef NULL
8997 #define NULL (void*)0
8998 #endif
8999
9000 static void *task(p)
9001         void *p;
9002 {
9003         return (void *) (p == NULL);
9004 }
9005
9006
9007 int main(argc, argv)
9008         int argc;
9009         char **argv;
9010 {
9011
9012         /* pthread test function */
9013         pthread_t t;
9014         int status;
9015
9016         /* make sure pthread_create() isn't just a stub */
9017 #if HAVE_PTHREADS_D4
9018         status = pthread_create(&t, pthread_attr_default, task, NULL);
9019 #else
9020         status = pthread_create(&t, NULL, task, NULL);
9021 #endif
9022
9023         if( status ) exit( status );
9024
9025         /* make sure pthread_detach() isn't just a stub */
9026 #if HAVE_PTHREADS_D4
9027         status = pthread_detach( &t );
9028 #else
9029         status = pthread_detach( t );
9030 #endif
9031
9032 #ifdef HAVE_LINUX_THREADS
9033         pthread_kill_other_threads_np();
9034 #endif
9035
9036         exit( status );
9037
9038 }
9039
9040 EOF
9041 if { (eval echo configure:9042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9042 then
9043   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9044 else
9045   echo "configure: failed program was:" >&5
9046   cat conftest.$ac_ext >&5
9047   rm -fr conftest*
9048   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9049 fi
9050 rm -fr conftest*
9051 fi
9052
9053
9054                 # restore the LIBS
9055                 LIBS="$ol_LIBS"
9056         
9057 fi
9058
9059 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9060
9061         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9062                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9063                 ol_link_threads=posix
9064         fi
9065 fi
9066
9067                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9068 if test "$ol_link_threads" = no ; then
9069         # try -lpthreads -lmach -lexc
9070         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9071 echo "configure:9072: checking for pthread link with -lpthreads -lmach -lexc" >&5
9072 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   
9076                 # save the flags
9077                 ol_LIBS="$LIBS"
9078                 LIBS="-lpthreads -lmach -lexc $LIBS"
9079
9080                 if test "$cross_compiling" = yes; then
9081   cat > conftest.$ac_ext <<EOF
9082 #line 9083 "configure"
9083 #include "confdefs.h"
9084 /* pthread test headers */
9085 #include <pthread.h>
9086 #ifndef NULL
9087 #define NULL (void*)0
9088 #endif
9089
9090 static void *task(p)
9091         void *p;
9092 {
9093         return (void *) (p == NULL);
9094 }
9095
9096 int main() {
9097
9098         /* pthread test function */
9099         pthread_t t;
9100         int status;
9101
9102         /* make sure pthread_create() isn't just a stub */
9103 #if HAVE_PTHREADS_D4
9104         status = pthread_create(&t, pthread_attr_default, task, NULL);
9105 #else
9106         status = pthread_create(&t, NULL, task, NULL);
9107 #endif
9108
9109         if( status ) exit( status );
9110
9111         /* make sure pthread_detach() isn't just a stub */
9112 #if HAVE_PTHREADS_D4
9113         status = pthread_detach( &t );
9114 #else
9115         status = pthread_detach( t );
9116 #endif
9117
9118 #ifdef HAVE_LINUX_THREADS
9119         pthread_kill_other_threads_np();
9120 #endif
9121
9122         exit( status );
9123
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   ol_cv_pthread_lpthreads_lmach_lexc=yes
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   ol_cv_pthread_lpthreads_lmach_lexc=no
9134 fi
9135 rm -f conftest*
9136 else
9137   cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 /* pthread test headers */
9141 #include <pthread.h>
9142 #ifndef NULL
9143 #define NULL (void*)0
9144 #endif
9145
9146 static void *task(p)
9147         void *p;
9148 {
9149         return (void *) (p == NULL);
9150 }
9151
9152
9153 int main(argc, argv)
9154         int argc;
9155         char **argv;
9156 {
9157
9158         /* pthread test function */
9159         pthread_t t;
9160         int status;
9161
9162         /* make sure pthread_create() isn't just a stub */
9163 #if HAVE_PTHREADS_D4
9164         status = pthread_create(&t, pthread_attr_default, task, NULL);
9165 #else
9166         status = pthread_create(&t, NULL, task, NULL);
9167 #endif
9168
9169         if( status ) exit( status );
9170
9171         /* make sure pthread_detach() isn't just a stub */
9172 #if HAVE_PTHREADS_D4
9173         status = pthread_detach( &t );
9174 #else
9175         status = pthread_detach( t );
9176 #endif
9177
9178 #ifdef HAVE_LINUX_THREADS
9179         pthread_kill_other_threads_np();
9180 #endif
9181
9182         exit( status );
9183
9184 }
9185
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9188 then
9189   ol_cv_pthread_lpthreads_lmach_lexc=yes
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -fr conftest*
9194   ol_cv_pthread_lpthreads_lmach_lexc=no
9195 fi
9196 rm -fr conftest*
9197 fi
9198
9199
9200                 # restore the LIBS
9201                 LIBS="$ol_LIBS"
9202         
9203 fi
9204
9205 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9206
9207         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9208                 ol_link_pthreads="-lpthreads -lmach -lexc"
9209                 ol_link_threads=posix
9210         fi
9211 fi
9212
9213                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9214 if test "$ol_link_threads" = no ; then
9215         # try -lpthreads -lexc
9216         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9217 echo "configure:9218: checking for pthread link with -lpthreads -lexc" >&5
9218 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
9219   echo $ac_n "(cached) $ac_c" 1>&6
9220 else
9221   
9222                 # save the flags
9223                 ol_LIBS="$LIBS"
9224                 LIBS="-lpthreads -lexc $LIBS"
9225
9226                 if test "$cross_compiling" = yes; then
9227   cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 /* pthread test headers */
9231 #include <pthread.h>
9232 #ifndef NULL
9233 #define NULL (void*)0
9234 #endif
9235
9236 static void *task(p)
9237         void *p;
9238 {
9239         return (void *) (p == NULL);
9240 }
9241
9242 int main() {
9243
9244         /* pthread test function */
9245         pthread_t t;
9246         int status;
9247
9248         /* make sure pthread_create() isn't just a stub */
9249 #if HAVE_PTHREADS_D4
9250         status = pthread_create(&t, pthread_attr_default, task, NULL);
9251 #else
9252         status = pthread_create(&t, NULL, task, NULL);
9253 #endif
9254
9255         if( status ) exit( status );
9256
9257         /* make sure pthread_detach() isn't just a stub */
9258 #if HAVE_PTHREADS_D4
9259         status = pthread_detach( &t );
9260 #else
9261         status = pthread_detach( t );
9262 #endif
9263
9264 #ifdef HAVE_LINUX_THREADS
9265         pthread_kill_other_threads_np();
9266 #endif
9267
9268         exit( status );
9269
9270 ; return 0; }
9271 EOF
9272 if { (eval echo configure:9273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9273   rm -rf conftest*
9274   ol_cv_pthread_lpthreads_lexc=yes
9275 else
9276   echo "configure: failed program was:" >&5
9277   cat conftest.$ac_ext >&5
9278   rm -rf conftest*
9279   ol_cv_pthread_lpthreads_lexc=no
9280 fi
9281 rm -f conftest*
9282 else
9283   cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286 /* pthread test headers */
9287 #include <pthread.h>
9288 #ifndef NULL
9289 #define NULL (void*)0
9290 #endif
9291
9292 static void *task(p)
9293         void *p;
9294 {
9295         return (void *) (p == NULL);
9296 }
9297
9298
9299 int main(argc, argv)
9300         int argc;
9301         char **argv;
9302 {
9303
9304         /* pthread test function */
9305         pthread_t t;
9306         int status;
9307
9308         /* make sure pthread_create() isn't just a stub */
9309 #if HAVE_PTHREADS_D4
9310         status = pthread_create(&t, pthread_attr_default, task, NULL);
9311 #else
9312         status = pthread_create(&t, NULL, task, NULL);
9313 #endif
9314
9315         if( status ) exit( status );
9316
9317         /* make sure pthread_detach() isn't just a stub */
9318 #if HAVE_PTHREADS_D4
9319         status = pthread_detach( &t );
9320 #else
9321         status = pthread_detach( t );
9322 #endif
9323
9324 #ifdef HAVE_LINUX_THREADS
9325         pthread_kill_other_threads_np();
9326 #endif
9327
9328         exit( status );
9329
9330 }
9331
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9334 then
9335   ol_cv_pthread_lpthreads_lexc=yes
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -fr conftest*
9340   ol_cv_pthread_lpthreads_lexc=no
9341 fi
9342 rm -fr conftest*
9343 fi
9344
9345
9346                 # restore the LIBS
9347                 LIBS="$ol_LIBS"
9348         
9349 fi
9350
9351 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9352
9353         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9354                 ol_link_pthreads="-lpthreads -lexc"
9355                 ol_link_threads=posix
9356         fi
9357 fi
9358
9359
9360                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9361 if test "$ol_link_threads" = no ; then
9362         # try -lpthreads
9363         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9364 echo "configure:9365: checking for pthread link with -lpthreads" >&5
9365 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
9366   echo $ac_n "(cached) $ac_c" 1>&6
9367 else
9368   
9369                 # save the flags
9370                 ol_LIBS="$LIBS"
9371                 LIBS="-lpthreads $LIBS"
9372
9373                 if test "$cross_compiling" = yes; then
9374   cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 /* pthread test headers */
9378 #include <pthread.h>
9379 #ifndef NULL
9380 #define NULL (void*)0
9381 #endif
9382
9383 static void *task(p)
9384         void *p;
9385 {
9386         return (void *) (p == NULL);
9387 }
9388
9389 int main() {
9390
9391         /* pthread test function */
9392         pthread_t t;
9393         int status;
9394
9395         /* make sure pthread_create() isn't just a stub */
9396 #if HAVE_PTHREADS_D4
9397         status = pthread_create(&t, pthread_attr_default, task, NULL);
9398 #else
9399         status = pthread_create(&t, NULL, task, NULL);
9400 #endif
9401
9402         if( status ) exit( status );
9403
9404         /* make sure pthread_detach() isn't just a stub */
9405 #if HAVE_PTHREADS_D4
9406         status = pthread_detach( &t );
9407 #else
9408         status = pthread_detach( t );
9409 #endif
9410
9411 #ifdef HAVE_LINUX_THREADS
9412         pthread_kill_other_threads_np();
9413 #endif
9414
9415         exit( status );
9416
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   ol_cv_pthread_lib_lpthreads=yes
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   ol_cv_pthread_lib_lpthreads=no
9427 fi
9428 rm -f conftest*
9429 else
9430   cat > conftest.$ac_ext <<EOF
9431 #line 9432 "configure"
9432 #include "confdefs.h"
9433 /* pthread test headers */
9434 #include <pthread.h>
9435 #ifndef NULL
9436 #define NULL (void*)0
9437 #endif
9438
9439 static void *task(p)
9440         void *p;
9441 {
9442         return (void *) (p == NULL);
9443 }
9444
9445
9446 int main(argc, argv)
9447         int argc;
9448         char **argv;
9449 {
9450
9451         /* pthread test function */
9452         pthread_t t;
9453         int status;
9454
9455         /* make sure pthread_create() isn't just a stub */
9456 #if HAVE_PTHREADS_D4
9457         status = pthread_create(&t, pthread_attr_default, task, NULL);
9458 #else
9459         status = pthread_create(&t, NULL, task, NULL);
9460 #endif
9461
9462         if( status ) exit( status );
9463
9464         /* make sure pthread_detach() isn't just a stub */
9465 #if HAVE_PTHREADS_D4
9466         status = pthread_detach( &t );
9467 #else
9468         status = pthread_detach( t );
9469 #endif
9470
9471 #ifdef HAVE_LINUX_THREADS
9472         pthread_kill_other_threads_np();
9473 #endif
9474
9475         exit( status );
9476
9477 }
9478
9479 EOF
9480 if { (eval echo configure:9481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9481 then
9482   ol_cv_pthread_lib_lpthreads=yes
9483 else
9484   echo "configure: failed program was:" >&5
9485   cat conftest.$ac_ext >&5
9486   rm -fr conftest*
9487   ol_cv_pthread_lib_lpthreads=no
9488 fi
9489 rm -fr conftest*
9490 fi
9491
9492
9493                 # restore the LIBS
9494                 LIBS="$ol_LIBS"
9495         
9496 fi
9497
9498 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9499
9500         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9501                 ol_link_pthreads="-lpthreads"
9502                 ol_link_threads=posix
9503         fi
9504 fi
9505
9506
9507                 if test $ol_link_threads != no ; then
9508                         cat >> confdefs.h <<\EOF
9509 #define HAVE_PTHREADS 1
9510 EOF
9511
9512
9513                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9514
9515                                                 save_CPPFLAGS="$CPPFLAGS"
9516                         save_LIBS="$LIBS"
9517                         LIBS="$LTHREAD_LIBS $LIBS"
9518
9519                                                                                                 for ac_func in sched_yield pthread_yield
9520 do
9521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9522 echo "configure:9523: checking for $ac_func" >&5
9523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   cat > conftest.$ac_ext <<EOF
9527 #line 9528 "configure"
9528 #include "confdefs.h"
9529 /* System header to define __stub macros and hopefully few prototypes,
9530     which can conflict with char $ac_func(); below.  */
9531 #include <assert.h>
9532 /* Override any gcc2 internal prototype to avoid an error.  */
9533 /* We use char because int might match the return type of a gcc2
9534     builtin and then its argument prototype would still apply.  */
9535 char $ac_func();
9536
9537 int main() {
9538
9539 /* The GNU C library defines this for functions which it implements
9540     to always fail with ENOSYS.  Some functions are actually named
9541     something starting with __ and the normal name is an alias.  */
9542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9543 choke me
9544 #else
9545 $ac_func();
9546 #endif
9547
9548 ; return 0; }
9549 EOF
9550 if { (eval echo configure:9551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9551   rm -rf conftest*
9552   eval "ac_cv_func_$ac_func=yes"
9553 else
9554   echo "configure: failed program was:" >&5
9555   cat conftest.$ac_ext >&5
9556   rm -rf conftest*
9557   eval "ac_cv_func_$ac_func=no"
9558 fi
9559 rm -f conftest*
9560 fi
9561
9562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9563   echo "$ac_t""yes" 1>&6
9564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9565   cat >> confdefs.h <<EOF
9566 #define $ac_tr_func 1
9567 EOF
9568  
9569 else
9570   echo "$ac_t""no" 1>&6
9571 fi
9572 done
9573
9574
9575                         if test $ac_cv_func_sched_yield = no -a \
9576                                 $ac_cv_func_pthread_yield = no ; then
9577                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9578 echo "configure:9579: checking for sched_yield in -lrt" >&5
9579 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
9580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9581   echo $ac_n "(cached) $ac_c" 1>&6
9582 else
9583   ac_save_LIBS="$LIBS"
9584 LIBS="-lrt  $LIBS"
9585 cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 /* Override any gcc2 internal prototype to avoid an error.  */
9589 /* We use char because int might match the return type of a gcc2
9590     builtin and then its argument prototype would still apply.  */
9591 char sched_yield();
9592
9593 int main() {
9594 sched_yield()
9595 ; return 0; }
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9598   rm -rf conftest*
9599   eval "ac_cv_lib_$ac_lib_var=yes"
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   eval "ac_cv_lib_$ac_lib_var=no"
9605 fi
9606 rm -f conftest*
9607 LIBS="$ac_save_LIBS"
9608
9609 fi
9610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9611   echo "$ac_t""yes" 1>&6
9612   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9613                                         cat >> confdefs.h <<\EOF
9614 #define HAVE_SCHED_YIELD 1
9615 EOF
9616
9617                                         ac_cv_func_sched_yield=yes
9618 else
9619   echo "$ac_t""no" 1>&6
9620 ac_cv_func_sched_yield=no
9621 fi
9622
9623                         fi
9624                         if test $ac_cv_func_sched_yield = no -a \
9625                                 $ac_cv_func_pthread_yield = no ; then
9626                                                                                                 for ac_func in thr_yield
9627 do
9628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9629 echo "configure:9630: checking for $ac_func" >&5
9630 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9631   echo $ac_n "(cached) $ac_c" 1>&6
9632 else
9633   cat > conftest.$ac_ext <<EOF
9634 #line 9635 "configure"
9635 #include "confdefs.h"
9636 /* System header to define __stub macros and hopefully few prototypes,
9637     which can conflict with char $ac_func(); below.  */
9638 #include <assert.h>
9639 /* Override any gcc2 internal prototype to avoid an error.  */
9640 /* We use char because int might match the return type of a gcc2
9641     builtin and then its argument prototype would still apply.  */
9642 char $ac_func();
9643
9644 int main() {
9645
9646 /* The GNU C library defines this for functions which it implements
9647     to always fail with ENOSYS.  Some functions are actually named
9648     something starting with __ and the normal name is an alias.  */
9649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9650 choke me
9651 #else
9652 $ac_func();
9653 #endif
9654
9655 ; return 0; }
9656 EOF
9657 if { (eval echo configure:9658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9658   rm -rf conftest*
9659   eval "ac_cv_func_$ac_func=yes"
9660 else
9661   echo "configure: failed program was:" >&5
9662   cat conftest.$ac_ext >&5
9663   rm -rf conftest*
9664   eval "ac_cv_func_$ac_func=no"
9665 fi
9666 rm -f conftest*
9667 fi
9668
9669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9670   echo "$ac_t""yes" 1>&6
9671     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9672   cat >> confdefs.h <<EOF
9673 #define $ac_tr_func 1
9674 EOF
9675  
9676 else
9677   echo "$ac_t""no" 1>&6
9678 fi
9679 done
9680
9681                         fi
9682                         if test $ac_cv_func_sched_yield = no -a \
9683                                 $ac_cv_func_pthread_yield = no -a \
9684                                 "$ac_cv_func_thr_yield" = no ; then
9685                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9686                         fi
9687
9688                                                 for ac_func in pthread_kill
9689 do
9690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9691 echo "configure:9692: checking for $ac_func" >&5
9692 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9693   echo $ac_n "(cached) $ac_c" 1>&6
9694 else
9695   cat > conftest.$ac_ext <<EOF
9696 #line 9697 "configure"
9697 #include "confdefs.h"
9698 /* System header to define __stub macros and hopefully few prototypes,
9699     which can conflict with char $ac_func(); below.  */
9700 #include <assert.h>
9701 /* Override any gcc2 internal prototype to avoid an error.  */
9702 /* We use char because int might match the return type of a gcc2
9703     builtin and then its argument prototype would still apply.  */
9704 char $ac_func();
9705
9706 int main() {
9707
9708 /* The GNU C library defines this for functions which it implements
9709     to always fail with ENOSYS.  Some functions are actually named
9710     something starting with __ and the normal name is an alias.  */
9711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9712 choke me
9713 #else
9714 $ac_func();
9715 #endif
9716
9717 ; return 0; }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9720   rm -rf conftest*
9721   eval "ac_cv_func_$ac_func=yes"
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -rf conftest*
9726   eval "ac_cv_func_$ac_func=no"
9727 fi
9728 rm -f conftest*
9729 fi
9730
9731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9732   echo "$ac_t""yes" 1>&6
9733     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9734   cat >> confdefs.h <<EOF
9735 #define $ac_tr_func 1
9736 EOF
9737  
9738 else
9739   echo "$ac_t""no" 1>&6
9740 fi
9741 done
9742
9743
9744                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9745 echo "configure:9746: checking for pthread_detach with <pthread.h>" >&5
9746 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
9747   echo $ac_n "(cached) $ac_c" 1>&6
9748 else
9749   
9750                                                                 cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753
9754 #include <pthread.h>
9755 #ifndef NULL
9756 #define NULL (void*)0
9757 #endif
9758
9759 int main() {
9760 pthread_detach(NULL);
9761 ; return 0; }
9762 EOF
9763 if { (eval echo configure:9764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9764   rm -rf conftest*
9765   ol_cv_func_pthread_detach=yes
9766 else
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769   rm -rf conftest*
9770   ol_cv_func_pthread_detach=no
9771 fi
9772 rm -f conftest*
9773                         
9774 fi
9775
9776 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9777
9778                         if test $ol_cv_func_pthread_detach = no ; then
9779                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9780                         fi
9781
9782                         cat >> confdefs.h <<\EOF
9783 #define HAVE_PTHREAD_DETACH 1
9784 EOF
9785
9786
9787                                                 for ac_func in \
9788                                 pthread_setconcurrency \
9789                                 pthread_getconcurrency \
9790                                 thr_setconcurrency \
9791                                 thr_getconcurrency \
9792                         
9793 do
9794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9795 echo "configure:9796: checking for $ac_func" >&5
9796 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9797   echo $ac_n "(cached) $ac_c" 1>&6
9798 else
9799   cat > conftest.$ac_ext <<EOF
9800 #line 9801 "configure"
9801 #include "confdefs.h"
9802 /* System header to define __stub macros and hopefully few prototypes,
9803     which can conflict with char $ac_func(); below.  */
9804 #include <assert.h>
9805 /* Override any gcc2 internal prototype to avoid an error.  */
9806 /* We use char because int might match the return type of a gcc2
9807     builtin and then its argument prototype would still apply.  */
9808 char $ac_func();
9809
9810 int main() {
9811
9812 /* The GNU C library defines this for functions which it implements
9813     to always fail with ENOSYS.  Some functions are actually named
9814     something starting with __ and the normal name is an alias.  */
9815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9816 choke me
9817 #else
9818 $ac_func();
9819 #endif
9820
9821 ; return 0; }
9822 EOF
9823 if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9824   rm -rf conftest*
9825   eval "ac_cv_func_$ac_func=yes"
9826 else
9827   echo "configure: failed program was:" >&5
9828   cat conftest.$ac_ext >&5
9829   rm -rf conftest*
9830   eval "ac_cv_func_$ac_func=no"
9831 fi
9832 rm -f conftest*
9833 fi
9834
9835 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9836   echo "$ac_t""yes" 1>&6
9837     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9838   cat >> confdefs.h <<EOF
9839 #define $ac_tr_func 1
9840 EOF
9841  
9842 else
9843   echo "$ac_t""no" 1>&6
9844 fi
9845 done
9846
9847
9848                         
9849         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9850 echo "configure:9851: checking for pthread_kill_other_threads_np" >&5
9851 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
9852   echo $ac_n "(cached) $ac_c" 1>&6
9853 else
9854   cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857 /* System header to define __stub macros and hopefully few prototypes,
9858     which can conflict with char pthread_kill_other_threads_np(); below.  */
9859 #include <assert.h>
9860 /* Override any gcc2 internal prototype to avoid an error.  */
9861 /* We use char because int might match the return type of a gcc2
9862     builtin and then its argument prototype would still apply.  */
9863 char pthread_kill_other_threads_np();
9864
9865 int main() {
9866
9867 /* The GNU C library defines this for functions which it implements
9868     to always fail with ENOSYS.  Some functions are actually named
9869     something starting with __ and the normal name is an alias.  */
9870 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9871 choke me
9872 #else
9873 pthread_kill_other_threads_np();
9874 #endif
9875
9876 ; return 0; }
9877 EOF
9878 if { (eval echo configure:9879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9879   rm -rf conftest*
9880   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9881 else
9882   echo "configure: failed program was:" >&5
9883   cat conftest.$ac_ext >&5
9884   rm -rf conftest*
9885   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9886 fi
9887 rm -f conftest*
9888 fi
9889
9890 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9891   echo "$ac_t""yes" 1>&6
9892   :
9893 else
9894   echo "$ac_t""no" 1>&6
9895 fi
9896
9897         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9898 echo "configure:9899: checking for LinuxThreads implementation" >&5
9899 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
9900   echo $ac_n "(cached) $ac_c" 1>&6
9901 else
9902   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9903 fi
9904
9905 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9906
9907                         
9908         
9909         
9910         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9911 echo "configure:9912: checking for LinuxThreads consistency" >&5
9912 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
9913   echo $ac_n "(cached) $ac_c" 1>&6
9914 else
9915   
9916                 if test $ol_cv_header_linux_threads = yes -a \
9917                         $ol_cv_sys_linux_threads = yes; then
9918                         ol_cv_linux_threads=yes
9919                 elif test $ol_cv_header_linux_threads = no -a \
9920                         $ol_cv_sys_linux_threads = no; then
9921                         ol_cv_linux_threads=no
9922                 else
9923                         ol_cv_linux_threads=error
9924                 fi
9925         
9926 fi
9927
9928 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9929
9930
9931                         if test $ol_cv_linux_threads = error; then
9932                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9933                         fi
9934
9935                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9936 echo "configure:9937: checking if pthread_create() works" >&5
9937 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
9938   echo $ac_n "(cached) $ac_c" 1>&6
9939 else
9940   
9941                         if test "$cross_compiling" = yes; then
9942                                 ol_cv_pthread_create_works=yes
9943 else
9944   cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 /* pthread test headers */
9948 #include <pthread.h>
9949 #ifndef NULL
9950 #define NULL (void*)0
9951 #endif
9952
9953 static void *task(p)
9954         void *p;
9955 {
9956         return (void *) (p == NULL);
9957 }
9958
9959
9960 int main(argc, argv)
9961         int argc;
9962         char **argv;
9963 {
9964
9965         /* pthread test function */
9966         pthread_t t;
9967         int status;
9968
9969         /* make sure pthread_create() isn't just a stub */
9970 #if HAVE_PTHREADS_D4
9971         status = pthread_create(&t, pthread_attr_default, task, NULL);
9972 #else
9973         status = pthread_create(&t, NULL, task, NULL);
9974 #endif
9975
9976         if( status ) exit( status );
9977
9978         /* make sure pthread_detach() isn't just a stub */
9979 #if HAVE_PTHREADS_D4
9980         status = pthread_detach( &t );
9981 #else
9982         status = pthread_detach( t );
9983 #endif
9984
9985 #ifdef HAVE_LINUX_THREADS
9986         pthread_kill_other_threads_np();
9987 #endif
9988
9989         exit( status );
9990
9991 }
9992
9993 EOF
9994 if { (eval echo configure:9995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9995 then
9996   ol_cv_pthread_create_works=yes
9997 else
9998   echo "configure: failed program was:" >&5
9999   cat conftest.$ac_ext >&5
10000   rm -fr conftest*
10001   ol_cv_pthread_create_works=no
10002 fi
10003 rm -fr conftest*
10004 fi
10005
10006 fi
10007
10008 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10009
10010                         if test $ol_cv_pthread_create_works = no ; then
10011                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10012                         fi
10013
10014                                                 if test $ol_with_yielding_select = auto ; then
10015                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10016 echo "configure:10017: checking if select yields when using pthreads" >&5
10017 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   
10021                                 if test "$cross_compiling" = yes; then
10022   ol_cv_pthread_select_yields=cross
10023 else
10024   cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027
10028 #include <sys/types.h>
10029 #include <sys/time.h>
10030 #include <unistd.h>
10031 #include <pthread.h>
10032 #ifndef NULL
10033 #define NULL (void*) 0
10034 #endif
10035
10036 static int fildes[2];
10037
10038 static void *task(p)
10039         void *p;
10040 {
10041         int i;
10042         struct timeval tv;
10043
10044         fd_set rfds;
10045
10046         tv.tv_sec=10;
10047         tv.tv_usec=0;
10048
10049         FD_ZERO(&rfds);
10050         FD_SET(fildes[0], &rfds);
10051
10052         /* we're not interested in any fds */
10053         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10054
10055         if(i < 0) {
10056                 perror("select");
10057                 exit(10);
10058         }
10059
10060         exit(0); /* if we exit here, the select blocked the whole process */
10061 }
10062
10063 int main(argc, argv)
10064         int argc;
10065         char **argv;
10066 {
10067         pthread_t t;
10068
10069         /* create a pipe to select */
10070         if(pipe(&fildes[0])) {
10071                 perror("select");
10072                 exit(1);
10073         }
10074
10075 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10076         (void) pthread_setconcurrency(2);
10077 #else
10078 #ifdef HAVE_THR_SETCONCURRENCY
10079         /* Set Solaris LWP concurrency to 2 */
10080         thr_setconcurrency(2);
10081 #endif
10082 #endif
10083
10084 #if HAVE_PTHREADS_D4
10085         pthread_create(&t, pthread_attr_default, task, NULL);
10086 #else
10087         pthread_create(&t, NULL, task, NULL);
10088 #endif
10089
10090 #if HAVE_SCHED_YIELD
10091         sched_yield();  /* make sure task runs first */
10092 #else
10093 #ifdef HAVE_PTHREAD_YIELD
10094         pthread_yield();        /* make sure task runs first */
10095 #endif
10096 #endif
10097
10098         exit(2);
10099 }
10100 EOF
10101 if { (eval echo configure:10102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10102 then
10103   ol_cv_pthread_select_yields=no
10104 else
10105   echo "configure: failed program was:" >&5
10106   cat conftest.$ac_ext >&5
10107   rm -fr conftest*
10108   ol_cv_pthread_select_yields=yes
10109 fi
10110 rm -fr conftest*
10111 fi
10112
10113 fi
10114
10115 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10116
10117                                 if test $ol_cv_pthread_select_yields = cross ; then
10118                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10119                                 fi
10120
10121                                 if test $ol_cv_pthread_select_yields = yes ; then
10122                                         ol_with_yielding_select=yes
10123                                 fi
10124                         fi
10125
10126                                                 CPPFLAGS="$save_CPPFLAGS"
10127                         LIBS="$save_LIBS"
10128                 else
10129                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10130                 fi
10131         fi
10132
10133         if test $ol_with_threads = posix ; then
10134                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10135         fi
10136 fi
10137
10138 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10139         -o $ol_with_threads = mach ; then
10140
10141                 for ac_hdr in mach/cthreads.h
10142 do
10143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10144 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10145 echo "configure:10146: checking for $ac_hdr" >&5
10146 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149   cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10152 #include <$ac_hdr>
10153 EOF
10154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10155 { (eval echo configure:10156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10157 if test -z "$ac_err"; then
10158   rm -rf conftest*
10159   eval "ac_cv_header_$ac_safe=yes"
10160 else
10161   echo "$ac_err" >&5
10162   echo "configure: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   rm -rf conftest*
10165   eval "ac_cv_header_$ac_safe=no"
10166 fi
10167 rm -f conftest*
10168 fi
10169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10172   cat >> confdefs.h <<EOF
10173 #define $ac_tr_hdr 1
10174 EOF
10175  
10176 else
10177   echo "$ac_t""no" 1>&6
10178 fi
10179 done
10180
10181         if test $ac_cv_header_mach_cthreads_h = yes ; then
10182                 ol_with_threads=found
10183
10184                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10185 echo "configure:10186: checking for cthread_fork" >&5
10186 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
10187   echo $ac_n "(cached) $ac_c" 1>&6
10188 else
10189   cat > conftest.$ac_ext <<EOF
10190 #line 10191 "configure"
10191 #include "confdefs.h"
10192 /* System header to define __stub macros and hopefully few prototypes,
10193     which can conflict with char cthread_fork(); below.  */
10194 #include <assert.h>
10195 /* Override any gcc2 internal prototype to avoid an error.  */
10196 /* We use char because int might match the return type of a gcc2
10197     builtin and then its argument prototype would still apply.  */
10198 char cthread_fork();
10199
10200 int main() {
10201
10202 /* The GNU C library defines this for functions which it implements
10203     to always fail with ENOSYS.  Some functions are actually named
10204     something starting with __ and the normal name is an alias.  */
10205 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10206 choke me
10207 #else
10208 cthread_fork();
10209 #endif
10210
10211 ; return 0; }
10212 EOF
10213 if { (eval echo configure:10214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10214   rm -rf conftest*
10215   eval "ac_cv_func_cthread_fork=yes"
10216 else
10217   echo "configure: failed program was:" >&5
10218   cat conftest.$ac_ext >&5
10219   rm -rf conftest*
10220   eval "ac_cv_func_cthread_fork=no"
10221 fi
10222 rm -f conftest*
10223 fi
10224
10225 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227   ol_link_threads=yes
10228 else
10229   echo "$ac_t""no" 1>&6
10230 fi
10231
10232
10233                 if test $ol_link_threads = no ; then
10234                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10235 echo "configure:10236: checking for cthread_fork with -all_load" >&5
10236 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
10237   echo $ac_n "(cached) $ac_c" 1>&6
10238 else
10239   
10240                                                                 save_LIBS="$LIBS"
10241                                 LIBS="-all_load $LIBS"
10242                                 cat > conftest.$ac_ext <<EOF
10243 #line 10244 "configure"
10244 #include "confdefs.h"
10245 #include <mach/cthreads.h>
10246 int main() {
10247
10248                                         cthread_fork((void *)0, (void *)0);
10249                                         
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10253   rm -rf conftest*
10254   ol_cv_cthread_all_load=yes
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   ol_cv_cthread_all_load=no
10260 fi
10261 rm -f conftest*
10262                                                                 LIBS="$save_LIBS"
10263                         
10264 fi
10265
10266 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10267
10268                         if test $ol_cv_cthread_all_load = yes ; then
10269                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10270                                 ol_link_threads=mach
10271                         fi
10272                 fi
10273
10274                 if test $ol_link_threads != no ; then
10275                         : check for cthread specific functionality here
10276                         cat >> confdefs.h <<\EOF
10277 #define HAVE_MACH_CTHREADS 1
10278 EOF
10279
10280                 else
10281                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10282                 fi
10283         fi
10284
10285         if test $ol_with_threads = mach ; then
10286                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10287         fi
10288 fi
10289
10290 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10291         -o $ol_with_threads = pth ; then
10292
10293         for ac_hdr in pth.h
10294 do
10295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10297 echo "configure:10298: checking for $ac_hdr" >&5
10298 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 #include <$ac_hdr>
10305 EOF
10306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10307 { (eval echo configure:10308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10309 if test -z "$ac_err"; then
10310   rm -rf conftest*
10311   eval "ac_cv_header_$ac_safe=yes"
10312 else
10313   echo "$ac_err" >&5
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -rf conftest*
10317   eval "ac_cv_header_$ac_safe=no"
10318 fi
10319 rm -f conftest*
10320 fi
10321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10322   echo "$ac_t""yes" 1>&6
10323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10324   cat >> confdefs.h <<EOF
10325 #define $ac_tr_hdr 1
10326 EOF
10327  
10328 else
10329   echo "$ac_t""no" 1>&6
10330 fi
10331 done
10332
10333
10334         if test $ac_cv_header_pth_h = yes ; then
10335                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10336 echo "configure:10337: checking for pth_version in -lpth" >&5
10337 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-%__p_%'`
10338 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10339   echo $ac_n "(cached) $ac_c" 1>&6
10340 else
10341   ac_save_LIBS="$LIBS"
10342 LIBS="-lpth  $LIBS"
10343 cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346 /* Override any gcc2 internal prototype to avoid an error.  */
10347 /* We use char because int might match the return type of a gcc2
10348     builtin and then its argument prototype would still apply.  */
10349 char pth_version();
10350
10351 int main() {
10352 pth_version()
10353 ; return 0; }
10354 EOF
10355 if { (eval echo configure:10356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10356   rm -rf conftest*
10357   eval "ac_cv_lib_$ac_lib_var=yes"
10358 else
10359   echo "configure: failed program was:" >&5
10360   cat conftest.$ac_ext >&5
10361   rm -rf conftest*
10362   eval "ac_cv_lib_$ac_lib_var=no"
10363 fi
10364 rm -f conftest*
10365 LIBS="$ac_save_LIBS"
10366
10367 fi
10368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10369   echo "$ac_t""yes" 1>&6
10370   have_pth=yes
10371 else
10372   echo "$ac_t""no" 1>&6
10373 have_pth=no
10374 fi
10375
10376
10377                 if test $have_pth = yes ; then
10378                         cat >> confdefs.h <<\EOF
10379 #define HAVE_GNU_PTH 1
10380 EOF
10381
10382                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10383                         ol_link_threads=pth
10384
10385                         if test $ol_with_yielding_select = auto ; then
10386                                 ol_with_yielding_select=yes
10387                         fi
10388                 fi
10389         fi
10390 fi
10391
10392 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10393         -o $ol_with_threads = lwp ; then
10394
10395                 for ac_hdr in thread.h synch.h
10396 do
10397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10399 echo "configure:10400: checking for $ac_hdr" >&5
10400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406 #include <$ac_hdr>
10407 EOF
10408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10409 { (eval echo configure:10410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10411 if test -z "$ac_err"; then
10412   rm -rf conftest*
10413   eval "ac_cv_header_$ac_safe=yes"
10414 else
10415   echo "$ac_err" >&5
10416   echo "configure: failed program was:" >&5
10417   cat conftest.$ac_ext >&5
10418   rm -rf conftest*
10419   eval "ac_cv_header_$ac_safe=no"
10420 fi
10421 rm -f conftest*
10422 fi
10423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10424   echo "$ac_t""yes" 1>&6
10425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10426   cat >> confdefs.h <<EOF
10427 #define $ac_tr_hdr 1
10428 EOF
10429  
10430 else
10431   echo "$ac_t""no" 1>&6
10432 fi
10433 done
10434
10435         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10436                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10437 echo "configure:10438: checking for thr_create in -lthread" >&5
10438 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
10439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10440   echo $ac_n "(cached) $ac_c" 1>&6
10441 else
10442   ac_save_LIBS="$LIBS"
10443 LIBS="-lthread  $LIBS"
10444 cat > conftest.$ac_ext <<EOF
10445 #line 10446 "configure"
10446 #include "confdefs.h"
10447 /* Override any gcc2 internal prototype to avoid an error.  */
10448 /* We use char because int might match the return type of a gcc2
10449     builtin and then its argument prototype would still apply.  */
10450 char thr_create();
10451
10452 int main() {
10453 thr_create()
10454 ; return 0; }
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10457   rm -rf conftest*
10458   eval "ac_cv_lib_$ac_lib_var=yes"
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   eval "ac_cv_lib_$ac_lib_var=no"
10464 fi
10465 rm -f conftest*
10466 LIBS="$ac_save_LIBS"
10467
10468 fi
10469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10470   echo "$ac_t""yes" 1>&6
10471   have_thr=yes
10472 else
10473   echo "$ac_t""no" 1>&6
10474 have_thr=no
10475 fi
10476
10477
10478                 if test $have_thr = yes ; then
10479                         cat >> confdefs.h <<\EOF
10480 #define HAVE_THR 1
10481 EOF
10482
10483                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10484                         ol_link_threads=thr
10485
10486                         if test $ol_with_yielding_select = auto ; then
10487                                 ol_with_yielding_select=yes
10488                         fi
10489
10490                                                 for ac_func in \
10491                                 thr_setconcurrency \
10492                                 thr_getconcurrency \
10493                         
10494 do
10495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10496 echo "configure:10497: checking for $ac_func" >&5
10497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10498   echo $ac_n "(cached) $ac_c" 1>&6
10499 else
10500   cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503 /* System header to define __stub macros and hopefully few prototypes,
10504     which can conflict with char $ac_func(); below.  */
10505 #include <assert.h>
10506 /* Override any gcc2 internal prototype to avoid an error.  */
10507 /* We use char because int might match the return type of a gcc2
10508     builtin and then its argument prototype would still apply.  */
10509 char $ac_func();
10510
10511 int main() {
10512
10513 /* The GNU C library defines this for functions which it implements
10514     to always fail with ENOSYS.  Some functions are actually named
10515     something starting with __ and the normal name is an alias.  */
10516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10517 choke me
10518 #else
10519 $ac_func();
10520 #endif
10521
10522 ; return 0; }
10523 EOF
10524 if { (eval echo configure:10525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10525   rm -rf conftest*
10526   eval "ac_cv_func_$ac_func=yes"
10527 else
10528   echo "configure: failed program was:" >&5
10529   cat conftest.$ac_ext >&5
10530   rm -rf conftest*
10531   eval "ac_cv_func_$ac_func=no"
10532 fi
10533 rm -f conftest*
10534 fi
10535
10536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10537   echo "$ac_t""yes" 1>&6
10538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10539   cat >> confdefs.h <<EOF
10540 #define $ac_tr_func 1
10541 EOF
10542  
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546 done
10547
10548                 fi
10549         fi
10550
10551                 for ac_hdr in lwp/lwp.h
10552 do
10553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10555 echo "configure:10556: checking for $ac_hdr" >&5
10556 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 #include <$ac_hdr>
10563 EOF
10564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10565 { (eval echo configure:10566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10567 if test -z "$ac_err"; then
10568   rm -rf conftest*
10569   eval "ac_cv_header_$ac_safe=yes"
10570 else
10571   echo "$ac_err" >&5
10572   echo "configure: failed program was:" >&5
10573   cat conftest.$ac_ext >&5
10574   rm -rf conftest*
10575   eval "ac_cv_header_$ac_safe=no"
10576 fi
10577 rm -f conftest*
10578 fi
10579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10580   echo "$ac_t""yes" 1>&6
10581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10582   cat >> confdefs.h <<EOF
10583 #define $ac_tr_hdr 1
10584 EOF
10585  
10586 else
10587   echo "$ac_t""no" 1>&6
10588 fi
10589 done
10590
10591         if test $ac_cv_header_lwp_lwp_h = yes ; then
10592                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10593 echo "configure:10594: checking for lwp_create in -llwp" >&5
10594 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
10595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10596   echo $ac_n "(cached) $ac_c" 1>&6
10597 else
10598   ac_save_LIBS="$LIBS"
10599 LIBS="-llwp  $LIBS"
10600 cat > conftest.$ac_ext <<EOF
10601 #line 10602 "configure"
10602 #include "confdefs.h"
10603 /* Override any gcc2 internal prototype to avoid an error.  */
10604 /* We use char because int might match the return type of a gcc2
10605     builtin and then its argument prototype would still apply.  */
10606 char lwp_create();
10607
10608 int main() {
10609 lwp_create()
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=no"
10620 fi
10621 rm -f conftest*
10622 LIBS="$ac_save_LIBS"
10623
10624 fi
10625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10626   echo "$ac_t""yes" 1>&6
10627   have_lwp=yes
10628 else
10629   echo "$ac_t""no" 1>&6
10630 have_lwp=no
10631 fi
10632
10633
10634                 if test $have_lwp = yes ; then
10635                         cat >> confdefs.h <<\EOF
10636 #define HAVE_LWP 1
10637 EOF
10638
10639                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10640                         ol_link_threads=lwp
10641
10642                         if test $ol_with_yielding_select = auto ; then
10643                                 ol_with_yielding_select=no
10644                         fi
10645                 fi
10646         fi
10647 fi
10648
10649 if test $ol_with_yielding_select = yes ; then
10650         cat >> confdefs.h <<\EOF
10651 #define HAVE_YIELDING_SELECT 1
10652 EOF
10653
10654 fi
10655
10656 if test $ol_with_threads = manual ; then
10657                 ol_link_threads=yes
10658
10659         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10660
10661         for ac_hdr in pthread.h sched.h
10662 do
10663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10665 echo "configure:10666: checking for $ac_hdr" >&5
10666 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10667   echo $ac_n "(cached) $ac_c" 1>&6
10668 else
10669   cat > conftest.$ac_ext <<EOF
10670 #line 10671 "configure"
10671 #include "confdefs.h"
10672 #include <$ac_hdr>
10673 EOF
10674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10675 { (eval echo configure:10676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10677 if test -z "$ac_err"; then
10678   rm -rf conftest*
10679   eval "ac_cv_header_$ac_safe=yes"
10680 else
10681   echo "$ac_err" >&5
10682   echo "configure: failed program was:" >&5
10683   cat conftest.$ac_ext >&5
10684   rm -rf conftest*
10685   eval "ac_cv_header_$ac_safe=no"
10686 fi
10687 rm -f conftest*
10688 fi
10689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10690   echo "$ac_t""yes" 1>&6
10691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10692   cat >> confdefs.h <<EOF
10693 #define $ac_tr_hdr 1
10694 EOF
10695  
10696 else
10697   echo "$ac_t""no" 1>&6
10698 fi
10699 done
10700
10701         for ac_func in sched_yield pthread_yield
10702 do
10703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10704 echo "configure:10705: checking for $ac_func" >&5
10705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 /* System header to define __stub macros and hopefully few prototypes,
10712     which can conflict with char $ac_func(); below.  */
10713 #include <assert.h>
10714 /* Override any gcc2 internal prototype to avoid an error.  */
10715 /* We use char because int might match the return type of a gcc2
10716     builtin and then its argument prototype would still apply.  */
10717 char $ac_func();
10718
10719 int main() {
10720
10721 /* The GNU C library defines this for functions which it implements
10722     to always fail with ENOSYS.  Some functions are actually named
10723     something starting with __ and the normal name is an alias.  */
10724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10725 choke me
10726 #else
10727 $ac_func();
10728 #endif
10729
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733   rm -rf conftest*
10734   eval "ac_cv_func_$ac_func=yes"
10735 else
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   eval "ac_cv_func_$ac_func=no"
10740 fi
10741 rm -f conftest*
10742 fi
10743
10744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10745   echo "$ac_t""yes" 1>&6
10746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10747   cat >> confdefs.h <<EOF
10748 #define $ac_tr_func 1
10749 EOF
10750  
10751 else
10752   echo "$ac_t""no" 1>&6
10753 fi
10754 done
10755
10756         
10757         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10758 echo "configure:10759: checking for LinuxThreads pthread.h" >&5
10759 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
10760   echo $ac_n "(cached) $ac_c" 1>&6
10761 else
10762   cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765 #include <pthread.h>
10766 EOF
10767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10768   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10769   rm -rf conftest*
10770   ol_cv_header_linux_threads=yes
10771 else
10772   rm -rf conftest*
10773   ol_cv_header_linux_threads=no
10774 fi
10775 rm -f conftest*
10776
10777                 
10778 fi
10779
10780 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10781         if test $ol_cv_header_linux_threads = yes; then
10782                 cat >> confdefs.h <<\EOF
10783 #define HAVE_LINUX_THREADS 1
10784 EOF
10785
10786         fi
10787
10788
10789         for ac_hdr in mach/cthreads.h
10790 do
10791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10793 echo "configure:10794: checking for $ac_hdr" >&5
10794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10795   echo $ac_n "(cached) $ac_c" 1>&6
10796 else
10797   cat > conftest.$ac_ext <<EOF
10798 #line 10799 "configure"
10799 #include "confdefs.h"
10800 #include <$ac_hdr>
10801 EOF
10802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10803 { (eval echo configure:10804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10805 if test -z "$ac_err"; then
10806   rm -rf conftest*
10807   eval "ac_cv_header_$ac_safe=yes"
10808 else
10809   echo "$ac_err" >&5
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   eval "ac_cv_header_$ac_safe=no"
10814 fi
10815 rm -f conftest*
10816 fi
10817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10818   echo "$ac_t""yes" 1>&6
10819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10820   cat >> confdefs.h <<EOF
10821 #define $ac_tr_hdr 1
10822 EOF
10823  
10824 else
10825   echo "$ac_t""no" 1>&6
10826 fi
10827 done
10828
10829         for ac_hdr in lwp/lwp.h
10830 do
10831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10833 echo "configure:10834: checking for $ac_hdr" >&5
10834 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10835   echo $ac_n "(cached) $ac_c" 1>&6
10836 else
10837   cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 #include <$ac_hdr>
10841 EOF
10842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10843 { (eval echo configure:10844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10845 if test -z "$ac_err"; then
10846   rm -rf conftest*
10847   eval "ac_cv_header_$ac_safe=yes"
10848 else
10849   echo "$ac_err" >&5
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   eval "ac_cv_header_$ac_safe=no"
10854 fi
10855 rm -f conftest*
10856 fi
10857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10860   cat >> confdefs.h <<EOF
10861 #define $ac_tr_hdr 1
10862 EOF
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869         for ac_hdr in thread.h synch.h
10870 do
10871 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10872 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10873 echo "configure:10874: checking for $ac_hdr" >&5
10874 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880 #include <$ac_hdr>
10881 EOF
10882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10883 { (eval echo configure:10884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10885 if test -z "$ac_err"; then
10886   rm -rf conftest*
10887   eval "ac_cv_header_$ac_safe=yes"
10888 else
10889   echo "$ac_err" >&5
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   eval "ac_cv_header_$ac_safe=no"
10894 fi
10895 rm -f conftest*
10896 fi
10897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10898   echo "$ac_t""yes" 1>&6
10899     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10900   cat >> confdefs.h <<EOF
10901 #define $ac_tr_hdr 1
10902 EOF
10903  
10904 else
10905   echo "$ac_t""no" 1>&6
10906 fi
10907 done
10908
10909 fi
10910
10911 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
10912                         cat >> confdefs.h <<\EOF
10913 #define REENTRANT 1
10914 EOF
10915
10916         cat >> confdefs.h <<\EOF
10917 #define _REENTRANT 1
10918 EOF
10919
10920         cat >> confdefs.h <<\EOF
10921 #define THREAD_SAFE 1
10922 EOF
10923
10924         cat >> confdefs.h <<\EOF
10925 #define _THREAD_SAFE 1
10926 EOF
10927
10928         cat >> confdefs.h <<\EOF
10929 #define THREADSAFE 1
10930 EOF
10931
10932         cat >> confdefs.h <<\EOF
10933 #define _THREADSAFE 1
10934 EOF
10935
10936         cat >> confdefs.h <<\EOF
10937 #define _SGI_MP_SOURCE 1
10938 EOF
10939
10940
10941                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10942 echo "configure:10943: checking for thread specific errno" >&5
10943 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
10944   echo $ac_n "(cached) $ac_c" 1>&6
10945 else
10946   
10947                 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <errno.h>
10951 int main() {
10952 errno = 0;
10953 ; return 0; }
10954 EOF
10955 if { (eval echo configure:10956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10956   rm -rf conftest*
10957   ol_cv_errno_thread_specific=yes
10958 else
10959   echo "configure: failed program was:" >&5
10960   cat conftest.$ac_ext >&5
10961   rm -rf conftest*
10962   ol_cv_errno_thread_specific=no
10963 fi
10964 rm -f conftest*
10965         
10966 fi
10967
10968 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10969
10970                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10971 echo "configure:10972: checking for thread specific h_errno" >&5
10972 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
10973   echo $ac_n "(cached) $ac_c" 1>&6
10974 else
10975   
10976                 cat > conftest.$ac_ext <<EOF
10977 #line 10978 "configure"
10978 #include "confdefs.h"
10979 #include <netdb.h>
10980 int main() {
10981 h_errno = 0;
10982 ; return 0; }
10983 EOF
10984 if { (eval echo configure:10985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10985   rm -rf conftest*
10986   ol_cv_h_errno_thread_specific=yes
10987 else
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   ol_cv_h_errno_thread_specific=no
10992 fi
10993 rm -f conftest*
10994         
10995 fi
10996
10997 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10998
10999         if test $ol_cv_errno_thread_specific != yes \
11000                 -o $ol_cv_h_errno_thread_specific != yes ; then
11001                 LIBS="$LTHREAD_LIBS $LIBS"
11002                 LTHREAD_LIBS=""
11003         fi
11004
11005 fi  
11006
11007 if test $ol_link_threads = no ; then
11008         if test $ol_with_threads = yes ; then
11009                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11010         fi
11011
11012         if test $ol_with_threads = auto ; then
11013                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11014                 ol_with_threads=no
11015         fi
11016
11017         cat >> confdefs.h <<\EOF
11018 #define NO_THREADS 1
11019 EOF
11020
11021         LTHREAD_LIBS=""
11022 fi
11023
11024 if test $ol_link_threads != no ; then
11025         cat >> confdefs.h <<\EOF
11026 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11027 EOF
11028
11029 fi
11030
11031
11032 ol_link_ldbm=no 
11033 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11034         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11035 echo "configure:11036: checking for DB2 library" >&5
11036 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
11037   echo $ac_n "(cached) $ac_c" 1>&6
11038 else
11039         ol_LIBS="$LIBS"
11040         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11041 echo "configure:11042: checking for db_appexit in -ldb" >&5
11042 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-%__p_%'`
11043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11044   echo $ac_n "(cached) $ac_c" 1>&6
11045 else
11046   ac_save_LIBS="$LIBS"
11047 LIBS="-ldb  $LIBS"
11048 cat > conftest.$ac_ext <<EOF
11049 #line 11050 "configure"
11050 #include "confdefs.h"
11051 /* Override any gcc2 internal prototype to avoid an error.  */
11052 /* We use char because int might match the return type of a gcc2
11053     builtin and then its argument prototype would still apply.  */
11054 char db_appexit();
11055
11056 int main() {
11057 db_appexit()
11058 ; return 0; }
11059 EOF
11060 if { (eval echo configure:11061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11061   rm -rf conftest*
11062   eval "ac_cv_lib_$ac_lib_var=yes"
11063 else
11064   echo "configure: failed program was:" >&5
11065   cat conftest.$ac_ext >&5
11066   rm -rf conftest*
11067   eval "ac_cv_lib_$ac_lib_var=no"
11068 fi
11069 rm -f conftest*
11070 LIBS="$ac_save_LIBS"
11071
11072 fi
11073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11074   echo "$ac_t""yes" 1>&6
11075   ol_cv_lib_db2=-ldb
11076 else
11077   echo "$ac_t""no" 1>&6
11078 ol_cv_lib_db2=no
11079 fi
11080
11081         LIBS="$ol_LIBS"
11082
11083 fi
11084
11085 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11086
11087 for ac_hdr in db.h
11088 do
11089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11091 echo "configure:11092: checking for $ac_hdr" >&5
11092 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11093   echo $ac_n "(cached) $ac_c" 1>&6
11094 else
11095   cat > conftest.$ac_ext <<EOF
11096 #line 11097 "configure"
11097 #include "confdefs.h"
11098 #include <$ac_hdr>
11099 EOF
11100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11101 { (eval echo configure:11102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11103 if test -z "$ac_err"; then
11104   rm -rf conftest*
11105   eval "ac_cv_header_$ac_safe=yes"
11106 else
11107   echo "$ac_err" >&5
11108   echo "configure: failed program was:" >&5
11109   cat conftest.$ac_ext >&5
11110   rm -rf conftest*
11111   eval "ac_cv_header_$ac_safe=no"
11112 fi
11113 rm -f conftest*
11114 fi
11115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11116   echo "$ac_t""yes" 1>&6
11117     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11118   cat >> confdefs.h <<EOF
11119 #define $ac_tr_hdr 1
11120 EOF
11121  
11122 else
11123   echo "$ac_t""no" 1>&6
11124 fi
11125 done
11126
11127 if test $ac_cv_header_db_h = yes ; then
11128         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11129 echo "configure:11130: checking if db.h is DB2" >&5
11130 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
11131   echo $ac_n "(cached) $ac_c" 1>&6
11132 else
11133   
11134                 cat > conftest.$ac_ext <<EOF
11135 #line 11136 "configure"
11136 #include "confdefs.h"
11137
11138 #                       include <db.h>
11139                         /* this check could be improved */
11140 #                       ifdef DB_VERSION_MAJOR
11141 #                               if DB_VERSION_MAJOR == 2
11142                                         __db_version_2;
11143 #                               endif
11144 #                       endif
11145                 
11146 EOF
11147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11148   egrep "__db_version_2" >/dev/null 2>&1; then
11149   rm -rf conftest*
11150   ol_cv_header_db2=yes
11151 else
11152   rm -rf conftest*
11153   ol_cv_header_db2=no
11154 fi
11155 rm -f conftest*
11156
11157 fi
11158
11159 echo "$ac_t""$ol_cv_header_db2" 1>&6
11160 else
11161         ol_cv_header_db2=no
11162 fi
11163
11164
11165  
11166  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11167 echo "configure:11168: checking for Berkeley DB2" >&5
11168 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
11169   echo $ac_n "(cached) $ac_c" 1>&6
11170 else
11171   
11172         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11173                 ol_cv_berkeley_db2=no
11174         else
11175                 ol_cv_berkeley_db2=yes
11176         fi
11177
11178 fi
11179
11180 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11181  if test $ol_cv_berkeley_db2 = yes ; then
11182         cat >> confdefs.h <<\EOF
11183 #define HAVE_BERKELEY_DB2 1
11184 EOF
11185
11186  fi
11187
11188
11189         if test $ol_cv_berkeley_db2 = yes ; then
11190                 ol_link_ldbm=db2
11191                 ol_with_ldbm_api=db2
11192
11193                 if test $ol_with_ldbm_type = hash ; then
11194                         cat >> confdefs.h <<\EOF
11195 #define LDBM_USE_DBHASH 1
11196 EOF
11197
11198                 else
11199                         cat >> confdefs.h <<\EOF
11200 #define LDBM_USE_DBBTREE 1
11201 EOF
11202
11203                 fi
11204
11205                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11206 echo "configure:11207: checking for DB_THREAD support" >&5
11207 if eval "test \"`echo '$''{'ol_cv_berkeley_db2_db_thread'+set}'`\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210   
11211         ol_LIBS="$LIBS"
11212         if test $ol_cv_lib_db2 != yes ; then
11213                 LIBS="$ol_cv_lib_db2"
11214         fi
11215
11216         if test "$cross_compiling" = yes; then
11217   ol_cv_berkeley_db2_db_thread=cross
11218 else
11219   cat > conftest.$ac_ext <<EOF
11220 #line 11221 "configure"
11221 #include "confdefs.h"
11222
11223 #include <db.h>
11224 #ifndef NULL
11225 #define NULL ((void *)0)
11226 #endif
11227 main()
11228 {
11229         int rc;
11230         DB_ENV env;
11231         u_int32_t flags = DB_CREATE | DB_THREAD;
11232
11233         memset( &env, '\0', sizeof(env) );
11234
11235         rc = db_appinit( NULL, NULL, &env, flags );
11236
11237         if( rc == 0 ) {
11238                 db_appexit( &env );
11239         }
11240
11241         return rc;
11242 }
11243 EOF
11244 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11245 then
11246   ol_cv_berkeley_db2_db_thread=yes
11247 else
11248   echo "configure: failed program was:" >&5
11249   cat conftest.$ac_ext >&5
11250   rm -fr conftest*
11251   ol_cv_berkeley_db2_db_thread=no
11252 fi
11253 rm -fr conftest*
11254 fi
11255
11256
11257         LIBS="$ol_LIBS"
11258
11259         if test $ol_cv_berkeley_db2_db_thread != no ; then
11260                 cat >> confdefs.h <<\EOF
11261 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11262 EOF
11263
11264         fi
11265
11266 fi
11267
11268 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11269
11270                                                 if test $ol_cv_lib_db2 != yes ; then
11271                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11272                 fi
11273         fi
11274 fi
11275
11276 ol_link_bdb2=no
11277 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11278         if test $ol_cv_berkeley_db2_db_thread != no ; then
11279                 ol_link_bdb2=yes
11280         else
11281                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11282         fi
11283 fi
11284
11285 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11286         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11287 echo "configure:11288: checking for Berkeley DB library" >&5
11288 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   
11292         for ac_hdr in db1/db.h
11293 do
11294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11296 echo "configure:11297: checking for $ac_hdr" >&5
11297 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 #include <$ac_hdr>
11304 EOF
11305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11306 { (eval echo configure:11307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11308 if test -z "$ac_err"; then
11309   rm -rf conftest*
11310   eval "ac_cv_header_$ac_safe=yes"
11311 else
11312   echo "$ac_err" >&5
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_header_$ac_safe=no"
11317 fi
11318 rm -f conftest*
11319 fi
11320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11323   cat >> confdefs.h <<EOF
11324 #define $ac_tr_hdr 1
11325 EOF
11326  
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330 done
11331
11332         ol_LIBS="$LIBS"
11333         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11334 echo "configure:11335: checking for dbopen" >&5
11335 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
11336   echo $ac_n "(cached) $ac_c" 1>&6
11337 else
11338   cat > conftest.$ac_ext <<EOF
11339 #line 11340 "configure"
11340 #include "confdefs.h"
11341 /* System header to define __stub macros and hopefully few prototypes,
11342     which can conflict with char dbopen(); below.  */
11343 #include <assert.h>
11344 /* Override any gcc2 internal prototype to avoid an error.  */
11345 /* We use char because int might match the return type of a gcc2
11346     builtin and then its argument prototype would still apply.  */
11347 char dbopen();
11348
11349 int main() {
11350
11351 /* The GNU C library defines this for functions which it implements
11352     to always fail with ENOSYS.  Some functions are actually named
11353     something starting with __ and the normal name is an alias.  */
11354 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11355 choke me
11356 #else
11357 dbopen();
11358 #endif
11359
11360 ; return 0; }
11361 EOF
11362 if { (eval echo configure:11363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11363   rm -rf conftest*
11364   eval "ac_cv_func_dbopen=yes"
11365 else
11366   echo "configure: failed program was:" >&5
11367   cat conftest.$ac_ext >&5
11368   rm -rf conftest*
11369   eval "ac_cv_func_dbopen=no"
11370 fi
11371 rm -f conftest*
11372 fi
11373
11374 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11375   echo "$ac_t""yes" 1>&6
11376   ol_cv_lib_db=yes
11377 else
11378   echo "$ac_t""no" 1>&6
11379
11380                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11381 echo "configure:11382: checking for dbopen in -ldb1" >&5
11382 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
11383 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11384   echo $ac_n "(cached) $ac_c" 1>&6
11385 else
11386   ac_save_LIBS="$LIBS"
11387 LIBS="-ldb1  $LIBS"
11388 cat > conftest.$ac_ext <<EOF
11389 #line 11390 "configure"
11390 #include "confdefs.h"
11391 /* Override any gcc2 internal prototype to avoid an error.  */
11392 /* We use char because int might match the return type of a gcc2
11393     builtin and then its argument prototype would still apply.  */
11394 char dbopen();
11395
11396 int main() {
11397 dbopen()
11398 ; return 0; }
11399 EOF
11400 if { (eval echo configure:11401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11401   rm -rf conftest*
11402   eval "ac_cv_lib_$ac_lib_var=yes"
11403 else
11404   echo "configure: failed program was:" >&5
11405   cat conftest.$ac_ext >&5
11406   rm -rf conftest*
11407   eval "ac_cv_lib_$ac_lib_var=no"
11408 fi
11409 rm -f conftest*
11410 LIBS="$ac_save_LIBS"
11411
11412 fi
11413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11414   echo "$ac_t""yes" 1>&6
11415   ol_cv_lib_db=-ldb1
11416 else
11417   echo "$ac_t""no" 1>&6
11418
11419                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11420 echo "configure:11421: checking for dbopen in -ldb" >&5
11421 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
11422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11423   echo $ac_n "(cached) $ac_c" 1>&6
11424 else
11425   ac_save_LIBS="$LIBS"
11426 LIBS="-ldb  $LIBS"
11427 cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 /* Override any gcc2 internal prototype to avoid an error.  */
11431 /* We use char because int might match the return type of a gcc2
11432     builtin and then its argument prototype would still apply.  */
11433 char dbopen();
11434
11435 int main() {
11436 dbopen()
11437 ; return 0; }
11438 EOF
11439 if { (eval echo configure:11440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11440   rm -rf conftest*
11441   eval "ac_cv_lib_$ac_lib_var=yes"
11442 else
11443   echo "configure: failed program was:" >&5
11444   cat conftest.$ac_ext >&5
11445   rm -rf conftest*
11446   eval "ac_cv_lib_$ac_lib_var=no"
11447 fi
11448 rm -f conftest*
11449 LIBS="$ac_save_LIBS"
11450
11451 fi
11452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11453   echo "$ac_t""yes" 1>&6
11454   ol_cv_lib_db=-ldb
11455 else
11456   echo "$ac_t""no" 1>&6
11457 ol_cv_lib_db=no
11458 fi
11459
11460                 
11461 fi
11462
11463         
11464 fi
11465
11466         LIBS="$ol_LIBS"
11467
11468 fi
11469
11470 echo "$ac_t""$ol_cv_lib_db" 1>&6
11471
11472
11473 for ac_hdr in db_185.h
11474 do
11475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11477 echo "configure:11478: checking for $ac_hdr" >&5
11478 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11479   echo $ac_n "(cached) $ac_c" 1>&6
11480 else
11481   cat > conftest.$ac_ext <<EOF
11482 #line 11483 "configure"
11483 #include "confdefs.h"
11484 #include <$ac_hdr>
11485 EOF
11486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11487 { (eval echo configure:11488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11489 if test -z "$ac_err"; then
11490   rm -rf conftest*
11491   eval "ac_cv_header_$ac_safe=yes"
11492 else
11493   echo "$ac_err" >&5
11494   echo "configure: failed program was:" >&5
11495   cat conftest.$ac_ext >&5
11496   rm -rf conftest*
11497   eval "ac_cv_header_$ac_safe=no"
11498 fi
11499 rm -f conftest*
11500 fi
11501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11502   echo "$ac_t""yes" 1>&6
11503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11504   cat >> confdefs.h <<EOF
11505 #define $ac_tr_hdr 1
11506 EOF
11507  
11508 else
11509   echo "$ac_t""no" 1>&6
11510 fi
11511 done
11512
11513 if test "$ol_cv_header_db2" = yes ; then
11514         
11515         ol_cv_header_db=$ac_cv_header_db_185_h
11516 else
11517         ol_cv_header_db=$ac_cv_header_db_h
11518 fi
11519
11520
11521  
11522  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11523 echo "configure:11524: checking for Berkeley DB" >&5
11524 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
11525   echo $ac_n "(cached) $ac_c" 1>&6
11526 else
11527   
11528         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11529                 ol_cv_berkeley_db=no
11530         else
11531                 ol_cv_berkeley_db=yes
11532         fi
11533
11534 fi
11535
11536 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11537  if test $ol_cv_berkeley_db = yes ; then
11538         cat >> confdefs.h <<\EOF
11539 #define HAVE_BERKELEY_DB 1
11540 EOF
11541
11542  fi
11543
11544
11545         if test $ol_cv_berkeley_db = yes ; then
11546                 ol_link_ldbm=db
11547                 ol_with_ldbm_api=db
11548
11549                 if test $ol_with_ldbm_type = hash ; then
11550                         cat >> confdefs.h <<\EOF
11551 #define LDBM_USE_DBHASH 1
11552 EOF
11553
11554                 else
11555                         cat >> confdefs.h <<\EOF
11556 #define LDBM_USE_DBBTREE 1
11557 EOF
11558
11559                 fi
11560
11561                                                 if test $ol_cv_lib_db != yes ; then
11562                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11563                 fi
11564         fi
11565 fi
11566
11567 if test $ol_with_ldbm_api = manual ; then
11568                 ol_link_ldbm=yes
11569
11570         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11571
11572         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11573 do
11574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11576 echo "configure:11577: checking for $ac_hdr" >&5
11577 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11578   echo $ac_n "(cached) $ac_c" 1>&6
11579 else
11580   cat > conftest.$ac_ext <<EOF
11581 #line 11582 "configure"
11582 #include "confdefs.h"
11583 #include <$ac_hdr>
11584 EOF
11585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11586 { (eval echo configure:11587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11588 if test -z "$ac_err"; then
11589   rm -rf conftest*
11590   eval "ac_cv_header_$ac_safe=yes"
11591 else
11592   echo "$ac_err" >&5
11593   echo "configure: failed program was:" >&5
11594   cat conftest.$ac_ext >&5
11595   rm -rf conftest*
11596   eval "ac_cv_header_$ac_safe=no"
11597 fi
11598 rm -f conftest*
11599 fi
11600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11601   echo "$ac_t""yes" 1>&6
11602     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11603   cat >> confdefs.h <<EOF
11604 #define $ac_tr_hdr 1
11605 EOF
11606  
11607 else
11608   echo "$ac_t""no" 1>&6
11609 fi
11610 done
11611
11612 fi
11613
11614 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11615         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11616         ol_with_ldbm_api=none
11617 fi
11618
11619 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11620         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11621 echo "configure:11622: checking for MDBM library" >&5
11622 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
11623   echo $ac_n "(cached) $ac_c" 1>&6
11624 else
11625         ol_LIBS="$LIBS"
11626         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11627 echo "configure:11628: checking for mdbm_set_chain" >&5
11628 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
11629   echo $ac_n "(cached) $ac_c" 1>&6
11630 else
11631   cat > conftest.$ac_ext <<EOF
11632 #line 11633 "configure"
11633 #include "confdefs.h"
11634 /* System header to define __stub macros and hopefully few prototypes,
11635     which can conflict with char mdbm_set_chain(); below.  */
11636 #include <assert.h>
11637 /* Override any gcc2 internal prototype to avoid an error.  */
11638 /* We use char because int might match the return type of a gcc2
11639     builtin and then its argument prototype would still apply.  */
11640 char mdbm_set_chain();
11641
11642 int main() {
11643
11644 /* The GNU C library defines this for functions which it implements
11645     to always fail with ENOSYS.  Some functions are actually named
11646     something starting with __ and the normal name is an alias.  */
11647 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11648 choke me
11649 #else
11650 mdbm_set_chain();
11651 #endif
11652
11653 ; return 0; }
11654 EOF
11655 if { (eval echo configure:11656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11656   rm -rf conftest*
11657   eval "ac_cv_func_mdbm_set_chain=yes"
11658 else
11659   echo "configure: failed program was:" >&5
11660   cat conftest.$ac_ext >&5
11661   rm -rf conftest*
11662   eval "ac_cv_func_mdbm_set_chain=no"
11663 fi
11664 rm -f conftest*
11665 fi
11666
11667 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11668   echo "$ac_t""yes" 1>&6
11669   ol_cv_lib_mdbm=yes
11670 else
11671   echo "$ac_t""no" 1>&6
11672
11673                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11674 echo "configure:11675: checking for mdbm_set_chain in -lmdbm" >&5
11675 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
11676 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11677   echo $ac_n "(cached) $ac_c" 1>&6
11678 else
11679   ac_save_LIBS="$LIBS"
11680 LIBS="-lmdbm  $LIBS"
11681 cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684 /* Override any gcc2 internal prototype to avoid an error.  */
11685 /* We use char because int might match the return type of a gcc2
11686     builtin and then its argument prototype would still apply.  */
11687 char mdbm_set_chain();
11688
11689 int main() {
11690 mdbm_set_chain()
11691 ; return 0; }
11692 EOF
11693 if { (eval echo configure:11694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11694   rm -rf conftest*
11695   eval "ac_cv_lib_$ac_lib_var=yes"
11696 else
11697   echo "configure: failed program was:" >&5
11698   cat conftest.$ac_ext >&5
11699   rm -rf conftest*
11700   eval "ac_cv_lib_$ac_lib_var=no"
11701 fi
11702 rm -f conftest*
11703 LIBS="$ac_save_LIBS"
11704
11705 fi
11706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11707   echo "$ac_t""yes" 1>&6
11708   ol_cv_lib_mdbm=-lmdbm
11709 else
11710   echo "$ac_t""no" 1>&6
11711 ol_cv_lib_mdbm=no
11712 fi
11713
11714         
11715 fi
11716
11717         LIBS="$ol_LIBS"
11718
11719 fi
11720
11721 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11722
11723
11724  for ac_hdr in mdbm.h
11725 do
11726 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11727 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11728 echo "configure:11729: checking for $ac_hdr" >&5
11729 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11730   echo $ac_n "(cached) $ac_c" 1>&6
11731 else
11732   cat > conftest.$ac_ext <<EOF
11733 #line 11734 "configure"
11734 #include "confdefs.h"
11735 #include <$ac_hdr>
11736 EOF
11737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11738 { (eval echo configure:11739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11740 if test -z "$ac_err"; then
11741   rm -rf conftest*
11742   eval "ac_cv_header_$ac_safe=yes"
11743 else
11744   echo "$ac_err" >&5
11745   echo "configure: failed program was:" >&5
11746   cat conftest.$ac_ext >&5
11747   rm -rf conftest*
11748   eval "ac_cv_header_$ac_safe=no"
11749 fi
11750 rm -f conftest*
11751 fi
11752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11753   echo "$ac_t""yes" 1>&6
11754     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11755   cat >> confdefs.h <<EOF
11756 #define $ac_tr_hdr 1
11757 EOF
11758  
11759 else
11760   echo "$ac_t""no" 1>&6
11761 fi
11762 done
11763
11764  echo $ac_n "checking for db""... $ac_c" 1>&6
11765 echo "configure:11766: checking for db" >&5
11766 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
11767   echo $ac_n "(cached) $ac_c" 1>&6
11768 else
11769   
11770         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11771                 ol_cv_mdbm=no
11772         else
11773                 ol_cv_mdbm=yes
11774         fi
11775
11776 fi
11777
11778 echo "$ac_t""$ol_cv_mdbm" 1>&6
11779  if test $ol_cv_mdbm = yes ; then
11780         cat >> confdefs.h <<\EOF
11781 #define HAVE_MDBM 1
11782 EOF
11783
11784  fi
11785
11786
11787         if test $ol_cv_mdbm = yes ; then
11788                 ol_link_ldbm=mdbm
11789                 ol_with_ldbm_api=mdbm
11790                 if test $ol_cv_lib_mdbm != yes ; then
11791                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11792                 fi
11793         fi
11794 fi
11795
11796 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11797         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11798 echo "configure:11799: checking for GDBM library" >&5
11799 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
11800   echo $ac_n "(cached) $ac_c" 1>&6
11801 else
11802         ol_LIBS="$LIBS"
11803         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11804 echo "configure:11805: checking for gdbm_open" >&5
11805 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 /* System header to define __stub macros and hopefully few prototypes,
11812     which can conflict with char gdbm_open(); below.  */
11813 #include <assert.h>
11814 /* Override any gcc2 internal prototype to avoid an error.  */
11815 /* We use char because int might match the return type of a gcc2
11816     builtin and then its argument prototype would still apply.  */
11817 char gdbm_open();
11818
11819 int main() {
11820
11821 /* The GNU C library defines this for functions which it implements
11822     to always fail with ENOSYS.  Some functions are actually named
11823     something starting with __ and the normal name is an alias.  */
11824 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11825 choke me
11826 #else
11827 gdbm_open();
11828 #endif
11829
11830 ; return 0; }
11831 EOF
11832 if { (eval echo configure:11833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11833   rm -rf conftest*
11834   eval "ac_cv_func_gdbm_open=yes"
11835 else
11836   echo "configure: failed program was:" >&5
11837   cat conftest.$ac_ext >&5
11838   rm -rf conftest*
11839   eval "ac_cv_func_gdbm_open=no"
11840 fi
11841 rm -f conftest*
11842 fi
11843
11844 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11845   echo "$ac_t""yes" 1>&6
11846   ol_cv_lib_gdbm=yes
11847 else
11848   echo "$ac_t""no" 1>&6
11849
11850                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11851 echo "configure:11852: checking for gdbm_open in -lgdbm" >&5
11852 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
11853 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11854   echo $ac_n "(cached) $ac_c" 1>&6
11855 else
11856   ac_save_LIBS="$LIBS"
11857 LIBS="-lgdbm  $LIBS"
11858 cat > conftest.$ac_ext <<EOF
11859 #line 11860 "configure"
11860 #include "confdefs.h"
11861 /* Override any gcc2 internal prototype to avoid an error.  */
11862 /* We use char because int might match the return type of a gcc2
11863     builtin and then its argument prototype would still apply.  */
11864 char gdbm_open();
11865
11866 int main() {
11867 gdbm_open()
11868 ; return 0; }
11869 EOF
11870 if { (eval echo configure:11871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11871   rm -rf conftest*
11872   eval "ac_cv_lib_$ac_lib_var=yes"
11873 else
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -rf conftest*
11877   eval "ac_cv_lib_$ac_lib_var=no"
11878 fi
11879 rm -f conftest*
11880 LIBS="$ac_save_LIBS"
11881
11882 fi
11883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11884   echo "$ac_t""yes" 1>&6
11885   ol_cv_lib_gdbm=-lgdbm
11886 else
11887   echo "$ac_t""no" 1>&6
11888 ol_cv_lib_gdbm=no
11889 fi
11890
11891         
11892 fi
11893
11894         LIBS="$ol_LIBS"
11895
11896 fi
11897
11898 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11899
11900
11901  for ac_hdr in gdbm.h
11902 do
11903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11905 echo "configure:11906: checking for $ac_hdr" >&5
11906 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11907   echo $ac_n "(cached) $ac_c" 1>&6
11908 else
11909   cat > conftest.$ac_ext <<EOF
11910 #line 11911 "configure"
11911 #include "confdefs.h"
11912 #include <$ac_hdr>
11913 EOF
11914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11915 { (eval echo configure:11916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11917 if test -z "$ac_err"; then
11918   rm -rf conftest*
11919   eval "ac_cv_header_$ac_safe=yes"
11920 else
11921   echo "$ac_err" >&5
11922   echo "configure: failed program was:" >&5
11923   cat conftest.$ac_ext >&5
11924   rm -rf conftest*
11925   eval "ac_cv_header_$ac_safe=no"
11926 fi
11927 rm -f conftest*
11928 fi
11929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11930   echo "$ac_t""yes" 1>&6
11931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11932   cat >> confdefs.h <<EOF
11933 #define $ac_tr_hdr 1
11934 EOF
11935  
11936 else
11937   echo "$ac_t""no" 1>&6
11938 fi
11939 done
11940
11941  echo $ac_n "checking for db""... $ac_c" 1>&6
11942 echo "configure:11943: checking for db" >&5
11943 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
11944   echo $ac_n "(cached) $ac_c" 1>&6
11945 else
11946   
11947         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11948                 ol_cv_gdbm=no
11949         else
11950                 ol_cv_gdbm=yes
11951         fi
11952
11953 fi
11954
11955 echo "$ac_t""$ol_cv_gdbm" 1>&6
11956  if test $ol_cv_gdbm = yes ; then
11957         cat >> confdefs.h <<\EOF
11958 #define HAVE_GDBM 1
11959 EOF
11960
11961  fi
11962
11963
11964         if test $ol_cv_gdbm = yes ; then
11965                 ol_link_ldbm=gdbm
11966                 ol_with_ldbm_api=gdbm
11967
11968                 if test $ol_cv_lib_gdbm != yes ; then
11969                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11970                 fi
11971         fi
11972 fi
11973
11974 if test $ol_with_ldbm_api = auto ; then
11975         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11976 elif test $ol_with_ldbm_api = ndbm ; then
11977         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11978 echo "configure:11979: checking for NDBM library" >&5
11979 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
11980   echo $ac_n "(cached) $ac_c" 1>&6
11981 else
11982         ol_LIBS="$LIBS"
11983         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11984 echo "configure:11985: checking for dbm_open" >&5
11985 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
11986   echo $ac_n "(cached) $ac_c" 1>&6
11987 else
11988   cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991 /* System header to define __stub macros and hopefully few prototypes,
11992     which can conflict with char dbm_open(); below.  */
11993 #include <assert.h>
11994 /* Override any gcc2 internal prototype to avoid an error.  */
11995 /* We use char because int might match the return type of a gcc2
11996     builtin and then its argument prototype would still apply.  */
11997 char dbm_open();
11998
11999 int main() {
12000
12001 /* The GNU C library defines this for functions which it implements
12002     to always fail with ENOSYS.  Some functions are actually named
12003     something starting with __ and the normal name is an alias.  */
12004 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12005 choke me
12006 #else
12007 dbm_open();
12008 #endif
12009
12010 ; return 0; }
12011 EOF
12012 if { (eval echo configure:12013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12013   rm -rf conftest*
12014   eval "ac_cv_func_dbm_open=yes"
12015 else
12016   echo "configure: failed program was:" >&5
12017   cat conftest.$ac_ext >&5
12018   rm -rf conftest*
12019   eval "ac_cv_func_dbm_open=no"
12020 fi
12021 rm -f conftest*
12022 fi
12023
12024 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12025   echo "$ac_t""yes" 1>&6
12026   ol_cv_lib_ndbm=yes
12027 else
12028   echo "$ac_t""no" 1>&6
12029
12030                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12031 echo "configure:12032: checking for dbm_open in -lndbm" >&5
12032 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
12033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12034   echo $ac_n "(cached) $ac_c" 1>&6
12035 else
12036   ac_save_LIBS="$LIBS"
12037 LIBS="-lndbm  $LIBS"
12038 cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 /* Override any gcc2 internal prototype to avoid an error.  */
12042 /* We use char because int might match the return type of a gcc2
12043     builtin and then its argument prototype would still apply.  */
12044 char dbm_open();
12045
12046 int main() {
12047 dbm_open()
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   eval "ac_cv_lib_$ac_lib_var=yes"
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   eval "ac_cv_lib_$ac_lib_var=no"
12058 fi
12059 rm -f conftest*
12060 LIBS="$ac_save_LIBS"
12061
12062 fi
12063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12064   echo "$ac_t""yes" 1>&6
12065   ol_cv_lib_ndbm=-lndbm
12066 else
12067   echo "$ac_t""no" 1>&6
12068
12069                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12070 echo "configure:12071: checking for dbm_open in -ldbm" >&5
12071 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12073   echo $ac_n "(cached) $ac_c" 1>&6
12074 else
12075   ac_save_LIBS="$LIBS"
12076 LIBS="-ldbm  $LIBS"
12077 cat > conftest.$ac_ext <<EOF
12078 #line 12079 "configure"
12079 #include "confdefs.h"
12080 /* Override any gcc2 internal prototype to avoid an error.  */
12081 /* We use char because int might match the return type of a gcc2
12082     builtin and then its argument prototype would still apply.  */
12083 char dbm_open();
12084
12085 int main() {
12086 dbm_open()
12087 ; return 0; }
12088 EOF
12089 if { (eval echo configure:12090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12090   rm -rf conftest*
12091   eval "ac_cv_lib_$ac_lib_var=yes"
12092 else
12093   echo "configure: failed program was:" >&5
12094   cat conftest.$ac_ext >&5
12095   rm -rf conftest*
12096   eval "ac_cv_lib_$ac_lib_var=no"
12097 fi
12098 rm -f conftest*
12099 LIBS="$ac_save_LIBS"
12100
12101 fi
12102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12103   echo "$ac_t""yes" 1>&6
12104   ol_cv_lib_ndbm=-ldbm
12105 else
12106   echo "$ac_t""no" 1>&6
12107 ol_cv_lib_ndbm=no
12108 fi
12109                 
12110 fi
12111
12112         
12113 fi
12114
12115         LIBS="$ol_LIBS"
12116
12117 fi
12118
12119 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12120
12121
12122  for ac_hdr in ndbm.h
12123 do
12124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12126 echo "configure:12127: checking for $ac_hdr" >&5
12127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 #include <$ac_hdr>
12134 EOF
12135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12136 { (eval echo configure:12137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12138 if test -z "$ac_err"; then
12139   rm -rf conftest*
12140   eval "ac_cv_header_$ac_safe=yes"
12141 else
12142   echo "$ac_err" >&5
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -rf conftest*
12146   eval "ac_cv_header_$ac_safe=no"
12147 fi
12148 rm -f conftest*
12149 fi
12150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12151   echo "$ac_t""yes" 1>&6
12152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12153   cat >> confdefs.h <<EOF
12154 #define $ac_tr_hdr 1
12155 EOF
12156  
12157 else
12158   echo "$ac_t""no" 1>&6
12159 fi
12160 done
12161
12162  echo $ac_n "checking for db""... $ac_c" 1>&6
12163 echo "configure:12164: checking for db" >&5
12164 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
12165   echo $ac_n "(cached) $ac_c" 1>&6
12166 else
12167   
12168         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12169                 ol_cv_ndbm=no
12170         else
12171                 ol_cv_ndbm=yes
12172         fi
12173
12174 fi
12175
12176 echo "$ac_t""$ol_cv_ndbm" 1>&6
12177  if test $ol_cv_ndbm = yes ; then
12178         cat >> confdefs.h <<\EOF
12179 #define HAVE_NDBM 1
12180 EOF
12181
12182  fi
12183
12184
12185         if test $ol_cv_ndbm = yes ; then
12186                 ol_link_ldbm=ndbm
12187                 ol_with_ldbm_api=ndbm
12188
12189                 if test $ol_cv_lib_ndbm != yes ; then
12190                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12191                 fi
12192         fi
12193 fi
12194
12195 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12196         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12197         if test $ol_enable_ldbm = yes ; then
12198                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12199         fi
12200
12201         echo "configure: warning: disabling LDBM" 1>&2
12202         ol_enable_ldbm=no
12203 fi
12204
12205 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12206         LINK_BINS_DYNAMIC="yes"
12207 else
12208         LINK_BINS_DYNAMIC="no"
12209 fi
12210
12211 if test $ol_enable_wrappers != no ; then
12212         for ac_hdr in tcpd.h
12213 do
12214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12216 echo "configure:12217: checking for $ac_hdr" >&5
12217 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12218   echo $ac_n "(cached) $ac_c" 1>&6
12219 else
12220   cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 #include <$ac_hdr>
12224 EOF
12225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12226 { (eval echo configure:12227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12228 if test -z "$ac_err"; then
12229   rm -rf conftest*
12230   eval "ac_cv_header_$ac_safe=yes"
12231 else
12232   echo "$ac_err" >&5
12233   echo "configure: failed program was:" >&5
12234   cat conftest.$ac_ext >&5
12235   rm -rf conftest*
12236   eval "ac_cv_header_$ac_safe=no"
12237 fi
12238 rm -f conftest*
12239 fi
12240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12241   echo "$ac_t""yes" 1>&6
12242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12243   cat >> confdefs.h <<EOF
12244 #define $ac_tr_hdr 1
12245 EOF
12246  
12247 else
12248   echo "$ac_t""no" 1>&6
12249 fi
12250 done
12251
12252
12253         if test $ac_cv_header_tcpd_h != yes ; then
12254                 have_wrappers=no
12255         else
12256                 cat > conftest.$ac_ext <<EOF
12257 #line 12258 "configure"
12258 #include "confdefs.h"
12259
12260 int allow_severity = 0;
12261 int deny_severity  = 0;
12262                 
12263 int main() {
12264 hosts_access()
12265 ; return 0; }
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12268   rm -rf conftest*
12269   have_wrappers=yes
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -rf conftest*
12274   have_wrappers=no
12275 fi
12276 rm -f conftest*
12277         fi
12278
12279         if test $have_wrappers = yes ; then
12280                 cat >> confdefs.h <<\EOF
12281 #define HAVE_TCPD 1
12282 EOF
12283
12284                 WRAP_LIBS="-lwrap"
12285
12286                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12287 echo "configure:12288: checking for main in -lnsl" >&5
12288 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
12289 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12290   echo $ac_n "(cached) $ac_c" 1>&6
12291 else
12292   ac_save_LIBS="$LIBS"
12293 LIBS="-lnsl  $LIBS"
12294 cat > conftest.$ac_ext <<EOF
12295 #line 12296 "configure"
12296 #include "confdefs.h"
12297
12298 int main() {
12299 main()
12300 ; return 0; }
12301 EOF
12302 if { (eval echo configure:12303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12303   rm -rf conftest*
12304   eval "ac_cv_lib_$ac_lib_var=yes"
12305 else
12306   echo "configure: failed program was:" >&5
12307   cat conftest.$ac_ext >&5
12308   rm -rf conftest*
12309   eval "ac_cv_lib_$ac_lib_var=no"
12310 fi
12311 rm -f conftest*
12312 LIBS="$ac_save_LIBS"
12313
12314 fi
12315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12316   echo "$ac_t""yes" 1>&6
12317     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12318     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12319   cat >> confdefs.h <<EOF
12320 #define $ac_tr_lib 1
12321 EOF
12322
12323   LIBS="-lnsl $LIBS"
12324
12325 else
12326   echo "$ac_t""no" 1>&6
12327 fi
12328
12329         else
12330                 echo "configure: warning: could not find -lwrap" 1>&2
12331                 if test $ol_enable_wrappers = yes ; then
12332                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12333                 fi
12334
12335                 echo "configure: warning: disabling wrappers support" 1>&2
12336                 ol_enable_wrappers=no
12337                 WRAP_LIBS=""
12338         fi
12339 fi
12340
12341 if test $ol_enable_syslog != no ; then
12342         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12343 echo "configure:12344: checking for openlog" >&5
12344 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
12345   echo $ac_n "(cached) $ac_c" 1>&6
12346 else
12347   cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12350 /* System header to define __stub macros and hopefully few prototypes,
12351     which can conflict with char openlog(); below.  */
12352 #include <assert.h>
12353 /* Override any gcc2 internal prototype to avoid an error.  */
12354 /* We use char because int might match the return type of a gcc2
12355     builtin and then its argument prototype would still apply.  */
12356 char openlog();
12357
12358 int main() {
12359
12360 /* The GNU C library defines this for functions which it implements
12361     to always fail with ENOSYS.  Some functions are actually named
12362     something starting with __ and the normal name is an alias.  */
12363 #if defined (__stub_openlog) || defined (__stub___openlog)
12364 choke me
12365 #else
12366 openlog();
12367 #endif
12368
12369 ; return 0; }
12370 EOF
12371 if { (eval echo configure:12372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12372   rm -rf conftest*
12373   eval "ac_cv_func_openlog=yes"
12374 else
12375   echo "configure: failed program was:" >&5
12376   cat conftest.$ac_ext >&5
12377   rm -rf conftest*
12378   eval "ac_cv_func_openlog=no"
12379 fi
12380 rm -f conftest*
12381 fi
12382
12383 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12384   echo "$ac_t""yes" 1>&6
12385   :
12386 else
12387   echo "$ac_t""no" 1>&6
12388 fi
12389
12390         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12391                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12392         fi
12393         ol_enable_syslog=$ac_cv_func_openlog
12394 fi
12395
12396 if test $ol_enable_dmalloc != no ; then
12397         for ac_hdr in dmalloc.h
12398 do
12399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12401 echo "configure:12402: checking for $ac_hdr" >&5
12402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12403   echo $ac_n "(cached) $ac_c" 1>&6
12404 else
12405   cat > conftest.$ac_ext <<EOF
12406 #line 12407 "configure"
12407 #include "confdefs.h"
12408 #include <$ac_hdr>
12409 EOF
12410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12411 { (eval echo configure:12412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12413 if test -z "$ac_err"; then
12414   rm -rf conftest*
12415   eval "ac_cv_header_$ac_safe=yes"
12416 else
12417   echo "$ac_err" >&5
12418   echo "configure: failed program was:" >&5
12419   cat conftest.$ac_ext >&5
12420   rm -rf conftest*
12421   eval "ac_cv_header_$ac_safe=no"
12422 fi
12423 rm -f conftest*
12424 fi
12425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12426   echo "$ac_t""yes" 1>&6
12427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12428   cat >> confdefs.h <<EOF
12429 #define $ac_tr_hdr 1
12430 EOF
12431  
12432 else
12433   echo "$ac_t""no" 1>&6
12434 fi
12435 done
12436
12437         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12438 echo "configure:12439: checking for dmalloc_shutdown in -ldmalloc" >&5
12439 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
12440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12441   echo $ac_n "(cached) $ac_c" 1>&6
12442 else
12443   ac_save_LIBS="$LIBS"
12444 LIBS="-ldmalloc  $LIBS"
12445 cat > conftest.$ac_ext <<EOF
12446 #line 12447 "configure"
12447 #include "confdefs.h"
12448 /* Override any gcc2 internal prototype to avoid an error.  */
12449 /* We use char because int might match the return type of a gcc2
12450     builtin and then its argument prototype would still apply.  */
12451 char dmalloc_shutdown();
12452
12453 int main() {
12454 dmalloc_shutdown()
12455 ; return 0; }
12456 EOF
12457 if { (eval echo configure:12458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12458   rm -rf conftest*
12459   eval "ac_cv_lib_$ac_lib_var=yes"
12460 else
12461   echo "configure: failed program was:" >&5
12462   cat conftest.$ac_ext >&5
12463   rm -rf conftest*
12464   eval "ac_cv_lib_$ac_lib_var=no"
12465 fi
12466 rm -f conftest*
12467 LIBS="$ac_save_LIBS"
12468
12469 fi
12470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12471   echo "$ac_t""yes" 1>&6
12472     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12473     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12474   cat >> confdefs.h <<EOF
12475 #define $ac_tr_lib 1
12476 EOF
12477
12478   LIBS="-ldmalloc $LIBS"
12479
12480 else
12481   echo "$ac_t""no" 1>&6
12482 fi
12483
12484 fi
12485
12486 if test $ol_enable_tcl != no ; then
12487         for ac_hdr in tcl.h
12488 do
12489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12491 echo "configure:12492: checking for $ac_hdr" >&5
12492 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12493   echo $ac_n "(cached) $ac_c" 1>&6
12494 else
12495   cat > conftest.$ac_ext <<EOF
12496 #line 12497 "configure"
12497 #include "confdefs.h"
12498 #include <$ac_hdr>
12499 EOF
12500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12501 { (eval echo configure:12502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12503 if test -z "$ac_err"; then
12504   rm -rf conftest*
12505   eval "ac_cv_header_$ac_safe=yes"
12506 else
12507   echo "$ac_err" >&5
12508   echo "configure: failed program was:" >&5
12509   cat conftest.$ac_ext >&5
12510   rm -rf conftest*
12511   eval "ac_cv_header_$ac_safe=no"
12512 fi
12513 rm -f conftest*
12514 fi
12515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12516   echo "$ac_t""yes" 1>&6
12517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12518   cat >> confdefs.h <<EOF
12519 #define $ac_tr_hdr 1
12520 EOF
12521  
12522 else
12523   echo "$ac_t""no" 1>&6
12524 fi
12525 done
12526
12527
12528         if test $ac_cv_header_tcl_h != yes ; then
12529                 have_tcl=no
12530         else
12531                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12532                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12533 echo "configure:12534: checking for main in -l$lib" >&5
12534 ac_lib_var=`echo $lib'_'main | sed 'y%./+-%__p_%'`
12535 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12536   echo $ac_n "(cached) $ac_c" 1>&6
12537 else
12538   ac_save_LIBS="$LIBS"
12539 LIBS="-l$lib  $LIBS"
12540 cat > conftest.$ac_ext <<EOF
12541 #line 12542 "configure"
12542 #include "confdefs.h"
12543
12544 int main() {
12545 main()
12546 ; return 0; }
12547 EOF
12548 if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12549   rm -rf conftest*
12550   eval "ac_cv_lib_$ac_lib_var=yes"
12551 else
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_lib_$ac_lib_var=no"
12556 fi
12557 rm -f conftest*
12558 LIBS="$ac_save_LIBS"
12559
12560 fi
12561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12562   echo "$ac_t""yes" 1>&6
12563   have_tcl=yes
12564                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12565                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12566                            else
12567                                MOD_TCL_LIB="-l${lib}"
12568                            fi;break
12569 else
12570   echo "$ac_t""no" 1>&6
12571 have_tcl=no
12572 fi
12573
12574                 done
12575         fi
12576
12577         if test $have_tcl != yes ; then
12578                 echo "configure: warning: could not find -ltcl" 1>&2
12579                 if test $ol_enable_tcl = yes ; then
12580                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12581                 fi
12582
12583                 ol_enable_tcl=no
12584         fi
12585 fi
12586
12587 ol_link_termcap=no
12588 for ac_hdr in termcap.h ncurses.h
12589 do
12590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12592 echo "configure:12593: checking for $ac_hdr" >&5
12593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12594   echo $ac_n "(cached) $ac_c" 1>&6
12595 else
12596   cat > conftest.$ac_ext <<EOF
12597 #line 12598 "configure"
12598 #include "confdefs.h"
12599 #include <$ac_hdr>
12600 EOF
12601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12602 { (eval echo configure:12603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12604 if test -z "$ac_err"; then
12605   rm -rf conftest*
12606   eval "ac_cv_header_$ac_safe=yes"
12607 else
12608   echo "$ac_err" >&5
12609   echo "configure: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   rm -rf conftest*
12612   eval "ac_cv_header_$ac_safe=no"
12613 fi
12614 rm -f conftest*
12615 fi
12616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12617   echo "$ac_t""yes" 1>&6
12618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12619   cat >> confdefs.h <<EOF
12620 #define $ac_tr_hdr 1
12621 EOF
12622  
12623 else
12624   echo "$ac_t""no" 1>&6
12625 fi
12626 done
12627
12628
12629 if test $ol_link_termcap = no ; then
12630         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12631 echo "configure:12632: checking for tputs in -ltermcap" >&5
12632 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
12633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12634   echo $ac_n "(cached) $ac_c" 1>&6
12635 else
12636   ac_save_LIBS="$LIBS"
12637 LIBS="-ltermcap  $LIBS"
12638 cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641 /* Override any gcc2 internal prototype to avoid an error.  */
12642 /* We use char because int might match the return type of a gcc2
12643     builtin and then its argument prototype would still apply.  */
12644 char tputs();
12645
12646 int main() {
12647 tputs()
12648 ; return 0; }
12649 EOF
12650 if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12651   rm -rf conftest*
12652   eval "ac_cv_lib_$ac_lib_var=yes"
12653 else
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -rf conftest*
12657   eval "ac_cv_lib_$ac_lib_var=no"
12658 fi
12659 rm -f conftest*
12660 LIBS="$ac_save_LIBS"
12661
12662 fi
12663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12664   echo "$ac_t""yes" 1>&6
12665   have_termcap=yes
12666 else
12667   echo "$ac_t""no" 1>&6
12668 have_termcap=no
12669 fi
12670
12671         if test $have_termcap = yes ; then
12672                 cat >> confdefs.h <<\EOF
12673 #define HAVE_TERMCAP 1
12674 EOF
12675
12676                 ol_link_termcap=yes
12677                 TERMCAP_LIBS=-ltermcap
12678         fi
12679 fi
12680
12681 if test $ol_link_termcap = no ; then
12682         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12683 echo "configure:12684: checking for initscr in -lncurses" >&5
12684 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
12685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12686   echo $ac_n "(cached) $ac_c" 1>&6
12687 else
12688   ac_save_LIBS="$LIBS"
12689 LIBS="-lncurses  $LIBS"
12690 cat > conftest.$ac_ext <<EOF
12691 #line 12692 "configure"
12692 #include "confdefs.h"
12693 /* Override any gcc2 internal prototype to avoid an error.  */
12694 /* We use char because int might match the return type of a gcc2
12695     builtin and then its argument prototype would still apply.  */
12696 char initscr();
12697
12698 int main() {
12699 initscr()
12700 ; return 0; }
12701 EOF
12702 if { (eval echo configure:12703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12703   rm -rf conftest*
12704   eval "ac_cv_lib_$ac_lib_var=yes"
12705 else
12706   echo "configure: failed program was:" >&5
12707   cat conftest.$ac_ext >&5
12708   rm -rf conftest*
12709   eval "ac_cv_lib_$ac_lib_var=no"
12710 fi
12711 rm -f conftest*
12712 LIBS="$ac_save_LIBS"
12713
12714 fi
12715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12716   echo "$ac_t""yes" 1>&6
12717   have_ncurses=yes
12718 else
12719   echo "$ac_t""no" 1>&6
12720 have_ncurses=no
12721 fi
12722
12723         if test $have_ncurses = yes ; then
12724                 cat >> confdefs.h <<\EOF
12725 #define HAVE_NCURSES 1
12726 EOF
12727
12728                 ol_link_termcap=yes
12729                 TERMCAP_LIBS=-lncurses
12730         fi
12731 fi
12732
12733 if test $ol_link_termcap = no ; then
12734         cat >> confdefs.h <<\EOF
12735 #define NO_TERMCAP 1
12736 EOF
12737
12738         TERMCAP_LIBS=
12739 fi
12740
12741 ol_link_sasl=no
12742 if test $ol_with_cyrus_sasl != no ; then
12743         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12744 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12745 echo "configure:12746: checking for sasl.h" >&5
12746 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12747   echo $ac_n "(cached) $ac_c" 1>&6
12748 else
12749   cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 #include <sasl.h>
12753 EOF
12754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12755 { (eval echo configure:12756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12757 if test -z "$ac_err"; then
12758   rm -rf conftest*
12759   eval "ac_cv_header_$ac_safe=yes"
12760 else
12761   echo "$ac_err" >&5
12762   echo "configure: failed program was:" >&5
12763   cat conftest.$ac_ext >&5
12764   rm -rf conftest*
12765   eval "ac_cv_header_$ac_safe=no"
12766 fi
12767 rm -f conftest*
12768 fi
12769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12770   echo "$ac_t""yes" 1>&6
12771   :
12772 else
12773   echo "$ac_t""no" 1>&6
12774 fi
12775
12776
12777         if test $ac_cv_header_sasl_h = yes ; then
12778                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12779 echo "configure:12780: checking for sasl_client_init in -lsasl" >&5
12780 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
12781 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12782   echo $ac_n "(cached) $ac_c" 1>&6
12783 else
12784   ac_save_LIBS="$LIBS"
12785 LIBS="-lsasl  $LIBS"
12786 cat > conftest.$ac_ext <<EOF
12787 #line 12788 "configure"
12788 #include "confdefs.h"
12789 /* Override any gcc2 internal prototype to avoid an error.  */
12790 /* We use char because int might match the return type of a gcc2
12791     builtin and then its argument prototype would still apply.  */
12792 char sasl_client_init();
12793
12794 int main() {
12795 sasl_client_init()
12796 ; return 0; }
12797 EOF
12798 if { (eval echo configure:12799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12799   rm -rf conftest*
12800   eval "ac_cv_lib_$ac_lib_var=yes"
12801 else
12802   echo "configure: failed program was:" >&5
12803   cat conftest.$ac_ext >&5
12804   rm -rf conftest*
12805   eval "ac_cv_lib_$ac_lib_var=no"
12806 fi
12807 rm -f conftest*
12808 LIBS="$ac_save_LIBS"
12809
12810 fi
12811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12812   echo "$ac_t""yes" 1>&6
12813   have_cyrus_sasl=yes
12814 else
12815   echo "$ac_t""no" 1>&6
12816 have_cyrus_sasl=no
12817 fi
12818
12819
12820                 if test $have_cyrus_sasl != no ; then
12821                         SASL_LIBS="-lsasl"
12822                         cat >> confdefs.h <<\EOF
12823 #define HAVE_CYRUS_SASL 1
12824 EOF
12825
12826                         ol_link_sasl=yes
12827                 fi
12828         fi
12829
12830         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12831                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12832         fi
12833 fi
12834
12835 if test $cross_compiling != yes ; then
12836         dev=no
12837         if test -r /dev/urandom ; then
12838                 dev="/dev/urandom";
12839         elif test -r /idev/urandom ; then
12840                 dev="/idev/urandom";
12841         elif test -r /dev/srandom ; then
12842                 dev="/dev/srandom";
12843         elif test -r /dev/random ; then
12844                 dev="/dev/random";
12845         elif test -r /idev/random ; then
12846                 dev="/idev/random";
12847         fi
12848
12849         if test $dev != no ; then
12850                 cat >> confdefs.h <<EOF
12851 #define URANDOM_DEVICE "$dev"
12852 EOF
12853
12854         fi
12855 fi
12856
12857 ol_link_fetch=no
12858 if test $ol_with_fetch != no ; then
12859         ol=$LIBS
12860 LIBS="-lfetch -lcom_err $LIBS"
12861 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12862 echo "configure:12863: checking fetch(3) library" >&5
12863 if eval "test \"`echo '$''{'ol_cv_lib_fetch'+set}'`\" = set"; then
12864   echo $ac_n "(cached) $ac_c" 1>&6
12865 else
12866   
12867         cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870
12871 #include <sys/param.h>
12872 #include <stdio.h>
12873 #include <fetch.h>
12874 int main() {
12875 struct url *u = fetchParseURL("file:///"); 
12876 ; return 0; }
12877 EOF
12878 if { (eval echo configure:12879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12879   rm -rf conftest*
12880   ol_cv_lib_fetch=yes
12881 else
12882   echo "configure: failed program was:" >&5
12883   cat conftest.$ac_ext >&5
12884   rm -rf conftest*
12885   ol_cv_lib_fetch=no
12886 fi
12887 rm -f conftest*
12888 fi
12889
12890 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12891 LIBS=$ol_LIBS
12892 if test $ol_cv_lib_fetch != no ; then
12893         ol_link_fetch="-lfetch -lcom_err"
12894         cat >> confdefs.h <<\EOF
12895 #define HAVE_FETCH 1
12896 EOF
12897
12898 fi
12899
12900
12901         if test $ol_cv_lib_fetch != no ; then
12902                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12903                 ol_link_fetch=freebsd
12904
12905         elif test $ol_with_fetch != auto ; then
12906                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12907         fi 
12908 fi
12909
12910 ol_link_readline=no
12911 if test $ol_with_readline != no ; then
12912         for ac_hdr in readline/readline.h readline/history.h
12913 do
12914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12916 echo "configure:12917: checking for $ac_hdr" >&5
12917 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12918   echo $ac_n "(cached) $ac_c" 1>&6
12919 else
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 #include <$ac_hdr>
12924 EOF
12925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12926 { (eval echo configure:12927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12928 if test -z "$ac_err"; then
12929   rm -rf conftest*
12930   eval "ac_cv_header_$ac_safe=yes"
12931 else
12932   echo "$ac_err" >&5
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -rf conftest*
12936   eval "ac_cv_header_$ac_safe=no"
12937 fi
12938 rm -f conftest*
12939 fi
12940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12941   echo "$ac_t""yes" 1>&6
12942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12943   cat >> confdefs.h <<EOF
12944 #define $ac_tr_hdr 1
12945 EOF
12946  
12947 else
12948   echo "$ac_t""no" 1>&6
12949 fi
12950 done
12951
12952
12953         if test $ac_cv_header_readline_readline_h = yes ; then
12954                 save_LIBS="$LIBS"
12955                 LIBS="$TERMCAP_LIBS $LIBS"
12956                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12957 echo "configure:12958: checking for readline in -lreadline" >&5
12958 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
12959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12960   echo $ac_n "(cached) $ac_c" 1>&6
12961 else
12962   ac_save_LIBS="$LIBS"
12963 LIBS="-lreadline  $LIBS"
12964 cat > conftest.$ac_ext <<EOF
12965 #line 12966 "configure"
12966 #include "confdefs.h"
12967 /* Override any gcc2 internal prototype to avoid an error.  */
12968 /* We use char because int might match the return type of a gcc2
12969     builtin and then its argument prototype would still apply.  */
12970 char readline();
12971
12972 int main() {
12973 readline()
12974 ; return 0; }
12975 EOF
12976 if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12977   rm -rf conftest*
12978   eval "ac_cv_lib_$ac_lib_var=yes"
12979 else
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -rf conftest*
12983   eval "ac_cv_lib_$ac_lib_var=no"
12984 fi
12985 rm -f conftest*
12986 LIBS="$ac_save_LIBS"
12987
12988 fi
12989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12990   echo "$ac_t""yes" 1>&6
12991   have_readline=yes
12992 else
12993   echo "$ac_t""no" 1>&6
12994 have_readline=no
12995 fi
12996
12997                 LIBS="$save_LIBS"
12998                         
12999                 if test $have_readline = yes ; then
13000                         ol_with_readline=found
13001                         ol_link_readline=yes
13002
13003                         READLINE_LIBS="-lreadline"
13004                 fi
13005         fi
13006 fi
13007
13008 if test $ol_link_readline = yes ; then
13009         cat >> confdefs.h <<\EOF
13010 #define HAVE_READLINE 1
13011 EOF
13012
13013 fi
13014
13015
13016 if test $ol_enable_crypt != no ; then
13017         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13018 echo "configure:13019: checking for crypt" >&5
13019 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
13020   echo $ac_n "(cached) $ac_c" 1>&6
13021 else
13022   cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 /* System header to define __stub macros and hopefully few prototypes,
13026     which can conflict with char crypt(); below.  */
13027 #include <assert.h>
13028 /* Override any gcc2 internal prototype to avoid an error.  */
13029 /* We use char because int might match the return type of a gcc2
13030     builtin and then its argument prototype would still apply.  */
13031 char crypt();
13032
13033 int main() {
13034
13035 /* The GNU C library defines this for functions which it implements
13036     to always fail with ENOSYS.  Some functions are actually named
13037     something starting with __ and the normal name is an alias.  */
13038 #if defined (__stub_crypt) || defined (__stub___crypt)
13039 choke me
13040 #else
13041 crypt();
13042 #endif
13043
13044 ; return 0; }
13045 EOF
13046 if { (eval echo configure:13047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13047   rm -rf conftest*
13048   eval "ac_cv_func_crypt=yes"
13049 else
13050   echo "configure: failed program was:" >&5
13051   cat conftest.$ac_ext >&5
13052   rm -rf conftest*
13053   eval "ac_cv_func_crypt=no"
13054 fi
13055 rm -f conftest*
13056 fi
13057
13058 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13059   echo "$ac_t""yes" 1>&6
13060   have_crypt=yes
13061 else
13062   echo "$ac_t""no" 1>&6
13063
13064                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13065 echo "configure:13066: checking for crypt in -lcrypt" >&5
13066 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
13067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13068   echo $ac_n "(cached) $ac_c" 1>&6
13069 else
13070   ac_save_LIBS="$LIBS"
13071 LIBS="-lcrypt  $LIBS"
13072 cat > conftest.$ac_ext <<EOF
13073 #line 13074 "configure"
13074 #include "confdefs.h"
13075 /* Override any gcc2 internal prototype to avoid an error.  */
13076 /* We use char because int might match the return type of a gcc2
13077     builtin and then its argument prototype would still apply.  */
13078 char crypt();
13079
13080 int main() {
13081 crypt()
13082 ; return 0; }
13083 EOF
13084 if { (eval echo configure:13085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13085   rm -rf conftest*
13086   eval "ac_cv_lib_$ac_lib_var=yes"
13087 else
13088   echo "configure: failed program was:" >&5
13089   cat conftest.$ac_ext >&5
13090   rm -rf conftest*
13091   eval "ac_cv_lib_$ac_lib_var=no"
13092 fi
13093 rm -f conftest*
13094 LIBS="$ac_save_LIBS"
13095
13096 fi
13097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13098   echo "$ac_t""yes" 1>&6
13099   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13100                         have_crypt=yes
13101 else
13102   echo "$ac_t""no" 1>&6
13103 have_crypt=no
13104 fi
13105
13106 fi
13107
13108
13109         if test $have_crypt = yes ; then
13110                 cat >> confdefs.h <<\EOF
13111 #define HAVE_CRYPT 1
13112 EOF
13113
13114         else
13115                 echo "configure: warning: could not find crypt" 1>&2
13116                 if test $ol_enable_crypt = yes ; then
13117                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13118                 fi
13119
13120                 echo "configure: warning: disabling crypt support" 1>&2
13121                 ol_enable_crypt=no
13122         fi
13123 fi
13124
13125 if test $ol_enable_proctitle != no ; then
13126         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13127 echo "configure:13128: checking for setproctitle" >&5
13128 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
13129   echo $ac_n "(cached) $ac_c" 1>&6
13130 else
13131   cat > conftest.$ac_ext <<EOF
13132 #line 13133 "configure"
13133 #include "confdefs.h"
13134 /* System header to define __stub macros and hopefully few prototypes,
13135     which can conflict with char setproctitle(); below.  */
13136 #include <assert.h>
13137 /* Override any gcc2 internal prototype to avoid an error.  */
13138 /* We use char because int might match the return type of a gcc2
13139     builtin and then its argument prototype would still apply.  */
13140 char setproctitle();
13141
13142 int main() {
13143
13144 /* The GNU C library defines this for functions which it implements
13145     to always fail with ENOSYS.  Some functions are actually named
13146     something starting with __ and the normal name is an alias.  */
13147 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13148 choke me
13149 #else
13150 setproctitle();
13151 #endif
13152
13153 ; return 0; }
13154 EOF
13155 if { (eval echo configure:13156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13156   rm -rf conftest*
13157   eval "ac_cv_func_setproctitle=yes"
13158 else
13159   echo "configure: failed program was:" >&5
13160   cat conftest.$ac_ext >&5
13161   rm -rf conftest*
13162   eval "ac_cv_func_setproctitle=no"
13163 fi
13164 rm -f conftest*
13165 fi
13166
13167 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13168   echo "$ac_t""yes" 1>&6
13169   have_setproctitle=yes
13170 else
13171   echo "$ac_t""no" 1>&6
13172
13173                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13174 echo "configure:13175: checking for setproctitle in -lutil" >&5
13175 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
13176 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13177   echo $ac_n "(cached) $ac_c" 1>&6
13178 else
13179   ac_save_LIBS="$LIBS"
13180 LIBS="-lutil  $LIBS"
13181 cat > conftest.$ac_ext <<EOF
13182 #line 13183 "configure"
13183 #include "confdefs.h"
13184 /* Override any gcc2 internal prototype to avoid an error.  */
13185 /* We use char because int might match the return type of a gcc2
13186     builtin and then its argument prototype would still apply.  */
13187 char setproctitle();
13188
13189 int main() {
13190 setproctitle()
13191 ; return 0; }
13192 EOF
13193 if { (eval echo configure:13194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13194   rm -rf conftest*
13195   eval "ac_cv_lib_$ac_lib_var=yes"
13196 else
13197   echo "configure: failed program was:" >&5
13198   cat conftest.$ac_ext >&5
13199   rm -rf conftest*
13200   eval "ac_cv_lib_$ac_lib_var=no"
13201 fi
13202 rm -f conftest*
13203 LIBS="$ac_save_LIBS"
13204
13205 fi
13206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13207   echo "$ac_t""yes" 1>&6
13208   have_setproctitle=yes
13209                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13210 else
13211   echo "$ac_t""no" 1>&6
13212 have_setproctitle=no
13213                         LIBOBJS="$LIBOBJS setproctitle.o"
13214                         LIBSRCS="$LIBSRCS setproctitle.c"
13215 fi
13216
13217 fi
13218
13219
13220         if test $have_setproctitle = yes ; then
13221                 cat >> confdefs.h <<\EOF
13222 #define HAVE_SETPROCTITLE 1
13223 EOF
13224
13225         fi
13226 fi
13227
13228 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13229 echo "configure:13230: checking for ANSI C header files" >&5
13230 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
13231   echo $ac_n "(cached) $ac_c" 1>&6
13232 else
13233   cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236 #include <stdlib.h>
13237 #include <stdarg.h>
13238 #include <string.h>
13239 #include <float.h>
13240 EOF
13241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13242 { (eval echo configure:13243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13244 if test -z "$ac_err"; then
13245   rm -rf conftest*
13246   ac_cv_header_stdc=yes
13247 else
13248   echo "$ac_err" >&5
13249   echo "configure: failed program was:" >&5
13250   cat conftest.$ac_ext >&5
13251   rm -rf conftest*
13252   ac_cv_header_stdc=no
13253 fi
13254 rm -f conftest*
13255
13256 if test $ac_cv_header_stdc = yes; then
13257   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13258 cat > conftest.$ac_ext <<EOF
13259 #line 13260 "configure"
13260 #include "confdefs.h"
13261 #include <string.h>
13262 EOF
13263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13264   egrep "memchr" >/dev/null 2>&1; then
13265   :
13266 else
13267   rm -rf conftest*
13268   ac_cv_header_stdc=no
13269 fi
13270 rm -f conftest*
13271
13272 fi
13273
13274 if test $ac_cv_header_stdc = yes; then
13275   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13276 cat > conftest.$ac_ext <<EOF
13277 #line 13278 "configure"
13278 #include "confdefs.h"
13279 #include <stdlib.h>
13280 EOF
13281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13282   egrep "free" >/dev/null 2>&1; then
13283   :
13284 else
13285   rm -rf conftest*
13286   ac_cv_header_stdc=no
13287 fi
13288 rm -f conftest*
13289
13290 fi
13291
13292 if test $ac_cv_header_stdc = yes; then
13293   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13294 if test "$cross_compiling" = yes; then
13295   :
13296 else
13297   cat > conftest.$ac_ext <<EOF
13298 #line 13299 "configure"
13299 #include "confdefs.h"
13300 #include <ctype.h>
13301 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13302 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13303 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13304 int main () { int i; for (i = 0; i < 256; i++)
13305 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13306 exit (0); }
13307
13308 EOF
13309 if { (eval echo configure:13310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13310 then
13311   :
13312 else
13313   echo "configure: failed program was:" >&5
13314   cat conftest.$ac_ext >&5
13315   rm -fr conftest*
13316   ac_cv_header_stdc=no
13317 fi
13318 rm -fr conftest*
13319 fi
13320
13321 fi
13322 fi
13323
13324 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13325 if test $ac_cv_header_stdc = yes; then
13326   cat >> confdefs.h <<\EOF
13327 #define STDC_HEADERS 1
13328 EOF
13329
13330 fi
13331
13332 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13333 echo "configure:13334: checking for mode_t" >&5
13334 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
13335   echo $ac_n "(cached) $ac_c" 1>&6
13336 else
13337   cat > conftest.$ac_ext <<EOF
13338 #line 13339 "configure"
13339 #include "confdefs.h"
13340 #include <sys/types.h>
13341 #if STDC_HEADERS
13342 #include <stdlib.h>
13343 #include <stddef.h>
13344 #endif
13345 EOF
13346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13347   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13348   rm -rf conftest*
13349   ac_cv_type_mode_t=yes
13350 else
13351   rm -rf conftest*
13352   ac_cv_type_mode_t=no
13353 fi
13354 rm -f conftest*
13355
13356 fi
13357 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
13358 if test $ac_cv_type_mode_t = no; then
13359   cat >> confdefs.h <<\EOF
13360 #define mode_t int
13361 EOF
13362
13363 fi
13364
13365 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13366 echo "configure:13367: checking for off_t" >&5
13367 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
13368   echo $ac_n "(cached) $ac_c" 1>&6
13369 else
13370   cat > conftest.$ac_ext <<EOF
13371 #line 13372 "configure"
13372 #include "confdefs.h"
13373 #include <sys/types.h>
13374 #if STDC_HEADERS
13375 #include <stdlib.h>
13376 #include <stddef.h>
13377 #endif
13378 EOF
13379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13380   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13381   rm -rf conftest*
13382   ac_cv_type_off_t=yes
13383 else
13384   rm -rf conftest*
13385   ac_cv_type_off_t=no
13386 fi
13387 rm -f conftest*
13388
13389 fi
13390 echo "$ac_t""$ac_cv_type_off_t" 1>&6
13391 if test $ac_cv_type_off_t = no; then
13392   cat >> confdefs.h <<\EOF
13393 #define off_t long
13394 EOF
13395
13396 fi
13397
13398 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13399 echo "configure:13400: checking for pid_t" >&5
13400 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
13401   echo $ac_n "(cached) $ac_c" 1>&6
13402 else
13403   cat > conftest.$ac_ext <<EOF
13404 #line 13405 "configure"
13405 #include "confdefs.h"
13406 #include <sys/types.h>
13407 #if STDC_HEADERS
13408 #include <stdlib.h>
13409 #include <stddef.h>
13410 #endif
13411 EOF
13412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13413   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13414   rm -rf conftest*
13415   ac_cv_type_pid_t=yes
13416 else
13417   rm -rf conftest*
13418   ac_cv_type_pid_t=no
13419 fi
13420 rm -f conftest*
13421
13422 fi
13423 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
13424 if test $ac_cv_type_pid_t = no; then
13425   cat >> confdefs.h <<\EOF
13426 #define pid_t int
13427 EOF
13428
13429 fi
13430
13431 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13432 echo "configure:13433: checking for ptrdiff_t" >&5
13433 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
13434   echo $ac_n "(cached) $ac_c" 1>&6
13435 else
13436   cat > conftest.$ac_ext <<EOF
13437 #line 13438 "configure"
13438 #include "confdefs.h"
13439 #include <stddef.h>
13440 int main() {
13441 ptrdiff_t p
13442 ; return 0; }
13443 EOF
13444 if { (eval echo configure:13445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13445   rm -rf conftest*
13446   am_cv_type_ptrdiff_t=yes
13447 else
13448   echo "configure: failed program was:" >&5
13449   cat conftest.$ac_ext >&5
13450   rm -rf conftest*
13451   am_cv_type_ptrdiff_t=no
13452 fi
13453 rm -f conftest*
13454 fi
13455
13456 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13457    if test $am_cv_type_ptrdiff_t = yes; then
13458      cat >> confdefs.h <<\EOF
13459 #define HAVE_PTRDIFF_T 1
13460 EOF
13461
13462    fi
13463
13464 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13465 echo "configure:13466: checking return type of signal handlers" >&5
13466 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
13467   echo $ac_n "(cached) $ac_c" 1>&6
13468 else
13469   cat > conftest.$ac_ext <<EOF
13470 #line 13471 "configure"
13471 #include "confdefs.h"
13472 #include <sys/types.h>
13473 #include <signal.h>
13474 #ifdef signal
13475 #undef signal
13476 #endif
13477 #ifdef __cplusplus
13478 extern "C" void (*signal (int, void (*)(int)))(int);
13479 #else
13480 void (*signal ()) ();
13481 #endif
13482
13483 int main() {
13484 int i;
13485 ; return 0; }
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13488   rm -rf conftest*
13489   ac_cv_type_signal=void
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   ac_cv_type_signal=int
13495 fi
13496 rm -f conftest*
13497 fi
13498
13499 echo "$ac_t""$ac_cv_type_signal" 1>&6
13500 cat >> confdefs.h <<EOF
13501 #define RETSIGTYPE $ac_cv_type_signal
13502 EOF
13503
13504
13505 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13506 echo "configure:13507: checking for size_t" >&5
13507 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
13508   echo $ac_n "(cached) $ac_c" 1>&6
13509 else
13510   cat > conftest.$ac_ext <<EOF
13511 #line 13512 "configure"
13512 #include "confdefs.h"
13513 #include <sys/types.h>
13514 #if STDC_HEADERS
13515 #include <stdlib.h>
13516 #include <stddef.h>
13517 #endif
13518 EOF
13519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13520   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13521   rm -rf conftest*
13522   ac_cv_type_size_t=yes
13523 else
13524   rm -rf conftest*
13525   ac_cv_type_size_t=no
13526 fi
13527 rm -f conftest*
13528
13529 fi
13530 echo "$ac_t""$ac_cv_type_size_t" 1>&6
13531 if test $ac_cv_type_size_t = no; then
13532   cat >> confdefs.h <<\EOF
13533 #define size_t unsigned
13534 EOF
13535
13536 fi
13537
13538
13539 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13540 echo "configure:13541: checking for ssize_t" >&5
13541 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
13542   echo $ac_n "(cached) $ac_c" 1>&6
13543 else
13544   cat > conftest.$ac_ext <<EOF
13545 #line 13546 "configure"
13546 #include "confdefs.h"
13547 #include <sys/types.h>
13548 #if STDC_HEADERS
13549 #include <stdlib.h>
13550 #include <stddef.h>
13551 #endif
13552 EOF
13553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13554   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13555   rm -rf conftest*
13556   ac_cv_type_ssize_t=yes
13557 else
13558   rm -rf conftest*
13559   ac_cv_type_ssize_t=no
13560 fi
13561 rm -f conftest*
13562
13563 fi
13564 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
13565 if test $ac_cv_type_ssize_t = no; then
13566   cat >> confdefs.h <<\EOF
13567 #define ssize_t signed int
13568 EOF
13569
13570 fi
13571
13572 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13573 echo "configure:13574: checking for caddr_t" >&5
13574 if eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then
13575   echo $ac_n "(cached) $ac_c" 1>&6
13576 else
13577   cat > conftest.$ac_ext <<EOF
13578 #line 13579 "configure"
13579 #include "confdefs.h"
13580 #include <sys/types.h>
13581 #if STDC_HEADERS
13582 #include <stdlib.h>
13583 #include <stddef.h>
13584 #endif
13585 EOF
13586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13587   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13588   rm -rf conftest*
13589   ac_cv_type_caddr_t=yes
13590 else
13591   rm -rf conftest*
13592   ac_cv_type_caddr_t=no
13593 fi
13594 rm -f conftest*
13595
13596 fi
13597 echo "$ac_t""$ac_cv_type_caddr_t" 1>&6
13598 if test $ac_cv_type_caddr_t = no; then
13599   cat >> confdefs.h <<\EOF
13600 #define caddr_t char *
13601 EOF
13602
13603 fi
13604
13605
13606 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13607 echo "configure:13608: checking for socklen_t" >&5
13608 if eval "test \"`echo '$''{'ol_cv_type_socklen_t'+set}'`\" = set"; then
13609   echo $ac_n "(cached) $ac_c" 1>&6
13610 else
13611   cat > conftest.$ac_ext <<EOF
13612 #line 13613 "configure"
13613 #include "confdefs.h"
13614
13615 #ifdef HAVE_SYS_TYPES_H
13616 #include <sys/types.h>
13617 #endif
13618 #ifdef HAVE_SYS_SOCKET_H
13619 #include <sys/socket.h>
13620 #endif
13621
13622 int main() {
13623 socklen_t len;
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13627   rm -rf conftest*
13628   ol_cv_type_socklen_t=yes
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   ol_cv_type_socklen_t=no
13634 fi
13635 rm -f conftest*
13636 fi
13637
13638 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13639   if test $ol_cv_type_socklen_t = no; then
13640     cat >> confdefs.h <<\EOF
13641 #define socklen_t int
13642 EOF
13643
13644   fi
13645  
13646 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
13647 echo "configure:13648: checking for st_blksize in struct stat" >&5
13648 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
13649   echo $ac_n "(cached) $ac_c" 1>&6
13650 else
13651   cat > conftest.$ac_ext <<EOF
13652 #line 13653 "configure"
13653 #include "confdefs.h"
13654 #include <sys/types.h>
13655 #include <sys/stat.h>
13656 int main() {
13657 struct stat s; s.st_blksize;
13658 ; return 0; }
13659 EOF
13660 if { (eval echo configure:13661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13661   rm -rf conftest*
13662   ac_cv_struct_st_blksize=yes
13663 else
13664   echo "configure: failed program was:" >&5
13665   cat conftest.$ac_ext >&5
13666   rm -rf conftest*
13667   ac_cv_struct_st_blksize=no
13668 fi
13669 rm -f conftest*
13670 fi
13671
13672 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
13673 if test $ac_cv_struct_st_blksize = yes; then
13674   cat >> confdefs.h <<\EOF
13675 #define HAVE_ST_BLKSIZE 1
13676 EOF
13677
13678 fi
13679
13680 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13681 echo "configure:13682: checking whether time.h and sys/time.h may both be included" >&5
13682 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
13683   echo $ac_n "(cached) $ac_c" 1>&6
13684 else
13685   cat > conftest.$ac_ext <<EOF
13686 #line 13687 "configure"
13687 #include "confdefs.h"
13688 #include <sys/types.h>
13689 #include <sys/time.h>
13690 #include <time.h>
13691 int main() {
13692 struct tm *tp;
13693 ; return 0; }
13694 EOF
13695 if { (eval echo configure:13696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13696   rm -rf conftest*
13697   ac_cv_header_time=yes
13698 else
13699   echo "configure: failed program was:" >&5
13700   cat conftest.$ac_ext >&5
13701   rm -rf conftest*
13702   ac_cv_header_time=no
13703 fi
13704 rm -f conftest*
13705 fi
13706
13707 echo "$ac_t""$ac_cv_header_time" 1>&6
13708 if test $ac_cv_header_time = yes; then
13709   cat >> confdefs.h <<\EOF
13710 #define TIME_WITH_SYS_TIME 1
13711 EOF
13712
13713 fi
13714
13715 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13716 echo "configure:13717: checking whether struct tm is in sys/time.h or time.h" >&5
13717 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
13718   echo $ac_n "(cached) $ac_c" 1>&6
13719 else
13720   cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 #include <sys/types.h>
13724 #include <time.h>
13725 int main() {
13726 struct tm *tp; tp->tm_sec;
13727 ; return 0; }
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13730   rm -rf conftest*
13731   ac_cv_struct_tm=time.h
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -rf conftest*
13736   ac_cv_struct_tm=sys/time.h
13737 fi
13738 rm -f conftest*
13739 fi
13740
13741 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13742 if test $ac_cv_struct_tm = sys/time.h; then
13743   cat >> confdefs.h <<\EOF
13744 #define TM_IN_SYS_TIME 1
13745 EOF
13746
13747 fi
13748
13749 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13750 echo "configure:13751: checking for uid_t in sys/types.h" >&5
13751 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
13752   echo $ac_n "(cached) $ac_c" 1>&6
13753 else
13754   cat > conftest.$ac_ext <<EOF
13755 #line 13756 "configure"
13756 #include "confdefs.h"
13757 #include <sys/types.h>
13758 EOF
13759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13760   egrep "uid_t" >/dev/null 2>&1; then
13761   rm -rf conftest*
13762   ac_cv_type_uid_t=yes
13763 else
13764   rm -rf conftest*
13765   ac_cv_type_uid_t=no
13766 fi
13767 rm -f conftest*
13768
13769 fi
13770
13771 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13772 if test $ac_cv_type_uid_t = no; then
13773   cat >> confdefs.h <<\EOF
13774 #define uid_t int
13775 EOF
13776
13777   cat >> confdefs.h <<\EOF
13778 #define gid_t int
13779 EOF
13780
13781 fi
13782
13783 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
13784 echo "configure:13785: checking for sig_atomic_t" >&5
13785 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
13786   echo $ac_n "(cached) $ac_c" 1>&6
13787 else
13788   cat > conftest.$ac_ext <<EOF
13789 #line 13790 "configure"
13790 #include "confdefs.h"
13791 #include <signal.h>
13792 int main() {
13793 sig_atomic_t atomic;
13794 ; return 0; }
13795 EOF
13796 if { (eval echo configure:13797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13797   rm -rf conftest*
13798   ol_cv_type_sig_atomic_t=yes
13799 else
13800   echo "configure: failed program was:" >&5
13801   cat conftest.$ac_ext >&5
13802   rm -rf conftest*
13803   ol_cv_type_sig_atomic_t=no
13804 fi
13805 rm -f conftest*
13806 fi
13807
13808 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13809   if test $ol_cv_type_sig_atomic_t = no; then
13810     cat >> confdefs.h <<\EOF
13811 #define sig_atomic_t int
13812 EOF
13813
13814   fi
13815  
13816
13817
13818 # test for pw_gecos in struct passwd
13819 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13820 echo "configure:13821: checking struct passwd for pw_gecos" >&5
13821 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
13822   echo $ac_n "(cached) $ac_c" 1>&6
13823 else
13824   
13825         cat > conftest.$ac_ext <<EOF
13826 #line 13827 "configure"
13827 #include "confdefs.h"
13828 #include <pwd.h>
13829 int main() {
13830
13831         struct passwd pwd;
13832         pwd.pw_gecos = pwd.pw_name;
13833
13834 ; return 0; }
13835 EOF
13836 if { (eval echo configure:13837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13837   rm -rf conftest*
13838   ol_cv_struct_passwd_pw_gecos=yes
13839 else
13840   echo "configure: failed program was:" >&5
13841   cat conftest.$ac_ext >&5
13842   rm -rf conftest*
13843   ol_cv_struct_passwd_pw_gecos=no
13844 fi
13845 rm -f conftest*
13846 fi
13847
13848 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13849 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13850         cat >> confdefs.h <<\EOF
13851 #define HAVE_PW_GECOS 1
13852 EOF
13853
13854 fi
13855
13856 # test for pw_passwd in struct passwd
13857 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13858 echo "configure:13859: checking struct passwd for pw_passwd" >&5
13859 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
13860   echo $ac_n "(cached) $ac_c" 1>&6
13861 else
13862   
13863         cat > conftest.$ac_ext <<EOF
13864 #line 13865 "configure"
13865 #include "confdefs.h"
13866 #include <pwd.h>
13867 int main() {
13868
13869         struct passwd pwd;
13870         pwd.pw_passwd = pwd.pw_name;
13871
13872 ; return 0; }
13873 EOF
13874 if { (eval echo configure:13875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13875   rm -rf conftest*
13876   ol_cv_struct_passwd_pw_passwd=yes
13877 else
13878   echo "configure: failed program was:" >&5
13879   cat conftest.$ac_ext >&5
13880   rm -rf conftest*
13881   ol_cv_struct_passwd_pw_passwd=no
13882 fi
13883 rm -f conftest*
13884 fi
13885
13886 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13887 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13888         cat >> confdefs.h <<\EOF
13889 #define HAVE_PW_PASSWD 1
13890 EOF
13891
13892 fi
13893
13894
13895 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13896 echo "configure:13897: checking if toupper() requires islower()" >&5
13897 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
13898   echo $ac_n "(cached) $ac_c" 1>&6
13899 else
13900   
13901         if test "$cross_compiling" = yes; then
13902   ol_cv_c_upper_lower=safe
13903 else
13904   cat > conftest.$ac_ext <<EOF
13905 #line 13906 "configure"
13906 #include "confdefs.h"
13907
13908 #include <ctype.h>
13909 main()
13910 {
13911         if ('C' == toupper('C'))
13912                 exit(0);
13913         else
13914                 exit(1);
13915 }
13916 EOF
13917 if { (eval echo configure:13918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13918 then
13919   ol_cv_c_upper_lower=no
13920 else
13921   echo "configure: failed program was:" >&5
13922   cat conftest.$ac_ext >&5
13923   rm -fr conftest*
13924   ol_cv_c_upper_lower=yes
13925 fi
13926 rm -fr conftest*
13927 fi
13928
13929 fi
13930
13931 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13932 if test $ol_cv_c_upper_lower != no ; then
13933         cat >> confdefs.h <<\EOF
13934 #define C_UPPER_LOWER 1
13935 EOF
13936
13937 fi
13938
13939 echo $ac_n "checking for working const""... $ac_c" 1>&6
13940 echo "configure:13941: checking for working const" >&5
13941 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
13942   echo $ac_n "(cached) $ac_c" 1>&6
13943 else
13944   cat > conftest.$ac_ext <<EOF
13945 #line 13946 "configure"
13946 #include "confdefs.h"
13947
13948 int main() {
13949
13950 /* Ultrix mips cc rejects this.  */
13951 typedef int charset[2]; const charset x;
13952 /* SunOS 4.1.1 cc rejects this.  */
13953 char const *const *ccp;
13954 char **p;
13955 /* NEC SVR4.0.2 mips cc rejects this.  */
13956 struct point {int x, y;};
13957 static struct point const zero = {0,0};
13958 /* AIX XL C 1.02.0.0 rejects this.
13959    It does not let you subtract one const X* pointer from another in an arm
13960    of an if-expression whose if-part is not a constant expression */
13961 const char *g = "string";
13962 ccp = &g + (g ? g-g : 0);
13963 /* HPUX 7.0 cc rejects these. */
13964 ++ccp;
13965 p = (char**) ccp;
13966 ccp = (char const *const *) p;
13967 { /* SCO 3.2v4 cc rejects this.  */
13968   char *t;
13969   char const *s = 0 ? (char *) 0 : (char const *) 0;
13970
13971   *t++ = 0;
13972 }
13973 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13974   int x[] = {25, 17};
13975   const int *foo = &x[0];
13976   ++foo;
13977 }
13978 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13979   typedef const int *iptr;
13980   iptr p = 0;
13981   ++p;
13982 }
13983 { /* AIX XL C 1.02.0.0 rejects this saying
13984      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13985   struct s { int j; const int *ap[3]; };
13986   struct s *b; b->j = 5;
13987 }
13988 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13989   const int foo = 10;
13990 }
13991
13992 ; return 0; }
13993 EOF
13994 if { (eval echo configure:13995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13995   rm -rf conftest*
13996   ac_cv_c_const=yes
13997 else
13998   echo "configure: failed program was:" >&5
13999   cat conftest.$ac_ext >&5
14000   rm -rf conftest*
14001   ac_cv_c_const=no
14002 fi
14003 rm -f conftest*
14004 fi
14005
14006 echo "$ac_t""$ac_cv_c_const" 1>&6
14007 if test $ac_cv_c_const = no; then
14008   cat >> confdefs.h <<\EOF
14009 #define const 
14010 EOF
14011
14012 fi
14013
14014 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14015 echo "configure:14016: checking if compiler understands volatile" >&5
14016 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
14017   echo $ac_n "(cached) $ac_c" 1>&6
14018 else
14019   cat > conftest.$ac_ext <<EOF
14020 #line 14021 "configure"
14021 #include "confdefs.h"
14022 int x, y, z;
14023 int main() {
14024 volatile int a; int * volatile b = x ? &y : &z;
14025       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14026       *b = 0;
14027 ; return 0; }
14028 EOF
14029 if { (eval echo configure:14030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14030   rm -rf conftest*
14031   ol_cv_c_volatile=yes
14032 else
14033   echo "configure: failed program was:" >&5
14034   cat conftest.$ac_ext >&5
14035   rm -rf conftest*
14036   ol_cv_c_volatile=no
14037 fi
14038 rm -f conftest*
14039 fi
14040
14041 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14042   if test $ol_cv_c_volatile = yes; then
14043     : 
14044   else
14045     cat >> confdefs.h <<\EOF
14046 #define volatile 
14047 EOF
14048
14049   fi
14050  
14051
14052 if test $cross_compiling = yes ; then
14053         cat >> confdefs.h <<\EOF
14054 #define CROSS_COMPILING 1
14055 EOF
14056
14057 else
14058         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14059 echo "configure:14060: checking whether byte ordering is bigendian" >&5
14060 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
14061   echo $ac_n "(cached) $ac_c" 1>&6
14062 else
14063   ac_cv_c_bigendian=unknown
14064 # See if sys/param.h defines the BYTE_ORDER macro.
14065 cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 #include <sys/types.h>
14069 #include <sys/param.h>
14070 int main() {
14071
14072 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14073  bogus endian macros
14074 #endif
14075 ; return 0; }
14076 EOF
14077 if { (eval echo configure:14078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14078   rm -rf conftest*
14079   # It does; now see whether it defined to BIG_ENDIAN or not.
14080 cat > conftest.$ac_ext <<EOF
14081 #line 14082 "configure"
14082 #include "confdefs.h"
14083 #include <sys/types.h>
14084 #include <sys/param.h>
14085 int main() {
14086
14087 #if BYTE_ORDER != BIG_ENDIAN
14088  not big endian
14089 #endif
14090 ; return 0; }
14091 EOF
14092 if { (eval echo configure:14093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14093   rm -rf conftest*
14094   ac_cv_c_bigendian=yes
14095 else
14096   echo "configure: failed program was:" >&5
14097   cat conftest.$ac_ext >&5
14098   rm -rf conftest*
14099   ac_cv_c_bigendian=no
14100 fi
14101 rm -f conftest*
14102 else
14103   echo "configure: failed program was:" >&5
14104   cat conftest.$ac_ext >&5
14105 fi
14106 rm -f conftest*
14107 if test $ac_cv_c_bigendian = unknown; then
14108 if test "$cross_compiling" = yes; then
14109     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14110 else
14111   cat > conftest.$ac_ext <<EOF
14112 #line 14113 "configure"
14113 #include "confdefs.h"
14114 main () {
14115   /* Are we little or big endian?  From Harbison&Steele.  */
14116   union
14117   {
14118     long l;
14119     char c[sizeof (long)];
14120   } u;
14121   u.l = 1;
14122   exit (u.c[sizeof (long) - 1] == 1);
14123 }
14124 EOF
14125 if { (eval echo configure:14126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14126 then
14127   ac_cv_c_bigendian=no
14128 else
14129   echo "configure: failed program was:" >&5
14130   cat conftest.$ac_ext >&5
14131   rm -fr conftest*
14132   ac_cv_c_bigendian=yes
14133 fi
14134 rm -fr conftest*
14135 fi
14136
14137 fi
14138 fi
14139
14140 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14141 if test $ac_cv_c_bigendian = yes; then
14142   cat >> confdefs.h <<\EOF
14143 #define WORDS_BIGENDIAN 1
14144 EOF
14145
14146 fi
14147
14148 fi
14149
14150 echo $ac_n "checking size of short""... $ac_c" 1>&6
14151 echo "configure:14152: checking size of short" >&5 
14152 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
14153   echo $ac_n "(cached) $ac_c" 1>&6
14154 else
14155   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14156   cat > conftest.$ac_ext <<EOF
14157 #line 14158 "configure"
14158 #include "confdefs.h"
14159 #include "confdefs.h" 
14160 #include <sys/types.h> 
14161  
14162
14163 int main() {
14164 switch (0) case 0: case (sizeof (short) == $ac_size):;
14165 ; return 0; }
14166 EOF
14167 if { (eval echo configure:14168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14168   rm -rf conftest*
14169   ac_cv_sizeof_short=$ac_size
14170 else
14171   echo "configure: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173 fi
14174 rm -f conftest* 
14175   if test x$ac_cv_sizeof_short != x ; then break; fi 
14176 done 
14177
14178 fi
14179  
14180 if test x$ac_cv_sizeof_short = x ; then 
14181   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14182 fi 
14183 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14184 cat >> confdefs.h <<EOF
14185 #define SIZEOF_SHORT $ac_cv_sizeof_short
14186 EOF
14187  
14188  
14189 echo $ac_n "checking size of int""... $ac_c" 1>&6
14190 echo "configure:14191: checking size of int" >&5 
14191 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
14192   echo $ac_n "(cached) $ac_c" 1>&6
14193 else
14194   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14195   cat > conftest.$ac_ext <<EOF
14196 #line 14197 "configure"
14197 #include "confdefs.h"
14198 #include "confdefs.h" 
14199 #include <sys/types.h> 
14200  
14201
14202 int main() {
14203 switch (0) case 0: case (sizeof (int) == $ac_size):;
14204 ; return 0; }
14205 EOF
14206 if { (eval echo configure:14207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14207   rm -rf conftest*
14208   ac_cv_sizeof_int=$ac_size
14209 else
14210   echo "configure: failed program was:" >&5
14211   cat conftest.$ac_ext >&5
14212 fi
14213 rm -f conftest* 
14214   if test x$ac_cv_sizeof_int != x ; then break; fi 
14215 done 
14216
14217 fi
14218  
14219 if test x$ac_cv_sizeof_int = x ; then 
14220   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14221 fi 
14222 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14223 cat >> confdefs.h <<EOF
14224 #define SIZEOF_INT $ac_cv_sizeof_int
14225 EOF
14226  
14227  
14228 echo $ac_n "checking size of long""... $ac_c" 1>&6
14229 echo "configure:14230: checking size of long" >&5 
14230 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
14231   echo $ac_n "(cached) $ac_c" 1>&6
14232 else
14233   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14234   cat > conftest.$ac_ext <<EOF
14235 #line 14236 "configure"
14236 #include "confdefs.h"
14237 #include "confdefs.h" 
14238 #include <sys/types.h> 
14239  
14240
14241 int main() {
14242 switch (0) case 0: case (sizeof (long) == $ac_size):;
14243 ; return 0; }
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14246   rm -rf conftest*
14247   ac_cv_sizeof_long=$ac_size
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251 fi
14252 rm -f conftest* 
14253   if test x$ac_cv_sizeof_long != x ; then break; fi 
14254 done 
14255
14256 fi
14257  
14258 if test x$ac_cv_sizeof_long = x ; then 
14259   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14260 fi 
14261 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14262 cat >> confdefs.h <<EOF
14263 #define SIZEOF_LONG $ac_cv_sizeof_long
14264 EOF
14265  
14266
14267
14268 if test "$ac_cv_sizeof_int" -lt 4 ; then
14269         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14270
14271         cat >> confdefs.h <<\EOF
14272 #define LBER_INT_T long
14273 EOF
14274
14275 else
14276         cat >> confdefs.h <<\EOF
14277 #define LBER_INT_T int
14278 EOF
14279
14280 fi
14281
14282 cat >> confdefs.h <<\EOF
14283 #define LBER_LEN_T long
14284 EOF
14285
14286 cat >> confdefs.h <<\EOF
14287 #define LBER_SOCKET_T int
14288 EOF
14289
14290 cat >> confdefs.h <<\EOF
14291 #define LBER_TAG_T long
14292 EOF
14293
14294
14295 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14296 echo "configure:14297: checking for 8-bit clean memcmp" >&5
14297 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
14298   echo $ac_n "(cached) $ac_c" 1>&6
14299 else
14300   if test "$cross_compiling" = yes; then
14301   ac_cv_func_memcmp_clean=no
14302 else
14303   cat > conftest.$ac_ext <<EOF
14304 #line 14305 "configure"
14305 #include "confdefs.h"
14306
14307 main()
14308 {
14309   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14310   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14311 }
14312
14313 EOF
14314 if { (eval echo configure:14315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14315 then
14316   ac_cv_func_memcmp_clean=yes
14317 else
14318   echo "configure: failed program was:" >&5
14319   cat conftest.$ac_ext >&5
14320   rm -fr conftest*
14321   ac_cv_func_memcmp_clean=no
14322 fi
14323 rm -fr conftest*
14324 fi
14325
14326 fi
14327
14328 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14329 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14330
14331 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14332 echo "configure:14333: checking for strftime" >&5
14333 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
14334   echo $ac_n "(cached) $ac_c" 1>&6
14335 else
14336   cat > conftest.$ac_ext <<EOF
14337 #line 14338 "configure"
14338 #include "confdefs.h"
14339 /* System header to define __stub macros and hopefully few prototypes,
14340     which can conflict with char strftime(); below.  */
14341 #include <assert.h>
14342 /* Override any gcc2 internal prototype to avoid an error.  */
14343 /* We use char because int might match the return type of a gcc2
14344     builtin and then its argument prototype would still apply.  */
14345 char strftime();
14346
14347 int main() {
14348
14349 /* The GNU C library defines this for functions which it implements
14350     to always fail with ENOSYS.  Some functions are actually named
14351     something starting with __ and the normal name is an alias.  */
14352 #if defined (__stub_strftime) || defined (__stub___strftime)
14353 choke me
14354 #else
14355 strftime();
14356 #endif
14357
14358 ; return 0; }
14359 EOF
14360 if { (eval echo configure:14361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14361   rm -rf conftest*
14362   eval "ac_cv_func_strftime=yes"
14363 else
14364   echo "configure: failed program was:" >&5
14365   cat conftest.$ac_ext >&5
14366   rm -rf conftest*
14367   eval "ac_cv_func_strftime=no"
14368 fi
14369 rm -f conftest*
14370 fi
14371
14372 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14373   echo "$ac_t""yes" 1>&6
14374   cat >> confdefs.h <<\EOF
14375 #define HAVE_STRFTIME 1
14376 EOF
14377
14378 else
14379   echo "$ac_t""no" 1>&6
14380 # strftime is in -lintl on SCO UNIX.
14381 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14382 echo "configure:14383: checking for strftime in -lintl" >&5
14383 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
14384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14385   echo $ac_n "(cached) $ac_c" 1>&6
14386 else
14387   ac_save_LIBS="$LIBS"
14388 LIBS="-lintl  $LIBS"
14389 cat > conftest.$ac_ext <<EOF
14390 #line 14391 "configure"
14391 #include "confdefs.h"
14392 /* Override any gcc2 internal prototype to avoid an error.  */
14393 /* We use char because int might match the return type of a gcc2
14394     builtin and then its argument prototype would still apply.  */
14395 char strftime();
14396
14397 int main() {
14398 strftime()
14399 ; return 0; }
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14402   rm -rf conftest*
14403   eval "ac_cv_lib_$ac_lib_var=yes"
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407   rm -rf conftest*
14408   eval "ac_cv_lib_$ac_lib_var=no"
14409 fi
14410 rm -f conftest*
14411 LIBS="$ac_save_LIBS"
14412
14413 fi
14414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14415   echo "$ac_t""yes" 1>&6
14416   cat >> confdefs.h <<\EOF
14417 #define HAVE_STRFTIME 1
14418 EOF
14419
14420 LIBS="-lintl $LIBS"
14421 else
14422   echo "$ac_t""no" 1>&6
14423 fi
14424
14425 fi
14426
14427
14428 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14429 echo "configure:14430: checking for inet_aton()" >&5
14430 if eval "test \"`echo '$''{'ol_cv_func_inet_aton'+set}'`\" = set"; then
14431   echo $ac_n "(cached) $ac_c" 1>&6
14432 else
14433   cat > conftest.$ac_ext <<EOF
14434 #line 14435 "configure"
14435 #include "confdefs.h"
14436
14437 #ifdef HAVE_SYS_TYPES_H
14438 #       include <sys/types.h>
14439 #endif
14440 #ifdef HAVE_SYS_SOCKET_H
14441 #       include <sys/socket.h>
14442 #       ifdef HAVE_SYS_SELECT_H
14443 #               include <sys/select.h>
14444 #       endif
14445 #       include <netinet/in.h>
14446 #       ifdef HAVE_ARPA_INET_H
14447 #               include <arpa/inet.h>
14448 #       endif
14449 #endif
14450
14451 int main() {
14452 struct in_addr in;
14453 int rc = inet_aton( "255.255.255.255", &in );
14454 ; return 0; }
14455 EOF
14456 if { (eval echo configure:14457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14457   rm -rf conftest*
14458   ol_cv_func_inet_aton=yes
14459 else
14460   echo "configure: failed program was:" >&5
14461   cat conftest.$ac_ext >&5
14462   rm -rf conftest*
14463   ol_cv_func_inet_aton=no
14464 fi
14465 rm -f conftest*
14466 fi
14467
14468 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14469   if test $ol_cv_func_inet_aton != no; then
14470     cat >> confdefs.h <<\EOF
14471 #define HAVE_INET_ATON 1
14472 EOF
14473
14474   fi
14475  
14476
14477 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14478 echo "configure:14479: checking for _spawnlp" >&5
14479 if eval "test \"`echo '$''{'ac_cv_func__spawnlp'+set}'`\" = set"; then
14480   echo $ac_n "(cached) $ac_c" 1>&6
14481 else
14482   cat > conftest.$ac_ext <<EOF
14483 #line 14484 "configure"
14484 #include "confdefs.h"
14485 /* System header to define __stub macros and hopefully few prototypes,
14486     which can conflict with char _spawnlp(); below.  */
14487 #include <assert.h>
14488 /* Override any gcc2 internal prototype to avoid an error.  */
14489 /* We use char because int might match the return type of a gcc2
14490     builtin and then its argument prototype would still apply.  */
14491 char _spawnlp();
14492
14493 int main() {
14494
14495 /* The GNU C library defines this for functions which it implements
14496     to always fail with ENOSYS.  Some functions are actually named
14497     something starting with __ and the normal name is an alias.  */
14498 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14499 choke me
14500 #else
14501 _spawnlp();
14502 #endif
14503
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14507   rm -rf conftest*
14508   eval "ac_cv_func__spawnlp=yes"
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -rf conftest*
14513   eval "ac_cv_func__spawnlp=no"
14514 fi
14515 rm -f conftest*
14516 fi
14517
14518 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14519   echo "$ac_t""yes" 1>&6
14520   cat >> confdefs.h <<\EOF
14521 #define HAVE_SPAWNLP 1
14522 EOF
14523
14524 else
14525   echo "$ac_t""no" 1>&6
14526 fi
14527
14528
14529 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14530 echo "configure:14531: checking for _snprintf" >&5
14531 if eval "test \"`echo '$''{'ac_cv_func__snprintf'+set}'`\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   cat > conftest.$ac_ext <<EOF
14535 #line 14536 "configure"
14536 #include "confdefs.h"
14537 /* System header to define __stub macros and hopefully few prototypes,
14538     which can conflict with char _snprintf(); below.  */
14539 #include <assert.h>
14540 /* Override any gcc2 internal prototype to avoid an error.  */
14541 /* We use char because int might match the return type of a gcc2
14542     builtin and then its argument prototype would still apply.  */
14543 char _snprintf();
14544
14545 int main() {
14546
14547 /* The GNU C library defines this for functions which it implements
14548     to always fail with ENOSYS.  Some functions are actually named
14549     something starting with __ and the normal name is an alias.  */
14550 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14551 choke me
14552 #else
14553 _snprintf();
14554 #endif
14555
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14559   rm -rf conftest*
14560   eval "ac_cv_func__snprintf=yes"
14561 else
14562   echo "configure: failed program was:" >&5
14563   cat conftest.$ac_ext >&5
14564   rm -rf conftest*
14565   eval "ac_cv_func__snprintf=no"
14566 fi
14567 rm -f conftest*
14568 fi
14569
14570 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14571   echo "$ac_t""yes" 1>&6
14572   ac_cv_func_snprintf=yes
14573         cat >> confdefs.h <<\EOF
14574 #define snprintf _snprintf
14575 EOF
14576
14577
14578 else
14579   echo "$ac_t""no" 1>&6
14580 fi
14581
14582
14583 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14584 echo "configure:14585: checking for _vsnprintf" >&5
14585 if eval "test \"`echo '$''{'ac_cv_func__vsnprintf'+set}'`\" = set"; then
14586   echo $ac_n "(cached) $ac_c" 1>&6
14587 else
14588   cat > conftest.$ac_ext <<EOF
14589 #line 14590 "configure"
14590 #include "confdefs.h"
14591 /* System header to define __stub macros and hopefully few prototypes,
14592     which can conflict with char _vsnprintf(); below.  */
14593 #include <assert.h>
14594 /* Override any gcc2 internal prototype to avoid an error.  */
14595 /* We use char because int might match the return type of a gcc2
14596     builtin and then its argument prototype would still apply.  */
14597 char _vsnprintf();
14598
14599 int main() {
14600
14601 /* The GNU C library defines this for functions which it implements
14602     to always fail with ENOSYS.  Some functions are actually named
14603     something starting with __ and the normal name is an alias.  */
14604 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14605 choke me
14606 #else
14607 _vsnprintf();
14608 #endif
14609
14610 ; return 0; }
14611 EOF
14612 if { (eval echo configure:14613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14613   rm -rf conftest*
14614   eval "ac_cv_func__vsnprintf=yes"
14615 else
14616   echo "configure: failed program was:" >&5
14617   cat conftest.$ac_ext >&5
14618   rm -rf conftest*
14619   eval "ac_cv_func__vsnprintf=no"
14620 fi
14621 rm -f conftest*
14622 fi
14623
14624 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14625   echo "$ac_t""yes" 1>&6
14626   ac_cv_func_vsnprintf=yes
14627         cat >> confdefs.h <<\EOF
14628 #define vsnprintf _vsnprintf
14629 EOF
14630
14631
14632 else
14633   echo "$ac_t""no" 1>&6
14634 fi
14635
14636
14637 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14638 echo "configure:14639: checking for vprintf" >&5
14639 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
14640   echo $ac_n "(cached) $ac_c" 1>&6
14641 else
14642   cat > conftest.$ac_ext <<EOF
14643 #line 14644 "configure"
14644 #include "confdefs.h"
14645 /* System header to define __stub macros and hopefully few prototypes,
14646     which can conflict with char vprintf(); below.  */
14647 #include <assert.h>
14648 /* Override any gcc2 internal prototype to avoid an error.  */
14649 /* We use char because int might match the return type of a gcc2
14650     builtin and then its argument prototype would still apply.  */
14651 char vprintf();
14652
14653 int main() {
14654
14655 /* The GNU C library defines this for functions which it implements
14656     to always fail with ENOSYS.  Some functions are actually named
14657     something starting with __ and the normal name is an alias.  */
14658 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14659 choke me
14660 #else
14661 vprintf();
14662 #endif
14663
14664 ; return 0; }
14665 EOF
14666 if { (eval echo configure:14667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14667   rm -rf conftest*
14668   eval "ac_cv_func_vprintf=yes"
14669 else
14670   echo "configure: failed program was:" >&5
14671   cat conftest.$ac_ext >&5
14672   rm -rf conftest*
14673   eval "ac_cv_func_vprintf=no"
14674 fi
14675 rm -f conftest*
14676 fi
14677
14678 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14679   echo "$ac_t""yes" 1>&6
14680   cat >> confdefs.h <<\EOF
14681 #define HAVE_VPRINTF 1
14682 EOF
14683
14684 else
14685   echo "$ac_t""no" 1>&6
14686 fi
14687
14688 if test "$ac_cv_func_vprintf" != yes; then
14689 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14690 echo "configure:14691: checking for _doprnt" >&5
14691 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
14692   echo $ac_n "(cached) $ac_c" 1>&6
14693 else
14694   cat > conftest.$ac_ext <<EOF
14695 #line 14696 "configure"
14696 #include "confdefs.h"
14697 /* System header to define __stub macros and hopefully few prototypes,
14698     which can conflict with char _doprnt(); below.  */
14699 #include <assert.h>
14700 /* Override any gcc2 internal prototype to avoid an error.  */
14701 /* We use char because int might match the return type of a gcc2
14702     builtin and then its argument prototype would still apply.  */
14703 char _doprnt();
14704
14705 int main() {
14706
14707 /* The GNU C library defines this for functions which it implements
14708     to always fail with ENOSYS.  Some functions are actually named
14709     something starting with __ and the normal name is an alias.  */
14710 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14711 choke me
14712 #else
14713 _doprnt();
14714 #endif
14715
14716 ; return 0; }
14717 EOF
14718 if { (eval echo configure:14719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14719   rm -rf conftest*
14720   eval "ac_cv_func__doprnt=yes"
14721 else
14722   echo "configure: failed program was:" >&5
14723   cat conftest.$ac_ext >&5
14724   rm -rf conftest*
14725   eval "ac_cv_func__doprnt=no"
14726 fi
14727 rm -f conftest*
14728 fi
14729
14730 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14731   echo "$ac_t""yes" 1>&6
14732   cat >> confdefs.h <<\EOF
14733 #define HAVE_DOPRNT 1
14734 EOF
14735
14736 else
14737   echo "$ac_t""no" 1>&6
14738 fi
14739
14740 fi
14741
14742
14743 if test $ac_cv_func_vprintf = yes ; then
14744                 for ac_func in vsnprintf vsprintf
14745 do
14746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14747 echo "configure:14748: checking for $ac_func" >&5
14748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14749   echo $ac_n "(cached) $ac_c" 1>&6
14750 else
14751   cat > conftest.$ac_ext <<EOF
14752 #line 14753 "configure"
14753 #include "confdefs.h"
14754 /* System header to define __stub macros and hopefully few prototypes,
14755     which can conflict with char $ac_func(); below.  */
14756 #include <assert.h>
14757 /* Override any gcc2 internal prototype to avoid an error.  */
14758 /* We use char because int might match the return type of a gcc2
14759     builtin and then its argument prototype would still apply.  */
14760 char $ac_func();
14761
14762 int main() {
14763
14764 /* The GNU C library defines this for functions which it implements
14765     to always fail with ENOSYS.  Some functions are actually named
14766     something starting with __ and the normal name is an alias.  */
14767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14768 choke me
14769 #else
14770 $ac_func();
14771 #endif
14772
14773 ; return 0; }
14774 EOF
14775 if { (eval echo configure:14776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14776   rm -rf conftest*
14777   eval "ac_cv_func_$ac_func=yes"
14778 else
14779   echo "configure: failed program was:" >&5
14780   cat conftest.$ac_ext >&5
14781   rm -rf conftest*
14782   eval "ac_cv_func_$ac_func=no"
14783 fi
14784 rm -f conftest*
14785 fi
14786
14787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14788   echo "$ac_t""yes" 1>&6
14789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14790   cat >> confdefs.h <<EOF
14791 #define $ac_tr_func 1
14792 EOF
14793  
14794 else
14795   echo "$ac_t""no" 1>&6
14796 fi
14797 done
14798
14799 fi
14800
14801 for ac_func in \
14802         bcopy                   \
14803         closesocket             \
14804         endgrent                \
14805         endpwent                \
14806         flock                   \
14807         getdtablesize   \
14808         getgrgid                \
14809         gethostname             \
14810         getpass                 \
14811         getpwuid                \
14812         getpwnam                \
14813         getspnam                \
14814         gettimeofday    \
14815         initgroups              \
14816         lockf                   \
14817         memcpy                  \
14818         memmove                 \
14819         mkstemp                 \
14820         pipe                    \
14821         read                    \
14822         recv                    \
14823         recvfrom                \
14824         setpwfile               \
14825         setgid                  \
14826         setegid                 \
14827         setsid                  \
14828         setuid                  \
14829         seteuid                 \
14830         sigaction               \
14831         signal                  \
14832         sigset                  \
14833         snprintf                \
14834         strdup                  \
14835         strerror                \
14836         strpbrk                 \
14837         strrchr                 \
14838         strsep                  \
14839         strstr                  \
14840         strtol                  \
14841         strtoul                 \
14842         strspn                  \
14843         sysconf                 \
14844         waitpid                 \
14845         wait4                   \
14846         write                   \
14847         send                    \
14848         sendto                  \
14849
14850 do
14851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14852 echo "configure:14853: checking for $ac_func" >&5
14853 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14854   echo $ac_n "(cached) $ac_c" 1>&6
14855 else
14856   cat > conftest.$ac_ext <<EOF
14857 #line 14858 "configure"
14858 #include "confdefs.h"
14859 /* System header to define __stub macros and hopefully few prototypes,
14860     which can conflict with char $ac_func(); below.  */
14861 #include <assert.h>
14862 /* Override any gcc2 internal prototype to avoid an error.  */
14863 /* We use char because int might match the return type of a gcc2
14864     builtin and then its argument prototype would still apply.  */
14865 char $ac_func();
14866
14867 int main() {
14868
14869 /* The GNU C library defines this for functions which it implements
14870     to always fail with ENOSYS.  Some functions are actually named
14871     something starting with __ and the normal name is an alias.  */
14872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14873 choke me
14874 #else
14875 $ac_func();
14876 #endif
14877
14878 ; return 0; }
14879 EOF
14880 if { (eval echo configure:14881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14881   rm -rf conftest*
14882   eval "ac_cv_func_$ac_func=yes"
14883 else
14884   echo "configure: failed program was:" >&5
14885   cat conftest.$ac_ext >&5
14886   rm -rf conftest*
14887   eval "ac_cv_func_$ac_func=no"
14888 fi
14889 rm -f conftest*
14890 fi
14891
14892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14893   echo "$ac_t""yes" 1>&6
14894     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14895   cat >> confdefs.h <<EOF
14896 #define $ac_tr_func 1
14897 EOF
14898  
14899 else
14900   echo "$ac_t""no" 1>&6
14901 fi
14902 done
14903
14904
14905 for ac_func in getopt tempnam
14906 do
14907 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14908 echo "configure:14909: checking for $ac_func" >&5
14909 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14910   echo $ac_n "(cached) $ac_c" 1>&6
14911 else
14912   cat > conftest.$ac_ext <<EOF
14913 #line 14914 "configure"
14914 #include "confdefs.h"
14915 /* System header to define __stub macros and hopefully few prototypes,
14916     which can conflict with char $ac_func(); below.  */
14917 #include <assert.h>
14918 /* Override any gcc2 internal prototype to avoid an error.  */
14919 /* We use char because int might match the return type of a gcc2
14920     builtin and then its argument prototype would still apply.  */
14921 char $ac_func();
14922
14923 int main() {
14924
14925 /* The GNU C library defines this for functions which it implements
14926     to always fail with ENOSYS.  Some functions are actually named
14927     something starting with __ and the normal name is an alias.  */
14928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14929 choke me
14930 #else
14931 $ac_func();
14932 #endif
14933
14934 ; return 0; }
14935 EOF
14936 if { (eval echo configure:14937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14937   rm -rf conftest*
14938   eval "ac_cv_func_$ac_func=yes"
14939 else
14940   echo "configure: failed program was:" >&5
14941   cat conftest.$ac_ext >&5
14942   rm -rf conftest*
14943   eval "ac_cv_func_$ac_func=no"
14944 fi
14945 rm -f conftest*
14946 fi
14947
14948 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14949   echo "$ac_t""yes" 1>&6
14950     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14951   cat >> confdefs.h <<EOF
14952 #define $ac_tr_func 1
14953 EOF
14954  
14955 else
14956   echo "$ac_t""no" 1>&6
14957 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14958 fi
14959 done
14960
14961
14962
14963 if test "$ac_cv_func_getopt" != yes; then
14964     LIBSRCS="$LIBSRCS getopt.c"
14965 fi
14966
14967 if test "$ac_cv_func_tempnam" != yes; then
14968     LIBSRCS="$LIBSRCS tempnam.c"
14969 fi
14970
14971 # Check Configuration
14972 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14973 echo "configure:14974: checking declaration of sys_errlist" >&5
14974 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
14975   echo $ac_n "(cached) $ac_c" 1>&6
14976 else
14977   
14978         cat > conftest.$ac_ext <<EOF
14979 #line 14980 "configure"
14980 #include "confdefs.h"
14981
14982 #include <stdio.h>
14983 #include <sys/types.h>
14984 #include <errno.h>
14985 #ifdef WINNT
14986 #include <stdlib.h>
14987 #endif 
14988 int main() {
14989 char *c = (char *) *sys_errlist
14990 ; return 0; }
14991 EOF
14992 if { (eval echo configure:14993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14993   rm -rf conftest*
14994   ol_cv_dcl_sys_errlist=yes
14995         ol_cv_have_sys_errlist=yes
14996 else
14997   echo "configure: failed program was:" >&5
14998   cat conftest.$ac_ext >&5
14999   rm -rf conftest*
15000   ol_cv_dcl_sys_errlist=no
15001 fi
15002 rm -f conftest*
15003 fi
15004
15005 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15006 #
15007 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15008 if test $ol_cv_dcl_sys_errlist = no ; then
15009         cat >> confdefs.h <<\EOF
15010 #define DECL_SYS_ERRLIST 1
15011 EOF
15012
15013
15014         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15015 echo "configure:15016: checking existence of sys_errlist" >&5
15016 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
15017   echo $ac_n "(cached) $ac_c" 1>&6
15018 else
15019   
15020                 cat > conftest.$ac_ext <<EOF
15021 #line 15022 "configure"
15022 #include "confdefs.h"
15023 #include <errno.h>
15024 int main() {
15025 char *c = (char *) *sys_errlist
15026 ; return 0; }
15027 EOF
15028 if { (eval echo configure:15029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15029   rm -rf conftest*
15030   ol_cv_have_sys_errlist=yes
15031 else
15032   echo "configure: failed program was:" >&5
15033   cat conftest.$ac_ext >&5
15034   rm -rf conftest*
15035   ol_cv_have_sys_errlist=no
15036 fi
15037 rm -f conftest*
15038 fi
15039
15040 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15041 fi
15042 if test $ol_cv_have_sys_errlist = yes ; then
15043         cat >> confdefs.h <<\EOF
15044 #define HAVE_SYS_ERRLIST 1
15045 EOF
15046
15047 fi
15048
15049
15050
15051 if test "$ol_enable_debug" != no ; then
15052         cat >> confdefs.h <<\EOF
15053 #define LDAP_DEBUG 1
15054 EOF
15055
15056 fi
15057 if test "$ol_enable_syslog" = yes ; then
15058         cat >> confdefs.h <<\EOF
15059 #define LDAP_SYSLOG 1
15060 EOF
15061
15062 fi
15063 if test "$ol_enable_libui" = yes ; then
15064         cat >> confdefs.h <<\EOF
15065 #define LDAP_LIBUI 1
15066 EOF
15067
15068 fi
15069 if test "$ol_enable_cache" = no ; then
15070         cat >> confdefs.h <<\EOF
15071 #define LDAP_NOCACHE 1
15072 EOF
15073
15074 fi
15075 if test "$ol_enable_kbind" != no ; then
15076         cat >> confdefs.h <<\EOF
15077 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15078 EOF
15079
15080 fi
15081 if test "$ol_enable_dns" != no ; then
15082         cat >> confdefs.h <<\EOF
15083 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15084 EOF
15085
15086 fi
15087 if test "$ol_enable_proctitle" != no ; then
15088         cat >> confdefs.h <<\EOF
15089 #define LDAP_PROCTITLE 1
15090 EOF
15091
15092 fi
15093 if test "$ol_enable_referrals" != no ; then
15094         cat >> confdefs.h <<\EOF
15095 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15096 EOF
15097
15098 fi
15099 if test "$ol_enable_cldap" != no ; then
15100         cat >> confdefs.h <<\EOF
15101 #define LDAP_CONNECTIONLESS 1
15102 EOF
15103
15104 fi
15105 if test "$ol_enable_ldapi" != no; then
15106         cat >> confdefs.h <<\EOF
15107 #define USE_PF_LOCAL 1
15108 EOF
15109
15110 fi
15111
15112 if test "$ol_enable_cleartext" != no ; then
15113         cat >> confdefs.h <<\EOF
15114 #define SLAPD_CLEARTEXT 1
15115 EOF
15116
15117 fi
15118 if test "$ol_enable_crypt" != no ; then
15119         cat >> confdefs.h <<\EOF
15120 #define SLAPD_CRYPT 1
15121 EOF
15122
15123 fi
15124 if test "$ol_enable_kpasswd" != no ; then
15125         cat >> confdefs.h <<\EOF
15126 #define SLAPD_KPASSWD 1
15127 EOF
15128
15129 fi
15130 if test "$ol_enable_multimaster" != no ; then
15131         cat >> confdefs.h <<\EOF
15132 #define SLAPD_MULTIMASTER 1
15133 EOF
15134
15135 fi
15136 if test "$ol_enable_phonetic" != no ; then
15137         cat >> confdefs.h <<\EOF
15138 #define SLAPD_PHONETIC 1
15139 EOF
15140
15141 fi
15142 if test "$ol_enable_rlookups" != no ; then
15143         cat >> confdefs.h <<\EOF
15144 #define SLAPD_RLOOKUPS 1
15145 EOF
15146
15147 fi
15148 if test "$ol_enable_aci" != no ; then
15149         cat >> confdefs.h <<\EOF
15150 #define SLAPD_ACI_ENABLED 1
15151 EOF
15152
15153 fi
15154 if test "$ol_enable_discreteaci" != no ; then
15155         cat >> confdefs.h <<\EOF
15156 #define SLAPD_ACI_DISCRETE_RIGHTS 1
15157 EOF
15158
15159 fi
15160
15161 if test "$ol_link_modules" != no ; then
15162         cat >> confdefs.h <<\EOF
15163 #define SLAPD_MODULES 1
15164 EOF
15165
15166         BUILD_SLAPD=yes
15167         SLAPD_MODULES_LDFLAGS="-dlopen self"
15168 fi
15169
15170 if test "$ol_link_bdb2" != no ; then
15171         cat >> confdefs.h <<\EOF
15172 #define SLAPD_BDB2 1
15173 EOF
15174
15175         BUILD_SLAPD=yes
15176         BUILD_BDB2=yes
15177         if test "$ol_with_bdb2_module" != static ; then
15178                 cat >> confdefs.h <<\EOF
15179 #define SLAPD_BDB2_DYNAMIC 1
15180 EOF
15181
15182                 BUILD_BDB2=mod
15183                 BUILD_BDB2_DYNAMIC=shared
15184                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15185         fi
15186 fi
15187
15188 if test "$ol_enable_ldap" != no ; then
15189         cat >> confdefs.h <<\EOF
15190 #define SLAPD_LDAP 1
15191 EOF
15192
15193         BUILD_SLAPD=yes
15194         BUILD_LDAP=yes
15195         if test "$ol_with_ldap_module" != static ; then
15196                 cat >> confdefs.h <<\EOF
15197 #define SLAPD_LDAP_DYNAMIC 1
15198 EOF
15199
15200                 BUILD_LDAP=mod
15201                 BUILD_LDAP_DYNAMIC=shared
15202                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15203         fi
15204 fi
15205
15206 if test "$ol_link_ldbm" != no ; then
15207         cat >> confdefs.h <<\EOF
15208 #define SLAPD_LDBM 1
15209 EOF
15210
15211         BUILD_SLAPD=yes
15212         BUILD_LDBM=yes
15213         if test "$ol_with_ldbm_module" != static ; then
15214                 cat >> confdefs.h <<\EOF
15215 #define SLAPD_LDBM_DYNAMIC 1
15216 EOF
15217
15218                 BUILD_LDBM=mod
15219                 BUILD_LDBM_DYNAMIC=shared
15220                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15221         fi
15222 fi
15223
15224 if test "$ol_enable_passwd" != no ; then
15225         cat >> confdefs.h <<\EOF
15226 #define SLAPD_PASSWD 1
15227 EOF
15228
15229         BUILD_SLAPD=yes
15230         BUILD_PASSWD=yes
15231         if test "$ol_with_passwd_module" != static ; then
15232                 cat >> confdefs.h <<\EOF
15233 #define SLAPD_PASSWD_DYNAMIC 1
15234 EOF
15235
15236                 BUILD_PASSWD=mod
15237                 BUILD_PASSWD_DYNAMIC=shared
15238                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15239         fi
15240 fi
15241
15242 if test "$ol_link_perl" != no ; then
15243         cat >> confdefs.h <<\EOF
15244 #define SLAPD_PERL 1
15245 EOF
15246
15247         BUILD_SLAPD=yes
15248         BUILD_PERL=yes
15249         if test "$ol_with_perl_module" != static ; then
15250                 cat >> confdefs.h <<\EOF
15251 #define SLAPD_PERL_DYNAMIC 1
15252 EOF
15253
15254                 BUILD_PERL=mod
15255                 BUILD_PERL_DYNAMIC=shared
15256                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15257         fi
15258 fi
15259
15260 if test "$ol_enable_shell" != no ; then
15261         cat >> confdefs.h <<\EOF
15262 #define SLAPD_SHELL 1
15263 EOF
15264
15265         BUILD_SLAPD=yes
15266         BUILD_SHELL=yes
15267         if test "$ol_with_shell_module" != static ; then
15268                 cat >> confdefs.h <<\EOF
15269 #define SLAPD_SHELL_DYNAMIC 1
15270 EOF
15271
15272                 BUILD_SHELL=mod
15273                 BUILD_SHELL_DYNAMIC=shared
15274                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15275         fi
15276 fi
15277
15278 if test "$ol_enable_tcl" != no ; then
15279         cat >> confdefs.h <<\EOF
15280 #define SLAPD_TCL 1
15281 EOF
15282
15283         BUILD_SLAPD=yes
15284         BUILD_TCL=yes
15285         if test "$ol_with_tcl_module" != static; then
15286                 cat >> confdefs.h <<\EOF
15287 #define SLAPD_TCL_DYNAMIC 1
15288 EOF
15289
15290                 BUILD_TCL=mod
15291                 BUILD_TCL_DYNAMIC=shared
15292                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15293         fi
15294 fi
15295
15296 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15297         $BUILD_SLAPD = yes ; then
15298         BUILD_SLURPD=yes
15299 fi
15300
15301 if test "$ol_link_isode" != no ; then
15302         BUILD_LDAPD=yes
15303 fi
15304
15305
15306 if test "$LINK_BINS_DYNAMIC" = yes; then
15307     LIB_LINKAGE=DYN
15308     LT_LIB_LINKAGE=shared
15309 else
15310     LIB_LINKAGE=STAT
15311     LT_LIB_LINKAGE=static
15312 fi
15313
15314 if test "$ac_cv_mingw32" = yes ; then
15315     PLAT=NT
15316     DYN_EXT=dll
15317 else
15318     PLAT=UNIX
15319     DYN_EXT=so
15320 fi
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331   
15332   
15333   
15334   
15335   
15336   
15337   
15338   
15339   
15340   
15341   
15342   
15343   
15344   
15345   
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377 trap '' 1 2 15
15378
15379 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15380
15381 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15382 # Let make expand exec_prefix.
15383 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15384
15385 # Any assignment to VPATH causes Sun make to only execute
15386 # the first set of double-colon rules, so remove it if not needed.
15387 # If there is a colon in the path, we need to keep it.
15388 if test "x$srcdir" = x.; then
15389   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15390 fi
15391
15392 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15393
15394 DEFS=-DHAVE_CONFIG_H
15395
15396 # Without the "./", some shells look in PATH for config.status.
15397 : ${CONFIG_STATUS=./config.status}
15398
15399 echo creating $CONFIG_STATUS
15400 rm -f $CONFIG_STATUS
15401 cat > $CONFIG_STATUS <<EOF
15402 #! /bin/sh
15403 # Generated automatically by configure.
15404 # Run this file to recreate the current configuration.
15405 # This directory was configured as follows,
15406 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15407 #
15408 # $0 $ac_configure_args
15409 #
15410 # Compiler output produced by configure, useful for debugging
15411 # configure, is in ./config.log if it exists.
15412
15413 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15414 for ac_option
15415 do
15416   case "\$ac_option" in
15417   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15418     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15419     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15420   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15421     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15422     exit 0 ;;
15423   -help | --help | --hel | --he | --h)
15424     echo "\$ac_cs_usage"; exit 0 ;;
15425   *) echo "\$ac_cs_usage"; exit 1 ;;
15426   esac
15427 done
15428
15429 ac_given_srcdir=$srcdir
15430 ac_given_INSTALL="$INSTALL"
15431
15432 trap 'rm -fr `echo "\
15433 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15434 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15435 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15436 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15437 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15438 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15439 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15440 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15441 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15442 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15443 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15444 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15445 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15446 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15447 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15448 include/Makefile:build/top.mk:include/Makefile.in \
15449 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15450 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15451 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15452 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15453 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15454 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15455 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15456 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15457 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15458 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15459 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15460 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15461 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15462 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15463 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15464 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15465 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15466 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15467 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15468 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15469 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15470 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15471 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15472 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15473 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15474 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15475  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15476 EOF
15477 cat >> $CONFIG_STATUS <<EOF
15478
15479 # Protect against being on the right side of a sed subst in config.status.
15480 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15481  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15482 $ac_vpsub
15483 $extrasub
15484 s%@SHELL@%$SHELL%g
15485 s%@CFLAGS@%$CFLAGS%g
15486 s%@CPPFLAGS@%$CPPFLAGS%g
15487 s%@CXXFLAGS@%$CXXFLAGS%g
15488 s%@FFLAGS@%$FFLAGS%g
15489 s%@DEFS@%$DEFS%g
15490 s%@LDFLAGS@%$LDFLAGS%g
15491 s%@LIBS@%$LIBS%g
15492 s%@exec_prefix@%$exec_prefix%g
15493 s%@prefix@%$prefix%g
15494 s%@program_transform_name@%$program_transform_name%g
15495 s%@bindir@%$bindir%g
15496 s%@sbindir@%$sbindir%g
15497 s%@libexecdir@%$libexecdir%g
15498 s%@datadir@%$datadir%g
15499 s%@sysconfdir@%$sysconfdir%g
15500 s%@sharedstatedir@%$sharedstatedir%g
15501 s%@localstatedir@%$localstatedir%g
15502 s%@libdir@%$libdir%g
15503 s%@includedir@%$includedir%g
15504 s%@oldincludedir@%$oldincludedir%g
15505 s%@infodir@%$infodir%g
15506 s%@mandir@%$mandir%g
15507 s%@host@%$host%g
15508 s%@host_alias@%$host_alias%g
15509 s%@host_cpu@%$host_cpu%g
15510 s%@host_vendor@%$host_vendor%g
15511 s%@host_os@%$host_os%g
15512 s%@target@%$target%g
15513 s%@target_alias@%$target_alias%g
15514 s%@target_cpu@%$target_cpu%g
15515 s%@target_vendor@%$target_vendor%g
15516 s%@target_os@%$target_os%g
15517 s%@build@%$build%g
15518 s%@build_alias@%$build_alias%g
15519 s%@build_cpu@%$build_cpu%g
15520 s%@build_vendor@%$build_vendor%g
15521 s%@build_os@%$build_os%g
15522 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15523 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15524 s%@INSTALL_DATA@%$INSTALL_DATA%g
15525 s%@PACKAGE@%$PACKAGE%g
15526 s%@VERSION@%$VERSION%g
15527 s%@ACLOCAL@%$ACLOCAL%g
15528 s%@AUTOCONF@%$AUTOCONF%g
15529 s%@AUTOMAKE@%$AUTOMAKE%g
15530 s%@AUTOHEADER@%$AUTOHEADER%g
15531 s%@MAKEINFO@%$MAKEINFO%g
15532 s%@install_sh@%$install_sh%g
15533 s%@AMTAR@%$AMTAR%g
15534 s%@AWK@%$AWK%g
15535 s%@AMTARFLAGS@%$AMTARFLAGS%g
15536 s%@SET_MAKE@%$SET_MAKE%g
15537 s%@top_builddir@%$top_builddir%g
15538 s%@ldap_subdir@%$ldap_subdir%g
15539 s%@CC@%$CC%g
15540 s%@RANLIB@%$RANLIB%g
15541 s%@LD@%$LD%g
15542 s%@NM@%$NM%g
15543 s%@LN_S@%$LN_S%g
15544 s%@DLLTOOL@%$DLLTOOL%g
15545 s%@AS@%$AS%g
15546 s%@OBJDUMP@%$OBJDUMP%g
15547 s%@LIBTOOL@%$LIBTOOL%g
15548 s%@LN_H@%$LN_H%g
15549 s%@SENDMAIL@%$SENDMAIL%g
15550 s%@EDITOR@%$EDITOR%g
15551 s%@FINGER@%$FINGER%g
15552 s%@PERLBIN@%$PERLBIN%g
15553 s%@CPP@%$CPP%g
15554 s%@EXEEXT@%$EXEEXT%g
15555 s%@OBJEXT@%$OBJEXT%g
15556 s%@OL_MKDEP@%$OL_MKDEP%g
15557 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15558 s%@PEPSY@%$PEPSY%g
15559 s%@LIBOBJS@%$LIBOBJS%g
15560 s%@LIBSRCS@%$LIBSRCS%g
15561 s%@PLAT@%$PLAT%g
15562 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15563 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15564 s%@DYN_EXT@%$DYN_EXT%g
15565 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15566 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15567 s%@BUILD_BDB2@%$BUILD_BDB2%g
15568 s%@BUILD_LDAP@%$BUILD_LDAP%g
15569 s%@BUILD_LDBM@%$BUILD_LDBM%g
15570 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15571 s%@BUILD_PERL@%$BUILD_PERL%g
15572 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15573 s%@BUILD_SHELL@%$BUILD_SHELL%g
15574 s%@BUILD_TCL@%$BUILD_TCL%g
15575 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15576 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15577 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15578 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15579 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15580 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15581 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15582 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15583 s%@LDAP_LIBS@%$LDAP_LIBS%g
15584 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15585 s%@LDIF_LIBS@%$LDIF_LIBS%g
15586 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15587 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15588 s%@LDBM_LIBS@%$LDBM_LIBS%g
15589 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15590 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15591 s%@WRAP_LIBS@%$WRAP_LIBS%g
15592 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15593 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15594 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15595 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15596 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15597 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15598 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15599 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15600 s%@KRB4_LIBS@%$KRB4_LIBS%g
15601 s%@KRB5_LIBS@%$KRB5_LIBS%g
15602 s%@READLINE_LIBS@%$READLINE_LIBS%g
15603 s%@SASL_LIBS@%$SASL_LIBS%g
15604 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15605 s%@TLS_LIBS@%$TLS_LIBS%g
15606 s%@MODULES_LIBS@%$MODULES_LIBS%g
15607
15608 CEOF
15609 EOF
15610
15611 cat >> $CONFIG_STATUS <<\EOF
15612
15613 # Split the substitutions into bite-sized pieces for seds with
15614 # small command number limits, like on Digital OSF/1 and HP-UX.
15615 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15616 ac_file=1 # Number of current file.
15617 ac_beg=1 # First line for current file.
15618 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15619 ac_more_lines=:
15620 ac_sed_cmds=""
15621 while $ac_more_lines; do
15622   if test $ac_beg -gt 1; then
15623     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15624   else
15625     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15626   fi
15627   if test ! -s conftest.s$ac_file; then
15628     ac_more_lines=false
15629     rm -f conftest.s$ac_file
15630   else
15631     if test -z "$ac_sed_cmds"; then
15632       ac_sed_cmds="sed -f conftest.s$ac_file"
15633     else
15634       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15635     fi
15636     ac_file=`expr $ac_file + 1`
15637     ac_beg=$ac_end
15638     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15639   fi
15640 done
15641 if test -z "$ac_sed_cmds"; then
15642   ac_sed_cmds=cat
15643 fi
15644 EOF
15645
15646 cat >> $CONFIG_STATUS <<EOF
15647
15648 CONFIG_FILES=\${CONFIG_FILES-"\
15649 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15650 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15651 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15652 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15653 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15654 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15655 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15656 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15657 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15658 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15659 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15660 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15661 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15662 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15663 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15664 include/Makefile:build/top.mk:include/Makefile.in \
15665 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15666 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15667 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15668 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15669 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15670 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15671 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15672 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15673 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15674 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15675 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15676 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15677 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15678 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15679 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15680 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15681 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15682 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15683 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15684 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15685 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15686 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15687 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15688 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15689 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15690 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15691 "}
15692 EOF
15693 cat >> $CONFIG_STATUS <<\EOF
15694 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15695   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15696   case "$ac_file" in
15697   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15698        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15699   *) ac_file_in="${ac_file}.in" ;;
15700   esac
15701
15702   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15703
15704   # Remove last slash and all that follows it.  Not all systems have dirname.
15705   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15706   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15707     # The file is in a subdirectory.
15708     test ! -d "$ac_dir" && mkdir "$ac_dir"
15709     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15710     # A "../" for each directory in $ac_dir_suffix.
15711     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15712   else
15713     ac_dir_suffix= ac_dots=
15714   fi
15715
15716   case "$ac_given_srcdir" in
15717   .)  srcdir=.
15718       if test -z "$ac_dots"; then top_srcdir=.
15719       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15720   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15721   *) # Relative path.
15722     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15723     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15724   esac
15725
15726   case "$ac_given_INSTALL" in
15727   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15728   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15729   esac
15730
15731   echo creating "$ac_file"
15732   rm -f "$ac_file"
15733   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15734   case "$ac_file" in
15735   *Makefile*) ac_comsub="1i\\
15736 # $configure_input" ;;
15737   *) ac_comsub= ;;
15738   esac
15739
15740   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15741   sed -e "$ac_comsub
15742 s%@configure_input@%$configure_input%g
15743 s%@srcdir@%$srcdir%g
15744 s%@top_srcdir@%$top_srcdir%g
15745 s%@INSTALL@%$INSTALL%g
15746 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15747 fi; done
15748 rm -f conftest.s*
15749
15750 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15751 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15752 #
15753 # ac_d sets the value in "#define NAME VALUE" lines.
15754 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15755 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15756 ac_dC='\3'
15757 ac_dD='%g'
15758 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15759 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15760 ac_uB='\([      ]\)%\1#\2define\3'
15761 ac_uC=' '
15762 ac_uD='\4%g'
15763 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15764 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15765 ac_eB='$%\1#\2define\3'
15766 ac_eC=' '
15767 ac_eD='%g'
15768
15769 if test "${CONFIG_HEADERS+set}" != set; then
15770 EOF
15771 cat >> $CONFIG_STATUS <<EOF
15772   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
15773 EOF
15774 cat >> $CONFIG_STATUS <<\EOF
15775 fi
15776 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15777   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15778   case "$ac_file" in
15779   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15780        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15781   *) ac_file_in="${ac_file}.in" ;;
15782   esac
15783
15784   echo creating $ac_file
15785
15786   rm -f conftest.frag conftest.in conftest.out
15787   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15788   cat $ac_file_inputs > conftest.in
15789
15790 EOF
15791
15792 # Transform confdefs.h into a sed script conftest.vals that substitutes
15793 # the proper values into config.h.in to produce config.h.  And first:
15794 # Protect against being on the right side of a sed subst in config.status.
15795 # Protect against being in an unquoted here document in config.status.
15796 rm -f conftest.vals
15797 cat > conftest.hdr <<\EOF
15798 s/[\\&%]/\\&/g
15799 s%[\\$`]%\\&%g
15800 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15801 s%ac_d%ac_u%gp
15802 s%ac_u%ac_e%gp
15803 EOF
15804 sed -n -f conftest.hdr confdefs.h > conftest.vals
15805 rm -f conftest.hdr
15806
15807 # This sed command replaces #undef with comments.  This is necessary, for
15808 # example, in the case of _POSIX_SOURCE, which is predefined and required
15809 # on some systems where configure will not decide to define it.
15810 cat >> conftest.vals <<\EOF
15811 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15812 EOF
15813
15814 # Break up conftest.vals because some shells have a limit on
15815 # the size of here documents, and old seds have small limits too.
15816
15817 rm -f conftest.tail
15818 while :
15819 do
15820   ac_lines=`grep -c . conftest.vals`
15821   # grep -c gives empty output for an empty file on some AIX systems.
15822   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15823   # Write a limited-size here document to conftest.frag.
15824   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15825   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15826   echo 'CEOF
15827   sed -f conftest.frag conftest.in > conftest.out
15828   rm -f conftest.in
15829   mv conftest.out conftest.in
15830 ' >> $CONFIG_STATUS
15831   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15832   rm -f conftest.vals
15833   mv conftest.tail conftest.vals
15834 done
15835 rm -f conftest.vals
15836
15837 cat >> $CONFIG_STATUS <<\EOF
15838   rm -f conftest.frag conftest.h
15839   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15840   cat conftest.in >> conftest.h
15841   rm -f conftest.in
15842   if cmp -s $ac_file conftest.h 2>/dev/null; then
15843     echo "$ac_file is unchanged"
15844     rm -f conftest.h
15845   else
15846     # Remove last slash and all that follows it.  Not all systems have dirname.
15847       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15848       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15849       # The file is in a subdirectory.
15850       test ! -d "$ac_dir" && mkdir "$ac_dir"
15851     fi
15852     rm -f $ac_file
15853     mv conftest.h $ac_file
15854   fi
15855 fi; done
15856
15857 EOF
15858 cat >> $CONFIG_STATUS <<EOF
15859
15860 EOF
15861 cat >> $CONFIG_STATUS <<\EOF
15862
15863 date > stamp-h
15864 echo Please \"make depend\" to build dependencies
15865
15866 exit 0
15867 EOF
15868 chmod +x $CONFIG_STATUS
15869 rm -fr confdefs* $ac_clean_files
15870 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15871