]> git.sur5r.net Git - openldap/blob - configure
b89e3ca385fe25922b2c0af39c1ba711a7368352
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.294 2000/05/10 02:29:53 kurt 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.1 
17 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
18 #
19 # This configure script is free software; the Free Software Foundation
20 # gives unlimited permission to copy, distribute and modify it.
21
22 # Defaults:
23 ac_help=
24 ac_default_prefix=/usr/local
25 # Any additions from configure.in:
26 ac_default_prefix=/usr/local
27 ac_help="$ac_help
28   --with-subdir=DIR change default subdirectory used for installs"
29 ac_help="$ac_help
30   --enable-debug        enable debugging (yes)"
31 ac_help="$ac_help
32   --enable-syslog       enable syslog support (auto)"
33 ac_help="$ac_help
34   --enable-proctitle    enable proctitle support (yes)"
35 ac_help="$ac_help
36   --enable-cache        enable caching (yes)"
37 ac_help="$ac_help
38   --enable-dns          enable V2 DX Referrals extension (no)"
39 ac_help="$ac_help
40   --enable-referrals    enable V2 Referrals extension (yes)"
41 ac_help="$ac_help
42   --enable-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-spasswd    enable (Cyrus) SASL password verification (no)"
81 ac_help="$ac_help
82     --enable-modules    enable dynamic module support (no)"
83 ac_help="$ac_help
84     --enable-multimaster        enable multimaster replication (no)"
85 ac_help="$ac_help
86     --enable-phonetic   enable phonetic/soundex (no)"
87 ac_help="$ac_help
88     --enable-quipu      build quipu migration tools (no)"
89 ac_help="$ac_help
90     --enable-rlookups   enable reverse lookups (auto)"
91 ac_help="$ac_help
92     --enable-aci        enable per-object 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     --enable-sql        enable sql backend (no)"
131 ac_help="$ac_help
132       --with-sql-module module type (static)"
133 ac_help="$ac_help
134 SLURPD (Replication Daemon) Options:"
135 ac_help="$ac_help
136   --enable-slurpd       enable building slurpd (auto)"
137 ac_help="$ac_help
138 Library Generation & Linking Options"
139 ac_help="$ac_help
140   --enable-static[=PKGS]  build static libraries [default=yes]"
141 ac_help="$ac_help
142   --enable-shared[=PKGS]  build shared libraries [default=yes]"
143 ac_help="$ac_help
144   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
145 ac_help="$ac_help
146   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
147 ac_help="$ac_help
148   --disable-libtool-lock  avoid locking (might break parallel builds)"
149
150 # Initialize some variables set by options.
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 build=NONE
154 cache_file=./config.cache
155 exec_prefix=NONE
156 host=NONE
157 no_create=
158 nonopt=NONE
159 no_recursion=
160 prefix=NONE
161 program_prefix=NONE
162 program_suffix=NONE
163 program_transform_name=s,x,x,
164 silent=
165 site=
166 srcdir=
167 target=NONE
168 verbose=
169 x_includes=NONE
170 x_libraries=NONE
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Initialize some other variables.
185 subdirs=
186 MFLAGS= MAKEFLAGS=
187 SHELL=${CONFIG_SHELL-/bin/sh}
188 # Maximum number of lines to put in a shell here document.
189 ac_max_here_lines=12
190
191 ac_prev=
192 for ac_option
193 do
194
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   case "$ac_option" in
203   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
204   *) ac_optarg= ;;
205   esac
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir="$ac_optarg" ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build="$ac_optarg" ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file="$ac_optarg" ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir="$ac_optarg" ;;
233
234   -disable-* | --disable-*)
235     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
236     # Reject names that are not valid shell variable names.
237     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
238       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
239     fi
240     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
241     eval "enable_${ac_feature}=no" ;;
242
243   -enable-* | --enable-*)
244     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
245     # Reject names that are not valid shell variable names.
246     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
247       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
248     fi
249     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
250     case "$ac_option" in
251       *=*) ;;
252       *) ac_optarg=yes ;;
253     esac
254     eval "enable_${ac_feature}='$ac_optarg'" ;;
255
256   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
257   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
258   | --exec | --exe | --ex)
259     ac_prev=exec_prefix ;;
260   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
261   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
262   | --exec=* | --exe=* | --ex=*)
263     exec_prefix="$ac_optarg" ;;
264
265   -gas | --gas | --ga | --g)
266     # Obsolete; use --with-gas.
267     with_gas=yes ;;
268
269   -help | --help | --hel | --he)
270     # Omit some internal or obsolete options to make the list less imposing.
271     # This message is too long to be a string in the A/UX 3.1 sh.
272     cat << EOF
273 Usage: configure [options] [host]
274 Options: [defaults in brackets after descriptions]
275 Configuration:
276   --cache-file=FILE       cache test results in FILE
277   --help                  print this message
278   --no-create             do not create output files
279   --quiet, --silent       do not print \`checking...' messages
280   --version               print the version of autoconf that created configure
281 Directory and file names:
282   --prefix=PREFIX         install architecture-independent files in PREFIX
283                           [$ac_default_prefix]
284   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
285                           [same as prefix]
286   --bindir=DIR            user executables in DIR [EPREFIX/bin]
287   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
288   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
289   --datadir=DIR           read-only architecture-independent data in DIR
290                           [PREFIX/share]
291   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
292   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
293                           [PREFIX/com]
294   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
295   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
296   --includedir=DIR        C header files in DIR [PREFIX/include]
297   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
298   --infodir=DIR           info documentation in DIR [PREFIX/info]
299   --mandir=DIR            man documentation in DIR [PREFIX/man]
300   --srcdir=DIR            find the sources in DIR [configure dir or ..]
301   --program-prefix=PREFIX prepend PREFIX to installed program names
302   --program-suffix=SUFFIX append SUFFIX to installed program names
303   --program-transform-name=PROGRAM
304                           run sed PROGRAM on installed program names
305 EOF
306     cat << EOF
307 Host type:
308   --build=BUILD           configure for building on BUILD [BUILD=HOST]
309   --host=HOST             configure for HOST [guessed]
310   --target=TARGET         configure for TARGET [TARGET=HOST]
311 Features and packages:
312   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
313   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
314   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
315   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
316   --x-includes=DIR        X include files are in DIR
317   --x-libraries=DIR       X library files are in DIR
318 EOF
319     if test -n "$ac_help"; then
320       echo "--enable and --with options recognized:$ac_help"
321     fi
322     exit 0 ;;
323
324   -host | --host | --hos | --ho)
325     ac_prev=host ;;
326   -host=* | --host=* | --hos=* | --ho=*)
327     host="$ac_optarg" ;;
328
329   -includedir | --includedir | --includedi | --included | --include \
330   | --includ | --inclu | --incl | --inc)
331     ac_prev=includedir ;;
332   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
333   | --includ=* | --inclu=* | --incl=* | --inc=*)
334     includedir="$ac_optarg" ;;
335
336   -infodir | --infodir | --infodi | --infod | --info | --inf)
337     ac_prev=infodir ;;
338   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
339     infodir="$ac_optarg" ;;
340
341   -libdir | --libdir | --libdi | --libd)
342     ac_prev=libdir ;;
343   -libdir=* | --libdir=* | --libdi=* | --libd=*)
344     libdir="$ac_optarg" ;;
345
346   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
347   | --libexe | --libex | --libe)
348     ac_prev=libexecdir ;;
349   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
350   | --libexe=* | --libex=* | --libe=*)
351     libexecdir="$ac_optarg" ;;
352
353   -localstatedir | --localstatedir | --localstatedi | --localstated \
354   | --localstate | --localstat | --localsta | --localst \
355   | --locals | --local | --loca | --loc | --lo)
356     ac_prev=localstatedir ;;
357   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
358   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
359   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
360     localstatedir="$ac_optarg" ;;
361
362   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
363     ac_prev=mandir ;;
364   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
365     mandir="$ac_optarg" ;;
366
367   -nfp | --nfp | --nf)
368     # Obsolete; use --without-fp.
369     with_fp=no ;;
370
371   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
372   | --no-cr | --no-c)
373     no_create=yes ;;
374
375   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
376   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
377     no_recursion=yes ;;
378
379   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
380   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
381   | --oldin | --oldi | --old | --ol | --o)
382     ac_prev=oldincludedir ;;
383   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
384   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
385   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
386     oldincludedir="$ac_optarg" ;;
387
388   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
389     ac_prev=prefix ;;
390   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
391     prefix="$ac_optarg" ;;
392
393   -program-prefix | --program-prefix | --program-prefi | --program-pref \
394   | --program-pre | --program-pr | --program-p)
395     ac_prev=program_prefix ;;
396   -program-prefix=* | --program-prefix=* | --program-prefi=* \
397   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
398     program_prefix="$ac_optarg" ;;
399
400   -program-suffix | --program-suffix | --program-suffi | --program-suff \
401   | --program-suf | --program-su | --program-s)
402     ac_prev=program_suffix ;;
403   -program-suffix=* | --program-suffix=* | --program-suffi=* \
404   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
405     program_suffix="$ac_optarg" ;;
406
407   -program-transform-name | --program-transform-name \
408   | --program-transform-nam | --program-transform-na \
409   | --program-transform-n | --program-transform- \
410   | --program-transform | --program-transfor \
411   | --program-transfo | --program-transf \
412   | --program-trans | --program-tran \
413   | --progr-tra | --program-tr | --program-t)
414     ac_prev=program_transform_name ;;
415   -program-transform-name=* | --program-transform-name=* \
416   | --program-transform-nam=* | --program-transform-na=* \
417   | --program-transform-n=* | --program-transform-=* \
418   | --program-transform=* | --program-transfor=* \
419   | --program-transfo=* | --program-transf=* \
420   | --program-trans=* | --program-tran=* \
421   | --progr-tra=* | --program-tr=* | --program-t=*)
422     program_transform_name="$ac_optarg" ;;
423
424   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
425   | -silent | --silent | --silen | --sile | --sil)
426     silent=yes ;;
427
428   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
429     ac_prev=sbindir ;;
430   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
431   | --sbi=* | --sb=*)
432     sbindir="$ac_optarg" ;;
433
434   -sharedstatedir | --sharedstatedir | --sharedstatedi \
435   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
436   | --sharedst | --shareds | --shared | --share | --shar \
437   | --sha | --sh)
438     ac_prev=sharedstatedir ;;
439   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
440   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
441   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
442   | --sha=* | --sh=*)
443     sharedstatedir="$ac_optarg" ;;
444
445   -site | --site | --sit)
446     ac_prev=site ;;
447   -site=* | --site=* | --sit=*)
448     site="$ac_optarg" ;;
449
450   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
451     ac_prev=srcdir ;;
452   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
453     srcdir="$ac_optarg" ;;
454
455   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
456   | --syscon | --sysco | --sysc | --sys | --sy)
457     ac_prev=sysconfdir ;;
458   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
459   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
460     sysconfdir="$ac_optarg" ;;
461
462   -target | --target | --targe | --targ | --tar | --ta | --t)
463     ac_prev=target ;;
464   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
465     target="$ac_optarg" ;;
466
467   -v | -verbose | --verbose | --verbos | --verbo | --verb)
468     verbose=yes ;;
469
470   -version | --version | --versio | --versi | --vers)
471     echo "configure generated by autoconf version 2.13.1"
472     exit 0 ;;
473
474   -with-* | --with-*)
475     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
476     # Reject names that are not valid shell variable names.
477     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
478       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
479     fi
480     ac_package=`echo $ac_package| sed 's/-/_/g'`
481     case "$ac_option" in
482       *=*) ;;
483       *) ac_optarg=yes ;;
484     esac
485     eval "with_${ac_package}='$ac_optarg'" ;;
486
487   -without-* | --without-*)
488     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
489     # Reject names that are not valid shell variable names.
490     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
491       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
492     fi
493     ac_package=`echo $ac_package| sed 's/-/_/g'`
494     eval "with_${ac_package}=no" ;;
495
496   --x)
497     # Obsolete; use --with-x.
498     with_x=yes ;;
499
500   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
501   | --x-incl | --x-inc | --x-in | --x-i)
502     ac_prev=x_includes ;;
503   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
504   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
505     x_includes="$ac_optarg" ;;
506
507   -x-libraries | --x-libraries | --x-librarie | --x-librari \
508   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
509     ac_prev=x_libraries ;;
510   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
511   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
512     x_libraries="$ac_optarg" ;;
513
514   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
515     ;;
516
517   *)
518     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
519       echo "configure: warning: $ac_option: invalid host type" 1>&2
520     fi
521     if test "x$nonopt" != xNONE; then
522       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
523     fi
524     nonopt="$ac_option"
525     ;;
526
527   esac
528 done
529
530 if test -n "$ac_prev"; then
531   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
532 fi
533
534 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
535
536 # File descriptor usage:
537 # 0 standard input
538 # 1 file creation
539 # 2 errors and warnings
540 # 3 some systems may open it to /dev/tty
541 # 4 used on the Kubota Titan
542 # 6 checking for... messages and results
543 # 5 compiler messages saved in config.log
544 if test "$silent" = yes; then
545   exec 6>/dev/null
546 else
547   exec 6>&1
548 fi
549 exec 5>./config.log
550
551 echo "\
552 This file contains any messages produced by compilers while
553 running configure, to aid debugging if configure makes a mistake.
554 " 1>&5
555
556 # Strip out --no-create and --no-recursion so they do not pile up.
557 # Also quote any args containing shell metacharacters.
558 ac_configure_args=
559 for ac_arg
560 do
561   case "$ac_arg" in
562   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
563   | --no-cr | --no-c) ;;
564   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
565   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
566   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
567   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
568   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
569   esac
570 done
571
572 # NLS nuisances.
573 # Only set these to C if already set.  These must not be set unconditionally
574 # because not all systems understand e.g. LANG=C (notably SCO).
575 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
576 # Non-C LC_CTYPE values break the ctype check.
577 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
578 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
579 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
580 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
581
582 # confdefs.h avoids OS command line length limits that DEFS can exceed.
583 rm -rf conftest* confdefs.h
584 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
585 echo > confdefs.h
586
587 # A filename unique to this package, relative to the directory that
588 # configure is in, which we can look for to find out if srcdir is correct.
589 ac_unique_file=build/version
590
591 # Find the source files, if location was not specified.
592 if test -z "$srcdir"; then
593   ac_srcdir_defaulted=yes
594   # Try the directory containing this script, then its parent.
595   ac_prog=$0
596   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
597   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
598   srcdir=$ac_confdir
599   if test ! -r $srcdir/$ac_unique_file; then
600     srcdir=..
601   fi
602 else
603   ac_srcdir_defaulted=no
604 fi
605 if test ! -r $srcdir/$ac_unique_file; then
606   if test "$ac_srcdir_defaulted" = yes; then
607     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
608   else
609     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
610   fi
611 fi
612 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
613
614 # Prefer explicitly selected file to automatically selected ones.
615 if test -z "$CONFIG_SITE"; then
616   if test "x$prefix" != xNONE; then
617     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
618   else
619     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
620   fi
621 fi
622 for ac_site_file in $CONFIG_SITE; do
623   if test -r "$ac_site_file"; then
624     echo "loading site script $ac_site_file"
625     . "$ac_site_file"
626   fi
627 done
628
629
630 ac_ext=c
631 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
632 ac_cpp='$CPP $CPPFLAGS'
633 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
634 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
635 cross_compiling=$ac_cv_prog_cc_cross
636
637 ac_exeext=
638 ac_objext=o
639 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
640   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
641   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
642     ac_n= ac_c='
643 ' ac_t='        '
644   else
645     ac_n=-n ac_c= ac_t=
646   fi
647 else
648   ac_n= ac_c='\c' ac_t=
649 fi
650
651 ac_aux_dir=
652 for ac_dir in build $srcdir/build; do
653   if 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   elif test -f $ac_dir/install.sh; then
658     ac_aux_dir=$ac_dir
659     ac_install_sh="$ac_aux_dir/install.sh -c"
660     break
661   elif test -f $ac_dir/shtool; then
662     ac_aux_dir=$ac_dir
663     ac_install_sh="$ac_aux_dir/shtool install -c"
664     break
665   fi
666 done
667 if test -z "$ac_aux_dir"; then
668   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
669 fi
670 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
671 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
672 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
673
674 OL_VERSION=`cat $ac_aux_dir/version`
675 if test -z "$OL_VERSION"; then
676         { echo "configure: error: could not determine version" 1>&2; exit 1; }
677 fi
678
679 echo "Configuring OpenLDAP $OL_VERSION ..."
680
681
682 echo $ac_n "checking host system type""... $ac_c" 1>&6
683 echo "configure:684: checking host system type" >&5
684 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
685
686 # Make sure we can run config.sub.
687   if $ac_config_sub sun4 >/dev/null 2>&1; then :
688     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
689   fi
690
691   ac_cv_host_alias=$host
692   case "$ac_cv_host_alias" in
693   NONE)
694     case $nonopt in
695     NONE)
696       if ac_cv_host_alias=`$ac_config_guess`; then :
697       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
698       fi ;;
699     *) ac_cv_host_alias=$nonopt ;;
700     esac ;;
701   esac
702
703   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
704   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
705   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
706   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
707 else
708   echo $ac_n "(cached) $ac_c" 1>&6
709 fi
710
711 echo "$ac_t""$ac_cv_host" 1>&6
712
713 host=$ac_cv_host
714 host_alias=$ac_cv_host_alias
715 host_cpu=$ac_cv_host_cpu
716 host_vendor=$ac_cv_host_vendor
717 host_os=$ac_cv_host_os
718
719
720
721
722
723 echo $ac_n "checking target system type""... $ac_c" 1>&6
724 echo "configure:725: checking target system type" >&5
725 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
726
727 # Make sure we can run config.sub.
728   if $ac_config_sub sun4 >/dev/null 2>&1; then :
729     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
730   fi
731
732   ac_cv_target_alias=$target
733   case "$ac_cv_target_alias" in
734   NONE)
735     case $nonopt in
736     NONE)
737       ac_cv_target_alias=$host_alias ;;
738
739     *) ac_cv_target_alias=$nonopt ;;
740     esac ;;
741   esac
742
743   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
744   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
745   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
746   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
747 else
748   echo $ac_n "(cached) $ac_c" 1>&6
749 fi
750
751 echo "$ac_t""$ac_cv_target" 1>&6
752
753 target=$ac_cv_target
754 target_alias=$ac_cv_target_alias
755 target_cpu=$ac_cv_target_cpu
756 target_vendor=$ac_cv_target_vendor
757 target_os=$ac_cv_target_os
758
759
760
761
762
763 echo $ac_n "checking build system type""... $ac_c" 1>&6
764 echo "configure:765: checking build system type" >&5
765 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
766
767 # Make sure we can run config.sub.
768   if $ac_config_sub sun4 >/dev/null 2>&1; then :
769     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
770   fi
771
772   ac_cv_build_alias=$build
773   case "$ac_cv_build_alias" in
774   NONE)
775     case $nonopt in
776     NONE)
777       ac_cv_build_alias=$host_alias ;;
778
779     *) ac_cv_build_alias=$nonopt ;;
780     esac ;;
781   esac
782
783   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
784   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
785   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
786   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
787 else
788   echo $ac_n "(cached) $ac_c" 1>&6
789 fi
790
791 echo "$ac_t""$ac_cv_build" 1>&6
792
793 build=$ac_cv_build
794 build_alias=$ac_cv_build_alias
795 build_cpu=$ac_cv_build_cpu
796 build_vendor=$ac_cv_build_vendor
797 build_os=$ac_cv_build_os
798
799
800
801
802
803 # Do some error checking and defaulting for the host and target type.
804 # The inputs are:
805 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
806 #
807 # The rules are:
808 # 1. You are not allowed to specify --host, --target, and nonopt at the
809 #    same time.
810 # 2. Host defaults to nonopt.
811 # 3. If nonopt is not specified, then host defaults to the current host,
812 #    as determined by config.guess.
813 # 4. Target and build default to nonopt.
814 # 5. If nonopt is not specified, then target and build default to host.
815
816 # The aliases save the names the user supplied, while $host etc.
817 # will get canonicalized.
818 case $host---$target---$nonopt in
819 NONE---*---* | *---NONE---* | *---*---NONE) ;;
820 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
821 esac
822
823 test "$host_alias" != "$target_alias" &&
824   test "$program_prefix$program_suffix$program_transform_name" = \
825     NONENONEs,x,x, &&
826   program_prefix=${target_alias}-
827
828
829 # Find a good install program.  We prefer a C program (faster),
830 # so one script is as good as another.  But avoid the broken or
831 # incompatible versions:
832 # SysV /etc/install, /usr/sbin/install
833 # SunOS /usr/etc/install
834 # IRIX /sbin/install
835 # AIX /bin/install
836 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
837 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
838 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
839 # ./install, which can be erroneously created by make from ./install.sh.
840 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
841 echo "configure:842: checking for a BSD compatible install" >&5
842 if test -z "$INSTALL"; then
843 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
844   echo $ac_n "(cached) $ac_c" 1>&6
845 else
846     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
847   for ac_dir in $PATH; do
848     # Account for people who put trailing slashes in PATH elements.
849     case "$ac_dir/" in
850     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
851     *)
852       # OSF1 and SCO ODT 3.0 have their own names for install.
853       # Don't use installbsd from OSF since it installs stuff as root
854       # by default.
855       for ac_prog in ginstall scoinst install; do
856         if test -f $ac_dir/$ac_prog; then
857           if test $ac_prog = install &&
858             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
859             # AIX install.  It has an incompatible calling convention.
860             :
861           elif test $ac_prog = install &&
862             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
863             # program-specific install script used by HP pwplus--don't use.
864             :
865           else
866             ac_cv_path_install="$ac_dir/$ac_prog -c"
867             break 2
868           fi
869         fi
870       done
871       ;;
872     esac
873   done
874   IFS="$ac_save_IFS"
875
876 fi
877   if test "${ac_cv_path_install+set}" = set; then
878     INSTALL="$ac_cv_path_install"
879   else
880     # As a last resort, use the slow shell script.  We don't cache a
881     # path for INSTALL within a source directory, because that will
882     # break other packages using the cache if that directory is
883     # removed, or if the path is relative.
884     INSTALL="$ac_install_sh"
885   fi
886 fi
887 echo "$ac_t""$INSTALL" 1>&6
888
889 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
890 # It thinks the first close brace ends the variable substitution.
891 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
892
893 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
894
895 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
896
897 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
898 echo "configure:899: checking whether build environment is sane" >&5
899 # Just in case
900 sleep 1
901 echo timestamp > conftestfile
902 # Do `set' in a subshell so we don't clobber the current shell's
903 # arguments.  Must try -L first in case configure is actually a
904 # symlink; some systems play weird games with the mod time of symlinks
905 # (eg FreeBSD returns the mod time of the symlink's containing
906 # directory).
907 if (
908    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
909    if test "$*" = "X"; then
910       # -L didn't work.
911       set X `ls -t $srcdir/configure conftestfile`
912    fi
913    if test "$*" != "X $srcdir/configure conftestfile" \
914       && test "$*" != "X conftestfile $srcdir/configure"; then
915
916       # If neither matched, then we have a broken ls.  This can happen
917       # if, for instance, CONFIG_SHELL is bash and it inherits a
918       # broken ls alias from the environment.  This has actually
919       # happened.  Such a system could not be considered "sane".
920       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
921 alias in your environment" 1>&2; exit 1; }
922    fi
923
924    test "$2" = conftestfile
925    )
926 then
927    # Ok.
928    :
929 else
930    { echo "configure: error: newly created file is older than distributed files!
931 Check your system clock" 1>&2; exit 1; }
932 fi
933 rm -f conftest*
934 echo "$ac_t""yes" 1>&6
935 if test "$program_transform_name" = s,x,x,; then
936   program_transform_name=
937 else
938   # Double any \ or $.  echo might interpret backslashes.
939   cat <<\EOF_SED > conftestsed
940 s,\\,\\\\,g; s,\$,$$,g
941 EOF_SED
942   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
943   rm -f conftestsed
944 fi
945 test "$program_prefix" != NONE &&
946   program_transform_name="s,^,${program_prefix},;$program_transform_name"
947 # Use a double $ so make ignores it.
948 test "$program_suffix" != NONE &&
949   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
950
951 # sed with no file args requires a program.
952 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
953
954 for ac_prog in mawk gawk nawk awk
955 do
956 # Extract the first word of "$ac_prog", so it can be a program name with args.
957 set dummy $ac_prog; ac_word=$2
958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959 echo "configure:960: checking for $ac_word" >&5
960 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
961   echo $ac_n "(cached) $ac_c" 1>&6
962 else
963   if test -n "$AWK"; then
964   ac_cv_prog_AWK="$AWK" # Let the user override the test.
965 else
966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
967   ac_dummy="$PATH"
968   for ac_dir in $ac_dummy; do
969     test -z "$ac_dir" && ac_dir=.
970     if test -f $ac_dir/$ac_word; then
971       ac_cv_prog_AWK="$ac_prog"
972       break
973     fi
974   done
975   IFS="$ac_save_ifs"
976 fi
977 fi
978 AWK="$ac_cv_prog_AWK"
979 if test -n "$AWK"; then
980   echo "$ac_t""$AWK" 1>&6
981 else
982   echo "$ac_t""no" 1>&6
983 fi
984
985 test -n "$AWK" && break
986 done
987
988 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
989 echo "configure:990: checking whether ${MAKE-make} sets \${MAKE}" >&5
990 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
991 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
992   echo $ac_n "(cached) $ac_c" 1>&6
993 else
994   cat > conftestmake <<\EOF
995 all:
996         @echo 'ac_maketemp="${MAKE}"'
997 EOF
998 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
999 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1000 if test -n "$ac_maketemp"; then
1001   eval ac_cv_prog_make_${ac_make}_set=yes
1002 else
1003   eval ac_cv_prog_make_${ac_make}_set=no
1004 fi
1005 rm -f conftestmake
1006 fi
1007 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1008   echo "$ac_t""yes" 1>&6
1009   SET_MAKE=
1010 else
1011   echo "$ac_t""no" 1>&6
1012   SET_MAKE="MAKE=${MAKE-make}"
1013 fi
1014
1015
1016
1017 PACKAGE=OpenLDAP
1018
1019 VERSION=$OL_VERSION
1020
1021 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1022   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1023 fi
1024
1025
1026
1027 missing_dir=`cd $ac_aux_dir && pwd`
1028 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1029 echo "configure:1030: checking for working aclocal" >&5
1030 # Run test in a subshell; some versions of sh will print an error if
1031 # an executable is not found, even if stderr is redirected.
1032 # Redirect stdin to placate older versions of autoconf.  Sigh.
1033 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1034    ACLOCAL=aclocal
1035    echo "$ac_t""found" 1>&6
1036 else
1037    ACLOCAL="$missing_dir/missing aclocal"
1038    echo "$ac_t""missing" 1>&6
1039 fi
1040
1041 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1042 echo "configure:1043: checking for working autoconf" >&5
1043 # Run test in a subshell; some versions of sh will print an error if
1044 # an executable is not found, even if stderr is redirected.
1045 # Redirect stdin to placate older versions of autoconf.  Sigh.
1046 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1047    AUTOCONF=autoconf
1048    echo "$ac_t""found" 1>&6
1049 else
1050    AUTOCONF="$missing_dir/missing autoconf"
1051    echo "$ac_t""missing" 1>&6
1052 fi
1053
1054 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1055 echo "configure:1056: checking for working automake" >&5
1056 # Run test in a subshell; some versions of sh will print an error if
1057 # an executable is not found, even if stderr is redirected.
1058 # Redirect stdin to placate older versions of autoconf.  Sigh.
1059 if (automake --version) < /dev/null > /dev/null 2>&1; then
1060    AUTOMAKE=automake
1061    echo "$ac_t""found" 1>&6
1062 else
1063    AUTOMAKE="$missing_dir/missing automake"
1064    echo "$ac_t""missing" 1>&6
1065 fi
1066
1067 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1068 echo "configure:1069: checking for working autoheader" >&5
1069 # Run test in a subshell; some versions of sh will print an error if
1070 # an executable is not found, even if stderr is redirected.
1071 # Redirect stdin to placate older versions of autoconf.  Sigh.
1072 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1073    AUTOHEADER=autoheader
1074    echo "$ac_t""found" 1>&6
1075 else
1076    AUTOHEADER="$missing_dir/missing autoheader"
1077    echo "$ac_t""missing" 1>&6
1078 fi
1079
1080 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1081 echo "configure:1082: checking for working makeinfo" >&5
1082 # Run test in a subshell; some versions of sh will print an error if
1083 # an executable is not found, even if stderr is redirected.
1084 # Redirect stdin to placate older versions of autoconf.  Sigh.
1085 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1086    MAKEINFO=makeinfo
1087    echo "$ac_t""found" 1>&6
1088 else
1089    MAKEINFO="$missing_dir/missing makeinfo"
1090    echo "$ac_t""missing" 1>&6
1091 fi
1092
1093 install_sh="$missing_dir/install-sh"
1094 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1095
1096 for ac_prog in gnutar gtar tar
1097 do
1098 # Extract the first word of "$ac_prog", so it can be a program name with args.
1099 set dummy $ac_prog; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   if test -n "$AMTAR"; then
1106   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1107 else
1108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1109   ac_dummy="$PATH"
1110   for ac_dir in $ac_dummy; do
1111     test -z "$ac_dir" && ac_dir=.
1112     if test -f $ac_dir/$ac_word; then
1113       ac_cv_prog_AMTAR="$ac_prog"
1114       break
1115     fi
1116   done
1117   IFS="$ac_save_ifs"
1118 fi
1119 fi
1120 AMTAR="$ac_cv_prog_AMTAR"
1121 if test -n "$AMTAR"; then
1122   echo "$ac_t""$AMTAR" 1>&6
1123 else
1124   echo "$ac_t""no" 1>&6
1125 fi
1126
1127 test -n "$AMTAR" && break
1128 done
1129
1130
1131 AMTARFLAGS=
1132 if test -n "$AMTAR"; then
1133   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1134         AMTARFLAGS=o
1135   fi
1136 fi
1137
1138
1139
1140 cat >> confdefs.h <<EOF
1141 #define OPENLDAP_PACKAGE "$PACKAGE"
1142 EOF
1143
1144 cat >> confdefs.h <<EOF
1145 #define OPENLDAP_VERSION "$VERSION"
1146 EOF
1147
1148
1149
1150
1151 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1152 echo "configure:1153: checking configure arguments" >&5
1153
1154
1155 top_builddir=`pwd`
1156
1157 ldap_subdir="/openldap"
1158
1159 # Check whether --with-subdir or --without-subdir was given.
1160 if test "${with_subdir+set}" = set; then
1161   withval="$with_subdir"
1162   case "$withval" in
1163         no) ldap_subdir=""
1164                 ;;
1165         yes)
1166                 ;;
1167         /*|\\*)
1168                 ldap_subdir="$withval"
1169                 ;;
1170         *)
1171                 ldap_subdir="/$withval"
1172                 ;;
1173 esac
1174
1175 fi
1176
1177
1178 # OpenLDAP --enable-debug
1179         # Check whether --enable-debug or --disable-debug was given.
1180 if test "${enable_debug+set}" = set; then
1181   enableval="$enable_debug"
1182   
1183         ol_arg=invalid
1184         for ol_val in auto yes no ; do
1185                 if test "$enableval" = "$ol_val" ; then
1186                         ol_arg="$ol_val"
1187                 fi
1188         done
1189         if test "$ol_arg" = "invalid" ; then
1190                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1191         fi
1192         ol_enable_debug="$ol_arg"
1193
1194 else
1195         ol_enable_debug="yes"
1196 fi
1197 # end --enable-debug
1198 # OpenLDAP --enable-syslog
1199         # Check whether --enable-syslog or --disable-syslog was given.
1200 if test "${enable_syslog+set}" = set; then
1201   enableval="$enable_syslog"
1202   
1203         ol_arg=invalid
1204         for ol_val in auto yes no ; do
1205                 if test "$enableval" = "$ol_val" ; then
1206                         ol_arg="$ol_val"
1207                 fi
1208         done
1209         if test "$ol_arg" = "invalid" ; then
1210                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1211         fi
1212         ol_enable_syslog="$ol_arg"
1213
1214 else
1215         ol_enable_syslog="auto"
1216 fi
1217 # end --enable-syslog
1218 # OpenLDAP --enable-proctitle
1219         # Check whether --enable-proctitle or --disable-proctitle was given.
1220 if test "${enable_proctitle+set}" = set; then
1221   enableval="$enable_proctitle"
1222   
1223         ol_arg=invalid
1224         for ol_val in auto yes no ; do
1225                 if test "$enableval" = "$ol_val" ; then
1226                         ol_arg="$ol_val"
1227                 fi
1228         done
1229         if test "$ol_arg" = "invalid" ; then
1230                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1231         fi
1232         ol_enable_proctitle="$ol_arg"
1233
1234 else
1235         ol_enable_proctitle="yes"
1236 fi
1237 # end --enable-proctitle
1238 # OpenLDAP --enable-cache
1239         # Check whether --enable-cache or --disable-cache was given.
1240 if test "${enable_cache+set}" = set; then
1241   enableval="$enable_cache"
1242   
1243         ol_arg=invalid
1244         for ol_val in auto yes no ; do
1245                 if test "$enableval" = "$ol_val" ; then
1246                         ol_arg="$ol_val"
1247                 fi
1248         done
1249         if test "$ol_arg" = "invalid" ; then
1250                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1251         fi
1252         ol_enable_cache="$ol_arg"
1253
1254 else
1255         ol_enable_cache="yes"
1256 fi
1257 # end --enable-cache
1258 # OpenLDAP --enable-dns
1259         # Check whether --enable-dns or --disable-dns was given.
1260 if test "${enable_dns+set}" = set; then
1261   enableval="$enable_dns"
1262   
1263         ol_arg=invalid
1264         for ol_val in auto yes no ; do
1265                 if test "$enableval" = "$ol_val" ; then
1266                         ol_arg="$ol_val"
1267                 fi
1268         done
1269         if test "$ol_arg" = "invalid" ; then
1270                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1271         fi
1272         ol_enable_dns="$ol_arg"
1273
1274 else
1275         ol_enable_dns="no"
1276 fi
1277 # end --enable-dns
1278 # OpenLDAP --enable-referrals
1279         # Check whether --enable-referrals or --disable-referrals was given.
1280 if test "${enable_referrals+set}" = set; then
1281   enableval="$enable_referrals"
1282   
1283         ol_arg=invalid
1284         for ol_val in auto yes no ; do
1285                 if test "$enableval" = "$ol_val" ; then
1286                         ol_arg="$ol_val"
1287                 fi
1288         done
1289         if test "$ol_arg" = "invalid" ; then
1290                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1291         fi
1292         ol_enable_referrals="$ol_arg"
1293
1294 else
1295         ol_enable_referrals="yes"
1296 fi
1297 # end --enable-referrals
1298 # OpenLDAP --enable-kbind
1299         # Check whether --enable-kbind or --disable-kbind was given.
1300 if test "${enable_kbind+set}" = set; then
1301   enableval="$enable_kbind"
1302   
1303         ol_arg=invalid
1304         for ol_val in auto yes no ; do
1305                 if test "$enableval" = "$ol_val" ; then
1306                         ol_arg="$ol_val"
1307                 fi
1308         done
1309         if test "$ol_arg" = "invalid" ; then
1310                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1311         fi
1312         ol_enable_kbind="$ol_arg"
1313
1314 else
1315         ol_enable_kbind="auto"
1316 fi
1317 # end --enable-kbind
1318 # OpenLDAP --enable-cldap
1319         # Check whether --enable-cldap or --disable-cldap was given.
1320 if test "${enable_cldap+set}" = set; then
1321   enableval="$enable_cldap"
1322   
1323         ol_arg=invalid
1324         for ol_val in auto yes no ; do
1325                 if test "$enableval" = "$ol_val" ; then
1326                         ol_arg="$ol_val"
1327                 fi
1328         done
1329         if test "$ol_arg" = "invalid" ; then
1330                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1331         fi
1332         ol_enable_cldap="$ol_arg"
1333
1334 else
1335         ol_enable_cldap="no"
1336 fi
1337 # end --enable-cldap
1338 # OpenLDAP --enable-ldapi
1339         # Check whether --enable-ldapi or --disable-ldapi was given.
1340 if test "${enable_ldapi+set}" = set; then
1341   enableval="$enable_ldapi"
1342   
1343         ol_arg=invalid
1344         for ol_val in auto yes no ; do
1345                 if test "$enableval" = "$ol_val" ; then
1346                         ol_arg="$ol_val"
1347                 fi
1348         done
1349         if test "$ol_arg" = "invalid" ; then
1350                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1351         fi
1352         ol_enable_ldapi="$ol_arg"
1353
1354 else
1355         ol_enable_ldapi="no"
1356 fi
1357 # end --enable-ldapi
1358 # OpenLDAP --enable-x_compile
1359         # Check whether --enable-x_compile or --disable-x_compile was given.
1360 if test "${enable_x_compile+set}" = set; then
1361   enableval="$enable_x_compile"
1362   
1363         ol_arg=invalid
1364         for ol_val in yes no ; do
1365                 if test "$enableval" = "$ol_val" ; then
1366                         ol_arg="$ol_val"
1367                 fi
1368         done
1369         if test "$ol_arg" = "invalid" ; then
1370                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1371         fi
1372         ol_enable_x_compile="$ol_arg"
1373
1374 else
1375         ol_enable_x_compile="no"
1376 fi
1377 # end --enable-x_compile
1378
1379 # OpenLDAP --enable-dmalloc
1380         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1381 if test "${enable_dmalloc+set}" = set; then
1382   enableval="$enable_dmalloc"
1383   
1384         ol_arg=invalid
1385         for ol_val in auto yes no ; do
1386                 if test "$enableval" = "$ol_val" ; then
1387                         ol_arg="$ol_val"
1388                 fi
1389         done
1390         if test "$ol_arg" = "invalid" ; then
1391                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1392         fi
1393         ol_enable_dmalloc="$ol_arg"
1394
1395 else
1396         ol_enable_dmalloc="no"
1397 fi
1398 # end --enable-dmalloc
1399
1400 # OpenLDAP --with-cyrus_sasl
1401         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1402 if test "${with_cyrus_sasl+set}" = set; then
1403   withval="$with_cyrus_sasl"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no  ; do
1407                 if test "$withval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1413         fi
1414         ol_with_cyrus_sasl="$ol_arg"
1415
1416 else
1417         ol_with_cyrus_sasl="auto"
1418 fi
1419 # end --with-cyrus_sasl
1420
1421 # OpenLDAP --with-fetch
1422         # Check whether --with-fetch or --without-fetch was given.
1423 if test "${with_fetch+set}" = set; then
1424   withval="$with_fetch"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no  ; do
1428                 if test "$withval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1434         fi
1435         ol_with_fetch="$ol_arg"
1436
1437 else
1438         ol_with_fetch="auto"
1439 fi
1440 # end --with-fetch
1441
1442 # OpenLDAP --with-kerberos
1443         # Check whether --with-kerberos or --without-kerberos was given.
1444 if test "${with_kerberos+set}" = set; then
1445   withval="$with_kerberos"
1446   
1447         ol_arg=invalid
1448         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1449                 if test "$withval" = "$ol_val" ; then
1450                         ol_arg="$ol_val"
1451                 fi
1452         done
1453         if test "$ol_arg" = "invalid" ; then
1454                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1455         fi
1456         ol_with_kerberos="$ol_arg"
1457
1458 else
1459         ol_with_kerberos="auto"
1460 fi
1461 # end --with-kerberos
1462
1463 # OpenLDAP --with-readline
1464         # Check whether --with-readline or --without-readline was given.
1465 if test "${with_readline+set}" = set; then
1466   withval="$with_readline"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no  ; do
1470                 if test "$withval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1476         fi
1477         ol_with_readline="$ol_arg"
1478
1479 else
1480         ol_with_readline="auto"
1481 fi
1482 # end --with-readline
1483
1484 # OpenLDAP --with-threads
1485         # Check whether --with-threads or --without-threads was given.
1486 if test "${with_threads+set}" = set; then
1487   withval="$with_threads"
1488   
1489         ol_arg=invalid
1490         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1491                 if test "$withval" = "$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 $withval for --with-threads" 1>&2; exit 1; }
1497         fi
1498         ol_with_threads="$ol_arg"
1499
1500 else
1501         ol_with_threads="auto"
1502 fi
1503 # end --with-threads
1504
1505 # OpenLDAP --with-tls
1506         # Check whether --with-tls or --without-tls was given.
1507 if test "${with_tls+set}" = set; then
1508   withval="$with_tls"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto ssleay openssl yes no  ; do
1512                 if test "$withval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1518         fi
1519         ol_with_tls="$ol_arg"
1520
1521 else
1522         ol_with_tls="auto"
1523 fi
1524 # end --with-tls
1525
1526 # OpenLDAP --with-yielding_select
1527         # Check whether --with-yielding_select or --without-yielding_select was given.
1528 if test "${with_yielding_select+set}" = set; then
1529   withval="$with_yielding_select"
1530   
1531         ol_arg=invalid
1532         for ol_val in auto yes no manual  ; do
1533                 if test "$withval" = "$ol_val" ; then
1534                         ol_arg="$ol_val"
1535                 fi
1536         done
1537         if test "$ol_arg" = "invalid" ; then
1538                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1539         fi
1540         ol_with_yielding_select="$ol_arg"
1541
1542 else
1543         ol_with_yielding_select="auto"
1544 fi
1545 # end --with-yielding_select
1546
1547
1548 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1549 if test "${with_xxldapdoptions+set}" = set; then
1550   withval="$with_xxldapdoptions"
1551   :
1552 fi
1553
1554 # OpenLDAP --enable-ldapd
1555         # Check whether --enable-ldapd or --disable-ldapd was given.
1556 if test "${enable_ldapd+set}" = set; then
1557   enableval="$enable_ldapd"
1558   
1559         ol_arg=invalid
1560         for ol_val in auto yes no ; do
1561                 if test "$enableval" = "$ol_val" ; then
1562                         ol_arg="$ol_val"
1563                 fi
1564         done
1565         if test "$ol_arg" = "invalid" ; then
1566                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1567         fi
1568         ol_enable_ldapd="$ol_arg"
1569
1570 else
1571         ol_enable_ldapd="no"
1572 fi
1573 # end --enable-ldapd
1574
1575 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1576 if test "${with_xxslapdoptions+set}" = set; then
1577   withval="$with_xxslapdoptions"
1578   :
1579 fi
1580
1581 # OpenLDAP --enable-slapd
1582         # Check whether --enable-slapd or --disable-slapd was given.
1583 if test "${enable_slapd+set}" = set; then
1584   enableval="$enable_slapd"
1585   
1586         ol_arg=invalid
1587         for ol_val in auto yes no ; do
1588                 if test "$enableval" = "$ol_val" ; then
1589                         ol_arg="$ol_val"
1590                 fi
1591         done
1592         if test "$ol_arg" = "invalid" ; then
1593                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1594         fi
1595         ol_enable_slapd="$ol_arg"
1596
1597 else
1598         ol_enable_slapd="yes"
1599 fi
1600 # end --enable-slapd
1601 # OpenLDAP --enable-cleartext
1602         # Check whether --enable-cleartext or --disable-cleartext was given.
1603 if test "${enable_cleartext+set}" = set; then
1604   enableval="$enable_cleartext"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto yes no ; do
1608                 if test "$enableval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1614         fi
1615         ol_enable_cleartext="$ol_arg"
1616
1617 else
1618         ol_enable_cleartext="yes"
1619 fi
1620 # end --enable-cleartext
1621 # OpenLDAP --enable-crypt
1622         # Check whether --enable-crypt or --disable-crypt was given.
1623 if test "${enable_crypt+set}" = set; then
1624   enableval="$enable_crypt"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto yes no ; do
1628                 if test "$enableval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1634         fi
1635         ol_enable_crypt="$ol_arg"
1636
1637 else
1638         ol_enable_crypt="auto"
1639 fi
1640 # end --enable-crypt
1641 # OpenLDAP --enable-kpasswd
1642         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1643 if test "${enable_kpasswd+set}" = set; then
1644   enableval="$enable_kpasswd"
1645   
1646         ol_arg=invalid
1647         for ol_val in auto yes no ; do
1648                 if test "$enableval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1654         fi
1655         ol_enable_kpasswd="$ol_arg"
1656
1657 else
1658         ol_enable_kpasswd="no"
1659 fi
1660 # end --enable-kpasswd
1661 # OpenLDAP --enable-spasswd
1662         # Check whether --enable-spasswd or --disable-spasswd was given.
1663 if test "${enable_spasswd+set}" = set; then
1664   enableval="$enable_spasswd"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1674         fi
1675         ol_enable_spasswd="$ol_arg"
1676
1677 else
1678         ol_enable_spasswd="no"
1679 fi
1680 # end --enable-spasswd
1681 # OpenLDAP --enable-modules
1682         # Check whether --enable-modules or --disable-modules was given.
1683 if test "${enable_modules+set}" = set; then
1684   enableval="$enable_modules"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto yes no ; do
1688                 if test "$enableval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1694         fi
1695         ol_enable_modules="$ol_arg"
1696
1697 else
1698         ol_enable_modules="no"
1699 fi
1700 # end --enable-modules
1701 # OpenLDAP --enable-multimaster
1702         # Check whether --enable-multimaster or --disable-multimaster was given.
1703 if test "${enable_multimaster+set}" = set; then
1704   enableval="$enable_multimaster"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto yes no ; do
1708                 if test "$enableval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1714         fi
1715         ol_enable_multimaster="$ol_arg"
1716
1717 else
1718         ol_enable_multimaster="no"
1719 fi
1720 # end --enable-multimaster
1721 # OpenLDAP --enable-phonetic
1722         # Check whether --enable-phonetic or --disable-phonetic was given.
1723 if test "${enable_phonetic+set}" = set; then
1724   enableval="$enable_phonetic"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1734         fi
1735         ol_enable_phonetic="$ol_arg"
1736
1737 else
1738         ol_enable_phonetic="no"
1739 fi
1740 # end --enable-phonetic
1741 # OpenLDAP --enable-quipu
1742         # Check whether --enable-quipu or --disable-quipu was given.
1743 if test "${enable_quipu+set}" = set; then
1744   enableval="$enable_quipu"
1745   
1746         ol_arg=invalid
1747         for ol_val in auto yes no ; do
1748                 if test "$enableval" = "$ol_val" ; then
1749                         ol_arg="$ol_val"
1750                 fi
1751         done
1752         if test "$ol_arg" = "invalid" ; then
1753                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1754         fi
1755         ol_enable_quipu="$ol_arg"
1756
1757 else
1758         ol_enable_quipu="no"
1759 fi
1760 # end --enable-quipu
1761 # OpenLDAP --enable-rlookups
1762         # Check whether --enable-rlookups or --disable-rlookups was given.
1763 if test "${enable_rlookups+set}" = set; then
1764   enableval="$enable_rlookups"
1765   
1766         ol_arg=invalid
1767         for ol_val in auto yes no ; do
1768                 if test "$enableval" = "$ol_val" ; then
1769                         ol_arg="$ol_val"
1770                 fi
1771         done
1772         if test "$ol_arg" = "invalid" ; then
1773                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1774         fi
1775         ol_enable_rlookups="$ol_arg"
1776
1777 else
1778         ol_enable_rlookups="auto"
1779 fi
1780 # end --enable-rlookups
1781 # OpenLDAP --enable-aci
1782         # Check whether --enable-aci or --disable-aci was given.
1783 if test "${enable_aci+set}" = set; then
1784   enableval="$enable_aci"
1785   
1786         ol_arg=invalid
1787         for ol_val in auto yes no ; do
1788                 if test "$enableval" = "$ol_val" ; then
1789                         ol_arg="$ol_val"
1790                 fi
1791         done
1792         if test "$ol_arg" = "invalid" ; then
1793                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1794         fi
1795         ol_enable_aci="$ol_arg"
1796
1797 else
1798         ol_enable_aci="no"
1799 fi
1800 # end --enable-aci
1801 # OpenLDAP --enable-wrappers
1802         # Check whether --enable-wrappers or --disable-wrappers was given.
1803 if test "${enable_wrappers+set}" = set; then
1804   enableval="$enable_wrappers"
1805   
1806         ol_arg=invalid
1807         for ol_val in auto yes no ; do
1808                 if test "$enableval" = "$ol_val" ; then
1809                         ol_arg="$ol_val"
1810                 fi
1811         done
1812         if test "$ol_arg" = "invalid" ; then
1813                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1814         fi
1815         ol_enable_wrappers="$ol_arg"
1816
1817 else
1818         ol_enable_wrappers="no"
1819 fi
1820 # end --enable-wrappers
1821 # OpenLDAP --enable-dynamic
1822         # Check whether --enable-dynamic or --disable-dynamic was given.
1823 if test "${enable_dynamic+set}" = set; then
1824   enableval="$enable_dynamic"
1825   
1826         ol_arg=invalid
1827         for ol_val in auto yes no ; do
1828                 if test "$enableval" = "$ol_val" ; then
1829                         ol_arg="$ol_val"
1830                 fi
1831         done
1832         if test "$ol_arg" = "invalid" ; then
1833                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1834         fi
1835         ol_enable_dynamic="$ol_arg"
1836
1837 else
1838         ol_enable_dynamic="no"
1839 fi
1840 # end --enable-dynamic
1841
1842 # OpenLDAP --enable-bdb2
1843         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1844 if test "${enable_bdb2+set}" = set; then
1845   enableval="$enable_bdb2"
1846   
1847         ol_arg=invalid
1848         for ol_val in auto yes no ; do
1849                 if test "$enableval" = "$ol_val" ; then
1850                         ol_arg="$ol_val"
1851                 fi
1852         done
1853         if test "$ol_arg" = "invalid" ; then
1854                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1855         fi
1856         ol_enable_bdb2="$ol_arg"
1857
1858 else
1859         ol_enable_bdb2="no"
1860 fi
1861 # end --enable-bdb2
1862 # OpenLDAP --with-bdb2_module
1863         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1864 if test "${with_bdb2_module+set}" = set; then
1865   withval="$with_bdb2_module"
1866   
1867         ol_arg=invalid
1868         for ol_val in static dynamic ; do
1869                 if test "$withval" = "$ol_val" ; then
1870                         ol_arg="$ol_val"
1871                 fi
1872         done
1873         if test "$ol_arg" = "invalid" ; then
1874                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1875         fi
1876         ol_with_bdb2_module="$ol_arg"
1877
1878 else
1879         ol_with_bdb2_module="static"
1880 fi
1881 # end --with-bdb2_module
1882
1883 # OpenLDAP --enable-ldap
1884         # Check whether --enable-ldap or --disable-ldap was given.
1885 if test "${enable_ldap+set}" = set; then
1886   enableval="$enable_ldap"
1887   
1888         ol_arg=invalid
1889         for ol_val in auto yes no ; do
1890                 if test "$enableval" = "$ol_val" ; then
1891                         ol_arg="$ol_val"
1892                 fi
1893         done
1894         if test "$ol_arg" = "invalid" ; then
1895                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1896         fi
1897         ol_enable_ldap="$ol_arg"
1898
1899 else
1900         ol_enable_ldap="no"
1901 fi
1902 # end --enable-ldap
1903 # OpenLDAP --with-ldap_module
1904         # Check whether --with-ldap_module or --without-ldap_module was given.
1905 if test "${with_ldap_module+set}" = set; then
1906   withval="$with_ldap_module"
1907   
1908         ol_arg=invalid
1909         for ol_val in static dynamic ; do
1910                 if test "$withval" = "$ol_val" ; then
1911                         ol_arg="$ol_val"
1912                 fi
1913         done
1914         if test "$ol_arg" = "invalid" ; then
1915                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1916         fi
1917         ol_with_ldap_module="$ol_arg"
1918
1919 else
1920         ol_with_ldap_module="static"
1921 fi
1922 # end --with-ldap_module
1923
1924 # OpenLDAP --enable-ldbm
1925         # Check whether --enable-ldbm or --disable-ldbm was given.
1926 if test "${enable_ldbm+set}" = set; then
1927   enableval="$enable_ldbm"
1928   
1929         ol_arg=invalid
1930         for ol_val in auto yes no ; do
1931                 if test "$enableval" = "$ol_val" ; then
1932                         ol_arg="$ol_val"
1933                 fi
1934         done
1935         if test "$ol_arg" = "invalid" ; then
1936                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1937         fi
1938         ol_enable_ldbm="$ol_arg"
1939
1940 else
1941         ol_enable_ldbm="yes"
1942 fi
1943 # end --enable-ldbm
1944 # OpenLDAP --with-ldbm_api
1945         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1946 if test "${with_ldbm_api+set}" = set; then
1947   withval="$with_ldbm_api"
1948   
1949         ol_arg=invalid
1950         for ol_val in auto db2 db mdbm gdbm manual ; do
1951                 if test "$withval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1957         fi
1958         ol_with_ldbm_api="$ol_arg"
1959
1960 else
1961         ol_with_ldbm_api="auto"
1962 fi
1963 # end --with-ldbm_api
1964
1965 # OpenLDAP --with-ldbm_module
1966         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1967 if test "${with_ldbm_module+set}" = set; then
1968   withval="$with_ldbm_module"
1969   
1970         ol_arg=invalid
1971         for ol_val in static dynamic ; do
1972                 if test "$withval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1978         fi
1979         ol_with_ldbm_module="$ol_arg"
1980
1981 else
1982         ol_with_ldbm_module="static"
1983 fi
1984 # end --with-ldbm_module
1985
1986 # OpenLDAP --with-ldbm_type
1987         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1988 if test "${with_ldbm_type+set}" = set; then
1989   withval="$with_ldbm_type"
1990   
1991         ol_arg=invalid
1992         for ol_val in auto btree hash ; do
1993                 if test "$withval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1999         fi
2000         ol_with_ldbm_type="$ol_arg"
2001
2002 else
2003         ol_with_ldbm_type="auto"
2004 fi
2005 # end --with-ldbm_type
2006
2007
2008 # OpenLDAP --enable-passwd
2009         # Check whether --enable-passwd or --disable-passwd was given.
2010 if test "${enable_passwd+set}" = set; then
2011   enableval="$enable_passwd"
2012   
2013         ol_arg=invalid
2014         for ol_val in auto yes no ; do
2015                 if test "$enableval" = "$ol_val" ; then
2016                         ol_arg="$ol_val"
2017                 fi
2018         done
2019         if test "$ol_arg" = "invalid" ; then
2020                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2021         fi
2022         ol_enable_passwd="$ol_arg"
2023
2024 else
2025         ol_enable_passwd="no"
2026 fi
2027 # end --enable-passwd
2028 # OpenLDAP --with-passwd_module
2029         # Check whether --with-passwd_module or --without-passwd_module was given.
2030 if test "${with_passwd_module+set}" = set; then
2031   withval="$with_passwd_module"
2032   
2033         ol_arg=invalid
2034         for ol_val in static dynamic ; do
2035                 if test "$withval" = "$ol_val" ; then
2036                         ol_arg="$ol_val"
2037                 fi
2038         done
2039         if test "$ol_arg" = "invalid" ; then
2040                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2041         fi
2042         ol_with_passwd_module="$ol_arg"
2043
2044 else
2045         ol_with_passwd_module="static"
2046 fi
2047 # end --with-passwd_module
2048
2049 # OpenLDAP --enable-perl
2050         # Check whether --enable-perl or --disable-perl was given.
2051 if test "${enable_perl+set}" = set; then
2052   enableval="$enable_perl"
2053   
2054         ol_arg=invalid
2055         for ol_val in auto yes no ; do
2056                 if test "$enableval" = "$ol_val" ; then
2057                         ol_arg="$ol_val"
2058                 fi
2059         done
2060         if test "$ol_arg" = "invalid" ; then
2061                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2062         fi
2063         ol_enable_perl="$ol_arg"
2064
2065 else
2066         ol_enable_perl="no"
2067 fi
2068 # end --enable-perl
2069 # OpenLDAP --with-perl_module
2070         # Check whether --with-perl_module or --without-perl_module was given.
2071 if test "${with_perl_module+set}" = set; then
2072   withval="$with_perl_module"
2073   
2074         ol_arg=invalid
2075         for ol_val in static dynamic ; do
2076                 if test "$withval" = "$ol_val" ; then
2077                         ol_arg="$ol_val"
2078                 fi
2079         done
2080         if test "$ol_arg" = "invalid" ; then
2081                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2082         fi
2083         ol_with_perl_module="$ol_arg"
2084
2085 else
2086         ol_with_perl_module="static"
2087 fi
2088 # end --with-perl_module
2089
2090 # OpenLDAP --enable-shell
2091         # Check whether --enable-shell or --disable-shell was given.
2092 if test "${enable_shell+set}" = set; then
2093   enableval="$enable_shell"
2094   
2095         ol_arg=invalid
2096         for ol_val in auto yes no ; do
2097                 if test "$enableval" = "$ol_val" ; then
2098                         ol_arg="$ol_val"
2099                 fi
2100         done
2101         if test "$ol_arg" = "invalid" ; then
2102                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2103         fi
2104         ol_enable_shell="$ol_arg"
2105
2106 else
2107         ol_enable_shell="no"
2108 fi
2109 # end --enable-shell
2110 # OpenLDAP --with-shell_module
2111         # Check whether --with-shell_module or --without-shell_module was given.
2112 if test "${with_shell_module+set}" = set; then
2113   withval="$with_shell_module"
2114   
2115         ol_arg=invalid
2116         for ol_val in static dynamic ; do
2117                 if test "$withval" = "$ol_val" ; then
2118                         ol_arg="$ol_val"
2119                 fi
2120         done
2121         if test "$ol_arg" = "invalid" ; then
2122                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2123         fi
2124         ol_with_shell_module="$ol_arg"
2125
2126 else
2127         ol_with_shell_module="static"
2128 fi
2129 # end --with-shell_module
2130
2131 # OpenLDAP --enable-tcl
2132         # Check whether --enable-tcl or --disable-tcl was given.
2133 if test "${enable_tcl+set}" = set; then
2134   enableval="$enable_tcl"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto yes no ; do
2138                 if test "$enableval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2144         fi
2145         ol_enable_tcl="$ol_arg"
2146
2147 else
2148         ol_enable_tcl="no"
2149 fi
2150 # end --enable-tcl
2151 # OpenLDAP --with-tcl_module
2152         # Check whether --with-tcl_module or --without-tcl_module was given.
2153 if test "${with_tcl_module+set}" = set; then
2154   withval="$with_tcl_module"
2155   
2156         ol_arg=invalid
2157         for ol_val in static dynamic ; do
2158                 if test "$withval" = "$ol_val" ; then
2159                         ol_arg="$ol_val"
2160                 fi
2161         done
2162         if test "$ol_arg" = "invalid" ; then
2163                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2164         fi
2165         ol_with_tcl_module="$ol_arg"
2166
2167 else
2168         ol_with_tcl_module="static"
2169 fi
2170 # end --with-tcl_module
2171
2172 # OpenLDAP --enable-sql
2173         # Check whether --enable-sql or --disable-sql was given.
2174 if test "${enable_sql+set}" = set; then
2175   enableval="$enable_sql"
2176   
2177         ol_arg=invalid
2178         for ol_val in auto yes no ; do
2179                 if test "$enableval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2185         fi
2186         ol_enable_sql="$ol_arg"
2187
2188 else
2189         ol_enable_sql="no"
2190 fi
2191 # end --enable-sql
2192 # OpenLDAP --with-sql_module
2193         # Check whether --with-sql_module or --without-sql_module was given.
2194 if test "${with_sql_module+set}" = set; then
2195   withval="$with_sql_module"
2196   
2197         ol_arg=invalid
2198         for ol_val in static dynamic ; do
2199                 if test "$withval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2205         fi
2206         ol_with_sql_module="$ol_arg"
2207
2208 else
2209         ol_with_sql_module="static"
2210 fi
2211 # end --with-sql_module
2212
2213
2214 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2215 if test "${with_xxslurpdoptions+set}" = set; then
2216   withval="$with_xxslurpdoptions"
2217   :
2218 fi
2219
2220 # OpenLDAP --enable-slurpd
2221         # Check whether --enable-slurpd or --disable-slurpd was given.
2222 if test "${enable_slurpd+set}" = set; then
2223   enableval="$enable_slurpd"
2224   
2225         ol_arg=invalid
2226         for ol_val in auto yes no ; do
2227                 if test "$enableval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2233         fi
2234         ol_enable_slurpd="$ol_arg"
2235
2236 else
2237         ol_enable_slurpd="auto"
2238 fi
2239 # end --enable-slurpd
2240
2241 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2242 if test "${with_xxliboptions+set}" = set; then
2243   withval="$with_xxliboptions"
2244   :
2245 fi
2246
2247 # Check whether --enable-static or --disable-static was given.
2248 if test "${enable_static+set}" = set; then
2249   enableval="$enable_static"
2250   p=${PACKAGE-default}
2251 case "$enableval" in
2252 yes) enable_static=yes ;;
2253 no) enable_static=no ;;
2254 *)
2255   enable_static=no
2256   # Look at the argument we got.  We use all the common list separators.
2257   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2258   for pkg in $enableval; do
2259     if test "X$pkg" = "X$p"; then
2260       enable_static=yes
2261     fi
2262   done
2263   IFS="$ac_save_ifs"
2264   ;;
2265 esac
2266 else
2267   enable_static=yes
2268 fi
2269
2270 # Check whether --enable-shared or --disable-shared was given.
2271 if test "${enable_shared+set}" = set; then
2272   enableval="$enable_shared"
2273   p=${PACKAGE-default}
2274 case "$enableval" in
2275 yes) enable_shared=yes ;;
2276 no) enable_shared=no ;;
2277 *)
2278   enable_shared=no
2279   # Look at the argument we got.  We use all the common list separators.
2280   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2281   for pkg in $enableval; do
2282     if test "X$pkg" = "X$p"; then
2283       enable_shared=yes
2284     fi
2285   done
2286   IFS="$ac_save_ifs"
2287   ;;
2288 esac
2289 else
2290   enable_shared=yes
2291 fi
2292
2293
2294
2295 # validate options
2296 if test $ol_enable_dns = yes ; then
2297         if test $ol_enable_referrals = no ; then
2298                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2299         fi
2300         if test $ol_enable_referrals = auto ; then
2301                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2302                 ol_enable_referrals=yes
2303         fi
2304 fi
2305
2306 if test $ol_enable_slapd = no ; then
2307                 if test $ol_enable_bdb2 = yes ; then
2308                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2309         fi
2310         if test $ol_enable_ldap = yes ; then
2311                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2312         fi
2313         if test $ol_enable_ldbm = yes ; then
2314                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2315         fi
2316         if test $ol_enable_passwd = yes ; then
2317                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2318         fi
2319         if test $ol_enable_perl = yes ; then
2320                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2321         fi
2322         if test $ol_enable_shell = yes ; then
2323                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2324         fi
2325         if test $ol_enable_tcl = yes ; then
2326                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2327         fi
2328         if test $ol_enable_sql = yes ; then
2329                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2330         fi
2331         if test $ol_enable_modules = yes ; then
2332                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2333         fi
2334         if test $ol_enable_multimaster = yes ; then
2335                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2336         fi
2337         if test $ol_enable_wrappers = yes ; then
2338                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2339         fi
2340         if test $ol_enable_phonetic = yes ; then
2341                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2342         fi
2343         if test $ol_enable_quipu = yes ; then
2344                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2345         fi
2346         if test $ol_enable_rlookups = yes ; then
2347                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2348         fi
2349         if test $ol_enable_aci = yes ; then
2350                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2351         fi
2352         if test $ol_with_ldbm_api != auto ; then
2353                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2354         fi
2355         if test $ol_with_ldbm_type != auto ; then
2356                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2357         fi
2358         if test $ol_with_bdb2_module != static ; then
2359                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2360         fi
2361         if test $ol_with_ldap_module != static ; then
2362                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2363         fi
2364         if test $ol_with_ldbm_module != static ; then
2365                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2366         fi
2367         if test $ol_with_passwd_module != static ; then
2368                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2369         fi
2370         if test $ol_with_perl_module != static ; then
2371                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2372         fi
2373         if test $ol_with_shell_module != static ; then
2374                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2375         fi
2376         if test $ol_with_tcl_module != static ; then
2377                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2378         fi
2379         if test $ol_with_sql_module != static ; then
2380                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2381         fi
2382         if test $ol_enable_slurpd = yes ; then
2383                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2384         fi
2385
2386         # force settings to no
2387         ol_enable_bdb2=no
2388         ol_enable_ldap=no
2389         ol_enable_ldbm=no
2390         ol_enable_passwd=no
2391         ol_enable_perl=no
2392         ol_enable_shell=no
2393         ol_enable_tcl=no
2394         ol_enable_sql=no
2395
2396         ol_enable_modules=no
2397         ol_enable_multimaster=no
2398         ol_enable_phonetic=no
2399         ol_enable_quipu=no
2400         ol_enable_rlookups=no
2401         ol_enable_aci=no
2402         ol_enable_wrappers=no
2403         ol_enable_dynamic=no
2404
2405         ol_with_ldbm_api=no
2406         ol_with_ldbm_type=no
2407
2408         ol_with_bdb2_module=static
2409         ol_with_ldap_module=static
2410         ol_with_ldbm_module=static
2411         ol_with_passwd_module=static
2412         ol_with_perl_module=static
2413         ol_with_shell_module=static
2414         ol_with_tcl_module=static
2415         ol_with_sql_module=static
2416
2417         ol_enable_slurpd=no
2418
2419 elif test $ol_enable_ldbm = no ; then
2420         
2421         if test $ol_with_ldbm_api != auto ; then
2422                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2423         fi
2424
2425         if test $ol_with_ldbm_type != auto ; then
2426                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2427         fi
2428
2429         if test $ol_with_ldbm_module != static ; then
2430                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2431         fi
2432
2433         if test $ol_enable_bdb2 = yes ; then
2434                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2435         fi
2436
2437         if test $ol_enable_modules != yes -a \
2438                 $ol_enable_ldap = no -a \
2439                 $ol_enable_passwd = no -a \
2440                 $ol_enable_perl = no -a \
2441                 $ol_enable_shell = no -a \
2442                 $ol_enable_tcl = no -a \
2443                 $ol_enable_sql = no ; then
2444                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2445         fi
2446
2447         ol_with_ldbm_api=no
2448         ol_with_ldbm_type=no
2449         ol_with_ldbm_module=static
2450
2451 elif test $ol_enable_bdb2 = yes ; then
2452         
2453         if test $ol_with_ldbm_api != auto -a \
2454                 $ol_with_ldbm_api != db2 ; then
2455                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2456         fi
2457
2458         ol_with_ldbm_api=db2
2459
2460 else
2461         
2462         if test $ol_enable_bdb2 != no ; then
2463                 if test $ol_with_ldbm_api != auto -a \
2464                         $ol_with_ldbm_api != db2 ; then
2465                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2466                         ol_enable_bdb2=no
2467                 fi
2468         fi
2469
2470         if test $ol_with_ldbm_api = gdbm -a \
2471                 $ol_with_ldbm_type = btree ; then
2472                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2473         fi
2474         if test $ol_with_ldbm_api = mdbm -a \
2475                 $ol_with_ldbm_type = btree ; then
2476                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2477         fi
2478         if test $ol_with_ldbm_api = ndbm -a \
2479                 $ol_with_ldbm_type = btree ; then
2480                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2481         fi
2482 fi
2483
2484 if test $ol_enable_slurpd = yes ; then
2485                 if test $ol_with_threads = no ; then
2486                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2487         fi
2488 fi
2489
2490 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2491         if test $ol_with_kerberos = no ; then
2492                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2493         fi
2494 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2495         if test $ol_with_kerberos != auto ; then
2496                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2497         else
2498                 ol_with_kerberos=no
2499         fi
2500 fi
2501
2502 if test $ol_enable_spasswd = yes ; then
2503         if test $ol_with_cyrus_sasl = no ; then
2504                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2505         fi
2506         ol_with_cyrus_sasl=yes
2507 fi
2508
2509 echo "$ac_t""done" 1>&6
2510
2511 LDAP_LIBS=
2512 LDIF_LIBS=
2513 LDBM_LIBS=
2514 LTHREAD_LIBS=
2515 LUTIL_LIBS=
2516
2517 LDAPD_LIBS=
2518 SLAPD_LIBS=
2519 SLURPD_LIBS=
2520
2521 BUILD_LDAPD=no
2522 BUILD_SLAPD=no
2523 BUILD_SLURPD=no
2524
2525 BUILD_BDB2=no
2526 BUILD_LDAP=no
2527 BUILD_LDBM=no
2528 BUILD_PASSWD=no
2529 BUILD_PERL=no
2530 BUILD_QUIPU=no
2531 BUILD_SHELL=no
2532 BUILD_TCL=no
2533 BUILD_SQL=no
2534 BUILD_THREAD=no
2535
2536 BUILD_BDB2_DYNAMIC=static
2537 BUILD_LDAP_DYNAMIC=static
2538 BUILD_LDBM_DYNAMIC=static
2539 BUILD_PASSWD_DYNAMIC=static
2540 BUILD_PERL_DYNAMIC=static
2541 BUILD_SHELL_DYNAMIC=static
2542 BUILD_TCL_DYNAMIC=static
2543 BUILD_SQL_DYNAMIC=static
2544
2545 SLAPD_MODULES_LDFLAGS=
2546 SLAPD_MODULES_CPPFLAGS=
2547 SLAPD_MODULES_LIST=
2548
2549 SLAPD_PERL_LDFLAGS=
2550 MOD_PERL_LDFLAGS=
2551 PERL_CPPFLAGS=
2552
2553 SLAPD_SQL_LDFLAGS=
2554 SLAPD_SQL_LIBS=
2555 SLAPD_SQL_INCLUDES=
2556
2557 MOD_TCL_LIB=
2558 KRB4_LIBS=
2559 KRB5_LIBS=
2560 READLINE_LIBS=
2561 SASL_LIBS=
2562 TERMCAP_LIBS=
2563 TLS_LIBS=
2564 MODULES_LIBS=
2565
2566
2567
2568 cat >> confdefs.h <<\EOF
2569 #define HAVE_MKVERSION 1
2570 EOF
2571
2572
2573
2574
2575 ol_aix_threads=no
2576 case "$target" in
2577 *-*-aix*)       if test -z "$CC" ; then
2578                 case "$ol_with_threads" in
2579                 auto | yes |  posix) ol_aix_threads=yes ;;
2580                 esac
2581         fi
2582 ;;
2583 esac
2584
2585 if test $ol_aix_threads = yes ; then
2586         if test -z "${CC}" ; then
2587                 for ac_prog in cc_r xlc_r cc
2588 do
2589 # Extract the first word of "$ac_prog", so it can be a program name with args.
2590 set dummy $ac_prog; ac_word=$2
2591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2592 echo "configure:2593: checking for $ac_word" >&5
2593 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2594   echo $ac_n "(cached) $ac_c" 1>&6
2595 else
2596   if test -n "$CC"; then
2597   ac_cv_prog_CC="$CC" # Let the user override the test.
2598 else
2599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2600   ac_dummy="$PATH"
2601   for ac_dir in $ac_dummy; do
2602     test -z "$ac_dir" && ac_dir=.
2603     if test -f $ac_dir/$ac_word; then
2604       ac_cv_prog_CC="$ac_prog"
2605       break
2606     fi
2607   done
2608   IFS="$ac_save_ifs"
2609 fi
2610 fi
2611 CC="$ac_cv_prog_CC"
2612 if test -n "$CC"; then
2613   echo "$ac_t""$CC" 1>&6
2614 else
2615   echo "$ac_t""no" 1>&6
2616 fi
2617
2618 test -n "$CC" && break
2619 done
2620
2621
2622                 if test "$CC" = cc ; then
2623                                                 if test $ol_with_threads != auto ; then
2624                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2625                         else
2626                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2627                         fi
2628                         ol_with_threads=no
2629                 fi
2630         fi
2631
2632         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2633                 ol_with_threads=posix
2634                 ol_cv_pthread_create=yes
2635         fi
2636 fi
2637
2638 if test -z "${CC}"; then
2639         for ac_prog in cc
2640 do
2641 # Extract the first word of "$ac_prog", so it can be a program name with args.
2642 set dummy $ac_prog; ac_word=$2
2643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2644 echo "configure:2645: checking for $ac_word" >&5
2645 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   if test -n "$CC"; then
2649   ac_cv_prog_CC="$CC" # Let the user override the test.
2650 else
2651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2652   ac_dummy="$PATH"
2653   for ac_dir in $ac_dummy; do
2654     test -z "$ac_dir" && ac_dir=.
2655     if test -f $ac_dir/$ac_word; then
2656       ac_cv_prog_CC="$ac_prog"
2657       break
2658     fi
2659   done
2660   IFS="$ac_save_ifs"
2661 fi
2662 fi
2663 CC="$ac_cv_prog_CC"
2664 if test -n "$CC"; then
2665   echo "$ac_t""$CC" 1>&6
2666 else
2667   echo "$ac_t""no" 1>&6
2668 fi
2669
2670 test -n "$CC" && break
2671 done
2672
2673 fi
2674
2675
2676
2677
2678 # Check whether --enable-fast-install or --disable-fast-install was given.
2679 if test "${enable_fast_install+set}" = set; then
2680   enableval="$enable_fast_install"
2681   p=${PACKAGE-default}
2682 case "$enableval" in
2683 yes) enable_fast_install=yes ;;
2684 no) enable_fast_install=no ;;
2685 *)
2686   enable_fast_install=no
2687   # Look at the argument we got.  We use all the common list separators.
2688   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2689   for pkg in $enableval; do
2690     if test "X$pkg" = "X$p"; then
2691       enable_fast_install=yes
2692     fi
2693   done
2694   IFS="$ac_save_ifs"
2695   ;;
2696 esac
2697 else
2698   enable_fast_install=yes
2699 fi
2700
2701 # Extract the first word of "ranlib", so it can be a program name with args.
2702 set dummy ranlib; ac_word=$2
2703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2704 echo "configure:2705: checking for $ac_word" >&5
2705 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2706   echo $ac_n "(cached) $ac_c" 1>&6
2707 else
2708   if test -n "$RANLIB"; then
2709   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2710 else
2711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2712   ac_dummy="$PATH"
2713   for ac_dir in $ac_dummy; do
2714     test -z "$ac_dir" && ac_dir=.
2715     if test -f $ac_dir/$ac_word; then
2716       ac_cv_prog_RANLIB="ranlib"
2717       break
2718     fi
2719   done
2720   IFS="$ac_save_ifs"
2721   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2722 fi
2723 fi
2724 RANLIB="$ac_cv_prog_RANLIB"
2725 if test -n "$RANLIB"; then
2726   echo "$ac_t""$RANLIB" 1>&6
2727 else
2728   echo "$ac_t""no" 1>&6
2729 fi
2730
2731 # Extract the first word of "gcc", so it can be a program name with args.
2732 set dummy gcc; ac_word=$2
2733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2734 echo "configure:2735: checking for $ac_word" >&5
2735 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2736   echo $ac_n "(cached) $ac_c" 1>&6
2737 else
2738   if test -n "$CC"; then
2739   ac_cv_prog_CC="$CC" # Let the user override the test.
2740 else
2741   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2742   ac_dummy="$PATH"
2743   for ac_dir in $ac_dummy; do
2744     test -z "$ac_dir" && ac_dir=.
2745     if test -f $ac_dir/$ac_word; then
2746       ac_cv_prog_CC="gcc"
2747       break
2748     fi
2749   done
2750   IFS="$ac_save_ifs"
2751 fi
2752 fi
2753 CC="$ac_cv_prog_CC"
2754 if test -n "$CC"; then
2755   echo "$ac_t""$CC" 1>&6
2756 else
2757   echo "$ac_t""no" 1>&6
2758 fi
2759
2760 if test -z "$CC"; then
2761   # Extract the first word of "cc", so it can be a program name with args.
2762 set dummy cc; ac_word=$2
2763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2764 echo "configure:2765: checking for $ac_word" >&5
2765 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2766   echo $ac_n "(cached) $ac_c" 1>&6
2767 else
2768   if test -n "$CC"; then
2769   ac_cv_prog_CC="$CC" # Let the user override the test.
2770 else
2771   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2772   ac_prog_rejected=no
2773   ac_dummy="$PATH"
2774   for ac_dir in $ac_dummy; do
2775     test -z "$ac_dir" && ac_dir=.
2776     if test -f $ac_dir/$ac_word; then
2777       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2778         ac_prog_rejected=yes
2779         continue
2780       fi
2781       ac_cv_prog_CC="cc"
2782       break
2783     fi
2784   done
2785   IFS="$ac_save_ifs"
2786 if test $ac_prog_rejected = yes; then
2787   # We found a bogon in the path, so make sure we never use it.
2788   set dummy $ac_cv_prog_CC
2789   shift
2790   if test $# -gt 0; then
2791     # We chose a different compiler from the bogus one.
2792     # However, it has the same basename, so the bogon will be chosen
2793     # first if we set CC to just the basename; use the full file name.
2794     shift
2795     set dummy "$ac_dir/$ac_word" "$@"
2796     shift
2797     ac_cv_prog_CC="$@"
2798   fi
2799 fi
2800 fi
2801 fi
2802 CC="$ac_cv_prog_CC"
2803 if test -n "$CC"; then
2804   echo "$ac_t""$CC" 1>&6
2805 else
2806   echo "$ac_t""no" 1>&6
2807 fi
2808
2809   if test -z "$CC"; then
2810     case "`uname -s`" in
2811     *win32* | *WIN32* | *CYGWIN*)
2812       # Extract the first word of "cl", so it can be a program name with args.
2813 set dummy cl; ac_word=$2
2814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2815 echo "configure:2816: checking for $ac_word" >&5
2816 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   if test -n "$CC"; then
2820   ac_cv_prog_CC="$CC" # Let the user override the test.
2821 else
2822   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2823   ac_dummy="$PATH"
2824   for ac_dir in $ac_dummy; do
2825     test -z "$ac_dir" && ac_dir=.
2826     if test -f $ac_dir/$ac_word; then
2827       ac_cv_prog_CC="cl"
2828       break
2829     fi
2830   done
2831   IFS="$ac_save_ifs"
2832 fi
2833 fi
2834 CC="$ac_cv_prog_CC"
2835 if test -n "$CC"; then
2836   echo "$ac_t""$CC" 1>&6
2837 else
2838   echo "$ac_t""no" 1>&6
2839 fi
2840  ;;
2841     esac
2842   fi
2843   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2844 fi
2845
2846 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2847 echo "configure:2848: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2848
2849 ac_ext=c
2850 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2851 ac_cpp='$CPP $CPPFLAGS'
2852 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2853 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2854 cross_compiling=$ac_cv_prog_cc_cross
2855
2856 cat > conftest.$ac_ext << EOF
2857
2858 #line 2859 "configure"
2859 #include "confdefs.h"
2860
2861 main(){return(0);}
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2864   ac_cv_prog_cc_works=yes
2865   # If we can't run a trivial program, we are probably using a cross compiler.
2866   if (./conftest; exit) 2>/dev/null; then
2867     ac_cv_prog_cc_cross=no
2868   else
2869     ac_cv_prog_cc_cross=yes
2870   fi
2871 else
2872   echo "configure: failed program was:" >&5
2873   cat conftest.$ac_ext >&5
2874   ac_cv_prog_cc_works=no
2875 fi
2876 rm -fr conftest*
2877 ac_ext=c
2878 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2879 ac_cpp='$CPP $CPPFLAGS'
2880 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2881 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2882 cross_compiling=$ac_cv_prog_cc_cross
2883
2884 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2885 if test $ac_cv_prog_cc_works = no; then
2886   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2887 fi
2888 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2889 echo "configure:2890: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2890 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2891 cross_compiling=$ac_cv_prog_cc_cross
2892
2893 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2894 echo "configure:2895: checking whether we are using GNU C" >&5
2895 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   cat > conftest.c <<EOF
2899 #ifdef __GNUC__
2900   yes;
2901 #endif
2902 EOF
2903 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2904   ac_cv_prog_gcc=yes
2905 else
2906   ac_cv_prog_gcc=no
2907 fi
2908 fi
2909
2910 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2911
2912 if test $ac_cv_prog_gcc = yes; then
2913   GCC=yes
2914 else
2915   GCC=
2916 fi
2917
2918 ac_test_CFLAGS="${CFLAGS+set}"
2919 ac_save_CFLAGS="$CFLAGS"
2920 CFLAGS=
2921 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2922 echo "configure:2923: checking whether ${CC-cc} accepts -g" >&5
2923 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2924   echo $ac_n "(cached) $ac_c" 1>&6
2925 else
2926   echo 'void f(){}' > conftest.c
2927 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2928   ac_cv_prog_cc_g=yes
2929 else
2930   ac_cv_prog_cc_g=no
2931 fi
2932 rm -f conftest*
2933
2934 fi
2935
2936 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2937 if test "$ac_test_CFLAGS" = set; then
2938   CFLAGS="$ac_save_CFLAGS"
2939 elif test $ac_cv_prog_cc_g = yes; then
2940   if test "$GCC" = yes; then
2941     CFLAGS="-g -O2"
2942   else
2943     CFLAGS="-g"
2944   fi
2945 else
2946   if test "$GCC" = yes; then
2947     CFLAGS="-O2"
2948   else
2949     CFLAGS=
2950   fi
2951 fi
2952
2953 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2954 if test "${with_gnu_ld+set}" = set; then
2955   withval="$with_gnu_ld"
2956   test "$withval" = no || with_gnu_ld=yes
2957 else
2958   with_gnu_ld=no
2959 fi
2960
2961 ac_prog=ld
2962 if test "$ac_cv_prog_gcc" = yes; then
2963   # Check if gcc -print-prog-name=ld gives a path.
2964   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2965 echo "configure:2966: checking for ld used by GCC" >&5
2966   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2967   case "$ac_prog" in
2968     # Accept absolute paths.
2969     [\\/]* | [A-Za-z]:[\\/]*)
2970       re_direlt='/[^/][^/]*/\.\./'
2971       # Canonicalize the path of ld
2972       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2973       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2974         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2975       done
2976       test -z "$LD" && LD="$ac_prog"
2977       ;;
2978   "")
2979     # If it fails, then pretend we aren't using GCC.
2980     ac_prog=ld
2981     ;;
2982   *)
2983     # If it is relative, then search for the first ld in PATH.
2984     with_gnu_ld=unknown
2985     ;;
2986   esac
2987 elif test "$with_gnu_ld" = yes; then
2988   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2989 echo "configure:2990: checking for GNU ld" >&5
2990 else
2991   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2992 echo "configure:2993: checking for non-GNU ld" >&5
2993 fi
2994 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2995   echo $ac_n "(cached) $ac_c" 1>&6
2996 else
2997   if test -z "$LD"; then
2998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2999   for ac_dir in $PATH; do
3000     test -z "$ac_dir" && ac_dir=.
3001     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3002       ac_cv_path_LD="$ac_dir/$ac_prog"
3003       # Check to see if the program is GNU ld.  I'd rather use --version,
3004       # but apparently some GNU ld's only accept -v.
3005       # Break only if it was the GNU/non-GNU ld that we prefer.
3006       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3007         test "$with_gnu_ld" != no && break
3008       else
3009         test "$with_gnu_ld" != yes && break
3010       fi
3011     fi
3012   done
3013   IFS="$ac_save_ifs"
3014 else
3015   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3016 fi
3017 fi
3018
3019 LD="$ac_cv_path_LD"
3020 if test -n "$LD"; then
3021   echo "$ac_t""$LD" 1>&6
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3026
3027 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3028 echo "configure:3029: checking if the linker ($LD) is GNU ld" >&5
3029 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3033 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3034   ac_cv_prog_gnu_ld=yes
3035 else
3036   ac_cv_prog_gnu_ld=no
3037 fi
3038 fi
3039
3040 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
3041
3042
3043 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3044 echo "configure:3045: checking for BSD-compatible nm" >&5
3045 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
3046   echo $ac_n "(cached) $ac_c" 1>&6
3047 else
3048   if test -n "$NM"; then
3049   # Let the user override the test.
3050   ac_cv_path_NM="$NM"
3051 else
3052   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3053   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3054     test -z "$ac_dir" && ac_dir=.
3055     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
3056       # Check to see if the nm accepts a BSD-compat flag.
3057       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3058       #   nm: unknown option "B" ignored
3059       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3060         ac_cv_path_NM="$ac_dir/nm -B"
3061         break
3062       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3063         ac_cv_path_NM="$ac_dir/nm -p"
3064         break
3065       else
3066         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
3067         continue # so that we can try to find one that supports BSD flags
3068       fi
3069     fi
3070   done
3071   IFS="$ac_save_ifs"
3072   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
3073 fi
3074 fi
3075
3076 NM="$ac_cv_path_NM"
3077 echo "$ac_t""$NM" 1>&6
3078
3079
3080 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3081 echo "configure:3082: checking whether ln -s works" >&5
3082 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3083   echo $ac_n "(cached) $ac_c" 1>&6
3084 else
3085   rm -f conftestdata
3086 if ln -s X conftestdata 2>/dev/null
3087 then
3088   rm -f conftestdata
3089   ac_cv_prog_LN_S="ln -s"
3090 else
3091   ac_cv_prog_LN_S=ln
3092 fi
3093 fi
3094 LN_S="$ac_cv_prog_LN_S"
3095 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3096   echo "$ac_t""yes" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101 if test $host != $build; then
3102   ac_tool_prefix=${host_alias}-
3103 else
3104   ac_tool_prefix=
3105 fi
3106
3107
3108 # Check for any special flags to pass to ltconfig.
3109 libtool_flags="--cache-file=$cache_file"
3110 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3111 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3112 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3113 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3114 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3115 libtool_flags="$libtool_flags --enable-dlopen"
3116 libtool_flags="$libtool_flags --enable-win32-dll"
3117 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3118 if test "${enable_libtool_lock+set}" = set; then
3119   enableval="$enable_libtool_lock"
3120   :
3121 fi
3122
3123 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3124 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3125
3126 # Some flags need to be propagated to the compiler or linker for good
3127 # libtool support.
3128 case "$host" in
3129 *-*-irix6*)
3130   # Find out which ABI we are using.
3131   echo '#line 3132 "configure"' > conftest.$ac_ext
3132   if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3133     case "`/usr/bin/file conftest.o`" in
3134     *32-bit*)
3135       LD="${LD-ld} -32"
3136       ;;
3137     *N32*)
3138       LD="${LD-ld} -n32"
3139       ;;
3140     *64-bit*)
3141       LD="${LD-ld} -64"
3142       ;;
3143     esac
3144   fi
3145   rm -rf conftest*
3146   ;;
3147
3148 *-*-sco3.2v5*)
3149   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3150   SAVE_CFLAGS="$CFLAGS"
3151   CFLAGS="$CFLAGS -belf"
3152   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3153 echo "configure:3154: checking whether the C compiler needs -belf" >&5
3154 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160
3161 int main() {
3162
3163 ; return 0; }
3164 EOF
3165 if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3166   rm -rf conftest*
3167   lt_cv_cc_needs_belf=yes
3168 else
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   lt_cv_cc_needs_belf=no
3173 fi
3174 rm -f conftest*
3175 fi
3176
3177 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3178   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3179     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3180     CFLAGS="$SAVE_CFLAGS"
3181   fi
3182   ;;
3183
3184 *-*-cygwin* | *-*-mingw*)
3185   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3186 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3188 echo "configure:3189: checking for $ac_word" >&5
3189 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3190   echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192   if test -n "$DLLTOOL"; then
3193   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3194 else
3195   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3196   ac_dummy="$PATH"
3197   for ac_dir in $ac_dummy; do
3198     test -z "$ac_dir" && ac_dir=.
3199     if test -f $ac_dir/$ac_word; then
3200       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3201       break
3202     fi
3203   done
3204   IFS="$ac_save_ifs"
3205 fi
3206 fi
3207 DLLTOOL="$ac_cv_prog_DLLTOOL"
3208 if test -n "$DLLTOOL"; then
3209   echo "$ac_t""$DLLTOOL" 1>&6
3210 else
3211   echo "$ac_t""no" 1>&6
3212 fi
3213
3214
3215 if test -z "$ac_cv_prog_DLLTOOL"; then
3216 if test -n "$ac_tool_prefix"; then
3217   # Extract the first word of "dlltool", so it can be a program name with args.
3218 set dummy dlltool; ac_word=$2
3219 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3220 echo "configure:3221: checking for $ac_word" >&5
3221 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   if test -n "$DLLTOOL"; then
3225   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3226 else
3227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3228   ac_dummy="$PATH"
3229   for ac_dir in $ac_dummy; do
3230     test -z "$ac_dir" && ac_dir=.
3231     if test -f $ac_dir/$ac_word; then
3232       ac_cv_prog_DLLTOOL="dlltool"
3233       break
3234     fi
3235   done
3236   IFS="$ac_save_ifs"
3237   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3238 fi
3239 fi
3240 DLLTOOL="$ac_cv_prog_DLLTOOL"
3241 if test -n "$DLLTOOL"; then
3242   echo "$ac_t""$DLLTOOL" 1>&6
3243 else
3244   echo "$ac_t""no" 1>&6
3245 fi
3246
3247 else
3248   DLLTOOL="false"
3249 fi
3250 fi
3251
3252   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3253 set dummy ${ac_tool_prefix}as; ac_word=$2
3254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3255 echo "configure:3256: checking for $ac_word" >&5
3256 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   if test -n "$AS"; then
3260   ac_cv_prog_AS="$AS" # Let the user override the test.
3261 else
3262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3263   ac_dummy="$PATH"
3264   for ac_dir in $ac_dummy; do
3265     test -z "$ac_dir" && ac_dir=.
3266     if test -f $ac_dir/$ac_word; then
3267       ac_cv_prog_AS="${ac_tool_prefix}as"
3268       break
3269     fi
3270   done
3271   IFS="$ac_save_ifs"
3272 fi
3273 fi
3274 AS="$ac_cv_prog_AS"
3275 if test -n "$AS"; then
3276   echo "$ac_t""$AS" 1>&6
3277 else
3278   echo "$ac_t""no" 1>&6
3279 fi
3280
3281
3282 if test -z "$ac_cv_prog_AS"; then
3283 if test -n "$ac_tool_prefix"; then
3284   # Extract the first word of "as", so it can be a program name with args.
3285 set dummy as; 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 \"\${ac_cv_prog_AS+set}\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   if test -n "$AS"; then
3292   ac_cv_prog_AS="$AS" # 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_AS="as"
3300       break
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3305 fi
3306 fi
3307 AS="$ac_cv_prog_AS"
3308 if test -n "$AS"; then
3309   echo "$ac_t""$AS" 1>&6
3310 else
3311   echo "$ac_t""no" 1>&6
3312 fi
3313
3314 else
3315   AS="false"
3316 fi
3317 fi
3318
3319   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3320 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3322 echo "configure:3323: checking for $ac_word" >&5
3323 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3324   echo $ac_n "(cached) $ac_c" 1>&6
3325 else
3326   if test -n "$OBJDUMP"; then
3327   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3328 else
3329   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3330   ac_dummy="$PATH"
3331   for ac_dir in $ac_dummy; do
3332     test -z "$ac_dir" && ac_dir=.
3333     if test -f $ac_dir/$ac_word; then
3334       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3335       break
3336     fi
3337   done
3338   IFS="$ac_save_ifs"
3339 fi
3340 fi
3341 OBJDUMP="$ac_cv_prog_OBJDUMP"
3342 if test -n "$OBJDUMP"; then
3343   echo "$ac_t""$OBJDUMP" 1>&6
3344 else
3345   echo "$ac_t""no" 1>&6
3346 fi
3347
3348
3349 if test -z "$ac_cv_prog_OBJDUMP"; then
3350 if test -n "$ac_tool_prefix"; then
3351   # Extract the first word of "objdump", so it can be a program name with args.
3352 set dummy objdump; ac_word=$2
3353 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3354 echo "configure:3355: checking for $ac_word" >&5
3355 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358   if test -n "$OBJDUMP"; then
3359   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3360 else
3361   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3362   ac_dummy="$PATH"
3363   for ac_dir in $ac_dummy; do
3364     test -z "$ac_dir" && ac_dir=.
3365     if test -f $ac_dir/$ac_word; then
3366       ac_cv_prog_OBJDUMP="objdump"
3367       break
3368     fi
3369   done
3370   IFS="$ac_save_ifs"
3371   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3372 fi
3373 fi
3374 OBJDUMP="$ac_cv_prog_OBJDUMP"
3375 if test -n "$OBJDUMP"; then
3376   echo "$ac_t""$OBJDUMP" 1>&6
3377 else
3378   echo "$ac_t""no" 1>&6
3379 fi
3380
3381 else
3382   OBJDUMP="false"
3383 fi
3384 fi
3385
3386   ;;
3387
3388 esac
3389
3390
3391 # Save cache, so that ltconfig can load it
3392
3393
3394 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3395 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3396 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3397 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3398 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3399 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3400 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3401 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3402
3403 # Reload cache, that may have been modified by ltconfig
3404
3405
3406 # This can be used to rebuild libtool when needed
3407 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3408
3409 # Always use our own libtool.
3410 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3411
3412 # Redirect the config.log output again, so that the ltconfig log is not
3413 # clobbered by the next message.
3414 exec 5>>./config.log
3415
3416
3417 for ac_prog in mawk gawk nawk awk
3418 do
3419 # Extract the first word of "$ac_prog", so it can be a program name with args.
3420 set dummy $ac_prog; ac_word=$2
3421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3422 echo "configure:3423: checking for $ac_word" >&5
3423 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   if test -n "$AWK"; then
3427   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3428 else
3429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3430   ac_dummy="$PATH"
3431   for ac_dir in $ac_dummy; do
3432     test -z "$ac_dir" && ac_dir=.
3433     if test -f $ac_dir/$ac_word; then
3434       ac_cv_prog_AWK="$ac_prog"
3435       break
3436     fi
3437   done
3438   IFS="$ac_save_ifs"
3439 fi
3440 fi
3441 AWK="$ac_cv_prog_AWK"
3442 if test -n "$AWK"; then
3443   echo "$ac_t""$AWK" 1>&6
3444 else
3445   echo "$ac_t""no" 1>&6
3446 fi
3447
3448 test -n "$AWK" && break
3449 done
3450
3451 # test for ln hardlink support
3452 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3453 echo "configure:3454: checking whether ln works" >&5
3454 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   rm -f conftest.src conftest.dst
3458 echo "conftest" > conftest.src
3459 if ln conftest.src conftest.dst 2>/dev/null
3460 then
3461   ol_cv_prog_LN_H="ln"
3462 else
3463   ol_cv_prog_LN_H="cp"
3464 fi
3465 rm -f conftest.src conftest.dst
3466
3467 fi
3468 LN_H="$ol_cv_prog_LN_H"
3469 if test "$ol_cv_prog_LN_H" = "ln"; then
3470         echo "$ac_t""yes" 1>&6
3471 else
3472         echo "$ac_t""no" 1>&6
3473 fi
3474
3475 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3476 echo "configure:3477: checking whether ln -s works" >&5
3477 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   rm -f conftestdata
3481 if ln -s X conftestdata 2>/dev/null
3482 then
3483   rm -f conftestdata
3484   ac_cv_prog_LN_S="ln -s"
3485 else
3486   ac_cv_prog_LN_S=ln
3487 fi
3488 fi
3489 LN_S="$ac_cv_prog_LN_S"
3490 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3491   echo "$ac_t""yes" 1>&6
3492 else
3493   echo "$ac_t""no" 1>&6
3494 fi
3495
3496
3497 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3498         LN_S="$LN_H"
3499 fi
3500
3501 # Extract the first word of "sendmail", so it can be a program name with args.
3502 set dummy sendmail; ac_word=$2
3503 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3504 echo "configure:3505: checking for $ac_word" >&5
3505 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3506   echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508   case "$SENDMAIL" in
3509   /*)
3510   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3511   ;;
3512   ?:/*)
3513   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3514   ;;
3515   *)
3516   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3517   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3518   for ac_dir in $ac_dummy; do 
3519     test -z "$ac_dir" && ac_dir=.
3520     if test -f $ac_dir/$ac_word; then
3521       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3522       break
3523     fi
3524   done
3525   IFS="$ac_save_ifs"
3526   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3527   ;;
3528 esac
3529 fi
3530 SENDMAIL="$ac_cv_path_SENDMAIL"
3531 if test -n "$SENDMAIL"; then
3532   echo "$ac_t""$SENDMAIL" 1>&6
3533 else
3534   echo "$ac_t""no" 1>&6
3535 fi
3536
3537 # Extract the first word of "vi", so it can be a program name with args.
3538 set dummy vi; ac_word=$2
3539 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3540 echo "configure:3541: checking for $ac_word" >&5
3541 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   case "$EDITOR" in
3545   /*)
3546   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3547   ;;
3548   ?:/*)
3549   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3550   ;;
3551   *)
3552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3553   ac_dummy="$PATH:/usr/ucb"
3554   for ac_dir in $ac_dummy; do 
3555     test -z "$ac_dir" && ac_dir=.
3556     if test -f $ac_dir/$ac_word; then
3557       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3558       break
3559     fi
3560   done
3561   IFS="$ac_save_ifs"
3562   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3563   ;;
3564 esac
3565 fi
3566 EDITOR="$ac_cv_path_EDITOR"
3567 if test -n "$EDITOR"; then
3568   echo "$ac_t""$EDITOR" 1>&6
3569 else
3570   echo "$ac_t""no" 1>&6
3571 fi
3572
3573 # Extract the first word of "finger", so it can be a program name with args.
3574 set dummy finger; ac_word=$2
3575 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3576 echo "configure:3577: checking for $ac_word" >&5
3577 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3578   echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580   case "$FINGER" in
3581   /*)
3582   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3583   ;;
3584   ?:/*)
3585   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3586   ;;
3587   *)
3588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3589   ac_dummy="$PATH:/usr/ucb"
3590   for ac_dir in $ac_dummy; do 
3591     test -z "$ac_dir" && ac_dir=.
3592     if test -f $ac_dir/$ac_word; then
3593       ac_cv_path_FINGER="$ac_dir/$ac_word"
3594       break
3595     fi
3596   done
3597   IFS="$ac_save_ifs"
3598   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3599   ;;
3600 esac
3601 fi
3602 FINGER="$ac_cv_path_FINGER"
3603 if test -n "$FINGER"; then
3604   echo "$ac_t""$FINGER" 1>&6
3605 else
3606   echo "$ac_t""no" 1>&6
3607 fi
3608
3609
3610 ol_link_perl=no
3611 if test $ol_enable_perl != no ; then
3612         # Extract the first word of "perl", so it can be a program name with args.
3613 set dummy perl; ac_word=$2
3614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3615 echo "configure:3616: checking for $ac_word" >&5
3616 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   case "$PERLBIN" in
3620   /*)
3621   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3622   ;;
3623   ?:/*)
3624   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3625   ;;
3626   *)
3627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3628   ac_dummy="$PATH"
3629   for ac_dir in $ac_dummy; do 
3630     test -z "$ac_dir" && ac_dir=.
3631     if test -f $ac_dir/$ac_word; then
3632       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3633       break
3634     fi
3635   done
3636   IFS="$ac_save_ifs"
3637   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3638   ;;
3639 esac
3640 fi
3641 PERLBIN="$ac_cv_path_PERLBIN"
3642 if test -n "$PERLBIN"; then
3643   echo "$ac_t""$PERLBIN" 1>&6
3644 else
3645   echo "$ac_t""no" 1>&6
3646 fi
3647
3648
3649         if test "no$PERLBIN" = "no" ; then
3650                 if test $ol_enable_perl = yes ; then
3651                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3652                 fi
3653
3654         else
3655                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3656                 if test x"$ol_with_perl_module" = "xstatic" ; then
3657                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3658                 else
3659                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3660                 fi
3661                                 ol_link_perl=yes
3662         fi
3663 fi
3664
3665 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3666 echo "configure:3667: checking how to run the C preprocessor" >&5
3667 # On Suns, sometimes $CPP names a directory.
3668 if test -n "$CPP" && test -d "$CPP"; then
3669   CPP=
3670 fi
3671 if test -z "$CPP"; then
3672 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3673   echo $ac_n "(cached) $ac_c" 1>&6
3674 else
3675     # This must be in double quotes, not single quotes, because CPP may get
3676   # substituted into the Makefile and "${CC-cc}" will confuse make.
3677   CPP="${CC-cc} -E"
3678   # On the NeXT, cc -E runs the code through the compiler's parser,
3679   # not just through cpp.
3680   cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683 #include <assert.h>
3684 Syntax Error
3685 EOF
3686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3687 { (eval echo configure:3688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3689 if test -z "$ac_err"; then
3690   :
3691 else
3692   echo "$ac_err" >&5
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   CPP="${CC-cc} -E -traditional-cpp"
3697   cat > conftest.$ac_ext <<EOF
3698 #line 3699 "configure"
3699 #include "confdefs.h"
3700 #include <assert.h>
3701 Syntax Error
3702 EOF
3703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3704 { (eval echo configure:3705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3706 if test -z "$ac_err"; then
3707   :
3708 else
3709   echo "$ac_err" >&5
3710   echo "configure: failed program was:" >&5
3711   cat conftest.$ac_ext >&5
3712   rm -rf conftest*
3713   CPP="${CC-cc} -nologo -E"
3714   cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <assert.h>
3718 Syntax Error
3719 EOF
3720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3721 { (eval echo configure:3722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3723 if test -z "$ac_err"; then
3724   :
3725 else
3726   echo "$ac_err" >&5
3727   echo "configure: failed program was:" >&5
3728   cat conftest.$ac_ext >&5
3729   rm -rf conftest*
3730   CPP=/lib/cpp
3731 fi
3732 rm -f conftest*
3733 fi
3734 rm -f conftest*
3735 fi
3736 rm -f conftest*
3737   ac_cv_prog_CPP="$CPP"
3738 fi
3739   CPP="$ac_cv_prog_CPP"
3740 else
3741   ac_cv_prog_CPP="$CPP"
3742 fi
3743 echo "$ac_t""$CPP" 1>&6
3744
3745
3746 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3747         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3748
3749 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3750         echo "configure: warning: programs compiled here do run here..." 1>&2
3751         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3752
3753 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3754         echo "configure: warning: programs compiled here do not run here..." 1>&2
3755         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3756 fi
3757
3758 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3759 echo "configure:3760: checking for AIX" >&5
3760 cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763 #ifdef _AIX
3764   yes
3765 #endif
3766
3767 EOF
3768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3769   egrep "yes" >/dev/null 2>&1; then
3770   rm -rf conftest*
3771   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3772 #define _ALL_SOURCE 1
3773 EOF
3774
3775 else
3776   rm -rf conftest*
3777   echo "$ac_t""no" 1>&6
3778 fi
3779 rm -f conftest*
3780
3781
3782 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3783 echo "configure:3784: checking for POSIXized ISC" >&5
3784 if test -d /etc/conf/kconfig.d &&
3785   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3786 then
3787   echo "$ac_t""yes" 1>&6
3788   ISC=yes # If later tests want to check for ISC.
3789   cat >> confdefs.h <<\EOF
3790 #define _POSIX_SOURCE 1
3791 EOF
3792
3793   if test "$GCC" = yes; then
3794     CC="$CC -posix"
3795   else
3796     CC="$CC -Xp"
3797   fi
3798 else
3799   echo "$ac_t""no" 1>&6
3800   ISC=
3801 fi
3802
3803 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3804 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3805 echo "configure:3806: checking for minix/config.h" >&5
3806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <minix/config.h>
3813 EOF
3814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3815 { (eval echo configure:3816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3817 if test -z "$ac_err"; then
3818   rm -rf conftest*
3819   eval "ac_cv_header_$ac_safe=yes"
3820 else
3821   echo "$ac_err" >&5
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   eval "ac_cv_header_$ac_safe=no"
3826 fi
3827 rm -f conftest*
3828 fi
3829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3830   echo "$ac_t""yes" 1>&6
3831   MINIX=yes
3832 else
3833   echo "$ac_t""no" 1>&6
3834 MINIX=
3835 fi
3836
3837 if test "$MINIX" = yes; then
3838   cat >> confdefs.h <<\EOF
3839 #define _POSIX_SOURCE 1
3840 EOF
3841
3842   cat >> confdefs.h <<\EOF
3843 #define _POSIX_1_SOURCE 2
3844 EOF
3845
3846   cat >> confdefs.h <<\EOF
3847 #define _MINIX 1
3848 EOF
3849
3850 fi
3851
3852
3853 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3854 echo "configure:3855: checking for Cygwin environment" >&5
3855 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3856   echo $ac_n "(cached) $ac_c" 1>&6
3857 else
3858   cat > conftest.$ac_ext <<EOF
3859 #line 3860 "configure"
3860 #include "confdefs.h"
3861
3862 int main() {
3863
3864 #ifndef __CYGWIN__
3865 #define __CYGWIN__ __CYGWIN32__
3866 #endif
3867 return __CYGWIN__;
3868 ; return 0; }
3869 EOF
3870 if { (eval echo configure:3871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3871   rm -rf conftest*
3872   ac_cv_cygwin=yes
3873 else
3874   echo "configure: failed program was:" >&5
3875   cat conftest.$ac_ext >&5
3876   rm -rf conftest*
3877   ac_cv_cygwin=no
3878 fi
3879 rm -f conftest*
3880 fi
3881
3882 echo "$ac_t""$ac_cv_cygwin" 1>&6
3883 CYGWIN=
3884 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3885 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3886 echo "configure:3887: checking for mingw32 environment" >&5
3887 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3888   echo $ac_n "(cached) $ac_c" 1>&6
3889 else
3890   cat > conftest.$ac_ext <<EOF
3891 #line 3892 "configure"
3892 #include "confdefs.h"
3893
3894 int main() {
3895 return __MINGW32__;
3896 ; return 0; }
3897 EOF
3898 if { (eval echo configure:3899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3899   rm -rf conftest*
3900   ac_cv_mingw32=yes
3901 else
3902   echo "configure: failed program was:" >&5
3903   cat conftest.$ac_ext >&5
3904   rm -rf conftest*
3905   ac_cv_mingw32=no
3906 fi
3907 rm -f conftest*
3908 fi
3909
3910 echo "$ac_t""$ac_cv_mingw32" 1>&6
3911 MINGW32=
3912 test "$ac_cv_mingw32" = yes && MINGW32=yes
3913 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3914 echo "configure:3915: checking for EMX OS/2 environment" >&5
3915 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3916   echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918   cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921
3922 int main() {
3923 return __EMX__;
3924 ; return 0; }
3925 EOF
3926 if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3927   rm -rf conftest*
3928   ac_cv_emxos2=yes
3929 else
3930   echo "configure: failed program was:" >&5
3931   cat conftest.$ac_ext >&5
3932   rm -rf conftest*
3933   ac_cv_emxos2=no
3934 fi
3935 rm -f conftest*
3936 fi
3937
3938 echo "$ac_t""$ac_cv_emxos2" 1>&6
3939 EMXOS2=
3940 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3941
3942
3943
3944 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3945 echo "configure:3946: checking for executable suffix" >&5
3946 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3950   ac_cv_exeext=.exe
3951 else
3952   rm -f conftest*
3953   echo 'int main () { return 0; }' > conftest.$ac_ext
3954   ac_cv_exeext=
3955   if { (eval echo configure:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3956     for file in conftest.*; do
3957       case $file in
3958       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3959       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3960       esac
3961     done
3962   else
3963     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3964   fi
3965   rm -f conftest*
3966   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3967 fi
3968 fi
3969
3970 EXEEXT=""
3971 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3972 echo "$ac_t""${ac_cv_exeext}" 1>&6
3973 ac_exeext=$EXEEXT
3974
3975 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3976 echo "configure:3977: checking for object suffix" >&5
3977 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3978   echo $ac_n "(cached) $ac_c" 1>&6
3979 else
3980   rm -f conftest*
3981 echo 'int i = 1;' > conftest.$ac_ext
3982 if { (eval echo configure:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3983   for ac_file in conftest.*; do
3984     case $ac_file in
3985     *.c) ;;
3986     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3987     esac
3988   done
3989 else
3990   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3991 fi
3992 rm -f conftest*
3993 fi
3994
3995 echo "$ac_t""$ac_cv_objext" 1>&6
3996 OBJEXT=$ac_cv_objext
3997 ac_objext=$ac_cv_objext
3998
3999
4000 cat >> confdefs.h <<EOF
4001 #define EXEEXT "${EXEEXT}"
4002 EOF
4003
4004
4005 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
4006 echo "configure:4007: checking for be_app in -lbe" >&5
4007 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
4008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   ac_save_LIBS="$LIBS"
4012 LIBS="-lbe -lroot -lnet $LIBS"
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 /* Override any gcc2 internal prototype to avoid an error.  */
4017 /* We use char because int might match the return type of a gcc2
4018     builtin and then its argument prototype would still apply.  */
4019 char be_app();
4020
4021 int main() {
4022 be_app()
4023 ; return 0; }
4024 EOF
4025 if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4026   rm -rf conftest*
4027   eval "ac_cv_lib_$ac_lib_var=yes"
4028 else
4029   echo "configure: failed program was:" >&5
4030   cat conftest.$ac_ext >&5
4031   rm -rf conftest*
4032   eval "ac_cv_lib_$ac_lib_var=no"
4033 fi
4034 rm -f conftest*
4035 LIBS="$ac_save_LIBS"
4036
4037 fi
4038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4039   echo "$ac_t""yes" 1>&6
4040   LIBS="$LIBS -lbe -lroot -lnet"
4041 else
4042   echo "$ac_t""no" 1>&6
4043 :
4044 fi
4045
4046
4047
4048
4049
4050 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
4051 echo "configure:4052: checking for ${CC-cc} option to accept ANSI C" >&5
4052 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
4053   echo $ac_n "(cached) $ac_c" 1>&6
4054 else
4055   am_cv_prog_cc_stdc=no
4056 ac_save_CC="$CC"
4057 # Don't try gcc -ansi; that turns off useful extensions and
4058 # breaks some systems' header files.
4059 # AIX                   -qlanglvl=ansi
4060 # Ultrix and OSF/1      -std1
4061 # HP-UX 10.20 and later -Ae
4062 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4063 # SVR4                  -Xc -D__EXTENSIONS__
4064 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4065 do
4066   CC="$ac_save_CC $ac_arg"
4067   cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 #include <stdarg.h>
4071 #include <stdio.h>
4072 #include <sys/types.h>
4073 #include <sys/stat.h>
4074 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4075 struct buf { int x; };
4076 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4077 static char *e (p, i)
4078      char **p;
4079      int i;
4080 {
4081   return p[i];
4082 }
4083 static char *f (char * (*g) (char **, int), char **p, ...)
4084 {
4085   char *s;
4086   va_list v;
4087   va_start (v,p);
4088   s = g (p, va_arg (v,int));
4089   va_end (v);
4090   return s;
4091 }
4092 int test (int i, double x);
4093 struct s1 {int (*f) (int a);};
4094 struct s2 {int (*f) (double a);};
4095 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4096 int argc;
4097 char **argv;
4098
4099 int main() {
4100
4101 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4102
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4106   rm -rf conftest*
4107   am_cv_prog_cc_stdc="$ac_arg"; break
4108 else
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111 fi
4112 rm -f conftest*
4113 done
4114 CC="$ac_save_CC"
4115
4116 fi
4117
4118 if test -z "$am_cv_prog_cc_stdc"; then
4119   echo "$ac_t""none needed" 1>&6
4120 else
4121   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
4122 fi
4123 case "x$am_cv_prog_cc_stdc" in
4124   x|xno) ;;
4125   *) CC="$CC $am_cv_prog_cc_stdc" ;;
4126 esac
4127
4128 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
4129         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
4130 fi
4131
4132 # test for make depend flag
4133 OL_MKDEP=
4134 OL_MKDEP_FLAGS=
4135 if test -z "${MKDEP}"; then
4136         OL_MKDEP="${CC-cc}"
4137         if test -z "${MKDEP_FLAGS}"; then
4138                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
4139 echo "configure:4140: checking for ${OL_MKDEP} depend flag" >&5
4140 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   
4144                         ol_cv_mkdep=no
4145                         for flag in "-M" "-xM"; do
4146                                 cat > conftest.c <<EOF
4147  noCode;
4148 EOF
4149                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
4150                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
4151                                 then
4152                                         if test ! -f conftest."${ac_object}" ; then
4153                                                 ol_cv_mkdep=$flag
4154                                                 OL_MKDEP_FLAGS="$flag"
4155                                                 break
4156                                         fi
4157                                 fi
4158                         done
4159                         rm -f conftest*
4160                 
4161 fi
4162
4163 echo "$ac_t""$ol_cv_mkdep" 1>&6
4164         else
4165                 cc_cv_mkdep=yes
4166                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4167         fi
4168 else
4169         cc_cv_mkdep=yes
4170         OL_MKDEP="${MKDEP}"
4171         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
4172 fi
4173
4174
4175
4176 if test "${ol_cv_mkdep}" = no ; then
4177         # this will soon become an error
4178         echo "configure: warning: do not know how to generate dependencies" 1>&2
4179 fi
4180
4181 ol_link_modules=no
4182 if test $ol_enable_modules != no ; then
4183         for ac_hdr in ltdl.h
4184 do
4185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4187 echo "configure:4188: checking for $ac_hdr" >&5
4188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4189   echo $ac_n "(cached) $ac_c" 1>&6
4190 else
4191   cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4194 #include <$ac_hdr>
4195 EOF
4196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4197 { (eval echo configure:4198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4199 if test -z "$ac_err"; then
4200   rm -rf conftest*
4201   eval "ac_cv_header_$ac_safe=yes"
4202 else
4203   echo "$ac_err" >&5
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   eval "ac_cv_header_$ac_safe=no"
4208 fi
4209 rm -f conftest*
4210 fi
4211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4212   echo "$ac_t""yes" 1>&6
4213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4214   cat >> confdefs.h <<EOF
4215 #define $ac_tr_hdr 1
4216 EOF
4217  
4218 else
4219   echo "$ac_t""no" 1>&6
4220 fi
4221 done
4222
4223
4224         if test $ac_cv_header_ltdl_h = no ; then
4225                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4226         fi
4227
4228         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4229 echo "configure:4230: checking for lt_dlinit in -lltdl" >&5
4230 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
4231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4232   echo $ac_n "(cached) $ac_c" 1>&6
4233 else
4234   ac_save_LIBS="$LIBS"
4235 LIBS="-lltdl  $LIBS"
4236 cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 /* Override any gcc2 internal prototype to avoid an error.  */
4240 /* We use char because int might match the return type of a gcc2
4241     builtin and then its argument prototype would still apply.  */
4242 char lt_dlinit();
4243
4244 int main() {
4245 lt_dlinit()
4246 ; return 0; }
4247 EOF
4248 if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4249   rm -rf conftest*
4250   eval "ac_cv_lib_$ac_lib_var=yes"
4251 else
4252   echo "configure: failed program was:" >&5
4253   cat conftest.$ac_ext >&5
4254   rm -rf conftest*
4255   eval "ac_cv_lib_$ac_lib_var=no"
4256 fi
4257 rm -f conftest*
4258 LIBS="$ac_save_LIBS"
4259
4260 fi
4261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4262   echo "$ac_t""yes" 1>&6
4263   
4264             MODULES_LIBS=-lltdl
4265             cat >> confdefs.h <<\EOF
4266 #define HAVE_LIBLTDL 1
4267 EOF
4268
4269         
4270 else
4271   echo "$ac_t""no" 1>&6
4272 fi
4273
4274
4275         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4276                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4277         fi
4278         ol_link_modules=yes
4279 else
4280         ol_with_bdb2_module=static
4281         ol_with_ldap_module=static
4282         ol_with_ldbm_module=static
4283         ol_with_passwd_module=static
4284         ol_with_perl_module=static
4285         ol_with_shell_module=static
4286         ol_with_tcl_module=static
4287         ol_with_sql_module=static
4288 fi
4289
4290 # test for EBCDIC
4291 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4292 echo "configure:4293: checking for EBCDIC" >&5
4293 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
4294   echo $ac_n "(cached) $ac_c" 1>&6
4295 else
4296   
4297         cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300
4301 #if !('M' == 0xd4)
4302 #include <__ASCII__/generate_error.h>
4303 #endif
4304
4305 EOF
4306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4307 { (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4309 if test -z "$ac_err"; then
4310   rm -rf conftest*
4311   ol_cv_cpp_ebcdic=yes
4312 else
4313   echo "$ac_err" >&5
4314   echo "configure: failed program was:" >&5
4315   cat conftest.$ac_ext >&5
4316   rm -rf conftest*
4317   ol_cv_cpp_ebcdic=no
4318 fi
4319 rm -f conftest*
4320 fi
4321
4322 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4323 if test $ol_cv_cpp_ebcdic = yes ; then
4324         cat >> confdefs.h <<\EOF
4325 #define HAVE_EBCDIC 1
4326 EOF
4327
4328 fi
4329
4330 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4331 echo "configure:4332: checking for ANSI C header files" >&5
4332 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
4333   echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335   cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4338 #include <stdlib.h>
4339 #include <stdarg.h>
4340 #include <string.h>
4341 #include <float.h>
4342 EOF
4343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4344 { (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4346 if test -z "$ac_err"; then
4347   rm -rf conftest*
4348   ol_cv_header_stdc=yes
4349 else
4350   echo "$ac_err" >&5
4351   echo "configure: failed program was:" >&5
4352   cat conftest.$ac_ext >&5
4353   rm -rf conftest*
4354   ol_cv_header_stdc=no
4355 fi
4356 rm -f conftest*
4357
4358 if test $ol_cv_header_stdc = yes; then
4359   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4360 cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363 #include <string.h>
4364 EOF
4365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4366   egrep "memchr" >/dev/null 2>&1; then
4367   :
4368 else
4369   rm -rf conftest*
4370   ol_cv_header_stdc=no
4371 fi
4372 rm -f conftest*
4373
4374 fi
4375
4376 if test $ol_cv_header_stdc = yes; then
4377   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4378 cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 #include <stdlib.h>
4382 EOF
4383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4384   egrep "free" >/dev/null 2>&1; then
4385   :
4386 else
4387   rm -rf conftest*
4388   ol_cv_header_stdc=no
4389 fi
4390 rm -f conftest*
4391
4392 fi
4393
4394 if test $ol_cv_header_stdc = yes; then
4395   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4396 if test "$cross_compiling" = yes; then
4397   :
4398 else
4399   cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402 #include <ctype.h>
4403 #ifndef HAVE_EBCDIC
4404 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4405 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4406 #else
4407 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4408                 || ('j' <= (c) && (c) <= 'r') \
4409                 || ('s' <= (c) && (c) <= 'z'))
4410 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4411 #endif
4412 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4413 int main () { int i; for (i = 0; i < 256; i++)
4414 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4415 exit (0); }
4416
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4419 then
4420   :
4421 else
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -fr conftest*
4425   ol_cv_header_stdc=no
4426 fi
4427 rm -fr conftest*
4428 fi
4429
4430 fi
4431 fi
4432
4433 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4434 if test $ol_cv_header_stdc = yes; then
4435   cat >> confdefs.h <<\EOF
4436 #define STDC_HEADERS 1
4437 EOF
4438
4439 fi
4440 ac_cv_header_stdc=disable
4441
4442
4443 if test $ol_cv_header_stdc != yes; then
4444         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4445 fi
4446
4447 ac_header_dirent=no
4448 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4449 do
4450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4451 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4452 echo "configure:4453: checking for $ac_hdr that defines DIR" >&5
4453 if eval "test \"\${ac_cv_header_dirent_$ac_safe+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 <$ac_hdr>
4461 int main() {
4462 DIR *dirp = 0;
4463 ; return 0; }
4464 EOF
4465 if { (eval echo configure:4466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4466   rm -rf conftest*
4467   eval "ac_cv_header_dirent_$ac_safe=yes"
4468 else
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471   rm -rf conftest*
4472   eval "ac_cv_header_dirent_$ac_safe=no"
4473 fi
4474 rm -f conftest*
4475 fi
4476 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4477   echo "$ac_t""yes" 1>&6
4478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4479   cat >> confdefs.h <<EOF
4480 #define $ac_tr_hdr 1
4481 EOF
4482  ac_header_dirent=$ac_hdr; break
4483 else
4484   echo "$ac_t""no" 1>&6
4485 fi
4486 done
4487 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4488 if test $ac_header_dirent = dirent.h; then
4489 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4490 echo "configure:4491: checking for opendir in -ldir" >&5
4491 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   ac_save_LIBS="$LIBS"
4496 LIBS="-ldir  $LIBS"
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 /* Override any gcc2 internal prototype to avoid an error.  */
4501 /* We use char because int might match the return type of a gcc2
4502     builtin and then its argument prototype would still apply.  */
4503 char opendir();
4504
4505 int main() {
4506 opendir()
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=yes"
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=no"
4517 fi
4518 rm -f conftest*
4519 LIBS="$ac_save_LIBS"
4520
4521 fi
4522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4523   echo "$ac_t""yes" 1>&6
4524   LIBS="$LIBS -ldir"
4525 else
4526   echo "$ac_t""no" 1>&6
4527 fi
4528
4529 else
4530 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4531 echo "configure:4532: checking for opendir in -lx" >&5
4532 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   ac_save_LIBS="$LIBS"
4537 LIBS="-lx  $LIBS"
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* Override any gcc2 internal prototype to avoid an error.  */
4542 /* We use char because int might match the return type of a gcc2
4543     builtin and then its argument prototype would still apply.  */
4544 char opendir();
4545
4546 int main() {
4547 opendir()
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551   rm -rf conftest*
4552   eval "ac_cv_lib_$ac_lib_var=yes"
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=no"
4558 fi
4559 rm -f conftest*
4560 LIBS="$ac_save_LIBS"
4561
4562 fi
4563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4564   echo "$ac_t""yes" 1>&6
4565   LIBS="$LIBS -lx"
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569
4570 fi
4571
4572 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4573 echo "configure:4574: checking for sys/wait.h that is POSIX.1 compatible" >&5
4574 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4575   echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577   cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 #include <sys/types.h>
4581 #include <sys/wait.h>
4582 #ifndef WEXITSTATUS
4583 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4584 #endif
4585 #ifndef WIFEXITED
4586 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4587 #endif
4588 int main() {
4589 int s;
4590 wait (&s);
4591 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4592 ; return 0; }
4593 EOF
4594 if { (eval echo configure:4595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4595   rm -rf conftest*
4596   ac_cv_header_sys_wait_h=yes
4597 else
4598   echo "configure: failed program was:" >&5
4599   cat conftest.$ac_ext >&5
4600   rm -rf conftest*
4601   ac_cv_header_sys_wait_h=no
4602 fi
4603 rm -f conftest*
4604 fi
4605
4606 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4607 if test $ac_cv_header_sys_wait_h = yes; then
4608   cat >> confdefs.h <<\EOF
4609 #define HAVE_SYS_WAIT_H 1
4610 EOF
4611
4612 fi
4613
4614 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4615 echo "configure:4616: checking POSIX termios" >&5
4616 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4617   echo $ac_n "(cached) $ac_c" 1>&6
4618 else
4619   cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 #include <sys/types.h>
4623 #include <unistd.h>
4624 #include <termios.h>
4625 int main() {
4626 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4627    tcgetattr(0, 0);
4628 ; return 0; }
4629 EOF
4630 if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4631   rm -rf conftest*
4632   am_cv_sys_posix_termios=yes
4633 else
4634   echo "configure: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   rm -rf conftest*
4637   am_cv_sys_posix_termios=no
4638 fi
4639 rm -f conftest*
4640 fi
4641
4642 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4643
4644
4645  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4646 echo "configure:4647: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4647 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4651
4652   gwinsz_in_termios_h=no
4653   if test $am_cv_sys_posix_termios = yes; then
4654     cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 #include <sys/types.h>
4658 #     include <termios.h>
4659 #     ifdef TIOCGWINSZ
4660         yes
4661 #     endif
4662     
4663 EOF
4664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4665   egrep "yes" >/dev/null 2>&1; then
4666   rm -rf conftest*
4667   gwinsz_in_termios_h=yes
4668 fi
4669 rm -f conftest*
4670
4671   fi
4672
4673   if test $gwinsz_in_termios_h = no; then
4674     cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #include <sys/types.h>
4678 #     include <sys/ioctl.h>
4679 #     ifdef TIOCGWINSZ
4680         yes
4681 #     endif
4682     
4683 EOF
4684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4685   egrep "yes" >/dev/null 2>&1; then
4686   rm -rf conftest*
4687   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4688 fi
4689 rm -f conftest*
4690
4691   fi
4692   
4693 fi
4694
4695 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4696   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4697     cat >> confdefs.h <<\EOF
4698 #define GWINSZ_IN_SYS_IOCTL 1
4699 EOF
4700
4701   fi
4702
4703 if test $am_cv_sys_posix_termios = yes ; then
4704         cat >> confdefs.h <<\EOF
4705 #define HAVE_POSIX_TERMIOS 1
4706 EOF
4707
4708 fi
4709
4710 for ac_hdr in \
4711         arpa/inet.h             \
4712         arpa/nameser.h  \
4713         assert.h                \
4714         conio.h                 \
4715         crypt.h                 \
4716         direct.h                \
4717         errno.h                 \
4718         fcntl.h                 \
4719         filio.h                 \
4720         getopt.h                \
4721         grp.h                   \
4722         io.h                    \
4723         libutil.h               \
4724         limits.h                \
4725         locale.h                \
4726         netinet/tcp.h   \
4727         malloc.h                \
4728         memory.h                \
4729         psap.h                  \
4730         pwd.h                   \
4731         process.h               \
4732         resolv.h                \
4733         sgtty.h                 \
4734         shadow.h                \
4735         stddef.h                \
4736         string.h                \
4737         strings.h               \
4738         sysexits.h              \
4739         sys/file.h              \
4740         sys/filio.h             \
4741         sys/errno.h             \
4742         sys/ioctl.h             \
4743         sys/param.h             \
4744         sys/resource.h  \
4745         sys/select.h    \
4746         sys/socket.h    \
4747         sys/syslog.h    \
4748         sys/time.h              \
4749         sys/types.h             \
4750         syslog.h                \
4751         termios.h               \
4752         unistd.h                \
4753         winsock.h               \
4754
4755 do
4756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4758 echo "configure:4759: checking for $ac_hdr" >&5
4759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762   cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <$ac_hdr>
4766 EOF
4767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4768 { (eval echo configure:4769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4770 if test -z "$ac_err"; then
4771   rm -rf conftest*
4772   eval "ac_cv_header_$ac_safe=yes"
4773 else
4774   echo "$ac_err" >&5
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_header_$ac_safe=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4783   echo "$ac_t""yes" 1>&6
4784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4785   cat >> confdefs.h <<EOF
4786 #define $ac_tr_hdr 1
4787 EOF
4788  
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792 done
4793
4794
4795
4796
4797 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4798 echo "configure:4799: checking for sigset in -lV3" >&5
4799 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
4800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   ac_save_LIBS="$LIBS"
4804 LIBS="-lV3  $LIBS"
4805 cat > conftest.$ac_ext <<EOF
4806 #line 4807 "configure"
4807 #include "confdefs.h"
4808 /* Override any gcc2 internal prototype to avoid an error.  */
4809 /* We use char because int might match the return type of a gcc2
4810     builtin and then its argument prototype would still apply.  */
4811 char sigset();
4812
4813 int main() {
4814 sigset()
4815 ; return 0; }
4816 EOF
4817 if { (eval echo configure:4818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4818   rm -rf conftest*
4819   eval "ac_cv_lib_$ac_lib_var=yes"
4820 else
4821   echo "configure: failed program was:" >&5
4822   cat conftest.$ac_ext >&5
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=no"
4825 fi
4826 rm -f conftest*
4827 LIBS="$ac_save_LIBS"
4828
4829 fi
4830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4831   echo "$ac_t""yes" 1>&6
4832     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4833     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4834   cat >> confdefs.h <<EOF
4835 #define $ac_tr_lib 1
4836 EOF
4837
4838   LIBS="-lV3 $LIBS"
4839
4840 else
4841   echo "$ac_t""no" 1>&6
4842 fi
4843
4844
4845 if test $ac_cv_header_winsock_h = yes; then
4846         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4847 echo "configure:4848: checking for winsock" >&5
4848 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851   cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854 #include <winsock.h>
4855 int main() {
4856
4857                         socket(0,0,0);
4858                         select(0,NULL,NULL,NULL,NULL);
4859                         closesocket(0);
4860                         gethostname(NULL,0);
4861         
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865   rm -rf conftest*
4866   ol_cv_winsock=yes
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   ol_cv_winsock=no
4872 fi
4873 rm -f conftest*]
4874 fi
4875
4876 echo "$ac_t""$ol_cv_winsock" 1>&6
4877
4878         if test $ol_cv_winsock = yes ; then
4879                 cat >> confdefs.h <<\EOF
4880 #define HAVE_WINSOCK 1
4881 EOF
4882
4883                 ac_cv_func_socket=yes
4884                 ac_cv_func_select=yes
4885                 ac_cv_func_closesocket=yes
4886                 ac_cv_func_gethostname=yes
4887         fi
4888 fi
4889
4890
4891 echo $ac_n "checking for socket""... $ac_c" 1>&6
4892 echo "configure:4893: checking for socket" >&5
4893 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4894   echo $ac_n "(cached) $ac_c" 1>&6
4895 else
4896   cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899 /* System header to define __stub macros and hopefully few prototypes,
4900     which can conflict with char socket(); below.  */
4901 #include <assert.h>
4902 /* Override any gcc2 internal prototype to avoid an error.  */
4903 /* We use char because int might match the return type of a gcc2
4904     builtin and then its argument prototype would still apply.  */
4905 char socket();
4906 char (*f)();
4907
4908 int main() {
4909
4910 /* The GNU C library defines this for functions which it implements
4911     to always fail with ENOSYS.  Some functions are actually named
4912     something starting with __ and the normal name is an alias.  */
4913 #if defined (__stub_socket) || defined (__stub___socket)
4914 choke me
4915 #else
4916 f = socket;
4917 #endif
4918
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_func_socket=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_func_socket=no"
4929 fi
4930 rm -f conftest*
4931 fi
4932
4933 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4934   echo "$ac_t""yes" 1>&6
4935   :
4936 else
4937   echo "$ac_t""no" 1>&6
4938         
4939         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4940 echo "configure:4941: checking for main in -lsocket" >&5
4941 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4943   echo $ac_n "(cached) $ac_c" 1>&6
4944 else
4945   ac_save_LIBS="$LIBS"
4946 LIBS="-lsocket  $LIBS"
4947 cat > conftest.$ac_ext <<EOF
4948 #line 4949 "configure"
4949 #include "confdefs.h"
4950
4951 int main() {
4952 main()
4953 ; return 0; }
4954 EOF
4955 if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4956   rm -rf conftest*
4957   eval "ac_cv_lib_$ac_lib_var=yes"
4958 else
4959   echo "configure: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=no"
4963 fi
4964 rm -f conftest*
4965 LIBS="$ac_save_LIBS"
4966
4967 fi
4968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4969   echo "$ac_t""yes" 1>&6
4970     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4971     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4972   cat >> confdefs.h <<EOF
4973 #define $ac_tr_lib 1
4974 EOF
4975
4976   LIBS="-lsocket $LIBS"
4977
4978 else
4979   echo "$ac_t""no" 1>&6
4980 fi
4981
4982         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4983 echo "configure:4984: checking for main in -lnet" >&5
4984 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4986   echo $ac_n "(cached) $ac_c" 1>&6
4987 else
4988   ac_save_LIBS="$LIBS"
4989 LIBS="-lnet  $LIBS"
4990 cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4993
4994 int main() {
4995 main()
4996 ; return 0; }
4997 EOF
4998 if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4999   rm -rf conftest*
5000   eval "ac_cv_lib_$ac_lib_var=yes"
5001 else
5002   echo "configure: failed program was:" >&5
5003   cat conftest.$ac_ext >&5
5004   rm -rf conftest*
5005   eval "ac_cv_lib_$ac_lib_var=no"
5006 fi
5007 rm -f conftest*
5008 LIBS="$ac_save_LIBS"
5009
5010 fi
5011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5012   echo "$ac_t""yes" 1>&6
5013     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5015   cat >> confdefs.h <<EOF
5016 #define $ac_tr_lib 1
5017 EOF
5018
5019   LIBS="-lnet $LIBS"
5020
5021 else
5022   echo "$ac_t""no" 1>&6
5023 fi
5024
5025         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
5026 echo "configure:5027: checking for main in -lnsl_s" >&5
5027 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
5028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5029   echo $ac_n "(cached) $ac_c" 1>&6
5030 else
5031   ac_save_LIBS="$LIBS"
5032 LIBS="-lnsl_s  $LIBS"
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036
5037 int main() {
5038 main()
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042   rm -rf conftest*
5043   eval "ac_cv_lib_$ac_lib_var=yes"
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   eval "ac_cv_lib_$ac_lib_var=no"
5049 fi
5050 rm -f conftest*
5051 LIBS="$ac_save_LIBS"
5052
5053 fi
5054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5055   echo "$ac_t""yes" 1>&6
5056     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5058   cat >> confdefs.h <<EOF
5059 #define $ac_tr_lib 1
5060 EOF
5061
5062   LIBS="-lnsl_s $LIBS"
5063
5064 else
5065   echo "$ac_t""no" 1>&6
5066 fi
5067
5068         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5069 echo "configure:5070: checking for main in -lnsl" >&5
5070 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
5071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   ac_save_LIBS="$LIBS"
5075 LIBS="-lnsl  $LIBS"
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079
5080 int main() {
5081 main()
5082 ; return 0; }
5083 EOF
5084 if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5085   rm -rf conftest*
5086   eval "ac_cv_lib_$ac_lib_var=yes"
5087 else
5088   echo "configure: failed program was:" >&5
5089   cat conftest.$ac_ext >&5
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=no"
5092 fi
5093 rm -f conftest*
5094 LIBS="$ac_save_LIBS"
5095
5096 fi
5097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5098   echo "$ac_t""yes" 1>&6
5099     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5101   cat >> confdefs.h <<EOF
5102 #define $ac_tr_lib 1
5103 EOF
5104
5105   LIBS="-lnsl $LIBS"
5106
5107 else
5108   echo "$ac_t""no" 1>&6
5109 fi
5110
5111         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
5112 echo "configure:5113: checking for socket in -linet" >&5
5113 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
5114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5115   echo $ac_n "(cached) $ac_c" 1>&6
5116 else
5117   ac_save_LIBS="$LIBS"
5118 LIBS="-linet  $LIBS"
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122 /* Override any gcc2 internal prototype to avoid an error.  */
5123 /* We use char because int might match the return type of a gcc2
5124     builtin and then its argument prototype would still apply.  */
5125 char socket();
5126
5127 int main() {
5128 socket()
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5132   rm -rf conftest*
5133   eval "ac_cv_lib_$ac_lib_var=yes"
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=no"
5139 fi
5140 rm -f conftest*
5141 LIBS="$ac_save_LIBS"
5142
5143 fi
5144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5145   echo "$ac_t""yes" 1>&6
5146     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5147     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5148   cat >> confdefs.h <<EOF
5149 #define $ac_tr_lib 1
5150 EOF
5151
5152   LIBS="-linet $LIBS"
5153
5154 else
5155   echo "$ac_t""no" 1>&6
5156 fi
5157
5158         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5159 echo "configure:5160: checking for main in -lgen" >&5
5160 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
5161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5162   echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164   ac_save_LIBS="$LIBS"
5165 LIBS="-lgen  $LIBS"
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169
5170 int main() {
5171 main()
5172 ; return 0; }
5173 EOF
5174 if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5175   rm -rf conftest*
5176   eval "ac_cv_lib_$ac_lib_var=yes"
5177 else
5178   echo "configure: failed program was:" >&5
5179   cat conftest.$ac_ext >&5
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=no"
5182 fi
5183 rm -f conftest*
5184 LIBS="$ac_save_LIBS"
5185
5186 fi
5187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5188   echo "$ac_t""yes" 1>&6
5189     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5190     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5191   cat >> confdefs.h <<EOF
5192 #define $ac_tr_lib 1
5193 EOF
5194
5195   LIBS="-lgen $LIBS"
5196
5197 else
5198   echo "$ac_t""no" 1>&6
5199 fi
5200
5201
5202 fi
5203
5204
5205 echo $ac_n "checking for select""... $ac_c" 1>&6
5206 echo "configure:5207: checking for select" >&5
5207 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
5208   echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210   cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 /* System header to define __stub macros and hopefully few prototypes,
5214     which can conflict with char select(); below.  */
5215 #include <assert.h>
5216 /* Override any gcc2 internal prototype to avoid an error.  */
5217 /* We use char because int might match the return type of a gcc2
5218     builtin and then its argument prototype would still apply.  */
5219 char select();
5220 char (*f)();
5221
5222 int main() {
5223
5224 /* The GNU C library defines this for functions which it implements
5225     to always fail with ENOSYS.  Some functions are actually named
5226     something starting with __ and the normal name is an alias.  */
5227 #if defined (__stub_select) || defined (__stub___select)
5228 choke me
5229 #else
5230 f = select;
5231 #endif
5232
5233 ; return 0; }
5234 EOF
5235 if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5236   rm -rf conftest*
5237   eval "ac_cv_func_select=yes"
5238 else
5239   echo "configure: failed program was:" >&5
5240   cat conftest.$ac_ext >&5
5241   rm -rf conftest*
5242   eval "ac_cv_func_select=no"
5243 fi
5244 rm -f conftest*
5245 fi
5246
5247 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5248   echo "$ac_t""yes" 1>&6
5249   :
5250 else
5251   echo "$ac_t""no" 1>&6
5252 { echo "configure: error: select() required." 1>&2; exit 1; }
5253 fi
5254
5255
5256 if test "${ac_cv_header_winsock_h}" != yes; then
5257                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5258 echo "configure:5259: checking types of arguments for select()" >&5
5259  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
5260   echo $ac_n "(cached) $ac_c" 1>&6
5261 else
5262    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
5263   echo $ac_n "(cached) $ac_c" 1>&6
5264 else
5265     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5269      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5270       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5271        cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274 #ifdef HAVE_SYS_TYPES_H
5275 #include <sys/types.h>
5276 #endif
5277 #ifdef HAVE_SYS_TIME_H
5278 #include <sys/time.h>
5279 #endif
5280 #ifdef HAVE_SYS_SELECT_H
5281 #include <sys/select.h>
5282 #endif
5283 #ifdef HAVE_SYS_SOCKET_H
5284 #include <sys/socket.h>
5285 #endif
5286 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);
5287 int main() {
5288
5289 ; return 0; }
5290 EOF
5291 if { (eval echo configure:5292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5292   rm -rf conftest*
5293           ac_not_found=no ; break 3
5294 else
5295   echo "configure: failed program was:" >&5
5296   cat conftest.$ac_ext >&5
5297   rm -rf conftest*
5298   ac_not_found=yes
5299 fi
5300 rm -f conftest*
5301       done
5302      done
5303     done
5304    
5305 fi
5306   
5307 fi
5308  
5309 fi
5310  if test "$ac_not_found" = yes; then
5311   ac_cv_func_select_arg1=int 
5312   ac_cv_func_select_arg234='int *' 
5313   ac_cv_func_select_arg5='struct timeval *'
5314  fi
5315  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5316  cat >> confdefs.h <<EOF
5317 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5318 EOF
5319
5320  cat >> confdefs.h <<EOF
5321 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5322 EOF
5323
5324  cat >> confdefs.h <<EOF
5325 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5326 EOF
5327
5328
5329 fi
5330
5331
5332 for ac_hdr in regex.h 
5333 do
5334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5335 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5336 echo "configure:5337: checking for $ac_hdr" >&5
5337 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5338   echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340   cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 #include <$ac_hdr>
5344 EOF
5345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5346 { (eval echo configure:5347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5348 if test -z "$ac_err"; then
5349   rm -rf conftest*
5350   eval "ac_cv_header_$ac_safe=yes"
5351 else
5352   echo "$ac_err" >&5
5353   echo "configure: failed program was:" >&5
5354   cat conftest.$ac_ext >&5
5355   rm -rf conftest*
5356   eval "ac_cv_header_$ac_safe=no"
5357 fi
5358 rm -f conftest*
5359 fi
5360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5361   echo "$ac_t""yes" 1>&6
5362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5363   cat >> confdefs.h <<EOF
5364 #define $ac_tr_hdr 1
5365 EOF
5366  
5367 else
5368   echo "$ac_t""no" 1>&6
5369 fi
5370 done
5371
5372 if test "$ac_cv_header_regex_h" != yes ; then
5373         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5374 fi
5375 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5376 echo "configure:5377: checking for regfree" >&5
5377 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   cat > conftest.$ac_ext <<EOF
5381 #line 5382 "configure"
5382 #include "confdefs.h"
5383 /* System header to define __stub macros and hopefully few prototypes,
5384     which can conflict with char regfree(); below.  */
5385 #include <assert.h>
5386 /* Override any gcc2 internal prototype to avoid an error.  */
5387 /* We use char because int might match the return type of a gcc2
5388     builtin and then its argument prototype would still apply.  */
5389 char regfree();
5390 char (*f)();
5391
5392 int main() {
5393
5394 /* The GNU C library defines this for functions which it implements
5395     to always fail with ENOSYS.  Some functions are actually named
5396     something starting with __ and the normal name is an alias.  */
5397 #if defined (__stub_regfree) || defined (__stub___regfree)
5398 choke me
5399 #else
5400 f = regfree;
5401 #endif
5402
5403 ; return 0; }
5404 EOF
5405 if { (eval echo configure:5406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5406   rm -rf conftest*
5407   eval "ac_cv_func_regfree=yes"
5408 else
5409   echo "configure: failed program was:" >&5
5410   cat conftest.$ac_ext >&5
5411   rm -rf conftest*
5412   eval "ac_cv_func_regfree=no"
5413 fi
5414 rm -f conftest*
5415 fi
5416
5417 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5418   echo "$ac_t""yes" 1>&6
5419   :
5420 else
5421   echo "$ac_t""no" 1>&6
5422 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5423 fi
5424
5425
5426
5427 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5428 echo "configure:5429: checking for compatible POSIX regex" >&5
5429 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
5430   echo $ac_n "(cached) $ac_c" 1>&6
5431 else
5432   
5433         if test "$cross_compiling" = yes; then
5434   ol_cv_c_posix_regex=cross
5435 else
5436   cat > conftest.$ac_ext <<EOF
5437 #line 5438 "configure"
5438 #include "confdefs.h"
5439
5440 #include <sys/types.h>
5441 #include <regex.h>
5442 static char *pattern, *string;
5443 main()
5444 {
5445         int rc;
5446         regex_t re;
5447
5448         pattern = "^A";
5449
5450         if(regcomp(&re, pattern, 0)) {
5451                 return -1;
5452         }
5453         
5454         string = "ALL MATCH";
5455         
5456         rc = regexec(&re, string, 0, (void*)0, 0);
5457
5458         regfree(&re);
5459
5460         return rc;
5461 }
5462 EOF
5463 if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5464 then
5465   ol_cv_c_posix_regex=yes
5466 else
5467   echo "configure: failed program was:" >&5
5468   cat conftest.$ac_ext >&5
5469   rm -fr conftest*
5470   ol_cv_c_posix_regex=no
5471 fi
5472 rm -fr conftest*
5473 fi
5474
5475 fi
5476
5477 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5478
5479 if test "$ol_cv_c_posix_regex" = no ; then
5480         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5481 fi
5482
5483 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5484 echo "configure:5485: checking for res_search" >&5
5485 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5486   echo $ac_n "(cached) $ac_c" 1>&6
5487 else
5488   cat > conftest.$ac_ext <<EOF
5489 #line 5490 "configure"
5490 #include "confdefs.h"
5491 /* System header to define __stub macros and hopefully few prototypes,
5492     which can conflict with char res_search(); below.  */
5493 #include <assert.h>
5494 /* Override any gcc2 internal prototype to avoid an error.  */
5495 /* We use char because int might match the return type of a gcc2
5496     builtin and then its argument prototype would still apply.  */
5497 char res_search();
5498 char (*f)();
5499
5500 int main() {
5501
5502 /* The GNU C library defines this for functions which it implements
5503     to always fail with ENOSYS.  Some functions are actually named
5504     something starting with __ and the normal name is an alias.  */
5505 #if defined (__stub_res_search) || defined (__stub___res_search)
5506 choke me
5507 #else
5508 f = res_search;
5509 #endif
5510
5511 ; return 0; }
5512 EOF
5513 if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5514   rm -rf conftest*
5515   eval "ac_cv_func_res_search=yes"
5516 else
5517   echo "configure: failed program was:" >&5
5518   cat conftest.$ac_ext >&5
5519   rm -rf conftest*
5520   eval "ac_cv_func_res_search=no"
5521 fi
5522 rm -f conftest*
5523 fi
5524
5525 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5526   echo "$ac_t""yes" 1>&6
5527   :
5528 else
5529   echo "$ac_t""no" 1>&6
5530 fi
5531
5532 if test $ac_cv_func_res_search = no ; then 
5533         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5534 echo "configure:5535: checking for res_search in -lbind" >&5
5535 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5536 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5537   echo $ac_n "(cached) $ac_c" 1>&6
5538 else
5539   ac_save_LIBS="$LIBS"
5540 LIBS="-lbind  $LIBS"
5541 cat > conftest.$ac_ext <<EOF
5542 #line 5543 "configure"
5543 #include "confdefs.h"
5544 /* Override any gcc2 internal prototype to avoid an error.  */
5545 /* We use char because int might match the return type of a gcc2
5546     builtin and then its argument prototype would still apply.  */
5547 char res_search();
5548
5549 int main() {
5550 res_search()
5551 ; return 0; }
5552 EOF
5553 if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5554   rm -rf conftest*
5555   eval "ac_cv_lib_$ac_lib_var=yes"
5556 else
5557   echo "configure: failed program was:" >&5
5558   cat conftest.$ac_ext >&5
5559   rm -rf conftest*
5560   eval "ac_cv_lib_$ac_lib_var=no"
5561 fi
5562 rm -f conftest*
5563 LIBS="$ac_save_LIBS"
5564
5565 fi
5566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5567   echo "$ac_t""yes" 1>&6
5568     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5569     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5570   cat >> confdefs.h <<EOF
5571 #define $ac_tr_lib 1
5572 EOF
5573
5574   LIBS="-lbind $LIBS"
5575
5576 else
5577   echo "$ac_t""no" 1>&6
5578 fi
5579
5580         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5581 fi
5582
5583 if test $ac_cv_func_res_search = no ; then 
5584         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5585 echo "configure:5586: checking for __res_search in -lbind" >&5
5586 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5588   echo $ac_n "(cached) $ac_c" 1>&6
5589 else
5590   ac_save_LIBS="$LIBS"
5591 LIBS="-lbind  $LIBS"
5592 cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 /* We use char because int might match the return type of a gcc2
5597     builtin and then its argument prototype would still apply.  */
5598 char __res_search();
5599
5600 int main() {
5601 __res_search()
5602 ; return 0; }
5603 EOF
5604 if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5605   rm -rf conftest*
5606   eval "ac_cv_lib_$ac_lib_var=yes"
5607 else
5608   echo "configure: failed program was:" >&5
5609   cat conftest.$ac_ext >&5
5610   rm -rf conftest*
5611   eval "ac_cv_lib_$ac_lib_var=no"
5612 fi
5613 rm -f conftest*
5614 LIBS="$ac_save_LIBS"
5615
5616 fi
5617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5618   echo "$ac_t""yes" 1>&6
5619     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5620     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5621   cat >> confdefs.h <<EOF
5622 #define $ac_tr_lib 1
5623 EOF
5624
5625   LIBS="-lbind $LIBS"
5626
5627 else
5628   echo "$ac_t""no" 1>&6
5629 fi
5630
5631         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5632 fi
5633
5634 if test $ac_cv_func_res_search = no ; then 
5635         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5636 echo "configure:5637: checking for res_search in -lresolv" >&5
5637 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   ac_save_LIBS="$LIBS"
5642 LIBS="-lresolv  $LIBS"
5643 cat > conftest.$ac_ext <<EOF
5644 #line 5645 "configure"
5645 #include "confdefs.h"
5646 /* Override any gcc2 internal prototype to avoid an error.  */
5647 /* We use char because int might match the return type of a gcc2
5648     builtin and then its argument prototype would still apply.  */
5649 char res_search();
5650
5651 int main() {
5652 res_search()
5653 ; return 0; }
5654 EOF
5655 if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5656   rm -rf conftest*
5657   eval "ac_cv_lib_$ac_lib_var=yes"
5658 else
5659   echo "configure: failed program was:" >&5
5660   cat conftest.$ac_ext >&5
5661   rm -rf conftest*
5662   eval "ac_cv_lib_$ac_lib_var=no"
5663 fi
5664 rm -f conftest*
5665 LIBS="$ac_save_LIBS"
5666
5667 fi
5668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5669   echo "$ac_t""yes" 1>&6
5670     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5671     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5672   cat >> confdefs.h <<EOF
5673 #define $ac_tr_lib 1
5674 EOF
5675
5676   LIBS="-lresolv $LIBS"
5677
5678 else
5679   echo "$ac_t""no" 1>&6
5680 fi
5681
5682         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5683 fi
5684
5685 if test "$ac_cv_func_res_search" = yes ; then
5686         cat >> confdefs.h <<\EOF
5687 #define HAVE_RES_SEARCH 1
5688 EOF
5689
5690 elif test $ol_enable_dns = yes ; then
5691         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5692 elif test $ol_enable_dns != no ; then
5693         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5694 fi
5695
5696
5697 ol_link_isode=no
5698 if test $ol_enable_ldapd != no ; then
5699         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5700
5701                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5702 echo "configure:5703: checking for main in -lxtpp" >&5
5703 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5705   echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707   ac_save_LIBS="$LIBS"
5708 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5709 cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712
5713 int main() {
5714 main()
5715 ; return 0; }
5716 EOF
5717 if { (eval echo configure:5718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=yes"
5720 else
5721   echo "configure: failed program was:" >&5
5722   cat conftest.$ac_ext >&5
5723   rm -rf conftest*
5724   eval "ac_cv_lib_$ac_lib_var=no"
5725 fi
5726 rm -f conftest*
5727 LIBS="$ac_save_LIBS"
5728
5729 fi
5730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5731   echo "$ac_t""yes" 1>&6
5732   
5733                 ol_link_isode=yes
5734                 cat >> confdefs.h <<\EOF
5735 #define HAVE_XTPP 1
5736 EOF
5737
5738                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5739                 
5740 else
5741   echo "$ac_t""no" 1>&6
5742 :
5743 fi
5744
5745         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5746 echo "configure:5747: checking for main in -ldsap" >&5
5747 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5748 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   ac_save_LIBS="$LIBS"
5752 LIBS="-ldsap -lisode $LIBS"
5753 cat > conftest.$ac_ext <<EOF
5754 #line 5755 "configure"
5755 #include "confdefs.h"
5756
5757 int main() {
5758 main()
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_lib_$ac_lib_var=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_lib_$ac_lib_var=no"
5769 fi
5770 rm -f conftest*
5771 LIBS="$ac_save_LIBS"
5772
5773 fi
5774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5775   echo "$ac_t""yes" 1>&6
5776   
5777                 ol_link_isode=yes
5778                 cat >> confdefs.h <<\EOF
5779 #define HAVE_DSAP 1
5780 EOF
5781
5782                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5783                 
5784 else
5785   echo "$ac_t""no" 1>&6
5786 :
5787 fi
5788
5789         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5790 echo "configure:5791: checking for main in -lisode" >&5
5791 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5793   echo $ac_n "(cached) $ac_c" 1>&6
5794 else
5795   ac_save_LIBS="$LIBS"
5796 LIBS="-lisode  $LIBS"
5797 cat > conftest.$ac_ext <<EOF
5798 #line 5799 "configure"
5799 #include "confdefs.h"
5800
5801 int main() {
5802 main()
5803 ; return 0; }
5804 EOF
5805 if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5806   rm -rf conftest*
5807   eval "ac_cv_lib_$ac_lib_var=yes"
5808 else
5809   echo "configure: failed program was:" >&5
5810   cat conftest.$ac_ext >&5
5811   rm -rf conftest*
5812   eval "ac_cv_lib_$ac_lib_var=no"
5813 fi
5814 rm -f conftest*
5815 LIBS="$ac_save_LIBS"
5816
5817 fi
5818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5819   echo "$ac_t""yes" 1>&6
5820   
5821                 ol_link_isode=yes
5822                 cat >> confdefs.h <<\EOF
5823 #define HAVE_ISODE 1
5824 EOF
5825
5826                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5827                 
5828 else
5829   echo "$ac_t""no" 1>&6
5830 :
5831 fi
5832
5833 fi
5834
5835 if test $ol_link_isode != no; then
5836         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5837 echo "configure:5838: checking for main in -lpp" >&5
5838 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5839 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5840   echo $ac_n "(cached) $ac_c" 1>&6
5841 else
5842   ac_save_LIBS="$LIBS"
5843 LIBS="-lpp  $LIBS"
5844 cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847
5848 int main() {
5849 main()
5850 ; return 0; }
5851 EOF
5852 if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5853   rm -rf conftest*
5854   eval "ac_cv_lib_$ac_lib_var=yes"
5855 else
5856   echo "configure: failed program was:" >&5
5857   cat conftest.$ac_ext >&5
5858   rm -rf conftest*
5859   eval "ac_cv_lib_$ac_lib_var=no"
5860 fi
5861 rm -f conftest*
5862 LIBS="$ac_save_LIBS"
5863
5864 fi
5865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5866   echo "$ac_t""yes" 1>&6
5867   
5868                 cat >> confdefs.h <<\EOF
5869 #define HAVE_PP 1
5870 EOF
5871
5872                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5873                 
5874 else
5875   echo "$ac_t""no" 1>&6
5876 :
5877 fi
5878
5879
5880         # Extract the first word of "pepsy", so it can be a program name with args.
5881 set dummy pepsy; ac_word=$2
5882 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5883 echo "configure:5884: checking for $ac_word" >&5
5884 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5885   echo $ac_n "(cached) $ac_c" 1>&6
5886 else
5887   case "$PEPSY" in
5888   /*)
5889   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5890   ;;
5891   ?:/*)
5892   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5893   ;;
5894   *)
5895   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5896   ac_dummy="$PATH"
5897   for ac_dir in $ac_dummy; do 
5898     test -z "$ac_dir" && ac_dir=.
5899     if test -f $ac_dir/$ac_word; then
5900       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5901       break
5902     fi
5903   done
5904   IFS="$ac_save_ifs"
5905   ;;
5906 esac
5907 fi
5908 PEPSY="$ac_cv_path_PEPSY"
5909 if test -n "$PEPSY"; then
5910   echo "$ac_t""$PEPSY" 1>&6
5911 else
5912   echo "$ac_t""no" 1>&6
5913 fi
5914
5915 fi
5916
5917 if test $ol_enable_quipu != no ; then
5918         for ac_hdr in quipu/commonarg.h
5919 do
5920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5922 echo "configure:5923: checking for $ac_hdr" >&5
5923 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5924   echo $ac_n "(cached) $ac_c" 1>&6
5925 else
5926   cat > conftest.$ac_ext <<EOF
5927 #line 5928 "configure"
5928 #include "confdefs.h"
5929 #include <$ac_hdr>
5930 EOF
5931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5932 { (eval echo configure:5933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5934 if test -z "$ac_err"; then
5935   rm -rf conftest*
5936   eval "ac_cv_header_$ac_safe=yes"
5937 else
5938   echo "$ac_err" >&5
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_header_$ac_safe=no"
5943 fi
5944 rm -f conftest*
5945 fi
5946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5947   echo "$ac_t""yes" 1>&6
5948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5949   cat >> confdefs.h <<EOF
5950 #define $ac_tr_hdr 1
5951 EOF
5952  
5953 else
5954   echo "$ac_t""no" 1>&6
5955 fi
5956 done
5957
5958
5959         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5960                 BUILD_QUIPU=yes
5961         elif test $ol_enable_quipu = auto ; then
5962                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5963         else
5964                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5965         fi
5966 fi
5967
5968 ol_link_kbind=no
5969 ol_link_kpasswd=no
5970 ol_link_krb5=no
5971 ol_link_krb4=no
5972
5973 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5974         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5975
5976         for ac_hdr in krb5.h
5977 do
5978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5980 echo "configure:5981: checking for $ac_hdr" >&5
5981 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5982   echo $ac_n "(cached) $ac_c" 1>&6
5983 else
5984   cat > conftest.$ac_ext <<EOF
5985 #line 5986 "configure"
5986 #include "confdefs.h"
5987 #include <$ac_hdr>
5988 EOF
5989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5990 { (eval echo configure:5991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5992 if test -z "$ac_err"; then
5993   rm -rf conftest*
5994   eval "ac_cv_header_$ac_safe=yes"
5995 else
5996   echo "$ac_err" >&5
5997   echo "configure: failed program was:" >&5
5998   cat conftest.$ac_ext >&5
5999   rm -rf conftest*
6000   eval "ac_cv_header_$ac_safe=no"
6001 fi
6002 rm -f conftest*
6003 fi
6004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6005   echo "$ac_t""yes" 1>&6
6006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6007   cat >> confdefs.h <<EOF
6008 #define $ac_tr_hdr 1
6009 EOF
6010  
6011 else
6012   echo "$ac_t""no" 1>&6
6013 fi
6014 done
6015
6016
6017         if test $ac_cv_header_krb5_h = yes ; then
6018                                 for ac_hdr in heim_err.h
6019 do
6020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6022 echo "configure:6023: checking for $ac_hdr" >&5
6023 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6024   echo $ac_n "(cached) $ac_c" 1>&6
6025 else
6026   cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029 #include <$ac_hdr>
6030 EOF
6031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6032 { (eval echo configure:6033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6034 if test -z "$ac_err"; then
6035   rm -rf conftest*
6036   eval "ac_cv_header_$ac_safe=yes"
6037 else
6038   echo "$ac_err" >&5
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   eval "ac_cv_header_$ac_safe=no"
6043 fi
6044 rm -f conftest*
6045 fi
6046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6047   echo "$ac_t""yes" 1>&6
6048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6049   cat >> confdefs.h <<EOF
6050 #define $ac_tr_hdr 1
6051 EOF
6052  
6053 else
6054   echo "$ac_t""no" 1>&6
6055 fi
6056 done
6057
6058                 if test $ac_cv_header_heim_err_h = yes ; then
6059                         krb5_impl=heimdal
6060                 else
6061                         krb5_impl=mit
6062                 fi
6063
6064                 if test $krb5_impl = mit; then
6065                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6066 echo "configure:6067: checking for main in -lkrb5" >&5
6067 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6069   echo $ac_n "(cached) $ac_c" 1>&6
6070 else
6071   ac_save_LIBS="$LIBS"
6072 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
6073 cat > conftest.$ac_ext <<EOF
6074 #line 6075 "configure"
6075 #include "confdefs.h"
6076
6077 int main() {
6078 main()
6079 ; return 0; }
6080 EOF
6081 if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6082   rm -rf conftest*
6083   eval "ac_cv_lib_$ac_lib_var=yes"
6084 else
6085   echo "configure: failed program was:" >&5
6086   cat conftest.$ac_ext >&5
6087   rm -rf conftest*
6088   eval "ac_cv_lib_$ac_lib_var=no"
6089 fi
6090 rm -f conftest*
6091 LIBS="$ac_save_LIBS"
6092
6093 fi
6094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6095   echo "$ac_t""yes" 1>&6
6096   have_krb5=yes
6097                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
6098 else
6099   echo "$ac_t""no" 1>&6
6100 have_krb5=no
6101 fi
6102
6103
6104                 elif test $krb5_impl = heimdal; then
6105                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
6106 echo "configure:6107: checking for main in -lkrb5" >&5
6107 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
6108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6109   echo $ac_n "(cached) $ac_c" 1>&6
6110 else
6111   ac_save_LIBS="$LIBS"
6112 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6113 cat > conftest.$ac_ext <<EOF
6114 #line 6115 "configure"
6115 #include "confdefs.h"
6116
6117 int main() {
6118 main()
6119 ; return 0; }
6120 EOF
6121 if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6122   rm -rf conftest*
6123   eval "ac_cv_lib_$ac_lib_var=yes"
6124 else
6125   echo "configure: failed program was:" >&5
6126   cat conftest.$ac_ext >&5
6127   rm -rf conftest*
6128   eval "ac_cv_lib_$ac_lib_var=no"
6129 fi
6130 rm -f conftest*
6131 LIBS="$ac_save_LIBS"
6132
6133 fi
6134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6135   echo "$ac_t""yes" 1>&6
6136   have_krb5=yes
6137                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
6138 else
6139   echo "$ac_t""no" 1>&6
6140 have_krb5=no
6141 fi
6142
6143
6144                         cat >> confdefs.h <<\EOF
6145 #define HAVE_HEIMDAL_KERBEROS 1
6146 EOF
6147
6148                 else
6149                         have_krb5=no
6150                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6151                 fi
6152
6153                 if test $have_krb5 = yes ; then
6154                         ol_link_krb5=yes
6155
6156                         cat >> confdefs.h <<\EOF
6157 #define HAVE_KRB5 1
6158 EOF
6159
6160
6161                         if test $ol_enable_kpasswd != no ; then
6162                                 ol_link_kpasswd=yes;
6163                         fi
6164
6165                         if test $ol_with_kerberos = k5only ; then
6166                                 ol_with_kerberos=found
6167                         fi
6168
6169                 elif test $ol_with_kerberos != auto ; then
6170                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
6171                 fi
6172
6173         fi
6174 fi
6175
6176 if test $ol_link_krb5 = yes -a \
6177         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
6178
6179         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
6180 do
6181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6183 echo "configure:6184: checking for $ac_hdr" >&5
6184 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6185   echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187   cat > conftest.$ac_ext <<EOF
6188 #line 6189 "configure"
6189 #include "confdefs.h"
6190 #include <$ac_hdr>
6191 EOF
6192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6193 { (eval echo configure:6194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6195 if test -z "$ac_err"; then
6196   rm -rf conftest*
6197   eval "ac_cv_header_$ac_safe=yes"
6198 else
6199   echo "$ac_err" >&5
6200   echo "configure: failed program was:" >&5
6201   cat conftest.$ac_ext >&5
6202   rm -rf conftest*
6203   eval "ac_cv_header_$ac_safe=no"
6204 fi
6205 rm -f conftest*
6206 fi
6207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6208   echo "$ac_t""yes" 1>&6
6209     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6210   cat >> confdefs.h <<EOF
6211 #define $ac_tr_hdr 1
6212 EOF
6213  
6214 else
6215   echo "$ac_t""no" 1>&6
6216 fi
6217 done
6218
6219
6220         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
6221                 if test $krb5_impl = mit; then
6222                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6223 echo "configure:6224: checking for main in -lkrb4" >&5
6224 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6226   echo $ac_n "(cached) $ac_c" 1>&6
6227 else
6228   ac_save_LIBS="$LIBS"
6229 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
6230 cat > conftest.$ac_ext <<EOF
6231 #line 6232 "configure"
6232 #include "confdefs.h"
6233
6234 int main() {
6235 main()
6236 ; return 0; }
6237 EOF
6238 if { (eval echo configure:6239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6239   rm -rf conftest*
6240   eval "ac_cv_lib_$ac_lib_var=yes"
6241 else
6242   echo "configure: failed program was:" >&5
6243   cat conftest.$ac_ext >&5
6244   rm -rf conftest*
6245   eval "ac_cv_lib_$ac_lib_var=no"
6246 fi
6247 rm -f conftest*
6248 LIBS="$ac_save_LIBS"
6249
6250 fi
6251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6252   echo "$ac_t""yes" 1>&6
6253   have_k425=yes
6254                                 KRB4_LIBS="-lkrb4 -ldes425"
6255 else
6256   echo "$ac_t""no" 1>&6
6257 have_k425=no
6258 fi
6259
6260
6261                 elif test $krb5_impl = heimdal; then
6262                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
6263 echo "configure:6264: checking for main in -lkrb4" >&5
6264 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
6265 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6266   echo $ac_n "(cached) $ac_c" 1>&6
6267 else
6268   ac_save_LIBS="$LIBS"
6269 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
6270 cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6273
6274 int main() {
6275 main()
6276 ; return 0; }
6277 EOF
6278 if { (eval echo configure:6279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6279   rm -rf conftest*
6280   eval "ac_cv_lib_$ac_lib_var=yes"
6281 else
6282   echo "configure: failed program was:" >&5
6283   cat conftest.$ac_ext >&5
6284   rm -rf conftest*
6285   eval "ac_cv_lib_$ac_lib_var=no"
6286 fi
6287 rm -f conftest*
6288 LIBS="$ac_save_LIBS"
6289
6290 fi
6291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6292   echo "$ac_t""yes" 1>&6
6293   have_k425=yes
6294                                 KRB4_LIBS="-lkrb4"
6295 else
6296   echo "$ac_t""no" 1>&6
6297 have_k425=no
6298 fi
6299
6300
6301                 else
6302                         have_425=no
6303                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
6304                 fi
6305
6306                 if test $have_k425 = yes ; then
6307                         ol_with_kerberos=found
6308                         ol_link_krb4=yes
6309
6310                         cat >> confdefs.h <<\EOF
6311 #define HAVE_KRB425 1
6312 EOF
6313
6314                         cat >> confdefs.h <<\EOF
6315 #define HAVE_KRB4 1
6316 EOF
6317
6318
6319                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
6320 echo "configure:6321: checking for des_debug in Kerberos libraries" >&5
6321 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
6322   echo $ac_n "(cached) $ac_c" 1>&6
6323 else
6324   
6325                                                                 save_LIBS="$LIBS"
6326                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
6327                                 cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330
6331 #include <kerberosIV/krb.h>
6332 #include <kerberosIV/des.h>
6333 extern int des_debug;
6334
6335 int main() {
6336
6337 des_debug = 1;
6338
6339 ; return 0; }
6340 EOF
6341 if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6342   rm -rf conftest*
6343   ol_cv_var_des_debug=yes
6344 else
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   ol_cv_var_des_debug=no
6349 fi
6350 rm -f conftest*
6351                                                                 LIBS="$save_LIBS"
6352                         
6353 fi
6354
6355 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
6356
6357                         if test $ol_cv_var_des_debug = yes ; then
6358                                 cat >> confdefs.h <<\EOF
6359 #define HAVE_DES_DEBUG 1
6360 EOF
6361
6362                         fi
6363
6364                         LIBS="$save_LIBS"
6365                 fi
6366         fi
6367 fi
6368
6369 if test $ol_link_krb5 = yes ; then
6370         ol_with_kerberos=found
6371 fi
6372
6373 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6374         -o $ol_with_kerberos = kth ; then
6375
6376         for ac_hdr in krb.h des.h krb-archaeology.h 
6377 do
6378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6380 echo "configure:6381: checking for $ac_hdr" >&5
6381 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6382   echo $ac_n "(cached) $ac_c" 1>&6
6383 else
6384   cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387 #include <$ac_hdr>
6388 EOF
6389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6390 { (eval echo configure:6391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6392 if test -z "$ac_err"; then
6393   rm -rf conftest*
6394   eval "ac_cv_header_$ac_safe=yes"
6395 else
6396   echo "$ac_err" >&5
6397   echo "configure: failed program was:" >&5
6398   cat conftest.$ac_ext >&5
6399   rm -rf conftest*
6400   eval "ac_cv_header_$ac_safe=no"
6401 fi
6402 rm -f conftest*
6403 fi
6404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6405   echo "$ac_t""yes" 1>&6
6406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6407   cat >> confdefs.h <<EOF
6408 #define $ac_tr_hdr 1
6409 EOF
6410  
6411 else
6412   echo "$ac_t""no" 1>&6
6413 fi
6414 done
6415
6416
6417         if test $ac_cv_header_krb_h = yes ; then
6418                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6419 echo "configure:6420: checking for main in -lkrb" >&5
6420 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
6421 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6422   echo $ac_n "(cached) $ac_c" 1>&6
6423 else
6424   ac_save_LIBS="$LIBS"
6425 LIBS="-lkrb -ldes $LIBS"
6426 cat > conftest.$ac_ext <<EOF
6427 #line 6428 "configure"
6428 #include "confdefs.h"
6429
6430 int main() {
6431 main()
6432 ; return 0; }
6433 EOF
6434 if { (eval echo configure:6435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6435   rm -rf conftest*
6436   eval "ac_cv_lib_$ac_lib_var=yes"
6437 else
6438   echo "configure: failed program was:" >&5
6439   cat conftest.$ac_ext >&5
6440   rm -rf conftest*
6441   eval "ac_cv_lib_$ac_lib_var=no"
6442 fi
6443 rm -f conftest*
6444 LIBS="$ac_save_LIBS"
6445
6446 fi
6447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6448   echo "$ac_t""yes" 1>&6
6449   have_k4=yes
6450 else
6451   echo "$ac_t""no" 1>&6
6452 have_k4=no
6453 fi
6454
6455
6456                 if test $have_k4 = yes ; then
6457                         ol_with_kerberos=found
6458                         ol_link_krb4=yes
6459
6460                         cat >> confdefs.h <<\EOF
6461 #define HAVE_KRB4 1
6462 EOF
6463
6464
6465                         KRB4_LIBS="-lkrb -ldes"
6466
6467                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6468                                 cat >> confdefs.h <<\EOF
6469 #define HAVE_KTH_KERBEROS 1
6470 EOF
6471
6472                         fi
6473                 fi
6474         fi
6475 fi
6476
6477 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6478         ol_link_kpasswd=yes;
6479 fi
6480
6481 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6482         cat >> confdefs.h <<\EOF
6483 #define HAVE_KERBEROS 1
6484 EOF
6485
6486
6487 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6488         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6489 fi
6490
6491 ol_link_tls=no
6492 if test $ol_with_tls != no ; then
6493         
6494         for ac_hdr in openssl/ssl.h ssl.h
6495 do
6496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6498 echo "configure:6499: checking for $ac_hdr" >&5
6499 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6500   echo $ac_n "(cached) $ac_c" 1>&6
6501 else
6502   cat > conftest.$ac_ext <<EOF
6503 #line 6504 "configure"
6504 #include "confdefs.h"
6505 #include <$ac_hdr>
6506 EOF
6507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6508 { (eval echo configure:6509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6510 if test -z "$ac_err"; then
6511   rm -rf conftest*
6512   eval "ac_cv_header_$ac_safe=yes"
6513 else
6514   echo "$ac_err" >&5
6515   echo "configure: failed program was:" >&5
6516   cat conftest.$ac_ext >&5
6517   rm -rf conftest*
6518   eval "ac_cv_header_$ac_safe=no"
6519 fi
6520 rm -f conftest*
6521 fi
6522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6523   echo "$ac_t""yes" 1>&6
6524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6525   cat >> confdefs.h <<EOF
6526 #define $ac_tr_hdr 1
6527 EOF
6528  
6529 else
6530   echo "$ac_t""no" 1>&6
6531 fi
6532 done
6533
6534         
6535         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6536                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6537 echo "configure:6538: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6538 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
6539 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   ac_save_LIBS="$LIBS"
6543 LIBS="-lssl -lcrypto $LIBS"
6544 cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* Override any gcc2 internal prototype to avoid an error.  */
6548 /* We use char because int might match the return type of a gcc2
6549     builtin and then its argument prototype would still apply.  */
6550 char SSLeay_add_ssl_algorithms();
6551
6552 int main() {
6553 SSLeay_add_ssl_algorithms()
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_lib_$ac_lib_var=yes"
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   eval "ac_cv_lib_$ac_lib_var=no"
6564 fi
6565 rm -f conftest*
6566 LIBS="$ac_save_LIBS"
6567
6568 fi
6569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6570   echo "$ac_t""yes" 1>&6
6571   have_ssleay=yes
6572                         need_rsaref=no
6573 else
6574   echo "$ac_t""no" 1>&6
6575 have_ssleay=no
6576 fi
6577
6578                         
6579                 if test $have_ssleay = no ; then
6580                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6581 echo "configure:6582: checking for SSL_library_init in -lssl" >&5
6582 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
6583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6584   echo $ac_n "(cached) $ac_c" 1>&6
6585 else
6586   ac_save_LIBS="$LIBS"
6587 LIBS="-lssl -lcrypto $LIBS"
6588 cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 /* Override any gcc2 internal prototype to avoid an error.  */
6592 /* We use char because int might match the return type of a gcc2
6593     builtin and then its argument prototype would still apply.  */
6594 char SSL_library_init();
6595
6596 int main() {
6597 SSL_library_init()
6598 ; return 0; }
6599 EOF
6600 if { (eval echo configure:6601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6601   rm -rf conftest*
6602   eval "ac_cv_lib_$ac_lib_var=yes"
6603 else
6604   echo "configure: failed program was:" >&5
6605   cat conftest.$ac_ext >&5
6606   rm -rf conftest*
6607   eval "ac_cv_lib_$ac_lib_var=no"
6608 fi
6609 rm -f conftest*
6610 LIBS="$ac_save_LIBS"
6611
6612 fi
6613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6614   echo "$ac_t""yes" 1>&6
6615   have_ssleay=yes
6616                                 need_rsaref=no
6617 else
6618   echo "$ac_t""no" 1>&6
6619 have_ssleay=no
6620 fi
6621
6622                 fi
6623
6624                 if test $have_ssleay = no ; then
6625                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6626 echo "configure:6627: checking for ssl3_accept in -lssl" >&5
6627 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
6628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6629   echo $ac_n "(cached) $ac_c" 1>&6
6630 else
6631   ac_save_LIBS="$LIBS"
6632 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6635 "configure"
6635 #include "confdefs.h"
6636 /* Override any gcc2 internal prototype to avoid an error.  */
6637 /* We use char because int might match the return type of a gcc2
6638     builtin and then its argument prototype would still apply.  */
6639 char ssl3_accept();
6640
6641 int main() {
6642 ssl3_accept()
6643 ; return 0; }
6644 EOF
6645 if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6646   rm -rf conftest*
6647   eval "ac_cv_lib_$ac_lib_var=yes"
6648 else
6649   echo "configure: failed program was:" >&5
6650   cat conftest.$ac_ext >&5
6651   rm -rf conftest*
6652   eval "ac_cv_lib_$ac_lib_var=no"
6653 fi
6654 rm -f conftest*
6655 LIBS="$ac_save_LIBS"
6656
6657 fi
6658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6659   echo "$ac_t""yes" 1>&6
6660   have_ssleay=yes
6661                                 need_rsaref=yes
6662 else
6663   echo "$ac_t""no" 1>&6
6664 have_ssleay=no
6665 fi
6666
6667                 fi
6668
6669                 if test $have_ssleay = yes ; then
6670                         ol_with_tls=found
6671                         ol_link_tls=yes
6672
6673                         cat >> confdefs.h <<\EOF
6674 #define HAVE_SSLEAY 1
6675 EOF
6676
6677
6678                         if test $need_rsaref = yes; then
6679                                 cat >> confdefs.h <<\EOF
6680 #define HAVE_RSAREF 1
6681 EOF
6682
6683
6684                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6685                         else
6686                                 TLS_LIBS="-lssl -lcrypto"
6687                         fi
6688                 fi
6689         fi
6690 fi
6691
6692 if test $ol_link_tls = yes ; then
6693         cat >> confdefs.h <<\EOF
6694 #define HAVE_TLS 1
6695 EOF
6696
6697 fi      
6698
6699 for ac_func in \
6700         ctime_r                 \
6701         gethostbyname_r gethostbyaddr_r \
6702
6703 do
6704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6705 echo "configure:6706: checking for $ac_func" >&5
6706 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6707   echo $ac_n "(cached) $ac_c" 1>&6
6708 else
6709   cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 /* System header to define __stub macros and hopefully few prototypes,
6713     which can conflict with char $ac_func(); below.  */
6714 #include <assert.h>
6715 /* Override any gcc2 internal prototype to avoid an error.  */
6716 /* We use char because int might match the return type of a gcc2
6717     builtin and then its argument prototype would still apply.  */
6718 char $ac_func();
6719 char (*f)();
6720
6721 int main() {
6722
6723 /* The GNU C library defines this for functions which it implements
6724     to always fail with ENOSYS.  Some functions are actually named
6725     something starting with __ and the normal name is an alias.  */
6726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6727 choke me
6728 #else
6729 f = $ac_func;
6730 #endif
6731
6732 ; return 0; }
6733 EOF
6734 if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6735   rm -rf conftest*
6736   eval "ac_cv_func_$ac_func=yes"
6737 else
6738   echo "configure: failed program was:" >&5
6739   cat conftest.$ac_ext >&5
6740   rm -rf conftest*
6741   eval "ac_cv_func_$ac_func=no"
6742 fi
6743 rm -f conftest*
6744 fi
6745
6746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6747   echo "$ac_t""yes" 1>&6
6748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6749   cat >> confdefs.h <<EOF
6750 #define $ac_tr_func 1
6751 EOF
6752  
6753 else
6754   echo "$ac_t""no" 1>&6
6755 fi
6756 done
6757
6758
6759 if test "$ac_cv_func_ctime_r" = no ; then
6760         ol_cv_func_ctime_r_nargs=0
6761 else
6762         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6763 echo "configure:6764: checking number of arguments of ctime_r" >&5
6764 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6765   echo $ac_n "(cached) $ac_c" 1>&6
6766 else
6767   cat > conftest.$ac_ext <<EOF
6768 #line 6769 "configure"
6769 #include "confdefs.h"
6770 #include <time.h>
6771 int main() {
6772 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6773 ; return 0; }
6774 EOF
6775 if { (eval echo configure:6776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6776   rm -rf conftest*
6777   ol_cv_func_ctime_r_nargs3=yes
6778 else
6779   echo "configure: failed program was:" >&5
6780   cat conftest.$ac_ext >&5
6781   rm -rf conftest*
6782   ol_cv_func_ctime_r_nargs3=no
6783 fi
6784 rm -f conftest*
6785
6786         cat > conftest.$ac_ext <<EOF
6787 #line 6788 "configure"
6788 #include "confdefs.h"
6789 #include <time.h>
6790 int main() {
6791 time_t ti; char *buffer; ctime_r(&ti,buffer);
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_ctime_r_nargs2=yes
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   ol_cv_func_ctime_r_nargs2=no
6802 fi
6803 rm -f conftest*
6804
6805         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6806                 $ol_cv_func_ctime_r_nargs2 = no ; then
6807
6808                 ol_cv_func_ctime_r_nargs=3
6809
6810         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6811                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6812
6813                 ol_cv_func_ctime_r_nargs=2
6814
6815         else
6816                 ol_cv_func_ctime_r_nargs=0
6817         fi
6818   
6819 fi
6820
6821 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6822
6823   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6824         cat >> confdefs.h <<EOF
6825 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6826 EOF
6827
6828   fi
6829
6830 fi
6831
6832 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6833         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6834 echo "configure:6835: checking number of arguments of gethostbyname_r" >&5
6835 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6836   echo $ac_n "(cached) $ac_c" 1>&6
6837 else
6838   cat > conftest.$ac_ext <<EOF
6839 #line 6840 "configure"
6840 #include "confdefs.h"
6841 #include <sys/types.h>
6842 #include <sys/socket.h>
6843 #include <netinet/in.h>
6844 #include <netdb.h>
6845 #define BUFSIZE (sizeof(struct hostent)+10)
6846 int main() {
6847 struct hostent hent; char buffer[BUFSIZE];
6848                 int bufsize=BUFSIZE;int h_errno;
6849                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6850                         buffer, bufsize, &h_errno);
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6854   rm -rf conftest*
6855   ol_cv_func_gethostbyname_r_nargs5=yes
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   ol_cv_func_gethostbyname_r_nargs5=no
6861 fi
6862 rm -f conftest*
6863
6864         cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 #include <sys/types.h>
6868 #include <sys/socket.h>
6869 #include <netinet/in.h>
6870 #include <netdb.h>
6871 #define BUFSIZE (sizeof(struct hostent)+10)
6872 int main() {
6873 struct hostent hent;struct hostent *rhent;
6874                 char buffer[BUFSIZE];
6875                 int bufsize=BUFSIZE;int h_errno;
6876                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6877                         &rhent, &h_errno);
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6881   rm -rf conftest*
6882   ol_cv_func_gethostbyname_r_nargs6=yes
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   ol_cv_func_gethostbyname_r_nargs6=no
6888 fi
6889 rm -f conftest*
6890
6891         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6892                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6893
6894                 ol_cv_func_gethostbyname_r_nargs=5
6895
6896         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6897                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6898
6899                 ol_cv_func_gethostbyname_r_nargs=6
6900
6901         else
6902                 ol_cv_func_gethostbyname_r_nargs=0
6903         fi
6904   
6905 fi
6906
6907 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6908   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6909         cat >> confdefs.h <<EOF
6910 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6911 EOF
6912
6913   fi
6914
6915 else
6916         ol_cv_func_gethostbyname_r_nargs=0
6917 fi
6918  
6919 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6920         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6921 echo "configure:6922: checking number of arguments of gethostbyaddr_r" >&5
6922 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6923   echo $ac_n "(cached) $ac_c" 1>&6
6924 else
6925   cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6928 #include <sys/types.h>
6929 #include <sys/socket.h>
6930 #include <netinet/in.h>
6931 #include <netdb.h>
6932 #define BUFSIZE (sizeof(struct hostent)+10)
6933 int main() {
6934 struct hostent hent; char buffer[BUFSIZE]; 
6935             struct in_addr add;
6936             size_t alen=sizeof(struct in_addr);
6937             int bufsize=BUFSIZE;int h_errno;
6938                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6939                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6940 ; return 0; }
6941 EOF
6942 if { (eval echo configure:6943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6943   rm -rf conftest*
6944   ol_cv_func_gethostbyaddr_r_nargs7=yes
6945 else
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948   rm -rf conftest*
6949   ol_cv_func_gethostbyaddr_r_nargs7=no
6950 fi
6951 rm -f conftest*
6952
6953         cat > conftest.$ac_ext <<EOF
6954 #line 6955 "configure"
6955 #include "confdefs.h"
6956 #include <sys/types.h>
6957 #include <sys/socket.h>
6958 #include <netinet/in.h>
6959 #include <netdb.h>
6960 #define BUFSIZE (sizeof(struct hostent)+10)
6961 int main() {
6962 struct hostent hent;
6963                 struct hostent *rhent; char buffer[BUFSIZE]; 
6964                 struct in_addr add;
6965                 size_t alen=sizeof(struct in_addr);
6966                 int bufsize=BUFSIZE;int h_errno;
6967                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6968                         alen, AF_INET, &hent, buffer, bufsize, 
6969                         &rhent, &h_errno);
6970 ; return 0; }
6971 EOF
6972 if { (eval echo configure:6973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6973   rm -rf conftest*
6974   ol_cv_func_gethostbyaddr_r_nargs8=yes
6975 else
6976   echo "configure: failed program was:" >&5
6977   cat conftest.$ac_ext >&5
6978   rm -rf conftest*
6979   ol_cv_func_gethostbyaddr_r_nargs8=no
6980 fi
6981 rm -f conftest*
6982
6983         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6984                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6985
6986                 ol_cv_func_gethostbyaddr_r_nargs=7
6987
6988         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6989                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6990
6991                 ol_cv_func_gethostbyaddr_r_nargs=8
6992
6993         else
6994                 ol_cv_func_gethostbyaddr_r_nargs=0
6995         fi
6996   
6997 fi
6998
6999 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
7000   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
7001     cat >> confdefs.h <<EOF
7002 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
7003 EOF
7004
7005   fi
7006
7007 else
7008         ol_cv_func_gethostbyaddr_r_nargs=0
7009 fi
7010
7011 if test "$ac_cv_func_ctime_r" = yes \
7012         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
7013         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
7014         -a "$ac_cv_func_gethostbyname_r" = yes \
7015         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
7016         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
7017         -a "$ac_cv_func_gethostbyaddr_r" = yes \
7018         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
7019         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
7020         ; then
7021  
7022         cat >> confdefs.h <<\EOF
7023 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
7024 EOF
7025
7026 fi
7027
7028 ol_link_threads=no
7029
7030 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7031         -o $ol_with_threads = nt ; then
7032
7033         
7034         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
7035 echo "configure:7036: checking for NT Threads" >&5
7036 if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
7037   echo $ac_n "(cached) $ac_c" 1>&6
7038 else
7039   
7040                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
7041 echo "configure:7042: checking for _beginthread" >&5
7042 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 /* System header to define __stub macros and hopefully few prototypes,
7049     which can conflict with char _beginthread(); below.  */
7050 #include <assert.h>
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 /* We use char because int might match the return type of a gcc2
7053     builtin and then its argument prototype would still apply.  */
7054 char _beginthread();
7055 char (*f)();
7056
7057 int main() {
7058
7059 /* The GNU C library defines this for functions which it implements
7060     to always fail with ENOSYS.  Some functions are actually named
7061     something starting with __ and the normal name is an alias.  */
7062 #if defined (__stub__beginthread) || defined (__stub____beginthread)
7063 choke me
7064 #else
7065 f = _beginthread;
7066 #endif
7067
7068 ; return 0; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7071   rm -rf conftest*
7072   eval "ac_cv_func__beginthread=yes"
7073 else
7074   echo "configure: failed program was:" >&5
7075   cat conftest.$ac_ext >&5
7076   rm -rf conftest*
7077   eval "ac_cv_func__beginthread=no"
7078 fi
7079 rm -f conftest*
7080 fi
7081
7082 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
7083   echo "$ac_t""yes" 1>&6
7084   ol_cv_nt_threads=yes
7085 else
7086   echo "$ac_t""no" 1>&6
7087 ol_cv_nt_threads=no
7088 fi
7089
7090         
7091 fi
7092
7093 echo "$ac_t""$ol_cv_nt_threads" 1>&6
7094
7095         if test $ol_cv_nt_threads = yes ; then
7096                 cat >> confdefs.h <<\EOF
7097 #define HAVE_NT_THREADS 1
7098 EOF
7099
7100         fi
7101
7102
7103         if test "$ol_cv_nt_threads" = yes ; then
7104         ol_link_threads=nt
7105         ol_with_threads=found
7106         ol_with_yielding_select=yes
7107
7108                 cat >> confdefs.h <<\EOF
7109 #define HAVE_NT_SERVICE_MANAGER 1
7110 EOF
7111
7112                 cat >> confdefs.h <<\EOF
7113 #define HAVE_NT_EVENT_LOG 1
7114 EOF
7115
7116         fi
7117
7118         if test $ol_with_threads = nt ; then
7119                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
7120         fi
7121 fi
7122
7123 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7124         -o $ol_with_threads = posix ; then
7125
7126         for ac_hdr in pthread.h
7127 do
7128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7130 echo "configure:7131: checking for $ac_hdr" >&5
7131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7132   echo $ac_n "(cached) $ac_c" 1>&6
7133 else
7134   cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 #include <$ac_hdr>
7138 EOF
7139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7140 { (eval echo configure:7141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7142 if test -z "$ac_err"; then
7143   rm -rf conftest*
7144   eval "ac_cv_header_$ac_safe=yes"
7145 else
7146   echo "$ac_err" >&5
7147   echo "configure: failed program was:" >&5
7148   cat conftest.$ac_ext >&5
7149   rm -rf conftest*
7150   eval "ac_cv_header_$ac_safe=no"
7151 fi
7152 rm -f conftest*
7153 fi
7154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7155   echo "$ac_t""yes" 1>&6
7156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7157   cat >> confdefs.h <<EOF
7158 #define $ac_tr_hdr 1
7159 EOF
7160  
7161 else
7162   echo "$ac_t""no" 1>&6
7163 fi
7164 done
7165
7166
7167         if test $ac_cv_header_pthread_h = yes ; then
7168                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
7169 echo "configure:7170: checking POSIX thread version" >&5
7170 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
7171   echo $ac_n "(cached) $ac_c" 1>&6
7172 else
7173   
7174         cat > conftest.$ac_ext <<EOF
7175 #line 7176 "configure"
7176 #include "confdefs.h"
7177
7178 #               include <pthread.h>
7179                 /* this check could be improved */
7180 #               ifdef PTHREAD_ONCE_INIT
7181                         pthread_version_final;
7182 #               endif
7183         
7184 EOF
7185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7186   egrep "pthread_version_final" >/dev/null 2>&1; then
7187   rm -rf conftest*
7188   ol_pthread_final=yes
7189 else
7190   rm -rf conftest*
7191   ol_pthread_final=no
7192 fi
7193 rm -f conftest*
7194
7195
7196         cat > conftest.$ac_ext <<EOF
7197 #line 7198 "configure"
7198 #include "confdefs.h"
7199
7200 #               include <pthread.h>
7201                 /* this check could be improved */
7202 #               ifdef pthread_once_init
7203                         pthread_version_draft4;
7204 #               endif
7205         
7206 EOF
7207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7208   egrep "pthread_version_draft4" >/dev/null 2>&1; then
7209   rm -rf conftest*
7210   ol_pthread_draft4=yes
7211 else
7212   rm -rf conftest*
7213   ol_pthread_draft4=no
7214 fi
7215 rm -f conftest*
7216
7217
7218         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
7219                 ol_cv_pthread_version=final
7220         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
7221                 ol_cv_pthread_version=draft4
7222         else
7223                 ol_cv_pthread_version=unknown
7224         fi
7225
7226 fi
7227
7228 echo "$ac_t""$ol_cv_pthread_version" 1>&6
7229
7230
7231                 if test $ol_cv_pthread_version = final ; then
7232                         cat >> confdefs.h <<\EOF
7233 #define HAVE_PTHREADS_FINAL 1
7234 EOF
7235
7236                 elif test $ol_cv_pthread_version = draft4 ; then
7237                         cat >> confdefs.h <<\EOF
7238 #define HAVE_PTHREADS_D4 1
7239 EOF
7240
7241                 else
7242                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
7243                 fi
7244
7245                 # consider threads found
7246                 ol_with_threads=found
7247
7248                 
7249         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7250 echo "configure:7251: checking for LinuxThreads pthread.h" >&5
7251 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7252   echo $ac_n "(cached) $ac_c" 1>&6
7253 else
7254   cat > conftest.$ac_ext <<EOF
7255 #line 7256 "configure"
7256 #include "confdefs.h"
7257 #include <pthread.h>
7258 EOF
7259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7260   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7261   rm -rf conftest*
7262   ol_cv_header_linux_threads=yes
7263 else
7264   rm -rf conftest*
7265   ol_cv_header_linux_threads=no
7266 fi
7267 rm -f conftest*
7268
7269                 
7270 fi
7271
7272 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7273         if test $ol_cv_header_linux_threads = yes; then
7274                 cat >> confdefs.h <<\EOF
7275 #define HAVE_LINUX_THREADS 1
7276 EOF
7277
7278         fi
7279
7280                 
7281         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
7282 echo "configure:7283: checking for GNU Pth pthread.h" >&5
7283 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
7284   echo $ac_n "(cached) $ac_c" 1>&6
7285 else
7286   cat > conftest.$ac_ext <<EOF
7287 #line 7288 "configure"
7288 #include "confdefs.h"
7289 #include <pthread.h>
7290 #ifdef _POSIX_THREAD_IS_GNU_PTH
7291         __gnu_pth__;
7292 #endif
7293
7294 EOF
7295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7296   egrep "__gnu_pth__" >/dev/null 2>&1; then
7297   rm -rf conftest*
7298   ol_cv_header_gnu_pth_pthread_h=yes
7299 else
7300   rm -rf conftest*
7301   ol_cv_header_gnu_pth_pthread_h=no
7302 fi
7303 rm -f conftest*
7304
7305                 
7306 fi
7307
7308 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
7309
7310
7311                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
7312                         for ac_hdr in sched.h
7313 do
7314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7316 echo "configure:7317: checking for $ac_hdr" >&5
7317 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7318   echo $ac_n "(cached) $ac_c" 1>&6
7319 else
7320   cat > conftest.$ac_ext <<EOF
7321 #line 7322 "configure"
7322 #include "confdefs.h"
7323 #include <$ac_hdr>
7324 EOF
7325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7326 { (eval echo configure:7327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7328 if test -z "$ac_err"; then
7329   rm -rf conftest*
7330   eval "ac_cv_header_$ac_safe=yes"
7331 else
7332   echo "$ac_err" >&5
7333   echo "configure: failed program was:" >&5
7334   cat conftest.$ac_ext >&5
7335   rm -rf conftest*
7336   eval "ac_cv_header_$ac_safe=no"
7337 fi
7338 rm -f conftest*
7339 fi
7340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7341   echo "$ac_t""yes" 1>&6
7342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7343   cat >> confdefs.h <<EOF
7344 #define $ac_tr_hdr 1
7345 EOF
7346  
7347 else
7348   echo "$ac_t""no" 1>&6
7349 fi
7350 done
7351
7352                 fi
7353
7354                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
7355                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
7356 echo "configure:7357: checking for pthread_create in default libraries" >&5
7357 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
7358   echo $ac_n "(cached) $ac_c" 1>&6
7359 else
7360   
7361                 if test "$cross_compiling" = yes; then
7362   cat > conftest.$ac_ext <<EOF
7363 #line 7364 "configure"
7364 #include "confdefs.h"
7365 /* pthread test headers */
7366 #include <pthread.h>
7367 #ifndef NULL
7368 #define NULL (void*)0
7369 #endif
7370
7371 static void *task(p)
7372         void *p;
7373 {
7374         return (void *) (p == NULL);
7375 }
7376
7377 int main() {
7378
7379         /* pthread test function */
7380         pthread_t t;
7381         int status;
7382
7383         /* make sure pthread_create() isn't just a stub */
7384 #if HAVE_PTHREADS_D4
7385         status = pthread_create(&t, pthread_attr_default, task, NULL);
7386 #else
7387         status = pthread_create(&t, NULL, task, NULL);
7388 #endif
7389
7390         if( status ) exit( status );
7391
7392         /* make sure pthread_detach() isn't just a stub */
7393 #if HAVE_PTHREADS_D4
7394         status = pthread_detach( &t );
7395 #else
7396         status = pthread_detach( t );
7397 #endif
7398
7399 #ifdef HAVE_LINUX_THREADS
7400         pthread_kill_other_threads_np();
7401 #endif
7402
7403         exit( status );
7404
7405 ; return 0; }
7406 EOF
7407 if { (eval echo configure:7408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7408   rm -rf conftest*
7409   ol_cv_pthread_create=yes
7410 else
7411   echo "configure: failed program was:" >&5
7412   cat conftest.$ac_ext >&5
7413   rm -rf conftest*
7414   ol_cv_pthread_create=no
7415 fi
7416 rm -f conftest*
7417 else
7418   cat > conftest.$ac_ext <<EOF
7419 #line 7420 "configure"
7420 #include "confdefs.h"
7421 /* pthread test headers */
7422 #include <pthread.h>
7423 #ifndef NULL
7424 #define NULL (void*)0
7425 #endif
7426
7427 static void *task(p)
7428         void *p;
7429 {
7430         return (void *) (p == NULL);
7431 }
7432
7433
7434 int main(argc, argv)
7435         int argc;
7436         char **argv;
7437 {
7438
7439         /* pthread test function */
7440         pthread_t t;
7441         int status;
7442
7443         /* make sure pthread_create() isn't just a stub */
7444 #if HAVE_PTHREADS_D4
7445         status = pthread_create(&t, pthread_attr_default, task, NULL);
7446 #else
7447         status = pthread_create(&t, NULL, task, NULL);
7448 #endif
7449
7450         if( status ) exit( status );
7451
7452         /* make sure pthread_detach() isn't just a stub */
7453 #if HAVE_PTHREADS_D4
7454         status = pthread_detach( &t );
7455 #else
7456         status = pthread_detach( t );
7457 #endif
7458
7459 #ifdef HAVE_LINUX_THREADS
7460         pthread_kill_other_threads_np();
7461 #endif
7462
7463         exit( status );
7464
7465 }
7466
7467 EOF
7468 if { (eval echo configure:7469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7469 then
7470   ol_cv_pthread_create=yes
7471 else
7472   echo "configure: failed program was:" >&5
7473   cat conftest.$ac_ext >&5
7474   rm -fr conftest*
7475   ol_cv_pthread_create=no
7476 fi
7477 rm -fr conftest*
7478 fi
7479
7480 fi
7481
7482 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7483
7484                 if test $ol_cv_pthread_create != no ; then
7485                         ol_link_threads=posix
7486                         ol_link_pthreads=""
7487                 fi
7488                 
7489                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7490 if test "$ol_link_threads" = no ; then
7491         # try -kthread
7492         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7493 echo "configure:7494: checking for pthread link with -kthread" >&5
7494 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
7495   echo $ac_n "(cached) $ac_c" 1>&6
7496 else
7497   
7498                 # save the flags
7499                 ol_LIBS="$LIBS"
7500                 LIBS="-kthread $LIBS"
7501
7502                 if test "$cross_compiling" = yes; then
7503   cat > conftest.$ac_ext <<EOF
7504 #line 7505 "configure"
7505 #include "confdefs.h"
7506 /* pthread test headers */
7507 #include <pthread.h>
7508 #ifndef NULL
7509 #define NULL (void*)0
7510 #endif
7511
7512 static void *task(p)
7513         void *p;
7514 {
7515         return (void *) (p == NULL);
7516 }
7517
7518 int main() {
7519
7520         /* pthread test function */
7521         pthread_t t;
7522         int status;
7523
7524         /* make sure pthread_create() isn't just a stub */
7525 #if HAVE_PTHREADS_D4
7526         status = pthread_create(&t, pthread_attr_default, task, NULL);
7527 #else
7528         status = pthread_create(&t, NULL, task, NULL);
7529 #endif
7530
7531         if( status ) exit( status );
7532
7533         /* make sure pthread_detach() isn't just a stub */
7534 #if HAVE_PTHREADS_D4
7535         status = pthread_detach( &t );
7536 #else
7537         status = pthread_detach( t );
7538 #endif
7539
7540 #ifdef HAVE_LINUX_THREADS
7541         pthread_kill_other_threads_np();
7542 #endif
7543
7544         exit( status );
7545
7546 ; return 0; }
7547 EOF
7548 if { (eval echo configure:7549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7549   rm -rf conftest*
7550   ol_cv_pthread_kthread=yes
7551 else
7552   echo "configure: failed program was:" >&5
7553   cat conftest.$ac_ext >&5
7554   rm -rf conftest*
7555   ol_cv_pthread_kthread=no
7556 fi
7557 rm -f conftest*
7558 else
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7561 "configure"
7561 #include "confdefs.h"
7562 /* pthread test headers */
7563 #include <pthread.h>
7564 #ifndef NULL
7565 #define NULL (void*)0
7566 #endif
7567
7568 static void *task(p)
7569         void *p;
7570 {
7571         return (void *) (p == NULL);
7572 }
7573
7574
7575 int main(argc, argv)
7576         int argc;
7577         char **argv;
7578 {
7579
7580         /* pthread test function */
7581         pthread_t t;
7582         int status;
7583
7584         /* make sure pthread_create() isn't just a stub */
7585 #if HAVE_PTHREADS_D4
7586         status = pthread_create(&t, pthread_attr_default, task, NULL);
7587 #else
7588         status = pthread_create(&t, NULL, task, NULL);
7589 #endif
7590
7591         if( status ) exit( status );
7592
7593         /* make sure pthread_detach() isn't just a stub */
7594 #if HAVE_PTHREADS_D4
7595         status = pthread_detach( &t );
7596 #else
7597         status = pthread_detach( t );
7598 #endif
7599
7600 #ifdef HAVE_LINUX_THREADS
7601         pthread_kill_other_threads_np();
7602 #endif
7603
7604         exit( status );
7605
7606 }
7607
7608 EOF
7609 if { (eval echo configure:7610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7610 then
7611   ol_cv_pthread_kthread=yes
7612 else
7613   echo "configure: failed program was:" >&5
7614   cat conftest.$ac_ext >&5
7615   rm -fr conftest*
7616   ol_cv_pthread_kthread=no
7617 fi
7618 rm -fr conftest*
7619 fi
7620
7621
7622                 # restore the LIBS
7623                 LIBS="$ol_LIBS"
7624         
7625 fi
7626
7627 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7628
7629         if test $ol_cv_pthread_kthread = yes ; then
7630                 ol_link_pthreads="-kthread"
7631                 ol_link_threads=posix
7632         fi
7633 fi
7634
7635                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7636 if test "$ol_link_threads" = no ; then
7637         # try -pthread
7638         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7639 echo "configure:7640: checking for pthread link with -pthread" >&5
7640 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
7641   echo $ac_n "(cached) $ac_c" 1>&6
7642 else
7643   
7644                 # save the flags
7645                 ol_LIBS="$LIBS"
7646                 LIBS="-pthread $LIBS"
7647
7648                 if test "$cross_compiling" = yes; then
7649   cat > conftest.$ac_ext <<EOF
7650 #line 7651 "configure"
7651 #include "confdefs.h"
7652 /* pthread test headers */
7653 #include <pthread.h>
7654 #ifndef NULL
7655 #define NULL (void*)0
7656 #endif
7657
7658 static void *task(p)
7659         void *p;
7660 {
7661         return (void *) (p == NULL);
7662 }
7663
7664 int main() {
7665
7666         /* pthread test function */
7667         pthread_t t;
7668         int status;
7669
7670         /* make sure pthread_create() isn't just a stub */
7671 #if HAVE_PTHREADS_D4
7672         status = pthread_create(&t, pthread_attr_default, task, NULL);
7673 #else
7674         status = pthread_create(&t, NULL, task, NULL);
7675 #endif
7676
7677         if( status ) exit( status );
7678
7679         /* make sure pthread_detach() isn't just a stub */
7680 #if HAVE_PTHREADS_D4
7681         status = pthread_detach( &t );
7682 #else
7683         status = pthread_detach( t );
7684 #endif
7685
7686 #ifdef HAVE_LINUX_THREADS
7687         pthread_kill_other_threads_np();
7688 #endif
7689
7690         exit( status );
7691
7692 ; return 0; }
7693 EOF
7694 if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7695   rm -rf conftest*
7696   ol_cv_pthread_pthread=yes
7697 else
7698   echo "configure: failed program was:" >&5
7699   cat conftest.$ac_ext >&5
7700   rm -rf conftest*
7701   ol_cv_pthread_pthread=no
7702 fi
7703 rm -f conftest*
7704 else
7705   cat > conftest.$ac_ext <<EOF
7706 #line 7707 "configure"
7707 #include "confdefs.h"
7708 /* pthread test headers */
7709 #include <pthread.h>
7710 #ifndef NULL
7711 #define NULL (void*)0
7712 #endif
7713
7714 static void *task(p)
7715         void *p;
7716 {
7717         return (void *) (p == NULL);
7718 }
7719
7720
7721 int main(argc, argv)
7722         int argc;
7723         char **argv;
7724 {
7725
7726         /* pthread test function */
7727         pthread_t t;
7728         int status;
7729
7730         /* make sure pthread_create() isn't just a stub */
7731 #if HAVE_PTHREADS_D4
7732         status = pthread_create(&t, pthread_attr_default, task, NULL);
7733 #else
7734         status = pthread_create(&t, NULL, task, NULL);
7735 #endif
7736
7737         if( status ) exit( status );
7738
7739         /* make sure pthread_detach() isn't just a stub */
7740 #if HAVE_PTHREADS_D4
7741         status = pthread_detach( &t );
7742 #else
7743         status = pthread_detach( t );
7744 #endif
7745
7746 #ifdef HAVE_LINUX_THREADS
7747         pthread_kill_other_threads_np();
7748 #endif
7749
7750         exit( status );
7751
7752 }
7753
7754 EOF
7755 if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7756 then
7757   ol_cv_pthread_pthread=yes
7758 else
7759   echo "configure: failed program was:" >&5
7760   cat conftest.$ac_ext >&5
7761   rm -fr conftest*
7762   ol_cv_pthread_pthread=no
7763 fi
7764 rm -fr conftest*
7765 fi
7766
7767
7768                 # restore the LIBS
7769                 LIBS="$ol_LIBS"
7770         
7771 fi
7772
7773 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7774
7775         if test $ol_cv_pthread_pthread = yes ; then
7776                 ol_link_pthreads="-pthread"
7777                 ol_link_threads=posix
7778         fi
7779 fi
7780
7781                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7782 if test "$ol_link_threads" = no ; then
7783         # try -pthreads
7784         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7785 echo "configure:7786: checking for pthread link with -pthreads" >&5
7786 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789   
7790                 # save the flags
7791                 ol_LIBS="$LIBS"
7792                 LIBS="-pthreads $LIBS"
7793
7794                 if test "$cross_compiling" = yes; then
7795   cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798 /* pthread test headers */
7799 #include <pthread.h>
7800 #ifndef NULL
7801 #define NULL (void*)0
7802 #endif
7803
7804 static void *task(p)
7805         void *p;
7806 {
7807         return (void *) (p == NULL);
7808 }
7809
7810 int main() {
7811
7812         /* pthread test function */
7813         pthread_t t;
7814         int status;
7815
7816         /* make sure pthread_create() isn't just a stub */
7817 #if HAVE_PTHREADS_D4
7818         status = pthread_create(&t, pthread_attr_default, task, NULL);
7819 #else
7820         status = pthread_create(&t, NULL, task, NULL);
7821 #endif
7822
7823         if( status ) exit( status );
7824
7825         /* make sure pthread_detach() isn't just a stub */
7826 #if HAVE_PTHREADS_D4
7827         status = pthread_detach( &t );
7828 #else
7829         status = pthread_detach( t );
7830 #endif
7831
7832 #ifdef HAVE_LINUX_THREADS
7833         pthread_kill_other_threads_np();
7834 #endif
7835
7836         exit( status );
7837
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   ol_cv_pthread_pthreads=yes
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   ol_cv_pthread_pthreads=no
7848 fi
7849 rm -f conftest*
7850 else
7851   cat > conftest.$ac_ext <<EOF
7852 #line 7853 "configure"
7853 #include "confdefs.h"
7854 /* pthread test headers */
7855 #include <pthread.h>
7856 #ifndef NULL
7857 #define NULL (void*)0
7858 #endif
7859
7860 static void *task(p)
7861         void *p;
7862 {
7863         return (void *) (p == NULL);
7864 }
7865
7866
7867 int main(argc, argv)
7868         int argc;
7869         char **argv;
7870 {
7871
7872         /* pthread test function */
7873         pthread_t t;
7874         int status;
7875
7876         /* make sure pthread_create() isn't just a stub */
7877 #if HAVE_PTHREADS_D4
7878         status = pthread_create(&t, pthread_attr_default, task, NULL);
7879 #else
7880         status = pthread_create(&t, NULL, task, NULL);
7881 #endif
7882
7883         if( status ) exit( status );
7884
7885         /* make sure pthread_detach() isn't just a stub */
7886 #if HAVE_PTHREADS_D4
7887         status = pthread_detach( &t );
7888 #else
7889         status = pthread_detach( t );
7890 #endif
7891
7892 #ifdef HAVE_LINUX_THREADS
7893         pthread_kill_other_threads_np();
7894 #endif
7895
7896         exit( status );
7897
7898 }
7899
7900 EOF
7901 if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7902 then
7903   ol_cv_pthread_pthreads=yes
7904 else
7905   echo "configure: failed program was:" >&5
7906   cat conftest.$ac_ext >&5
7907   rm -fr conftest*
7908   ol_cv_pthread_pthreads=no
7909 fi
7910 rm -fr conftest*
7911 fi
7912
7913
7914                 # restore the LIBS
7915                 LIBS="$ol_LIBS"
7916         
7917 fi
7918
7919 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7920
7921         if test $ol_cv_pthread_pthreads = yes ; then
7922                 ol_link_pthreads="-pthreads"
7923                 ol_link_threads=posix
7924         fi
7925 fi
7926
7927                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7928 if test "$ol_link_threads" = no ; then
7929         # try -mthreads
7930         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7931 echo "configure:7932: checking for pthread link with -mthreads" >&5
7932 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7933   echo $ac_n "(cached) $ac_c" 1>&6
7934 else
7935   
7936                 # save the flags
7937                 ol_LIBS="$LIBS"
7938                 LIBS="-mthreads $LIBS"
7939
7940                 if test "$cross_compiling" = yes; then
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* pthread test headers */
7945 #include <pthread.h>
7946 #ifndef NULL
7947 #define NULL (void*)0
7948 #endif
7949
7950 static void *task(p)
7951         void *p;
7952 {
7953         return (void *) (p == NULL);
7954 }
7955
7956 int main() {
7957
7958         /* pthread test function */
7959         pthread_t t;
7960         int status;
7961
7962         /* make sure pthread_create() isn't just a stub */
7963 #if HAVE_PTHREADS_D4
7964         status = pthread_create(&t, pthread_attr_default, task, NULL);
7965 #else
7966         status = pthread_create(&t, NULL, task, NULL);
7967 #endif
7968
7969         if( status ) exit( status );
7970
7971         /* make sure pthread_detach() isn't just a stub */
7972 #if HAVE_PTHREADS_D4
7973         status = pthread_detach( &t );
7974 #else
7975         status = pthread_detach( t );
7976 #endif
7977
7978 #ifdef HAVE_LINUX_THREADS
7979         pthread_kill_other_threads_np();
7980 #endif
7981
7982         exit( status );
7983
7984 ; return 0; }
7985 EOF
7986 if { (eval echo configure:7987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7987   rm -rf conftest*
7988   ol_cv_pthread_mthreads=yes
7989 else
7990   echo "configure: failed program was:" >&5
7991   cat conftest.$ac_ext >&5
7992   rm -rf conftest*
7993   ol_cv_pthread_mthreads=no
7994 fi
7995 rm -f conftest*
7996 else
7997   cat > conftest.$ac_ext <<EOF
7998 #line 7999 "configure"
7999 #include "confdefs.h"
8000 /* pthread test headers */
8001 #include <pthread.h>
8002 #ifndef NULL
8003 #define NULL (void*)0
8004 #endif
8005
8006 static void *task(p)
8007         void *p;
8008 {
8009         return (void *) (p == NULL);
8010 }
8011
8012
8013 int main(argc, argv)
8014         int argc;
8015         char **argv;
8016 {
8017
8018         /* pthread test function */
8019         pthread_t t;
8020         int status;
8021
8022         /* make sure pthread_create() isn't just a stub */
8023 #if HAVE_PTHREADS_D4
8024         status = pthread_create(&t, pthread_attr_default, task, NULL);
8025 #else
8026         status = pthread_create(&t, NULL, task, NULL);
8027 #endif
8028
8029         if( status ) exit( status );
8030
8031         /* make sure pthread_detach() isn't just a stub */
8032 #if HAVE_PTHREADS_D4
8033         status = pthread_detach( &t );
8034 #else
8035         status = pthread_detach( t );
8036 #endif
8037
8038 #ifdef HAVE_LINUX_THREADS
8039         pthread_kill_other_threads_np();
8040 #endif
8041
8042         exit( status );
8043
8044 }
8045
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8048 then
8049   ol_cv_pthread_mthreads=yes
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -fr conftest*
8054   ol_cv_pthread_mthreads=no
8055 fi
8056 rm -fr conftest*
8057 fi
8058
8059
8060                 # restore the LIBS
8061                 LIBS="$ol_LIBS"
8062         
8063 fi
8064
8065 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
8066
8067         if test $ol_cv_pthread_mthreads = yes ; then
8068                 ol_link_pthreads="-mthreads"
8069                 ol_link_threads=posix
8070         fi
8071 fi
8072
8073                 # Pthread try link: -thread (ol_cv_pthread_thread)
8074 if test "$ol_link_threads" = no ; then
8075         # try -thread
8076         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
8077 echo "configure:8078: checking for pthread link with -thread" >&5
8078 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
8079   echo $ac_n "(cached) $ac_c" 1>&6
8080 else
8081   
8082                 # save the flags
8083                 ol_LIBS="$LIBS"
8084                 LIBS="-thread $LIBS"
8085
8086                 if test "$cross_compiling" = yes; then
8087   cat > conftest.$ac_ext <<EOF
8088 #line 8089 "configure"
8089 #include "confdefs.h"
8090 /* pthread test headers */
8091 #include <pthread.h>
8092 #ifndef NULL
8093 #define NULL (void*)0
8094 #endif
8095
8096 static void *task(p)
8097         void *p;
8098 {
8099         return (void *) (p == NULL);
8100 }
8101
8102 int main() {
8103
8104         /* pthread test function */
8105         pthread_t t;
8106         int status;
8107
8108         /* make sure pthread_create() isn't just a stub */
8109 #if HAVE_PTHREADS_D4
8110         status = pthread_create(&t, pthread_attr_default, task, NULL);
8111 #else
8112         status = pthread_create(&t, NULL, task, NULL);
8113 #endif
8114
8115         if( status ) exit( status );
8116
8117         /* make sure pthread_detach() isn't just a stub */
8118 #if HAVE_PTHREADS_D4
8119         status = pthread_detach( &t );
8120 #else
8121         status = pthread_detach( t );
8122 #endif
8123
8124 #ifdef HAVE_LINUX_THREADS
8125         pthread_kill_other_threads_np();
8126 #endif
8127
8128         exit( status );
8129
8130 ; return 0; }
8131 EOF
8132 if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133   rm -rf conftest*
8134   ol_cv_pthread_thread=yes
8135 else
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   ol_cv_pthread_thread=no
8140 fi
8141 rm -f conftest*
8142 else
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 /* pthread test headers */
8147 #include <pthread.h>
8148 #ifndef NULL
8149 #define NULL (void*)0
8150 #endif
8151
8152 static void *task(p)
8153         void *p;
8154 {
8155         return (void *) (p == NULL);
8156 }
8157
8158
8159 int main(argc, argv)
8160         int argc;
8161         char **argv;
8162 {
8163
8164         /* pthread test function */
8165         pthread_t t;
8166         int status;
8167
8168         /* make sure pthread_create() isn't just a stub */
8169 #if HAVE_PTHREADS_D4
8170         status = pthread_create(&t, pthread_attr_default, task, NULL);
8171 #else
8172         status = pthread_create(&t, NULL, task, NULL);
8173 #endif
8174
8175         if( status ) exit( status );
8176
8177         /* make sure pthread_detach() isn't just a stub */
8178 #if HAVE_PTHREADS_D4
8179         status = pthread_detach( &t );
8180 #else
8181         status = pthread_detach( t );
8182 #endif
8183
8184 #ifdef HAVE_LINUX_THREADS
8185         pthread_kill_other_threads_np();
8186 #endif
8187
8188         exit( status );
8189
8190 }
8191
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8194 then
8195   ol_cv_pthread_thread=yes
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199   rm -fr conftest*
8200   ol_cv_pthread_thread=no
8201 fi
8202 rm -fr conftest*
8203 fi
8204
8205
8206                 # restore the LIBS
8207                 LIBS="$ol_LIBS"
8208         
8209 fi
8210
8211 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
8212
8213         if test $ol_cv_pthread_thread = yes ; then
8214                 ol_link_pthreads="-thread"
8215                 ol_link_threads=posix
8216         fi
8217 fi
8218
8219
8220                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8221 if test "$ol_link_threads" = no ; then
8222         # try -lpthread -lmach -lexc -lc_r
8223         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8224 echo "configure:8225: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8225 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   
8229                 # save the flags
8230                 ol_LIBS="$LIBS"
8231                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8232
8233                 if test "$cross_compiling" = yes; then
8234   cat > conftest.$ac_ext <<EOF
8235 #line 8236 "configure"
8236 #include "confdefs.h"
8237 /* pthread test headers */
8238 #include <pthread.h>
8239 #ifndef NULL
8240 #define NULL (void*)0
8241 #endif
8242
8243 static void *task(p)
8244         void *p;
8245 {
8246         return (void *) (p == NULL);
8247 }
8248
8249 int main() {
8250
8251         /* pthread test function */
8252         pthread_t t;
8253         int status;
8254
8255         /* make sure pthread_create() isn't just a stub */
8256 #if HAVE_PTHREADS_D4
8257         status = pthread_create(&t, pthread_attr_default, task, NULL);
8258 #else
8259         status = pthread_create(&t, NULL, task, NULL);
8260 #endif
8261
8262         if( status ) exit( status );
8263
8264         /* make sure pthread_detach() isn't just a stub */
8265 #if HAVE_PTHREADS_D4
8266         status = pthread_detach( &t );
8267 #else
8268         status = pthread_detach( t );
8269 #endif
8270
8271 #ifdef HAVE_LINUX_THREADS
8272         pthread_kill_other_threads_np();
8273 #endif
8274
8275         exit( status );
8276
8277 ; return 0; }
8278 EOF
8279 if { (eval echo configure:8280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8280   rm -rf conftest*
8281   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8282 else
8283   echo "configure: failed program was:" >&5
8284   cat conftest.$ac_ext >&5
8285   rm -rf conftest*
8286   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8287 fi
8288 rm -f conftest*
8289 else
8290   cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* pthread test headers */
8294 #include <pthread.h>
8295 #ifndef NULL
8296 #define NULL (void*)0
8297 #endif
8298
8299 static void *task(p)
8300         void *p;
8301 {
8302         return (void *) (p == NULL);
8303 }
8304
8305
8306 int main(argc, argv)
8307         int argc;
8308         char **argv;
8309 {
8310
8311         /* pthread test function */
8312         pthread_t t;
8313         int status;
8314
8315         /* make sure pthread_create() isn't just a stub */
8316 #if HAVE_PTHREADS_D4
8317         status = pthread_create(&t, pthread_attr_default, task, NULL);
8318 #else
8319         status = pthread_create(&t, NULL, task, NULL);
8320 #endif
8321
8322         if( status ) exit( status );
8323
8324         /* make sure pthread_detach() isn't just a stub */
8325 #if HAVE_PTHREADS_D4
8326         status = pthread_detach( &t );
8327 #else
8328         status = pthread_detach( t );
8329 #endif
8330
8331 #ifdef HAVE_LINUX_THREADS
8332         pthread_kill_other_threads_np();
8333 #endif
8334
8335         exit( status );
8336
8337 }
8338
8339 EOF
8340 if { (eval echo configure:8341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8341 then
8342   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8343 else
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -fr conftest*
8347   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8348 fi
8349 rm -fr conftest*
8350 fi
8351
8352
8353                 # restore the LIBS
8354                 LIBS="$ol_LIBS"
8355         
8356 fi
8357
8358 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8359
8360         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8361                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8362                 ol_link_threads=posix
8363         fi
8364 fi
8365
8366                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8367 if test "$ol_link_threads" = no ; then
8368         # try -lpthread -lmach -lexc
8369         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8370 echo "configure:8371: checking for pthread link with -lpthread -lmach -lexc" >&5
8371 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
8372   echo $ac_n "(cached) $ac_c" 1>&6
8373 else
8374   
8375                 # save the flags
8376                 ol_LIBS="$LIBS"
8377                 LIBS="-lpthread -lmach -lexc $LIBS"
8378
8379                 if test "$cross_compiling" = yes; then
8380   cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* pthread test headers */
8384 #include <pthread.h>
8385 #ifndef NULL
8386 #define NULL (void*)0
8387 #endif
8388
8389 static void *task(p)
8390         void *p;
8391 {
8392         return (void *) (p == NULL);
8393 }
8394
8395 int main() {
8396
8397         /* pthread test function */
8398         pthread_t t;
8399         int status;
8400
8401         /* make sure pthread_create() isn't just a stub */
8402 #if HAVE_PTHREADS_D4
8403         status = pthread_create(&t, pthread_attr_default, task, NULL);
8404 #else
8405         status = pthread_create(&t, NULL, task, NULL);
8406 #endif
8407
8408         if( status ) exit( status );
8409
8410         /* make sure pthread_detach() isn't just a stub */
8411 #if HAVE_PTHREADS_D4
8412         status = pthread_detach( &t );
8413 #else
8414         status = pthread_detach( t );
8415 #endif
8416
8417 #ifdef HAVE_LINUX_THREADS
8418         pthread_kill_other_threads_np();
8419 #endif
8420
8421         exit( status );
8422
8423 ; return 0; }
8424 EOF
8425 if { (eval echo configure:8426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8426   rm -rf conftest*
8427   ol_cv_pthread_lpthread_lmach_lexc=yes
8428 else
8429   echo "configure: failed program was:" >&5
8430   cat conftest.$ac_ext >&5
8431   rm -rf conftest*
8432   ol_cv_pthread_lpthread_lmach_lexc=no
8433 fi
8434 rm -f conftest*
8435 else
8436   cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 /* pthread test headers */
8440 #include <pthread.h>
8441 #ifndef NULL
8442 #define NULL (void*)0
8443 #endif
8444
8445 static void *task(p)
8446         void *p;
8447 {
8448         return (void *) (p == NULL);
8449 }
8450
8451
8452 int main(argc, argv)
8453         int argc;
8454         char **argv;
8455 {
8456
8457         /* pthread test function */
8458         pthread_t t;
8459         int status;
8460
8461         /* make sure pthread_create() isn't just a stub */
8462 #if HAVE_PTHREADS_D4
8463         status = pthread_create(&t, pthread_attr_default, task, NULL);
8464 #else
8465         status = pthread_create(&t, NULL, task, NULL);
8466 #endif
8467
8468         if( status ) exit( status );
8469
8470         /* make sure pthread_detach() isn't just a stub */
8471 #if HAVE_PTHREADS_D4
8472         status = pthread_detach( &t );
8473 #else
8474         status = pthread_detach( t );
8475 #endif
8476
8477 #ifdef HAVE_LINUX_THREADS
8478         pthread_kill_other_threads_np();
8479 #endif
8480
8481         exit( status );
8482
8483 }
8484
8485 EOF
8486 if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8487 then
8488   ol_cv_pthread_lpthread_lmach_lexc=yes
8489 else
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -fr conftest*
8493   ol_cv_pthread_lpthread_lmach_lexc=no
8494 fi
8495 rm -fr conftest*
8496 fi
8497
8498
8499                 # restore the LIBS
8500                 LIBS="$ol_LIBS"
8501         
8502 fi
8503
8504 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8505
8506         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8507                 ol_link_pthreads="-lpthread -lmach -lexc"
8508                 ol_link_threads=posix
8509         fi
8510 fi
8511
8512
8513                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8514 if test "$ol_link_threads" = no ; then
8515         # try -lpthread -Wl,-woff,85
8516         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8517 echo "configure:8518: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8518 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
8519   echo $ac_n "(cached) $ac_c" 1>&6
8520 else
8521   
8522                 # save the flags
8523                 ol_LIBS="$LIBS"
8524                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8525
8526                 if test "$cross_compiling" = yes; then
8527   cat > conftest.$ac_ext <<EOF
8528 #line 8529 "configure"
8529 #include "confdefs.h"
8530 /* pthread test headers */
8531 #include <pthread.h>
8532 #ifndef NULL
8533 #define NULL (void*)0
8534 #endif
8535
8536 static void *task(p)
8537         void *p;
8538 {
8539         return (void *) (p == NULL);
8540 }
8541
8542 int main() {
8543
8544         /* pthread test function */
8545         pthread_t t;
8546         int status;
8547
8548         /* make sure pthread_create() isn't just a stub */
8549 #if HAVE_PTHREADS_D4
8550         status = pthread_create(&t, pthread_attr_default, task, NULL);
8551 #else
8552         status = pthread_create(&t, NULL, task, NULL);
8553 #endif
8554
8555         if( status ) exit( status );
8556
8557         /* make sure pthread_detach() isn't just a stub */
8558 #if HAVE_PTHREADS_D4
8559         status = pthread_detach( &t );
8560 #else
8561         status = pthread_detach( t );
8562 #endif
8563
8564 #ifdef HAVE_LINUX_THREADS
8565         pthread_kill_other_threads_np();
8566 #endif
8567
8568         exit( status );
8569
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8573   rm -rf conftest*
8574   ol_cv_pthread_lib_lpthread_woff=yes
8575 else
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   ol_cv_pthread_lib_lpthread_woff=no
8580 fi
8581 rm -f conftest*
8582 else
8583   cat > conftest.$ac_ext <<EOF
8584 #line 8585 "configure"
8585 #include "confdefs.h"
8586 /* pthread test headers */
8587 #include <pthread.h>
8588 #ifndef NULL
8589 #define NULL (void*)0
8590 #endif
8591
8592 static void *task(p)
8593         void *p;
8594 {
8595         return (void *) (p == NULL);
8596 }
8597
8598
8599 int main(argc, argv)
8600         int argc;
8601         char **argv;
8602 {
8603
8604         /* pthread test function */
8605         pthread_t t;
8606         int status;
8607
8608         /* make sure pthread_create() isn't just a stub */
8609 #if HAVE_PTHREADS_D4
8610         status = pthread_create(&t, pthread_attr_default, task, NULL);
8611 #else
8612         status = pthread_create(&t, NULL, task, NULL);
8613 #endif
8614
8615         if( status ) exit( status );
8616
8617         /* make sure pthread_detach() isn't just a stub */
8618 #if HAVE_PTHREADS_D4
8619         status = pthread_detach( &t );
8620 #else
8621         status = pthread_detach( t );
8622 #endif
8623
8624 #ifdef HAVE_LINUX_THREADS
8625         pthread_kill_other_threads_np();
8626 #endif
8627
8628         exit( status );
8629
8630 }
8631
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8634 then
8635   ol_cv_pthread_lib_lpthread_woff=yes
8636 else
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -fr conftest*
8640   ol_cv_pthread_lib_lpthread_woff=no
8641 fi
8642 rm -fr conftest*
8643 fi
8644
8645
8646                 # restore the LIBS
8647                 LIBS="$ol_LIBS"
8648         
8649 fi
8650
8651 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8652
8653         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8654                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8655                 ol_link_threads=posix
8656         fi
8657 fi
8658
8659
8660                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8661 if test "$ol_link_threads" = no ; then
8662         # try -lpthread
8663         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8664 echo "configure:8665: checking for pthread link with -lpthread" >&5
8665 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
8666   echo $ac_n "(cached) $ac_c" 1>&6
8667 else
8668   
8669                 # save the flags
8670                 ol_LIBS="$LIBS"
8671                 LIBS="-lpthread $LIBS"
8672
8673                 if test "$cross_compiling" = yes; then
8674   cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 /* pthread test headers */
8678 #include <pthread.h>
8679 #ifndef NULL
8680 #define NULL (void*)0
8681 #endif
8682
8683 static void *task(p)
8684         void *p;
8685 {
8686         return (void *) (p == NULL);
8687 }
8688
8689 int main() {
8690
8691         /* pthread test function */
8692         pthread_t t;
8693         int status;
8694
8695         /* make sure pthread_create() isn't just a stub */
8696 #if HAVE_PTHREADS_D4
8697         status = pthread_create(&t, pthread_attr_default, task, NULL);
8698 #else
8699         status = pthread_create(&t, NULL, task, NULL);
8700 #endif
8701
8702         if( status ) exit( status );
8703
8704         /* make sure pthread_detach() isn't just a stub */
8705 #if HAVE_PTHREADS_D4
8706         status = pthread_detach( &t );
8707 #else
8708         status = pthread_detach( t );
8709 #endif
8710
8711 #ifdef HAVE_LINUX_THREADS
8712         pthread_kill_other_threads_np();
8713 #endif
8714
8715         exit( status );
8716
8717 ; return 0; }
8718 EOF
8719 if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8720   rm -rf conftest*
8721   ol_cv_pthread_lpthread=yes
8722 else
8723   echo "configure: failed program was:" >&5
8724   cat conftest.$ac_ext >&5
8725   rm -rf conftest*
8726   ol_cv_pthread_lpthread=no
8727 fi
8728 rm -f conftest*
8729 else
8730   cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 /* pthread test headers */
8734 #include <pthread.h>
8735 #ifndef NULL
8736 #define NULL (void*)0
8737 #endif
8738
8739 static void *task(p)
8740         void *p;
8741 {
8742         return (void *) (p == NULL);
8743 }
8744
8745
8746 int main(argc, argv)
8747         int argc;
8748         char **argv;
8749 {
8750
8751         /* pthread test function */
8752         pthread_t t;
8753         int status;
8754
8755         /* make sure pthread_create() isn't just a stub */
8756 #if HAVE_PTHREADS_D4
8757         status = pthread_create(&t, pthread_attr_default, task, NULL);
8758 #else
8759         status = pthread_create(&t, NULL, task, NULL);
8760 #endif
8761
8762         if( status ) exit( status );
8763
8764         /* make sure pthread_detach() isn't just a stub */
8765 #if HAVE_PTHREADS_D4
8766         status = pthread_detach( &t );
8767 #else
8768         status = pthread_detach( t );
8769 #endif
8770
8771 #ifdef HAVE_LINUX_THREADS
8772         pthread_kill_other_threads_np();
8773 #endif
8774
8775         exit( status );
8776
8777 }
8778
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8781 then
8782   ol_cv_pthread_lpthread=yes
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -fr conftest*
8787   ol_cv_pthread_lpthread=no
8788 fi
8789 rm -fr conftest*
8790 fi
8791
8792
8793                 # restore the LIBS
8794                 LIBS="$ol_LIBS"
8795         
8796 fi
8797
8798 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8799
8800         if test $ol_cv_pthread_lpthread = yes ; then
8801                 ol_link_pthreads="-lpthread"
8802                 ol_link_threads=posix
8803         fi
8804 fi
8805
8806                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8807 if test "$ol_link_threads" = no ; then
8808         # try -lc_r
8809         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8810 echo "configure:8811: checking for pthread link with -lc_r" >&5
8811 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
8812   echo $ac_n "(cached) $ac_c" 1>&6
8813 else
8814   
8815                 # save the flags
8816                 ol_LIBS="$LIBS"
8817                 LIBS="-lc_r $LIBS"
8818
8819                 if test "$cross_compiling" = yes; then
8820   cat > conftest.$ac_ext <<EOF
8821 #line 8822 "configure"
8822 #include "confdefs.h"
8823 /* pthread test headers */
8824 #include <pthread.h>
8825 #ifndef NULL
8826 #define NULL (void*)0
8827 #endif
8828
8829 static void *task(p)
8830         void *p;
8831 {
8832         return (void *) (p == NULL);
8833 }
8834
8835 int main() {
8836
8837         /* pthread test function */
8838         pthread_t t;
8839         int status;
8840
8841         /* make sure pthread_create() isn't just a stub */
8842 #if HAVE_PTHREADS_D4
8843         status = pthread_create(&t, pthread_attr_default, task, NULL);
8844 #else
8845         status = pthread_create(&t, NULL, task, NULL);
8846 #endif
8847
8848         if( status ) exit( status );
8849
8850         /* make sure pthread_detach() isn't just a stub */
8851 #if HAVE_PTHREADS_D4
8852         status = pthread_detach( &t );
8853 #else
8854         status = pthread_detach( t );
8855 #endif
8856
8857 #ifdef HAVE_LINUX_THREADS
8858         pthread_kill_other_threads_np();
8859 #endif
8860
8861         exit( status );
8862
8863 ; return 0; }
8864 EOF
8865 if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8866   rm -rf conftest*
8867   ol_cv_pthread_lc_r=yes
8868 else
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   ol_cv_pthread_lc_r=no
8873 fi
8874 rm -f conftest*
8875 else
8876   cat > conftest.$ac_ext <<EOF
8877 #line 8878 "configure"
8878 #include "confdefs.h"
8879 /* pthread test headers */
8880 #include <pthread.h>
8881 #ifndef NULL
8882 #define NULL (void*)0
8883 #endif
8884
8885 static void *task(p)
8886         void *p;
8887 {
8888         return (void *) (p == NULL);
8889 }
8890
8891
8892 int main(argc, argv)
8893         int argc;
8894         char **argv;
8895 {
8896
8897         /* pthread test function */
8898         pthread_t t;
8899         int status;
8900
8901         /* make sure pthread_create() isn't just a stub */
8902 #if HAVE_PTHREADS_D4
8903         status = pthread_create(&t, pthread_attr_default, task, NULL);
8904 #else
8905         status = pthread_create(&t, NULL, task, NULL);
8906 #endif
8907
8908         if( status ) exit( status );
8909
8910         /* make sure pthread_detach() isn't just a stub */
8911 #if HAVE_PTHREADS_D4
8912         status = pthread_detach( &t );
8913 #else
8914         status = pthread_detach( t );
8915 #endif
8916
8917 #ifdef HAVE_LINUX_THREADS
8918         pthread_kill_other_threads_np();
8919 #endif
8920
8921         exit( status );
8922
8923 }
8924
8925 EOF
8926 if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8927 then
8928   ol_cv_pthread_lc_r=yes
8929 else
8930   echo "configure: failed program was:" >&5
8931   cat conftest.$ac_ext >&5
8932   rm -fr conftest*
8933   ol_cv_pthread_lc_r=no
8934 fi
8935 rm -fr conftest*
8936 fi
8937
8938
8939                 # restore the LIBS
8940                 LIBS="$ol_LIBS"
8941         
8942 fi
8943
8944 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8945
8946         if test $ol_cv_pthread_lc_r = yes ; then
8947                 ol_link_pthreads="-lc_r"
8948                 ol_link_threads=posix
8949         fi
8950 fi
8951
8952
8953                 # Pthread try link: -threads (ol_cv_pthread_threads)
8954 if test "$ol_link_threads" = no ; then
8955         # try -threads
8956         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8957 echo "configure:8958: checking for pthread link with -threads" >&5
8958 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8959   echo $ac_n "(cached) $ac_c" 1>&6
8960 else
8961   
8962                 # save the flags
8963                 ol_LIBS="$LIBS"
8964                 LIBS="-threads $LIBS"
8965
8966                 if test "$cross_compiling" = yes; then
8967   cat > conftest.$ac_ext <<EOF
8968 #line 8969 "configure"
8969 #include "confdefs.h"
8970 /* pthread test headers */
8971 #include <pthread.h>
8972 #ifndef NULL
8973 #define NULL (void*)0
8974 #endif
8975
8976 static void *task(p)
8977         void *p;
8978 {
8979         return (void *) (p == NULL);
8980 }
8981
8982 int main() {
8983
8984         /* pthread test function */
8985         pthread_t t;
8986         int status;
8987
8988         /* make sure pthread_create() isn't just a stub */
8989 #if HAVE_PTHREADS_D4
8990         status = pthread_create(&t, pthread_attr_default, task, NULL);
8991 #else
8992         status = pthread_create(&t, NULL, task, NULL);
8993 #endif
8994
8995         if( status ) exit( status );
8996
8997         /* make sure pthread_detach() isn't just a stub */
8998 #if HAVE_PTHREADS_D4
8999         status = pthread_detach( &t );
9000 #else
9001         status = pthread_detach( t );
9002 #endif
9003
9004 #ifdef HAVE_LINUX_THREADS
9005         pthread_kill_other_threads_np();
9006 #endif
9007
9008         exit( status );
9009
9010 ; return 0; }
9011 EOF
9012 if { (eval echo configure:9013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9013   rm -rf conftest*
9014   ol_cv_pthread_threads=yes
9015 else
9016   echo "configure: failed program was:" >&5
9017   cat conftest.$ac_ext >&5
9018   rm -rf conftest*
9019   ol_cv_pthread_threads=no
9020 fi
9021 rm -f conftest*
9022 else
9023   cat > conftest.$ac_ext <<EOF
9024 #line 9025 "configure"
9025 #include "confdefs.h"
9026 /* pthread test headers */
9027 #include <pthread.h>
9028 #ifndef NULL
9029 #define NULL (void*)0
9030 #endif
9031
9032 static void *task(p)
9033         void *p;
9034 {
9035         return (void *) (p == NULL);
9036 }
9037
9038
9039 int main(argc, argv)
9040         int argc;
9041         char **argv;
9042 {
9043
9044         /* pthread test function */
9045         pthread_t t;
9046         int status;
9047
9048         /* make sure pthread_create() isn't just a stub */
9049 #if HAVE_PTHREADS_D4
9050         status = pthread_create(&t, pthread_attr_default, task, NULL);
9051 #else
9052         status = pthread_create(&t, NULL, task, NULL);
9053 #endif
9054
9055         if( status ) exit( status );
9056
9057         /* make sure pthread_detach() isn't just a stub */
9058 #if HAVE_PTHREADS_D4
9059         status = pthread_detach( &t );
9060 #else
9061         status = pthread_detach( t );
9062 #endif
9063
9064 #ifdef HAVE_LINUX_THREADS
9065         pthread_kill_other_threads_np();
9066 #endif
9067
9068         exit( status );
9069
9070 }
9071
9072 EOF
9073 if { (eval echo configure:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9074 then
9075   ol_cv_pthread_threads=yes
9076 else
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -fr conftest*
9080   ol_cv_pthread_threads=no
9081 fi
9082 rm -fr conftest*
9083 fi
9084
9085
9086                 # restore the LIBS
9087                 LIBS="$ol_LIBS"
9088         
9089 fi
9090
9091 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9092
9093         if test $ol_cv_pthread_threads = yes ; then
9094                 ol_link_pthreads="-threads"
9095                 ol_link_threads=posix
9096         fi
9097 fi
9098
9099
9100                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9101 if test "$ol_link_threads" = no ; then
9102         # try -lpthreads -lmach -lexc -lc_r
9103         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9104 echo "configure:9105: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9105 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
9106   echo $ac_n "(cached) $ac_c" 1>&6
9107 else
9108   
9109                 # save the flags
9110                 ol_LIBS="$LIBS"
9111                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9112
9113                 if test "$cross_compiling" = yes; then
9114   cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117 /* pthread test headers */
9118 #include <pthread.h>
9119 #ifndef NULL
9120 #define NULL (void*)0
9121 #endif
9122
9123 static void *task(p)
9124         void *p;
9125 {
9126         return (void *) (p == NULL);
9127 }
9128
9129 int main() {
9130
9131         /* pthread test function */
9132         pthread_t t;
9133         int status;
9134
9135         /* make sure pthread_create() isn't just a stub */
9136 #if HAVE_PTHREADS_D4
9137         status = pthread_create(&t, pthread_attr_default, task, NULL);
9138 #else
9139         status = pthread_create(&t, NULL, task, NULL);
9140 #endif
9141
9142         if( status ) exit( status );
9143
9144         /* make sure pthread_detach() isn't just a stub */
9145 #if HAVE_PTHREADS_D4
9146         status = pthread_detach( &t );
9147 #else
9148         status = pthread_detach( t );
9149 #endif
9150
9151 #ifdef HAVE_LINUX_THREADS
9152         pthread_kill_other_threads_np();
9153 #endif
9154
9155         exit( status );
9156
9157 ; return 0; }
9158 EOF
9159 if { (eval echo configure:9160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9160   rm -rf conftest*
9161   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9162 else
9163   echo "configure: failed program was:" >&5
9164   cat conftest.$ac_ext >&5
9165   rm -rf conftest*
9166   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9167 fi
9168 rm -f conftest*
9169 else
9170   cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 /* pthread test headers */
9174 #include <pthread.h>
9175 #ifndef NULL
9176 #define NULL (void*)0
9177 #endif
9178
9179 static void *task(p)
9180         void *p;
9181 {
9182         return (void *) (p == NULL);
9183 }
9184
9185
9186 int main(argc, argv)
9187         int argc;
9188         char **argv;
9189 {
9190
9191         /* pthread test function */
9192         pthread_t t;
9193         int status;
9194
9195         /* make sure pthread_create() isn't just a stub */
9196 #if HAVE_PTHREADS_D4
9197         status = pthread_create(&t, pthread_attr_default, task, NULL);
9198 #else
9199         status = pthread_create(&t, NULL, task, NULL);
9200 #endif
9201
9202         if( status ) exit( status );
9203
9204         /* make sure pthread_detach() isn't just a stub */
9205 #if HAVE_PTHREADS_D4
9206         status = pthread_detach( &t );
9207 #else
9208         status = pthread_detach( t );
9209 #endif
9210
9211 #ifdef HAVE_LINUX_THREADS
9212         pthread_kill_other_threads_np();
9213 #endif
9214
9215         exit( status );
9216
9217 }
9218
9219 EOF
9220 if { (eval echo configure:9221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9221 then
9222   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9223 else
9224   echo "configure: failed program was:" >&5
9225   cat conftest.$ac_ext >&5
9226   rm -fr conftest*
9227   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9228 fi
9229 rm -fr conftest*
9230 fi
9231
9232
9233                 # restore the LIBS
9234                 LIBS="$ol_LIBS"
9235         
9236 fi
9237
9238 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9239
9240         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9241                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9242                 ol_link_threads=posix
9243         fi
9244 fi
9245
9246                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9247 if test "$ol_link_threads" = no ; then
9248         # try -lpthreads -lmach -lexc
9249         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9250 echo "configure:9251: checking for pthread link with -lpthreads -lmach -lexc" >&5
9251 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
9252   echo $ac_n "(cached) $ac_c" 1>&6
9253 else
9254   
9255                 # save the flags
9256                 ol_LIBS="$LIBS"
9257                 LIBS="-lpthreads -lmach -lexc $LIBS"
9258
9259                 if test "$cross_compiling" = yes; then
9260   cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 /* pthread test headers */
9264 #include <pthread.h>
9265 #ifndef NULL
9266 #define NULL (void*)0
9267 #endif
9268
9269 static void *task(p)
9270         void *p;
9271 {
9272         return (void *) (p == NULL);
9273 }
9274
9275 int main() {
9276
9277         /* pthread test function */
9278         pthread_t t;
9279         int status;
9280
9281         /* make sure pthread_create() isn't just a stub */
9282 #if HAVE_PTHREADS_D4
9283         status = pthread_create(&t, pthread_attr_default, task, NULL);
9284 #else
9285         status = pthread_create(&t, NULL, task, NULL);
9286 #endif
9287
9288         if( status ) exit( status );
9289
9290         /* make sure pthread_detach() isn't just a stub */
9291 #if HAVE_PTHREADS_D4
9292         status = pthread_detach( &t );
9293 #else
9294         status = pthread_detach( t );
9295 #endif
9296
9297 #ifdef HAVE_LINUX_THREADS
9298         pthread_kill_other_threads_np();
9299 #endif
9300
9301         exit( status );
9302
9303 ; return 0; }
9304 EOF
9305 if { (eval echo configure:9306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9306   rm -rf conftest*
9307   ol_cv_pthread_lpthreads_lmach_lexc=yes
9308 else
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   ol_cv_pthread_lpthreads_lmach_lexc=no
9313 fi
9314 rm -f conftest*
9315 else
9316   cat > conftest.$ac_ext <<EOF
9317 #line 9318 "configure"
9318 #include "confdefs.h"
9319 /* pthread test headers */
9320 #include <pthread.h>
9321 #ifndef NULL
9322 #define NULL (void*)0
9323 #endif
9324
9325 static void *task(p)
9326         void *p;
9327 {
9328         return (void *) (p == NULL);
9329 }
9330
9331
9332 int main(argc, argv)
9333         int argc;
9334         char **argv;
9335 {
9336
9337         /* pthread test function */
9338         pthread_t t;
9339         int status;
9340
9341         /* make sure pthread_create() isn't just a stub */
9342 #if HAVE_PTHREADS_D4
9343         status = pthread_create(&t, pthread_attr_default, task, NULL);
9344 #else
9345         status = pthread_create(&t, NULL, task, NULL);
9346 #endif
9347
9348         if( status ) exit( status );
9349
9350         /* make sure pthread_detach() isn't just a stub */
9351 #if HAVE_PTHREADS_D4
9352         status = pthread_detach( &t );
9353 #else
9354         status = pthread_detach( t );
9355 #endif
9356
9357 #ifdef HAVE_LINUX_THREADS
9358         pthread_kill_other_threads_np();
9359 #endif
9360
9361         exit( status );
9362
9363 }
9364
9365 EOF
9366 if { (eval echo configure:9367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9367 then
9368   ol_cv_pthread_lpthreads_lmach_lexc=yes
9369 else
9370   echo "configure: failed program was:" >&5
9371   cat conftest.$ac_ext >&5
9372   rm -fr conftest*
9373   ol_cv_pthread_lpthreads_lmach_lexc=no
9374 fi
9375 rm -fr conftest*
9376 fi
9377
9378
9379                 # restore the LIBS
9380                 LIBS="$ol_LIBS"
9381         
9382 fi
9383
9384 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9385
9386         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9387                 ol_link_pthreads="-lpthreads -lmach -lexc"
9388                 ol_link_threads=posix
9389         fi
9390 fi
9391
9392                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9393 if test "$ol_link_threads" = no ; then
9394         # try -lpthreads -lexc
9395         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9396 echo "configure:9397: checking for pthread link with -lpthreads -lexc" >&5
9397 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
9398   echo $ac_n "(cached) $ac_c" 1>&6
9399 else
9400   
9401                 # save the flags
9402                 ol_LIBS="$LIBS"
9403                 LIBS="-lpthreads -lexc $LIBS"
9404
9405                 if test "$cross_compiling" = yes; then
9406   cat > conftest.$ac_ext <<EOF
9407 #line 9408 "configure"
9408 #include "confdefs.h"
9409 /* pthread test headers */
9410 #include <pthread.h>
9411 #ifndef NULL
9412 #define NULL (void*)0
9413 #endif
9414
9415 static void *task(p)
9416         void *p;
9417 {
9418         return (void *) (p == NULL);
9419 }
9420
9421 int main() {
9422
9423         /* pthread test function */
9424         pthread_t t;
9425         int status;
9426
9427         /* make sure pthread_create() isn't just a stub */
9428 #if HAVE_PTHREADS_D4
9429         status = pthread_create(&t, pthread_attr_default, task, NULL);
9430 #else
9431         status = pthread_create(&t, NULL, task, NULL);
9432 #endif
9433
9434         if( status ) exit( status );
9435
9436         /* make sure pthread_detach() isn't just a stub */
9437 #if HAVE_PTHREADS_D4
9438         status = pthread_detach( &t );
9439 #else
9440         status = pthread_detach( t );
9441 #endif
9442
9443 #ifdef HAVE_LINUX_THREADS
9444         pthread_kill_other_threads_np();
9445 #endif
9446
9447         exit( status );
9448
9449 ; return 0; }
9450 EOF
9451 if { (eval echo configure:9452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9452   rm -rf conftest*
9453   ol_cv_pthread_lpthreads_lexc=yes
9454 else
9455   echo "configure: failed program was:" >&5
9456   cat conftest.$ac_ext >&5
9457   rm -rf conftest*
9458   ol_cv_pthread_lpthreads_lexc=no
9459 fi
9460 rm -f conftest*
9461 else
9462   cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9465 /* pthread test headers */
9466 #include <pthread.h>
9467 #ifndef NULL
9468 #define NULL (void*)0
9469 #endif
9470
9471 static void *task(p)
9472         void *p;
9473 {
9474         return (void *) (p == NULL);
9475 }
9476
9477
9478 int main(argc, argv)
9479         int argc;
9480         char **argv;
9481 {
9482
9483         /* pthread test function */
9484         pthread_t t;
9485         int status;
9486
9487         /* make sure pthread_create() isn't just a stub */
9488 #if HAVE_PTHREADS_D4
9489         status = pthread_create(&t, pthread_attr_default, task, NULL);
9490 #else
9491         status = pthread_create(&t, NULL, task, NULL);
9492 #endif
9493
9494         if( status ) exit( status );
9495
9496         /* make sure pthread_detach() isn't just a stub */
9497 #if HAVE_PTHREADS_D4
9498         status = pthread_detach( &t );
9499 #else
9500         status = pthread_detach( t );
9501 #endif
9502
9503 #ifdef HAVE_LINUX_THREADS
9504         pthread_kill_other_threads_np();
9505 #endif
9506
9507         exit( status );
9508
9509 }
9510
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9513 then
9514   ol_cv_pthread_lpthreads_lexc=yes
9515 else
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -fr conftest*
9519   ol_cv_pthread_lpthreads_lexc=no
9520 fi
9521 rm -fr conftest*
9522 fi
9523
9524
9525                 # restore the LIBS
9526                 LIBS="$ol_LIBS"
9527         
9528 fi
9529
9530 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
9531
9532         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
9533                 ol_link_pthreads="-lpthreads -lexc"
9534                 ol_link_threads=posix
9535         fi
9536 fi
9537
9538
9539                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
9540 if test "$ol_link_threads" = no ; then
9541         # try -lpthreads
9542         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
9543 echo "configure:9544: checking for pthread link with -lpthreads" >&5
9544 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
9545   echo $ac_n "(cached) $ac_c" 1>&6
9546 else
9547   
9548                 # save the flags
9549                 ol_LIBS="$LIBS"
9550                 LIBS="-lpthreads $LIBS"
9551
9552                 if test "$cross_compiling" = yes; then
9553   cat > conftest.$ac_ext <<EOF
9554 #line 9555 "configure"
9555 #include "confdefs.h"
9556 /* pthread test headers */
9557 #include <pthread.h>
9558 #ifndef NULL
9559 #define NULL (void*)0
9560 #endif
9561
9562 static void *task(p)
9563         void *p;
9564 {
9565         return (void *) (p == NULL);
9566 }
9567
9568 int main() {
9569
9570         /* pthread test function */
9571         pthread_t t;
9572         int status;
9573
9574         /* make sure pthread_create() isn't just a stub */
9575 #if HAVE_PTHREADS_D4
9576         status = pthread_create(&t, pthread_attr_default, task, NULL);
9577 #else
9578         status = pthread_create(&t, NULL, task, NULL);
9579 #endif
9580
9581         if( status ) exit( status );
9582
9583         /* make sure pthread_detach() isn't just a stub */
9584 #if HAVE_PTHREADS_D4
9585         status = pthread_detach( &t );
9586 #else
9587         status = pthread_detach( t );
9588 #endif
9589
9590 #ifdef HAVE_LINUX_THREADS
9591         pthread_kill_other_threads_np();
9592 #endif
9593
9594         exit( status );
9595
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9599   rm -rf conftest*
9600   ol_cv_pthread_lib_lpthreads=yes
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604   rm -rf conftest*
9605   ol_cv_pthread_lib_lpthreads=no
9606 fi
9607 rm -f conftest*
9608 else
9609   cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 /* pthread test headers */
9613 #include <pthread.h>
9614 #ifndef NULL
9615 #define NULL (void*)0
9616 #endif
9617
9618 static void *task(p)
9619         void *p;
9620 {
9621         return (void *) (p == NULL);
9622 }
9623
9624
9625 int main(argc, argv)
9626         int argc;
9627         char **argv;
9628 {
9629
9630         /* pthread test function */
9631         pthread_t t;
9632         int status;
9633
9634         /* make sure pthread_create() isn't just a stub */
9635 #if HAVE_PTHREADS_D4
9636         status = pthread_create(&t, pthread_attr_default, task, NULL);
9637 #else
9638         status = pthread_create(&t, NULL, task, NULL);
9639 #endif
9640
9641         if( status ) exit( status );
9642
9643         /* make sure pthread_detach() isn't just a stub */
9644 #if HAVE_PTHREADS_D4
9645         status = pthread_detach( &t );
9646 #else
9647         status = pthread_detach( t );
9648 #endif
9649
9650 #ifdef HAVE_LINUX_THREADS
9651         pthread_kill_other_threads_np();
9652 #endif
9653
9654         exit( status );
9655
9656 }
9657
9658 EOF
9659 if { (eval echo configure:9660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9660 then
9661   ol_cv_pthread_lib_lpthreads=yes
9662 else
9663   echo "configure: failed program was:" >&5
9664   cat conftest.$ac_ext >&5
9665   rm -fr conftest*
9666   ol_cv_pthread_lib_lpthreads=no
9667 fi
9668 rm -fr conftest*
9669 fi
9670
9671
9672                 # restore the LIBS
9673                 LIBS="$ol_LIBS"
9674         
9675 fi
9676
9677 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9678
9679         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9680                 ol_link_pthreads="-lpthreads"
9681                 ol_link_threads=posix
9682         fi
9683 fi
9684
9685
9686                 if test $ol_link_threads != no ; then
9687                         cat >> confdefs.h <<\EOF
9688 #define HAVE_PTHREADS 1
9689 EOF
9690
9691
9692                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9693
9694                                                 save_CPPFLAGS="$CPPFLAGS"
9695                         save_LIBS="$LIBS"
9696                         LIBS="$LTHREAD_LIBS $LIBS"
9697
9698                                                                                                 for ac_func in sched_yield pthread_yield
9699 do
9700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9701 echo "configure:9702: checking for $ac_func" >&5
9702 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708 /* System header to define __stub macros and hopefully few prototypes,
9709     which can conflict with char $ac_func(); below.  */
9710 #include <assert.h>
9711 /* Override any gcc2 internal prototype to avoid an error.  */
9712 /* We use char because int might match the return type of a gcc2
9713     builtin and then its argument prototype would still apply.  */
9714 char $ac_func();
9715 char (*f)();
9716
9717 int main() {
9718
9719 /* The GNU C library defines this for functions which it implements
9720     to always fail with ENOSYS.  Some functions are actually named
9721     something starting with __ and the normal name is an alias.  */
9722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9723 choke me
9724 #else
9725 f = $ac_func;
9726 #endif
9727
9728 ; return 0; }
9729 EOF
9730 if { (eval echo configure:9731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9731   rm -rf conftest*
9732   eval "ac_cv_func_$ac_func=yes"
9733 else
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -rf conftest*
9737   eval "ac_cv_func_$ac_func=no"
9738 fi
9739 rm -f conftest*
9740 fi
9741
9742 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9743   echo "$ac_t""yes" 1>&6
9744     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9745   cat >> confdefs.h <<EOF
9746 #define $ac_tr_func 1
9747 EOF
9748  
9749 else
9750   echo "$ac_t""no" 1>&6
9751 fi
9752 done
9753
9754
9755                         if test $ac_cv_func_sched_yield = no -a \
9756                                 $ac_cv_func_pthread_yield = no ; then
9757                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9758 echo "configure:9759: checking for sched_yield in -lrt" >&5
9759 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
9760 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9761   echo $ac_n "(cached) $ac_c" 1>&6
9762 else
9763   ac_save_LIBS="$LIBS"
9764 LIBS="-lrt  $LIBS"
9765 cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768 /* Override any gcc2 internal prototype to avoid an error.  */
9769 /* We use char because int might match the return type of a gcc2
9770     builtin and then its argument prototype would still apply.  */
9771 char sched_yield();
9772
9773 int main() {
9774 sched_yield()
9775 ; return 0; }
9776 EOF
9777 if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9778   rm -rf conftest*
9779   eval "ac_cv_lib_$ac_lib_var=yes"
9780 else
9781   echo "configure: failed program was:" >&5
9782   cat conftest.$ac_ext >&5
9783   rm -rf conftest*
9784   eval "ac_cv_lib_$ac_lib_var=no"
9785 fi
9786 rm -f conftest*
9787 LIBS="$ac_save_LIBS"
9788
9789 fi
9790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9791   echo "$ac_t""yes" 1>&6
9792   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9793                                         cat >> confdefs.h <<\EOF
9794 #define HAVE_SCHED_YIELD 1
9795 EOF
9796
9797                                         ac_cv_func_sched_yield=yes
9798 else
9799   echo "$ac_t""no" 1>&6
9800 ac_cv_func_sched_yield=no
9801 fi
9802
9803                         fi
9804                         if test $ac_cv_func_sched_yield = no -a \
9805                                 $ac_cv_func_pthread_yield = no ; then
9806                                                                                                 for ac_func in thr_yield
9807 do
9808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9809 echo "configure:9810: checking for $ac_func" >&5
9810 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 /* System header to define __stub macros and hopefully few prototypes,
9817     which can conflict with char $ac_func(); below.  */
9818 #include <assert.h>
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 /* We use char because int might match the return type of a gcc2
9821     builtin and then its argument prototype would still apply.  */
9822 char $ac_func();
9823 char (*f)();
9824
9825 int main() {
9826
9827 /* The GNU C library defines this for functions which it implements
9828     to always fail with ENOSYS.  Some functions are actually named
9829     something starting with __ and the normal name is an alias.  */
9830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9831 choke me
9832 #else
9833 f = $ac_func;
9834 #endif
9835
9836 ; return 0; }
9837 EOF
9838 if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9839   rm -rf conftest*
9840   eval "ac_cv_func_$ac_func=yes"
9841 else
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   eval "ac_cv_func_$ac_func=no"
9846 fi
9847 rm -f conftest*
9848 fi
9849
9850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9851   echo "$ac_t""yes" 1>&6
9852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9853   cat >> confdefs.h <<EOF
9854 #define $ac_tr_func 1
9855 EOF
9856  
9857 else
9858   echo "$ac_t""no" 1>&6
9859 fi
9860 done
9861
9862                         fi
9863                         if test $ac_cv_func_sched_yield = no -a \
9864                                 $ac_cv_func_pthread_yield = no -a \
9865                                 "$ac_cv_func_thr_yield" = no ; then
9866                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9867                         fi
9868
9869                                                 for ac_func in pthread_kill
9870 do
9871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9872 echo "configure:9873: checking for $ac_func" >&5
9873 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   cat > conftest.$ac_ext <<EOF
9877 #line 9878 "configure"
9878 #include "confdefs.h"
9879 /* System header to define __stub macros and hopefully few prototypes,
9880     which can conflict with char $ac_func(); below.  */
9881 #include <assert.h>
9882 /* Override any gcc2 internal prototype to avoid an error.  */
9883 /* We use char because int might match the return type of a gcc2
9884     builtin and then its argument prototype would still apply.  */
9885 char $ac_func();
9886 char (*f)();
9887
9888 int main() {
9889
9890 /* The GNU C library defines this for functions which it implements
9891     to always fail with ENOSYS.  Some functions are actually named
9892     something starting with __ and the normal name is an alias.  */
9893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9894 choke me
9895 #else
9896 f = $ac_func;
9897 #endif
9898
9899 ; return 0; }
9900 EOF
9901 if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9902   rm -rf conftest*
9903   eval "ac_cv_func_$ac_func=yes"
9904 else
9905   echo "configure: failed program was:" >&5
9906   cat conftest.$ac_ext >&5
9907   rm -rf conftest*
9908   eval "ac_cv_func_$ac_func=no"
9909 fi
9910 rm -f conftest*
9911 fi
9912
9913 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9914   echo "$ac_t""yes" 1>&6
9915     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9916   cat >> confdefs.h <<EOF
9917 #define $ac_tr_func 1
9918 EOF
9919  
9920 else
9921   echo "$ac_t""no" 1>&6
9922 fi
9923 done
9924
9925
9926                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9927 echo "configure:9928: checking for pthread_detach with <pthread.h>" >&5
9928 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9929   echo $ac_n "(cached) $ac_c" 1>&6
9930 else
9931   
9932                                                                 cat > conftest.$ac_ext <<EOF
9933 #line 9934 "configure"
9934 #include "confdefs.h"
9935
9936 #include <pthread.h>
9937 #ifndef NULL
9938 #define NULL (void*)0
9939 #endif
9940
9941 int main() {
9942 pthread_detach(NULL);
9943 ; return 0; }
9944 EOF
9945 if { (eval echo configure:9946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9946   rm -rf conftest*
9947   ol_cv_func_pthread_detach=yes
9948 else
9949   echo "configure: failed program was:" >&5
9950   cat conftest.$ac_ext >&5
9951   rm -rf conftest*
9952   ol_cv_func_pthread_detach=no
9953 fi
9954 rm -f conftest*
9955                         
9956 fi
9957
9958 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9959
9960                         if test $ol_cv_func_pthread_detach = no ; then
9961                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9962                         fi
9963
9964                         cat >> confdefs.h <<\EOF
9965 #define HAVE_PTHREAD_DETACH 1
9966 EOF
9967
9968
9969                                                 for ac_func in \
9970                                 pthread_setconcurrency \
9971                                 pthread_getconcurrency \
9972                                 thr_setconcurrency \
9973                                 thr_getconcurrency \
9974                         
9975 do
9976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9977 echo "configure:9978: checking for $ac_func" >&5
9978 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9979   echo $ac_n "(cached) $ac_c" 1>&6
9980 else
9981   cat > conftest.$ac_ext <<EOF
9982 #line 9983 "configure"
9983 #include "confdefs.h"
9984 /* System header to define __stub macros and hopefully few prototypes,
9985     which can conflict with char $ac_func(); below.  */
9986 #include <assert.h>
9987 /* Override any gcc2 internal prototype to avoid an error.  */
9988 /* We use char because int might match the return type of a gcc2
9989     builtin and then its argument prototype would still apply.  */
9990 char $ac_func();
9991 char (*f)();
9992
9993 int main() {
9994
9995 /* The GNU C library defines this for functions which it implements
9996     to always fail with ENOSYS.  Some functions are actually named
9997     something starting with __ and the normal name is an alias.  */
9998 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9999 choke me
10000 #else
10001 f = $ac_func;
10002 #endif
10003
10004 ; return 0; }
10005 EOF
10006 if { (eval echo configure:10007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10007   rm -rf conftest*
10008   eval "ac_cv_func_$ac_func=yes"
10009 else
10010   echo "configure: failed program was:" >&5
10011   cat conftest.$ac_ext >&5
10012   rm -rf conftest*
10013   eval "ac_cv_func_$ac_func=no"
10014 fi
10015 rm -f conftest*
10016 fi
10017
10018 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10019   echo "$ac_t""yes" 1>&6
10020     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10021   cat >> confdefs.h <<EOF
10022 #define $ac_tr_func 1
10023 EOF
10024  
10025 else
10026   echo "$ac_t""no" 1>&6
10027 fi
10028 done
10029
10030
10031                         
10032         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10033 echo "configure:10034: checking for pthread_kill_other_threads_np" >&5
10034 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
10035   echo $ac_n "(cached) $ac_c" 1>&6
10036 else
10037   cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 /* System header to define __stub macros and hopefully few prototypes,
10041     which can conflict with char pthread_kill_other_threads_np(); below.  */
10042 #include <assert.h>
10043 /* Override any gcc2 internal prototype to avoid an error.  */
10044 /* We use char because int might match the return type of a gcc2
10045     builtin and then its argument prototype would still apply.  */
10046 char pthread_kill_other_threads_np();
10047 char (*f)();
10048
10049 int main() {
10050
10051 /* The GNU C library defines this for functions which it implements
10052     to always fail with ENOSYS.  Some functions are actually named
10053     something starting with __ and the normal name is an alias.  */
10054 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10055 choke me
10056 #else
10057 f = pthread_kill_other_threads_np;
10058 #endif
10059
10060 ; return 0; }
10061 EOF
10062 if { (eval echo configure:10063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10063   rm -rf conftest*
10064   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10065 else
10066   echo "configure: failed program was:" >&5
10067   cat conftest.$ac_ext >&5
10068   rm -rf conftest*
10069   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10070 fi
10071 rm -f conftest*
10072 fi
10073
10074 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10075   echo "$ac_t""yes" 1>&6
10076   :
10077 else
10078   echo "$ac_t""no" 1>&6
10079 fi
10080
10081         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10082 echo "configure:10083: checking for LinuxThreads implementation" >&5
10083 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
10084   echo $ac_n "(cached) $ac_c" 1>&6
10085 else
10086   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10087 fi
10088
10089 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10090
10091                         
10092         
10093         
10094         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10095 echo "configure:10096: checking for LinuxThreads consistency" >&5
10096 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
10097   echo $ac_n "(cached) $ac_c" 1>&6
10098 else
10099   
10100                 if test $ol_cv_header_linux_threads = yes -a \
10101                         $ol_cv_sys_linux_threads = yes; then
10102                         ol_cv_linux_threads=yes
10103                 elif test $ol_cv_header_linux_threads = no -a \
10104                         $ol_cv_sys_linux_threads = no; then
10105                         ol_cv_linux_threads=no
10106                 else
10107                         ol_cv_linux_threads=error
10108                 fi
10109         
10110 fi
10111
10112 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10113
10114
10115                         if test $ol_cv_linux_threads = error; then
10116                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10117                         fi
10118
10119                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10120 echo "configure:10121: checking if pthread_create() works" >&5
10121 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
10122   echo $ac_n "(cached) $ac_c" 1>&6
10123 else
10124   
10125                         if test "$cross_compiling" = yes; then
10126                                 ol_cv_pthread_create_works=yes
10127 else
10128   cat > conftest.$ac_ext <<EOF
10129 #line 10130 "configure"
10130 #include "confdefs.h"
10131 /* pthread test headers */
10132 #include <pthread.h>
10133 #ifndef NULL
10134 #define NULL (void*)0
10135 #endif
10136
10137 static void *task(p)
10138         void *p;
10139 {
10140         return (void *) (p == NULL);
10141 }
10142
10143
10144 int main(argc, argv)
10145         int argc;
10146         char **argv;
10147 {
10148
10149         /* pthread test function */
10150         pthread_t t;
10151         int status;
10152
10153         /* make sure pthread_create() isn't just a stub */
10154 #if HAVE_PTHREADS_D4
10155         status = pthread_create(&t, pthread_attr_default, task, NULL);
10156 #else
10157         status = pthread_create(&t, NULL, task, NULL);
10158 #endif
10159
10160         if( status ) exit( status );
10161
10162         /* make sure pthread_detach() isn't just a stub */
10163 #if HAVE_PTHREADS_D4
10164         status = pthread_detach( &t );
10165 #else
10166         status = pthread_detach( t );
10167 #endif
10168
10169 #ifdef HAVE_LINUX_THREADS
10170         pthread_kill_other_threads_np();
10171 #endif
10172
10173         exit( status );
10174
10175 }
10176
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10179 then
10180   ol_cv_pthread_create_works=yes
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -fr conftest*
10185   ol_cv_pthread_create_works=no
10186 fi
10187 rm -fr conftest*
10188 fi
10189
10190 fi
10191
10192 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10193
10194                         if test $ol_cv_pthread_create_works = no ; then
10195                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10196                         fi
10197
10198                                                 if test $ol_with_yielding_select = auto ; then
10199                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10200 echo "configure:10201: checking if select yields when using pthreads" >&5
10201 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
10202   echo $ac_n "(cached) $ac_c" 1>&6
10203 else
10204   
10205                                 if test "$cross_compiling" = yes; then
10206   ol_cv_pthread_select_yields=cross
10207 else
10208   cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211
10212 #include <sys/types.h>
10213 #include <sys/time.h>
10214 #include <unistd.h>
10215 #include <pthread.h>
10216 #ifndef NULL
10217 #define NULL (void*) 0
10218 #endif
10219
10220 static int fildes[2];
10221
10222 static void *task(p)
10223         void *p;
10224 {
10225         int i;
10226         struct timeval tv;
10227
10228         fd_set rfds;
10229
10230         tv.tv_sec=10;
10231         tv.tv_usec=0;
10232
10233         FD_ZERO(&rfds);
10234         FD_SET(fildes[0], &rfds);
10235
10236         /* we're not interested in any fds */
10237         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10238
10239         if(i < 0) {
10240                 perror("select");
10241                 exit(10);
10242         }
10243
10244         exit(0); /* if we exit here, the select blocked the whole process */
10245 }
10246
10247 int main(argc, argv)
10248         int argc;
10249         char **argv;
10250 {
10251         pthread_t t;
10252
10253         /* create a pipe to select */
10254         if(pipe(&fildes[0])) {
10255                 perror("select");
10256                 exit(1);
10257         }
10258
10259 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10260         (void) pthread_setconcurrency(2);
10261 #else
10262 #ifdef HAVE_THR_SETCONCURRENCY
10263         /* Set Solaris LWP concurrency to 2 */
10264         thr_setconcurrency(2);
10265 #endif
10266 #endif
10267
10268 #if HAVE_PTHREADS_D4
10269         pthread_create(&t, pthread_attr_default, task, NULL);
10270 #else
10271         pthread_create(&t, NULL, task, NULL);
10272 #endif
10273
10274 #if HAVE_SCHED_YIELD
10275         sched_yield();  /* make sure task runs first */
10276 #else
10277 #ifdef HAVE_PTHREAD_YIELD
10278         pthread_yield();        /* make sure task runs first */
10279 #endif
10280 #endif
10281
10282         exit(2);
10283 }
10284 EOF
10285 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10286 then
10287   ol_cv_pthread_select_yields=no
10288 else
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -fr conftest*
10292   ol_cv_pthread_select_yields=yes
10293 fi
10294 rm -fr conftest*
10295 fi
10296
10297 fi
10298
10299 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10300
10301                                 if test $ol_cv_pthread_select_yields = cross ; then
10302                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10303                                 fi
10304
10305                                 if test $ol_cv_pthread_select_yields = yes ; then
10306                                         ol_with_yielding_select=yes
10307                                 fi
10308                         fi
10309
10310                                                 CPPFLAGS="$save_CPPFLAGS"
10311                         LIBS="$save_LIBS"
10312                 else
10313                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10314                 fi
10315         fi
10316
10317         if test $ol_with_threads = posix ; then
10318                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10319         fi
10320 fi
10321
10322 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10323         -o $ol_with_threads = mach ; then
10324
10325                 for ac_hdr in mach/cthreads.h
10326 do
10327 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10328 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10329 echo "configure:10330: checking for $ac_hdr" >&5
10330 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10331   echo $ac_n "(cached) $ac_c" 1>&6
10332 else
10333   cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 #include <$ac_hdr>
10337 EOF
10338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10339 { (eval echo configure:10340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10341 if test -z "$ac_err"; then
10342   rm -rf conftest*
10343   eval "ac_cv_header_$ac_safe=yes"
10344 else
10345   echo "$ac_err" >&5
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   eval "ac_cv_header_$ac_safe=no"
10350 fi
10351 rm -f conftest*
10352 fi
10353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10354   echo "$ac_t""yes" 1>&6
10355     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10356   cat >> confdefs.h <<EOF
10357 #define $ac_tr_hdr 1
10358 EOF
10359  
10360 else
10361   echo "$ac_t""no" 1>&6
10362 fi
10363 done
10364
10365         if test $ac_cv_header_mach_cthreads_h = yes ; then
10366                 ol_with_threads=found
10367
10368                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10369 echo "configure:10370: checking for cthread_fork" >&5
10370 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376 /* System header to define __stub macros and hopefully few prototypes,
10377     which can conflict with char cthread_fork(); below.  */
10378 #include <assert.h>
10379 /* Override any gcc2 internal prototype to avoid an error.  */
10380 /* We use char because int might match the return type of a gcc2
10381     builtin and then its argument prototype would still apply.  */
10382 char cthread_fork();
10383 char (*f)();
10384
10385 int main() {
10386
10387 /* The GNU C library defines this for functions which it implements
10388     to always fail with ENOSYS.  Some functions are actually named
10389     something starting with __ and the normal name is an alias.  */
10390 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10391 choke me
10392 #else
10393 f = cthread_fork;
10394 #endif
10395
10396 ; return 0; }
10397 EOF
10398 if { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10399   rm -rf conftest*
10400   eval "ac_cv_func_cthread_fork=yes"
10401 else
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_func_cthread_fork=no"
10406 fi
10407 rm -f conftest*
10408 fi
10409
10410 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10411   echo "$ac_t""yes" 1>&6
10412   ol_link_threads=yes
10413 else
10414   echo "$ac_t""no" 1>&6
10415 fi
10416
10417
10418                 if test $ol_link_threads = no ; then
10419                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10420 echo "configure:10421: checking for cthread_fork with -all_load" >&5
10421 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
10422   echo $ac_n "(cached) $ac_c" 1>&6
10423 else
10424   
10425                                                                 save_LIBS="$LIBS"
10426                                 LIBS="-all_load $LIBS"
10427                                 cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430 #include <mach/cthreads.h>
10431 int main() {
10432
10433                                         cthread_fork((void *)0, (void *)0);
10434                                         
10435 ; return 0; }
10436 EOF
10437 if { (eval echo configure:10438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10438   rm -rf conftest*
10439   ol_cv_cthread_all_load=yes
10440 else
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   ol_cv_cthread_all_load=no
10445 fi
10446 rm -f conftest*
10447                                                                 LIBS="$save_LIBS"
10448                         
10449 fi
10450
10451 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10452
10453                         if test $ol_cv_cthread_all_load = yes ; then
10454                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10455                                 ol_link_threads=mach
10456                         fi
10457                 fi
10458
10459                 if test $ol_link_threads != no ; then
10460                         : check for cthread specific functionality here
10461                         cat >> confdefs.h <<\EOF
10462 #define HAVE_MACH_CTHREADS 1
10463 EOF
10464
10465                 else
10466                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10467                 fi
10468         fi
10469
10470         if test $ol_with_threads = mach ; then
10471                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10472         fi
10473 fi
10474
10475 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10476         -o $ol_with_threads = pth ; then
10477
10478         for ac_hdr in pth.h
10479 do
10480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10482 echo "configure:10483: checking for $ac_hdr" >&5
10483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489 #include <$ac_hdr>
10490 EOF
10491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10492 { (eval echo configure:10493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10494 if test -z "$ac_err"; then
10495   rm -rf conftest*
10496   eval "ac_cv_header_$ac_safe=yes"
10497 else
10498   echo "$ac_err" >&5
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_header_$ac_safe=no"
10503 fi
10504 rm -f conftest*
10505 fi
10506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10507   echo "$ac_t""yes" 1>&6
10508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10509   cat >> confdefs.h <<EOF
10510 #define $ac_tr_hdr 1
10511 EOF
10512  
10513 else
10514   echo "$ac_t""no" 1>&6
10515 fi
10516 done
10517
10518
10519         if test $ac_cv_header_pth_h = yes ; then
10520                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10521 echo "configure:10522: checking for pth_version in -lpth" >&5
10522 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
10523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10524   echo $ac_n "(cached) $ac_c" 1>&6
10525 else
10526   ac_save_LIBS="$LIBS"
10527 LIBS="-lpth  $LIBS"
10528 cat > conftest.$ac_ext <<EOF
10529 #line 10530 "configure"
10530 #include "confdefs.h"
10531 /* Override any gcc2 internal prototype to avoid an error.  */
10532 /* We use char because int might match the return type of a gcc2
10533     builtin and then its argument prototype would still apply.  */
10534 char pth_version();
10535
10536 int main() {
10537 pth_version()
10538 ; return 0; }
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=yes"
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -rf conftest*
10547   eval "ac_cv_lib_$ac_lib_var=no"
10548 fi
10549 rm -f conftest*
10550 LIBS="$ac_save_LIBS"
10551
10552 fi
10553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10554   echo "$ac_t""yes" 1>&6
10555   have_pth=yes
10556 else
10557   echo "$ac_t""no" 1>&6
10558 have_pth=no
10559 fi
10560
10561
10562                 if test $have_pth = yes ; then
10563                         cat >> confdefs.h <<\EOF
10564 #define HAVE_GNU_PTH 1
10565 EOF
10566
10567                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10568                         ol_link_threads=pth
10569
10570                         if test $ol_with_yielding_select = auto ; then
10571                                 ol_with_yielding_select=yes
10572                         fi
10573                 fi
10574         fi
10575 fi
10576
10577 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10578         -o $ol_with_threads = lwp ; then
10579
10580                 for ac_hdr in thread.h synch.h
10581 do
10582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10584 echo "configure:10585: checking for $ac_hdr" >&5
10585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10586   echo $ac_n "(cached) $ac_c" 1>&6
10587 else
10588   cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591 #include <$ac_hdr>
10592 EOF
10593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10594 { (eval echo configure:10595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10596 if test -z "$ac_err"; then
10597   rm -rf conftest*
10598   eval "ac_cv_header_$ac_safe=yes"
10599 else
10600   echo "$ac_err" >&5
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -rf conftest*
10604   eval "ac_cv_header_$ac_safe=no"
10605 fi
10606 rm -f conftest*
10607 fi
10608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10609   echo "$ac_t""yes" 1>&6
10610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10611   cat >> confdefs.h <<EOF
10612 #define $ac_tr_hdr 1
10613 EOF
10614  
10615 else
10616   echo "$ac_t""no" 1>&6
10617 fi
10618 done
10619
10620         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10621                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10622 echo "configure:10623: checking for thr_create in -lthread" >&5
10623 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
10624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10625   echo $ac_n "(cached) $ac_c" 1>&6
10626 else
10627   ac_save_LIBS="$LIBS"
10628 LIBS="-lthread  $LIBS"
10629 cat > conftest.$ac_ext <<EOF
10630 #line 10631 "configure"
10631 #include "confdefs.h"
10632 /* Override any gcc2 internal prototype to avoid an error.  */
10633 /* We use char because int might match the return type of a gcc2
10634     builtin and then its argument prototype would still apply.  */
10635 char thr_create();
10636
10637 int main() {
10638 thr_create()
10639 ; return 0; }
10640 EOF
10641 if { (eval echo configure:10642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10642   rm -rf conftest*
10643   eval "ac_cv_lib_$ac_lib_var=yes"
10644 else
10645   echo "configure: failed program was:" >&5
10646   cat conftest.$ac_ext >&5
10647   rm -rf conftest*
10648   eval "ac_cv_lib_$ac_lib_var=no"
10649 fi
10650 rm -f conftest*
10651 LIBS="$ac_save_LIBS"
10652
10653 fi
10654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10655   echo "$ac_t""yes" 1>&6
10656   have_thr=yes
10657 else
10658   echo "$ac_t""no" 1>&6
10659 have_thr=no
10660 fi
10661
10662
10663                 if test $have_thr = yes ; then
10664                         cat >> confdefs.h <<\EOF
10665 #define HAVE_THR 1
10666 EOF
10667
10668                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10669                         ol_link_threads=thr
10670
10671                         if test $ol_with_yielding_select = auto ; then
10672                                 ol_with_yielding_select=yes
10673                         fi
10674
10675                                                 for ac_func in \
10676                                 thr_setconcurrency \
10677                                 thr_getconcurrency \
10678                         
10679 do
10680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10681 echo "configure:10682: checking for $ac_func" >&5
10682 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 /* System header to define __stub macros and hopefully few prototypes,
10689     which can conflict with char $ac_func(); below.  */
10690 #include <assert.h>
10691 /* Override any gcc2 internal prototype to avoid an error.  */
10692 /* We use char because int might match the return type of a gcc2
10693     builtin and then its argument prototype would still apply.  */
10694 char $ac_func();
10695 char (*f)();
10696
10697 int main() {
10698
10699 /* The GNU C library defines this for functions which it implements
10700     to always fail with ENOSYS.  Some functions are actually named
10701     something starting with __ and the normal name is an alias.  */
10702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10703 choke me
10704 #else
10705 f = $ac_func;
10706 #endif
10707
10708 ; return 0; }
10709 EOF
10710 if { (eval echo configure:10711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10711   rm -rf conftest*
10712   eval "ac_cv_func_$ac_func=yes"
10713 else
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -rf conftest*
10717   eval "ac_cv_func_$ac_func=no"
10718 fi
10719 rm -f conftest*
10720 fi
10721
10722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10723   echo "$ac_t""yes" 1>&6
10724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10725   cat >> confdefs.h <<EOF
10726 #define $ac_tr_func 1
10727 EOF
10728  
10729 else
10730   echo "$ac_t""no" 1>&6
10731 fi
10732 done
10733
10734                 fi
10735         fi
10736
10737                 for ac_hdr in lwp/lwp.h
10738 do
10739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10741 echo "configure:10742: checking for $ac_hdr" >&5
10742 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10743   echo $ac_n "(cached) $ac_c" 1>&6
10744 else
10745   cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748 #include <$ac_hdr>
10749 EOF
10750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10751 { (eval echo configure:10752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10753 if test -z "$ac_err"; then
10754   rm -rf conftest*
10755   eval "ac_cv_header_$ac_safe=yes"
10756 else
10757   echo "$ac_err" >&5
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_header_$ac_safe=no"
10762 fi
10763 rm -f conftest*
10764 fi
10765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10768   cat >> confdefs.h <<EOF
10769 #define $ac_tr_hdr 1
10770 EOF
10771  
10772 else
10773   echo "$ac_t""no" 1>&6
10774 fi
10775 done
10776
10777         if test $ac_cv_header_lwp_lwp_h = yes ; then
10778                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10779 echo "configure:10780: checking for lwp_create in -llwp" >&5
10780 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
10781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10782   echo $ac_n "(cached) $ac_c" 1>&6
10783 else
10784   ac_save_LIBS="$LIBS"
10785 LIBS="-llwp  $LIBS"
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789 /* Override any gcc2 internal prototype to avoid an error.  */
10790 /* We use char because int might match the return type of a gcc2
10791     builtin and then its argument prototype would still apply.  */
10792 char lwp_create();
10793
10794 int main() {
10795 lwp_create()
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   eval "ac_cv_lib_$ac_lib_var=yes"
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   eval "ac_cv_lib_$ac_lib_var=no"
10806 fi
10807 rm -f conftest*
10808 LIBS="$ac_save_LIBS"
10809
10810 fi
10811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813   have_lwp=yes
10814 else
10815   echo "$ac_t""no" 1>&6
10816 have_lwp=no
10817 fi
10818
10819
10820                 if test $have_lwp = yes ; then
10821                         cat >> confdefs.h <<\EOF
10822 #define HAVE_LWP 1
10823 EOF
10824
10825                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10826                         ol_link_threads=lwp
10827
10828                         if test $ol_with_yielding_select = auto ; then
10829                                 ol_with_yielding_select=no
10830                         fi
10831                 fi
10832         fi
10833 fi
10834
10835 if test $ol_with_yielding_select = yes ; then
10836         cat >> confdefs.h <<\EOF
10837 #define HAVE_YIELDING_SELECT 1
10838 EOF
10839
10840 fi
10841
10842 if test $ol_with_threads = manual ; then
10843                 ol_link_threads=yes
10844
10845         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10846
10847         for ac_hdr in pthread.h sched.h
10848 do
10849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10851 echo "configure:10852: checking for $ac_hdr" >&5
10852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10853   echo $ac_n "(cached) $ac_c" 1>&6
10854 else
10855   cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 #include <$ac_hdr>
10859 EOF
10860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10861 { (eval echo configure:10862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10863 if test -z "$ac_err"; then
10864   rm -rf conftest*
10865   eval "ac_cv_header_$ac_safe=yes"
10866 else
10867   echo "$ac_err" >&5
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_header_$ac_safe=no"
10872 fi
10873 rm -f conftest*
10874 fi
10875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10876   echo "$ac_t""yes" 1>&6
10877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10878   cat >> confdefs.h <<EOF
10879 #define $ac_tr_hdr 1
10880 EOF
10881  
10882 else
10883   echo "$ac_t""no" 1>&6
10884 fi
10885 done
10886
10887         for ac_func in sched_yield pthread_yield
10888 do
10889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10890 echo "configure:10891: checking for $ac_func" >&5
10891 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   cat > conftest.$ac_ext <<EOF
10895 #line 10896 "configure"
10896 #include "confdefs.h"
10897 /* System header to define __stub macros and hopefully few prototypes,
10898     which can conflict with char $ac_func(); below.  */
10899 #include <assert.h>
10900 /* Override any gcc2 internal prototype to avoid an error.  */
10901 /* We use char because int might match the return type of a gcc2
10902     builtin and then its argument prototype would still apply.  */
10903 char $ac_func();
10904 char (*f)();
10905
10906 int main() {
10907
10908 /* The GNU C library defines this for functions which it implements
10909     to always fail with ENOSYS.  Some functions are actually named
10910     something starting with __ and the normal name is an alias.  */
10911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10912 choke me
10913 #else
10914 f = $ac_func;
10915 #endif
10916
10917 ; return 0; }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10920   rm -rf conftest*
10921   eval "ac_cv_func_$ac_func=yes"
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_func_$ac_func=no"
10927 fi
10928 rm -f conftest*
10929 fi
10930
10931 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10932   echo "$ac_t""yes" 1>&6
10933     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10934   cat >> confdefs.h <<EOF
10935 #define $ac_tr_func 1
10936 EOF
10937  
10938 else
10939   echo "$ac_t""no" 1>&6
10940 fi
10941 done
10942
10943         
10944         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10945 echo "configure:10946: checking for LinuxThreads pthread.h" >&5
10946 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10947   echo $ac_n "(cached) $ac_c" 1>&6
10948 else
10949   cat > conftest.$ac_ext <<EOF
10950 #line 10951 "configure"
10951 #include "confdefs.h"
10952 #include <pthread.h>
10953 EOF
10954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10955   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10956   rm -rf conftest*
10957   ol_cv_header_linux_threads=yes
10958 else
10959   rm -rf conftest*
10960   ol_cv_header_linux_threads=no
10961 fi
10962 rm -f conftest*
10963
10964                 
10965 fi
10966
10967 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10968         if test $ol_cv_header_linux_threads = yes; then
10969                 cat >> confdefs.h <<\EOF
10970 #define HAVE_LINUX_THREADS 1
10971 EOF
10972
10973         fi
10974
10975
10976         for ac_hdr in mach/cthreads.h
10977 do
10978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10980 echo "configure:10981: checking for $ac_hdr" >&5
10981 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10982   echo $ac_n "(cached) $ac_c" 1>&6
10983 else
10984   cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 #include <$ac_hdr>
10988 EOF
10989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10990 { (eval echo configure:10991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10992 if test -z "$ac_err"; then
10993   rm -rf conftest*
10994   eval "ac_cv_header_$ac_safe=yes"
10995 else
10996   echo "$ac_err" >&5
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=no"
11001 fi
11002 rm -f conftest*
11003 fi
11004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11005   echo "$ac_t""yes" 1>&6
11006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11007   cat >> confdefs.h <<EOF
11008 #define $ac_tr_hdr 1
11009 EOF
11010  
11011 else
11012   echo "$ac_t""no" 1>&6
11013 fi
11014 done
11015
11016         for ac_hdr in lwp/lwp.h
11017 do
11018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11020 echo "configure:11021: checking for $ac_hdr" >&5
11021 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 #include <$ac_hdr>
11028 EOF
11029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11030 { (eval echo configure:11031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11032 if test -z "$ac_err"; then
11033   rm -rf conftest*
11034   eval "ac_cv_header_$ac_safe=yes"
11035 else
11036   echo "$ac_err" >&5
11037   echo "configure: failed program was:" >&5
11038   cat conftest.$ac_ext >&5
11039   rm -rf conftest*
11040   eval "ac_cv_header_$ac_safe=no"
11041 fi
11042 rm -f conftest*
11043 fi
11044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11045   echo "$ac_t""yes" 1>&6
11046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11047   cat >> confdefs.h <<EOF
11048 #define $ac_tr_hdr 1
11049 EOF
11050  
11051 else
11052   echo "$ac_t""no" 1>&6
11053 fi
11054 done
11055
11056         for ac_hdr in thread.h synch.h
11057 do
11058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11060 echo "configure:11061: checking for $ac_hdr" >&5
11061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11062   echo $ac_n "(cached) $ac_c" 1>&6
11063 else
11064   cat > conftest.$ac_ext <<EOF
11065 #line 11066 "configure"
11066 #include "confdefs.h"
11067 #include <$ac_hdr>
11068 EOF
11069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11070 { (eval echo configure:11071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11072 if test -z "$ac_err"; then
11073   rm -rf conftest*
11074   eval "ac_cv_header_$ac_safe=yes"
11075 else
11076   echo "$ac_err" >&5
11077   echo "configure: failed program was:" >&5
11078   cat conftest.$ac_ext >&5
11079   rm -rf conftest*
11080   eval "ac_cv_header_$ac_safe=no"
11081 fi
11082 rm -f conftest*
11083 fi
11084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11085   echo "$ac_t""yes" 1>&6
11086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11087   cat >> confdefs.h <<EOF
11088 #define $ac_tr_hdr 1
11089 EOF
11090  
11091 else
11092   echo "$ac_t""no" 1>&6
11093 fi
11094 done
11095
11096 fi
11097
11098 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11099                         cat >> confdefs.h <<\EOF
11100 #define REENTRANT 1
11101 EOF
11102
11103         cat >> confdefs.h <<\EOF
11104 #define _REENTRANT 1
11105 EOF
11106
11107         cat >> confdefs.h <<\EOF
11108 #define THREAD_SAFE 1
11109 EOF
11110
11111         cat >> confdefs.h <<\EOF
11112 #define _THREAD_SAFE 1
11113 EOF
11114
11115         cat >> confdefs.h <<\EOF
11116 #define THREADSAFE 1
11117 EOF
11118
11119         cat >> confdefs.h <<\EOF
11120 #define _THREADSAFE 1
11121 EOF
11122
11123         cat >> confdefs.h <<\EOF
11124 #define _SGI_MP_SOURCE 1
11125 EOF
11126
11127
11128                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11129 echo "configure:11130: checking for thread specific errno" >&5
11130 if eval "test \"\${ol_cv_errno_thread_specific+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 #include <errno.h>
11138 int main() {
11139 errno = 0;
11140 ; return 0; }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11143   rm -rf conftest*
11144   ol_cv_errno_thread_specific=yes
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   ol_cv_errno_thread_specific=no
11150 fi
11151 rm -f conftest*
11152         
11153 fi
11154
11155 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11156
11157                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11158 echo "configure:11159: checking for thread specific h_errno" >&5
11159 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
11160   echo $ac_n "(cached) $ac_c" 1>&6
11161 else
11162   
11163                 cat > conftest.$ac_ext <<EOF
11164 #line 11165 "configure"
11165 #include "confdefs.h"
11166 #include <netdb.h>
11167 int main() {
11168 h_errno = 0;
11169 ; return 0; }
11170 EOF
11171 if { (eval echo configure:11172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11172   rm -rf conftest*
11173   ol_cv_h_errno_thread_specific=yes
11174 else
11175   echo "configure: failed program was:" >&5
11176   cat conftest.$ac_ext >&5
11177   rm -rf conftest*
11178   ol_cv_h_errno_thread_specific=no
11179 fi
11180 rm -f conftest*
11181         
11182 fi
11183
11184 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11185
11186         if test $ol_cv_errno_thread_specific != yes \
11187                 -o $ol_cv_h_errno_thread_specific != yes ; then
11188                 LIBS="$LTHREAD_LIBS $LIBS"
11189                 LTHREAD_LIBS=""
11190         fi
11191
11192 fi  
11193
11194 if test $ol_link_threads = no ; then
11195         if test $ol_with_threads = yes ; then
11196                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11197         fi
11198
11199         if test $ol_with_threads = auto ; then
11200                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11201                 ol_with_threads=no
11202         fi
11203
11204         cat >> confdefs.h <<\EOF
11205 #define NO_THREADS 1
11206 EOF
11207
11208         LTHREAD_LIBS=""
11209 fi
11210
11211 if test $ol_link_threads != no ; then
11212         cat >> confdefs.h <<\EOF
11213 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11214 EOF
11215
11216 fi
11217
11218
11219 ol_link_ldbm=no 
11220 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
11221         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
11222 echo "configure:11223: checking for DB2 library" >&5
11223 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
11224   echo $ac_n "(cached) $ac_c" 1>&6
11225 else
11226         ol_LIBS="$LIBS"
11227         echo $ac_n "checking for db_appexit in -ldb""... $ac_c" 1>&6
11228 echo "configure:11229: checking for db_appexit in -ldb" >&5
11229 ac_lib_var=`echo db'_'db_appexit | sed 'y%./+-:%__p__%'`
11230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11231   echo $ac_n "(cached) $ac_c" 1>&6
11232 else
11233   ac_save_LIBS="$LIBS"
11234 LIBS="-ldb  $LIBS"
11235 cat > conftest.$ac_ext <<EOF
11236 #line 11237 "configure"
11237 #include "confdefs.h"
11238 /* Override any gcc2 internal prototype to avoid an error.  */
11239 /* We use char because int might match the return type of a gcc2
11240     builtin and then its argument prototype would still apply.  */
11241 char db_appexit();
11242
11243 int main() {
11244 db_appexit()
11245 ; return 0; }
11246 EOF
11247 if { (eval echo configure:11248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11248   rm -rf conftest*
11249   eval "ac_cv_lib_$ac_lib_var=yes"
11250 else
11251   echo "configure: failed program was:" >&5
11252   cat conftest.$ac_ext >&5
11253   rm -rf conftest*
11254   eval "ac_cv_lib_$ac_lib_var=no"
11255 fi
11256 rm -f conftest*
11257 LIBS="$ac_save_LIBS"
11258
11259 fi
11260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11261   echo "$ac_t""yes" 1>&6
11262   ol_cv_lib_db2=-ldb
11263 else
11264   echo "$ac_t""no" 1>&6
11265 ol_cv_lib_db2=no
11266 fi
11267
11268         LIBS="$ol_LIBS"
11269
11270 fi
11271
11272 echo "$ac_t""$ol_cv_lib_db2" 1>&6
11273
11274 for ac_hdr in db.h
11275 do
11276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11278 echo "configure:11279: checking for $ac_hdr" >&5
11279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11280   echo $ac_n "(cached) $ac_c" 1>&6
11281 else
11282   cat > conftest.$ac_ext <<EOF
11283 #line 11284 "configure"
11284 #include "confdefs.h"
11285 #include <$ac_hdr>
11286 EOF
11287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11288 { (eval echo configure:11289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11290 if test -z "$ac_err"; then
11291   rm -rf conftest*
11292   eval "ac_cv_header_$ac_safe=yes"
11293 else
11294   echo "$ac_err" >&5
11295   echo "configure: failed program was:" >&5
11296   cat conftest.$ac_ext >&5
11297   rm -rf conftest*
11298   eval "ac_cv_header_$ac_safe=no"
11299 fi
11300 rm -f conftest*
11301 fi
11302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11303   echo "$ac_t""yes" 1>&6
11304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11305   cat >> confdefs.h <<EOF
11306 #define $ac_tr_hdr 1
11307 EOF
11308  
11309 else
11310   echo "$ac_t""no" 1>&6
11311 fi
11312 done
11313
11314 if test $ac_cv_header_db_h = yes ; then
11315         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
11316 echo "configure:11317: checking if db.h is DB2" >&5
11317 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   
11321                 cat > conftest.$ac_ext <<EOF
11322 #line 11323 "configure"
11323 #include "confdefs.h"
11324
11325 #                       include <db.h>
11326                         /* this check could be improved */
11327 #                       ifdef DB_VERSION_MAJOR
11328 #                               if DB_VERSION_MAJOR == 2
11329                                         __db_version_2;
11330 #                               endif
11331 #                       endif
11332                 
11333 EOF
11334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11335   egrep "__db_version_2" >/dev/null 2>&1; then
11336   rm -rf conftest*
11337   ol_cv_header_db2=yes
11338 else
11339   rm -rf conftest*
11340   ol_cv_header_db2=no
11341 fi
11342 rm -f conftest*
11343
11344 fi
11345
11346 echo "$ac_t""$ol_cv_header_db2" 1>&6
11347 else
11348         ol_cv_header_db2=no
11349 fi
11350
11351
11352  
11353  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
11354 echo "configure:11355: checking for Berkeley DB2" >&5
11355 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
11356   echo $ac_n "(cached) $ac_c" 1>&6
11357 else
11358   
11359         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
11360                 ol_cv_berkeley_db2=no
11361         else
11362                 ol_cv_berkeley_db2=yes
11363         fi
11364
11365 fi
11366
11367 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
11368  if test $ol_cv_berkeley_db2 = yes ; then
11369         cat >> confdefs.h <<\EOF
11370 #define HAVE_BERKELEY_DB2 1
11371 EOF
11372
11373  fi
11374
11375
11376         if test $ol_cv_berkeley_db2 = yes ; then
11377                 ol_link_ldbm=db2
11378                 ol_with_ldbm_api=db2
11379
11380                 if test $ol_with_ldbm_type = hash ; then
11381                         cat >> confdefs.h <<\EOF
11382 #define LDBM_USE_DBHASH 1
11383 EOF
11384
11385                 else
11386                         cat >> confdefs.h <<\EOF
11387 #define LDBM_USE_DBBTREE 1
11388 EOF
11389
11390                 fi
11391
11392                 echo $ac_n "checking for DB_THREAD support""... $ac_c" 1>&6
11393 echo "configure:11394: checking for DB_THREAD support" >&5
11394 if eval "test \"\${ol_cv_berkeley_db2_db_thread+set}\" = set"; then
11395   echo $ac_n "(cached) $ac_c" 1>&6
11396 else
11397   
11398         ol_LIBS="$LIBS"
11399         if test $ol_cv_lib_db2 != yes ; then
11400                 LIBS="$ol_cv_lib_db2"
11401         fi
11402
11403         if test "$cross_compiling" = yes; then
11404   ol_cv_berkeley_db2_db_thread=cross
11405 else
11406   cat > conftest.$ac_ext <<EOF
11407 #line 11408 "configure"
11408 #include "confdefs.h"
11409
11410 #include <db.h>
11411 #ifndef NULL
11412 #define NULL ((void *)0)
11413 #endif
11414 main()
11415 {
11416         int rc;
11417         DB_ENV env;
11418         u_int32_t flags = DB_CREATE | DB_THREAD;
11419
11420         memset( &env, '\0', sizeof(env) );
11421
11422         rc = db_appinit( NULL, NULL, &env, flags );
11423
11424         if( rc == 0 ) {
11425                 db_appexit( &env );
11426         }
11427
11428         return rc;
11429 }
11430 EOF
11431 if { (eval echo configure:11432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11432 then
11433   ol_cv_berkeley_db2_db_thread=yes
11434 else
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -fr conftest*
11438   ol_cv_berkeley_db2_db_thread=no
11439 fi
11440 rm -fr conftest*
11441 fi
11442
11443
11444         LIBS="$ol_LIBS"
11445
11446         if test $ol_cv_berkeley_db2_db_thread != no ; then
11447                 cat >> confdefs.h <<\EOF
11448 #define HAVE_BERKELEY_DB2_DB_THREAD 1
11449 EOF
11450
11451         fi
11452
11453 fi
11454
11455 echo "$ac_t""$ol_cv_berkeley_db2_db_thread" 1>&6
11456
11457                                                 if test $ol_cv_lib_db2 != yes ; then
11458                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
11459                 fi
11460         fi
11461 fi
11462
11463 ol_link_bdb2=no
11464 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
11465         if test $ol_cv_berkeley_db2_db_thread != no ; then
11466                 ol_link_bdb2=yes
11467         else
11468                 echo "configure: warning: Installed BerkeleyDB does not provide DB_THREAD support." 1>&2
11469         fi
11470 fi
11471
11472 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
11473         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
11474 echo "configure:11475: checking for Berkeley DB library" >&5
11475 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   
11479         for ac_hdr in db1/db.h
11480 do
11481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11483 echo "configure:11484: checking for $ac_hdr" >&5
11484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11485   echo $ac_n "(cached) $ac_c" 1>&6
11486 else
11487   cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <$ac_hdr>
11491 EOF
11492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11493 { (eval echo configure:11494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11495 if test -z "$ac_err"; then
11496   rm -rf conftest*
11497   eval "ac_cv_header_$ac_safe=yes"
11498 else
11499   echo "$ac_err" >&5
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   eval "ac_cv_header_$ac_safe=no"
11504 fi
11505 rm -f conftest*
11506 fi
11507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11508   echo "$ac_t""yes" 1>&6
11509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11510   cat >> confdefs.h <<EOF
11511 #define $ac_tr_hdr 1
11512 EOF
11513  
11514 else
11515   echo "$ac_t""no" 1>&6
11516 fi
11517 done
11518
11519         ol_LIBS="$LIBS"
11520         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
11521 echo "configure:11522: checking for dbopen" >&5
11522 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
11523   echo $ac_n "(cached) $ac_c" 1>&6
11524 else
11525   cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 /* System header to define __stub macros and hopefully few prototypes,
11529     which can conflict with char dbopen(); below.  */
11530 #include <assert.h>
11531 /* Override any gcc2 internal prototype to avoid an error.  */
11532 /* We use char because int might match the return type of a gcc2
11533     builtin and then its argument prototype would still apply.  */
11534 char dbopen();
11535 char (*f)();
11536
11537 int main() {
11538
11539 /* The GNU C library defines this for functions which it implements
11540     to always fail with ENOSYS.  Some functions are actually named
11541     something starting with __ and the normal name is an alias.  */
11542 #if defined (__stub_dbopen) || defined (__stub___dbopen)
11543 choke me
11544 #else
11545 f = dbopen;
11546 #endif
11547
11548 ; return 0; }
11549 EOF
11550 if { (eval echo configure:11551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11551   rm -rf conftest*
11552   eval "ac_cv_func_dbopen=yes"
11553 else
11554   echo "configure: failed program was:" >&5
11555   cat conftest.$ac_ext >&5
11556   rm -rf conftest*
11557   eval "ac_cv_func_dbopen=no"
11558 fi
11559 rm -f conftest*
11560 fi
11561
11562 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
11563   echo "$ac_t""yes" 1>&6
11564   ol_cv_lib_db=yes
11565 else
11566   echo "$ac_t""no" 1>&6
11567
11568                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
11569 echo "configure:11570: checking for dbopen in -ldb1" >&5
11570 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
11571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11572   echo $ac_n "(cached) $ac_c" 1>&6
11573 else
11574   ac_save_LIBS="$LIBS"
11575 LIBS="-ldb1  $LIBS"
11576 cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579 /* Override any gcc2 internal prototype to avoid an error.  */
11580 /* We use char because int might match the return type of a gcc2
11581     builtin and then its argument prototype would still apply.  */
11582 char dbopen();
11583
11584 int main() {
11585 dbopen()
11586 ; return 0; }
11587 EOF
11588 if { (eval echo configure:11589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11589   rm -rf conftest*
11590   eval "ac_cv_lib_$ac_lib_var=yes"
11591 else
11592   echo "configure: failed program was:" >&5
11593   cat conftest.$ac_ext >&5
11594   rm -rf conftest*
11595   eval "ac_cv_lib_$ac_lib_var=no"
11596 fi
11597 rm -f conftest*
11598 LIBS="$ac_save_LIBS"
11599
11600 fi
11601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11602   echo "$ac_t""yes" 1>&6
11603   ol_cv_lib_db=-ldb1
11604 else
11605   echo "$ac_t""no" 1>&6
11606
11607                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
11608 echo "configure:11609: checking for dbopen in -ldb" >&5
11609 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
11610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11611   echo $ac_n "(cached) $ac_c" 1>&6
11612 else
11613   ac_save_LIBS="$LIBS"
11614 LIBS="-ldb  $LIBS"
11615 cat > conftest.$ac_ext <<EOF
11616 #line 11617 "configure"
11617 #include "confdefs.h"
11618 /* Override any gcc2 internal prototype to avoid an error.  */
11619 /* We use char because int might match the return type of a gcc2
11620     builtin and then its argument prototype would still apply.  */
11621 char dbopen();
11622
11623 int main() {
11624 dbopen()
11625 ; return 0; }
11626 EOF
11627 if { (eval echo configure:11628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11628   rm -rf conftest*
11629   eval "ac_cv_lib_$ac_lib_var=yes"
11630 else
11631   echo "configure: failed program was:" >&5
11632   cat conftest.$ac_ext >&5
11633   rm -rf conftest*
11634   eval "ac_cv_lib_$ac_lib_var=no"
11635 fi
11636 rm -f conftest*
11637 LIBS="$ac_save_LIBS"
11638
11639 fi
11640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11641   echo "$ac_t""yes" 1>&6
11642   ol_cv_lib_db=-ldb
11643 else
11644   echo "$ac_t""no" 1>&6
11645 ol_cv_lib_db=no
11646 fi
11647
11648                 
11649 fi
11650
11651         
11652 fi
11653
11654         LIBS="$ol_LIBS"
11655
11656 fi
11657
11658 echo "$ac_t""$ol_cv_lib_db" 1>&6
11659
11660
11661 for ac_hdr in db_185.h
11662 do
11663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11665 echo "configure:11666: checking for $ac_hdr" >&5
11666 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11667   echo $ac_n "(cached) $ac_c" 1>&6
11668 else
11669   cat > conftest.$ac_ext <<EOF
11670 #line 11671 "configure"
11671 #include "confdefs.h"
11672 #include <$ac_hdr>
11673 EOF
11674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11675 { (eval echo configure:11676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11677 if test -z "$ac_err"; then
11678   rm -rf conftest*
11679   eval "ac_cv_header_$ac_safe=yes"
11680 else
11681   echo "$ac_err" >&5
11682   echo "configure: failed program was:" >&5
11683   cat conftest.$ac_ext >&5
11684   rm -rf conftest*
11685   eval "ac_cv_header_$ac_safe=no"
11686 fi
11687 rm -f conftest*
11688 fi
11689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11690   echo "$ac_t""yes" 1>&6
11691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11692   cat >> confdefs.h <<EOF
11693 #define $ac_tr_hdr 1
11694 EOF
11695  
11696 else
11697   echo "$ac_t""no" 1>&6
11698 fi
11699 done
11700
11701 if test "$ol_cv_header_db2" = yes ; then
11702         
11703         ol_cv_header_db=$ac_cv_header_db_185_h
11704 else
11705         ol_cv_header_db=$ac_cv_header_db_h
11706 fi
11707
11708
11709  
11710  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
11711 echo "configure:11712: checking for Berkeley DB" >&5
11712 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
11713   echo $ac_n "(cached) $ac_c" 1>&6
11714 else
11715   
11716         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
11717                 ol_cv_berkeley_db=no
11718         else
11719                 ol_cv_berkeley_db=yes
11720         fi
11721
11722 fi
11723
11724 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
11725  if test $ol_cv_berkeley_db = yes ; then
11726         cat >> confdefs.h <<\EOF
11727 #define HAVE_BERKELEY_DB 1
11728 EOF
11729
11730  fi
11731
11732
11733         if test $ol_cv_berkeley_db = yes ; then
11734                 ol_link_ldbm=db
11735                 ol_with_ldbm_api=db
11736
11737                 if test $ol_with_ldbm_type = hash ; then
11738                         cat >> confdefs.h <<\EOF
11739 #define LDBM_USE_DBHASH 1
11740 EOF
11741
11742                 else
11743                         cat >> confdefs.h <<\EOF
11744 #define LDBM_USE_DBBTREE 1
11745 EOF
11746
11747                 fi
11748
11749                                                 if test $ol_cv_lib_db != yes ; then
11750                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
11751                 fi
11752         fi
11753 fi
11754
11755 if test $ol_with_ldbm_api = manual ; then
11756                 ol_link_ldbm=yes
11757
11758         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
11759
11760         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
11761 do
11762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11764 echo "configure:11765: checking for $ac_hdr" >&5
11765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11766   echo $ac_n "(cached) $ac_c" 1>&6
11767 else
11768   cat > conftest.$ac_ext <<EOF
11769 #line 11770 "configure"
11770 #include "confdefs.h"
11771 #include <$ac_hdr>
11772 EOF
11773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11774 { (eval echo configure:11775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11776 if test -z "$ac_err"; then
11777   rm -rf conftest*
11778   eval "ac_cv_header_$ac_safe=yes"
11779 else
11780   echo "$ac_err" >&5
11781   echo "configure: failed program was:" >&5
11782   cat conftest.$ac_ext >&5
11783   rm -rf conftest*
11784   eval "ac_cv_header_$ac_safe=no"
11785 fi
11786 rm -f conftest*
11787 fi
11788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11789   echo "$ac_t""yes" 1>&6
11790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11791   cat >> confdefs.h <<EOF
11792 #define $ac_tr_hdr 1
11793 EOF
11794  
11795 else
11796   echo "$ac_t""no" 1>&6
11797 fi
11798 done
11799
11800 fi
11801
11802 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
11803         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
11804         ol_with_ldbm_api=none
11805 fi
11806
11807 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
11808         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
11809 echo "configure:11810: checking for MDBM library" >&5
11810 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
11811   echo $ac_n "(cached) $ac_c" 1>&6
11812 else
11813         ol_LIBS="$LIBS"
11814         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
11815 echo "configure:11816: checking for mdbm_set_chain" >&5
11816 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
11817   echo $ac_n "(cached) $ac_c" 1>&6
11818 else
11819   cat > conftest.$ac_ext <<EOF
11820 #line 11821 "configure"
11821 #include "confdefs.h"
11822 /* System header to define __stub macros and hopefully few prototypes,
11823     which can conflict with char mdbm_set_chain(); below.  */
11824 #include <assert.h>
11825 /* Override any gcc2 internal prototype to avoid an error.  */
11826 /* We use char because int might match the return type of a gcc2
11827     builtin and then its argument prototype would still apply.  */
11828 char mdbm_set_chain();
11829 char (*f)();
11830
11831 int main() {
11832
11833 /* The GNU C library defines this for functions which it implements
11834     to always fail with ENOSYS.  Some functions are actually named
11835     something starting with __ and the normal name is an alias.  */
11836 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
11837 choke me
11838 #else
11839 f = mdbm_set_chain;
11840 #endif
11841
11842 ; return 0; }
11843 EOF
11844 if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11845   rm -rf conftest*
11846   eval "ac_cv_func_mdbm_set_chain=yes"
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   eval "ac_cv_func_mdbm_set_chain=no"
11852 fi
11853 rm -f conftest*
11854 fi
11855
11856 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
11857   echo "$ac_t""yes" 1>&6
11858   ol_cv_lib_mdbm=yes
11859 else
11860   echo "$ac_t""no" 1>&6
11861
11862                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
11863 echo "configure:11864: checking for mdbm_set_chain in -lmdbm" >&5
11864 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
11865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11866   echo $ac_n "(cached) $ac_c" 1>&6
11867 else
11868   ac_save_LIBS="$LIBS"
11869 LIBS="-lmdbm  $LIBS"
11870 cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 /* Override any gcc2 internal prototype to avoid an error.  */
11874 /* We use char because int might match the return type of a gcc2
11875     builtin and then its argument prototype would still apply.  */
11876 char mdbm_set_chain();
11877
11878 int main() {
11879 mdbm_set_chain()
11880 ; return 0; }
11881 EOF
11882 if { (eval echo configure:11883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11883   rm -rf conftest*
11884   eval "ac_cv_lib_$ac_lib_var=yes"
11885 else
11886   echo "configure: failed program was:" >&5
11887   cat conftest.$ac_ext >&5
11888   rm -rf conftest*
11889   eval "ac_cv_lib_$ac_lib_var=no"
11890 fi
11891 rm -f conftest*
11892 LIBS="$ac_save_LIBS"
11893
11894 fi
11895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11896   echo "$ac_t""yes" 1>&6
11897   ol_cv_lib_mdbm=-lmdbm
11898 else
11899   echo "$ac_t""no" 1>&6
11900 ol_cv_lib_mdbm=no
11901 fi
11902
11903         
11904 fi
11905
11906         LIBS="$ol_LIBS"
11907
11908 fi
11909
11910 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11911
11912
11913  for ac_hdr in mdbm.h
11914 do
11915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11917 echo "configure:11918: checking for $ac_hdr" >&5
11918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11919   echo $ac_n "(cached) $ac_c" 1>&6
11920 else
11921   cat > conftest.$ac_ext <<EOF
11922 #line 11923 "configure"
11923 #include "confdefs.h"
11924 #include <$ac_hdr>
11925 EOF
11926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11927 { (eval echo configure:11928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11929 if test -z "$ac_err"; then
11930   rm -rf conftest*
11931   eval "ac_cv_header_$ac_safe=yes"
11932 else
11933   echo "$ac_err" >&5
11934   echo "configure: failed program was:" >&5
11935   cat conftest.$ac_ext >&5
11936   rm -rf conftest*
11937   eval "ac_cv_header_$ac_safe=no"
11938 fi
11939 rm -f conftest*
11940 fi
11941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11942   echo "$ac_t""yes" 1>&6
11943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11944   cat >> confdefs.h <<EOF
11945 #define $ac_tr_hdr 1
11946 EOF
11947  
11948 else
11949   echo "$ac_t""no" 1>&6
11950 fi
11951 done
11952
11953  echo $ac_n "checking for db""... $ac_c" 1>&6
11954 echo "configure:11955: checking for db" >&5
11955 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   
11959         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11960                 ol_cv_mdbm=no
11961         else
11962                 ol_cv_mdbm=yes
11963         fi
11964
11965 fi
11966
11967 echo "$ac_t""$ol_cv_mdbm" 1>&6
11968  if test $ol_cv_mdbm = yes ; then
11969         cat >> confdefs.h <<\EOF
11970 #define HAVE_MDBM 1
11971 EOF
11972
11973  fi
11974
11975
11976         if test $ol_cv_mdbm = yes ; then
11977                 ol_link_ldbm=mdbm
11978                 ol_with_ldbm_api=mdbm
11979                 if test $ol_cv_lib_mdbm != yes ; then
11980                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11981                 fi
11982         fi
11983 fi
11984
11985 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11986         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11987 echo "configure:11988: checking for GDBM library" >&5
11988 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11989   echo $ac_n "(cached) $ac_c" 1>&6
11990 else
11991         ol_LIBS="$LIBS"
11992         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11993 echo "configure:11994: checking for gdbm_open" >&5
11994 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11995   echo $ac_n "(cached) $ac_c" 1>&6
11996 else
11997   cat > conftest.$ac_ext <<EOF
11998 #line 11999 "configure"
11999 #include "confdefs.h"
12000 /* System header to define __stub macros and hopefully few prototypes,
12001     which can conflict with char gdbm_open(); below.  */
12002 #include <assert.h>
12003 /* Override any gcc2 internal prototype to avoid an error.  */
12004 /* We use char because int might match the return type of a gcc2
12005     builtin and then its argument prototype would still apply.  */
12006 char gdbm_open();
12007 char (*f)();
12008
12009 int main() {
12010
12011 /* The GNU C library defines this for functions which it implements
12012     to always fail with ENOSYS.  Some functions are actually named
12013     something starting with __ and the normal name is an alias.  */
12014 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12015 choke me
12016 #else
12017 f = gdbm_open;
12018 #endif
12019
12020 ; return 0; }
12021 EOF
12022 if { (eval echo configure:12023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12023   rm -rf conftest*
12024   eval "ac_cv_func_gdbm_open=yes"
12025 else
12026   echo "configure: failed program was:" >&5
12027   cat conftest.$ac_ext >&5
12028   rm -rf conftest*
12029   eval "ac_cv_func_gdbm_open=no"
12030 fi
12031 rm -f conftest*
12032 fi
12033
12034 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12035   echo "$ac_t""yes" 1>&6
12036   ol_cv_lib_gdbm=yes
12037 else
12038   echo "$ac_t""no" 1>&6
12039
12040                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12041 echo "configure:12042: checking for gdbm_open in -lgdbm" >&5
12042 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
12043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12044   echo $ac_n "(cached) $ac_c" 1>&6
12045 else
12046   ac_save_LIBS="$LIBS"
12047 LIBS="-lgdbm  $LIBS"
12048 cat > conftest.$ac_ext <<EOF
12049 #line 12050 "configure"
12050 #include "confdefs.h"
12051 /* Override any gcc2 internal prototype to avoid an error.  */
12052 /* We use char because int might match the return type of a gcc2
12053     builtin and then its argument prototype would still apply.  */
12054 char gdbm_open();
12055
12056 int main() {
12057 gdbm_open()
12058 ; return 0; }
12059 EOF
12060 if { (eval echo configure:12061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12061   rm -rf conftest*
12062   eval "ac_cv_lib_$ac_lib_var=yes"
12063 else
12064   echo "configure: failed program was:" >&5
12065   cat conftest.$ac_ext >&5
12066   rm -rf conftest*
12067   eval "ac_cv_lib_$ac_lib_var=no"
12068 fi
12069 rm -f conftest*
12070 LIBS="$ac_save_LIBS"
12071
12072 fi
12073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12074   echo "$ac_t""yes" 1>&6
12075   ol_cv_lib_gdbm=-lgdbm
12076 else
12077   echo "$ac_t""no" 1>&6
12078 ol_cv_lib_gdbm=no
12079 fi
12080
12081         
12082 fi
12083
12084         LIBS="$ol_LIBS"
12085
12086 fi
12087
12088 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12089
12090
12091  for ac_hdr in gdbm.h
12092 do
12093 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12094 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12095 echo "configure:12096: checking for $ac_hdr" >&5
12096 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12097   echo $ac_n "(cached) $ac_c" 1>&6
12098 else
12099   cat > conftest.$ac_ext <<EOF
12100 #line 12101 "configure"
12101 #include "confdefs.h"
12102 #include <$ac_hdr>
12103 EOF
12104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12105 { (eval echo configure:12106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12107 if test -z "$ac_err"; then
12108   rm -rf conftest*
12109   eval "ac_cv_header_$ac_safe=yes"
12110 else
12111   echo "$ac_err" >&5
12112   echo "configure: failed program was:" >&5
12113   cat conftest.$ac_ext >&5
12114   rm -rf conftest*
12115   eval "ac_cv_header_$ac_safe=no"
12116 fi
12117 rm -f conftest*
12118 fi
12119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12120   echo "$ac_t""yes" 1>&6
12121     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12122   cat >> confdefs.h <<EOF
12123 #define $ac_tr_hdr 1
12124 EOF
12125  
12126 else
12127   echo "$ac_t""no" 1>&6
12128 fi
12129 done
12130
12131  echo $ac_n "checking for db""... $ac_c" 1>&6
12132 echo "configure:12133: checking for db" >&5
12133 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
12134   echo $ac_n "(cached) $ac_c" 1>&6
12135 else
12136   
12137         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12138                 ol_cv_gdbm=no
12139         else
12140                 ol_cv_gdbm=yes
12141         fi
12142
12143 fi
12144
12145 echo "$ac_t""$ol_cv_gdbm" 1>&6
12146  if test $ol_cv_gdbm = yes ; then
12147         cat >> confdefs.h <<\EOF
12148 #define HAVE_GDBM 1
12149 EOF
12150
12151  fi
12152
12153
12154         if test $ol_cv_gdbm = yes ; then
12155                 ol_link_ldbm=gdbm
12156                 ol_with_ldbm_api=gdbm
12157
12158                 if test $ol_cv_lib_gdbm != yes ; then
12159                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12160                 fi
12161         fi
12162 fi
12163
12164 if test $ol_with_ldbm_api = ndbm ; then
12165         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12166 echo "configure:12167: checking for NDBM library" >&5
12167 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
12168   echo $ac_n "(cached) $ac_c" 1>&6
12169 else
12170         ol_LIBS="$LIBS"
12171         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12172 echo "configure:12173: checking for dbm_open" >&5
12173 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
12174   echo $ac_n "(cached) $ac_c" 1>&6
12175 else
12176   cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179 /* System header to define __stub macros and hopefully few prototypes,
12180     which can conflict with char dbm_open(); below.  */
12181 #include <assert.h>
12182 /* Override any gcc2 internal prototype to avoid an error.  */
12183 /* We use char because int might match the return type of a gcc2
12184     builtin and then its argument prototype would still apply.  */
12185 char dbm_open();
12186 char (*f)();
12187
12188 int main() {
12189
12190 /* The GNU C library defines this for functions which it implements
12191     to always fail with ENOSYS.  Some functions are actually named
12192     something starting with __ and the normal name is an alias.  */
12193 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12194 choke me
12195 #else
12196 f = dbm_open;
12197 #endif
12198
12199 ; return 0; }
12200 EOF
12201 if { (eval echo configure:12202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12202   rm -rf conftest*
12203   eval "ac_cv_func_dbm_open=yes"
12204 else
12205   echo "configure: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   rm -rf conftest*
12208   eval "ac_cv_func_dbm_open=no"
12209 fi
12210 rm -f conftest*
12211 fi
12212
12213 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12214   echo "$ac_t""yes" 1>&6
12215   ol_cv_lib_ndbm=yes
12216 else
12217   echo "$ac_t""no" 1>&6
12218
12219                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12220 echo "configure:12221: checking for dbm_open in -lndbm" >&5
12221 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12223   echo $ac_n "(cached) $ac_c" 1>&6
12224 else
12225   ac_save_LIBS="$LIBS"
12226 LIBS="-lndbm  $LIBS"
12227 cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 /* Override any gcc2 internal prototype to avoid an error.  */
12231 /* We use char because int might match the return type of a gcc2
12232     builtin and then its argument prototype would still apply.  */
12233 char dbm_open();
12234
12235 int main() {
12236 dbm_open()
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   eval "ac_cv_lib_$ac_lib_var=yes"
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   eval "ac_cv_lib_$ac_lib_var=no"
12247 fi
12248 rm -f conftest*
12249 LIBS="$ac_save_LIBS"
12250
12251 fi
12252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12253   echo "$ac_t""yes" 1>&6
12254   ol_cv_lib_ndbm=-lndbm
12255 else
12256   echo "$ac_t""no" 1>&6
12257
12258                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12259 echo "configure:12260: checking for dbm_open in -ldbm" >&5
12260 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
12261 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12262   echo $ac_n "(cached) $ac_c" 1>&6
12263 else
12264   ac_save_LIBS="$LIBS"
12265 LIBS="-ldbm  $LIBS"
12266 cat > conftest.$ac_ext <<EOF
12267 #line 12268 "configure"
12268 #include "confdefs.h"
12269 /* Override any gcc2 internal prototype to avoid an error.  */
12270 /* We use char because int might match the return type of a gcc2
12271     builtin and then its argument prototype would still apply.  */
12272 char dbm_open();
12273
12274 int main() {
12275 dbm_open()
12276 ; return 0; }
12277 EOF
12278 if { (eval echo configure:12279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12279   rm -rf conftest*
12280   eval "ac_cv_lib_$ac_lib_var=yes"
12281 else
12282   echo "configure: failed program was:" >&5
12283   cat conftest.$ac_ext >&5
12284   rm -rf conftest*
12285   eval "ac_cv_lib_$ac_lib_var=no"
12286 fi
12287 rm -f conftest*
12288 LIBS="$ac_save_LIBS"
12289
12290 fi
12291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12292   echo "$ac_t""yes" 1>&6
12293   ol_cv_lib_ndbm=-ldbm
12294 else
12295   echo "$ac_t""no" 1>&6
12296 ol_cv_lib_ndbm=no
12297 fi
12298                 
12299 fi
12300
12301         
12302 fi
12303
12304         LIBS="$ol_LIBS"
12305
12306 fi
12307
12308 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12309
12310
12311  for ac_hdr in ndbm.h
12312 do
12313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12315 echo "configure:12316: checking for $ac_hdr" >&5
12316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12317   echo $ac_n "(cached) $ac_c" 1>&6
12318 else
12319   cat > conftest.$ac_ext <<EOF
12320 #line 12321 "configure"
12321 #include "confdefs.h"
12322 #include <$ac_hdr>
12323 EOF
12324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12325 { (eval echo configure:12326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12327 if test -z "$ac_err"; then
12328   rm -rf conftest*
12329   eval "ac_cv_header_$ac_safe=yes"
12330 else
12331   echo "$ac_err" >&5
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -rf conftest*
12335   eval "ac_cv_header_$ac_safe=no"
12336 fi
12337 rm -f conftest*
12338 fi
12339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12340   echo "$ac_t""yes" 1>&6
12341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12342   cat >> confdefs.h <<EOF
12343 #define $ac_tr_hdr 1
12344 EOF
12345  
12346 else
12347   echo "$ac_t""no" 1>&6
12348 fi
12349 done
12350
12351  echo $ac_n "checking for db""... $ac_c" 1>&6
12352 echo "configure:12353: checking for db" >&5
12353 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
12354   echo $ac_n "(cached) $ac_c" 1>&6
12355 else
12356   
12357         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12358                 ol_cv_ndbm=no
12359         else
12360                 ol_cv_ndbm=yes
12361         fi
12362
12363 fi
12364
12365 echo "$ac_t""$ol_cv_ndbm" 1>&6
12366  if test $ol_cv_ndbm = yes ; then
12367         cat >> confdefs.h <<\EOF
12368 #define HAVE_NDBM 1
12369 EOF
12370
12371  fi
12372
12373
12374         if test $ol_cv_ndbm = yes ; then
12375                 ol_link_ldbm=ndbm
12376                 ol_with_ldbm_api=ndbm
12377
12378                 if test $ol_cv_lib_ndbm != yes ; then
12379                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12380                 fi
12381         fi
12382 fi
12383
12384 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12385         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12386         if test $ol_enable_ldbm = yes ; then
12387                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12388         fi
12389
12390         echo "configure: warning: disabling LDBM" 1>&2
12391         ol_enable_ldbm=no
12392 fi
12393
12394 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12395         LINK_BINS_DYNAMIC="yes"
12396 else
12397         LINK_BINS_DYNAMIC="no"
12398 fi
12399
12400 if test $ol_enable_wrappers != no ; then
12401         for ac_hdr in tcpd.h
12402 do
12403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12405 echo "configure:12406: checking for $ac_hdr" >&5
12406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12407   echo $ac_n "(cached) $ac_c" 1>&6
12408 else
12409   cat > conftest.$ac_ext <<EOF
12410 #line 12411 "configure"
12411 #include "confdefs.h"
12412 #include <$ac_hdr>
12413 EOF
12414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12415 { (eval echo configure:12416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12417 if test -z "$ac_err"; then
12418   rm -rf conftest*
12419   eval "ac_cv_header_$ac_safe=yes"
12420 else
12421   echo "$ac_err" >&5
12422   echo "configure: failed program was:" >&5
12423   cat conftest.$ac_ext >&5
12424   rm -rf conftest*
12425   eval "ac_cv_header_$ac_safe=no"
12426 fi
12427 rm -f conftest*
12428 fi
12429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12430   echo "$ac_t""yes" 1>&6
12431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12432   cat >> confdefs.h <<EOF
12433 #define $ac_tr_hdr 1
12434 EOF
12435  
12436 else
12437   echo "$ac_t""no" 1>&6
12438 fi
12439 done
12440
12441
12442         if test $ac_cv_header_tcpd_h != yes ; then
12443                 have_wrappers=no
12444         else
12445                 cat > conftest.$ac_ext <<EOF
12446 #line 12447 "configure"
12447 #include "confdefs.h"
12448
12449 int allow_severity = 0;
12450 int deny_severity  = 0;
12451                 
12452 int main() {
12453 hosts_access()
12454 ; return 0; }
12455 EOF
12456 if { (eval echo configure:12457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12457   rm -rf conftest*
12458   have_wrappers=yes
12459 else
12460   echo "configure: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   rm -rf conftest*
12463   have_wrappers=no
12464 fi
12465 rm -f conftest*
12466         fi
12467
12468         if test $have_wrappers = yes ; then
12469                 cat >> confdefs.h <<\EOF
12470 #define HAVE_TCPD 1
12471 EOF
12472
12473                 WRAP_LIBS="-lwrap"
12474
12475                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12476 echo "configure:12477: checking for main in -lnsl" >&5
12477 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
12478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12479   echo $ac_n "(cached) $ac_c" 1>&6
12480 else
12481   ac_save_LIBS="$LIBS"
12482 LIBS="-lnsl  $LIBS"
12483 cat > conftest.$ac_ext <<EOF
12484 #line 12485 "configure"
12485 #include "confdefs.h"
12486
12487 int main() {
12488 main()
12489 ; return 0; }
12490 EOF
12491 if { (eval echo configure:12492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12492   rm -rf conftest*
12493   eval "ac_cv_lib_$ac_lib_var=yes"
12494 else
12495   echo "configure: failed program was:" >&5
12496   cat conftest.$ac_ext >&5
12497   rm -rf conftest*
12498   eval "ac_cv_lib_$ac_lib_var=no"
12499 fi
12500 rm -f conftest*
12501 LIBS="$ac_save_LIBS"
12502
12503 fi
12504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12505   echo "$ac_t""yes" 1>&6
12506     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12507     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12508   cat >> confdefs.h <<EOF
12509 #define $ac_tr_lib 1
12510 EOF
12511
12512   LIBS="-lnsl $LIBS"
12513
12514 else
12515   echo "$ac_t""no" 1>&6
12516 fi
12517
12518         else
12519                 echo "configure: warning: could not find -lwrap" 1>&2
12520                 if test $ol_enable_wrappers = yes ; then
12521                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12522                 fi
12523
12524                 echo "configure: warning: disabling wrappers support" 1>&2
12525                 ol_enable_wrappers=no
12526                 WRAP_LIBS=""
12527         fi
12528 fi
12529
12530 if test $ol_enable_syslog != no ; then
12531         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12532 echo "configure:12533: checking for openlog" >&5
12533 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
12534   echo $ac_n "(cached) $ac_c" 1>&6
12535 else
12536   cat > conftest.$ac_ext <<EOF
12537 #line 12538 "configure"
12538 #include "confdefs.h"
12539 /* System header to define __stub macros and hopefully few prototypes,
12540     which can conflict with char openlog(); below.  */
12541 #include <assert.h>
12542 /* Override any gcc2 internal prototype to avoid an error.  */
12543 /* We use char because int might match the return type of a gcc2
12544     builtin and then its argument prototype would still apply.  */
12545 char openlog();
12546 char (*f)();
12547
12548 int main() {
12549
12550 /* The GNU C library defines this for functions which it implements
12551     to always fail with ENOSYS.  Some functions are actually named
12552     something starting with __ and the normal name is an alias.  */
12553 #if defined (__stub_openlog) || defined (__stub___openlog)
12554 choke me
12555 #else
12556 f = openlog;
12557 #endif
12558
12559 ; return 0; }
12560 EOF
12561 if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12562   rm -rf conftest*
12563   eval "ac_cv_func_openlog=yes"
12564 else
12565   echo "configure: failed program was:" >&5
12566   cat conftest.$ac_ext >&5
12567   rm -rf conftest*
12568   eval "ac_cv_func_openlog=no"
12569 fi
12570 rm -f conftest*
12571 fi
12572
12573 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12574   echo "$ac_t""yes" 1>&6
12575   :
12576 else
12577   echo "$ac_t""no" 1>&6
12578 fi
12579
12580         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12581                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12582         fi
12583         ol_enable_syslog=$ac_cv_func_openlog
12584 fi
12585
12586 if test $ol_enable_dmalloc != no ; then
12587         for ac_hdr in dmalloc.h
12588 do
12589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12591 echo "configure:12592: checking for $ac_hdr" >&5
12592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12593   echo $ac_n "(cached) $ac_c" 1>&6
12594 else
12595   cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598 #include <$ac_hdr>
12599 EOF
12600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12601 { (eval echo configure:12602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12603 if test -z "$ac_err"; then
12604   rm -rf conftest*
12605   eval "ac_cv_header_$ac_safe=yes"
12606 else
12607   echo "$ac_err" >&5
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   eval "ac_cv_header_$ac_safe=no"
12612 fi
12613 rm -f conftest*
12614 fi
12615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12616   echo "$ac_t""yes" 1>&6
12617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12618   cat >> confdefs.h <<EOF
12619 #define $ac_tr_hdr 1
12620 EOF
12621  
12622 else
12623   echo "$ac_t""no" 1>&6
12624 fi
12625 done
12626
12627         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
12628 echo "configure:12629: checking for dmalloc_shutdown in -ldmalloc" >&5
12629 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
12630 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12631   echo $ac_n "(cached) $ac_c" 1>&6
12632 else
12633   ac_save_LIBS="$LIBS"
12634 LIBS="-ldmalloc  $LIBS"
12635 cat > conftest.$ac_ext <<EOF
12636 #line 12637 "configure"
12637 #include "confdefs.h"
12638 /* Override any gcc2 internal prototype to avoid an error.  */
12639 /* We use char because int might match the return type of a gcc2
12640     builtin and then its argument prototype would still apply.  */
12641 char dmalloc_shutdown();
12642
12643 int main() {
12644 dmalloc_shutdown()
12645 ; return 0; }
12646 EOF
12647 if { (eval echo configure:12648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12648   rm -rf conftest*
12649   eval "ac_cv_lib_$ac_lib_var=yes"
12650 else
12651   echo "configure: failed program was:" >&5
12652   cat conftest.$ac_ext >&5
12653   rm -rf conftest*
12654   eval "ac_cv_lib_$ac_lib_var=no"
12655 fi
12656 rm -f conftest*
12657 LIBS="$ac_save_LIBS"
12658
12659 fi
12660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12661   echo "$ac_t""yes" 1>&6
12662     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12663     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12664   cat >> confdefs.h <<EOF
12665 #define $ac_tr_lib 1
12666 EOF
12667
12668   LIBS="-ldmalloc $LIBS"
12669
12670 else
12671   echo "$ac_t""no" 1>&6
12672 fi
12673
12674 fi
12675
12676 if test $ol_enable_tcl != no ; then
12677         for ac_hdr in tcl.h
12678 do
12679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12681 echo "configure:12682: checking for $ac_hdr" >&5
12682 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12683   echo $ac_n "(cached) $ac_c" 1>&6
12684 else
12685   cat > conftest.$ac_ext <<EOF
12686 #line 12687 "configure"
12687 #include "confdefs.h"
12688 #include <$ac_hdr>
12689 EOF
12690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12691 { (eval echo configure:12692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12693 if test -z "$ac_err"; then
12694   rm -rf conftest*
12695   eval "ac_cv_header_$ac_safe=yes"
12696 else
12697   echo "$ac_err" >&5
12698   echo "configure: failed program was:" >&5
12699   cat conftest.$ac_ext >&5
12700   rm -rf conftest*
12701   eval "ac_cv_header_$ac_safe=no"
12702 fi
12703 rm -f conftest*
12704 fi
12705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12706   echo "$ac_t""yes" 1>&6
12707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12708   cat >> confdefs.h <<EOF
12709 #define $ac_tr_hdr 1
12710 EOF
12711  
12712 else
12713   echo "$ac_t""no" 1>&6
12714 fi
12715 done
12716
12717
12718         if test $ac_cv_header_tcl_h != yes ; then
12719                 have_tcl=no
12720         else
12721                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12722                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12723 echo "configure:12724: checking for main in -l$lib" >&5
12724 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
12725 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12726   echo $ac_n "(cached) $ac_c" 1>&6
12727 else
12728   ac_save_LIBS="$LIBS"
12729 LIBS="-l$lib  $LIBS"
12730 cat > conftest.$ac_ext <<EOF
12731 #line 12732 "configure"
12732 #include "confdefs.h"
12733
12734 int main() {
12735 main()
12736 ; return 0; }
12737 EOF
12738 if { (eval echo configure:12739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12739   rm -rf conftest*
12740   eval "ac_cv_lib_$ac_lib_var=yes"
12741 else
12742   echo "configure: failed program was:" >&5
12743   cat conftest.$ac_ext >&5
12744   rm -rf conftest*
12745   eval "ac_cv_lib_$ac_lib_var=no"
12746 fi
12747 rm -f conftest*
12748 LIBS="$ac_save_LIBS"
12749
12750 fi
12751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12752   echo "$ac_t""yes" 1>&6
12753   have_tcl=yes
12754                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12755                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12756                            else
12757                                MOD_TCL_LIB="-l${lib}"
12758                            fi;break
12759 else
12760   echo "$ac_t""no" 1>&6
12761 have_tcl=no
12762 fi
12763
12764                 done
12765         fi
12766
12767         if test $have_tcl != yes ; then
12768                 echo "configure: warning: could not find -ltcl" 1>&2
12769                 if test $ol_enable_tcl = yes ; then
12770                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
12771                 fi
12772
12773                 ol_enable_tcl=no
12774         fi
12775 fi
12776
12777 ol_link_termcap=no
12778 for ac_hdr in termcap.h ncurses.h
12779 do
12780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12782 echo "configure:12783: checking for $ac_hdr" >&5
12783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12784   echo $ac_n "(cached) $ac_c" 1>&6
12785 else
12786   cat > conftest.$ac_ext <<EOF
12787 #line 12788 "configure"
12788 #include "confdefs.h"
12789 #include <$ac_hdr>
12790 EOF
12791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12792 { (eval echo configure:12793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12794 if test -z "$ac_err"; then
12795   rm -rf conftest*
12796   eval "ac_cv_header_$ac_safe=yes"
12797 else
12798   echo "$ac_err" >&5
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -rf conftest*
12802   eval "ac_cv_header_$ac_safe=no"
12803 fi
12804 rm -f conftest*
12805 fi
12806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12807   echo "$ac_t""yes" 1>&6
12808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12809   cat >> confdefs.h <<EOF
12810 #define $ac_tr_hdr 1
12811 EOF
12812  
12813 else
12814   echo "$ac_t""no" 1>&6
12815 fi
12816 done
12817
12818
12819 if test $ol_link_termcap = no ; then
12820         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12821 echo "configure:12822: checking for tputs in -ltermcap" >&5
12822 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12824   echo $ac_n "(cached) $ac_c" 1>&6
12825 else
12826   ac_save_LIBS="$LIBS"
12827 LIBS="-ltermcap  $LIBS"
12828 cat > conftest.$ac_ext <<EOF
12829 #line 12830 "configure"
12830 #include "confdefs.h"
12831 /* Override any gcc2 internal prototype to avoid an error.  */
12832 /* We use char because int might match the return type of a gcc2
12833     builtin and then its argument prototype would still apply.  */
12834 char tputs();
12835
12836 int main() {
12837 tputs()
12838 ; return 0; }
12839 EOF
12840 if { (eval echo configure:12841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12841   rm -rf conftest*
12842   eval "ac_cv_lib_$ac_lib_var=yes"
12843 else
12844   echo "configure: failed program was:" >&5
12845   cat conftest.$ac_ext >&5
12846   rm -rf conftest*
12847   eval "ac_cv_lib_$ac_lib_var=no"
12848 fi
12849 rm -f conftest*
12850 LIBS="$ac_save_LIBS"
12851
12852 fi
12853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12854   echo "$ac_t""yes" 1>&6
12855   have_termcap=yes
12856 else
12857   echo "$ac_t""no" 1>&6
12858 have_termcap=no
12859 fi
12860
12861         if test $have_termcap = yes ; then
12862                 cat >> confdefs.h <<\EOF
12863 #define HAVE_TERMCAP 1
12864 EOF
12865
12866                 ol_link_termcap=yes
12867                 TERMCAP_LIBS=-ltermcap
12868         fi
12869 fi
12870
12871 if test $ol_link_termcap = no ; then
12872         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12873 echo "configure:12874: checking for initscr in -lncurses" >&5
12874 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12876   echo $ac_n "(cached) $ac_c" 1>&6
12877 else
12878   ac_save_LIBS="$LIBS"
12879 LIBS="-lncurses  $LIBS"
12880 cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 /* Override any gcc2 internal prototype to avoid an error.  */
12884 /* We use char because int might match the return type of a gcc2
12885     builtin and then its argument prototype would still apply.  */
12886 char initscr();
12887
12888 int main() {
12889 initscr()
12890 ; return 0; }
12891 EOF
12892 if { (eval echo configure:12893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12893   rm -rf conftest*
12894   eval "ac_cv_lib_$ac_lib_var=yes"
12895 else
12896   echo "configure: failed program was:" >&5
12897   cat conftest.$ac_ext >&5
12898   rm -rf conftest*
12899   eval "ac_cv_lib_$ac_lib_var=no"
12900 fi
12901 rm -f conftest*
12902 LIBS="$ac_save_LIBS"
12903
12904 fi
12905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12906   echo "$ac_t""yes" 1>&6
12907   have_ncurses=yes
12908 else
12909   echo "$ac_t""no" 1>&6
12910 have_ncurses=no
12911 fi
12912
12913         if test $have_ncurses = yes ; then
12914                 cat >> confdefs.h <<\EOF
12915 #define HAVE_NCURSES 1
12916 EOF
12917
12918                 ol_link_termcap=yes
12919                 TERMCAP_LIBS=-lncurses
12920         fi
12921 fi
12922
12923 if test $ol_link_termcap = no ; then
12924         cat >> confdefs.h <<\EOF
12925 #define NO_TERMCAP 1
12926 EOF
12927
12928         TERMCAP_LIBS=
12929 fi
12930
12931 ol_link_sasl=no
12932 if test $ol_with_cyrus_sasl != no ; then
12933         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12934 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12935 echo "configure:12936: checking for sasl.h" >&5
12936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12937   echo $ac_n "(cached) $ac_c" 1>&6
12938 else
12939   cat > conftest.$ac_ext <<EOF
12940 #line 12941 "configure"
12941 #include "confdefs.h"
12942 #include <sasl.h>
12943 EOF
12944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12945 { (eval echo configure:12946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12947 if test -z "$ac_err"; then
12948   rm -rf conftest*
12949   eval "ac_cv_header_$ac_safe=yes"
12950 else
12951   echo "$ac_err" >&5
12952   echo "configure: failed program was:" >&5
12953   cat conftest.$ac_ext >&5
12954   rm -rf conftest*
12955   eval "ac_cv_header_$ac_safe=no"
12956 fi
12957 rm -f conftest*
12958 fi
12959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12960   echo "$ac_t""yes" 1>&6
12961   :
12962 else
12963   echo "$ac_t""no" 1>&6
12964 fi
12965
12966
12967         if test $ac_cv_header_sasl_h = yes ; then
12968                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12969 echo "configure:12970: checking for sasl_client_init in -lsasl" >&5
12970 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12971 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12972   echo $ac_n "(cached) $ac_c" 1>&6
12973 else
12974   ac_save_LIBS="$LIBS"
12975 LIBS="-lsasl  $LIBS"
12976 cat > conftest.$ac_ext <<EOF
12977 #line 12978 "configure"
12978 #include "confdefs.h"
12979 /* Override any gcc2 internal prototype to avoid an error.  */
12980 /* We use char because int might match the return type of a gcc2
12981     builtin and then its argument prototype would still apply.  */
12982 char sasl_client_init();
12983
12984 int main() {
12985 sasl_client_init()
12986 ; return 0; }
12987 EOF
12988 if { (eval echo configure:12989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12989   rm -rf conftest*
12990   eval "ac_cv_lib_$ac_lib_var=yes"
12991 else
12992   echo "configure: failed program was:" >&5
12993   cat conftest.$ac_ext >&5
12994   rm -rf conftest*
12995   eval "ac_cv_lib_$ac_lib_var=no"
12996 fi
12997 rm -f conftest*
12998 LIBS="$ac_save_LIBS"
12999
13000 fi
13001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13002   echo "$ac_t""yes" 1>&6
13003   have_cyrus_sasl=yes
13004 else
13005   echo "$ac_t""no" 1>&6
13006 have_cyrus_sasl=no
13007 fi
13008
13009
13010                 if test $have_cyrus_sasl != no ; then
13011                         SASL_LIBS="-lsasl"
13012                         cat >> confdefs.h <<\EOF
13013 #define HAVE_CYRUS_SASL 1
13014 EOF
13015
13016                         ol_link_sasl=yes
13017                 fi
13018         fi
13019
13020         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13021                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13022         fi
13023 fi
13024
13025 if test $cross_compiling != yes ; then
13026         dev=no
13027         if test -r /dev/urandom ; then
13028                 dev="/dev/urandom";
13029         elif test -r /idev/urandom ; then
13030                 dev="/idev/urandom";
13031         elif test -r /dev/srandom ; then
13032                 dev="/dev/srandom";
13033         elif test -r /dev/random ; then
13034                 dev="/dev/random";
13035         elif test -r /idev/random ; then
13036                 dev="/idev/random";
13037         fi
13038
13039         if test $dev != no ; then
13040                 cat >> confdefs.h <<EOF
13041 #define URANDOM_DEVICE "$dev"
13042 EOF
13043
13044         fi
13045 fi
13046
13047 ol_link_fetch=no
13048 if test $ol_with_fetch != no ; then
13049         ol=$LIBS
13050 LIBS="-lfetch -lcom_err $LIBS"
13051 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13052 echo "configure:13053: checking fetch(3) library" >&5
13053 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
13054   echo $ac_n "(cached) $ac_c" 1>&6
13055 else
13056   
13057         cat > conftest.$ac_ext <<EOF
13058 #line 13059 "configure"
13059 #include "confdefs.h"
13060
13061 #include <sys/param.h>
13062 #include <stdio.h>
13063 #include <fetch.h>
13064 int main() {
13065 struct url *u = fetchParseURL("file:///"); 
13066 ; return 0; }
13067 EOF
13068 if { (eval echo configure:13069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13069   rm -rf conftest*
13070   ol_cv_lib_fetch=yes
13071 else
13072   echo "configure: failed program was:" >&5
13073   cat conftest.$ac_ext >&5
13074   rm -rf conftest*
13075   ol_cv_lib_fetch=no
13076 fi
13077 rm -f conftest*
13078 fi
13079
13080 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13081 LIBS=$ol_LIBS
13082 if test $ol_cv_lib_fetch != no ; then
13083         ol_link_fetch="-lfetch -lcom_err"
13084         cat >> confdefs.h <<\EOF
13085 #define HAVE_FETCH 1
13086 EOF
13087
13088 fi
13089
13090
13091         if test $ol_cv_lib_fetch != no ; then
13092                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13093                 ol_link_fetch=freebsd
13094
13095         elif test $ol_with_fetch != auto ; then
13096                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13097         fi 
13098 fi
13099
13100 ol_link_readline=no
13101 if test $ol_with_readline != no ; then
13102         for ac_hdr in readline/readline.h readline/history.h
13103 do
13104 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13105 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13106 echo "configure:13107: checking for $ac_hdr" >&5
13107 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
13108   echo $ac_n "(cached) $ac_c" 1>&6
13109 else
13110   cat > conftest.$ac_ext <<EOF
13111 #line 13112 "configure"
13112 #include "confdefs.h"
13113 #include <$ac_hdr>
13114 EOF
13115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13116 { (eval echo configure:13117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13118 if test -z "$ac_err"; then
13119   rm -rf conftest*
13120   eval "ac_cv_header_$ac_safe=yes"
13121 else
13122   echo "$ac_err" >&5
13123   echo "configure: failed program was:" >&5
13124   cat conftest.$ac_ext >&5
13125   rm -rf conftest*
13126   eval "ac_cv_header_$ac_safe=no"
13127 fi
13128 rm -f conftest*
13129 fi
13130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13131   echo "$ac_t""yes" 1>&6
13132     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13133   cat >> confdefs.h <<EOF
13134 #define $ac_tr_hdr 1
13135 EOF
13136  
13137 else
13138   echo "$ac_t""no" 1>&6
13139 fi
13140 done
13141
13142
13143         if test $ac_cv_header_readline_readline_h = yes ; then
13144                 save_LIBS="$LIBS"
13145                 LIBS="$TERMCAP_LIBS $LIBS"
13146                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13147 echo "configure:13148: checking for readline in -lreadline" >&5
13148 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
13149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13150   echo $ac_n "(cached) $ac_c" 1>&6
13151 else
13152   ac_save_LIBS="$LIBS"
13153 LIBS="-lreadline  $LIBS"
13154 cat > conftest.$ac_ext <<EOF
13155 #line 13156 "configure"
13156 #include "confdefs.h"
13157 /* Override any gcc2 internal prototype to avoid an error.  */
13158 /* We use char because int might match the return type of a gcc2
13159     builtin and then its argument prototype would still apply.  */
13160 char readline();
13161
13162 int main() {
13163 readline()
13164 ; return 0; }
13165 EOF
13166 if { (eval echo configure:13167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13167   rm -rf conftest*
13168   eval "ac_cv_lib_$ac_lib_var=yes"
13169 else
13170   echo "configure: failed program was:" >&5
13171   cat conftest.$ac_ext >&5
13172   rm -rf conftest*
13173   eval "ac_cv_lib_$ac_lib_var=no"
13174 fi
13175 rm -f conftest*
13176 LIBS="$ac_save_LIBS"
13177
13178 fi
13179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13180   echo "$ac_t""yes" 1>&6
13181   have_readline=yes
13182 else
13183   echo "$ac_t""no" 1>&6
13184 have_readline=no
13185 fi
13186
13187                 LIBS="$save_LIBS"
13188                         
13189                 if test $have_readline = yes ; then
13190                         ol_with_readline=found
13191                         ol_link_readline=yes
13192
13193                         READLINE_LIBS="-lreadline"
13194                 fi
13195         fi
13196 fi
13197
13198 if test $ol_link_readline = yes ; then
13199         cat >> confdefs.h <<\EOF
13200 #define HAVE_READLINE 1
13201 EOF
13202
13203 fi
13204
13205
13206 if test $ol_enable_crypt != no ; then
13207         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13208 echo "configure:13209: checking for crypt" >&5
13209 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
13210   echo $ac_n "(cached) $ac_c" 1>&6
13211 else
13212   cat > conftest.$ac_ext <<EOF
13213 #line 13214 "configure"
13214 #include "confdefs.h"
13215 /* System header to define __stub macros and hopefully few prototypes,
13216     which can conflict with char crypt(); below.  */
13217 #include <assert.h>
13218 /* Override any gcc2 internal prototype to avoid an error.  */
13219 /* We use char because int might match the return type of a gcc2
13220     builtin and then its argument prototype would still apply.  */
13221 char crypt();
13222 char (*f)();
13223
13224 int main() {
13225
13226 /* The GNU C library defines this for functions which it implements
13227     to always fail with ENOSYS.  Some functions are actually named
13228     something starting with __ and the normal name is an alias.  */
13229 #if defined (__stub_crypt) || defined (__stub___crypt)
13230 choke me
13231 #else
13232 f = crypt;
13233 #endif
13234
13235 ; return 0; }
13236 EOF
13237 if { (eval echo configure:13238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13238   rm -rf conftest*
13239   eval "ac_cv_func_crypt=yes"
13240 else
13241   echo "configure: failed program was:" >&5
13242   cat conftest.$ac_ext >&5
13243   rm -rf conftest*
13244   eval "ac_cv_func_crypt=no"
13245 fi
13246 rm -f conftest*
13247 fi
13248
13249 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13250   echo "$ac_t""yes" 1>&6
13251   have_crypt=yes
13252 else
13253   echo "$ac_t""no" 1>&6
13254
13255                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13256 echo "configure:13257: checking for crypt in -lcrypt" >&5
13257 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
13258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13259   echo $ac_n "(cached) $ac_c" 1>&6
13260 else
13261   ac_save_LIBS="$LIBS"
13262 LIBS="-lcrypt  $LIBS"
13263 cat > conftest.$ac_ext <<EOF
13264 #line 13265 "configure"
13265 #include "confdefs.h"
13266 /* Override any gcc2 internal prototype to avoid an error.  */
13267 /* We use char because int might match the return type of a gcc2
13268     builtin and then its argument prototype would still apply.  */
13269 char crypt();
13270
13271 int main() {
13272 crypt()
13273 ; return 0; }
13274 EOF
13275 if { (eval echo configure:13276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13276   rm -rf conftest*
13277   eval "ac_cv_lib_$ac_lib_var=yes"
13278 else
13279   echo "configure: failed program was:" >&5
13280   cat conftest.$ac_ext >&5
13281   rm -rf conftest*
13282   eval "ac_cv_lib_$ac_lib_var=no"
13283 fi
13284 rm -f conftest*
13285 LIBS="$ac_save_LIBS"
13286
13287 fi
13288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13289   echo "$ac_t""yes" 1>&6
13290   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13291                         have_crypt=yes
13292 else
13293   echo "$ac_t""no" 1>&6
13294 have_crypt=no
13295 fi
13296
13297 fi
13298
13299
13300         if test $have_crypt = yes ; then
13301                 cat >> confdefs.h <<\EOF
13302 #define HAVE_CRYPT 1
13303 EOF
13304
13305         else
13306                 echo "configure: warning: could not find crypt" 1>&2
13307                 if test $ol_enable_crypt = yes ; then
13308                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13309                 fi
13310
13311                 echo "configure: warning: disabling crypt support" 1>&2
13312                 ol_enable_crypt=no
13313         fi
13314 fi
13315
13316 if test $ol_enable_proctitle != no ; then
13317         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13318 echo "configure:13319: checking for setproctitle" >&5
13319 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
13320   echo $ac_n "(cached) $ac_c" 1>&6
13321 else
13322   cat > conftest.$ac_ext <<EOF
13323 #line 13324 "configure"
13324 #include "confdefs.h"
13325 /* System header to define __stub macros and hopefully few prototypes,
13326     which can conflict with char setproctitle(); below.  */
13327 #include <assert.h>
13328 /* Override any gcc2 internal prototype to avoid an error.  */
13329 /* We use char because int might match the return type of a gcc2
13330     builtin and then its argument prototype would still apply.  */
13331 char setproctitle();
13332 char (*f)();
13333
13334 int main() {
13335
13336 /* The GNU C library defines this for functions which it implements
13337     to always fail with ENOSYS.  Some functions are actually named
13338     something starting with __ and the normal name is an alias.  */
13339 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13340 choke me
13341 #else
13342 f = setproctitle;
13343 #endif
13344
13345 ; return 0; }
13346 EOF
13347 if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13348   rm -rf conftest*
13349   eval "ac_cv_func_setproctitle=yes"
13350 else
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -rf conftest*
13354   eval "ac_cv_func_setproctitle=no"
13355 fi
13356 rm -f conftest*
13357 fi
13358
13359 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13360   echo "$ac_t""yes" 1>&6
13361   have_setproctitle=yes
13362 else
13363   echo "$ac_t""no" 1>&6
13364
13365                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13366 echo "configure:13367: checking for setproctitle in -lutil" >&5
13367 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
13368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13369   echo $ac_n "(cached) $ac_c" 1>&6
13370 else
13371   ac_save_LIBS="$LIBS"
13372 LIBS="-lutil  $LIBS"
13373 cat > conftest.$ac_ext <<EOF
13374 #line 13375 "configure"
13375 #include "confdefs.h"
13376 /* Override any gcc2 internal prototype to avoid an error.  */
13377 /* We use char because int might match the return type of a gcc2
13378     builtin and then its argument prototype would still apply.  */
13379 char setproctitle();
13380
13381 int main() {
13382 setproctitle()
13383 ; return 0; }
13384 EOF
13385 if { (eval echo configure:13386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13386   rm -rf conftest*
13387   eval "ac_cv_lib_$ac_lib_var=yes"
13388 else
13389   echo "configure: failed program was:" >&5
13390   cat conftest.$ac_ext >&5
13391   rm -rf conftest*
13392   eval "ac_cv_lib_$ac_lib_var=no"
13393 fi
13394 rm -f conftest*
13395 LIBS="$ac_save_LIBS"
13396
13397 fi
13398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13399   echo "$ac_t""yes" 1>&6
13400   have_setproctitle=yes
13401                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13402 else
13403   echo "$ac_t""no" 1>&6
13404 have_setproctitle=no
13405                         LIBOBJS="$LIBOBJS setproctitle.o"
13406                         LIBSRCS="$LIBSRCS setproctitle.c"
13407 fi
13408
13409 fi
13410
13411
13412         if test $have_setproctitle = yes ; then
13413                 cat >> confdefs.h <<\EOF
13414 #define HAVE_SETPROCTITLE 1
13415 EOF
13416
13417         fi
13418 fi
13419
13420 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13421 echo "configure:13422: checking for ANSI C header files" >&5
13422 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
13423   echo $ac_n "(cached) $ac_c" 1>&6
13424 else
13425   cat > conftest.$ac_ext <<EOF
13426 #line 13427 "configure"
13427 #include "confdefs.h"
13428 #include <stdlib.h>
13429 #include <stdarg.h>
13430 #include <string.h>
13431 #include <float.h>
13432 EOF
13433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13434 { (eval echo configure:13435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13436 if test -z "$ac_err"; then
13437   rm -rf conftest*
13438   ac_cv_header_stdc=yes
13439 else
13440   echo "$ac_err" >&5
13441   echo "configure: failed program was:" >&5
13442   cat conftest.$ac_ext >&5
13443   rm -rf conftest*
13444   ac_cv_header_stdc=no
13445 fi
13446 rm -f conftest*
13447
13448 if test $ac_cv_header_stdc = yes; then
13449   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13450 cat > conftest.$ac_ext <<EOF
13451 #line 13452 "configure"
13452 #include "confdefs.h"
13453 #include <string.h>
13454 EOF
13455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13456   egrep "memchr" >/dev/null 2>&1; then
13457   :
13458 else
13459   rm -rf conftest*
13460   ac_cv_header_stdc=no
13461 fi
13462 rm -f conftest*
13463
13464 fi
13465
13466 if test $ac_cv_header_stdc = yes; then
13467   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13468 cat > conftest.$ac_ext <<EOF
13469 #line 13470 "configure"
13470 #include "confdefs.h"
13471 #include <stdlib.h>
13472 EOF
13473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13474   egrep "free" >/dev/null 2>&1; then
13475   :
13476 else
13477   rm -rf conftest*
13478   ac_cv_header_stdc=no
13479 fi
13480 rm -f conftest*
13481
13482 fi
13483
13484 if test $ac_cv_header_stdc = yes; then
13485   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13486 if test "$cross_compiling" = yes; then
13487   :
13488 else
13489   cat > conftest.$ac_ext <<EOF
13490 #line 13491 "configure"
13491 #include "confdefs.h"
13492 #include <ctype.h>
13493 #if ((' ' & 0x0FF) == 0x020)
13494 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13495 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13496 #else
13497 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13498  || ('j' <= (c) && (c) <= 'r') \
13499  || ('s' <= (c) && (c) <= 'z'))
13500 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13501 #endif
13502 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13503 int main () { int i; for (i = 0; i < 256; i++)
13504 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13505 exit (0); }
13506
13507 EOF
13508 if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13509 then
13510   :
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -fr conftest*
13515   ac_cv_header_stdc=no
13516 fi
13517 rm -fr conftest*
13518 fi
13519
13520 fi
13521 fi
13522
13523 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13524 if test $ac_cv_header_stdc = yes; then
13525   cat >> confdefs.h <<\EOF
13526 #define STDC_HEADERS 1
13527 EOF
13528
13529 fi
13530
13531 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13532 echo "configure:13533: checking for mode_t" >&5
13533 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
13534   echo $ac_n "(cached) $ac_c" 1>&6
13535 else
13536   cat > conftest.$ac_ext <<EOF
13537 #line 13538 "configure"
13538 #include "confdefs.h"
13539 #include <sys/types.h>
13540 #if STDC_HEADERS
13541 #include <stdlib.h>
13542 #include <stddef.h>
13543 #endif
13544
13545 EOF
13546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13547   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13548   rm -rf conftest*
13549   eval "ac_cv_type_mode_t=yes"
13550 else
13551   rm -rf conftest*
13552   eval "ac_cv_type_mode_t=no"
13553 fi
13554 rm -f conftest*
13555
13556 fi
13557 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
13558   echo "$ac_t""yes" 1>&6
13559 else
13560   echo "$ac_t""no" 1>&6
13561   cat >> confdefs.h <<EOF
13562 #define mode_t int
13563 EOF
13564
13565 fi
13566
13567 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13568 echo "configure:13569: checking for off_t" >&5
13569 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
13570   echo $ac_n "(cached) $ac_c" 1>&6
13571 else
13572   cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 #include <sys/types.h>
13576 #if STDC_HEADERS
13577 #include <stdlib.h>
13578 #include <stddef.h>
13579 #endif
13580
13581 EOF
13582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13583   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13584   rm -rf conftest*
13585   eval "ac_cv_type_off_t=yes"
13586 else
13587   rm -rf conftest*
13588   eval "ac_cv_type_off_t=no"
13589 fi
13590 rm -f conftest*
13591
13592 fi
13593 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
13594   echo "$ac_t""yes" 1>&6
13595 else
13596   echo "$ac_t""no" 1>&6
13597   cat >> confdefs.h <<EOF
13598 #define off_t long
13599 EOF
13600
13601 fi
13602
13603 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13604 echo "configure:13605: checking for pid_t" >&5
13605 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
13606   echo $ac_n "(cached) $ac_c" 1>&6
13607 else
13608   cat > conftest.$ac_ext <<EOF
13609 #line 13610 "configure"
13610 #include "confdefs.h"
13611 #include <sys/types.h>
13612 #if STDC_HEADERS
13613 #include <stdlib.h>
13614 #include <stddef.h>
13615 #endif
13616
13617 EOF
13618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13619   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13620   rm -rf conftest*
13621   eval "ac_cv_type_pid_t=yes"
13622 else
13623   rm -rf conftest*
13624   eval "ac_cv_type_pid_t=no"
13625 fi
13626 rm -f conftest*
13627
13628 fi
13629 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
13630   echo "$ac_t""yes" 1>&6
13631 else
13632   echo "$ac_t""no" 1>&6
13633   cat >> confdefs.h <<EOF
13634 #define pid_t int
13635 EOF
13636
13637 fi
13638
13639 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13640 echo "configure:13641: checking for ptrdiff_t" >&5
13641 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
13642   echo $ac_n "(cached) $ac_c" 1>&6
13643 else
13644   cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 #include <stddef.h>
13648 int main() {
13649 ptrdiff_t p
13650 ; return 0; }
13651 EOF
13652 if { (eval echo configure:13653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13653   rm -rf conftest*
13654   am_cv_type_ptrdiff_t=yes
13655 else
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -rf conftest*
13659   am_cv_type_ptrdiff_t=no
13660 fi
13661 rm -f conftest*
13662 fi
13663
13664 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13665    if test $am_cv_type_ptrdiff_t = yes; then
13666      cat >> confdefs.h <<\EOF
13667 #define HAVE_PTRDIFF_T 1
13668 EOF
13669
13670    fi
13671
13672 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13673 echo "configure:13674: checking return type of signal handlers" >&5
13674 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
13675   echo $ac_n "(cached) $ac_c" 1>&6
13676 else
13677   cat > conftest.$ac_ext <<EOF
13678 #line 13679 "configure"
13679 #include "confdefs.h"
13680 #include <sys/types.h>
13681 #include <signal.h>
13682 #ifdef signal
13683 #undef signal
13684 #endif
13685 #ifdef __cplusplus
13686 extern "C" void (*signal (int, void (*)(int)))(int);
13687 #else
13688 void (*signal ()) ();
13689 #endif
13690
13691 int main() {
13692 int i;
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_type_signal=void
13698 else
13699   echo "configure: failed program was:" >&5
13700   cat conftest.$ac_ext >&5
13701   rm -rf conftest*
13702   ac_cv_type_signal=int
13703 fi
13704 rm -f conftest*
13705 fi
13706
13707 echo "$ac_t""$ac_cv_type_signal" 1>&6
13708 cat >> confdefs.h <<EOF
13709 #define RETSIGTYPE $ac_cv_type_signal
13710 EOF
13711
13712
13713 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13714 echo "configure:13715: checking for size_t" >&5
13715 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13716   echo $ac_n "(cached) $ac_c" 1>&6
13717 else
13718   cat > conftest.$ac_ext <<EOF
13719 #line 13720 "configure"
13720 #include "confdefs.h"
13721 #include <sys/types.h>
13722 #if STDC_HEADERS
13723 #include <stdlib.h>
13724 #include <stddef.h>
13725 #endif
13726
13727 EOF
13728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13729   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13730   rm -rf conftest*
13731   eval "ac_cv_type_size_t=yes"
13732 else
13733   rm -rf conftest*
13734   eval "ac_cv_type_size_t=no"
13735 fi
13736 rm -f conftest*
13737
13738 fi
13739 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13740   echo "$ac_t""yes" 1>&6
13741 else
13742   echo "$ac_t""no" 1>&6
13743   cat >> confdefs.h <<EOF
13744 #define size_t unsigned
13745 EOF
13746
13747 fi
13748
13749
13750 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13751 echo "configure:13752: checking for ssize_t" >&5
13752 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
13753   echo $ac_n "(cached) $ac_c" 1>&6
13754 else
13755   cat > conftest.$ac_ext <<EOF
13756 #line 13757 "configure"
13757 #include "confdefs.h"
13758 #include <sys/types.h>
13759 #if STDC_HEADERS
13760 #include <stdlib.h>
13761 #include <stddef.h>
13762 #endif
13763
13764 EOF
13765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13766   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13767   rm -rf conftest*
13768   eval "ac_cv_type_ssize_t=yes"
13769 else
13770   rm -rf conftest*
13771   eval "ac_cv_type_ssize_t=no"
13772 fi
13773 rm -f conftest*
13774
13775 fi
13776 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
13777   echo "$ac_t""yes" 1>&6
13778 else
13779   echo "$ac_t""no" 1>&6
13780   cat >> confdefs.h <<EOF
13781 #define ssize_t signed int
13782 EOF
13783
13784 fi
13785
13786 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
13787 echo "configure:13788: checking for caddr_t" >&5
13788 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
13789   echo $ac_n "(cached) $ac_c" 1>&6
13790 else
13791   cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 #include <sys/types.h>
13795 #if STDC_HEADERS
13796 #include <stdlib.h>
13797 #include <stddef.h>
13798 #endif
13799
13800 EOF
13801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13802   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13803   rm -rf conftest*
13804   eval "ac_cv_type_caddr_t=yes"
13805 else
13806   rm -rf conftest*
13807   eval "ac_cv_type_caddr_t=no"
13808 fi
13809 rm -f conftest*
13810
13811 fi
13812 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
13813   echo "$ac_t""yes" 1>&6
13814 else
13815   echo "$ac_t""no" 1>&6
13816   cat >> confdefs.h <<EOF
13817 #define caddr_t char *
13818 EOF
13819
13820 fi
13821
13822
13823 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13824 echo "configure:13825: checking for socklen_t" >&5
13825 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13826   echo $ac_n "(cached) $ac_c" 1>&6
13827 else
13828   cat > conftest.$ac_ext <<EOF
13829 #line 13830 "configure"
13830 #include "confdefs.h"
13831
13832 #ifdef HAVE_SYS_TYPES_H
13833 #include <sys/types.h>
13834 #endif
13835 #ifdef HAVE_SYS_SOCKET_H
13836 #include <sys/socket.h>
13837 #endif
13838
13839 int main() {
13840 socklen_t len;
13841 ; return 0; }
13842 EOF
13843 if { (eval echo configure:13844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13844   rm -rf conftest*
13845   ol_cv_type_socklen_t=yes
13846 else
13847   echo "configure: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   rm -rf conftest*
13850   ol_cv_type_socklen_t=no
13851 fi
13852 rm -f conftest*
13853 fi
13854
13855 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13856   if test $ol_cv_type_socklen_t = no; then
13857     cat >> confdefs.h <<\EOF
13858 #define socklen_t int
13859 EOF
13860
13861   fi
13862  
13863 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13864 echo "configure:13865: checking for member st_blksize in aggregate type struct stat" >&5
13865 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13866   echo $ac_n "(cached) $ac_c" 1>&6
13867 else
13868   cat > conftest.$ac_ext <<EOF
13869 #line 13870 "configure"
13870 #include "confdefs.h"
13871 #include <sys/types.h>
13872 #include <sys/stat.h>
13873 int main() {
13874 struct stat foo; foo.st_blksize;
13875 ; return 0; }
13876 EOF
13877 if { (eval echo configure:13878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13878   rm -rf conftest*
13879   ac_cv_c_struct_member_st_blksize=yes
13880 else
13881   echo "configure: failed program was:" >&5
13882   cat conftest.$ac_ext >&5
13883   rm -rf conftest*
13884   ac_cv_c_struct_member_st_blksize=no
13885 fi
13886 rm -f conftest*
13887 fi
13888
13889 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13890 st_blksize="$ac_cv_c_struct_member_st_blksize"
13891 if test $ac_cv_c_struct_member_st_blksize = yes; then
13892   cat >> confdefs.h <<\EOF
13893 #define HAVE_ST_BLKSIZE 1
13894 EOF
13895
13896 fi
13897
13898 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13899 echo "configure:13900: checking whether time.h and sys/time.h may both be included" >&5
13900 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13901   echo $ac_n "(cached) $ac_c" 1>&6
13902 else
13903   cat > conftest.$ac_ext <<EOF
13904 #line 13905 "configure"
13905 #include "confdefs.h"
13906 #include <sys/types.h>
13907 #include <sys/time.h>
13908 #include <time.h>
13909 int main() {
13910 struct tm *tp;
13911 ; return 0; }
13912 EOF
13913 if { (eval echo configure:13914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13914   rm -rf conftest*
13915   ac_cv_header_time=yes
13916 else
13917   echo "configure: failed program was:" >&5
13918   cat conftest.$ac_ext >&5
13919   rm -rf conftest*
13920   ac_cv_header_time=no
13921 fi
13922 rm -f conftest*
13923 fi
13924
13925 echo "$ac_t""$ac_cv_header_time" 1>&6
13926 if test $ac_cv_header_time = yes; then
13927   cat >> confdefs.h <<\EOF
13928 #define TIME_WITH_SYS_TIME 1
13929 EOF
13930
13931 fi
13932
13933 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13934 echo "configure:13935: checking whether struct tm is in sys/time.h or time.h" >&5
13935 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13936   echo $ac_n "(cached) $ac_c" 1>&6
13937 else
13938   cat > conftest.$ac_ext <<EOF
13939 #line 13940 "configure"
13940 #include "confdefs.h"
13941 #include <sys/types.h>
13942 #include <time.h>
13943 int main() {
13944 struct tm *tp; tp->tm_sec;
13945 ; return 0; }
13946 EOF
13947 if { (eval echo configure:13948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13948   rm -rf conftest*
13949   ac_cv_struct_tm=time.h
13950 else
13951   echo "configure: failed program was:" >&5
13952   cat conftest.$ac_ext >&5
13953   rm -rf conftest*
13954   ac_cv_struct_tm=sys/time.h
13955 fi
13956 rm -f conftest*
13957 fi
13958
13959 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13960 if test $ac_cv_struct_tm = sys/time.h; then
13961   cat >> confdefs.h <<\EOF
13962 #define TM_IN_SYS_TIME 1
13963 EOF
13964
13965 fi
13966
13967 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
13968 echo "configure:13969: checking for uid_t in sys/types.h" >&5
13969 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
13970   echo $ac_n "(cached) $ac_c" 1>&6
13971 else
13972   cat > conftest.$ac_ext <<EOF
13973 #line 13974 "configure"
13974 #include "confdefs.h"
13975 #include <sys/types.h>
13976 EOF
13977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13978   egrep "uid_t" >/dev/null 2>&1; then
13979   rm -rf conftest*
13980   ac_cv_type_uid_t=yes
13981 else
13982   rm -rf conftest*
13983   ac_cv_type_uid_t=no
13984 fi
13985 rm -f conftest*
13986
13987 fi
13988
13989 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
13990 if test $ac_cv_type_uid_t = no; then
13991   cat >> confdefs.h <<\EOF
13992 #define uid_t int
13993 EOF
13994
13995   cat >> confdefs.h <<\EOF
13996 #define gid_t int
13997 EOF
13998
13999 fi
14000
14001 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14002 echo "configure:14003: checking for sig_atomic_t" >&5
14003 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
14004   echo $ac_n "(cached) $ac_c" 1>&6
14005 else
14006   cat > conftest.$ac_ext <<EOF
14007 #line 14008 "configure"
14008 #include "confdefs.h"
14009 #include <signal.h>
14010 int main() {
14011 sig_atomic_t atomic;
14012 ; return 0; }
14013 EOF
14014 if { (eval echo configure:14015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14015   rm -rf conftest*
14016   ol_cv_type_sig_atomic_t=yes
14017 else
14018   echo "configure: failed program was:" >&5
14019   cat conftest.$ac_ext >&5
14020   rm -rf conftest*
14021   ol_cv_type_sig_atomic_t=no
14022 fi
14023 rm -f conftest*
14024 fi
14025
14026 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14027   if test $ol_cv_type_sig_atomic_t = no; then
14028     cat >> confdefs.h <<\EOF
14029 #define sig_atomic_t int
14030 EOF
14031
14032   fi
14033  
14034
14035
14036 # test for pw_gecos in struct passwd
14037 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14038 echo "configure:14039: checking struct passwd for pw_gecos" >&5
14039 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
14040   echo $ac_n "(cached) $ac_c" 1>&6
14041 else
14042   
14043         cat > conftest.$ac_ext <<EOF
14044 #line 14045 "configure"
14045 #include "confdefs.h"
14046 #include <pwd.h>
14047 int main() {
14048
14049         struct passwd pwd;
14050         pwd.pw_gecos = pwd.pw_name;
14051
14052 ; return 0; }
14053 EOF
14054 if { (eval echo configure:14055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14055   rm -rf conftest*
14056   ol_cv_struct_passwd_pw_gecos=yes
14057 else
14058   echo "configure: failed program was:" >&5
14059   cat conftest.$ac_ext >&5
14060   rm -rf conftest*
14061   ol_cv_struct_passwd_pw_gecos=no
14062 fi
14063 rm -f conftest*
14064 fi
14065
14066 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14067 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14068         cat >> confdefs.h <<\EOF
14069 #define HAVE_PW_GECOS 1
14070 EOF
14071
14072 fi
14073
14074 # test for pw_passwd in struct passwd
14075 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14076 echo "configure:14077: checking struct passwd for pw_passwd" >&5
14077 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
14078   echo $ac_n "(cached) $ac_c" 1>&6
14079 else
14080   
14081         cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 #include <pwd.h>
14085 int main() {
14086
14087         struct passwd pwd;
14088         pwd.pw_passwd = pwd.pw_name;
14089
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   ol_cv_struct_passwd_pw_passwd=yes
14095 else
14096   echo "configure: failed program was:" >&5
14097   cat conftest.$ac_ext >&5
14098   rm -rf conftest*
14099   ol_cv_struct_passwd_pw_passwd=no
14100 fi
14101 rm -f conftest*
14102 fi
14103
14104 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14105 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14106         cat >> confdefs.h <<\EOF
14107 #define HAVE_PW_PASSWD 1
14108 EOF
14109
14110 fi
14111
14112
14113 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14114 echo "configure:14115: checking if toupper() requires islower()" >&5
14115 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
14116   echo $ac_n "(cached) $ac_c" 1>&6
14117 else
14118   
14119         if test "$cross_compiling" = yes; then
14120   ol_cv_c_upper_lower=safe
14121 else
14122   cat > conftest.$ac_ext <<EOF
14123 #line 14124 "configure"
14124 #include "confdefs.h"
14125
14126 #include <ctype.h>
14127 main()
14128 {
14129         if ('C' == toupper('C'))
14130                 exit(0);
14131         else
14132                 exit(1);
14133 }
14134 EOF
14135 if { (eval echo configure:14136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14136 then
14137   ol_cv_c_upper_lower=no
14138 else
14139   echo "configure: failed program was:" >&5
14140   cat conftest.$ac_ext >&5
14141   rm -fr conftest*
14142   ol_cv_c_upper_lower=yes
14143 fi
14144 rm -fr conftest*
14145 fi
14146
14147 fi
14148
14149 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14150 if test $ol_cv_c_upper_lower != no ; then
14151         cat >> confdefs.h <<\EOF
14152 #define C_UPPER_LOWER 1
14153 EOF
14154
14155 fi
14156
14157 echo $ac_n "checking for working const""... $ac_c" 1>&6
14158 echo "configure:14159: checking for working const" >&5
14159 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
14160   echo $ac_n "(cached) $ac_c" 1>&6
14161 else
14162   cat > conftest.$ac_ext <<EOF
14163 #line 14164 "configure"
14164 #include "confdefs.h"
14165
14166 int main() {
14167
14168 /* Ultrix mips cc rejects this.  */
14169 typedef int charset[2]; const charset x;
14170 /* SunOS 4.1.1 cc rejects this.  */
14171 char const *const *ccp;
14172 char **p;
14173 /* NEC SVR4.0.2 mips cc rejects this.  */
14174 struct point {int x, y;};
14175 static struct point const zero = {0,0};
14176 /* AIX XL C 1.02.0.0 rejects this.
14177    It does not let you subtract one const X* pointer from another in an arm
14178    of an if-expression whose if-part is not a constant expression */
14179 const char *g = "string";
14180 ccp = &g + (g ? g-g : 0);
14181 /* HPUX 7.0 cc rejects these. */
14182 ++ccp;
14183 p = (char**) ccp;
14184 ccp = (char const *const *) p;
14185 { /* SCO 3.2v4 cc rejects this.  */
14186   char *t;
14187   char const *s = 0 ? (char *) 0 : (char const *) 0;
14188
14189   *t++ = 0;
14190 }
14191 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14192   int x[] = {25, 17};
14193   const int *foo = &x[0];
14194   ++foo;
14195 }
14196 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14197   typedef const int *iptr;
14198   iptr p = 0;
14199   ++p;
14200 }
14201 { /* AIX XL C 1.02.0.0 rejects this saying
14202      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14203   struct s { int j; const int *ap[3]; };
14204   struct s *b; b->j = 5;
14205 }
14206 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14207   const int foo = 10;
14208 }
14209
14210 ; return 0; }
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14213   rm -rf conftest*
14214   ac_cv_c_const=yes
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -rf conftest*
14219   ac_cv_c_const=no
14220 fi
14221 rm -f conftest*
14222 fi
14223
14224 echo "$ac_t""$ac_cv_c_const" 1>&6
14225 if test $ac_cv_c_const = no; then
14226   cat >> confdefs.h <<\EOF
14227 #define const 
14228 EOF
14229
14230 fi
14231
14232 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14233 echo "configure:14234: checking if compiler understands volatile" >&5
14234 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
14235   echo $ac_n "(cached) $ac_c" 1>&6
14236 else
14237   cat > conftest.$ac_ext <<EOF
14238 #line 14239 "configure"
14239 #include "confdefs.h"
14240 int x, y, z;
14241 int main() {
14242 volatile int a; int * volatile b = x ? &y : &z;
14243       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14244       *b = 0;
14245 ; return 0; }
14246 EOF
14247 if { (eval echo configure:14248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14248   rm -rf conftest*
14249   ol_cv_c_volatile=yes
14250 else
14251   echo "configure: failed program was:" >&5
14252   cat conftest.$ac_ext >&5
14253   rm -rf conftest*
14254   ol_cv_c_volatile=no
14255 fi
14256 rm -f conftest*
14257 fi
14258
14259 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14260   if test $ol_cv_c_volatile = yes; then
14261     : 
14262   else
14263     cat >> confdefs.h <<\EOF
14264 #define volatile 
14265 EOF
14266
14267   fi
14268  
14269
14270 if test $cross_compiling = yes ; then
14271         cat >> confdefs.h <<\EOF
14272 #define CROSS_COMPILING 1
14273 EOF
14274
14275 else
14276         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14277 echo "configure:14278: checking whether byte ordering is bigendian" >&5
14278 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
14279   echo $ac_n "(cached) $ac_c" 1>&6
14280 else
14281   ac_cv_c_bigendian=unknown
14282 # See if sys/param.h defines the BYTE_ORDER macro.
14283 cat > conftest.$ac_ext <<EOF
14284 #line 14285 "configure"
14285 #include "confdefs.h"
14286 #include <sys/types.h>
14287 #include <sys/param.h>
14288 int main() {
14289
14290 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14291  bogus endian macros
14292 #endif
14293 ; return 0; }
14294 EOF
14295 if { (eval echo configure:14296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14296   rm -rf conftest*
14297   # It does; now see whether it defined to BIG_ENDIAN or not.
14298 cat > conftest.$ac_ext <<EOF
14299 #line 14300 "configure"
14300 #include "confdefs.h"
14301 #include <sys/types.h>
14302 #include <sys/param.h>
14303 int main() {
14304
14305 #if BYTE_ORDER != BIG_ENDIAN
14306  not big endian
14307 #endif
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14311   rm -rf conftest*
14312   ac_cv_c_bigendian=yes
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   ac_cv_c_bigendian=no
14318 fi
14319 rm -f conftest*
14320 else
14321   echo "configure: failed program was:" >&5
14322   cat conftest.$ac_ext >&5
14323 fi
14324 rm -f conftest*
14325 if test $ac_cv_c_bigendian = unknown; then
14326 if test "$cross_compiling" = yes; then
14327     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14328 else
14329   cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 main () {
14333   /* Are we little or big endian?  From Harbison&Steele.  */
14334   union
14335   {
14336     long l;
14337     char c[sizeof (long)];
14338   } u;
14339   u.l = 1;
14340   exit (u.c[sizeof (long) - 1] == 1);
14341 }
14342 EOF
14343 if { (eval echo configure:14344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14344 then
14345   ac_cv_c_bigendian=no
14346 else
14347   echo "configure: failed program was:" >&5
14348   cat conftest.$ac_ext >&5
14349   rm -fr conftest*
14350   ac_cv_c_bigendian=yes
14351 fi
14352 rm -fr conftest*
14353 fi
14354
14355 fi
14356 fi
14357
14358 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14359 if test $ac_cv_c_bigendian = yes; then
14360   cat >> confdefs.h <<\EOF
14361 #define WORDS_BIGENDIAN 1
14362 EOF
14363
14364 fi
14365
14366 fi
14367
14368 echo $ac_n "checking size of short""... $ac_c" 1>&6
14369 echo "configure:14370: checking size of short" >&5 
14370 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
14371   echo $ac_n "(cached) $ac_c" 1>&6
14372 else
14373   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14374   cat > conftest.$ac_ext <<EOF
14375 #line 14376 "configure"
14376 #include "confdefs.h"
14377 #include "confdefs.h" 
14378 #include <sys/types.h> 
14379  
14380
14381 int main() {
14382 switch (0) case 0: case (sizeof (short) == $ac_size):;
14383 ; return 0; }
14384 EOF
14385 if { (eval echo configure:14386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14386   rm -rf conftest*
14387   ac_cv_sizeof_short=$ac_size
14388 else
14389   echo "configure: failed program was:" >&5
14390   cat conftest.$ac_ext >&5
14391 fi
14392 rm -f conftest* 
14393   if test x$ac_cv_sizeof_short != x ; then break; fi 
14394 done 
14395
14396 fi
14397  
14398 if test x$ac_cv_sizeof_short = x ; then 
14399   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14400 fi 
14401 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14402 cat >> confdefs.h <<EOF
14403 #define SIZEOF_SHORT $ac_cv_sizeof_short
14404 EOF
14405  
14406  
14407 echo $ac_n "checking size of int""... $ac_c" 1>&6
14408 echo "configure:14409: checking size of int" >&5 
14409 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
14410   echo $ac_n "(cached) $ac_c" 1>&6
14411 else
14412   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14413   cat > conftest.$ac_ext <<EOF
14414 #line 14415 "configure"
14415 #include "confdefs.h"
14416 #include "confdefs.h" 
14417 #include <sys/types.h> 
14418  
14419
14420 int main() {
14421 switch (0) case 0: case (sizeof (int) == $ac_size):;
14422 ; return 0; }
14423 EOF
14424 if { (eval echo configure:14425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14425   rm -rf conftest*
14426   ac_cv_sizeof_int=$ac_size
14427 else
14428   echo "configure: failed program was:" >&5
14429   cat conftest.$ac_ext >&5
14430 fi
14431 rm -f conftest* 
14432   if test x$ac_cv_sizeof_int != x ; then break; fi 
14433 done 
14434
14435 fi
14436  
14437 if test x$ac_cv_sizeof_int = x ; then 
14438   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14439 fi 
14440 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14441 cat >> confdefs.h <<EOF
14442 #define SIZEOF_INT $ac_cv_sizeof_int
14443 EOF
14444  
14445  
14446 echo $ac_n "checking size of long""... $ac_c" 1>&6
14447 echo "configure:14448: checking size of long" >&5 
14448 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
14449   echo $ac_n "(cached) $ac_c" 1>&6
14450 else
14451   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14452   cat > conftest.$ac_ext <<EOF
14453 #line 14454 "configure"
14454 #include "confdefs.h"
14455 #include "confdefs.h" 
14456 #include <sys/types.h> 
14457  
14458
14459 int main() {
14460 switch (0) case 0: case (sizeof (long) == $ac_size):;
14461 ; return 0; }
14462 EOF
14463 if { (eval echo configure:14464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14464   rm -rf conftest*
14465   ac_cv_sizeof_long=$ac_size
14466 else
14467   echo "configure: failed program was:" >&5
14468   cat conftest.$ac_ext >&5
14469 fi
14470 rm -f conftest* 
14471   if test x$ac_cv_sizeof_long != x ; then break; fi 
14472 done 
14473
14474 fi
14475  
14476 if test x$ac_cv_sizeof_long = x ; then 
14477   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14478 fi 
14479 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14480 cat >> confdefs.h <<EOF
14481 #define SIZEOF_LONG $ac_cv_sizeof_long
14482 EOF
14483  
14484
14485
14486 if test "$ac_cv_sizeof_int" -lt 4 ; then
14487         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14488
14489         cat >> confdefs.h <<\EOF
14490 #define LBER_INT_T long
14491 EOF
14492
14493 else
14494         cat >> confdefs.h <<\EOF
14495 #define LBER_INT_T int
14496 EOF
14497
14498 fi
14499
14500 cat >> confdefs.h <<\EOF
14501 #define LBER_LEN_T long
14502 EOF
14503
14504 cat >> confdefs.h <<\EOF
14505 #define LBER_SOCKET_T int
14506 EOF
14507
14508 cat >> confdefs.h <<\EOF
14509 #define LBER_TAG_T long
14510 EOF
14511
14512
14513 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14514 echo "configure:14515: checking for 8-bit clean memcmp" >&5
14515 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
14516   echo $ac_n "(cached) $ac_c" 1>&6
14517 else
14518   if test "$cross_compiling" = yes; then
14519   ac_cv_func_memcmp_clean=no
14520 else
14521   cat > conftest.$ac_ext <<EOF
14522 #line 14523 "configure"
14523 #include "confdefs.h"
14524
14525 main()
14526 {
14527   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14528   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14529 }
14530
14531 EOF
14532 if { (eval echo configure:14533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14533 then
14534   ac_cv_func_memcmp_clean=yes
14535 else
14536   echo "configure: failed program was:" >&5
14537   cat conftest.$ac_ext >&5
14538   rm -fr conftest*
14539   ac_cv_func_memcmp_clean=no
14540 fi
14541 rm -fr conftest*
14542 fi
14543
14544 fi
14545
14546 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14547 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14548
14549 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14550 echo "configure:14551: checking for strftime" >&5
14551 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
14552   echo $ac_n "(cached) $ac_c" 1>&6
14553 else
14554   cat > conftest.$ac_ext <<EOF
14555 #line 14556 "configure"
14556 #include "confdefs.h"
14557 /* System header to define __stub macros and hopefully few prototypes,
14558     which can conflict with char strftime(); below.  */
14559 #include <assert.h>
14560 /* Override any gcc2 internal prototype to avoid an error.  */
14561 /* We use char because int might match the return type of a gcc2
14562     builtin and then its argument prototype would still apply.  */
14563 char strftime();
14564 char (*f)();
14565
14566 int main() {
14567
14568 /* The GNU C library defines this for functions which it implements
14569     to always fail with ENOSYS.  Some functions are actually named
14570     something starting with __ and the normal name is an alias.  */
14571 #if defined (__stub_strftime) || defined (__stub___strftime)
14572 choke me
14573 #else
14574 f = strftime;
14575 #endif
14576
14577 ; return 0; }
14578 EOF
14579 if { (eval echo configure:14580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14580   rm -rf conftest*
14581   eval "ac_cv_func_strftime=yes"
14582 else
14583   echo "configure: failed program was:" >&5
14584   cat conftest.$ac_ext >&5
14585   rm -rf conftest*
14586   eval "ac_cv_func_strftime=no"
14587 fi
14588 rm -f conftest*
14589 fi
14590
14591 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14592   echo "$ac_t""yes" 1>&6
14593   cat >> confdefs.h <<\EOF
14594 #define HAVE_STRFTIME 1
14595 EOF
14596
14597 else
14598   echo "$ac_t""no" 1>&6
14599 # strftime is in -lintl on SCO UNIX.
14600 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14601 echo "configure:14602: checking for strftime in -lintl" >&5
14602 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
14603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14604   echo $ac_n "(cached) $ac_c" 1>&6
14605 else
14606   ac_save_LIBS="$LIBS"
14607 LIBS="-lintl  $LIBS"
14608 cat > conftest.$ac_ext <<EOF
14609 #line 14610 "configure"
14610 #include "confdefs.h"
14611 /* Override any gcc2 internal prototype to avoid an error.  */
14612 /* We use char because int might match the return type of a gcc2
14613     builtin and then its argument prototype would still apply.  */
14614 char strftime();
14615
14616 int main() {
14617 strftime()
14618 ; return 0; }
14619 EOF
14620 if { (eval echo configure:14621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14621   rm -rf conftest*
14622   eval "ac_cv_lib_$ac_lib_var=yes"
14623 else
14624   echo "configure: failed program was:" >&5
14625   cat conftest.$ac_ext >&5
14626   rm -rf conftest*
14627   eval "ac_cv_lib_$ac_lib_var=no"
14628 fi
14629 rm -f conftest*
14630 LIBS="$ac_save_LIBS"
14631
14632 fi
14633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14634   echo "$ac_t""yes" 1>&6
14635   cat >> confdefs.h <<\EOF
14636 #define HAVE_STRFTIME 1
14637 EOF
14638
14639 LIBS="-lintl $LIBS"
14640 else
14641   echo "$ac_t""no" 1>&6
14642 fi
14643
14644 fi
14645
14646
14647 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14648 echo "configure:14649: checking for inet_aton()" >&5
14649 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
14650   echo $ac_n "(cached) $ac_c" 1>&6
14651 else
14652   cat > conftest.$ac_ext <<EOF
14653 #line 14654 "configure"
14654 #include "confdefs.h"
14655
14656 #ifdef HAVE_SYS_TYPES_H
14657 #       include <sys/types.h>
14658 #endif
14659 #ifdef HAVE_SYS_SOCKET_H
14660 #       include <sys/socket.h>
14661 #       ifdef HAVE_SYS_SELECT_H
14662 #               include <sys/select.h>
14663 #       endif
14664 #       include <netinet/in.h>
14665 #       ifdef HAVE_ARPA_INET_H
14666 #               include <arpa/inet.h>
14667 #       endif
14668 #endif
14669
14670 int main() {
14671 struct in_addr in;
14672 int rc = inet_aton( "255.255.255.255", &in );
14673 ; return 0; }
14674 EOF
14675 if { (eval echo configure:14676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14676   rm -rf conftest*
14677   ol_cv_func_inet_aton=yes
14678 else
14679   echo "configure: failed program was:" >&5
14680   cat conftest.$ac_ext >&5
14681   rm -rf conftest*
14682   ol_cv_func_inet_aton=no
14683 fi
14684 rm -f conftest*
14685 fi
14686
14687 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14688   if test $ol_cv_func_inet_aton != no; then
14689     cat >> confdefs.h <<\EOF
14690 #define HAVE_INET_ATON 1
14691 EOF
14692
14693   fi
14694  
14695
14696 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14697 echo "configure:14698: checking for _spawnlp" >&5
14698 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
14699   echo $ac_n "(cached) $ac_c" 1>&6
14700 else
14701   cat > conftest.$ac_ext <<EOF
14702 #line 14703 "configure"
14703 #include "confdefs.h"
14704 /* System header to define __stub macros and hopefully few prototypes,
14705     which can conflict with char _spawnlp(); below.  */
14706 #include <assert.h>
14707 /* Override any gcc2 internal prototype to avoid an error.  */
14708 /* We use char because int might match the return type of a gcc2
14709     builtin and then its argument prototype would still apply.  */
14710 char _spawnlp();
14711 char (*f)();
14712
14713 int main() {
14714
14715 /* The GNU C library defines this for functions which it implements
14716     to always fail with ENOSYS.  Some functions are actually named
14717     something starting with __ and the normal name is an alias.  */
14718 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14719 choke me
14720 #else
14721 f = _spawnlp;
14722 #endif
14723
14724 ; return 0; }
14725 EOF
14726 if { (eval echo configure:14727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14727   rm -rf conftest*
14728   eval "ac_cv_func__spawnlp=yes"
14729 else
14730   echo "configure: failed program was:" >&5
14731   cat conftest.$ac_ext >&5
14732   rm -rf conftest*
14733   eval "ac_cv_func__spawnlp=no"
14734 fi
14735 rm -f conftest*
14736 fi
14737
14738 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14739   echo "$ac_t""yes" 1>&6
14740   cat >> confdefs.h <<\EOF
14741 #define HAVE_SPAWNLP 1
14742 EOF
14743
14744 else
14745   echo "$ac_t""no" 1>&6
14746 fi
14747
14748
14749 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14750 echo "configure:14751: checking for _snprintf" >&5
14751 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
14752   echo $ac_n "(cached) $ac_c" 1>&6
14753 else
14754   cat > conftest.$ac_ext <<EOF
14755 #line 14756 "configure"
14756 #include "confdefs.h"
14757 /* System header to define __stub macros and hopefully few prototypes,
14758     which can conflict with char _snprintf(); below.  */
14759 #include <assert.h>
14760 /* Override any gcc2 internal prototype to avoid an error.  */
14761 /* We use char because int might match the return type of a gcc2
14762     builtin and then its argument prototype would still apply.  */
14763 char _snprintf();
14764 char (*f)();
14765
14766 int main() {
14767
14768 /* The GNU C library defines this for functions which it implements
14769     to always fail with ENOSYS.  Some functions are actually named
14770     something starting with __ and the normal name is an alias.  */
14771 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14772 choke me
14773 #else
14774 f = _snprintf;
14775 #endif
14776
14777 ; return 0; }
14778 EOF
14779 if { (eval echo configure:14780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14780   rm -rf conftest*
14781   eval "ac_cv_func__snprintf=yes"
14782 else
14783   echo "configure: failed program was:" >&5
14784   cat conftest.$ac_ext >&5
14785   rm -rf conftest*
14786   eval "ac_cv_func__snprintf=no"
14787 fi
14788 rm -f conftest*
14789 fi
14790
14791 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14792   echo "$ac_t""yes" 1>&6
14793   ac_cv_func_snprintf=yes
14794         cat >> confdefs.h <<\EOF
14795 #define snprintf _snprintf
14796 EOF
14797
14798
14799 else
14800   echo "$ac_t""no" 1>&6
14801 fi
14802
14803
14804 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
14805 echo "configure:14806: checking for _vsnprintf" >&5
14806 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
14807   echo $ac_n "(cached) $ac_c" 1>&6
14808 else
14809   cat > conftest.$ac_ext <<EOF
14810 #line 14811 "configure"
14811 #include "confdefs.h"
14812 /* System header to define __stub macros and hopefully few prototypes,
14813     which can conflict with char _vsnprintf(); below.  */
14814 #include <assert.h>
14815 /* Override any gcc2 internal prototype to avoid an error.  */
14816 /* We use char because int might match the return type of a gcc2
14817     builtin and then its argument prototype would still apply.  */
14818 char _vsnprintf();
14819 char (*f)();
14820
14821 int main() {
14822
14823 /* The GNU C library defines this for functions which it implements
14824     to always fail with ENOSYS.  Some functions are actually named
14825     something starting with __ and the normal name is an alias.  */
14826 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
14827 choke me
14828 #else
14829 f = _vsnprintf;
14830 #endif
14831
14832 ; return 0; }
14833 EOF
14834 if { (eval echo configure:14835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14835   rm -rf conftest*
14836   eval "ac_cv_func__vsnprintf=yes"
14837 else
14838   echo "configure: failed program was:" >&5
14839   cat conftest.$ac_ext >&5
14840   rm -rf conftest*
14841   eval "ac_cv_func__vsnprintf=no"
14842 fi
14843 rm -f conftest*
14844 fi
14845
14846 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
14847   echo "$ac_t""yes" 1>&6
14848   ac_cv_func_vsnprintf=yes
14849         cat >> confdefs.h <<\EOF
14850 #define vsnprintf _vsnprintf
14851 EOF
14852
14853
14854 else
14855   echo "$ac_t""no" 1>&6
14856 fi
14857
14858
14859 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
14860 echo "configure:14861: checking for vprintf" >&5
14861 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
14862   echo $ac_n "(cached) $ac_c" 1>&6
14863 else
14864   cat > conftest.$ac_ext <<EOF
14865 #line 14866 "configure"
14866 #include "confdefs.h"
14867 /* System header to define __stub macros and hopefully few prototypes,
14868     which can conflict with char vprintf(); below.  */
14869 #include <assert.h>
14870 /* Override any gcc2 internal prototype to avoid an error.  */
14871 /* We use char because int might match the return type of a gcc2
14872     builtin and then its argument prototype would still apply.  */
14873 char vprintf();
14874 char (*f)();
14875
14876 int main() {
14877
14878 /* The GNU C library defines this for functions which it implements
14879     to always fail with ENOSYS.  Some functions are actually named
14880     something starting with __ and the normal name is an alias.  */
14881 #if defined (__stub_vprintf) || defined (__stub___vprintf)
14882 choke me
14883 #else
14884 f = vprintf;
14885 #endif
14886
14887 ; return 0; }
14888 EOF
14889 if { (eval echo configure:14890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14890   rm -rf conftest*
14891   eval "ac_cv_func_vprintf=yes"
14892 else
14893   echo "configure: failed program was:" >&5
14894   cat conftest.$ac_ext >&5
14895   rm -rf conftest*
14896   eval "ac_cv_func_vprintf=no"
14897 fi
14898 rm -f conftest*
14899 fi
14900
14901 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
14902   echo "$ac_t""yes" 1>&6
14903   cat >> confdefs.h <<\EOF
14904 #define HAVE_VPRINTF 1
14905 EOF
14906
14907 else
14908   echo "$ac_t""no" 1>&6
14909 fi
14910
14911 if test "$ac_cv_func_vprintf" != yes; then
14912 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
14913 echo "configure:14914: checking for _doprnt" >&5
14914 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
14915   echo $ac_n "(cached) $ac_c" 1>&6
14916 else
14917   cat > conftest.$ac_ext <<EOF
14918 #line 14919 "configure"
14919 #include "confdefs.h"
14920 /* System header to define __stub macros and hopefully few prototypes,
14921     which can conflict with char _doprnt(); below.  */
14922 #include <assert.h>
14923 /* Override any gcc2 internal prototype to avoid an error.  */
14924 /* We use char because int might match the return type of a gcc2
14925     builtin and then its argument prototype would still apply.  */
14926 char _doprnt();
14927 char (*f)();
14928
14929 int main() {
14930
14931 /* The GNU C library defines this for functions which it implements
14932     to always fail with ENOSYS.  Some functions are actually named
14933     something starting with __ and the normal name is an alias.  */
14934 #if defined (__stub__doprnt) || defined (__stub____doprnt)
14935 choke me
14936 #else
14937 f = _doprnt;
14938 #endif
14939
14940 ; return 0; }
14941 EOF
14942 if { (eval echo configure:14943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14943   rm -rf conftest*
14944   eval "ac_cv_func__doprnt=yes"
14945 else
14946   echo "configure: failed program was:" >&5
14947   cat conftest.$ac_ext >&5
14948   rm -rf conftest*
14949   eval "ac_cv_func__doprnt=no"
14950 fi
14951 rm -f conftest*
14952 fi
14953
14954 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
14955   echo "$ac_t""yes" 1>&6
14956   cat >> confdefs.h <<\EOF
14957 #define HAVE_DOPRNT 1
14958 EOF
14959
14960 else
14961   echo "$ac_t""no" 1>&6
14962 fi
14963
14964 fi
14965
14966
14967 if test $ac_cv_func_vprintf = yes ; then
14968                 for ac_func in vsnprintf vsprintf
14969 do
14970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14971 echo "configure:14972: checking for $ac_func" >&5
14972 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14973   echo $ac_n "(cached) $ac_c" 1>&6
14974 else
14975   cat > conftest.$ac_ext <<EOF
14976 #line 14977 "configure"
14977 #include "confdefs.h"
14978 /* System header to define __stub macros and hopefully few prototypes,
14979     which can conflict with char $ac_func(); below.  */
14980 #include <assert.h>
14981 /* Override any gcc2 internal prototype to avoid an error.  */
14982 /* We use char because int might match the return type of a gcc2
14983     builtin and then its argument prototype would still apply.  */
14984 char $ac_func();
14985 char (*f)();
14986
14987 int main() {
14988
14989 /* The GNU C library defines this for functions which it implements
14990     to always fail with ENOSYS.  Some functions are actually named
14991     something starting with __ and the normal name is an alias.  */
14992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14993 choke me
14994 #else
14995 f = $ac_func;
14996 #endif
14997
14998 ; return 0; }
14999 EOF
15000 if { (eval echo configure:15001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15001   rm -rf conftest*
15002   eval "ac_cv_func_$ac_func=yes"
15003 else
15004   echo "configure: failed program was:" >&5
15005   cat conftest.$ac_ext >&5
15006   rm -rf conftest*
15007   eval "ac_cv_func_$ac_func=no"
15008 fi
15009 rm -f conftest*
15010 fi
15011
15012 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15013   echo "$ac_t""yes" 1>&6
15014     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15015   cat >> confdefs.h <<EOF
15016 #define $ac_tr_func 1
15017 EOF
15018  
15019 else
15020   echo "$ac_t""no" 1>&6
15021 fi
15022 done
15023
15024 fi
15025
15026 for ac_func in \
15027         bcopy                   \
15028         closesocket             \
15029         endgrent                \
15030         endpwent                \
15031         flock                   \
15032         getdtablesize   \
15033         getgrgid                \
15034         gethostname             \
15035         getpass                 \
15036         getpwuid                \
15037         getpwnam                \
15038         getspnam                \
15039         gettimeofday    \
15040         initgroups              \
15041         lockf                   \
15042         memcpy                  \
15043         memmove                 \
15044         mkstemp                 \
15045         pipe                    \
15046         read                    \
15047         recv                    \
15048         recvfrom                \
15049         setpwfile               \
15050         setgid                  \
15051         setegid                 \
15052         setsid                  \
15053         setuid                  \
15054         seteuid                 \
15055         sigaction               \
15056         signal                  \
15057         sigset                  \
15058         snprintf                \
15059         strdup                  \
15060         strerror                \
15061         strpbrk                 \
15062         strrchr                 \
15063         strsep                  \
15064         strstr                  \
15065         strtol                  \
15066         strtoul                 \
15067         strspn                  \
15068         sysconf                 \
15069         waitpid                 \
15070         wait4                   \
15071         write                   \
15072         send                    \
15073         sendto                  \
15074
15075 do
15076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15077 echo "configure:15078: checking for $ac_func" >&5
15078 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15079   echo $ac_n "(cached) $ac_c" 1>&6
15080 else
15081   cat > conftest.$ac_ext <<EOF
15082 #line 15083 "configure"
15083 #include "confdefs.h"
15084 /* System header to define __stub macros and hopefully few prototypes,
15085     which can conflict with char $ac_func(); below.  */
15086 #include <assert.h>
15087 /* Override any gcc2 internal prototype to avoid an error.  */
15088 /* We use char because int might match the return type of a gcc2
15089     builtin and then its argument prototype would still apply.  */
15090 char $ac_func();
15091 char (*f)();
15092
15093 int main() {
15094
15095 /* The GNU C library defines this for functions which it implements
15096     to always fail with ENOSYS.  Some functions are actually named
15097     something starting with __ and the normal name is an alias.  */
15098 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15099 choke me
15100 #else
15101 f = $ac_func;
15102 #endif
15103
15104 ; return 0; }
15105 EOF
15106 if { (eval echo configure:15107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15107   rm -rf conftest*
15108   eval "ac_cv_func_$ac_func=yes"
15109 else
15110   echo "configure: failed program was:" >&5
15111   cat conftest.$ac_ext >&5
15112   rm -rf conftest*
15113   eval "ac_cv_func_$ac_func=no"
15114 fi
15115 rm -f conftest*
15116 fi
15117
15118 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15119   echo "$ac_t""yes" 1>&6
15120     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15121   cat >> confdefs.h <<EOF
15122 #define $ac_tr_func 1
15123 EOF
15124  
15125 else
15126   echo "$ac_t""no" 1>&6
15127 fi
15128 done
15129
15130
15131 for ac_func in getopt tempnam
15132 do
15133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15134 echo "configure:15135: checking for $ac_func" >&5
15135 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15136   echo $ac_n "(cached) $ac_c" 1>&6
15137 else
15138   cat > conftest.$ac_ext <<EOF
15139 #line 15140 "configure"
15140 #include "confdefs.h"
15141 /* System header to define __stub macros and hopefully few prototypes,
15142     which can conflict with char $ac_func(); below.  */
15143 #include <assert.h>
15144 /* Override any gcc2 internal prototype to avoid an error.  */
15145 /* We use char because int might match the return type of a gcc2
15146     builtin and then its argument prototype would still apply.  */
15147 char $ac_func();
15148 char (*f)();
15149
15150 int main() {
15151
15152 /* The GNU C library defines this for functions which it implements
15153     to always fail with ENOSYS.  Some functions are actually named
15154     something starting with __ and the normal name is an alias.  */
15155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15156 choke me
15157 #else
15158 f = $ac_func;
15159 #endif
15160
15161 ; return 0; }
15162 EOF
15163 if { (eval echo configure:15164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15164   rm -rf conftest*
15165   eval "ac_cv_func_$ac_func=yes"
15166 else
15167   echo "configure: failed program was:" >&5
15168   cat conftest.$ac_ext >&5
15169   rm -rf conftest*
15170   eval "ac_cv_func_$ac_func=no"
15171 fi
15172 rm -f conftest*
15173 fi
15174
15175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15176   echo "$ac_t""yes" 1>&6
15177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15178   cat >> confdefs.h <<EOF
15179 #define $ac_tr_func 1
15180 EOF
15181  
15182 else
15183   echo "$ac_t""no" 1>&6
15184 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15185 fi
15186 done
15187
15188
15189
15190 if test "$ac_cv_func_getopt" != yes; then
15191     LIBSRCS="$LIBSRCS getopt.c"
15192 fi
15193
15194 if test "$ac_cv_func_tempnam" != yes; then
15195     LIBSRCS="$LIBSRCS tempnam.c"
15196 fi
15197
15198 # Check Configuration
15199 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15200 echo "configure:15201: checking declaration of sys_errlist" >&5
15201 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
15202   echo $ac_n "(cached) $ac_c" 1>&6
15203 else
15204   
15205         cat > conftest.$ac_ext <<EOF
15206 #line 15207 "configure"
15207 #include "confdefs.h"
15208
15209 #include <stdio.h>
15210 #include <sys/types.h>
15211 #include <errno.h>
15212 #ifdef WINNT
15213 #include <stdlib.h>
15214 #endif 
15215 int main() {
15216 char *c = (char *) *sys_errlist
15217 ; return 0; }
15218 EOF
15219 if { (eval echo configure:15220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15220   rm -rf conftest*
15221   ol_cv_dcl_sys_errlist=yes
15222         ol_cv_have_sys_errlist=yes
15223 else
15224   echo "configure: failed program was:" >&5
15225   cat conftest.$ac_ext >&5
15226   rm -rf conftest*
15227   ol_cv_dcl_sys_errlist=no
15228 fi
15229 rm -f conftest*
15230 fi
15231
15232 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15233 #
15234 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15235 if test $ol_cv_dcl_sys_errlist = no ; then
15236         cat >> confdefs.h <<\EOF
15237 #define DECL_SYS_ERRLIST 1
15238 EOF
15239
15240
15241         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15242 echo "configure:15243: checking existence of sys_errlist" >&5
15243 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
15244   echo $ac_n "(cached) $ac_c" 1>&6
15245 else
15246   
15247                 cat > conftest.$ac_ext <<EOF
15248 #line 15249 "configure"
15249 #include "confdefs.h"
15250 #include <errno.h>
15251 int main() {
15252 char *c = (char *) *sys_errlist
15253 ; return 0; }
15254 EOF
15255 if { (eval echo configure:15256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15256   rm -rf conftest*
15257   ol_cv_have_sys_errlist=yes
15258 else
15259   echo "configure: failed program was:" >&5
15260   cat conftest.$ac_ext >&5
15261   rm -rf conftest*
15262   ol_cv_have_sys_errlist=no
15263 fi
15264 rm -f conftest*
15265 fi
15266
15267 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15268 fi
15269 if test $ol_cv_have_sys_errlist = yes ; then
15270         cat >> confdefs.h <<\EOF
15271 #define HAVE_SYS_ERRLIST 1
15272 EOF
15273
15274 fi
15275
15276
15277
15278 if test "$ol_enable_debug" != no ; then
15279         cat >> confdefs.h <<\EOF
15280 #define LDAP_DEBUG 1
15281 EOF
15282
15283 fi
15284 if test "$ol_enable_syslog" = yes ; then
15285         cat >> confdefs.h <<\EOF
15286 #define LDAP_SYSLOG 1
15287 EOF
15288
15289 fi
15290 if test "$ol_enable_libui" = yes ; then
15291         cat >> confdefs.h <<\EOF
15292 #define LDAP_LIBUI 1
15293 EOF
15294
15295 fi
15296 if test "$ol_enable_cache" = no ; then
15297         cat >> confdefs.h <<\EOF
15298 #define LDAP_NOCACHE 1
15299 EOF
15300
15301 fi
15302 if test "$ol_link_kbind" != no ; then
15303         cat >> confdefs.h <<\EOF
15304 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15305 EOF
15306
15307 fi
15308 if test "$ol_enable_dns" != no ; then
15309         cat >> confdefs.h <<\EOF
15310 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
15311 EOF
15312
15313 fi
15314 if test "$ol_enable_proctitle" != no ; then
15315         cat >> confdefs.h <<\EOF
15316 #define LDAP_PROCTITLE 1
15317 EOF
15318
15319 fi
15320 if test "$ol_enable_referrals" != no ; then
15321         cat >> confdefs.h <<\EOF
15322 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15323 EOF
15324
15325 fi
15326 if test "$ol_enable_cldap" != no ; then
15327         cat >> confdefs.h <<\EOF
15328 #define LDAP_CONNECTIONLESS 1
15329 EOF
15330
15331 fi
15332 if test "$ol_enable_ldapi" != no; then
15333         cat >> confdefs.h <<\EOF
15334 #define USE_PF_LOCAL 1
15335 EOF
15336
15337 fi
15338
15339 if test "$ol_enable_cleartext" != no ; then
15340         cat >> confdefs.h <<\EOF
15341 #define SLAPD_CLEARTEXT 1
15342 EOF
15343
15344 fi
15345 if test "$ol_enable_crypt" != no ; then
15346         cat >> confdefs.h <<\EOF
15347 #define SLAPD_CRYPT 1
15348 EOF
15349
15350 fi
15351 if test "$ol_link_kpasswd" != no ; then
15352         cat >> confdefs.h <<\EOF
15353 #define SLAPD_KPASSWD 1
15354 EOF
15355
15356 fi
15357 if test "$ol_link_spasswd" != no ; then
15358         cat >> confdefs.h <<\EOF
15359 #define SLAPD_SPASSWD 1
15360 EOF
15361
15362 fi
15363 if test "$ol_enable_multimaster" != no ; then
15364         cat >> confdefs.h <<\EOF
15365 #define SLAPD_MULTIMASTER 1
15366 EOF
15367
15368 fi
15369 if test "$ol_enable_phonetic" != no ; then
15370         cat >> confdefs.h <<\EOF
15371 #define SLAPD_PHONETIC 1
15372 EOF
15373
15374 fi
15375 if test "$ol_enable_rlookups" != no ; then
15376         cat >> confdefs.h <<\EOF
15377 #define SLAPD_RLOOKUPS 1
15378 EOF
15379
15380 fi
15381 if test "$ol_enable_aci" != no ; then
15382         cat >> confdefs.h <<\EOF
15383 #define SLAPD_ACI_ENABLED 1
15384 EOF
15385
15386 fi
15387
15388 if test "$ol_link_modules" != no ; then
15389         cat >> confdefs.h <<\EOF
15390 #define SLAPD_MODULES 1
15391 EOF
15392
15393         BUILD_SLAPD=yes
15394         SLAPD_MODULES_LDFLAGS="-dlopen self"
15395 fi
15396
15397 if test "$ol_link_bdb2" != no ; then
15398         cat >> confdefs.h <<\EOF
15399 #define SLAPD_BDB2 1
15400 EOF
15401
15402         BUILD_SLAPD=yes
15403         BUILD_BDB2=yes
15404         if test "$ol_with_bdb2_module" != static ; then
15405                 cat >> confdefs.h <<\EOF
15406 #define SLAPD_BDB2_DYNAMIC 1
15407 EOF
15408
15409                 BUILD_BDB2=mod
15410                 BUILD_BDB2_DYNAMIC=shared
15411                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
15412         fi
15413 fi
15414
15415 if test "$ol_enable_ldap" != no ; then
15416         cat >> confdefs.h <<\EOF
15417 #define SLAPD_LDAP 1
15418 EOF
15419
15420         BUILD_SLAPD=yes
15421         BUILD_LDAP=yes
15422         if test "$ol_with_ldap_module" != static ; then
15423                 cat >> confdefs.h <<\EOF
15424 #define SLAPD_LDAP_DYNAMIC 1
15425 EOF
15426
15427                 BUILD_LDAP=mod
15428                 BUILD_LDAP_DYNAMIC=shared
15429                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15430         fi
15431 fi
15432
15433 if test "$ol_link_ldbm" != no ; then
15434         cat >> confdefs.h <<\EOF
15435 #define SLAPD_LDBM 1
15436 EOF
15437
15438         BUILD_SLAPD=yes
15439         BUILD_LDBM=yes
15440         if test "$ol_with_ldbm_module" != static ; then
15441                 cat >> confdefs.h <<\EOF
15442 #define SLAPD_LDBM_DYNAMIC 1
15443 EOF
15444
15445                 BUILD_LDBM=mod
15446                 BUILD_LDBM_DYNAMIC=shared
15447                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15448         fi
15449 fi
15450
15451 if test "$ol_enable_passwd" != no ; then
15452         cat >> confdefs.h <<\EOF
15453 #define SLAPD_PASSWD 1
15454 EOF
15455
15456         BUILD_SLAPD=yes
15457         BUILD_PASSWD=yes
15458         if test "$ol_with_passwd_module" != static ; then
15459                 cat >> confdefs.h <<\EOF
15460 #define SLAPD_PASSWD_DYNAMIC 1
15461 EOF
15462
15463                 BUILD_PASSWD=mod
15464                 BUILD_PASSWD_DYNAMIC=shared
15465                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15466         fi
15467 fi
15468
15469 if test "$ol_link_perl" != no ; then
15470         cat >> confdefs.h <<\EOF
15471 #define SLAPD_PERL 1
15472 EOF
15473
15474         BUILD_SLAPD=yes
15475         BUILD_PERL=yes
15476         if test "$ol_with_perl_module" != static ; then
15477                 cat >> confdefs.h <<\EOF
15478 #define SLAPD_PERL_DYNAMIC 1
15479 EOF
15480
15481                 BUILD_PERL=mod
15482                 BUILD_PERL_DYNAMIC=shared
15483                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15484         fi
15485 fi
15486
15487 if test "$ol_enable_shell" != no ; then
15488         cat >> confdefs.h <<\EOF
15489 #define SLAPD_SHELL 1
15490 EOF
15491
15492         BUILD_SLAPD=yes
15493         BUILD_SHELL=yes
15494         if test "$ol_with_shell_module" != static ; then
15495                 cat >> confdefs.h <<\EOF
15496 #define SLAPD_SHELL_DYNAMIC 1
15497 EOF
15498
15499                 BUILD_SHELL=mod
15500                 BUILD_SHELL_DYNAMIC=shared
15501                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15502         fi
15503 fi
15504
15505 if test "$ol_enable_tcl" != no ; then
15506         cat >> confdefs.h <<\EOF
15507 #define SLAPD_TCL 1
15508 EOF
15509
15510         BUILD_SLAPD=yes
15511         BUILD_TCL=yes
15512         if test "$ol_with_tcl_module" != static; then
15513                 cat >> confdefs.h <<\EOF
15514 #define SLAPD_TCL_DYNAMIC 1
15515 EOF
15516
15517                 BUILD_TCL=mod
15518                 BUILD_TCL_DYNAMIC=shared
15519                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15520         fi
15521 fi
15522
15523 if test "$ol_enable_sql" != no ; then
15524         cat >> confdefs.h <<\EOF
15525 #define SLAPD_SQL 1
15526 EOF
15527
15528         BUILD_SLAPD=yes
15529         BUILD_SQL=yes
15530         SLAPD_SQL_LIBS=-liodbc
15531         if test "$ol_with_sql_module" != static; then
15532                 cat >> confdefs.h <<\EOF
15533 #define SLAPD_SQL_DYNAMIC 1
15534 EOF
15535
15536                 BUILD_SQL=mod
15537                 BUILD_SQL_DYNAMIC=shared
15538                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15539         fi
15540 fi
15541
15542 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15543         $BUILD_SLAPD = yes ; then
15544         BUILD_SLURPD=yes
15545 fi
15546
15547 if test "$ol_link_isode" != no ; then
15548         BUILD_LDAPD=yes
15549 fi
15550
15551
15552 if test "$LINK_BINS_DYNAMIC" = yes; then
15553     LIB_LINKAGE=DYN
15554     LT_LIB_LINKAGE=shared
15555 else
15556     LIB_LINKAGE=STAT
15557     LT_LIB_LINKAGE=static
15558 fi
15559
15560 if test "$ac_cv_mingw32" = yes ; then
15561     PLAT=NT
15562     DYN_EXT=dll
15563 else
15564     PLAT=UNIX
15565     DYN_EXT=so
15566 fi
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577   
15578   
15579   
15580   
15581   
15582   
15583   
15584   
15585   
15586   
15587   
15588   
15589   
15590   
15591   
15592   
15593   
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629 trap '' 1 2 15
15630
15631 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15632
15633 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15634 # Let make expand exec_prefix.
15635 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15636
15637 # Any assignment to VPATH causes Sun make to only execute
15638 # the first set of double-colon rules, so remove it if not needed.
15639 # If there is a colon in the path, we need to keep it.
15640 if test "x$srcdir" = x.; then
15641   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15642 fi
15643
15644 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15645
15646 DEFS=-DHAVE_CONFIG_H
15647
15648 # Without the "./", some shells look in PATH for config.status.
15649 : ${CONFIG_STATUS=./config.status}
15650
15651 echo creating $CONFIG_STATUS
15652 rm -f $CONFIG_STATUS
15653 cat > $CONFIG_STATUS <<EOF
15654 #! /bin/sh
15655 # Generated automatically by configure.
15656 # Run this file to recreate the current configuration.
15657 # This directory was configured as follows,
15658 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15659 #
15660 # $0 $ac_configure_args
15661 #
15662 # Compiler output produced by configure, useful for debugging
15663 # configure, is in ./config.log if it exists.
15664
15665 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15666 for ac_option
15667 do
15668   case "\$ac_option" in
15669   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15670     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15671     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15672   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15673     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
15674     exit 0 ;;
15675   -help | --help | --hel | --he | --h)
15676     echo "\$ac_cs_usage"; exit 0 ;;
15677   *) echo "\$ac_cs_usage"; exit 1 ;;
15678   esac
15679 done
15680
15681 ac_given_srcdir=$srcdir
15682 ac_given_INSTALL="$INSTALL"
15683
15684 trap 'rm -fr `echo "\
15685 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15686 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15687 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15688 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15689 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15690 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15691 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15692 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15693 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15694 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15695 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15696 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15697 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15698 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15699 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15700 include/Makefile:build/top.mk:include/Makefile.in \
15701 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15702 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15703 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15704 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15705 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15706 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15707 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15708 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15709 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15710 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15711 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15712 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15713 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15714 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15715 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15716 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15717 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15718 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15719 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15720 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15721 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15722 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15723 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15724 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15725 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15726 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15727 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15728 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15729  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15730 EOF
15731 cat >> $CONFIG_STATUS <<EOF
15732
15733 # Protect against being on the right side of a sed subst in config.status.
15734 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15735  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15736 $ac_vpsub
15737 $extrasub
15738 s%@SHELL@%$SHELL%g
15739 s%@CFLAGS@%$CFLAGS%g
15740 s%@CPPFLAGS@%$CPPFLAGS%g
15741 s%@CXXFLAGS@%$CXXFLAGS%g
15742 s%@FFLAGS@%$FFLAGS%g
15743 s%@DEFS@%$DEFS%g
15744 s%@LDFLAGS@%$LDFLAGS%g
15745 s%@LIBS@%$LIBS%g
15746 s%@exec_prefix@%$exec_prefix%g
15747 s%@prefix@%$prefix%g
15748 s%@program_transform_name@%$program_transform_name%g
15749 s%@bindir@%$bindir%g
15750 s%@sbindir@%$sbindir%g
15751 s%@libexecdir@%$libexecdir%g
15752 s%@datadir@%$datadir%g
15753 s%@sysconfdir@%$sysconfdir%g
15754 s%@sharedstatedir@%$sharedstatedir%g
15755 s%@localstatedir@%$localstatedir%g
15756 s%@libdir@%$libdir%g
15757 s%@includedir@%$includedir%g
15758 s%@oldincludedir@%$oldincludedir%g
15759 s%@infodir@%$infodir%g
15760 s%@mandir@%$mandir%g
15761 s%@host@%$host%g
15762 s%@host_alias@%$host_alias%g
15763 s%@host_cpu@%$host_cpu%g
15764 s%@host_vendor@%$host_vendor%g
15765 s%@host_os@%$host_os%g
15766 s%@target@%$target%g
15767 s%@target_alias@%$target_alias%g
15768 s%@target_cpu@%$target_cpu%g
15769 s%@target_vendor@%$target_vendor%g
15770 s%@target_os@%$target_os%g
15771 s%@build@%$build%g
15772 s%@build_alias@%$build_alias%g
15773 s%@build_cpu@%$build_cpu%g
15774 s%@build_vendor@%$build_vendor%g
15775 s%@build_os@%$build_os%g
15776 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15777 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15778 s%@INSTALL_DATA@%$INSTALL_DATA%g
15779 s%@PACKAGE@%$PACKAGE%g
15780 s%@VERSION@%$VERSION%g
15781 s%@ACLOCAL@%$ACLOCAL%g
15782 s%@AUTOCONF@%$AUTOCONF%g
15783 s%@AUTOMAKE@%$AUTOMAKE%g
15784 s%@AUTOHEADER@%$AUTOHEADER%g
15785 s%@MAKEINFO@%$MAKEINFO%g
15786 s%@install_sh@%$install_sh%g
15787 s%@AMTAR@%$AMTAR%g
15788 s%@AWK@%$AWK%g
15789 s%@AMTARFLAGS@%$AMTARFLAGS%g
15790 s%@SET_MAKE@%$SET_MAKE%g
15791 s%@top_builddir@%$top_builddir%g
15792 s%@ldap_subdir@%$ldap_subdir%g
15793 s%@CC@%$CC%g
15794 s%@RANLIB@%$RANLIB%g
15795 s%@LD@%$LD%g
15796 s%@NM@%$NM%g
15797 s%@LN_S@%$LN_S%g
15798 s%@DLLTOOL@%$DLLTOOL%g
15799 s%@AS@%$AS%g
15800 s%@OBJDUMP@%$OBJDUMP%g
15801 s%@LIBTOOL@%$LIBTOOL%g
15802 s%@LN_H@%$LN_H%g
15803 s%@SENDMAIL@%$SENDMAIL%g
15804 s%@EDITOR@%$EDITOR%g
15805 s%@FINGER@%$FINGER%g
15806 s%@PERLBIN@%$PERLBIN%g
15807 s%@CPP@%$CPP%g
15808 s%@EXEEXT@%$EXEEXT%g
15809 s%@OBJEXT@%$OBJEXT%g
15810 s%@OL_MKDEP@%$OL_MKDEP%g
15811 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
15812 s%@PEPSY@%$PEPSY%g
15813 s%@LIBOBJS@%$LIBOBJS%g
15814 s%@LIBSRCS@%$LIBSRCS%g
15815 s%@PLAT@%$PLAT%g
15816 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
15817 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
15818 s%@DYN_EXT@%$DYN_EXT%g
15819 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
15820 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
15821 s%@BUILD_BDB2@%$BUILD_BDB2%g
15822 s%@BUILD_LDAP@%$BUILD_LDAP%g
15823 s%@BUILD_LDBM@%$BUILD_LDBM%g
15824 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
15825 s%@BUILD_PERL@%$BUILD_PERL%g
15826 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
15827 s%@BUILD_SHELL@%$BUILD_SHELL%g
15828 s%@BUILD_TCL@%$BUILD_TCL%g
15829 s%@BUILD_SQL@%$BUILD_SQL%g
15830 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
15831 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
15832 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
15833 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
15834 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
15835 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
15836 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
15837 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
15838 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
15839 s%@LDAP_LIBS@%$LDAP_LIBS%g
15840 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
15841 s%@LDIF_LIBS@%$LDIF_LIBS%g
15842 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
15843 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
15844 s%@LDBM_LIBS@%$LDBM_LIBS%g
15845 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
15846 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
15847 s%@WRAP_LIBS@%$WRAP_LIBS%g
15848 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
15849 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
15850 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
15851 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
15852 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
15853 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
15854 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
15855 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
15856 s%@KRB4_LIBS@%$KRB4_LIBS%g
15857 s%@KRB5_LIBS@%$KRB5_LIBS%g
15858 s%@READLINE_LIBS@%$READLINE_LIBS%g
15859 s%@SASL_LIBS@%$SASL_LIBS%g
15860 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
15861 s%@TLS_LIBS@%$TLS_LIBS%g
15862 s%@MODULES_LIBS@%$MODULES_LIBS%g
15863 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
15864 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
15865 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
15866
15867 CEOF
15868 EOF
15869
15870 cat >> $CONFIG_STATUS <<\EOF
15871
15872 # Split the substitutions into bite-sized pieces for seds with
15873 # small command number limits, like on Digital OSF/1 and HP-UX.
15874 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15875 ac_file=1 # Number of current file.
15876 ac_beg=1 # First line for current file.
15877 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15878 ac_more_lines=:
15879 ac_sed_cmds=""
15880 while $ac_more_lines; do
15881   if test $ac_beg -gt 1; then
15882     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15883   else
15884     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15885   fi
15886   if test ! -s conftest.s$ac_file; then
15887     ac_more_lines=false
15888     rm -f conftest.s$ac_file
15889   else
15890     if test -z "$ac_sed_cmds"; then
15891       ac_sed_cmds="sed -f conftest.s$ac_file"
15892     else
15893       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15894     fi
15895     ac_file=`expr $ac_file + 1`
15896     ac_beg=$ac_end
15897     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15898   fi
15899 done
15900 if test -z "$ac_sed_cmds"; then
15901   ac_sed_cmds=cat
15902 fi
15903 EOF
15904
15905 cat >> $CONFIG_STATUS <<EOF
15906
15907 CONFIG_FILES=\${CONFIG_FILES-"\
15908 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15909 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15910 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15911 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15912 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15913 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15914 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15915 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15916 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15917 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15918 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15919 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15920 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15921 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15922 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15923 include/Makefile:build/top.mk:include/Makefile.in \
15924 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15925 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15926 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15927 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15928 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15929 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15930 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15931 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15932 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15933 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15934 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
15935 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15936 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
15937 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15938 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15939 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15940 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15941 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15942 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15943 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15944 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15945 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15946 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15947 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15948 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15949 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15950 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15951 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15952 "}
15953 EOF
15954 cat >> $CONFIG_STATUS <<\EOF
15955 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15956   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15957   case "$ac_file" in
15958   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15959        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15960   *) ac_file_in="${ac_file}.in" ;;
15961   esac
15962
15963   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15964
15965   # Remove last slash and all that follows it.  Not all systems have dirname.
15966   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15967   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15968     # The file is in a subdirectory.
15969     test ! -d "$ac_dir" && mkdir "$ac_dir"
15970     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15971     # A "../" for each directory in $ac_dir_suffix.
15972     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15973   else
15974     ac_dir_suffix= ac_dots=
15975   fi
15976
15977   case "$ac_given_srcdir" in
15978   .)  srcdir=.
15979       if test -z "$ac_dots"; then top_srcdir=.
15980       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15981   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15982   *) # Relative path.
15983     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15984     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15985   esac
15986
15987   case "$ac_given_INSTALL" in
15988   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15989   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15990   esac
15991
15992   echo creating "$ac_file"
15993   rm -f "$ac_file"
15994   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15995   case "$ac_file" in
15996   *[Mm]akefile*) ac_comsub="1i\\
15997 # $configure_input" ;;
15998   *) ac_comsub= ;;
15999   esac
16000
16001   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16002   sed -e "$ac_comsub
16003 s%@configure_input@%$configure_input%g
16004 s%@srcdir@%$srcdir%g
16005 s%@top_srcdir@%$top_srcdir%g
16006 s%@INSTALL@%$INSTALL%g
16007 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16008 fi; done
16009 rm -f conftest.s*
16010
16011 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16012 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16013 #
16014 # ac_d sets the value in "#define NAME VALUE" lines.
16015 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16016 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16017 ac_dC='\3'
16018 ac_dD='%g'
16019 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16020 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16021 ac_uB='\([      ]\)%\1#\2define\3'
16022 ac_uC=' '
16023 ac_uD='\4%g'
16024 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16025 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16026 ac_eB='$%\1#\2define\3'
16027 ac_eC=' '
16028 ac_eD='%g'
16029
16030 if test "${CONFIG_HEADERS+set}" != set; then
16031 EOF
16032 cat >> $CONFIG_STATUS <<EOF
16033   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16034 EOF
16035 cat >> $CONFIG_STATUS <<\EOF
16036 fi
16037 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16038   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16039   case "$ac_file" in
16040   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16041        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16042   *) ac_file_in="${ac_file}.in" ;;
16043   esac
16044
16045   echo creating $ac_file
16046
16047   rm -f conftest.frag conftest.in conftest.out
16048   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16049   cat $ac_file_inputs > conftest.in
16050
16051 EOF
16052
16053 # Transform confdefs.h into a sed script conftest.vals that substitutes
16054 # the proper values into config.h.in to produce config.h.  And first:
16055 # Protect against being on the right side of a sed subst in config.status.
16056 # Protect against being in an unquoted here document in config.status.
16057 rm -f conftest.vals
16058 cat > conftest.hdr <<\EOF
16059 s/[\\&%]/\\&/g
16060 s%[\\$`]%\\&%g
16061 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16062 s%ac_d%ac_u%gp
16063 s%ac_u%ac_e%gp
16064 EOF
16065 sed -n -f conftest.hdr confdefs.h > conftest.vals
16066 rm -f conftest.hdr
16067
16068 # This sed command replaces #undef with comments.  This is necessary, for
16069 # example, in the case of _POSIX_SOURCE, which is predefined and required
16070 # on some systems where configure will not decide to define it.
16071 cat >> conftest.vals <<\EOF
16072 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16073 EOF
16074
16075 # Break up conftest.vals because some shells have a limit on
16076 # the size of here documents, and old seds have small limits too.
16077
16078 rm -f conftest.tail
16079 while :
16080 do
16081   ac_lines=`grep -c . conftest.vals`
16082   # grep -c gives empty output for an empty file on some AIX systems.
16083   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16084   # Write a limited-size here document to conftest.frag.
16085   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16086   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16087   echo 'CEOF
16088   sed -f conftest.frag conftest.in > conftest.out
16089   rm -f conftest.in
16090   mv conftest.out conftest.in
16091 ' >> $CONFIG_STATUS
16092   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16093   rm -f conftest.vals
16094   mv conftest.tail conftest.vals
16095 done
16096 rm -f conftest.vals
16097
16098 cat >> $CONFIG_STATUS <<\EOF
16099   rm -f conftest.frag conftest.h
16100   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16101   cat conftest.in >> conftest.h
16102   rm -f conftest.in
16103   if cmp -s $ac_file conftest.h 2>/dev/null; then
16104     echo "$ac_file is unchanged"
16105     rm -f conftest.h
16106   else
16107     # Remove last slash and all that follows it.  Not all systems have dirname.
16108       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16109       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16110       # The file is in a subdirectory.
16111       test ! -d "$ac_dir" && mkdir "$ac_dir"
16112     fi
16113     rm -f $ac_file
16114     mv conftest.h $ac_file
16115   fi
16116 fi; done
16117
16118 EOF
16119 cat >> $CONFIG_STATUS <<EOF
16120
16121 EOF
16122 cat >> $CONFIG_STATUS <<\EOF
16123
16124 date > stamp-h
16125 echo Please \"make depend\" to build dependencies
16126
16127 exit 0
16128 EOF
16129 chmod +x $CONFIG_STATUS
16130 rm -fr confdefs* $ac_clean_files
16131 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
16132