]> git.sur5r.net Git - openldap/blob - configure
fe48a8e356b018299227ceedabd2f6df35631143
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.311 2000/06/08 22:43:06 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 
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-referrals    enable V2 Referrals extension (yes)"
39 ac_help="$ac_help
40   --enable-kbind        enable V2 Kerberos IV bind (auto)"
41 ac_help="$ac_help
42   --enable-cldap        enable connectionless ldap (no)"
43 ac_help="$ac_help
44   --enable-ldapi        enable domain socket (PF_LOCAL) ldap (no)"
45 ac_help="$ac_help
46   --enable-x-compile    enable cross compiling (no)"
47 ac_help="$ac_help
48   --with-cyrus-sasl     with Cyrus SASL support (auto)"
49 ac_help="$ac_help
50   --with-fetch          with fetch URL support (auto)"
51 ac_help="$ac_help
52   --with-kerberos       with support (auto)"
53 ac_help="$ac_help
54   --with-readline       with readline support (auto)"
55 ac_help="$ac_help
56   --with-threads        use threads (auto)"
57 ac_help="$ac_help
58   --with-tls            with TLS/SSL support (auto)"
59 ac_help="$ac_help
60   --with-yielding-select        with implicitly yielding select (auto)"
61 ac_help="$ac_help
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd        enable building slapd (yes)"
65 ac_help="$ac_help
66     --enable-cleartext  enable cleartext passwords (yes)"
67 ac_help="$ac_help
68     --enable-crypt      enable crypt(3) passwords (auto)"
69 ac_help="$ac_help
70     --enable-kpasswd    enable kerberos password verification (no)"
71 ac_help="$ac_help
72     --enable-spasswd    enable (Cyrus) SASL password verification (no)"
73 ac_help="$ac_help
74     --enable-modules    enable dynamic module support (no)"
75 ac_help="$ac_help
76     --enable-multimaster        enable multimaster replication (no)"
77 ac_help="$ac_help
78     --enable-phonetic   enable phonetic/soundex (no)"
79 ac_help="$ac_help
80     --enable-quipu      build quipu migration tools (no)"
81 ac_help="$ac_help
82     --enable-rlookups   enable reverse lookups (auto)"
83 ac_help="$ac_help
84     --enable-aci        enable per-object ACIs (no)"
85 ac_help="$ac_help
86     --enable-wrappers   enable tcp wrapper support (no)"
87 ac_help="$ac_help
88     --enable-dynamic    enable linking built binaries with dynamic libs (no)"
89 ac_help="$ac_help
90     --enable-dnssrv     enable dnssrv backend (no)"
91 ac_help="$ac_help
92       --with-dnssrv-module      module type (static)"
93 ac_help="$ac_help
94     --enable-ldap       enable ldap backend (no)"
95 ac_help="$ac_help
96       --with-ldap-module        module type (static)"
97 ac_help="$ac_help
98     --enable-ldbm       enable ldbm backend (yes)"
99 ac_help="$ac_help
100       --with-ldbm-api   use LDBM API (auto)"
101 ac_help="$ac_help
102       --with-ldbm-module        module type (static)"
103 ac_help="$ac_help
104       --with-ldbm-type  use LDBM type (auto)"
105 ac_help="$ac_help
106     --enable-passwd     enable passwd backend (no)"
107 ac_help="$ac_help
108       --with-passwd-module      module type (static)"
109 ac_help="$ac_help
110     --enable-perl       enable perl backend (no)"
111 ac_help="$ac_help
112       --with-perl-module        module type (static)"
113 ac_help="$ac_help
114     --enable-shell      enable shell backend (no)"
115 ac_help="$ac_help
116       --with-shell-module       module type (static)"
117 ac_help="$ac_help
118     --enable-sql        enable sql backend (no)"
119 ac_help="$ac_help
120       --with-sql-module module type (static)"
121 ac_help="$ac_help
122     --enable-tcl        enable tcl backend (no)"
123 ac_help="$ac_help
124       --with-tcl-module module type (static)"
125 ac_help="$ac_help
126 SLURPD (Replication Daemon) Options:"
127 ac_help="$ac_help
128   --enable-slurpd       enable building slurpd (auto)"
129 ac_help="$ac_help
130 Library Generation & Linking Options"
131 ac_help="$ac_help
132   --enable-static[=PKGS]  build static libraries [default=yes]"
133 ac_help="$ac_help
134   --enable-shared[=PKGS]  build shared libraries [default=yes]"
135 ac_help="$ac_help
136   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
137 ac_help="$ac_help
138   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
139 ac_help="$ac_help
140   --disable-libtool-lock  avoid locking (might break parallel builds)"
141
142 # Initialize some variables set by options.
143 # The variables have the same names as the options, with
144 # dashes changed to underlines.
145 build=NONE
146 cache_file=./config.cache
147 exec_prefix=NONE
148 host=NONE
149 no_create=
150 nonopt=NONE
151 no_recursion=
152 prefix=NONE
153 program_prefix=NONE
154 program_suffix=NONE
155 program_transform_name=s,x,x,
156 silent=
157 site=
158 srcdir=
159 target=NONE
160 verbose=
161 x_includes=NONE
162 x_libraries=NONE
163 bindir='${exec_prefix}/bin'
164 sbindir='${exec_prefix}/sbin'
165 libexecdir='${exec_prefix}/libexec'
166 datadir='${prefix}/share'
167 sysconfdir='${prefix}/etc'
168 sharedstatedir='${prefix}/com'
169 localstatedir='${prefix}/var'
170 libdir='${exec_prefix}/lib'
171 includedir='${prefix}/include'
172 oldincludedir='/usr/include'
173 infodir='${prefix}/info'
174 mandir='${prefix}/man'
175
176 # Initialize some other variables.
177 subdirs=
178 MFLAGS= MAKEFLAGS=
179 SHELL=${CONFIG_SHELL-/bin/sh}
180 # Maximum number of lines to put in a shell here document.
181 ac_max_here_lines=12
182
183 ac_prev=
184 for ac_option
185 do
186
187   # If the previous option needs an argument, assign it.
188   if test -n "$ac_prev"; then
189     eval "$ac_prev=\$ac_option"
190     ac_prev=
191     continue
192   fi
193
194   case "$ac_option" in
195   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
196   *) ac_optarg= ;;
197   esac
198
199   # Accept the important Cygnus configure options, so we can diagnose typos.
200
201   case "$ac_option" in
202
203   -bindir | --bindir | --bindi | --bind | --bin | --bi)
204     ac_prev=bindir ;;
205   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
206     bindir="$ac_optarg" ;;
207
208   -build | --build | --buil | --bui | --bu)
209     ac_prev=build ;;
210   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
211     build="$ac_optarg" ;;
212
213   -cache-file | --cache-file | --cache-fil | --cache-fi \
214   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
215     ac_prev=cache_file ;;
216   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
217   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
218     cache_file="$ac_optarg" ;;
219
220   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
221     ac_prev=datadir ;;
222   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
223   | --da=*)
224     datadir="$ac_optarg" ;;
225
226   -disable-* | --disable-*)
227     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
228     # Reject names that are not valid shell variable names.
229     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
230       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
231     fi
232     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
233     eval "enable_${ac_feature}=no" ;;
234
235   -enable-* | --enable-*)
236     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
237     # Reject names that are not valid shell variable names.
238     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
239       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
240     fi
241     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
242     case "$ac_option" in
243       *=*) ;;
244       *) ac_optarg=yes ;;
245     esac
246     eval "enable_${ac_feature}='$ac_optarg'" ;;
247
248   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
249   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
250   | --exec | --exe | --ex)
251     ac_prev=exec_prefix ;;
252   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
253   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
254   | --exec=* | --exe=* | --ex=*)
255     exec_prefix="$ac_optarg" ;;
256
257   -gas | --gas | --ga | --g)
258     # Obsolete; use --with-gas.
259     with_gas=yes ;;
260
261   -help | --help | --hel | --he)
262     # Omit some internal or obsolete options to make the list less imposing.
263     # This message is too long to be a string in the A/UX 3.1 sh.
264     cat << EOF
265 Usage: configure [options] [host]
266 Options: [defaults in brackets after descriptions]
267 Configuration:
268   --cache-file=FILE       cache test results in FILE
269   --help                  print this message
270   --no-create             do not create output files
271   --quiet, --silent       do not print \`checking...' messages
272   --version               print the version of autoconf that created configure
273 Directory and file names:
274   --prefix=PREFIX         install architecture-independent files in PREFIX
275                           [$ac_default_prefix]
276   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
277                           [same as prefix]
278   --bindir=DIR            user executables in DIR [EPREFIX/bin]
279   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
280   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
281   --datadir=DIR           read-only architecture-independent data in DIR
282                           [PREFIX/share]
283   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
284   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
285                           [PREFIX/com]
286   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
287   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
288   --includedir=DIR        C header files in DIR [PREFIX/include]
289   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
290   --infodir=DIR           info documentation in DIR [PREFIX/info]
291   --mandir=DIR            man documentation in DIR [PREFIX/man]
292   --srcdir=DIR            find the sources in DIR [configure dir or ..]
293   --program-prefix=PREFIX prepend PREFIX to installed program names
294   --program-suffix=SUFFIX append SUFFIX to installed program names
295   --program-transform-name=PROGRAM
296                           run sed PROGRAM on installed program names
297 EOF
298     cat << EOF
299 Host type:
300   --build=BUILD           configure for building on BUILD [BUILD=HOST]
301   --host=HOST             configure for HOST [guessed]
302   --target=TARGET         configure for TARGET [TARGET=HOST]
303 Features and packages:
304   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
305   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
306   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
307   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
308   --x-includes=DIR        X include files are in DIR
309   --x-libraries=DIR       X library files are in DIR
310 EOF
311     if test -n "$ac_help"; then
312       echo "--enable and --with options recognized:$ac_help"
313     fi
314     exit 0 ;;
315
316   -host | --host | --hos | --ho)
317     ac_prev=host ;;
318   -host=* | --host=* | --hos=* | --ho=*)
319     host="$ac_optarg" ;;
320
321   -includedir | --includedir | --includedi | --included | --include \
322   | --includ | --inclu | --incl | --inc)
323     ac_prev=includedir ;;
324   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
325   | --includ=* | --inclu=* | --incl=* | --inc=*)
326     includedir="$ac_optarg" ;;
327
328   -infodir | --infodir | --infodi | --infod | --info | --inf)
329     ac_prev=infodir ;;
330   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
331     infodir="$ac_optarg" ;;
332
333   -libdir | --libdir | --libdi | --libd)
334     ac_prev=libdir ;;
335   -libdir=* | --libdir=* | --libdi=* | --libd=*)
336     libdir="$ac_optarg" ;;
337
338   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
339   | --libexe | --libex | --libe)
340     ac_prev=libexecdir ;;
341   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
342   | --libexe=* | --libex=* | --libe=*)
343     libexecdir="$ac_optarg" ;;
344
345   -localstatedir | --localstatedir | --localstatedi | --localstated \
346   | --localstate | --localstat | --localsta | --localst \
347   | --locals | --local | --loca | --loc | --lo)
348     ac_prev=localstatedir ;;
349   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
350   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
351   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
352     localstatedir="$ac_optarg" ;;
353
354   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
355     ac_prev=mandir ;;
356   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
357     mandir="$ac_optarg" ;;
358
359   -nfp | --nfp | --nf)
360     # Obsolete; use --without-fp.
361     with_fp=no ;;
362
363   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
364   | --no-cr | --no-c)
365     no_create=yes ;;
366
367   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
368   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
369     no_recursion=yes ;;
370
371   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
372   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
373   | --oldin | --oldi | --old | --ol | --o)
374     ac_prev=oldincludedir ;;
375   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
376   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
377   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
378     oldincludedir="$ac_optarg" ;;
379
380   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
381     ac_prev=prefix ;;
382   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
383     prefix="$ac_optarg" ;;
384
385   -program-prefix | --program-prefix | --program-prefi | --program-pref \
386   | --program-pre | --program-pr | --program-p)
387     ac_prev=program_prefix ;;
388   -program-prefix=* | --program-prefix=* | --program-prefi=* \
389   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
390     program_prefix="$ac_optarg" ;;
391
392   -program-suffix | --program-suffix | --program-suffi | --program-suff \
393   | --program-suf | --program-su | --program-s)
394     ac_prev=program_suffix ;;
395   -program-suffix=* | --program-suffix=* | --program-suffi=* \
396   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
397     program_suffix="$ac_optarg" ;;
398
399   -program-transform-name | --program-transform-name \
400   | --program-transform-nam | --program-transform-na \
401   | --program-transform-n | --program-transform- \
402   | --program-transform | --program-transfor \
403   | --program-transfo | --program-transf \
404   | --program-trans | --program-tran \
405   | --progr-tra | --program-tr | --program-t)
406     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
415
416   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
417   | -silent | --silent | --silen | --sile | --sil)
418     silent=yes ;;
419
420   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
421     ac_prev=sbindir ;;
422   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
423   | --sbi=* | --sb=*)
424     sbindir="$ac_optarg" ;;
425
426   -sharedstatedir | --sharedstatedir | --sharedstatedi \
427   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
428   | --sharedst | --shareds | --shared | --share | --shar \
429   | --sha | --sh)
430     ac_prev=sharedstatedir ;;
431   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
432   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
433   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
434   | --sha=* | --sh=*)
435     sharedstatedir="$ac_optarg" ;;
436
437   -site | --site | --sit)
438     ac_prev=site ;;
439   -site=* | --site=* | --sit=*)
440     site="$ac_optarg" ;;
441
442   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
443     ac_prev=srcdir ;;
444   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
445     srcdir="$ac_optarg" ;;
446
447   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
448   | --syscon | --sysco | --sysc | --sys | --sy)
449     ac_prev=sysconfdir ;;
450   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
451   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
452     sysconfdir="$ac_optarg" ;;
453
454   -target | --target | --targe | --targ | --tar | --ta | --t)
455     ac_prev=target ;;
456   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
457     target="$ac_optarg" ;;
458
459   -v | -verbose | --verbose | --verbos | --verbo | --verb)
460     verbose=yes ;;
461
462   -version | --version | --versio | --versi | --vers)
463     echo "configure generated by autoconf version 2.13"
464     exit 0 ;;
465
466   -with-* | --with-*)
467     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
468     # Reject names that are not valid shell variable names.
469     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
470       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
471     fi
472     ac_package=`echo $ac_package| sed 's/-/_/g'`
473     case "$ac_option" in
474       *=*) ;;
475       *) ac_optarg=yes ;;
476     esac
477     eval "with_${ac_package}='$ac_optarg'" ;;
478
479   -without-* | --without-*)
480     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
481     # Reject names that are not valid shell variable names.
482     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
483       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
484     fi
485     ac_package=`echo $ac_package| sed 's/-/_/g'`
486     eval "with_${ac_package}=no" ;;
487
488   --x)
489     # Obsolete; use --with-x.
490     with_x=yes ;;
491
492   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
493   | --x-incl | --x-inc | --x-in | --x-i)
494     ac_prev=x_includes ;;
495   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
496   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
497     x_includes="$ac_optarg" ;;
498
499   -x-libraries | --x-libraries | --x-librarie | --x-librari \
500   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
501     ac_prev=x_libraries ;;
502   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
503   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
504     x_libraries="$ac_optarg" ;;
505
506   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
507     ;;
508
509   *)
510     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
511       echo "configure: warning: $ac_option: invalid host type" 1>&2
512     fi
513     if test "x$nonopt" != xNONE; then
514       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
515     fi
516     nonopt="$ac_option"
517     ;;
518
519   esac
520 done
521
522 if test -n "$ac_prev"; then
523   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
524 fi
525
526 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
527
528 # File descriptor usage:
529 # 0 standard input
530 # 1 file creation
531 # 2 errors and warnings
532 # 3 some systems may open it to /dev/tty
533 # 4 used on the Kubota Titan
534 # 6 checking for... messages and results
535 # 5 compiler messages saved in config.log
536 if test "$silent" = yes; then
537   exec 6>/dev/null
538 else
539   exec 6>&1
540 fi
541 exec 5>./config.log
542
543 echo "\
544 This file contains any messages produced by compilers while
545 running configure, to aid debugging if configure makes a mistake.
546 " 1>&5
547
548 # Strip out --no-create and --no-recursion so they do not pile up.
549 # Also quote any args containing shell metacharacters.
550 ac_configure_args=
551 for ac_arg
552 do
553   case "$ac_arg" in
554   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
555   | --no-cr | --no-c) ;;
556   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
557   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
558   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
559   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
560   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
561   esac
562 done
563
564 # NLS nuisances.
565 # Only set these to C if already set.  These must not be set unconditionally
566 # because not all systems understand e.g. LANG=C (notably SCO).
567 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
568 # Non-C LC_CTYPE values break the ctype check.
569 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
570 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
571 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
572 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
573
574 # confdefs.h avoids OS command line length limits that DEFS can exceed.
575 rm -rf conftest* confdefs.h
576 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
577 echo > confdefs.h
578
579 # A filename unique to this package, relative to the directory that
580 # configure is in, which we can look for to find out if srcdir is correct.
581 ac_unique_file=build/version
582
583 # Find the source files, if location was not specified.
584 if test -z "$srcdir"; then
585   ac_srcdir_defaulted=yes
586   # Try the directory containing this script, then its parent.
587   ac_prog=$0
588   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
589   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
590   srcdir=$ac_confdir
591   if test ! -r $srcdir/$ac_unique_file; then
592     srcdir=..
593   fi
594 else
595   ac_srcdir_defaulted=no
596 fi
597 if test ! -r $srcdir/$ac_unique_file; then
598   if test "$ac_srcdir_defaulted" = yes; then
599     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
600   else
601     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
602   fi
603 fi
604 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
605
606 # Prefer explicitly selected file to automatically selected ones.
607 if test -z "$CONFIG_SITE"; then
608   if test "x$prefix" != xNONE; then
609     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
610   else
611     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
612   fi
613 fi
614 for ac_site_file in $CONFIG_SITE; do
615   if test -r "$ac_site_file"; then
616     echo "loading site script $ac_site_file"
617     . "$ac_site_file"
618   fi
619 done
620
621
622 ac_ext=c
623 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
624 ac_cpp='$CPP $CPPFLAGS'
625 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
626 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
627 cross_compiling=$ac_cv_prog_cc_cross
628
629 ac_exeext=
630 ac_objext=o
631 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
632   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
633   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
634     ac_n= ac_c='
635 ' ac_t='        '
636   else
637     ac_n=-n ac_c= ac_t=
638   fi
639 else
640   ac_n= ac_c='\c' ac_t=
641 fi
642
643
644 # set unset (borrowed from autoconf 2.14a)
645 if (unset FOO) >/dev/null 2>&1; then
646   ol_unset=unset
647 else
648   ol_unset=false
649 fi
650 # unset CDPATH
651 $ol_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH
652
653 ac_aux_dir=
654 for ac_dir in build $srcdir/build; do
655   if test -f $ac_dir/install-sh; then
656     ac_aux_dir=$ac_dir
657     ac_install_sh="$ac_aux_dir/install-sh -c"
658     break
659   elif test -f $ac_dir/install.sh; then
660     ac_aux_dir=$ac_dir
661     ac_install_sh="$ac_aux_dir/install.sh -c"
662     break
663   fi
664 done
665 if test -z "$ac_aux_dir"; then
666   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
667 fi
668 ac_config_guess=$ac_aux_dir/config.guess
669 ac_config_sub=$ac_aux_dir/config.sub
670 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
671
672 OL_VERSION=`cat $ac_aux_dir/version`
673 if test -z "$OL_VERSION"; then
674         { echo "configure: error: could not determine version" 1>&2; exit 1; }
675 fi
676
677 echo "Configuring OpenLDAP $OL_VERSION ..."
678
679
680 # Do some error checking and defaulting for the host and target type.
681 # The inputs are:
682 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
683 #
684 # The rules are:
685 # 1. You are not allowed to specify --host, --target, and nonopt at the
686 #    same time.
687 # 2. Host defaults to nonopt.
688 # 3. If nonopt is not specified, then host defaults to the current host,
689 #    as determined by config.guess.
690 # 4. Target and build default to nonopt.
691 # 5. If nonopt is not specified, then target and build default to host.
692
693 # The aliases save the names the user supplied, while $host etc.
694 # will get canonicalized.
695 case $host---$target---$nonopt in
696 NONE---*---* | *---NONE---* | *---*---NONE) ;;
697 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
698 esac
699
700
701 # Make sure we can run config.sub.
702 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
703 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
704 fi
705
706 echo $ac_n "checking host system type""... $ac_c" 1>&6
707 echo "configure:708: checking host system type" >&5
708
709 host_alias=$host
710 case "$host_alias" in
711 NONE)
712   case $nonopt in
713   NONE)
714     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
715     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
716     fi ;;
717   *) host_alias=$nonopt ;;
718   esac ;;
719 esac
720
721 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
722 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
723 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
724 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
725 echo "$ac_t""$host" 1>&6
726
727 echo $ac_n "checking target system type""... $ac_c" 1>&6
728 echo "configure:729: checking target system type" >&5
729
730 target_alias=$target
731 case "$target_alias" in
732 NONE)
733   case $nonopt in
734   NONE) target_alias=$host_alias ;;
735   *) target_alias=$nonopt ;;
736   esac ;;
737 esac
738
739 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
740 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
741 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
742 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
743 echo "$ac_t""$target" 1>&6
744
745 echo $ac_n "checking build system type""... $ac_c" 1>&6
746 echo "configure:747: checking build system type" >&5
747
748 build_alias=$build
749 case "$build_alias" in
750 NONE)
751   case $nonopt in
752   NONE) build_alias=$host_alias ;;
753   *) build_alias=$nonopt ;;
754   esac ;;
755 esac
756
757 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
758 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
759 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
760 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
761 echo "$ac_t""$build" 1>&6
762
763 test "$host_alias" != "$target_alias" &&
764   test "$program_prefix$program_suffix$program_transform_name" = \
765     NONENONEs,x,x, &&
766   program_prefix=${target_alias}-
767
768
769 # Find a good install program.  We prefer a C program (faster),
770 # so one script is as good as another.  But avoid the broken or
771 # incompatible versions:
772 # SysV /etc/install, /usr/sbin/install
773 # SunOS /usr/etc/install
774 # IRIX /sbin/install
775 # AIX /bin/install
776 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
777 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
778 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
779 # ./install, which can be erroneously created by make from ./install.sh.
780 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
781 echo "configure:782: checking for a BSD compatible install" >&5
782 if test -z "$INSTALL"; then
783 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
784   echo $ac_n "(cached) $ac_c" 1>&6
785 else
786     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
787   for ac_dir in $PATH; do
788     # Account for people who put trailing slashes in PATH elements.
789     case "$ac_dir/" in
790     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
791     *)
792       # OSF1 and SCO ODT 3.0 have their own names for install.
793       # Don't use installbsd from OSF since it installs stuff as root
794       # by default.
795       for ac_prog in ginstall scoinst install; do
796         if test -f $ac_dir/$ac_prog; then
797           if test $ac_prog = install &&
798             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
799             # AIX install.  It has an incompatible calling convention.
800             :
801           else
802             ac_cv_path_install="$ac_dir/$ac_prog -c"
803             break 2
804           fi
805         fi
806       done
807       ;;
808     esac
809   done
810   IFS="$ac_save_IFS"
811
812 fi
813   if test "${ac_cv_path_install+set}" = set; then
814     INSTALL="$ac_cv_path_install"
815   else
816     # As a last resort, use the slow shell script.  We don't cache a
817     # path for INSTALL within a source directory, because that will
818     # break other packages using the cache if that directory is
819     # removed, or if the path is relative.
820     INSTALL="$ac_install_sh"
821   fi
822 fi
823 echo "$ac_t""$INSTALL" 1>&6
824
825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
826 # It thinks the first close brace ends the variable substitution.
827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
828
829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
830
831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
832
833 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
834 echo "configure:835: checking whether build environment is sane" >&5
835 # Just in case
836 sleep 1
837 echo timestamp > conftestfile
838 # Do `set' in a subshell so we don't clobber the current shell's
839 # arguments.  Must try -L first in case configure is actually a
840 # symlink; some systems play weird games with the mod time of symlinks
841 # (eg FreeBSD returns the mod time of the symlink's containing
842 # directory).
843 if (
844    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
845    if test "$*" = "X"; then
846       # -L didn't work.
847       set X `ls -t $srcdir/configure conftestfile`
848    fi
849    if test "$*" != "X $srcdir/configure conftestfile" \
850       && test "$*" != "X conftestfile $srcdir/configure"; then
851
852       # If neither matched, then we have a broken ls.  This can happen
853       # if, for instance, CONFIG_SHELL is bash and it inherits a
854       # broken ls alias from the environment.  This has actually
855       # happened.  Such a system could not be considered "sane".
856       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
857 alias in your environment" 1>&2; exit 1; }
858    fi
859
860    test "$2" = conftestfile
861    )
862 then
863    # Ok.
864    :
865 else
866    { echo "configure: error: newly created file is older than distributed files!
867 Check your system clock" 1>&2; exit 1; }
868 fi
869 rm -f conftest*
870 echo "$ac_t""yes" 1>&6
871 if test "$program_transform_name" = s,x,x,; then
872   program_transform_name=
873 else
874   # Double any \ or $.  echo might interpret backslashes.
875   cat <<\EOF_SED > conftestsed
876 s,\\,\\\\,g; s,\$,$$,g
877 EOF_SED
878   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
879   rm -f conftestsed
880 fi
881 test "$program_prefix" != NONE &&
882   program_transform_name="s,^,${program_prefix},; $program_transform_name"
883 # Use a double $ so make ignores it.
884 test "$program_suffix" != NONE &&
885   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
886
887 # sed with no file args requires a program.
888 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
889
890 for ac_prog in gawk mawk nawk awk
891 do
892 # Extract the first word of "$ac_prog", so it can be a program name with args.
893 set dummy $ac_prog; ac_word=$2
894 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
895 echo "configure:896: checking for $ac_word" >&5
896 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
897   echo $ac_n "(cached) $ac_c" 1>&6
898 else
899   if test -n "$AWK"; then
900   ac_cv_prog_AWK="$AWK" # Let the user override the test.
901 else
902   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
903   ac_dummy="$PATH"
904   for ac_dir in $ac_dummy; do
905     test -z "$ac_dir" && ac_dir=.
906     if test -f $ac_dir/$ac_word; then
907       ac_cv_prog_AWK="$ac_prog"
908       break
909     fi
910   done
911   IFS="$ac_save_ifs"
912 fi
913 fi
914 AWK="$ac_cv_prog_AWK"
915 if test -n "$AWK"; then
916   echo "$ac_t""$AWK" 1>&6
917 else
918   echo "$ac_t""no" 1>&6
919 fi
920
921 test -n "$AWK" && break
922 done
923
924 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
925 echo "configure:926: checking whether ${MAKE-make} sets \${MAKE}" >&5
926 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
927 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
928   echo $ac_n "(cached) $ac_c" 1>&6
929 else
930   cat > conftestmake <<\EOF
931 all:
932         @echo 'ac_maketemp="${MAKE}"'
933 EOF
934 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
935 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
936 if test -n "$ac_maketemp"; then
937   eval ac_cv_prog_make_${ac_make}_set=yes
938 else
939   eval ac_cv_prog_make_${ac_make}_set=no
940 fi
941 rm -f conftestmake
942 fi
943 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
944   echo "$ac_t""yes" 1>&6
945   SET_MAKE=
946 else
947   echo "$ac_t""no" 1>&6
948   SET_MAKE="MAKE=${MAKE-make}"
949 fi
950
951
952
953 PACKAGE=OpenLDAP
954
955 VERSION=$OL_VERSION
956
957 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
958   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
959 fi
960
961
962
963 missing_dir=`cd $ac_aux_dir && pwd`
964 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
965 echo "configure:966: checking for working aclocal" >&5
966 # Run test in a subshell; some versions of sh will print an error if
967 # an executable is not found, even if stderr is redirected.
968 # Redirect stdin to placate older versions of autoconf.  Sigh.
969 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
970    ACLOCAL=aclocal
971    echo "$ac_t""found" 1>&6
972 else
973    ACLOCAL="$missing_dir/missing aclocal"
974    echo "$ac_t""missing" 1>&6
975 fi
976
977 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
978 echo "configure:979: checking for working autoconf" >&5
979 # Run test in a subshell; some versions of sh will print an error if
980 # an executable is not found, even if stderr is redirected.
981 # Redirect stdin to placate older versions of autoconf.  Sigh.
982 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
983    AUTOCONF=autoconf
984    echo "$ac_t""found" 1>&6
985 else
986    AUTOCONF="$missing_dir/missing autoconf"
987    echo "$ac_t""missing" 1>&6
988 fi
989
990 echo $ac_n "checking for working automake""... $ac_c" 1>&6
991 echo "configure:992: checking for working automake" >&5
992 # Run test in a subshell; some versions of sh will print an error if
993 # an executable is not found, even if stderr is redirected.
994 # Redirect stdin to placate older versions of autoconf.  Sigh.
995 if (automake --version) < /dev/null > /dev/null 2>&1; then
996    AUTOMAKE=automake
997    echo "$ac_t""found" 1>&6
998 else
999    AUTOMAKE="$missing_dir/missing automake"
1000    echo "$ac_t""missing" 1>&6
1001 fi
1002
1003 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1004 echo "configure:1005: checking for working autoheader" >&5
1005 # Run test in a subshell; some versions of sh will print an error if
1006 # an executable is not found, even if stderr is redirected.
1007 # Redirect stdin to placate older versions of autoconf.  Sigh.
1008 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1009    AUTOHEADER=autoheader
1010    echo "$ac_t""found" 1>&6
1011 else
1012    AUTOHEADER="$missing_dir/missing autoheader"
1013    echo "$ac_t""missing" 1>&6
1014 fi
1015
1016 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1017 echo "configure:1018: checking for working makeinfo" >&5
1018 # Run test in a subshell; some versions of sh will print an error if
1019 # an executable is not found, even if stderr is redirected.
1020 # Redirect stdin to placate older versions of autoconf.  Sigh.
1021 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1022    MAKEINFO=makeinfo
1023    echo "$ac_t""found" 1>&6
1024 else
1025    MAKEINFO="$missing_dir/missing makeinfo"
1026    echo "$ac_t""missing" 1>&6
1027 fi
1028
1029 install_sh="$missing_dir/install-sh"
1030 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1031
1032 for ac_prog in gnutar gtar tar
1033 do
1034 # Extract the first word of "$ac_prog", so it can be a program name with args.
1035 set dummy $ac_prog; ac_word=$2
1036 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1037 echo "configure:1038: checking for $ac_word" >&5
1038 if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
1039   echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041   if test -n "$AMTAR"; then
1042   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1043 else
1044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1045   ac_dummy="$PATH"
1046   for ac_dir in $ac_dummy; do
1047     test -z "$ac_dir" && ac_dir=.
1048     if test -f $ac_dir/$ac_word; then
1049       ac_cv_prog_AMTAR="$ac_prog"
1050       break
1051     fi
1052   done
1053   IFS="$ac_save_ifs"
1054 fi
1055 fi
1056 AMTAR="$ac_cv_prog_AMTAR"
1057 if test -n "$AMTAR"; then
1058   echo "$ac_t""$AMTAR" 1>&6
1059 else
1060   echo "$ac_t""no" 1>&6
1061 fi
1062
1063 test -n "$AMTAR" && break
1064 done
1065
1066
1067 AMTARFLAGS=
1068 if test -n "$AMTAR"; then
1069   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1070         AMTARFLAGS=o
1071   fi
1072 fi
1073
1074
1075
1076 cat >> confdefs.h <<EOF
1077 #define OPENLDAP_PACKAGE "$PACKAGE"
1078 EOF
1079
1080 cat >> confdefs.h <<EOF
1081 #define OPENLDAP_VERSION "$VERSION"
1082 EOF
1083
1084
1085
1086
1087 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1088 echo "configure:1089: checking configure arguments" >&5
1089
1090
1091 top_builddir=`pwd`
1092
1093 ldap_subdir="/openldap"
1094
1095 # Check whether --with-subdir or --without-subdir was given.
1096 if test "${with_subdir+set}" = set; then
1097   withval="$with_subdir"
1098   case "$withval" in
1099         no) ldap_subdir=""
1100                 ;;
1101         yes)
1102                 ;;
1103         /*|\\*)
1104                 ldap_subdir="$withval"
1105                 ;;
1106         *)
1107                 ldap_subdir="/$withval"
1108                 ;;
1109 esac
1110
1111 fi
1112
1113
1114 # OpenLDAP --enable-debug
1115         # Check whether --enable-debug or --disable-debug was given.
1116 if test "${enable_debug+set}" = set; then
1117   enableval="$enable_debug"
1118   
1119         ol_arg=invalid
1120         for ol_val in auto yes no ; do
1121                 if test "$enableval" = "$ol_val" ; then
1122                         ol_arg="$ol_val"
1123                 fi
1124         done
1125         if test "$ol_arg" = "invalid" ; then
1126                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1127         fi
1128         ol_enable_debug="$ol_arg"
1129
1130 else
1131         ol_enable_debug="yes"
1132 fi
1133 # end --enable-debug
1134 # OpenLDAP --enable-syslog
1135         # Check whether --enable-syslog or --disable-syslog was given.
1136 if test "${enable_syslog+set}" = set; then
1137   enableval="$enable_syslog"
1138   
1139         ol_arg=invalid
1140         for ol_val in auto yes no ; do
1141                 if test "$enableval" = "$ol_val" ; then
1142                         ol_arg="$ol_val"
1143                 fi
1144         done
1145         if test "$ol_arg" = "invalid" ; then
1146                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1147         fi
1148         ol_enable_syslog="$ol_arg"
1149
1150 else
1151         ol_enable_syslog="auto"
1152 fi
1153 # end --enable-syslog
1154 # OpenLDAP --enable-proctitle
1155         # Check whether --enable-proctitle or --disable-proctitle was given.
1156 if test "${enable_proctitle+set}" = set; then
1157   enableval="$enable_proctitle"
1158   
1159         ol_arg=invalid
1160         for ol_val in auto yes no ; do
1161                 if test "$enableval" = "$ol_val" ; then
1162                         ol_arg="$ol_val"
1163                 fi
1164         done
1165         if test "$ol_arg" = "invalid" ; then
1166                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1167         fi
1168         ol_enable_proctitle="$ol_arg"
1169
1170 else
1171         ol_enable_proctitle="yes"
1172 fi
1173 # end --enable-proctitle
1174 # OpenLDAP --enable-cache
1175         # Check whether --enable-cache or --disable-cache was given.
1176 if test "${enable_cache+set}" = set; then
1177   enableval="$enable_cache"
1178   
1179         ol_arg=invalid
1180         for ol_val in auto yes no ; do
1181                 if test "$enableval" = "$ol_val" ; then
1182                         ol_arg="$ol_val"
1183                 fi
1184         done
1185         if test "$ol_arg" = "invalid" ; then
1186                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1187         fi
1188         ol_enable_cache="$ol_arg"
1189
1190 else
1191         ol_enable_cache="yes"
1192 fi
1193 # end --enable-cache
1194 # OpenLDAP --enable-referrals
1195         # Check whether --enable-referrals or --disable-referrals was given.
1196 if test "${enable_referrals+set}" = set; then
1197   enableval="$enable_referrals"
1198   
1199         ol_arg=invalid
1200         for ol_val in auto yes no ; do
1201                 if test "$enableval" = "$ol_val" ; then
1202                         ol_arg="$ol_val"
1203                 fi
1204         done
1205         if test "$ol_arg" = "invalid" ; then
1206                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1207         fi
1208         ol_enable_referrals="$ol_arg"
1209
1210 else
1211         ol_enable_referrals="yes"
1212 fi
1213 # end --enable-referrals
1214 # OpenLDAP --enable-kbind
1215         # Check whether --enable-kbind or --disable-kbind was given.
1216 if test "${enable_kbind+set}" = set; then
1217   enableval="$enable_kbind"
1218   
1219         ol_arg=invalid
1220         for ol_val in auto yes no ; do
1221                 if test "$enableval" = "$ol_val" ; then
1222                         ol_arg="$ol_val"
1223                 fi
1224         done
1225         if test "$ol_arg" = "invalid" ; then
1226                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1227         fi
1228         ol_enable_kbind="$ol_arg"
1229
1230 else
1231         ol_enable_kbind="auto"
1232 fi
1233 # end --enable-kbind
1234 # OpenLDAP --enable-cldap
1235         # Check whether --enable-cldap or --disable-cldap was given.
1236 if test "${enable_cldap+set}" = set; then
1237   enableval="$enable_cldap"
1238   
1239         ol_arg=invalid
1240         for ol_val in auto yes no ; do
1241                 if test "$enableval" = "$ol_val" ; then
1242                         ol_arg="$ol_val"
1243                 fi
1244         done
1245         if test "$ol_arg" = "invalid" ; then
1246                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1247         fi
1248         ol_enable_cldap="$ol_arg"
1249
1250 else
1251         ol_enable_cldap="no"
1252 fi
1253 # end --enable-cldap
1254 # OpenLDAP --enable-ldapi
1255         # Check whether --enable-ldapi or --disable-ldapi was given.
1256 if test "${enable_ldapi+set}" = set; then
1257   enableval="$enable_ldapi"
1258   
1259         ol_arg=invalid
1260         for ol_val in auto yes no ; do
1261                 if test "$enableval" = "$ol_val" ; then
1262                         ol_arg="$ol_val"
1263                 fi
1264         done
1265         if test "$ol_arg" = "invalid" ; then
1266                 { echo "configure: error: bad value $enableval for --enable-ldapi" 1>&2; exit 1; }
1267         fi
1268         ol_enable_ldapi="$ol_arg"
1269
1270 else
1271         ol_enable_ldapi="no"
1272 fi
1273 # end --enable-ldapi
1274 # OpenLDAP --enable-x_compile
1275         # Check whether --enable-x_compile or --disable-x_compile was given.
1276 if test "${enable_x_compile+set}" = set; then
1277   enableval="$enable_x_compile"
1278   
1279         ol_arg=invalid
1280         for ol_val in yes no ; do
1281                 if test "$enableval" = "$ol_val" ; then
1282                         ol_arg="$ol_val"
1283                 fi
1284         done
1285         if test "$ol_arg" = "invalid" ; then
1286                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1287         fi
1288         ol_enable_x_compile="$ol_arg"
1289
1290 else
1291         ol_enable_x_compile="no"
1292 fi
1293 # end --enable-x_compile
1294
1295
1296 # OpenLDAP --with-cyrus_sasl
1297         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1298 if test "${with_cyrus_sasl+set}" = set; then
1299   withval="$with_cyrus_sasl"
1300   
1301         ol_arg=invalid
1302         for ol_val in auto yes no  ; do
1303                 if test "$withval" = "$ol_val" ; then
1304                         ol_arg="$ol_val"
1305                 fi
1306         done
1307         if test "$ol_arg" = "invalid" ; then
1308                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1309         fi
1310         ol_with_cyrus_sasl="$ol_arg"
1311
1312 else
1313         ol_with_cyrus_sasl="auto"
1314 fi
1315 # end --with-cyrus_sasl
1316
1317 # OpenLDAP --with-fetch
1318         # Check whether --with-fetch or --without-fetch was given.
1319 if test "${with_fetch+set}" = set; then
1320   withval="$with_fetch"
1321   
1322         ol_arg=invalid
1323         for ol_val in auto yes no  ; do
1324                 if test "$withval" = "$ol_val" ; then
1325                         ol_arg="$ol_val"
1326                 fi
1327         done
1328         if test "$ol_arg" = "invalid" ; then
1329                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1330         fi
1331         ol_with_fetch="$ol_arg"
1332
1333 else
1334         ol_with_fetch="auto"
1335 fi
1336 # end --with-fetch
1337
1338 # OpenLDAP --with-kerberos
1339         # Check whether --with-kerberos or --without-kerberos was given.
1340 if test "${with_kerberos+set}" = set; then
1341   withval="$with_kerberos"
1342   
1343         ol_arg=invalid
1344         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1345                 if test "$withval" = "$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 $withval for --with-kerberos" 1>&2; exit 1; }
1351         fi
1352         ol_with_kerberos="$ol_arg"
1353
1354 else
1355         ol_with_kerberos="auto"
1356 fi
1357 # end --with-kerberos
1358
1359 # OpenLDAP --with-readline
1360         # Check whether --with-readline or --without-readline was given.
1361 if test "${with_readline+set}" = set; then
1362   withval="$with_readline"
1363   
1364         ol_arg=invalid
1365         for ol_val in auto yes no  ; do
1366                 if test "$withval" = "$ol_val" ; then
1367                         ol_arg="$ol_val"
1368                 fi
1369         done
1370         if test "$ol_arg" = "invalid" ; then
1371                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1372         fi
1373         ol_with_readline="$ol_arg"
1374
1375 else
1376         ol_with_readline="auto"
1377 fi
1378 # end --with-readline
1379
1380 # OpenLDAP --with-threads
1381         # Check whether --with-threads or --without-threads was given.
1382 if test "${with_threads+set}" = set; then
1383   withval="$with_threads"
1384   
1385         ol_arg=invalid
1386         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1387                 if test "$withval" = "$ol_val" ; then
1388                         ol_arg="$ol_val"
1389                 fi
1390         done
1391         if test "$ol_arg" = "invalid" ; then
1392                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1393         fi
1394         ol_with_threads="$ol_arg"
1395
1396 else
1397         ol_with_threads="auto"
1398 fi
1399 # end --with-threads
1400
1401 # OpenLDAP --with-tls
1402         # Check whether --with-tls or --without-tls was given.
1403 if test "${with_tls+set}" = set; then
1404   withval="$with_tls"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto ssleay openssl yes no  ; do
1408                 if test "$withval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1414         fi
1415         ol_with_tls="$ol_arg"
1416
1417 else
1418         ol_with_tls="auto"
1419 fi
1420 # end --with-tls
1421
1422 # OpenLDAP --with-yielding_select
1423         # Check whether --with-yielding_select or --without-yielding_select was given.
1424 if test "${with_yielding_select+set}" = set; then
1425   withval="$with_yielding_select"
1426   
1427         ol_arg=invalid
1428         for ol_val in auto yes no manual  ; do
1429                 if test "$withval" = "$ol_val" ; then
1430                         ol_arg="$ol_val"
1431                 fi
1432         done
1433         if test "$ol_arg" = "invalid" ; then
1434                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1435         fi
1436         ol_with_yielding_select="$ol_arg"
1437
1438 else
1439         ol_with_yielding_select="auto"
1440 fi
1441 # end --with-yielding_select
1442
1443
1444
1445 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1446 if test "${with_xxslapdoptions+set}" = set; then
1447   withval="$with_xxslapdoptions"
1448   :
1449 fi
1450
1451 # OpenLDAP --enable-slapd
1452         # Check whether --enable-slapd or --disable-slapd was given.
1453 if test "${enable_slapd+set}" = set; then
1454   enableval="$enable_slapd"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto yes no ; do
1458                 if test "$enableval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1464         fi
1465         ol_enable_slapd="$ol_arg"
1466
1467 else
1468         ol_enable_slapd="yes"
1469 fi
1470 # end --enable-slapd
1471 # OpenLDAP --enable-cleartext
1472         # Check whether --enable-cleartext or --disable-cleartext was given.
1473 if test "${enable_cleartext+set}" = set; then
1474   enableval="$enable_cleartext"
1475   
1476         ol_arg=invalid
1477         for ol_val in auto yes no ; do
1478                 if test "$enableval" = "$ol_val" ; then
1479                         ol_arg="$ol_val"
1480                 fi
1481         done
1482         if test "$ol_arg" = "invalid" ; then
1483                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1484         fi
1485         ol_enable_cleartext="$ol_arg"
1486
1487 else
1488         ol_enable_cleartext="yes"
1489 fi
1490 # end --enable-cleartext
1491 # OpenLDAP --enable-crypt
1492         # Check whether --enable-crypt or --disable-crypt was given.
1493 if test "${enable_crypt+set}" = set; then
1494   enableval="$enable_crypt"
1495   
1496         ol_arg=invalid
1497         for ol_val in auto yes no ; do
1498                 if test "$enableval" = "$ol_val" ; then
1499                         ol_arg="$ol_val"
1500                 fi
1501         done
1502         if test "$ol_arg" = "invalid" ; then
1503                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1504         fi
1505         ol_enable_crypt="$ol_arg"
1506
1507 else
1508         ol_enable_crypt="auto"
1509 fi
1510 # end --enable-crypt
1511 # OpenLDAP --enable-kpasswd
1512         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1513 if test "${enable_kpasswd+set}" = set; then
1514   enableval="$enable_kpasswd"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1524         fi
1525         ol_enable_kpasswd="$ol_arg"
1526
1527 else
1528         ol_enable_kpasswd="no"
1529 fi
1530 # end --enable-kpasswd
1531 # OpenLDAP --enable-spasswd
1532         # Check whether --enable-spasswd or --disable-spasswd was given.
1533 if test "${enable_spasswd+set}" = set; then
1534   enableval="$enable_spasswd"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1544         fi
1545         ol_enable_spasswd="$ol_arg"
1546
1547 else
1548         ol_enable_spasswd="no"
1549 fi
1550 # end --enable-spasswd
1551 # OpenLDAP --enable-modules
1552         # Check whether --enable-modules or --disable-modules was given.
1553 if test "${enable_modules+set}" = set; then
1554   enableval="$enable_modules"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1564         fi
1565         ol_enable_modules="$ol_arg"
1566
1567 else
1568         ol_enable_modules="no"
1569 fi
1570 # end --enable-modules
1571 # OpenLDAP --enable-multimaster
1572         # Check whether --enable-multimaster or --disable-multimaster was given.
1573 if test "${enable_multimaster+set}" = set; then
1574   enableval="$enable_multimaster"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1584         fi
1585         ol_enable_multimaster="$ol_arg"
1586
1587 else
1588         ol_enable_multimaster="no"
1589 fi
1590 # end --enable-multimaster
1591 # OpenLDAP --enable-phonetic
1592         # Check whether --enable-phonetic or --disable-phonetic was given.
1593 if test "${enable_phonetic+set}" = set; then
1594   enableval="$enable_phonetic"
1595   
1596         ol_arg=invalid
1597         for ol_val in auto yes no ; do
1598                 if test "$enableval" = "$ol_val" ; then
1599                         ol_arg="$ol_val"
1600                 fi
1601         done
1602         if test "$ol_arg" = "invalid" ; then
1603                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1604         fi
1605         ol_enable_phonetic="$ol_arg"
1606
1607 else
1608         ol_enable_phonetic="no"
1609 fi
1610 # end --enable-phonetic
1611 # OpenLDAP --enable-quipu
1612         # Check whether --enable-quipu or --disable-quipu was given.
1613 if test "${enable_quipu+set}" = set; then
1614   enableval="$enable_quipu"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no ; do
1618                 if test "$enableval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1624         fi
1625         ol_enable_quipu="$ol_arg"
1626
1627 else
1628         ol_enable_quipu="no"
1629 fi
1630 # end --enable-quipu
1631 # OpenLDAP --enable-rlookups
1632         # Check whether --enable-rlookups or --disable-rlookups was given.
1633 if test "${enable_rlookups+set}" = set; then
1634   enableval="$enable_rlookups"
1635   
1636         ol_arg=invalid
1637         for ol_val in auto yes no ; do
1638                 if test "$enableval" = "$ol_val" ; then
1639                         ol_arg="$ol_val"
1640                 fi
1641         done
1642         if test "$ol_arg" = "invalid" ; then
1643                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1644         fi
1645         ol_enable_rlookups="$ol_arg"
1646
1647 else
1648         ol_enable_rlookups="auto"
1649 fi
1650 # end --enable-rlookups
1651 # OpenLDAP --enable-aci
1652         # Check whether --enable-aci or --disable-aci was given.
1653 if test "${enable_aci+set}" = set; then
1654   enableval="$enable_aci"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1664         fi
1665         ol_enable_aci="$ol_arg"
1666
1667 else
1668         ol_enable_aci="no"
1669 fi
1670 # end --enable-aci
1671 # OpenLDAP --enable-wrappers
1672         # Check whether --enable-wrappers or --disable-wrappers was given.
1673 if test "${enable_wrappers+set}" = set; then
1674   enableval="$enable_wrappers"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1684         fi
1685         ol_enable_wrappers="$ol_arg"
1686
1687 else
1688         ol_enable_wrappers="no"
1689 fi
1690 # end --enable-wrappers
1691 # OpenLDAP --enable-dynamic
1692         # Check whether --enable-dynamic or --disable-dynamic was given.
1693 if test "${enable_dynamic+set}" = set; then
1694   enableval="$enable_dynamic"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1704         fi
1705         ol_enable_dynamic="$ol_arg"
1706
1707 else
1708         ol_enable_dynamic="no"
1709 fi
1710 # end --enable-dynamic
1711
1712 # OpenLDAP --enable-dnssrv
1713         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1714 if test "${enable_dnssrv+set}" = set; then
1715   enableval="$enable_dnssrv"
1716   
1717         ol_arg=invalid
1718         for ol_val in auto yes no ; do
1719                 if test "$enableval" = "$ol_val" ; then
1720                         ol_arg="$ol_val"
1721                 fi
1722         done
1723         if test "$ol_arg" = "invalid" ; then
1724                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1725         fi
1726         ol_enable_dnssrv="$ol_arg"
1727
1728 else
1729         ol_enable_dnssrv="no"
1730 fi
1731 # end --enable-dnssrv
1732 # OpenLDAP --with-dnssrv_module
1733         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1734 if test "${with_dnssrv_module+set}" = set; then
1735   withval="$with_dnssrv_module"
1736   
1737         ol_arg=invalid
1738         for ol_val in static dynamic ; do
1739                 if test "$withval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1745         fi
1746         ol_with_dnssrv_module="$ol_arg"
1747
1748 else
1749         ol_with_dnssrv_module="static"
1750 fi
1751 # end --with-dnssrv_module
1752
1753 # OpenLDAP --enable-ldap
1754         # Check whether --enable-ldap or --disable-ldap was given.
1755 if test "${enable_ldap+set}" = set; then
1756   enableval="$enable_ldap"
1757   
1758         ol_arg=invalid
1759         for ol_val in auto yes no ; do
1760                 if test "$enableval" = "$ol_val" ; then
1761                         ol_arg="$ol_val"
1762                 fi
1763         done
1764         if test "$ol_arg" = "invalid" ; then
1765                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1766         fi
1767         ol_enable_ldap="$ol_arg"
1768
1769 else
1770         ol_enable_ldap="no"
1771 fi
1772 # end --enable-ldap
1773 # OpenLDAP --with-ldap_module
1774         # Check whether --with-ldap_module or --without-ldap_module was given.
1775 if test "${with_ldap_module+set}" = set; then
1776   withval="$with_ldap_module"
1777   
1778         ol_arg=invalid
1779         for ol_val in static dynamic ; do
1780                 if test "$withval" = "$ol_val" ; then
1781                         ol_arg="$ol_val"
1782                 fi
1783         done
1784         if test "$ol_arg" = "invalid" ; then
1785                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1786         fi
1787         ol_with_ldap_module="$ol_arg"
1788
1789 else
1790         ol_with_ldap_module="static"
1791 fi
1792 # end --with-ldap_module
1793
1794 # OpenLDAP --enable-ldbm
1795         # Check whether --enable-ldbm or --disable-ldbm was given.
1796 if test "${enable_ldbm+set}" = set; then
1797   enableval="$enable_ldbm"
1798   
1799         ol_arg=invalid
1800         for ol_val in auto yes no ; do
1801                 if test "$enableval" = "$ol_val" ; then
1802                         ol_arg="$ol_val"
1803                 fi
1804         done
1805         if test "$ol_arg" = "invalid" ; then
1806                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1807         fi
1808         ol_enable_ldbm="$ol_arg"
1809
1810 else
1811         ol_enable_ldbm="yes"
1812 fi
1813 # end --enable-ldbm
1814 # OpenLDAP --with-ldbm_api
1815         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1816 if test "${with_ldbm_api+set}" = set; then
1817   withval="$with_ldbm_api"
1818   
1819         ol_arg=invalid
1820         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1821                 if test "$withval" = "$ol_val" ; then
1822                         ol_arg="$ol_val"
1823                 fi
1824         done
1825         if test "$ol_arg" = "invalid" ; then
1826                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1827         fi
1828         ol_with_ldbm_api="$ol_arg"
1829
1830 else
1831         ol_with_ldbm_api="auto"
1832 fi
1833 # end --with-ldbm_api
1834
1835 # OpenLDAP --with-ldbm_module
1836         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1837 if test "${with_ldbm_module+set}" = set; then
1838   withval="$with_ldbm_module"
1839   
1840         ol_arg=invalid
1841         for ol_val in static dynamic ; do
1842                 if test "$withval" = "$ol_val" ; then
1843                         ol_arg="$ol_val"
1844                 fi
1845         done
1846         if test "$ol_arg" = "invalid" ; then
1847                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1848         fi
1849         ol_with_ldbm_module="$ol_arg"
1850
1851 else
1852         ol_with_ldbm_module="static"
1853 fi
1854 # end --with-ldbm_module
1855
1856 # OpenLDAP --with-ldbm_type
1857         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1858 if test "${with_ldbm_type+set}" = set; then
1859   withval="$with_ldbm_type"
1860   
1861         ol_arg=invalid
1862         for ol_val in auto btree hash ; do
1863                 if test "$withval" = "$ol_val" ; then
1864                         ol_arg="$ol_val"
1865                 fi
1866         done
1867         if test "$ol_arg" = "invalid" ; then
1868                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1869         fi
1870         ol_with_ldbm_type="$ol_arg"
1871
1872 else
1873         ol_with_ldbm_type="auto"
1874 fi
1875 # end --with-ldbm_type
1876
1877 # OpenLDAP --enable-passwd
1878         # Check whether --enable-passwd or --disable-passwd was given.
1879 if test "${enable_passwd+set}" = set; then
1880   enableval="$enable_passwd"
1881   
1882         ol_arg=invalid
1883         for ol_val in auto yes no ; do
1884                 if test "$enableval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1890         fi
1891         ol_enable_passwd="$ol_arg"
1892
1893 else
1894         ol_enable_passwd="no"
1895 fi
1896 # end --enable-passwd
1897 # OpenLDAP --with-passwd_module
1898         # Check whether --with-passwd_module or --without-passwd_module was given.
1899 if test "${with_passwd_module+set}" = set; then
1900   withval="$with_passwd_module"
1901   
1902         ol_arg=invalid
1903         for ol_val in static dynamic ; do
1904                 if test "$withval" = "$ol_val" ; then
1905                         ol_arg="$ol_val"
1906                 fi
1907         done
1908         if test "$ol_arg" = "invalid" ; then
1909                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1910         fi
1911         ol_with_passwd_module="$ol_arg"
1912
1913 else
1914         ol_with_passwd_module="static"
1915 fi
1916 # end --with-passwd_module
1917
1918 # OpenLDAP --enable-perl
1919         # Check whether --enable-perl or --disable-perl was given.
1920 if test "${enable_perl+set}" = set; then
1921   enableval="$enable_perl"
1922   
1923         ol_arg=invalid
1924         for ol_val in auto yes no ; do
1925                 if test "$enableval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1931         fi
1932         ol_enable_perl="$ol_arg"
1933
1934 else
1935         ol_enable_perl="no"
1936 fi
1937 # end --enable-perl
1938 # OpenLDAP --with-perl_module
1939         # Check whether --with-perl_module or --without-perl_module was given.
1940 if test "${with_perl_module+set}" = set; then
1941   withval="$with_perl_module"
1942   
1943         ol_arg=invalid
1944         for ol_val in static dynamic ; do
1945                 if test "$withval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1951         fi
1952         ol_with_perl_module="$ol_arg"
1953
1954 else
1955         ol_with_perl_module="static"
1956 fi
1957 # end --with-perl_module
1958
1959 # OpenLDAP --enable-shell
1960         # Check whether --enable-shell or --disable-shell was given.
1961 if test "${enable_shell+set}" = set; then
1962   enableval="$enable_shell"
1963   
1964         ol_arg=invalid
1965         for ol_val in auto yes no ; do
1966                 if test "$enableval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1972         fi
1973         ol_enable_shell="$ol_arg"
1974
1975 else
1976         ol_enable_shell="no"
1977 fi
1978 # end --enable-shell
1979 # OpenLDAP --with-shell_module
1980         # Check whether --with-shell_module or --without-shell_module was given.
1981 if test "${with_shell_module+set}" = set; then
1982   withval="$with_shell_module"
1983   
1984         ol_arg=invalid
1985         for ol_val in static dynamic ; do
1986                 if test "$withval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1992         fi
1993         ol_with_shell_module="$ol_arg"
1994
1995 else
1996         ol_with_shell_module="static"
1997 fi
1998 # end --with-shell_module
1999
2000 # OpenLDAP --enable-sql
2001         # Check whether --enable-sql or --disable-sql was given.
2002 if test "${enable_sql+set}" = set; then
2003   enableval="$enable_sql"
2004   
2005         ol_arg=invalid
2006         for ol_val in auto yes no ; do
2007                 if test "$enableval" = "$ol_val" ; then
2008                         ol_arg="$ol_val"
2009                 fi
2010         done
2011         if test "$ol_arg" = "invalid" ; then
2012                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2013         fi
2014         ol_enable_sql="$ol_arg"
2015
2016 else
2017         ol_enable_sql="no"
2018 fi
2019 # end --enable-sql
2020 # OpenLDAP --with-sql_module
2021         # Check whether --with-sql_module or --without-sql_module was given.
2022 if test "${with_sql_module+set}" = set; then
2023   withval="$with_sql_module"
2024   
2025         ol_arg=invalid
2026         for ol_val in static dynamic ; do
2027                 if test "$withval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2033         fi
2034         ol_with_sql_module="$ol_arg"
2035
2036 else
2037         ol_with_sql_module="static"
2038 fi
2039 # end --with-sql_module
2040
2041 # OpenLDAP --enable-tcl
2042         # Check whether --enable-tcl or --disable-tcl was given.
2043 if test "${enable_tcl+set}" = set; then
2044   enableval="$enable_tcl"
2045   
2046         ol_arg=invalid
2047         for ol_val in auto yes no ; do
2048                 if test "$enableval" = "$ol_val" ; then
2049                         ol_arg="$ol_val"
2050                 fi
2051         done
2052         if test "$ol_arg" = "invalid" ; then
2053                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2054         fi
2055         ol_enable_tcl="$ol_arg"
2056
2057 else
2058         ol_enable_tcl="no"
2059 fi
2060 # end --enable-tcl
2061 # OpenLDAP --with-tcl_module
2062         # Check whether --with-tcl_module or --without-tcl_module was given.
2063 if test "${with_tcl_module+set}" = set; then
2064   withval="$with_tcl_module"
2065   
2066         ol_arg=invalid
2067         for ol_val in static dynamic ; do
2068                 if test "$withval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2074         fi
2075         ol_with_tcl_module="$ol_arg"
2076
2077 else
2078         ol_with_tcl_module="static"
2079 fi
2080 # end --with-tcl_module
2081
2082
2083 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2084 if test "${with_xxslurpdoptions+set}" = set; then
2085   withval="$with_xxslurpdoptions"
2086   :
2087 fi
2088
2089 # OpenLDAP --enable-slurpd
2090         # Check whether --enable-slurpd or --disable-slurpd was given.
2091 if test "${enable_slurpd+set}" = set; then
2092   enableval="$enable_slurpd"
2093   
2094         ol_arg=invalid
2095         for ol_val in auto yes no ; do
2096                 if test "$enableval" = "$ol_val" ; then
2097                         ol_arg="$ol_val"
2098                 fi
2099         done
2100         if test "$ol_arg" = "invalid" ; then
2101                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2102         fi
2103         ol_enable_slurpd="$ol_arg"
2104
2105 else
2106         ol_enable_slurpd="auto"
2107 fi
2108 # end --enable-slurpd
2109
2110 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2111 if test "${with_xxliboptions+set}" = set; then
2112   withval="$with_xxliboptions"
2113   :
2114 fi
2115
2116 # Check whether --enable-static or --disable-static was given.
2117 if test "${enable_static+set}" = set; then
2118   enableval="$enable_static"
2119   p=${PACKAGE-default}
2120 case "$enableval" in
2121 yes) enable_static=yes ;;
2122 no) enable_static=no ;;
2123 *)
2124   enable_static=no
2125   # Look at the argument we got.  We use all the common list separators.
2126   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2127   for pkg in $enableval; do
2128     if test "X$pkg" = "X$p"; then
2129       enable_static=yes
2130     fi
2131   done
2132   IFS="$ac_save_ifs"
2133   ;;
2134 esac
2135 else
2136   enable_static=yes
2137 fi
2138
2139 # Check whether --enable-shared or --disable-shared was given.
2140 if test "${enable_shared+set}" = set; then
2141   enableval="$enable_shared"
2142   p=${PACKAGE-default}
2143 case "$enableval" in
2144 yes) enable_shared=yes ;;
2145 no) enable_shared=no ;;
2146 *)
2147   enable_shared=no
2148   # Look at the argument we got.  We use all the common list separators.
2149   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2150   for pkg in $enableval; do
2151     if test "X$pkg" = "X$p"; then
2152       enable_shared=yes
2153     fi
2154   done
2155   IFS="$ac_save_ifs"
2156   ;;
2157 esac
2158 else
2159   enable_shared=yes
2160 fi
2161
2162
2163
2164 # validate options
2165 if test $ol_enable_slapd = no ; then
2166                 if test $ol_enable_dnssrv = yes ; then
2167                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2168         fi
2169         if test $ol_enable_ldap = yes ; then
2170                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2171         fi
2172         if test $ol_enable_ldbm = yes ; then
2173                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2174         fi
2175         if test $ol_enable_passwd = yes ; then
2176                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2177         fi
2178         if test $ol_enable_perl = yes ; then
2179                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2180         fi
2181         if test $ol_enable_shell = yes ; then
2182                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2183         fi
2184         if test $ol_enable_tcl = yes ; then
2185                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2186         fi
2187         if test $ol_enable_sql = yes ; then
2188                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2189         fi
2190         if test $ol_enable_modules = yes ; then
2191                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2192         fi
2193         if test $ol_enable_multimaster = yes ; then
2194                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2195         fi
2196         if test $ol_enable_wrappers = yes ; then
2197                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2198         fi
2199         if test $ol_enable_phonetic = yes ; then
2200                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2201         fi
2202         if test $ol_enable_quipu = yes ; then
2203                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2204         fi
2205         if test $ol_enable_rlookups = yes ; then
2206                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2207         fi
2208         if test $ol_enable_aci = yes ; then
2209                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2210         fi
2211         if test $ol_with_ldbm_api != auto ; then
2212                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2213         fi
2214         if test $ol_with_ldbm_type != auto ; then
2215                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2216         fi
2217         if test $ol_with_dnssrv_module != static ; then
2218                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2219         fi
2220         if test $ol_with_ldap_module != static ; then
2221                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2222         fi
2223         if test $ol_with_ldbm_module != static ; then
2224                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2225         fi
2226         if test $ol_with_passwd_module != static ; then
2227                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2228         fi
2229         if test $ol_with_perl_module != static ; then
2230                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2231         fi
2232         if test $ol_with_shell_module != static ; then
2233                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2234         fi
2235         if test $ol_with_tcl_module != static ; then
2236                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2237         fi
2238         if test $ol_with_sql_module != static ; then
2239                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2240         fi
2241         if test $ol_enable_slurpd = yes ; then
2242                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2243         fi
2244
2245         # force settings to no
2246         ol_enable_dnssrv=no
2247         ol_enable_ldap=no
2248         ol_enable_ldbm=no
2249         ol_enable_passwd=no
2250         ol_enable_perl=no
2251         ol_enable_shell=no
2252         ol_enable_tcl=no
2253         ol_enable_sql=no
2254
2255         ol_enable_modules=no
2256         ol_enable_multimaster=no
2257         ol_enable_phonetic=no
2258         ol_enable_quipu=no
2259         ol_enable_rlookups=no
2260         ol_enable_aci=no
2261         ol_enable_wrappers=no
2262         ol_enable_dynamic=no
2263
2264         ol_with_ldbm_api=no
2265         ol_with_ldbm_type=no
2266
2267         ol_with_dnssrv_module=static
2268         ol_with_ldap_module=static
2269         ol_with_ldbm_module=static
2270         ol_with_passwd_module=static
2271         ol_with_perl_module=static
2272         ol_with_shell_module=static
2273         ol_with_tcl_module=static
2274         ol_with_sql_module=static
2275
2276         ol_enable_slurpd=no
2277
2278 elif test $ol_enable_ldbm = no ; then
2279         
2280         if test $ol_with_ldbm_api != auto ; then
2281                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2282         fi
2283
2284         if test $ol_with_ldbm_type != auto ; then
2285                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2286         fi
2287
2288         if test $ol_with_ldbm_module != static ; then
2289                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2290         fi
2291
2292         if test $ol_enable_modules != yes -a \
2293                 $ol_enable_dnssrv = no -a \
2294                 $ol_enable_ldap = no -a \
2295                 $ol_enable_passwd = no -a \
2296                 $ol_enable_perl = no -a \
2297                 $ol_enable_shell = no -a \
2298                 $ol_enable_sql = no -a \
2299                 $ol_enable_tcl = no ; then
2300                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2301         fi
2302
2303         ol_with_ldbm_api=no
2304         ol_with_ldbm_type=no
2305         ol_with_ldbm_module=static
2306
2307 else
2308                 if test $ol_with_ldbm_api = gdbm -a \
2309                 $ol_with_ldbm_type = btree ; then
2310                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2311         fi
2312         if test $ol_with_ldbm_api = mdbm -a \
2313                 $ol_with_ldbm_type = btree ; then
2314                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2315         fi
2316         if test $ol_with_ldbm_api = ndbm -a \
2317                 $ol_with_ldbm_type = btree ; then
2318                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2319         fi
2320 fi
2321
2322 if test $ol_enable_slurpd = yes ; then
2323                 if test $ol_with_threads = no ; then
2324                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2325         fi
2326 fi
2327
2328 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2329         if test $ol_with_kerberos = no ; then
2330                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2331         fi
2332 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2333         if test $ol_with_kerberos != auto ; then
2334                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2335         else
2336                 ol_with_kerberos=no
2337         fi
2338 fi
2339
2340 if test $ol_enable_spasswd = yes ; then
2341         if test $ol_with_cyrus_sasl = no ; then
2342                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2343         fi
2344         ol_link_spasswd=yes
2345 fi
2346
2347 echo "$ac_t""done" 1>&6
2348
2349 LDAP_LIBS=
2350 LDIF_LIBS=
2351 LDBM_LIBS=
2352 LTHREAD_LIBS=
2353 LUTIL_LIBS=
2354
2355 QUIPU_LIBS=
2356 SLAPD_LIBS=
2357 SLURPD_LIBS=
2358
2359 BUILD_SLAPD=no
2360 BUILD_SLURPD=no
2361
2362 BUILD_QUIPU=no
2363 BUILD_THREAD=no
2364
2365 BUILD_DNSSRV=no
2366 BUILD_LDAP=no
2367 BUILD_LDBM=no
2368 BUILD_PASSWD=no
2369 BUILD_PERL=no
2370 BUILD_SHELL=no
2371 BUILD_SQL=no
2372 BUILD_TCL=no
2373
2374 BUILD_DNSSRV_DYNAMIC=static
2375 BUILD_LDAP_DYNAMIC=static
2376 BUILD_LDBM_DYNAMIC=static
2377 BUILD_PASSWD_DYNAMIC=static
2378 BUILD_PERL_DYNAMIC=static
2379 BUILD_SHELL_DYNAMIC=static
2380 BUILD_TCL_DYNAMIC=static
2381 BUILD_SQL_DYNAMIC=static
2382
2383 SLAPD_MODULES_LDFLAGS=
2384 SLAPD_MODULES_CPPFLAGS=
2385 SLAPD_MODULES_LIST=
2386
2387 SLAPD_PERL_LDFLAGS=
2388 MOD_PERL_LDFLAGS=
2389 PERL_CPPFLAGS=
2390
2391 SLAPD_SQL_LDFLAGS=
2392 SLAPD_SQL_LIBS=
2393 SLAPD_SQL_INCLUDES=
2394
2395 MOD_TCL_LIB=
2396 KRB4_LIBS=
2397 KRB5_LIBS=
2398 READLINE_LIBS=
2399 SASL_LIBS=
2400 TERMCAP_LIBS=
2401 TLS_LIBS=
2402 MODULES_LIBS=
2403 AUTH_LIBS=
2404
2405
2406
2407 cat >> confdefs.h <<\EOF
2408 #define HAVE_MKVERSION 1
2409 EOF
2410
2411
2412
2413
2414 ol_aix_threads=no
2415 case "$target" in
2416 *-*-aix*)       if test -z "$CC" ; then
2417                 case "$ol_with_threads" in
2418                 auto | yes |  posix) ol_aix_threads=yes ;;
2419                 esac
2420         fi
2421 ;;
2422 esac
2423
2424 if test $ol_aix_threads = yes ; then
2425         if test -z "${CC}" ; then
2426                 for ac_prog in cc_r xlc_r cc
2427 do
2428 # Extract the first word of "$ac_prog", so it can be a program name with args.
2429 set dummy $ac_prog; ac_word=$2
2430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2431 echo "configure:2432: checking for $ac_word" >&5
2432 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   if test -n "$CC"; then
2436   ac_cv_prog_CC="$CC" # Let the user override the test.
2437 else
2438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2439   ac_dummy="$PATH"
2440   for ac_dir in $ac_dummy; do
2441     test -z "$ac_dir" && ac_dir=.
2442     if test -f $ac_dir/$ac_word; then
2443       ac_cv_prog_CC="$ac_prog"
2444       break
2445     fi
2446   done
2447   IFS="$ac_save_ifs"
2448 fi
2449 fi
2450 CC="$ac_cv_prog_CC"
2451 if test -n "$CC"; then
2452   echo "$ac_t""$CC" 1>&6
2453 else
2454   echo "$ac_t""no" 1>&6
2455 fi
2456
2457 test -n "$CC" && break
2458 done
2459
2460
2461                 if test "$CC" = cc ; then
2462                                                 if test $ol_with_threads != auto ; then
2463                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2464                         else
2465                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2466                         fi
2467                         ol_with_threads=no
2468                 fi
2469         fi
2470
2471         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2472                 ol_with_threads=posix
2473                 ol_cv_pthread_create=yes
2474         fi
2475 fi
2476
2477 if test -z "${CC}"; then
2478         for ac_prog in cc
2479 do
2480 # Extract the first word of "$ac_prog", so it can be a program name with args.
2481 set dummy $ac_prog; ac_word=$2
2482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2483 echo "configure:2484: checking for $ac_word" >&5
2484 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2485   echo $ac_n "(cached) $ac_c" 1>&6
2486 else
2487   if test -n "$CC"; then
2488   ac_cv_prog_CC="$CC" # Let the user override the test.
2489 else
2490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2491   ac_dummy="$PATH"
2492   for ac_dir in $ac_dummy; do
2493     test -z "$ac_dir" && ac_dir=.
2494     if test -f $ac_dir/$ac_word; then
2495       ac_cv_prog_CC="$ac_prog"
2496       break
2497     fi
2498   done
2499   IFS="$ac_save_ifs"
2500 fi
2501 fi
2502 CC="$ac_cv_prog_CC"
2503 if test -n "$CC"; then
2504   echo "$ac_t""$CC" 1>&6
2505 else
2506   echo "$ac_t""no" 1>&6
2507 fi
2508
2509 test -n "$CC" && break
2510 done
2511
2512 fi
2513
2514
2515
2516
2517 # Check whether --enable-fast-install or --disable-fast-install was given.
2518 if test "${enable_fast_install+set}" = set; then
2519   enableval="$enable_fast_install"
2520   p=${PACKAGE-default}
2521 case "$enableval" in
2522 yes) enable_fast_install=yes ;;
2523 no) enable_fast_install=no ;;
2524 *)
2525   enable_fast_install=no
2526   # Look at the argument we got.  We use all the common list separators.
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2528   for pkg in $enableval; do
2529     if test "X$pkg" = "X$p"; then
2530       enable_fast_install=yes
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 else
2537   enable_fast_install=yes
2538 fi
2539
2540 # Extract the first word of "ranlib", so it can be a program name with args.
2541 set dummy ranlib; ac_word=$2
2542 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2543 echo "configure:2544: checking for $ac_word" >&5
2544 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   if test -n "$RANLIB"; then
2548   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2549 else
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2551   ac_dummy="$PATH"
2552   for ac_dir in $ac_dummy; do
2553     test -z "$ac_dir" && ac_dir=.
2554     if test -f $ac_dir/$ac_word; then
2555       ac_cv_prog_RANLIB="ranlib"
2556       break
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2561 fi
2562 fi
2563 RANLIB="$ac_cv_prog_RANLIB"
2564 if test -n "$RANLIB"; then
2565   echo "$ac_t""$RANLIB" 1>&6
2566 else
2567   echo "$ac_t""no" 1>&6
2568 fi
2569
2570 # Extract the first word of "gcc", so it can be a program name with args.
2571 set dummy gcc; ac_word=$2
2572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2573 echo "configure:2574: checking for $ac_word" >&5
2574 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2575   echo $ac_n "(cached) $ac_c" 1>&6
2576 else
2577   if test -n "$CC"; then
2578   ac_cv_prog_CC="$CC" # Let the user override the test.
2579 else
2580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2581   ac_dummy="$PATH"
2582   for ac_dir in $ac_dummy; do
2583     test -z "$ac_dir" && ac_dir=.
2584     if test -f $ac_dir/$ac_word; then
2585       ac_cv_prog_CC="gcc"
2586       break
2587     fi
2588   done
2589   IFS="$ac_save_ifs"
2590 fi
2591 fi
2592 CC="$ac_cv_prog_CC"
2593 if test -n "$CC"; then
2594   echo "$ac_t""$CC" 1>&6
2595 else
2596   echo "$ac_t""no" 1>&6
2597 fi
2598
2599 if test -z "$CC"; then
2600   # Extract the first word of "cc", so it can be a program name with args.
2601 set dummy cc; ac_word=$2
2602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2603 echo "configure:2604: checking for $ac_word" >&5
2604 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2605   echo $ac_n "(cached) $ac_c" 1>&6
2606 else
2607   if test -n "$CC"; then
2608   ac_cv_prog_CC="$CC" # Let the user override the test.
2609 else
2610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2611   ac_prog_rejected=no
2612   ac_dummy="$PATH"
2613   for ac_dir in $ac_dummy; do
2614     test -z "$ac_dir" && ac_dir=.
2615     if test -f $ac_dir/$ac_word; then
2616       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2617         ac_prog_rejected=yes
2618         continue
2619       fi
2620       ac_cv_prog_CC="cc"
2621       break
2622     fi
2623   done
2624   IFS="$ac_save_ifs"
2625 if test $ac_prog_rejected = yes; then
2626   # We found a bogon in the path, so make sure we never use it.
2627   set dummy $ac_cv_prog_CC
2628   shift
2629   if test $# -gt 0; then
2630     # We chose a different compiler from the bogus one.
2631     # However, it has the same basename, so the bogon will be chosen
2632     # first if we set CC to just the basename; use the full file name.
2633     shift
2634     set dummy "$ac_dir/$ac_word" "$@"
2635     shift
2636     ac_cv_prog_CC="$@"
2637   fi
2638 fi
2639 fi
2640 fi
2641 CC="$ac_cv_prog_CC"
2642 if test -n "$CC"; then
2643   echo "$ac_t""$CC" 1>&6
2644 else
2645   echo "$ac_t""no" 1>&6
2646 fi
2647
2648   if test -z "$CC"; then
2649     case "`uname -s`" in
2650     *win32* | *WIN32*)
2651       # Extract the first word of "cl", so it can be a program name with args.
2652 set dummy cl; ac_word=$2
2653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2654 echo "configure:2655: checking for $ac_word" >&5
2655 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2656   echo $ac_n "(cached) $ac_c" 1>&6
2657 else
2658   if test -n "$CC"; then
2659   ac_cv_prog_CC="$CC" # Let the user override the test.
2660 else
2661   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2662   ac_dummy="$PATH"
2663   for ac_dir in $ac_dummy; do
2664     test -z "$ac_dir" && ac_dir=.
2665     if test -f $ac_dir/$ac_word; then
2666       ac_cv_prog_CC="cl"
2667       break
2668     fi
2669   done
2670   IFS="$ac_save_ifs"
2671 fi
2672 fi
2673 CC="$ac_cv_prog_CC"
2674 if test -n "$CC"; then
2675   echo "$ac_t""$CC" 1>&6
2676 else
2677   echo "$ac_t""no" 1>&6
2678 fi
2679  ;;
2680     esac
2681   fi
2682   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2683 fi
2684
2685 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2686 echo "configure:2687: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2687
2688 ac_ext=c
2689 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2690 ac_cpp='$CPP $CPPFLAGS'
2691 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2692 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2693 cross_compiling=$ac_cv_prog_cc_cross
2694
2695 cat > conftest.$ac_ext << EOF
2696
2697 #line 2698 "configure"
2698 #include "confdefs.h"
2699
2700 main(){return(0);}
2701 EOF
2702 if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2703   ac_cv_prog_cc_works=yes
2704   # If we can't run a trivial program, we are probably using a cross compiler.
2705   if (./conftest; exit) 2>/dev/null; then
2706     ac_cv_prog_cc_cross=no
2707   else
2708     ac_cv_prog_cc_cross=yes
2709   fi
2710 else
2711   echo "configure: failed program was:" >&5
2712   cat conftest.$ac_ext >&5
2713   ac_cv_prog_cc_works=no
2714 fi
2715 rm -fr conftest*
2716 ac_ext=c
2717 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2718 ac_cpp='$CPP $CPPFLAGS'
2719 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2720 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2721 cross_compiling=$ac_cv_prog_cc_cross
2722
2723 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2724 if test $ac_cv_prog_cc_works = no; then
2725   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2726 fi
2727 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2728 echo "configure:2729: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2729 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2730 cross_compiling=$ac_cv_prog_cc_cross
2731
2732 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2733 echo "configure:2734: checking whether we are using GNU C" >&5
2734 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2735   echo $ac_n "(cached) $ac_c" 1>&6
2736 else
2737   cat > conftest.c <<EOF
2738 #ifdef __GNUC__
2739   yes;
2740 #endif
2741 EOF
2742 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2743   ac_cv_prog_gcc=yes
2744 else
2745   ac_cv_prog_gcc=no
2746 fi
2747 fi
2748
2749 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2750
2751 if test $ac_cv_prog_gcc = yes; then
2752   GCC=yes
2753 else
2754   GCC=
2755 fi
2756
2757 ac_test_CFLAGS="${CFLAGS+set}"
2758 ac_save_CFLAGS="$CFLAGS"
2759 CFLAGS=
2760 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2761 echo "configure:2762: checking whether ${CC-cc} accepts -g" >&5
2762 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   echo 'void f(){}' > conftest.c
2766 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2767   ac_cv_prog_cc_g=yes
2768 else
2769   ac_cv_prog_cc_g=no
2770 fi
2771 rm -f conftest*
2772
2773 fi
2774
2775 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2776 if test "$ac_test_CFLAGS" = set; then
2777   CFLAGS="$ac_save_CFLAGS"
2778 elif test $ac_cv_prog_cc_g = yes; then
2779   if test "$GCC" = yes; then
2780     CFLAGS="-g -O2"
2781   else
2782     CFLAGS="-g"
2783   fi
2784 else
2785   if test "$GCC" = yes; then
2786     CFLAGS="-O2"
2787   else
2788     CFLAGS=
2789   fi
2790 fi
2791
2792 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2793 if test "${with_gnu_ld+set}" = set; then
2794   withval="$with_gnu_ld"
2795   test "$withval" = no || with_gnu_ld=yes
2796 else
2797   with_gnu_ld=no
2798 fi
2799
2800 ac_prog=ld
2801 if test "$ac_cv_prog_gcc" = yes; then
2802   # Check if gcc -print-prog-name=ld gives a path.
2803   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2804 echo "configure:2805: checking for ld used by GCC" >&5
2805   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2806   case "$ac_prog" in
2807     # Accept absolute paths.
2808     [\\/]* | [A-Za-z]:[\\/]*)
2809       re_direlt='/[^/][^/]*/\.\./'
2810       # Canonicalize the path of ld
2811       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2812       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2813         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2814       done
2815       test -z "$LD" && LD="$ac_prog"
2816       ;;
2817   "")
2818     # If it fails, then pretend we aren't using GCC.
2819     ac_prog=ld
2820     ;;
2821   *)
2822     # If it is relative, then search for the first ld in PATH.
2823     with_gnu_ld=unknown
2824     ;;
2825   esac
2826 elif test "$with_gnu_ld" = yes; then
2827   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2828 echo "configure:2829: checking for GNU ld" >&5
2829 else
2830   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2831 echo "configure:2832: checking for non-GNU ld" >&5
2832 fi
2833 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   if test -z "$LD"; then
2837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2838   for ac_dir in $PATH; do
2839     test -z "$ac_dir" && ac_dir=.
2840     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2841       ac_cv_path_LD="$ac_dir/$ac_prog"
2842       # Check to see if the program is GNU ld.  I'd rather use --version,
2843       # but apparently some GNU ld's only accept -v.
2844       # Break only if it was the GNU/non-GNU ld that we prefer.
2845       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2846         test "$with_gnu_ld" != no && break
2847       else
2848         test "$with_gnu_ld" != yes && break
2849       fi
2850     fi
2851   done
2852   IFS="$ac_save_ifs"
2853 else
2854   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2855 fi
2856 fi
2857
2858 LD="$ac_cv_path_LD"
2859 if test -n "$LD"; then
2860   echo "$ac_t""$LD" 1>&6
2861 else
2862   echo "$ac_t""no" 1>&6
2863 fi
2864 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2865 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2866 echo "configure:2867: checking if the linker ($LD) is GNU ld" >&5
2867 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2871 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2872   ac_cv_prog_gnu_ld=yes
2873 else
2874   ac_cv_prog_gnu_ld=no
2875 fi
2876 fi
2877
2878 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2879
2880
2881 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2882 echo "configure:2883: checking for BSD-compatible nm" >&5
2883 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   if test -n "$NM"; then
2887   # Let the user override the test.
2888   ac_cv_path_NM="$NM"
2889 else
2890   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2891   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2892     test -z "$ac_dir" && ac_dir=.
2893     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2894       # Check to see if the nm accepts a BSD-compat flag.
2895       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2896       #   nm: unknown option "B" ignored
2897       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2898         ac_cv_path_NM="$ac_dir/nm -B"
2899         break
2900       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2901         ac_cv_path_NM="$ac_dir/nm -p"
2902         break
2903       else
2904         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2905         continue # so that we can try to find one that supports BSD flags
2906       fi
2907     fi
2908   done
2909   IFS="$ac_save_ifs"
2910   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2911 fi
2912 fi
2913
2914 NM="$ac_cv_path_NM"
2915 echo "$ac_t""$NM" 1>&6
2916
2917 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2918 echo "configure:2919: checking whether ln -s works" >&5
2919 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2920   echo $ac_n "(cached) $ac_c" 1>&6
2921 else
2922   rm -f conftestdata
2923 if ln -s X conftestdata 2>/dev/null
2924 then
2925   rm -f conftestdata
2926   ac_cv_prog_LN_S="ln -s"
2927 else
2928   ac_cv_prog_LN_S=ln
2929 fi
2930 fi
2931 LN_S="$ac_cv_prog_LN_S"
2932 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2933   echo "$ac_t""yes" 1>&6
2934 else
2935   echo "$ac_t""no" 1>&6
2936 fi
2937
2938 if test $host != $build; then
2939   ac_tool_prefix=${host_alias}-
2940 else
2941   ac_tool_prefix=
2942 fi
2943
2944
2945 case "$target" in
2946 NONE) lt_target="$host" ;;
2947 *) lt_target="$target" ;;
2948 esac
2949
2950 # Check for any special flags to pass to ltconfig.
2951 libtool_flags="--cache-file=$cache_file"
2952 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2953 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2954 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2955 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2956 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2957 libtool_flags="$libtool_flags --enable-dlopen"
2958 libtool_flags="$libtool_flags --enable-win32-dll"
2959 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2960 if test "${enable_libtool_lock+set}" = set; then
2961   enableval="$enable_libtool_lock"
2962   :
2963 fi
2964
2965 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2966 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2967
2968 # Some flags need to be propagated to the compiler or linker for good
2969 # libtool support.
2970 case "$lt_target" in
2971 *-*-irix6*)
2972   # Find out which ABI we are using.
2973   echo '#line 2974 "configure"' > conftest.$ac_ext
2974   if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2975     case "`/usr/bin/file conftest.o`" in
2976     *32-bit*)
2977       LD="${LD-ld} -32"
2978       ;;
2979     *N32*)
2980       LD="${LD-ld} -n32"
2981       ;;
2982     *64-bit*)
2983       LD="${LD-ld} -64"
2984       ;;
2985     esac
2986   fi
2987   rm -rf conftest*
2988   ;;
2989
2990 *-*-sco3.2v5*)
2991   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2992   SAVE_CFLAGS="$CFLAGS"
2993   CFLAGS="$CFLAGS -belf"
2994   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2995 echo "configure:2996: checking whether the C compiler needs -belf" >&5
2996 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2997   echo $ac_n "(cached) $ac_c" 1>&6
2998 else
2999   cat > conftest.$ac_ext <<EOF
3000 #line 3001 "configure"
3001 #include "confdefs.h"
3002
3003 int main() {
3004
3005 ; return 0; }
3006 EOF
3007 if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3008   rm -rf conftest*
3009   lt_cv_cc_needs_belf=yes
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -rf conftest*
3014   lt_cv_cc_needs_belf=no
3015 fi
3016 rm -f conftest*
3017 fi
3018
3019 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3020   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3021     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3022     CFLAGS="$SAVE_CFLAGS"
3023   fi
3024   ;;
3025
3026 *-*-cygwin* | *-*-mingw*)
3027   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3028 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3030 echo "configure:3031: checking for $ac_word" >&5
3031 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   if test -n "$DLLTOOL"; then
3035   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3036 else
3037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3038   ac_dummy="$PATH"
3039   for ac_dir in $ac_dummy; do
3040     test -z "$ac_dir" && ac_dir=.
3041     if test -f $ac_dir/$ac_word; then
3042       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3043       break
3044     fi
3045   done
3046   IFS="$ac_save_ifs"
3047 fi
3048 fi
3049 DLLTOOL="$ac_cv_prog_DLLTOOL"
3050 if test -n "$DLLTOOL"; then
3051   echo "$ac_t""$DLLTOOL" 1>&6
3052 else
3053   echo "$ac_t""no" 1>&6
3054 fi
3055
3056
3057 if test -z "$ac_cv_prog_DLLTOOL"; then
3058 if test -n "$ac_tool_prefix"; then
3059   # Extract the first word of "dlltool", so it can be a program name with args.
3060 set dummy dlltool; ac_word=$2
3061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3062 echo "configure:3063: checking for $ac_word" >&5
3063 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3064   echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066   if test -n "$DLLTOOL"; then
3067   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3068 else
3069   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3070   ac_dummy="$PATH"
3071   for ac_dir in $ac_dummy; do
3072     test -z "$ac_dir" && ac_dir=.
3073     if test -f $ac_dir/$ac_word; then
3074       ac_cv_prog_DLLTOOL="dlltool"
3075       break
3076     fi
3077   done
3078   IFS="$ac_save_ifs"
3079   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
3080 fi
3081 fi
3082 DLLTOOL="$ac_cv_prog_DLLTOOL"
3083 if test -n "$DLLTOOL"; then
3084   echo "$ac_t""$DLLTOOL" 1>&6
3085 else
3086   echo "$ac_t""no" 1>&6
3087 fi
3088
3089 else
3090   DLLTOOL="false"
3091 fi
3092 fi
3093
3094   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3095 set dummy ${ac_tool_prefix}as; ac_word=$2
3096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3097 echo "configure:3098: checking for $ac_word" >&5
3098 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   if test -n "$AS"; then
3102   ac_cv_prog_AS="$AS" # Let the user override the test.
3103 else
3104   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3105   ac_dummy="$PATH"
3106   for ac_dir in $ac_dummy; do
3107     test -z "$ac_dir" && ac_dir=.
3108     if test -f $ac_dir/$ac_word; then
3109       ac_cv_prog_AS="${ac_tool_prefix}as"
3110       break
3111     fi
3112   done
3113   IFS="$ac_save_ifs"
3114 fi
3115 fi
3116 AS="$ac_cv_prog_AS"
3117 if test -n "$AS"; then
3118   echo "$ac_t""$AS" 1>&6
3119 else
3120   echo "$ac_t""no" 1>&6
3121 fi
3122
3123
3124 if test -z "$ac_cv_prog_AS"; then
3125 if test -n "$ac_tool_prefix"; then
3126   # Extract the first word of "as", so it can be a program name with args.
3127 set dummy as; ac_word=$2
3128 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3129 echo "configure:3130: checking for $ac_word" >&5
3130 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3131   echo $ac_n "(cached) $ac_c" 1>&6
3132 else
3133   if test -n "$AS"; then
3134   ac_cv_prog_AS="$AS" # Let the user override the test.
3135 else
3136   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3137   ac_dummy="$PATH"
3138   for ac_dir in $ac_dummy; do
3139     test -z "$ac_dir" && ac_dir=.
3140     if test -f $ac_dir/$ac_word; then
3141       ac_cv_prog_AS="as"
3142       break
3143     fi
3144   done
3145   IFS="$ac_save_ifs"
3146   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
3147 fi
3148 fi
3149 AS="$ac_cv_prog_AS"
3150 if test -n "$AS"; then
3151   echo "$ac_t""$AS" 1>&6
3152 else
3153   echo "$ac_t""no" 1>&6
3154 fi
3155
3156 else
3157   AS="false"
3158 fi
3159 fi
3160
3161   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3162 set dummy ${ac_tool_prefix}objdump; ac_word=$2
3163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3164 echo "configure:3165: checking for $ac_word" >&5
3165 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3166   echo $ac_n "(cached) $ac_c" 1>&6
3167 else
3168   if test -n "$OBJDUMP"; then
3169   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3170 else
3171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3172   ac_dummy="$PATH"
3173   for ac_dir in $ac_dummy; do
3174     test -z "$ac_dir" && ac_dir=.
3175     if test -f $ac_dir/$ac_word; then
3176       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3177       break
3178     fi
3179   done
3180   IFS="$ac_save_ifs"
3181 fi
3182 fi
3183 OBJDUMP="$ac_cv_prog_OBJDUMP"
3184 if test -n "$OBJDUMP"; then
3185   echo "$ac_t""$OBJDUMP" 1>&6
3186 else
3187   echo "$ac_t""no" 1>&6
3188 fi
3189
3190
3191 if test -z "$ac_cv_prog_OBJDUMP"; then
3192 if test -n "$ac_tool_prefix"; then
3193   # Extract the first word of "objdump", so it can be a program name with args.
3194 set dummy objdump; ac_word=$2
3195 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3196 echo "configure:3197: checking for $ac_word" >&5
3197 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
3198   echo $ac_n "(cached) $ac_c" 1>&6
3199 else
3200   if test -n "$OBJDUMP"; then
3201   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3202 else
3203   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3204   ac_dummy="$PATH"
3205   for ac_dir in $ac_dummy; do
3206     test -z "$ac_dir" && ac_dir=.
3207     if test -f $ac_dir/$ac_word; then
3208       ac_cv_prog_OBJDUMP="objdump"
3209       break
3210     fi
3211   done
3212   IFS="$ac_save_ifs"
3213   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
3214 fi
3215 fi
3216 OBJDUMP="$ac_cv_prog_OBJDUMP"
3217 if test -n "$OBJDUMP"; then
3218   echo "$ac_t""$OBJDUMP" 1>&6
3219 else
3220   echo "$ac_t""no" 1>&6
3221 fi
3222
3223 else
3224   OBJDUMP="false"
3225 fi
3226 fi
3227
3228   ;;
3229
3230 esac
3231
3232
3233 # Save cache, so that ltconfig can load it
3234
3235
3236 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3237 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3238 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3239 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3240 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3241 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3242 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
3243 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3244
3245 # Reload cache, that may have been modified by ltconfig
3246
3247
3248 # This can be used to rebuild libtool when needed
3249 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3250
3251 # Always use our own libtool.
3252 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3253
3254 # Redirect the config.log output again, so that the ltconfig log is not
3255 # clobbered by the next message.
3256 exec 5>>./config.log
3257
3258
3259 for ac_prog in gawk mawk nawk awk
3260 do
3261 # Extract the first word of "$ac_prog", so it can be a program name with args.
3262 set dummy $ac_prog; ac_word=$2
3263 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3264 echo "configure:3265: checking for $ac_word" >&5
3265 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268   if test -n "$AWK"; then
3269   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3270 else
3271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3272   ac_dummy="$PATH"
3273   for ac_dir in $ac_dummy; do
3274     test -z "$ac_dir" && ac_dir=.
3275     if test -f $ac_dir/$ac_word; then
3276       ac_cv_prog_AWK="$ac_prog"
3277       break
3278     fi
3279   done
3280   IFS="$ac_save_ifs"
3281 fi
3282 fi
3283 AWK="$ac_cv_prog_AWK"
3284 if test -n "$AWK"; then
3285   echo "$ac_t""$AWK" 1>&6
3286 else
3287   echo "$ac_t""no" 1>&6
3288 fi
3289
3290 test -n "$AWK" && break
3291 done
3292
3293 # test for ln hardlink support
3294 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3295 echo "configure:3296: checking whether ln works" >&5
3296 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
3297   echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299   rm -f conftest.src conftest.dst
3300 echo "conftest" > conftest.src
3301 if ln conftest.src conftest.dst 2>/dev/null
3302 then
3303   ol_cv_prog_LN_H="ln"
3304 else
3305   ol_cv_prog_LN_H="cp"
3306 fi
3307 rm -f conftest.src conftest.dst
3308
3309 fi
3310 LN_H="$ol_cv_prog_LN_H"
3311 if test "$ol_cv_prog_LN_H" = "ln"; then
3312         echo "$ac_t""yes" 1>&6
3313 else
3314         echo "$ac_t""no" 1>&6
3315 fi
3316
3317 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3318 echo "configure:3319: checking whether ln -s works" >&5
3319 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3320   echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322   rm -f conftestdata
3323 if ln -s X conftestdata 2>/dev/null
3324 then
3325   rm -f conftestdata
3326   ac_cv_prog_LN_S="ln -s"
3327 else
3328   ac_cv_prog_LN_S=ln
3329 fi
3330 fi
3331 LN_S="$ac_cv_prog_LN_S"
3332 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3333   echo "$ac_t""yes" 1>&6
3334 else
3335   echo "$ac_t""no" 1>&6
3336 fi
3337
3338
3339 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3340         LN_S="$LN_H"
3341 fi
3342
3343 # Extract the first word of "sendmail", so it can be a program name with args.
3344 set dummy sendmail; ac_word=$2
3345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3346 echo "configure:3347: checking for $ac_word" >&5
3347 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
3348   echo $ac_n "(cached) $ac_c" 1>&6
3349 else
3350   case "$SENDMAIL" in
3351   /*)
3352   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3353   ;;
3354   ?:/*)                  
3355   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3356   ;;
3357   *)
3358   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3359   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3360   for ac_dir in $ac_dummy; do 
3361     test -z "$ac_dir" && ac_dir=.
3362     if test -f $ac_dir/$ac_word; then
3363       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3364       break
3365     fi
3366   done
3367   IFS="$ac_save_ifs"
3368   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3369   ;;
3370 esac
3371 fi
3372 SENDMAIL="$ac_cv_path_SENDMAIL"
3373 if test -n "$SENDMAIL"; then
3374   echo "$ac_t""$SENDMAIL" 1>&6
3375 else
3376   echo "$ac_t""no" 1>&6
3377 fi
3378
3379 # Extract the first word of "vi", so it can be a program name with args.
3380 set dummy vi; ac_word=$2
3381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3382 echo "configure:3383: checking for $ac_word" >&5
3383 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   case "$EDITOR" in
3387   /*)
3388   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3389   ;;
3390   ?:/*)                  
3391   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3392   ;;
3393   *)
3394   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3395   ac_dummy="$PATH:/usr/ucb"
3396   for ac_dir in $ac_dummy; do 
3397     test -z "$ac_dir" && ac_dir=.
3398     if test -f $ac_dir/$ac_word; then
3399       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3400       break
3401     fi
3402   done
3403   IFS="$ac_save_ifs"
3404   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3405   ;;
3406 esac
3407 fi
3408 EDITOR="$ac_cv_path_EDITOR"
3409 if test -n "$EDITOR"; then
3410   echo "$ac_t""$EDITOR" 1>&6
3411 else
3412   echo "$ac_t""no" 1>&6
3413 fi
3414
3415 # Extract the first word of "finger", so it can be a program name with args.
3416 set dummy finger; ac_word=$2
3417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3418 echo "configure:3419: checking for $ac_word" >&5
3419 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
3420   echo $ac_n "(cached) $ac_c" 1>&6
3421 else
3422   case "$FINGER" in
3423   /*)
3424   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3425   ;;
3426   ?:/*)                  
3427   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3428   ;;
3429   *)
3430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3431   ac_dummy="$PATH:/usr/ucb"
3432   for ac_dir in $ac_dummy; do 
3433     test -z "$ac_dir" && ac_dir=.
3434     if test -f $ac_dir/$ac_word; then
3435       ac_cv_path_FINGER="$ac_dir/$ac_word"
3436       break
3437     fi
3438   done
3439   IFS="$ac_save_ifs"
3440   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3441   ;;
3442 esac
3443 fi
3444 FINGER="$ac_cv_path_FINGER"
3445 if test -n "$FINGER"; then
3446   echo "$ac_t""$FINGER" 1>&6
3447 else
3448   echo "$ac_t""no" 1>&6
3449 fi
3450
3451
3452 ol_link_perl=no
3453 if test $ol_enable_perl != no ; then
3454         # Extract the first word of "perl", so it can be a program name with args.
3455 set dummy perl; ac_word=$2
3456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3457 echo "configure:3458: checking for $ac_word" >&5
3458 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   case "$PERLBIN" in
3462   /*)
3463   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3464   ;;
3465   ?:/*)                  
3466   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3467   ;;
3468   *)
3469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3470   ac_dummy="$PATH"
3471   for ac_dir in $ac_dummy; do 
3472     test -z "$ac_dir" && ac_dir=.
3473     if test -f $ac_dir/$ac_word; then
3474       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3475       break
3476     fi
3477   done
3478   IFS="$ac_save_ifs"
3479   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3480   ;;
3481 esac
3482 fi
3483 PERLBIN="$ac_cv_path_PERLBIN"
3484 if test -n "$PERLBIN"; then
3485   echo "$ac_t""$PERLBIN" 1>&6
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489
3490
3491         if test "no$PERLBIN" = "no" ; then
3492                 if test $ol_enable_perl = yes ; then
3493                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3494                 fi
3495
3496         else
3497                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3498                 if test x"$ol_with_perl_module" = "xstatic" ; then
3499                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3500                 else
3501                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3502                 fi
3503                                 ol_link_perl=yes
3504         fi
3505 fi
3506
3507 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3508 echo "configure:3509: checking how to run the C preprocessor" >&5
3509 # On Suns, sometimes $CPP names a directory.
3510 if test -n "$CPP" && test -d "$CPP"; then
3511   CPP=
3512 fi
3513 if test -z "$CPP"; then
3514 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517     # This must be in double quotes, not single quotes, because CPP may get
3518   # substituted into the Makefile and "${CC-cc}" will confuse make.
3519   CPP="${CC-cc} -E"
3520   # On the NeXT, cc -E runs the code through the compiler's parser,
3521   # not just through cpp.
3522   cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525 #include <assert.h>
3526 Syntax Error
3527 EOF
3528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3529 { (eval echo configure:3530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3531 if test -z "$ac_err"; then
3532   :
3533 else
3534   echo "$ac_err" >&5
3535   echo "configure: failed program was:" >&5
3536   cat conftest.$ac_ext >&5
3537   rm -rf conftest*
3538   CPP="${CC-cc} -E -traditional-cpp"
3539   cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <assert.h>
3543 Syntax Error
3544 EOF
3545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3546 { (eval echo configure:3547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3548 if test -z "$ac_err"; then
3549   :
3550 else
3551   echo "$ac_err" >&5
3552   echo "configure: failed program was:" >&5
3553   cat conftest.$ac_ext >&5
3554   rm -rf conftest*
3555   CPP="${CC-cc} -nologo -E"
3556   cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559 #include <assert.h>
3560 Syntax Error
3561 EOF
3562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3563 { (eval echo configure:3564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3565 if test -z "$ac_err"; then
3566   :
3567 else
3568   echo "$ac_err" >&5
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   CPP=/lib/cpp
3573 fi
3574 rm -f conftest*
3575 fi
3576 rm -f conftest*
3577 fi
3578 rm -f conftest*
3579   ac_cv_prog_CPP="$CPP"
3580 fi
3581   CPP="$ac_cv_prog_CPP"
3582 else
3583   ac_cv_prog_CPP="$CPP"
3584 fi
3585 echo "$ac_t""$CPP" 1>&6
3586
3587
3588 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3589         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3590
3591 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3592         echo "configure: warning: programs compiled here do run here..." 1>&2
3593         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3594
3595 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3596         echo "configure: warning: programs compiled here do not run here..." 1>&2
3597         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3598 fi
3599
3600 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3601 echo "configure:3602: checking for AIX" >&5
3602 cat > conftest.$ac_ext <<EOF
3603 #line 3604 "configure"
3604 #include "confdefs.h"
3605 #ifdef _AIX
3606   yes
3607 #endif
3608
3609 EOF
3610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3611   egrep "yes" >/dev/null 2>&1; then
3612   rm -rf conftest*
3613   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3614 #define _ALL_SOURCE 1
3615 EOF
3616
3617 else
3618   rm -rf conftest*
3619   echo "$ac_t""no" 1>&6
3620 fi
3621 rm -f conftest*
3622
3623
3624 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3625 echo "configure:3626: checking for POSIXized ISC" >&5
3626 if test -d /etc/conf/kconfig.d &&
3627   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3628 then
3629   echo "$ac_t""yes" 1>&6
3630   ISC=yes # If later tests want to check for ISC.
3631   cat >> confdefs.h <<\EOF
3632 #define _POSIX_SOURCE 1
3633 EOF
3634
3635   if test "$GCC" = yes; then
3636     CC="$CC -posix"
3637   else
3638     CC="$CC -Xp"
3639   fi
3640 else
3641   echo "$ac_t""no" 1>&6
3642   ISC=
3643 fi
3644
3645 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3646 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3647 echo "configure:3648: checking for minix/config.h" >&5
3648 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3649   echo $ac_n "(cached) $ac_c" 1>&6
3650 else
3651   cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <minix/config.h>
3655 EOF
3656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3657 { (eval echo configure:3658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3659 if test -z "$ac_err"; then
3660   rm -rf conftest*
3661   eval "ac_cv_header_$ac_safe=yes"
3662 else
3663   echo "$ac_err" >&5
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   eval "ac_cv_header_$ac_safe=no"
3668 fi
3669 rm -f conftest*
3670 fi
3671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3672   echo "$ac_t""yes" 1>&6
3673   MINIX=yes
3674 else
3675   echo "$ac_t""no" 1>&6
3676 MINIX=
3677 fi
3678
3679 if test "$MINIX" = yes; then
3680   cat >> confdefs.h <<\EOF
3681 #define _POSIX_SOURCE 1
3682 EOF
3683
3684   cat >> confdefs.h <<\EOF
3685 #define _POSIX_1_SOURCE 2
3686 EOF
3687
3688   cat >> confdefs.h <<\EOF
3689 #define _MINIX 1
3690 EOF
3691
3692 fi
3693
3694
3695 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3696 echo "configure:3697: checking for Cygwin environment" >&5
3697 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3698   echo $ac_n "(cached) $ac_c" 1>&6
3699 else
3700   cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703
3704 int main() {
3705
3706 #ifndef __CYGWIN__
3707 #define __CYGWIN__ __CYGWIN32__
3708 #endif
3709 return __CYGWIN__;
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3713   rm -rf conftest*
3714   ac_cv_cygwin=yes
3715 else
3716   echo "configure: failed program was:" >&5
3717   cat conftest.$ac_ext >&5
3718   rm -rf conftest*
3719   ac_cv_cygwin=no
3720 fi
3721 rm -f conftest*
3722 rm -f conftest*
3723 fi
3724
3725 echo "$ac_t""$ac_cv_cygwin" 1>&6
3726 CYGWIN=
3727 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3728 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3729 echo "configure:3730: checking for mingw32 environment" >&5
3730 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3731   echo $ac_n "(cached) $ac_c" 1>&6
3732 else
3733   cat > conftest.$ac_ext <<EOF
3734 #line 3735 "configure"
3735 #include "confdefs.h"
3736
3737 int main() {
3738 return __MINGW32__;
3739 ; return 0; }
3740 EOF
3741 if { (eval echo configure:3742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3742   rm -rf conftest*
3743   ac_cv_mingw32=yes
3744 else
3745   echo "configure: failed program was:" >&5
3746   cat conftest.$ac_ext >&5
3747   rm -rf conftest*
3748   ac_cv_mingw32=no
3749 fi
3750 rm -f conftest*
3751 rm -f conftest*
3752 fi
3753
3754 echo "$ac_t""$ac_cv_mingw32" 1>&6
3755 MINGW32=
3756 test "$ac_cv_mingw32" = yes && MINGW32=yes
3757
3758
3759 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3760 echo "configure:3761: checking for executable suffix" >&5
3761 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3762   echo $ac_n "(cached) $ac_c" 1>&6
3763 else
3764   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3765   ac_cv_exeext=.exe
3766 else
3767   rm -f conftest*
3768   echo 'int main () { return 0; }' > conftest.$ac_ext
3769   ac_cv_exeext=
3770   if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3771     for file in conftest.*; do
3772       case $file in
3773       *.c | *.o | *.obj) ;;
3774       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3775       esac
3776     done
3777   else
3778     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3779   fi
3780   rm -f conftest*
3781   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3782 fi
3783 fi
3784
3785 EXEEXT=""
3786 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3787 echo "$ac_t""${ac_cv_exeext}" 1>&6
3788 ac_exeext=$EXEEXT
3789
3790 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3791 echo "configure:3792: checking for object suffix" >&5
3792 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   rm -f conftest*
3796 echo 'int i = 1;' > conftest.$ac_ext
3797 if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3798   for ac_file in conftest.*; do
3799     case $ac_file in
3800     *.c) ;;
3801     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3802     esac
3803   done
3804 else
3805   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3806 fi
3807 rm -f conftest*
3808 fi
3809
3810 echo "$ac_t""$ac_cv_objext" 1>&6
3811 OBJEXT=$ac_cv_objext
3812 ac_objext=$ac_cv_objext
3813
3814
3815 cat >> confdefs.h <<EOF
3816 #define EXEEXT "${EXEEXT}"
3817 EOF
3818
3819
3820 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3821 echo "configure:3822: checking for be_app in -lbe" >&5
3822 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   ac_save_LIBS="$LIBS"
3827 LIBS="-lbe -lroot -lnet $LIBS"
3828 cat > conftest.$ac_ext <<EOF
3829 #line 3830 "configure"
3830 #include "confdefs.h"
3831 /* Override any gcc2 internal prototype to avoid an error.  */
3832 /* We use char because int might match the return type of a gcc2
3833     builtin and then its argument prototype would still apply.  */
3834 char be_app();
3835
3836 int main() {
3837 be_app()
3838 ; return 0; }
3839 EOF
3840 if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3841   rm -rf conftest*
3842   eval "ac_cv_lib_$ac_lib_var=yes"
3843 else
3844   echo "configure: failed program was:" >&5
3845   cat conftest.$ac_ext >&5
3846   rm -rf conftest*
3847   eval "ac_cv_lib_$ac_lib_var=no"
3848 fi
3849 rm -f conftest*
3850 LIBS="$ac_save_LIBS"
3851
3852 fi
3853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3854   echo "$ac_t""yes" 1>&6
3855   LIBS="$LIBS -lbe -lroot -lnet"
3856 else
3857   echo "$ac_t""no" 1>&6
3858 :
3859 fi
3860
3861
3862
3863
3864
3865 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3866 echo "configure:3867: checking for ${CC-cc} option to accept ANSI C" >&5
3867 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3868   echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870   am_cv_prog_cc_stdc=no
3871 ac_save_CC="$CC"
3872 # Don't try gcc -ansi; that turns off useful extensions and
3873 # breaks some systems' header files.
3874 # AIX                   -qlanglvl=ansi
3875 # Ultrix and OSF/1      -std1
3876 # HP-UX 10.20 and later -Ae
3877 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3878 # SVR4                  -Xc -D__EXTENSIONS__
3879 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3880 do
3881   CC="$ac_save_CC $ac_arg"
3882   cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 #include <stdarg.h>
3886 #include <stdio.h>
3887 #include <sys/types.h>
3888 #include <sys/stat.h>
3889 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3890 struct buf { int x; };
3891 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3892 static char *e (p, i)
3893      char **p;
3894      int i;
3895 {
3896   return p[i];
3897 }
3898 static char *f (char * (*g) (char **, int), char **p, ...)
3899 {
3900   char *s;
3901   va_list v;
3902   va_start (v,p);
3903   s = g (p, va_arg (v,int));
3904   va_end (v);
3905   return s;
3906 }
3907 int test (int i, double x);
3908 struct s1 {int (*f) (int a);};
3909 struct s2 {int (*f) (double a);};
3910 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3911 int argc;
3912 char **argv;
3913
3914 int main() {
3915
3916 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3917
3918 ; return 0; }
3919 EOF
3920 if { (eval echo configure:3921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3921   rm -rf conftest*
3922   am_cv_prog_cc_stdc="$ac_arg"; break
3923 else
3924   echo "configure: failed program was:" >&5
3925   cat conftest.$ac_ext >&5
3926 fi
3927 rm -f conftest*
3928 done
3929 CC="$ac_save_CC"
3930
3931 fi
3932
3933 if test -z "$am_cv_prog_cc_stdc"; then
3934   echo "$ac_t""none needed" 1>&6
3935 else
3936   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3937 fi
3938 case "x$am_cv_prog_cc_stdc" in
3939   x|xno) ;;
3940   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3941 esac
3942
3943 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3944         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3945 fi
3946
3947 # test for make depend flag
3948 OL_MKDEP=
3949 OL_MKDEP_FLAGS=
3950 if test -z "${MKDEP}"; then
3951         OL_MKDEP="${CC-cc}"
3952         if test -z "${MKDEP_FLAGS}"; then
3953                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3954 echo "configure:3955: checking for ${OL_MKDEP} depend flag" >&5
3955 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   
3959                         ol_cv_mkdep=no
3960                         for flag in "-M" "-xM"; do
3961                                 cat > conftest.c <<EOF
3962  noCode;
3963 EOF
3964                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3965                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3966                                 then
3967                                         if test ! -f conftest."${ac_object}" ; then
3968                                                 ol_cv_mkdep=$flag
3969                                                 OL_MKDEP_FLAGS="$flag"
3970                                                 break
3971                                         fi
3972                                 fi
3973                         done
3974                         rm -f conftest*
3975                 
3976 fi
3977
3978 echo "$ac_t""$ol_cv_mkdep" 1>&6
3979         else
3980                 cc_cv_mkdep=yes
3981                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3982         fi
3983 else
3984         cc_cv_mkdep=yes
3985         OL_MKDEP="${MKDEP}"
3986         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3987 fi
3988
3989
3990
3991 if test "${ol_cv_mkdep}" = no ; then
3992         # this will soon become an error
3993         echo "configure: warning: do not know how to generate dependencies" 1>&2
3994 fi
3995
3996 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
3997 echo "configure:3998: checking for afopen in -ls" >&5
3998 ac_lib_var=`echo s'_'afopen | sed 'y%./+-%__p_%'`
3999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   ac_save_LIBS="$LIBS"
4003 LIBS="-ls  $LIBS"
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 /* Override any gcc2 internal prototype to avoid an error.  */
4008 /* We use char because int might match the return type of a gcc2
4009     builtin and then its argument prototype would still apply.  */
4010 char afopen();
4011
4012 int main() {
4013 afopen()
4014 ; return 0; }
4015 EOF
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4017   rm -rf conftest*
4018   eval "ac_cv_lib_$ac_lib_var=yes"
4019 else
4020   echo "configure: failed program was:" >&5
4021   cat conftest.$ac_ext >&5
4022   rm -rf conftest*
4023   eval "ac_cv_lib_$ac_lib_var=no"
4024 fi
4025 rm -f conftest*
4026 LIBS="$ac_save_LIBS"
4027
4028 fi
4029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4030   echo "$ac_t""yes" 1>&6
4031   
4032         AUTH_LIBS=-ls
4033         cat >> confdefs.h <<\EOF
4034 #define HAVE_AIX_SECURITY 1
4035 EOF
4036
4037
4038 else
4039   echo "$ac_t""no" 1>&6
4040 fi
4041
4042
4043 ol_link_modules=no
4044 if test $ol_enable_modules != no ; then
4045         for ac_hdr in ltdl.h
4046 do
4047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4049 echo "configure:4050: checking for $ac_hdr" >&5
4050 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4051   echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053   cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #include <$ac_hdr>
4057 EOF
4058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4059 { (eval echo configure:4060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4061 if test -z "$ac_err"; then
4062   rm -rf conftest*
4063   eval "ac_cv_header_$ac_safe=yes"
4064 else
4065   echo "$ac_err" >&5
4066   echo "configure: failed program was:" >&5
4067   cat conftest.$ac_ext >&5
4068   rm -rf conftest*
4069   eval "ac_cv_header_$ac_safe=no"
4070 fi
4071 rm -f conftest*
4072 fi
4073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4074   echo "$ac_t""yes" 1>&6
4075     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4076   cat >> confdefs.h <<EOF
4077 #define $ac_tr_hdr 1
4078 EOF
4079  
4080 else
4081   echo "$ac_t""no" 1>&6
4082 fi
4083 done
4084
4085
4086         if test $ac_cv_header_ltdl_h = no ; then
4087                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
4088         fi
4089
4090         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
4091 echo "configure:4092: checking for lt_dlinit in -lltdl" >&5
4092 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-%__p_%'`
4093 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4094   echo $ac_n "(cached) $ac_c" 1>&6
4095 else
4096   ac_save_LIBS="$LIBS"
4097 LIBS="-lltdl  $LIBS"
4098 cat > conftest.$ac_ext <<EOF
4099 #line 4100 "configure"
4100 #include "confdefs.h"
4101 /* Override any gcc2 internal prototype to avoid an error.  */
4102 /* We use char because int might match the return type of a gcc2
4103     builtin and then its argument prototype would still apply.  */
4104 char lt_dlinit();
4105
4106 int main() {
4107 lt_dlinit()
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4111   rm -rf conftest*
4112   eval "ac_cv_lib_$ac_lib_var=yes"
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   eval "ac_cv_lib_$ac_lib_var=no"
4118 fi
4119 rm -f conftest*
4120 LIBS="$ac_save_LIBS"
4121
4122 fi
4123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4124   echo "$ac_t""yes" 1>&6
4125   
4126             MODULES_LIBS=-lltdl
4127             cat >> confdefs.h <<\EOF
4128 #define HAVE_LIBLTDL 1
4129 EOF
4130
4131         
4132 else
4133   echo "$ac_t""no" 1>&6
4134 fi
4135
4136
4137         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
4138                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
4139         fi
4140         ol_link_modules=yes
4141 else
4142         ol_with_dnssrv_module=static
4143         ol_with_ldap_module=static
4144         ol_with_ldbm_module=static
4145         ol_with_passwd_module=static
4146         ol_with_perl_module=static
4147         ol_with_shell_module=static
4148         ol_with_tcl_module=static
4149         ol_with_sql_module=static
4150 fi
4151
4152 # test for EBCDIC
4153 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
4154 echo "configure:4155: checking for EBCDIC" >&5
4155 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
4156   echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158   
4159         cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162
4163 #if !('M' == 0xd4)
4164 #include <__ASCII__/generate_error.h>
4165 #endif
4166
4167 EOF
4168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4169 { (eval echo configure:4170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4171 if test -z "$ac_err"; then
4172   rm -rf conftest*
4173   ol_cv_cpp_ebcdic=yes
4174 else
4175   echo "$ac_err" >&5
4176   echo "configure: failed program was:" >&5
4177   cat conftest.$ac_ext >&5
4178   rm -rf conftest*
4179   ol_cv_cpp_ebcdic=no
4180 fi
4181 rm -f conftest*
4182 fi
4183
4184 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
4185 if test $ol_cv_cpp_ebcdic = yes ; then
4186         cat >> confdefs.h <<\EOF
4187 #define HAVE_EBCDIC 1
4188 EOF
4189
4190 fi
4191
4192 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4193 echo "configure:4194: checking for ANSI C header files" >&5
4194 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 #include <stdlib.h>
4201 #include <stdarg.h>
4202 #include <string.h>
4203 #include <float.h>
4204 EOF
4205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4206 { (eval echo configure:4207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4208 if test -z "$ac_err"; then
4209   rm -rf conftest*
4210   ol_cv_header_stdc=yes
4211 else
4212   echo "$ac_err" >&5
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -rf conftest*
4216   ol_cv_header_stdc=no
4217 fi
4218 rm -f conftest*
4219
4220 if test $ol_cv_header_stdc = yes; then
4221   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4222 cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <string.h>
4226 EOF
4227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4228   egrep "memchr" >/dev/null 2>&1; then
4229   :
4230 else
4231   rm -rf conftest*
4232   ol_cv_header_stdc=no
4233 fi
4234 rm -f conftest*
4235
4236 fi
4237
4238 if test $ol_cv_header_stdc = yes; then
4239   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4240 cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 #include <stdlib.h>
4244 EOF
4245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4246   egrep "free" >/dev/null 2>&1; then
4247   :
4248 else
4249   rm -rf conftest*
4250   ol_cv_header_stdc=no
4251 fi
4252 rm -f conftest*
4253
4254 fi
4255
4256 if test $ol_cv_header_stdc = yes; then
4257   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4258 if test "$cross_compiling" = yes; then
4259   :
4260 else
4261   cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264 #include <ctype.h>
4265 #ifndef HAVE_EBCDIC
4266 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4267 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4268 #else
4269 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4270                 || ('j' <= (c) && (c) <= 'r') \
4271                 || ('s' <= (c) && (c) <= 'z'))
4272 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4273 #endif
4274 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4275 int main () { int i; for (i = 0; i < 256; i++)
4276 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4277 exit (0); }
4278
4279 EOF
4280 if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4281 then
4282   :
4283 else
4284   echo "configure: failed program was:" >&5
4285   cat conftest.$ac_ext >&5
4286   rm -fr conftest*
4287   ol_cv_header_stdc=no
4288 fi
4289 rm -fr conftest*
4290 fi
4291
4292 fi
4293 fi
4294
4295 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4296 if test $ol_cv_header_stdc = yes; then
4297   cat >> confdefs.h <<\EOF
4298 #define STDC_HEADERS 1
4299 EOF
4300
4301 fi
4302 ac_cv_header_stdc=disable
4303
4304
4305 if test $ol_cv_header_stdc != yes; then
4306         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4307 fi
4308
4309 ac_header_dirent=no
4310 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4311 do
4312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4313 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4314 echo "configure:4315: checking for $ac_hdr that defines DIR" >&5
4315 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4316   echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318   cat > conftest.$ac_ext <<EOF
4319 #line 4320 "configure"
4320 #include "confdefs.h"
4321 #include <sys/types.h>
4322 #include <$ac_hdr>
4323 int main() {
4324 DIR *dirp = 0;
4325 ; return 0; }
4326 EOF
4327 if { (eval echo configure:4328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4328   rm -rf conftest*
4329   eval "ac_cv_header_dirent_$ac_safe=yes"
4330 else
4331   echo "configure: failed program was:" >&5
4332   cat conftest.$ac_ext >&5
4333   rm -rf conftest*
4334   eval "ac_cv_header_dirent_$ac_safe=no"
4335 fi
4336 rm -f conftest*
4337 fi
4338 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4339   echo "$ac_t""yes" 1>&6
4340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4341   cat >> confdefs.h <<EOF
4342 #define $ac_tr_hdr 1
4343 EOF
4344  ac_header_dirent=$ac_hdr; break
4345 else
4346   echo "$ac_t""no" 1>&6
4347 fi
4348 done
4349 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4350 if test $ac_header_dirent = dirent.h; then
4351 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4352 echo "configure:4353: checking for opendir in -ldir" >&5
4353 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   ac_save_LIBS="$LIBS"
4358 LIBS="-ldir  $LIBS"
4359 cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362 /* Override any gcc2 internal prototype to avoid an error.  */
4363 /* We use char because int might match the return type of a gcc2
4364     builtin and then its argument prototype would still apply.  */
4365 char opendir();
4366
4367 int main() {
4368 opendir()
4369 ; return 0; }
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4372   rm -rf conftest*
4373   eval "ac_cv_lib_$ac_lib_var=yes"
4374 else
4375   echo "configure: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   rm -rf conftest*
4378   eval "ac_cv_lib_$ac_lib_var=no"
4379 fi
4380 rm -f conftest*
4381 LIBS="$ac_save_LIBS"
4382
4383 fi
4384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4385   echo "$ac_t""yes" 1>&6
4386   LIBS="$LIBS -ldir"
4387 else
4388   echo "$ac_t""no" 1>&6
4389 fi
4390
4391 else
4392 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4393 echo "configure:4394: checking for opendir in -lx" >&5
4394 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   ac_save_LIBS="$LIBS"
4399 LIBS="-lx  $LIBS"
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 /* Override any gcc2 internal prototype to avoid an error.  */
4404 /* We use char because int might match the return type of a gcc2
4405     builtin and then its argument prototype would still apply.  */
4406 char opendir();
4407
4408 int main() {
4409 opendir()
4410 ; return 0; }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4413   rm -rf conftest*
4414   eval "ac_cv_lib_$ac_lib_var=yes"
4415 else
4416   echo "configure: failed program was:" >&5
4417   cat conftest.$ac_ext >&5
4418   rm -rf conftest*
4419   eval "ac_cv_lib_$ac_lib_var=no"
4420 fi
4421 rm -f conftest*
4422 LIBS="$ac_save_LIBS"
4423
4424 fi
4425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4426   echo "$ac_t""yes" 1>&6
4427   LIBS="$LIBS -lx"
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431
4432 fi
4433
4434 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4435 echo "configure:4436: checking for sys/wait.h that is POSIX.1 compatible" >&5
4436 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4437   echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439   cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4442 #include <sys/types.h>
4443 #include <sys/wait.h>
4444 #ifndef WEXITSTATUS
4445 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4446 #endif
4447 #ifndef WIFEXITED
4448 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4449 #endif
4450 int main() {
4451 int s;
4452 wait (&s);
4453 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4454 ; return 0; }
4455 EOF
4456 if { (eval echo configure:4457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4457   rm -rf conftest*
4458   ac_cv_header_sys_wait_h=yes
4459 else
4460   echo "configure: failed program was:" >&5
4461   cat conftest.$ac_ext >&5
4462   rm -rf conftest*
4463   ac_cv_header_sys_wait_h=no
4464 fi
4465 rm -f conftest*
4466 fi
4467
4468 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4469 if test $ac_cv_header_sys_wait_h = yes; then
4470   cat >> confdefs.h <<\EOF
4471 #define HAVE_SYS_WAIT_H 1
4472 EOF
4473
4474 fi
4475
4476 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4477 echo "configure:4478: checking POSIX termios" >&5
4478 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
4479   echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481   cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 #include <sys/types.h>
4485 #include <unistd.h>
4486 #include <termios.h>
4487 int main() {
4488 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4489    tcgetattr(0, 0);
4490 ; return 0; }
4491 EOF
4492 if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4493   rm -rf conftest*
4494   am_cv_sys_posix_termios=yes
4495 else
4496   echo "configure: failed program was:" >&5
4497   cat conftest.$ac_ext >&5
4498   rm -rf conftest*
4499   am_cv_sys_posix_termios=no
4500 fi
4501 rm -f conftest*
4502 fi
4503
4504 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4505
4506
4507  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4508 echo "configure:4509: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4509 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
4510   echo $ac_n "(cached) $ac_c" 1>&6
4511 else
4512   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4513
4514   gwinsz_in_termios_h=no
4515   if test $am_cv_sys_posix_termios = yes; then
4516     cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <sys/types.h>
4520 #     include <termios.h>
4521 #     ifdef TIOCGWINSZ
4522         yes
4523 #     endif
4524     
4525 EOF
4526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4527   egrep "yes" >/dev/null 2>&1; then
4528   rm -rf conftest*
4529   gwinsz_in_termios_h=yes
4530 fi
4531 rm -f conftest*
4532
4533   fi
4534
4535   if test $gwinsz_in_termios_h = no; then
4536     cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539 #include <sys/types.h>
4540 #     include <sys/ioctl.h>
4541 #     ifdef TIOCGWINSZ
4542         yes
4543 #     endif
4544     
4545 EOF
4546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4547   egrep "yes" >/dev/null 2>&1; then
4548   rm -rf conftest*
4549   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4550 fi
4551 rm -f conftest*
4552
4553   fi
4554   
4555 fi
4556
4557 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4558   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4559     cat >> confdefs.h <<\EOF
4560 #define GWINSZ_IN_SYS_IOCTL 1
4561 EOF
4562
4563   fi
4564
4565 if test $am_cv_sys_posix_termios = yes ; then
4566         cat >> confdefs.h <<\EOF
4567 #define HAVE_POSIX_TERMIOS 1
4568 EOF
4569
4570 fi
4571
4572 for ac_hdr in \
4573         arpa/inet.h             \
4574         arpa/nameser.h  \
4575         assert.h                \
4576         conio.h                 \
4577         crypt.h                 \
4578         direct.h                \
4579         errno.h                 \
4580         fcntl.h                 \
4581         filio.h                 \
4582         getopt.h                \
4583         grp.h                   \
4584         io.h                    \
4585         libutil.h               \
4586         limits.h                \
4587         locale.h                \
4588         netinet/tcp.h   \
4589         malloc.h                \
4590         memory.h                \
4591         psap.h                  \
4592         pwd.h                   \
4593         process.h               \
4594         resolv.h                \
4595         sgtty.h                 \
4596         shadow.h                \
4597         stddef.h                \
4598         string.h                \
4599         strings.h               \
4600         sysexits.h              \
4601         sys/file.h              \
4602         sys/filio.h             \
4603         sys/errno.h             \
4604         sys/ioctl.h             \
4605         sys/param.h             \
4606         sys/resource.h  \
4607         sys/select.h    \
4608         sys/socket.h    \
4609         sys/syslog.h    \
4610         sys/time.h              \
4611         sys/types.h             \
4612         syslog.h                \
4613         termios.h               \
4614         unistd.h                \
4615         winsock.h               \
4616
4617 do
4618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_hdr" >&5
4621 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 #include <$ac_hdr>
4628 EOF
4629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4630 { (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4632 if test -z "$ac_err"; then
4633   rm -rf conftest*
4634   eval "ac_cv_header_$ac_safe=yes"
4635 else
4636   echo "$ac_err" >&5
4637   echo "configure: failed program was:" >&5
4638   cat conftest.$ac_ext >&5
4639   rm -rf conftest*
4640   eval "ac_cv_header_$ac_safe=no"
4641 fi
4642 rm -f conftest*
4643 fi
4644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4645   echo "$ac_t""yes" 1>&6
4646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4647   cat >> confdefs.h <<EOF
4648 #define $ac_tr_hdr 1
4649 EOF
4650  
4651 else
4652   echo "$ac_t""no" 1>&6
4653 fi
4654 done
4655
4656
4657
4658
4659 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4660 echo "configure:4661: checking for sigset in -lV3" >&5
4661 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   ac_save_LIBS="$LIBS"
4666 LIBS="-lV3  $LIBS"
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 /* Override any gcc2 internal prototype to avoid an error.  */
4671 /* We use char because int might match the return type of a gcc2
4672     builtin and then its argument prototype would still apply.  */
4673 char sigset();
4674
4675 int main() {
4676 sigset()
4677 ; return 0; }
4678 EOF
4679 if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4680   rm -rf conftest*
4681   eval "ac_cv_lib_$ac_lib_var=yes"
4682 else
4683   echo "configure: failed program was:" >&5
4684   cat conftest.$ac_ext >&5
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=no"
4687 fi
4688 rm -f conftest*
4689 LIBS="$ac_save_LIBS"
4690
4691 fi
4692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4693   echo "$ac_t""yes" 1>&6
4694     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4695     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4696   cat >> confdefs.h <<EOF
4697 #define $ac_tr_lib 1
4698 EOF
4699
4700   LIBS="-lV3 $LIBS"
4701
4702 else
4703   echo "$ac_t""no" 1>&6
4704 fi
4705
4706
4707 if test $ac_cv_header_winsock_h = yes; then
4708         echo $ac_n "checking for winsock""... $ac_c" 1>&6
4709 echo "configure:4710: checking for winsock" >&5
4710 if eval "test \"`echo '$''{'ol_cv_winsock'+set}'`\" = set"; then
4711   echo $ac_n "(cached) $ac_c" 1>&6
4712 else
4713   cat > conftest.$ac_ext <<EOF
4714 #line 4715 "configure"
4715 #include "confdefs.h"
4716 #include <winsock.h>
4717 int main() {
4718
4719                         socket(0,0,0);
4720                         select(0,NULL,NULL,NULL,NULL);
4721                         closesocket(0);
4722                         gethostname(NULL,0);
4723         
4724 ; return 0; }
4725 EOF
4726 if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4727   rm -rf conftest*
4728   ol_cv_winsock=yes
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   ol_cv_winsock=no
4734 fi
4735 rm -f conftest*]
4736 fi
4737
4738 echo "$ac_t""$ol_cv_winsock" 1>&6
4739
4740         if test $ol_cv_winsock = yes ; then
4741                 cat >> confdefs.h <<\EOF
4742 #define HAVE_WINSOCK 1
4743 EOF
4744
4745                 ac_cv_func_socket=yes
4746                 ac_cv_func_select=yes
4747                 ac_cv_func_closesocket=yes
4748                 ac_cv_func_gethostname=yes
4749         fi
4750 fi
4751
4752
4753 echo $ac_n "checking for socket""... $ac_c" 1>&6
4754 echo "configure:4755: checking for socket" >&5
4755 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 /* System header to define __stub macros and hopefully few prototypes,
4762     which can conflict with char socket(); below.  */
4763 #include <assert.h>
4764 /* Override any gcc2 internal prototype to avoid an error.  */
4765 /* We use char because int might match the return type of a gcc2
4766     builtin and then its argument prototype would still apply.  */
4767 char socket();
4768
4769 int main() {
4770
4771 /* The GNU C library defines this for functions which it implements
4772     to always fail with ENOSYS.  Some functions are actually named
4773     something starting with __ and the normal name is an alias.  */
4774 #if defined (__stub_socket) || defined (__stub___socket)
4775 choke me
4776 #else
4777 socket();
4778 #endif
4779
4780 ; return 0; }
4781 EOF
4782 if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4783   rm -rf conftest*
4784   eval "ac_cv_func_socket=yes"
4785 else
4786   echo "configure: failed program was:" >&5
4787   cat conftest.$ac_ext >&5
4788   rm -rf conftest*
4789   eval "ac_cv_func_socket=no"
4790 fi
4791 rm -f conftest*
4792 fi
4793
4794 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4795   echo "$ac_t""yes" 1>&6
4796   :
4797 else
4798   echo "$ac_t""no" 1>&6
4799         
4800         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4801 echo "configure:4802: checking for main in -lsocket" >&5
4802 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4803 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   ac_save_LIBS="$LIBS"
4807 LIBS="-lsocket  $LIBS"
4808 cat > conftest.$ac_ext <<EOF
4809 #line 4810 "configure"
4810 #include "confdefs.h"
4811
4812 int main() {
4813 main()
4814 ; return 0; }
4815 EOF
4816 if { (eval echo configure:4817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4817   rm -rf conftest*
4818   eval "ac_cv_lib_$ac_lib_var=yes"
4819 else
4820   echo "configure: failed program was:" >&5
4821   cat conftest.$ac_ext >&5
4822   rm -rf conftest*
4823   eval "ac_cv_lib_$ac_lib_var=no"
4824 fi
4825 rm -f conftest*
4826 LIBS="$ac_save_LIBS"
4827
4828 fi
4829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4830   echo "$ac_t""yes" 1>&6
4831     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4832     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4833   cat >> confdefs.h <<EOF
4834 #define $ac_tr_lib 1
4835 EOF
4836
4837   LIBS="-lsocket $LIBS"
4838
4839 else
4840   echo "$ac_t""no" 1>&6
4841 fi
4842
4843         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4844 echo "configure:4845: checking for main in -lnet" >&5
4845 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
4846 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   ac_save_LIBS="$LIBS"
4850 LIBS="-lnet  $LIBS"
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854
4855 int main() {
4856 main()
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4860   rm -rf conftest*
4861   eval "ac_cv_lib_$ac_lib_var=yes"
4862 else
4863   echo "configure: failed program was:" >&5
4864   cat conftest.$ac_ext >&5
4865   rm -rf conftest*
4866   eval "ac_cv_lib_$ac_lib_var=no"
4867 fi
4868 rm -f conftest*
4869 LIBS="$ac_save_LIBS"
4870
4871 fi
4872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4873   echo "$ac_t""yes" 1>&6
4874     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4875     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4876   cat >> confdefs.h <<EOF
4877 #define $ac_tr_lib 1
4878 EOF
4879
4880   LIBS="-lnet $LIBS"
4881
4882 else
4883   echo "$ac_t""no" 1>&6
4884 fi
4885
4886         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4887 echo "configure:4888: checking for main in -lnsl_s" >&5
4888 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
4889 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4890   echo $ac_n "(cached) $ac_c" 1>&6
4891 else
4892   ac_save_LIBS="$LIBS"
4893 LIBS="-lnsl_s  $LIBS"
4894 cat > conftest.$ac_ext <<EOF
4895 #line 4896 "configure"
4896 #include "confdefs.h"
4897
4898 int main() {
4899 main()
4900 ; return 0; }
4901 EOF
4902 if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4903   rm -rf conftest*
4904   eval "ac_cv_lib_$ac_lib_var=yes"
4905 else
4906   echo "configure: failed program was:" >&5
4907   cat conftest.$ac_ext >&5
4908   rm -rf conftest*
4909   eval "ac_cv_lib_$ac_lib_var=no"
4910 fi
4911 rm -f conftest*
4912 LIBS="$ac_save_LIBS"
4913
4914 fi
4915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4916   echo "$ac_t""yes" 1>&6
4917     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4918     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4919   cat >> confdefs.h <<EOF
4920 #define $ac_tr_lib 1
4921 EOF
4922
4923   LIBS="-lnsl_s $LIBS"
4924
4925 else
4926   echo "$ac_t""no" 1>&6
4927 fi
4928
4929         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4930 echo "configure:4931: checking for main in -lnsl" >&5
4931 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4933   echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935   ac_save_LIBS="$LIBS"
4936 LIBS="-lnsl  $LIBS"
4937 cat > conftest.$ac_ext <<EOF
4938 #line 4939 "configure"
4939 #include "confdefs.h"
4940
4941 int main() {
4942 main()
4943 ; return 0; }
4944 EOF
4945 if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4946   rm -rf conftest*
4947   eval "ac_cv_lib_$ac_lib_var=yes"
4948 else
4949   echo "configure: failed program was:" >&5
4950   cat conftest.$ac_ext >&5
4951   rm -rf conftest*
4952   eval "ac_cv_lib_$ac_lib_var=no"
4953 fi
4954 rm -f conftest*
4955 LIBS="$ac_save_LIBS"
4956
4957 fi
4958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4959   echo "$ac_t""yes" 1>&6
4960     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4961     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4962   cat >> confdefs.h <<EOF
4963 #define $ac_tr_lib 1
4964 EOF
4965
4966   LIBS="-lnsl $LIBS"
4967
4968 else
4969   echo "$ac_t""no" 1>&6
4970 fi
4971
4972         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4973 echo "configure:4974: checking for socket in -linet" >&5
4974 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
4975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4976   echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978   ac_save_LIBS="$LIBS"
4979 LIBS="-linet  $LIBS"
4980 cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 /* Override any gcc2 internal prototype to avoid an error.  */
4984 /* We use char because int might match the return type of a gcc2
4985     builtin and then its argument prototype would still apply.  */
4986 char socket();
4987
4988 int main() {
4989 socket()
4990 ; return 0; }
4991 EOF
4992 if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4993   rm -rf conftest*
4994   eval "ac_cv_lib_$ac_lib_var=yes"
4995 else
4996   echo "configure: failed program was:" >&5
4997   cat conftest.$ac_ext >&5
4998   rm -rf conftest*
4999   eval "ac_cv_lib_$ac_lib_var=no"
5000 fi
5001 rm -f conftest*
5002 LIBS="$ac_save_LIBS"
5003
5004 fi
5005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5006   echo "$ac_t""yes" 1>&6
5007     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5008     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5009   cat >> confdefs.h <<EOF
5010 #define $ac_tr_lib 1
5011 EOF
5012
5013   LIBS="-linet $LIBS"
5014
5015 else
5016   echo "$ac_t""no" 1>&6
5017 fi
5018
5019         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
5020 echo "configure:5021: checking for main in -lgen" >&5
5021 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
5022 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5023   echo $ac_n "(cached) $ac_c" 1>&6
5024 else
5025   ac_save_LIBS="$LIBS"
5026 LIBS="-lgen  $LIBS"
5027 cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030
5031 int main() {
5032 main()
5033 ; return 0; }
5034 EOF
5035 if { (eval echo configure:5036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5036   rm -rf conftest*
5037   eval "ac_cv_lib_$ac_lib_var=yes"
5038 else
5039   echo "configure: failed program was:" >&5
5040   cat conftest.$ac_ext >&5
5041   rm -rf conftest*
5042   eval "ac_cv_lib_$ac_lib_var=no"
5043 fi
5044 rm -f conftest*
5045 LIBS="$ac_save_LIBS"
5046
5047 fi
5048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5049   echo "$ac_t""yes" 1>&6
5050     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5051     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5052   cat >> confdefs.h <<EOF
5053 #define $ac_tr_lib 1
5054 EOF
5055
5056   LIBS="-lgen $LIBS"
5057
5058 else
5059   echo "$ac_t""no" 1>&6
5060 fi
5061
5062
5063 fi
5064
5065
5066 echo $ac_n "checking for select""... $ac_c" 1>&6
5067 echo "configure:5068: checking for select" >&5
5068 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071   cat > conftest.$ac_ext <<EOF
5072 #line 5073 "configure"
5073 #include "confdefs.h"
5074 /* System header to define __stub macros and hopefully few prototypes,
5075     which can conflict with char select(); below.  */
5076 #include <assert.h>
5077 /* Override any gcc2 internal prototype to avoid an error.  */
5078 /* We use char because int might match the return type of a gcc2
5079     builtin and then its argument prototype would still apply.  */
5080 char select();
5081
5082 int main() {
5083
5084 /* The GNU C library defines this for functions which it implements
5085     to always fail with ENOSYS.  Some functions are actually named
5086     something starting with __ and the normal name is an alias.  */
5087 #if defined (__stub_select) || defined (__stub___select)
5088 choke me
5089 #else
5090 select();
5091 #endif
5092
5093 ; return 0; }
5094 EOF
5095 if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5096   rm -rf conftest*
5097   eval "ac_cv_func_select=yes"
5098 else
5099   echo "configure: failed program was:" >&5
5100   cat conftest.$ac_ext >&5
5101   rm -rf conftest*
5102   eval "ac_cv_func_select=no"
5103 fi
5104 rm -f conftest*
5105 fi
5106
5107 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5108   echo "$ac_t""yes" 1>&6
5109   :
5110 else
5111   echo "$ac_t""no" 1>&6
5112 { echo "configure: error: select() required." 1>&2; exit 1; }
5113 fi
5114
5115
5116 if test "${ac_cv_header_winsock_h}" != yes; then
5117                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
5118 echo "configure:5119: checking types of arguments for select()" >&5
5119  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
5120   echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
5126   echo $ac_n "(cached) $ac_c" 1>&6
5127 else
5128      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
5129      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
5130       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
5131        cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5134 #ifdef HAVE_SYS_TYPES_H
5135 #include <sys/types.h>
5136 #endif
5137 #ifdef HAVE_SYS_TIME_H
5138 #include <sys/time.h>
5139 #endif
5140 #ifdef HAVE_SYS_SELECT_H
5141 #include <sys/select.h>
5142 #endif
5143 #ifdef HAVE_SYS_SOCKET_H
5144 #include <sys/socket.h>
5145 #endif
5146 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);
5147 int main() {
5148
5149 ; return 0; }
5150 EOF
5151 if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5152   rm -rf conftest*
5153           ac_not_found=no ; break 3
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   ac_not_found=yes
5159 fi
5160 rm -f conftest*
5161       done
5162      done
5163     done
5164    
5165 fi
5166   
5167 fi
5168  
5169 fi
5170  if test "$ac_not_found" = yes; then
5171   ac_cv_func_select_arg1=int 
5172   ac_cv_func_select_arg234='int *' 
5173   ac_cv_func_select_arg5='struct timeval *'
5174  fi
5175  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
5176  cat >> confdefs.h <<EOF
5177 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
5178 EOF
5179
5180  cat >> confdefs.h <<EOF
5181 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
5182 EOF
5183
5184  cat >> confdefs.h <<EOF
5185 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
5186 EOF
5187
5188
5189 fi
5190
5191
5192 for ac_hdr in regex.h 
5193 do
5194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5196 echo "configure:5197: checking for $ac_hdr" >&5
5197 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200   cat > conftest.$ac_ext <<EOF
5201 #line 5202 "configure"
5202 #include "confdefs.h"
5203 #include <$ac_hdr>
5204 EOF
5205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5206 { (eval echo configure:5207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5208 if test -z "$ac_err"; then
5209   rm -rf conftest*
5210   eval "ac_cv_header_$ac_safe=yes"
5211 else
5212   echo "$ac_err" >&5
5213   echo "configure: failed program was:" >&5
5214   cat conftest.$ac_ext >&5
5215   rm -rf conftest*
5216   eval "ac_cv_header_$ac_safe=no"
5217 fi
5218 rm -f conftest*
5219 fi
5220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5221   echo "$ac_t""yes" 1>&6
5222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5223   cat >> confdefs.h <<EOF
5224 #define $ac_tr_hdr 1
5225 EOF
5226  
5227 else
5228   echo "$ac_t""no" 1>&6
5229 fi
5230 done
5231
5232 if test "$ac_cv_header_regex_h" != yes ; then
5233         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
5234 fi
5235 echo $ac_n "checking for regfree""... $ac_c" 1>&6
5236 echo "configure:5237: checking for regfree" >&5
5237 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240   cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 /* System header to define __stub macros and hopefully few prototypes,
5244     which can conflict with char regfree(); below.  */
5245 #include <assert.h>
5246 /* Override any gcc2 internal prototype to avoid an error.  */
5247 /* We use char because int might match the return type of a gcc2
5248     builtin and then its argument prototype would still apply.  */
5249 char regfree();
5250
5251 int main() {
5252
5253 /* The GNU C library defines this for functions which it implements
5254     to always fail with ENOSYS.  Some functions are actually named
5255     something starting with __ and the normal name is an alias.  */
5256 #if defined (__stub_regfree) || defined (__stub___regfree)
5257 choke me
5258 #else
5259 regfree();
5260 #endif
5261
5262 ; return 0; }
5263 EOF
5264 if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5265   rm -rf conftest*
5266   eval "ac_cv_func_regfree=yes"
5267 else
5268   echo "configure: failed program was:" >&5
5269   cat conftest.$ac_ext >&5
5270   rm -rf conftest*
5271   eval "ac_cv_func_regfree=no"
5272 fi
5273 rm -f conftest*
5274 fi
5275
5276 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
5277   echo "$ac_t""yes" 1>&6
5278   :
5279 else
5280   echo "$ac_t""no" 1>&6
5281 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
5282 fi
5283
5284
5285
5286 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
5287 echo "configure:5288: checking for compatible POSIX regex" >&5
5288 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
5289   echo $ac_n "(cached) $ac_c" 1>&6
5290 else
5291   
5292         if test "$cross_compiling" = yes; then
5293   ol_cv_c_posix_regex=cross
5294 else
5295   cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298
5299 #include <sys/types.h>
5300 #include <regex.h>
5301 static char *pattern, *string;
5302 main()
5303 {
5304         int rc;
5305         regex_t re;
5306
5307         pattern = "^A";
5308
5309         if(regcomp(&re, pattern, 0)) {
5310                 return -1;
5311         }
5312         
5313         string = "ALL MATCH";
5314         
5315         rc = regexec(&re, string, 0, (void*)0, 0);
5316
5317         regfree(&re);
5318
5319         return rc;
5320 }
5321 EOF
5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5323 then
5324   ol_cv_c_posix_regex=yes
5325 else
5326   echo "configure: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328   rm -fr conftest*
5329   ol_cv_c_posix_regex=no
5330 fi
5331 rm -fr conftest*
5332 fi
5333
5334 fi
5335
5336 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5337
5338 if test "$ol_cv_c_posix_regex" = no ; then
5339         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5340 fi
5341
5342 ol_link_dnssrv=no
5343 echo $ac_n "checking for res_query""... $ac_c" 1>&6
5344 echo "configure:5345: checking for res_query" >&5
5345 if eval "test \"`echo '$''{'ac_cv_func_res_query'+set}'`\" = set"; then
5346   echo $ac_n "(cached) $ac_c" 1>&6
5347 else
5348   cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351 /* System header to define __stub macros and hopefully few prototypes,
5352     which can conflict with char res_query(); below.  */
5353 #include <assert.h>
5354 /* Override any gcc2 internal prototype to avoid an error.  */
5355 /* We use char because int might match the return type of a gcc2
5356     builtin and then its argument prototype would still apply.  */
5357 char res_query();
5358
5359 int main() {
5360
5361 /* The GNU C library defines this for functions which it implements
5362     to always fail with ENOSYS.  Some functions are actually named
5363     something starting with __ and the normal name is an alias.  */
5364 #if defined (__stub_res_query) || defined (__stub___res_query)
5365 choke me
5366 #else
5367 res_query();
5368 #endif
5369
5370 ; return 0; }
5371 EOF
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5373   rm -rf conftest*
5374   eval "ac_cv_func_res_query=yes"
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379   eval "ac_cv_func_res_query=no"
5380 fi
5381 rm -f conftest*
5382 fi
5383
5384 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
5385   echo "$ac_t""yes" 1>&6
5386   :
5387 else
5388   echo "$ac_t""no" 1>&6
5389 fi
5390
5391 if test $ac_cv_func_res_query = no ; then 
5392         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
5393 echo "configure:5394: checking for res_query in -lbind" >&5
5394 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-%__p_%'`
5395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5396   echo $ac_n "(cached) $ac_c" 1>&6
5397 else
5398   ac_save_LIBS="$LIBS"
5399 LIBS="-lbind  $LIBS"
5400 cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403 /* Override any gcc2 internal prototype to avoid an error.  */
5404 /* We use char because int might match the return type of a gcc2
5405     builtin and then its argument prototype would still apply.  */
5406 char res_query();
5407
5408 int main() {
5409 res_query()
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   eval "ac_cv_lib_$ac_lib_var=yes"
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_lib_$ac_lib_var=no"
5420 fi
5421 rm -f conftest*
5422 LIBS="$ac_save_LIBS"
5423
5424 fi
5425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5426   echo "$ac_t""yes" 1>&6
5427     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5428     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5429   cat >> confdefs.h <<EOF
5430 #define $ac_tr_lib 1
5431 EOF
5432
5433   LIBS="-lbind $LIBS"
5434
5435 else
5436   echo "$ac_t""no" 1>&6
5437 fi
5438
5439         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
5440 fi
5441
5442 if test $ac_cv_func_res_query = no ; then 
5443         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
5444 echo "configure:5445: checking for __res_query in -lbind" >&5
5445 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-%__p_%'`
5446 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5447   echo $ac_n "(cached) $ac_c" 1>&6
5448 else
5449   ac_save_LIBS="$LIBS"
5450 LIBS="-lbind  $LIBS"
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454 /* Override any gcc2 internal prototype to avoid an error.  */
5455 /* We use char because int might match the return type of a gcc2
5456     builtin and then its argument prototype would still apply.  */
5457 char __res_query();
5458
5459 int main() {
5460 __res_query()
5461 ; return 0; }
5462 EOF
5463 if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5464   rm -rf conftest*
5465   eval "ac_cv_lib_$ac_lib_var=yes"
5466 else
5467   echo "configure: failed program was:" >&5
5468   cat conftest.$ac_ext >&5
5469   rm -rf conftest*
5470   eval "ac_cv_lib_$ac_lib_var=no"
5471 fi
5472 rm -f conftest*
5473 LIBS="$ac_save_LIBS"
5474
5475 fi
5476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5479     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5480   cat >> confdefs.h <<EOF
5481 #define $ac_tr_lib 1
5482 EOF
5483
5484   LIBS="-lbind $LIBS"
5485
5486 else
5487   echo "$ac_t""no" 1>&6
5488 fi
5489
5490         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
5491 fi
5492
5493 if test $ac_cv_func_res_query = no ; then 
5494         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
5495 echo "configure:5496: checking for res_query in -lresolv" >&5
5496 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-%__p_%'`
5497 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   ac_save_LIBS="$LIBS"
5501 LIBS="-lresolv  $LIBS"
5502 cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 /* Override any gcc2 internal prototype to avoid an error.  */
5506 /* We use char because int might match the return type of a gcc2
5507     builtin and then its argument prototype would still apply.  */
5508 char res_query();
5509
5510 int main() {
5511 res_query()
5512 ; return 0; }
5513 EOF
5514 if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5515   rm -rf conftest*
5516   eval "ac_cv_lib_$ac_lib_var=yes"
5517 else
5518   echo "configure: failed program was:" >&5
5519   cat conftest.$ac_ext >&5
5520   rm -rf conftest*
5521   eval "ac_cv_lib_$ac_lib_var=no"
5522 fi
5523 rm -f conftest*
5524 LIBS="$ac_save_LIBS"
5525
5526 fi
5527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5528   echo "$ac_t""yes" 1>&6
5529     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5530     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5531   cat >> confdefs.h <<EOF
5532 #define $ac_tr_lib 1
5533 EOF
5534
5535   LIBS="-lresolv $LIBS"
5536
5537 else
5538   echo "$ac_t""no" 1>&6
5539 fi
5540
5541         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
5542 fi
5543
5544 if test "$ac_cv_func_res_query" = yes ; then
5545         cat >> confdefs.h <<\EOF
5546 #define HAVE_RES_QUERY 1
5547 EOF
5548
5549
5550         if test $ol_enable_dnssrv != no ; then
5551                 ol_link_dnssrv=yes
5552         fi
5553 fi
5554
5555 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
5556         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
5557 fi
5558
5559 if test $ol_enable_quipu != no ; then
5560         for ac_hdr in quipu/commonarg.h
5561 do
5562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5564 echo "configure:5565: checking for $ac_hdr" >&5
5565 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5566   echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568   cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571 #include <$ac_hdr>
5572 EOF
5573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5574 { (eval echo configure:5575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5576 if test -z "$ac_err"; then
5577   rm -rf conftest*
5578   eval "ac_cv_header_$ac_safe=yes"
5579 else
5580   echo "$ac_err" >&5
5581   echo "configure: failed program was:" >&5
5582   cat conftest.$ac_ext >&5
5583   rm -rf conftest*
5584   eval "ac_cv_header_$ac_safe=no"
5585 fi
5586 rm -f conftest*
5587 fi
5588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5589   echo "$ac_t""yes" 1>&6
5590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5591   cat >> confdefs.h <<EOF
5592 #define $ac_tr_hdr 1
5593 EOF
5594  
5595 else
5596   echo "$ac_t""no" 1>&6
5597 fi
5598 done
5599
5600
5601         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5602                 BUILD_QUIPU=yes
5603         elif test $ol_enable_quipu = auto ; then
5604                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5605         else
5606                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5607         fi
5608 fi
5609
5610 ol_link_kbind=no
5611 ol_link_kpasswd=no
5612 ol_link_krb5=no
5613 ol_link_krb4=no
5614
5615 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 \
5616         -o $ol_with_kerberos = k5only -o $ol_with_kerberos = k425 ; then
5617
5618         for ac_hdr in krb5.h
5619 do
5620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5622 echo "configure:5623: checking for $ac_hdr" >&5
5623 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5624   echo $ac_n "(cached) $ac_c" 1>&6
5625 else
5626   cat > conftest.$ac_ext <<EOF
5627 #line 5628 "configure"
5628 #include "confdefs.h"
5629 #include <$ac_hdr>
5630 EOF
5631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5632 { (eval echo configure:5633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5634 if test -z "$ac_err"; then
5635   rm -rf conftest*
5636   eval "ac_cv_header_$ac_safe=yes"
5637 else
5638   echo "$ac_err" >&5
5639   echo "configure: failed program was:" >&5
5640   cat conftest.$ac_ext >&5
5641   rm -rf conftest*
5642   eval "ac_cv_header_$ac_safe=no"
5643 fi
5644 rm -f conftest*
5645 fi
5646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5647   echo "$ac_t""yes" 1>&6
5648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5649   cat >> confdefs.h <<EOF
5650 #define $ac_tr_hdr 1
5651 EOF
5652  
5653 else
5654   echo "$ac_t""no" 1>&6
5655 fi
5656 done
5657
5658
5659         if test $ac_cv_header_krb5_h = yes ; then
5660                                 for ac_hdr in heim_err.h
5661 do
5662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5664 echo "configure:5665: checking for $ac_hdr" >&5
5665 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5666   echo $ac_n "(cached) $ac_c" 1>&6
5667 else
5668   cat > conftest.$ac_ext <<EOF
5669 #line 5670 "configure"
5670 #include "confdefs.h"
5671 #include <$ac_hdr>
5672 EOF
5673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5674 { (eval echo configure:5675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5676 if test -z "$ac_err"; then
5677   rm -rf conftest*
5678   eval "ac_cv_header_$ac_safe=yes"
5679 else
5680   echo "$ac_err" >&5
5681   echo "configure: failed program was:" >&5
5682   cat conftest.$ac_ext >&5
5683   rm -rf conftest*
5684   eval "ac_cv_header_$ac_safe=no"
5685 fi
5686 rm -f conftest*
5687 fi
5688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5689   echo "$ac_t""yes" 1>&6
5690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5691   cat >> confdefs.h <<EOF
5692 #define $ac_tr_hdr 1
5693 EOF
5694  
5695 else
5696   echo "$ac_t""no" 1>&6
5697 fi
5698 done
5699
5700                 if test $ac_cv_header_heim_err_h = yes ; then
5701                         krb5_impl=heimdal
5702                 else
5703                         krb5_impl=mit
5704                 fi
5705
5706                 if test $krb5_impl = mit; then
5707                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5708 echo "configure:5709: checking for main in -lkrb5" >&5
5709 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
5710 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5711   echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713   ac_save_LIBS="$LIBS"
5714 LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
5715 cat > conftest.$ac_ext <<EOF
5716 #line 5717 "configure"
5717 #include "confdefs.h"
5718
5719 int main() {
5720 main()
5721 ; return 0; }
5722 EOF
5723 if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5724   rm -rf conftest*
5725   eval "ac_cv_lib_$ac_lib_var=yes"
5726 else
5727   echo "configure: failed program was:" >&5
5728   cat conftest.$ac_ext >&5
5729   rm -rf conftest*
5730   eval "ac_cv_lib_$ac_lib_var=no"
5731 fi
5732 rm -f conftest*
5733 LIBS="$ac_save_LIBS"
5734
5735 fi
5736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5737   echo "$ac_t""yes" 1>&6
5738   have_krb5=yes
5739                                 KRB5_LIBS="-lkrb5 -lcrypto -lcom_err"
5740 else
5741   echo "$ac_t""no" 1>&6
5742 have_krb5=no
5743 fi
5744
5745
5746                 elif test $krb5_impl = heimdal; then
5747                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
5748 echo "configure:5749: checking for main in -lkrb5" >&5
5749 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
5750 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5751   echo $ac_n "(cached) $ac_c" 1>&6
5752 else
5753   ac_save_LIBS="$LIBS"
5754 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5755 cat > conftest.$ac_ext <<EOF
5756 #line 5757 "configure"
5757 #include "confdefs.h"
5758
5759 int main() {
5760 main()
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_lib_$ac_lib_var=no"
5771 fi
5772 rm -f conftest*
5773 LIBS="$ac_save_LIBS"
5774
5775 fi
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5777   echo "$ac_t""yes" 1>&6
5778   have_krb5=yes
5779                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
5780 else
5781   echo "$ac_t""no" 1>&6
5782 have_krb5=no
5783 fi
5784
5785
5786                         cat >> confdefs.h <<\EOF
5787 #define HAVE_HEIMDAL_KERBEROS 1
5788 EOF
5789
5790                 else
5791                         have_krb5=no
5792                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5793                 fi
5794
5795                 if test $have_krb5 = yes ; then
5796                         ol_link_krb5=yes
5797
5798                         cat >> confdefs.h <<\EOF
5799 #define HAVE_KRB5 1
5800 EOF
5801
5802
5803                         if test $ol_enable_kpasswd != no ; then
5804                                 ol_link_kpasswd=yes;
5805                         fi
5806
5807                         if test $ol_with_kerberos = k5only ; then
5808                                 ol_with_kerberos=found
5809                         fi
5810
5811                 elif test $ol_with_kerberos != auto ; then
5812                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
5813                 fi
5814
5815         fi
5816 fi
5817
5818 if test $ol_link_krb5 = yes -a \
5819         \( $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
5820
5821         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5822 do
5823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5825 echo "configure:5826: checking for $ac_hdr" >&5
5826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832 #include <$ac_hdr>
5833 EOF
5834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5835 { (eval echo configure:5836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5837 if test -z "$ac_err"; then
5838   rm -rf conftest*
5839   eval "ac_cv_header_$ac_safe=yes"
5840 else
5841   echo "$ac_err" >&5
5842   echo "configure: failed program was:" >&5
5843   cat conftest.$ac_ext >&5
5844   rm -rf conftest*
5845   eval "ac_cv_header_$ac_safe=no"
5846 fi
5847 rm -f conftest*
5848 fi
5849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5850   echo "$ac_t""yes" 1>&6
5851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5852   cat >> confdefs.h <<EOF
5853 #define $ac_tr_hdr 1
5854 EOF
5855  
5856 else
5857   echo "$ac_t""no" 1>&6
5858 fi
5859 done
5860
5861
5862         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5863                 if test $krb5_impl = mit; then
5864                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5865 echo "configure:5866: checking for main in -lkrb4" >&5
5866 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
5867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5868   echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870   ac_save_LIBS="$LIBS"
5871 LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
5872 cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875
5876 int main() {
5877 main()
5878 ; return 0; }
5879 EOF
5880 if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5881   rm -rf conftest*
5882   eval "ac_cv_lib_$ac_lib_var=yes"
5883 else
5884   echo "configure: failed program was:" >&5
5885   cat conftest.$ac_ext >&5
5886   rm -rf conftest*
5887   eval "ac_cv_lib_$ac_lib_var=no"
5888 fi
5889 rm -f conftest*
5890 LIBS="$ac_save_LIBS"
5891
5892 fi
5893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5894   echo "$ac_t""yes" 1>&6
5895   have_k425=yes
5896                                 KRB4_LIBS="-lkrb4 -ldes425"
5897 else
5898   echo "$ac_t""no" 1>&6
5899 have_k425=no
5900 fi
5901
5902
5903                 elif test $krb5_impl = heimdal; then
5904                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5905 echo "configure:5906: checking for main in -lkrb4" >&5
5906 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
5907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5908   echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910   ac_save_LIBS="$LIBS"
5911 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
5912 cat > conftest.$ac_ext <<EOF
5913 #line 5914 "configure"
5914 #include "confdefs.h"
5915
5916 int main() {
5917 main()
5918 ; return 0; }
5919 EOF
5920 if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5921   rm -rf conftest*
5922   eval "ac_cv_lib_$ac_lib_var=yes"
5923 else
5924   echo "configure: failed program was:" >&5
5925   cat conftest.$ac_ext >&5
5926   rm -rf conftest*
5927   eval "ac_cv_lib_$ac_lib_var=no"
5928 fi
5929 rm -f conftest*
5930 LIBS="$ac_save_LIBS"
5931
5932 fi
5933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5934   echo "$ac_t""yes" 1>&6
5935   have_k425=yes
5936                                 KRB4_LIBS="-lkrb4"
5937 else
5938   echo "$ac_t""no" 1>&6
5939 have_k425=no
5940 fi
5941
5942
5943                 else
5944                         have_425=no
5945                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
5946                 fi
5947
5948                 if test $have_k425 = yes ; then
5949                         ol_with_kerberos=found
5950                         ol_link_krb4=yes
5951
5952                         cat >> confdefs.h <<\EOF
5953 #define HAVE_KRB425 1
5954 EOF
5955
5956                         cat >> confdefs.h <<\EOF
5957 #define HAVE_KRB4 1
5958 EOF
5959
5960
5961                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5962 echo "configure:5963: checking for des_debug in Kerberos libraries" >&5
5963 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
5964   echo $ac_n "(cached) $ac_c" 1>&6
5965 else
5966   
5967                                                                 save_LIBS="$LIBS"
5968                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
5969                                 cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972
5973 #include <kerberosIV/krb.h>
5974 #include <kerberosIV/des.h>
5975 extern int des_debug;
5976
5977 int main() {
5978
5979 des_debug = 1;
5980
5981 ; return 0; }
5982 EOF
5983 if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5984   rm -rf conftest*
5985   ol_cv_var_des_debug=yes
5986 else
5987   echo "configure: failed program was:" >&5
5988   cat conftest.$ac_ext >&5
5989   rm -rf conftest*
5990   ol_cv_var_des_debug=no
5991 fi
5992 rm -f conftest*
5993                                                                 LIBS="$save_LIBS"
5994                         
5995 fi
5996
5997 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5998
5999                         if test $ol_cv_var_des_debug = yes ; then
6000                                 cat >> confdefs.h <<\EOF
6001 #define HAVE_DES_DEBUG 1
6002 EOF
6003
6004                         fi
6005
6006                         LIBS="$save_LIBS"
6007                 fi
6008         fi
6009 fi
6010
6011 if test $ol_link_krb5 = yes ; then
6012         ol_with_kerberos=found
6013 fi
6014
6015 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 \
6016         -o $ol_with_kerberos = kth ; then
6017
6018         for ac_hdr in krb.h des.h krb-archaeology.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 \"`echo '$''{'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
6059         if test $ac_cv_header_krb_h = yes ; then
6060                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
6061 echo "configure:6062: checking for main in -lkrb" >&5
6062 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
6063 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6064   echo $ac_n "(cached) $ac_c" 1>&6
6065 else
6066   ac_save_LIBS="$LIBS"
6067 LIBS="-lkrb -ldes $LIBS"
6068 cat > conftest.$ac_ext <<EOF
6069 #line 6070 "configure"
6070 #include "confdefs.h"
6071
6072 int main() {
6073 main()
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_lib_$ac_lib_var=no"
6084 fi
6085 rm -f conftest*
6086 LIBS="$ac_save_LIBS"
6087
6088 fi
6089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6090   echo "$ac_t""yes" 1>&6
6091   have_k4=yes
6092 else
6093   echo "$ac_t""no" 1>&6
6094 have_k4=no
6095 fi
6096
6097
6098                 if test $have_k4 = yes ; then
6099                         ol_with_kerberos=found
6100                         ol_link_krb4=yes
6101
6102                         cat >> confdefs.h <<\EOF
6103 #define HAVE_KRB4 1
6104 EOF
6105
6106
6107                         KRB4_LIBS="-lkrb -ldes"
6108
6109                         if test $ac_cv_header_krb_archaeology_h = yes ; then
6110                                 cat >> confdefs.h <<\EOF
6111 #define HAVE_KTH_KERBEROS 1
6112 EOF
6113
6114                         fi
6115                 fi
6116         fi
6117 fi
6118
6119 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
6120         ol_link_kpasswd=yes;
6121 fi
6122
6123 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
6124         cat >> confdefs.h <<\EOF
6125 #define HAVE_KERBEROS 1
6126 EOF
6127
6128
6129 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
6130         { echo "configure: error: Kerberos detection failed." 1>&2; exit 1; }
6131 fi
6132
6133 ol_link_tls=no
6134 if test $ol_with_tls != no ; then
6135         
6136         for ac_hdr in openssl/ssl.h ssl.h
6137 do
6138 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6139 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6140 echo "configure:6141: checking for $ac_hdr" >&5
6141 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6142   echo $ac_n "(cached) $ac_c" 1>&6
6143 else
6144   cat > conftest.$ac_ext <<EOF
6145 #line 6146 "configure"
6146 #include "confdefs.h"
6147 #include <$ac_hdr>
6148 EOF
6149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6150 { (eval echo configure:6151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6152 if test -z "$ac_err"; then
6153   rm -rf conftest*
6154   eval "ac_cv_header_$ac_safe=yes"
6155 else
6156   echo "$ac_err" >&5
6157   echo "configure: failed program was:" >&5
6158   cat conftest.$ac_ext >&5
6159   rm -rf conftest*
6160   eval "ac_cv_header_$ac_safe=no"
6161 fi
6162 rm -f conftest*
6163 fi
6164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6165   echo "$ac_t""yes" 1>&6
6166     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6167   cat >> confdefs.h <<EOF
6168 #define $ac_tr_hdr 1
6169 EOF
6170  
6171 else
6172   echo "$ac_t""no" 1>&6
6173 fi
6174 done
6175
6176         
6177         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
6178                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
6179 echo "configure:6180: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
6180 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
6181 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6182   echo $ac_n "(cached) $ac_c" 1>&6
6183 else
6184   ac_save_LIBS="$LIBS"
6185 LIBS="-lssl -lcrypto $LIBS"
6186 cat > conftest.$ac_ext <<EOF
6187 #line 6188 "configure"
6188 #include "confdefs.h"
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 /* We use char because int might match the return type of a gcc2
6191     builtin and then its argument prototype would still apply.  */
6192 char SSLeay_add_ssl_algorithms();
6193
6194 int main() {
6195 SSLeay_add_ssl_algorithms()
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=yes"
6201 else
6202   echo "configure: failed program was:" >&5
6203   cat conftest.$ac_ext >&5
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=no"
6206 fi
6207 rm -f conftest*
6208 LIBS="$ac_save_LIBS"
6209
6210 fi
6211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6212   echo "$ac_t""yes" 1>&6
6213   have_ssleay=yes
6214                         need_rsaref=no
6215 else
6216   echo "$ac_t""no" 1>&6
6217 have_ssleay=no
6218 fi
6219
6220                         
6221                 if test $have_ssleay = no ; then
6222                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
6223 echo "configure:6224: checking for SSL_library_init in -lssl" >&5
6224 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
6225 if eval "test \"`echo '$''{'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="-lssl -lcrypto $LIBS"
6230 cat > conftest.$ac_ext <<EOF
6231 #line 6232 "configure"
6232 #include "confdefs.h"
6233 /* Override any gcc2 internal prototype to avoid an error.  */
6234 /* We use char because int might match the return type of a gcc2
6235     builtin and then its argument prototype would still apply.  */
6236 char SSL_library_init();
6237
6238 int main() {
6239 SSL_library_init()
6240 ; return 0; }
6241 EOF
6242 if { (eval echo configure:6243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6243   rm -rf conftest*
6244   eval "ac_cv_lib_$ac_lib_var=yes"
6245 else
6246   echo "configure: failed program was:" >&5
6247   cat conftest.$ac_ext >&5
6248   rm -rf conftest*
6249   eval "ac_cv_lib_$ac_lib_var=no"
6250 fi
6251 rm -f conftest*
6252 LIBS="$ac_save_LIBS"
6253
6254 fi
6255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6256   echo "$ac_t""yes" 1>&6
6257   have_ssleay=yes
6258                                 need_rsaref=no
6259 else
6260   echo "$ac_t""no" 1>&6
6261 have_ssleay=no
6262 fi
6263
6264                 fi
6265
6266                 if test $have_ssleay = no ; then
6267                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
6268 echo "configure:6269: checking for ssl3_accept in -lssl" >&5
6269 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
6270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6271   echo $ac_n "(cached) $ac_c" 1>&6
6272 else
6273   ac_save_LIBS="$LIBS"
6274 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
6275 cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278 /* Override any gcc2 internal prototype to avoid an error.  */
6279 /* We use char because int might match the return type of a gcc2
6280     builtin and then its argument prototype would still apply.  */
6281 char ssl3_accept();
6282
6283 int main() {
6284 ssl3_accept()
6285 ; return 0; }
6286 EOF
6287 if { (eval echo configure:6288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6288   rm -rf conftest*
6289   eval "ac_cv_lib_$ac_lib_var=yes"
6290 else
6291   echo "configure: failed program was:" >&5
6292   cat conftest.$ac_ext >&5
6293   rm -rf conftest*
6294   eval "ac_cv_lib_$ac_lib_var=no"
6295 fi
6296 rm -f conftest*
6297 LIBS="$ac_save_LIBS"
6298
6299 fi
6300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6301   echo "$ac_t""yes" 1>&6
6302   have_ssleay=yes
6303                                 need_rsaref=yes
6304 else
6305   echo "$ac_t""no" 1>&6
6306 have_ssleay=no
6307 fi
6308
6309                 fi
6310
6311                 if test $have_ssleay = yes ; then
6312                         ol_with_tls=found
6313                         ol_link_tls=yes
6314
6315                         cat >> confdefs.h <<\EOF
6316 #define HAVE_SSLEAY 1
6317 EOF
6318
6319
6320                         if test $need_rsaref = yes; then
6321                                 cat >> confdefs.h <<\EOF
6322 #define HAVE_RSAREF 1
6323 EOF
6324
6325
6326                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6327                         else
6328                                 TLS_LIBS="-lssl -lcrypto"
6329                         fi
6330                 fi
6331         fi
6332 fi
6333
6334 if test $ol_link_tls = yes ; then
6335         cat >> confdefs.h <<\EOF
6336 #define HAVE_TLS 1
6337 EOF
6338
6339 fi      
6340
6341 for ac_func in \
6342         ctime_r                 \
6343         gethostbyname_r gethostbyaddr_r \
6344
6345 do
6346 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6347 echo "configure:6348: checking for $ac_func" >&5
6348 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6349   echo $ac_n "(cached) $ac_c" 1>&6
6350 else
6351   cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354 /* System header to define __stub macros and hopefully few prototypes,
6355     which can conflict with char $ac_func(); below.  */
6356 #include <assert.h>
6357 /* Override any gcc2 internal prototype to avoid an error.  */
6358 /* We use char because int might match the return type of a gcc2
6359     builtin and then its argument prototype would still apply.  */
6360 char $ac_func();
6361
6362 int main() {
6363
6364 /* The GNU C library defines this for functions which it implements
6365     to always fail with ENOSYS.  Some functions are actually named
6366     something starting with __ and the normal name is an alias.  */
6367 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6368 choke me
6369 #else
6370 $ac_func();
6371 #endif
6372
6373 ; return 0; }
6374 EOF
6375 if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6376   rm -rf conftest*
6377   eval "ac_cv_func_$ac_func=yes"
6378 else
6379   echo "configure: failed program was:" >&5
6380   cat conftest.$ac_ext >&5
6381   rm -rf conftest*
6382   eval "ac_cv_func_$ac_func=no"
6383 fi
6384 rm -f conftest*
6385 fi
6386
6387 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6388   echo "$ac_t""yes" 1>&6
6389     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6390   cat >> confdefs.h <<EOF
6391 #define $ac_tr_func 1
6392 EOF
6393  
6394 else
6395   echo "$ac_t""no" 1>&6
6396 fi
6397 done
6398
6399
6400 if test "$ac_cv_func_ctime_r" = no ; then
6401         ol_cv_func_ctime_r_nargs=0
6402 else
6403         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6404 echo "configure:6405: checking number of arguments of ctime_r" >&5
6405 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
6406   echo $ac_n "(cached) $ac_c" 1>&6
6407 else
6408   cat > conftest.$ac_ext <<EOF
6409 #line 6410 "configure"
6410 #include "confdefs.h"
6411 #include <time.h>
6412 int main() {
6413 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6414 ; return 0; }
6415 EOF
6416 if { (eval echo configure:6417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6417   rm -rf conftest*
6418   ol_cv_func_ctime_r_nargs3=yes
6419 else
6420   echo "configure: failed program was:" >&5
6421   cat conftest.$ac_ext >&5
6422   rm -rf conftest*
6423   ol_cv_func_ctime_r_nargs3=no
6424 fi
6425 rm -f conftest*
6426
6427         cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 #include <time.h>
6431 int main() {
6432 time_t ti; char *buffer; ctime_r(&ti,buffer);
6433 ; return 0; }
6434 EOF
6435 if { (eval echo configure:6436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6436   rm -rf conftest*
6437   ol_cv_func_ctime_r_nargs2=yes
6438 else
6439   echo "configure: failed program was:" >&5
6440   cat conftest.$ac_ext >&5
6441   rm -rf conftest*
6442   ol_cv_func_ctime_r_nargs2=no
6443 fi
6444 rm -f conftest*
6445
6446         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
6447                 $ol_cv_func_ctime_r_nargs2 = no ; then
6448
6449                 ol_cv_func_ctime_r_nargs=3
6450
6451         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
6452                 $ol_cv_func_ctime_r_nargs2 = yes ; then
6453
6454                 ol_cv_func_ctime_r_nargs=2
6455
6456         else
6457                 ol_cv_func_ctime_r_nargs=0
6458         fi
6459   
6460 fi
6461
6462 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6463
6464   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6465         cat >> confdefs.h <<EOF
6466 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6467 EOF
6468
6469   fi
6470
6471 fi
6472
6473 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6474         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6475 echo "configure:6476: checking number of arguments of gethostbyname_r" >&5
6476 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
6477   echo $ac_n "(cached) $ac_c" 1>&6
6478 else
6479   cat > conftest.$ac_ext <<EOF
6480 #line 6481 "configure"
6481 #include "confdefs.h"
6482 #include <sys/types.h>
6483 #include <sys/socket.h>
6484 #include <netinet/in.h>
6485 #include <netdb.h>
6486 #define BUFSIZE (sizeof(struct hostent)+10)
6487 int main() {
6488 struct hostent hent; char buffer[BUFSIZE];
6489                 int bufsize=BUFSIZE;int h_errno;
6490                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6491                         buffer, bufsize, &h_errno);
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6495   rm -rf conftest*
6496   ol_cv_func_gethostbyname_r_nargs5=yes
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   ol_cv_func_gethostbyname_r_nargs5=no
6502 fi
6503 rm -f conftest*
6504
6505         cat > conftest.$ac_ext <<EOF
6506 #line 6507 "configure"
6507 #include "confdefs.h"
6508 #include <sys/types.h>
6509 #include <sys/socket.h>
6510 #include <netinet/in.h>
6511 #include <netdb.h>
6512 #define BUFSIZE (sizeof(struct hostent)+10)
6513 int main() {
6514 struct hostent hent;struct hostent *rhent;
6515                 char buffer[BUFSIZE];
6516                 int bufsize=BUFSIZE;int h_errno;
6517                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6518                         &rhent, &h_errno);
6519 ; return 0; }
6520 EOF
6521 if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6522   rm -rf conftest*
6523   ol_cv_func_gethostbyname_r_nargs6=yes
6524 else
6525   echo "configure: failed program was:" >&5
6526   cat conftest.$ac_ext >&5
6527   rm -rf conftest*
6528   ol_cv_func_gethostbyname_r_nargs6=no
6529 fi
6530 rm -f conftest*
6531
6532         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
6533                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
6534
6535                 ol_cv_func_gethostbyname_r_nargs=5
6536
6537         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
6538                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
6539
6540                 ol_cv_func_gethostbyname_r_nargs=6
6541
6542         else
6543                 ol_cv_func_gethostbyname_r_nargs=0
6544         fi
6545   
6546 fi
6547
6548 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6549   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6550         cat >> confdefs.h <<EOF
6551 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6552 EOF
6553
6554   fi
6555
6556 else
6557         ol_cv_func_gethostbyname_r_nargs=0
6558 fi
6559  
6560 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6561         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6562 echo "configure:6563: checking number of arguments of gethostbyaddr_r" >&5
6563 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
6564   echo $ac_n "(cached) $ac_c" 1>&6
6565 else
6566   cat > conftest.$ac_ext <<EOF
6567 #line 6568 "configure"
6568 #include "confdefs.h"
6569 #include <sys/types.h>
6570 #include <sys/socket.h>
6571 #include <netinet/in.h>
6572 #include <netdb.h>
6573 #define BUFSIZE (sizeof(struct hostent)+10)
6574 int main() {
6575 struct hostent hent; char buffer[BUFSIZE]; 
6576             struct in_addr add;
6577             size_t alen=sizeof(struct in_addr);
6578             int bufsize=BUFSIZE;int h_errno;
6579                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6580                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6584   rm -rf conftest*
6585   ol_cv_func_gethostbyaddr_r_nargs7=yes
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -rf conftest*
6590   ol_cv_func_gethostbyaddr_r_nargs7=no
6591 fi
6592 rm -f conftest*
6593
6594         cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 #include <sys/types.h>
6598 #include <sys/socket.h>
6599 #include <netinet/in.h>
6600 #include <netdb.h>
6601 #define BUFSIZE (sizeof(struct hostent)+10)
6602 int main() {
6603 struct hostent hent;
6604                 struct hostent *rhent; char buffer[BUFSIZE]; 
6605                 struct in_addr add;
6606                 size_t alen=sizeof(struct in_addr);
6607                 int bufsize=BUFSIZE;int h_errno;
6608                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6609                         alen, AF_INET, &hent, buffer, bufsize, 
6610                         &rhent, &h_errno);
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6614   rm -rf conftest*
6615   ol_cv_func_gethostbyaddr_r_nargs8=yes
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   ol_cv_func_gethostbyaddr_r_nargs8=no
6621 fi
6622 rm -f conftest*
6623
6624         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
6625                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
6626
6627                 ol_cv_func_gethostbyaddr_r_nargs=7
6628
6629         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
6630                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
6631
6632                 ol_cv_func_gethostbyaddr_r_nargs=8
6633
6634         else
6635                 ol_cv_func_gethostbyaddr_r_nargs=0
6636         fi
6637   
6638 fi
6639
6640 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6641   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6642     cat >> confdefs.h <<EOF
6643 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6644 EOF
6645
6646   fi
6647
6648 else
6649         ol_cv_func_gethostbyaddr_r_nargs=0
6650 fi
6651
6652 if test "$ac_cv_func_ctime_r" = yes \
6653         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6654         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6655         -a "$ac_cv_func_gethostbyname_r" = yes \
6656         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6657         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6658         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6659         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6660         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6661         ; then
6662  
6663         cat >> confdefs.h <<\EOF
6664 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6665 EOF
6666
6667 fi
6668
6669 ol_link_threads=no
6670
6671 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6672         -o $ol_with_threads = nt ; then
6673
6674         
6675         echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
6676 echo "configure:6677: checking for NT Threads" >&5
6677 if eval "test \"`echo '$''{'ol_cv_nt_threads'+set}'`\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   
6681                 echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
6682 echo "configure:6683: checking for _beginthread" >&5
6683 if eval "test \"`echo '$''{'ac_cv_func__beginthread'+set}'`\" = set"; then
6684   echo $ac_n "(cached) $ac_c" 1>&6
6685 else
6686   cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 /* System header to define __stub macros and hopefully few prototypes,
6690     which can conflict with char _beginthread(); below.  */
6691 #include <assert.h>
6692 /* Override any gcc2 internal prototype to avoid an error.  */
6693 /* We use char because int might match the return type of a gcc2
6694     builtin and then its argument prototype would still apply.  */
6695 char _beginthread();
6696
6697 int main() {
6698
6699 /* The GNU C library defines this for functions which it implements
6700     to always fail with ENOSYS.  Some functions are actually named
6701     something starting with __ and the normal name is an alias.  */
6702 #if defined (__stub__beginthread) || defined (__stub____beginthread)
6703 choke me
6704 #else
6705 _beginthread();
6706 #endif
6707
6708 ; return 0; }
6709 EOF
6710 if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6711   rm -rf conftest*
6712   eval "ac_cv_func__beginthread=yes"
6713 else
6714   echo "configure: failed program was:" >&5
6715   cat conftest.$ac_ext >&5
6716   rm -rf conftest*
6717   eval "ac_cv_func__beginthread=no"
6718 fi
6719 rm -f conftest*
6720 fi
6721
6722 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
6723   echo "$ac_t""yes" 1>&6
6724   ol_cv_nt_threads=yes
6725 else
6726   echo "$ac_t""no" 1>&6
6727 ol_cv_nt_threads=no
6728 fi
6729
6730         
6731 fi
6732
6733 echo "$ac_t""$ol_cv_nt_threads" 1>&6
6734
6735         if test $ol_cv_nt_threads = yes ; then
6736                 cat >> confdefs.h <<\EOF
6737 #define HAVE_NT_THREADS 1
6738 EOF
6739
6740         fi
6741
6742
6743         if test "$ol_cv_nt_threads" = yes ; then
6744         ol_link_threads=nt
6745         ol_with_threads=found
6746         ol_with_yielding_select=yes
6747
6748                 cat >> confdefs.h <<\EOF
6749 #define HAVE_NT_SERVICE_MANAGER 1
6750 EOF
6751
6752                 cat >> confdefs.h <<\EOF
6753 #define HAVE_NT_EVENT_LOG 1
6754 EOF
6755
6756         fi
6757
6758         if test $ol_with_threads = nt ; then
6759                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
6760         fi
6761 fi
6762
6763 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6764         -o $ol_with_threads = posix ; then
6765
6766         for ac_hdr in pthread.h
6767 do
6768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6770 echo "configure:6771: checking for $ac_hdr" >&5
6771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6772   echo $ac_n "(cached) $ac_c" 1>&6
6773 else
6774   cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 #include <$ac_hdr>
6778 EOF
6779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6780 { (eval echo configure:6781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6782 if test -z "$ac_err"; then
6783   rm -rf conftest*
6784   eval "ac_cv_header_$ac_safe=yes"
6785 else
6786   echo "$ac_err" >&5
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_header_$ac_safe=no"
6791 fi
6792 rm -f conftest*
6793 fi
6794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6795   echo "$ac_t""yes" 1>&6
6796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6797   cat >> confdefs.h <<EOF
6798 #define $ac_tr_hdr 1
6799 EOF
6800  
6801 else
6802   echo "$ac_t""no" 1>&6
6803 fi
6804 done
6805
6806
6807         if test $ac_cv_header_pthread_h = yes ; then
6808                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6809 echo "configure:6810: checking POSIX thread version" >&5
6810 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
6811   echo $ac_n "(cached) $ac_c" 1>&6
6812 else
6813   
6814         cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817
6818 #               include <pthread.h>
6819                 /* this check could be improved */
6820 #               ifdef PTHREAD_ONCE_INIT
6821                         pthread_version_final;
6822 #               endif
6823         
6824 EOF
6825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6826   egrep "pthread_version_final" >/dev/null 2>&1; then
6827   rm -rf conftest*
6828   ol_pthread_final=yes
6829 else
6830   rm -rf conftest*
6831   ol_pthread_final=no
6832 fi
6833 rm -f conftest*
6834
6835
6836         cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839
6840 #               include <pthread.h>
6841                 /* this check could be improved */
6842 #               ifdef pthread_once_init
6843                         pthread_version_draft4;
6844 #               endif
6845         
6846 EOF
6847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6848   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6849   rm -rf conftest*
6850   ol_pthread_draft4=yes
6851 else
6852   rm -rf conftest*
6853   ol_pthread_draft4=no
6854 fi
6855 rm -f conftest*
6856
6857
6858         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6859                 ol_cv_pthread_version=final
6860         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6861                 ol_cv_pthread_version=draft4
6862         else
6863                 ol_cv_pthread_version=unknown
6864         fi
6865
6866 fi
6867
6868 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6869
6870
6871                 if test $ol_cv_pthread_version = final ; then
6872                         cat >> confdefs.h <<\EOF
6873 #define HAVE_PTHREADS_FINAL 1
6874 EOF
6875
6876                 elif test $ol_cv_pthread_version = draft4 ; then
6877                         cat >> confdefs.h <<\EOF
6878 #define HAVE_PTHREADS_D4 1
6879 EOF
6880
6881                 else
6882                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6883                 fi
6884
6885                 # consider threads found
6886                 ol_with_threads=found
6887
6888                 
6889         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6890 echo "configure:6891: checking for LinuxThreads pthread.h" >&5
6891 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6892   echo $ac_n "(cached) $ac_c" 1>&6
6893 else
6894   cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 #include <pthread.h>
6898 EOF
6899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6900   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6901   rm -rf conftest*
6902   ol_cv_header_linux_threads=yes
6903 else
6904   rm -rf conftest*
6905   ol_cv_header_linux_threads=no
6906 fi
6907 rm -f conftest*
6908
6909                 
6910 fi
6911
6912 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6913         if test $ol_cv_header_linux_threads = yes; then
6914                 cat >> confdefs.h <<\EOF
6915 #define HAVE_LINUX_THREADS 1
6916 EOF
6917
6918         fi
6919
6920                 
6921         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6922 echo "configure:6923: checking for GNU Pth pthread.h" >&5
6923 if eval "test \"`echo '$''{'ol_cv_header_gnu_pth_pthread_h'+set}'`\" = set"; then
6924   echo $ac_n "(cached) $ac_c" 1>&6
6925 else
6926   cat > conftest.$ac_ext <<EOF
6927 #line 6928 "configure"
6928 #include "confdefs.h"
6929 #include <pthread.h>
6930 #ifdef _POSIX_THREAD_IS_GNU_PTH
6931         __gnu_pth__;
6932 #endif
6933
6934 EOF
6935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6936   egrep "__gnu_pth__" >/dev/null 2>&1; then
6937   rm -rf conftest*
6938   ol_cv_header_gnu_pth_pthread_h=yes
6939 else
6940   rm -rf conftest*
6941   ol_cv_header_gnu_pth_pthread_h=no
6942 fi
6943 rm -f conftest*
6944
6945                 
6946 fi
6947
6948 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6949
6950
6951                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6952                         for ac_hdr in sched.h
6953 do
6954 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6955 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6956 echo "configure:6957: checking for $ac_hdr" >&5
6957 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6958   echo $ac_n "(cached) $ac_c" 1>&6
6959 else
6960   cat > conftest.$ac_ext <<EOF
6961 #line 6962 "configure"
6962 #include "confdefs.h"
6963 #include <$ac_hdr>
6964 EOF
6965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6966 { (eval echo configure:6967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6968 if test -z "$ac_err"; then
6969   rm -rf conftest*
6970   eval "ac_cv_header_$ac_safe=yes"
6971 else
6972   echo "$ac_err" >&5
6973   echo "configure: failed program was:" >&5
6974   cat conftest.$ac_ext >&5
6975   rm -rf conftest*
6976   eval "ac_cv_header_$ac_safe=no"
6977 fi
6978 rm -f conftest*
6979 fi
6980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6981   echo "$ac_t""yes" 1>&6
6982     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6983   cat >> confdefs.h <<EOF
6984 #define $ac_tr_hdr 1
6985 EOF
6986  
6987 else
6988   echo "$ac_t""no" 1>&6
6989 fi
6990 done
6991
6992                 fi
6993
6994                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6995                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6996 echo "configure:6997: checking for pthread_create in default libraries" >&5
6997 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
6998   echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000   
7001                 if test "$cross_compiling" = yes; then
7002   cat > conftest.$ac_ext <<EOF
7003 #line 7004 "configure"
7004 #include "confdefs.h"
7005 /* pthread test headers */
7006 #include <pthread.h>
7007 #ifndef NULL
7008 #define NULL (void*)0
7009 #endif
7010
7011 static void *task(p)
7012         void *p;
7013 {
7014         return (void *) (p == NULL);
7015 }
7016
7017 int main() {
7018
7019         /* pthread test function */
7020         pthread_t t;
7021         int status;
7022 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7023         /* This system (e.g. AIX) defaults detached; must override */
7024         pthread_attr_t attr;
7025
7026         status = pthread_attr_init(&attr);
7027         if( status ) exit( status );
7028
7029         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7030         if( status ) exit( status );
7031
7032 #define ATTR    &attr
7033 #else
7034 #if HAVE_PTHREADS_D4
7035 #define ATTR    pthread_attr_default
7036 #else
7037 #define ATTR    NULL
7038 #endif
7039 #endif
7040         /* make sure pthread_create() isn't just a stub */
7041         status = pthread_create(&t, ATTR, task, NULL);
7042         if( status ) exit( status );
7043
7044         /* make sure pthread_detach() isn't just a stub */
7045 #if HAVE_PTHREADS_D4
7046         status = pthread_detach( &t );
7047 #else
7048         status = pthread_detach( t );
7049 #endif
7050
7051 #ifdef HAVE_LINUX_THREADS
7052         pthread_kill_other_threads_np();
7053 #endif
7054
7055         exit( status );
7056
7057 ; return 0; }
7058 EOF
7059 if { (eval echo configure:7060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7060   rm -rf conftest*
7061   ol_cv_pthread_create=yes
7062 else
7063   echo "configure: failed program was:" >&5
7064   cat conftest.$ac_ext >&5
7065   rm -rf conftest*
7066   ol_cv_pthread_create=no
7067 fi
7068 rm -f conftest*
7069 else
7070   cat > conftest.$ac_ext <<EOF
7071 #line 7072 "configure"
7072 #include "confdefs.h"
7073 /* pthread test headers */
7074 #include <pthread.h>
7075 #ifndef NULL
7076 #define NULL (void*)0
7077 #endif
7078
7079 static void *task(p)
7080         void *p;
7081 {
7082         return (void *) (p == NULL);
7083 }
7084
7085
7086 int main(argc, argv)
7087         int argc;
7088         char **argv;
7089 {
7090
7091         /* pthread test function */
7092         pthread_t t;
7093         int status;
7094 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7095         /* This system (e.g. AIX) defaults detached; must override */
7096         pthread_attr_t attr;
7097
7098         status = pthread_attr_init(&attr);
7099         if( status ) exit( status );
7100
7101         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7102         if( status ) exit( status );
7103
7104 #define ATTR    &attr
7105 #else
7106 #if HAVE_PTHREADS_D4
7107 #define ATTR    pthread_attr_default
7108 #else
7109 #define ATTR    NULL
7110 #endif
7111 #endif
7112         /* make sure pthread_create() isn't just a stub */
7113         status = pthread_create(&t, ATTR, task, NULL);
7114         if( status ) exit( status );
7115
7116         /* make sure pthread_detach() isn't just a stub */
7117 #if HAVE_PTHREADS_D4
7118         status = pthread_detach( &t );
7119 #else
7120         status = pthread_detach( t );
7121 #endif
7122
7123 #ifdef HAVE_LINUX_THREADS
7124         pthread_kill_other_threads_np();
7125 #endif
7126
7127         exit( status );
7128
7129 }
7130
7131 EOF
7132 if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7133 then
7134   ol_cv_pthread_create=yes
7135 else
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138   rm -fr conftest*
7139   ol_cv_pthread_create=no
7140 fi
7141 rm -fr conftest*
7142 fi
7143
7144 fi
7145
7146 echo "$ac_t""$ol_cv_pthread_create" 1>&6
7147
7148                 if test $ol_cv_pthread_create != no ; then
7149                         ol_link_threads=posix
7150                         ol_link_pthreads=""
7151                 fi
7152                 
7153                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
7154 if test "$ol_link_threads" = no ; then
7155         # try -kthread
7156         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
7157 echo "configure:7158: checking for pthread link with -kthread" >&5
7158 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
7159   echo $ac_n "(cached) $ac_c" 1>&6
7160 else
7161   
7162                 # save the flags
7163                 ol_LIBS="$LIBS"
7164                 LIBS="-kthread $LIBS"
7165
7166                 if test "$cross_compiling" = yes; then
7167   cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170 /* pthread test headers */
7171 #include <pthread.h>
7172 #ifndef NULL
7173 #define NULL (void*)0
7174 #endif
7175
7176 static void *task(p)
7177         void *p;
7178 {
7179         return (void *) (p == NULL);
7180 }
7181
7182 int main() {
7183
7184         /* pthread test function */
7185         pthread_t t;
7186         int status;
7187 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7188         /* This system (e.g. AIX) defaults detached; must override */
7189         pthread_attr_t attr;
7190
7191         status = pthread_attr_init(&attr);
7192         if( status ) exit( status );
7193
7194         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7195         if( status ) exit( status );
7196
7197 #define ATTR    &attr
7198 #else
7199 #if HAVE_PTHREADS_D4
7200 #define ATTR    pthread_attr_default
7201 #else
7202 #define ATTR    NULL
7203 #endif
7204 #endif
7205         /* make sure pthread_create() isn't just a stub */
7206         status = pthread_create(&t, ATTR, task, NULL);
7207         if( status ) exit( status );
7208
7209         /* make sure pthread_detach() isn't just a stub */
7210 #if HAVE_PTHREADS_D4
7211         status = pthread_detach( &t );
7212 #else
7213         status = pthread_detach( t );
7214 #endif
7215
7216 #ifdef HAVE_LINUX_THREADS
7217         pthread_kill_other_threads_np();
7218 #endif
7219
7220         exit( status );
7221
7222 ; return 0; }
7223 EOF
7224 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7225   rm -rf conftest*
7226   ol_cv_pthread_kthread=yes
7227 else
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -rf conftest*
7231   ol_cv_pthread_kthread=no
7232 fi
7233 rm -f conftest*
7234 else
7235   cat > conftest.$ac_ext <<EOF
7236 #line 7237 "configure"
7237 #include "confdefs.h"
7238 /* pthread test headers */
7239 #include <pthread.h>
7240 #ifndef NULL
7241 #define NULL (void*)0
7242 #endif
7243
7244 static void *task(p)
7245         void *p;
7246 {
7247         return (void *) (p == NULL);
7248 }
7249
7250
7251 int main(argc, argv)
7252         int argc;
7253         char **argv;
7254 {
7255
7256         /* pthread test function */
7257         pthread_t t;
7258         int status;
7259 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7260         /* This system (e.g. AIX) defaults detached; must override */
7261         pthread_attr_t attr;
7262
7263         status = pthread_attr_init(&attr);
7264         if( status ) exit( status );
7265
7266         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7267         if( status ) exit( status );
7268
7269 #define ATTR    &attr
7270 #else
7271 #if HAVE_PTHREADS_D4
7272 #define ATTR    pthread_attr_default
7273 #else
7274 #define ATTR    NULL
7275 #endif
7276 #endif
7277         /* make sure pthread_create() isn't just a stub */
7278         status = pthread_create(&t, ATTR, task, NULL);
7279         if( status ) exit( status );
7280
7281         /* make sure pthread_detach() isn't just a stub */
7282 #if HAVE_PTHREADS_D4
7283         status = pthread_detach( &t );
7284 #else
7285         status = pthread_detach( t );
7286 #endif
7287
7288 #ifdef HAVE_LINUX_THREADS
7289         pthread_kill_other_threads_np();
7290 #endif
7291
7292         exit( status );
7293
7294 }
7295
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7298 then
7299   ol_cv_pthread_kthread=yes
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -fr conftest*
7304   ol_cv_pthread_kthread=no
7305 fi
7306 rm -fr conftest*
7307 fi
7308
7309
7310                 # restore the LIBS
7311                 LIBS="$ol_LIBS"
7312         
7313 fi
7314
7315 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
7316
7317         if test $ol_cv_pthread_kthread = yes ; then
7318                 ol_link_pthreads="-kthread"
7319                 ol_link_threads=posix
7320         fi
7321 fi
7322
7323                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
7324 if test "$ol_link_threads" = no ; then
7325         # try -pthread
7326         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
7327 echo "configure:7328: checking for pthread link with -pthread" >&5
7328 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   
7332                 # save the flags
7333                 ol_LIBS="$LIBS"
7334                 LIBS="-pthread $LIBS"
7335
7336                 if test "$cross_compiling" = yes; then
7337   cat > conftest.$ac_ext <<EOF
7338 #line 7339 "configure"
7339 #include "confdefs.h"
7340 /* pthread test headers */
7341 #include <pthread.h>
7342 #ifndef NULL
7343 #define NULL (void*)0
7344 #endif
7345
7346 static void *task(p)
7347         void *p;
7348 {
7349         return (void *) (p == NULL);
7350 }
7351
7352 int main() {
7353
7354         /* pthread test function */
7355         pthread_t t;
7356         int status;
7357 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7358         /* This system (e.g. AIX) defaults detached; must override */
7359         pthread_attr_t attr;
7360
7361         status = pthread_attr_init(&attr);
7362         if( status ) exit( status );
7363
7364         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7365         if( status ) exit( status );
7366
7367 #define ATTR    &attr
7368 #else
7369 #if HAVE_PTHREADS_D4
7370 #define ATTR    pthread_attr_default
7371 #else
7372 #define ATTR    NULL
7373 #endif
7374 #endif
7375         /* make sure pthread_create() isn't just a stub */
7376         status = pthread_create(&t, ATTR, task, NULL);
7377         if( status ) exit( status );
7378
7379         /* make sure pthread_detach() isn't just a stub */
7380 #if HAVE_PTHREADS_D4
7381         status = pthread_detach( &t );
7382 #else
7383         status = pthread_detach( t );
7384 #endif
7385
7386 #ifdef HAVE_LINUX_THREADS
7387         pthread_kill_other_threads_np();
7388 #endif
7389
7390         exit( status );
7391
7392 ; return 0; }
7393 EOF
7394 if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7395   rm -rf conftest*
7396   ol_cv_pthread_pthread=yes
7397 else
7398   echo "configure: failed program was:" >&5
7399   cat conftest.$ac_ext >&5
7400   rm -rf conftest*
7401   ol_cv_pthread_pthread=no
7402 fi
7403 rm -f conftest*
7404 else
7405   cat > conftest.$ac_ext <<EOF
7406 #line 7407 "configure"
7407 #include "confdefs.h"
7408 /* pthread test headers */
7409 #include <pthread.h>
7410 #ifndef NULL
7411 #define NULL (void*)0
7412 #endif
7413
7414 static void *task(p)
7415         void *p;
7416 {
7417         return (void *) (p == NULL);
7418 }
7419
7420
7421 int main(argc, argv)
7422         int argc;
7423         char **argv;
7424 {
7425
7426         /* pthread test function */
7427         pthread_t t;
7428         int status;
7429 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7430         /* This system (e.g. AIX) defaults detached; must override */
7431         pthread_attr_t attr;
7432
7433         status = pthread_attr_init(&attr);
7434         if( status ) exit( status );
7435
7436         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7437         if( status ) exit( status );
7438
7439 #define ATTR    &attr
7440 #else
7441 #if HAVE_PTHREADS_D4
7442 #define ATTR    pthread_attr_default
7443 #else
7444 #define ATTR    NULL
7445 #endif
7446 #endif
7447         /* make sure pthread_create() isn't just a stub */
7448         status = pthread_create(&t, ATTR, task, NULL);
7449         if( status ) exit( status );
7450
7451         /* make sure pthread_detach() isn't just a stub */
7452 #if HAVE_PTHREADS_D4
7453         status = pthread_detach( &t );
7454 #else
7455         status = pthread_detach( t );
7456 #endif
7457
7458 #ifdef HAVE_LINUX_THREADS
7459         pthread_kill_other_threads_np();
7460 #endif
7461
7462         exit( status );
7463
7464 }
7465
7466 EOF
7467 if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7468 then
7469   ol_cv_pthread_pthread=yes
7470 else
7471   echo "configure: failed program was:" >&5
7472   cat conftest.$ac_ext >&5
7473   rm -fr conftest*
7474   ol_cv_pthread_pthread=no
7475 fi
7476 rm -fr conftest*
7477 fi
7478
7479
7480                 # restore the LIBS
7481                 LIBS="$ol_LIBS"
7482         
7483 fi
7484
7485 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
7486
7487         if test $ol_cv_pthread_pthread = yes ; then
7488                 ol_link_pthreads="-pthread"
7489                 ol_link_threads=posix
7490         fi
7491 fi
7492
7493                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
7494 if test "$ol_link_threads" = no ; then
7495         # try -pthreads
7496         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
7497 echo "configure:7498: checking for pthread link with -pthreads" >&5
7498 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
7499   echo $ac_n "(cached) $ac_c" 1>&6
7500 else
7501   
7502                 # save the flags
7503                 ol_LIBS="$LIBS"
7504                 LIBS="-pthreads $LIBS"
7505
7506                 if test "$cross_compiling" = yes; then
7507   cat > conftest.$ac_ext <<EOF
7508 #line 7509 "configure"
7509 #include "confdefs.h"
7510 /* pthread test headers */
7511 #include <pthread.h>
7512 #ifndef NULL
7513 #define NULL (void*)0
7514 #endif
7515
7516 static void *task(p)
7517         void *p;
7518 {
7519         return (void *) (p == NULL);
7520 }
7521
7522 int main() {
7523
7524         /* pthread test function */
7525         pthread_t t;
7526         int status;
7527 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7528         /* This system (e.g. AIX) defaults detached; must override */
7529         pthread_attr_t attr;
7530
7531         status = pthread_attr_init(&attr);
7532         if( status ) exit( status );
7533
7534         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7535         if( status ) exit( status );
7536
7537 #define ATTR    &attr
7538 #else
7539 #if HAVE_PTHREADS_D4
7540 #define ATTR    pthread_attr_default
7541 #else
7542 #define ATTR    NULL
7543 #endif
7544 #endif
7545         /* make sure pthread_create() isn't just a stub */
7546         status = pthread_create(&t, ATTR, task, NULL);
7547         if( status ) exit( status );
7548
7549         /* make sure pthread_detach() isn't just a stub */
7550 #if HAVE_PTHREADS_D4
7551         status = pthread_detach( &t );
7552 #else
7553         status = pthread_detach( t );
7554 #endif
7555
7556 #ifdef HAVE_LINUX_THREADS
7557         pthread_kill_other_threads_np();
7558 #endif
7559
7560         exit( status );
7561
7562 ; return 0; }
7563 EOF
7564 if { (eval echo configure:7565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7565   rm -rf conftest*
7566   ol_cv_pthread_pthreads=yes
7567 else
7568   echo "configure: failed program was:" >&5
7569   cat conftest.$ac_ext >&5
7570   rm -rf conftest*
7571   ol_cv_pthread_pthreads=no
7572 fi
7573 rm -f conftest*
7574 else
7575   cat > conftest.$ac_ext <<EOF
7576 #line 7577 "configure"
7577 #include "confdefs.h"
7578 /* pthread test headers */
7579 #include <pthread.h>
7580 #ifndef NULL
7581 #define NULL (void*)0
7582 #endif
7583
7584 static void *task(p)
7585         void *p;
7586 {
7587         return (void *) (p == NULL);
7588 }
7589
7590
7591 int main(argc, argv)
7592         int argc;
7593         char **argv;
7594 {
7595
7596         /* pthread test function */
7597         pthread_t t;
7598         int status;
7599 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7600         /* This system (e.g. AIX) defaults detached; must override */
7601         pthread_attr_t attr;
7602
7603         status = pthread_attr_init(&attr);
7604         if( status ) exit( status );
7605
7606         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7607         if( status ) exit( status );
7608
7609 #define ATTR    &attr
7610 #else
7611 #if HAVE_PTHREADS_D4
7612 #define ATTR    pthread_attr_default
7613 #else
7614 #define ATTR    NULL
7615 #endif
7616 #endif
7617         /* make sure pthread_create() isn't just a stub */
7618         status = pthread_create(&t, ATTR, task, NULL);
7619         if( status ) exit( status );
7620
7621         /* make sure pthread_detach() isn't just a stub */
7622 #if HAVE_PTHREADS_D4
7623         status = pthread_detach( &t );
7624 #else
7625         status = pthread_detach( t );
7626 #endif
7627
7628 #ifdef HAVE_LINUX_THREADS
7629         pthread_kill_other_threads_np();
7630 #endif
7631
7632         exit( status );
7633
7634 }
7635
7636 EOF
7637 if { (eval echo configure:7638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7638 then
7639   ol_cv_pthread_pthreads=yes
7640 else
7641   echo "configure: failed program was:" >&5
7642   cat conftest.$ac_ext >&5
7643   rm -fr conftest*
7644   ol_cv_pthread_pthreads=no
7645 fi
7646 rm -fr conftest*
7647 fi
7648
7649
7650                 # restore the LIBS
7651                 LIBS="$ol_LIBS"
7652         
7653 fi
7654
7655 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7656
7657         if test $ol_cv_pthread_pthreads = yes ; then
7658                 ol_link_pthreads="-pthreads"
7659                 ol_link_threads=posix
7660         fi
7661 fi
7662
7663                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7664 if test "$ol_link_threads" = no ; then
7665         # try -mthreads
7666         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7667 echo "configure:7668: checking for pthread link with -mthreads" >&5
7668 if eval "test \"`echo '$''{'ol_cv_pthread_mthreads'+set}'`\" = set"; then
7669   echo $ac_n "(cached) $ac_c" 1>&6
7670 else
7671   
7672                 # save the flags
7673                 ol_LIBS="$LIBS"
7674                 LIBS="-mthreads $LIBS"
7675
7676                 if test "$cross_compiling" = yes; then
7677   cat > conftest.$ac_ext <<EOF
7678 #line 7679 "configure"
7679 #include "confdefs.h"
7680 /* pthread test headers */
7681 #include <pthread.h>
7682 #ifndef NULL
7683 #define NULL (void*)0
7684 #endif
7685
7686 static void *task(p)
7687         void *p;
7688 {
7689         return (void *) (p == NULL);
7690 }
7691
7692 int main() {
7693
7694         /* pthread test function */
7695         pthread_t t;
7696         int status;
7697 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7698         /* This system (e.g. AIX) defaults detached; must override */
7699         pthread_attr_t attr;
7700
7701         status = pthread_attr_init(&attr);
7702         if( status ) exit( status );
7703
7704         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7705         if( status ) exit( status );
7706
7707 #define ATTR    &attr
7708 #else
7709 #if HAVE_PTHREADS_D4
7710 #define ATTR    pthread_attr_default
7711 #else
7712 #define ATTR    NULL
7713 #endif
7714 #endif
7715         /* make sure pthread_create() isn't just a stub */
7716         status = pthread_create(&t, ATTR, task, NULL);
7717         if( status ) exit( status );
7718
7719         /* make sure pthread_detach() isn't just a stub */
7720 #if HAVE_PTHREADS_D4
7721         status = pthread_detach( &t );
7722 #else
7723         status = pthread_detach( t );
7724 #endif
7725
7726 #ifdef HAVE_LINUX_THREADS
7727         pthread_kill_other_threads_np();
7728 #endif
7729
7730         exit( status );
7731
7732 ; return 0; }
7733 EOF
7734 if { (eval echo configure:7735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7735   rm -rf conftest*
7736   ol_cv_pthread_mthreads=yes
7737 else
7738   echo "configure: failed program was:" >&5
7739   cat conftest.$ac_ext >&5
7740   rm -rf conftest*
7741   ol_cv_pthread_mthreads=no
7742 fi
7743 rm -f conftest*
7744 else
7745   cat > conftest.$ac_ext <<EOF
7746 #line 7747 "configure"
7747 #include "confdefs.h"
7748 /* pthread test headers */
7749 #include <pthread.h>
7750 #ifndef NULL
7751 #define NULL (void*)0
7752 #endif
7753
7754 static void *task(p)
7755         void *p;
7756 {
7757         return (void *) (p == NULL);
7758 }
7759
7760
7761 int main(argc, argv)
7762         int argc;
7763         char **argv;
7764 {
7765
7766         /* pthread test function */
7767         pthread_t t;
7768         int status;
7769 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7770         /* This system (e.g. AIX) defaults detached; must override */
7771         pthread_attr_t attr;
7772
7773         status = pthread_attr_init(&attr);
7774         if( status ) exit( status );
7775
7776         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7777         if( status ) exit( status );
7778
7779 #define ATTR    &attr
7780 #else
7781 #if HAVE_PTHREADS_D4
7782 #define ATTR    pthread_attr_default
7783 #else
7784 #define ATTR    NULL
7785 #endif
7786 #endif
7787         /* make sure pthread_create() isn't just a stub */
7788         status = pthread_create(&t, ATTR, task, NULL);
7789         if( status ) exit( status );
7790
7791         /* make sure pthread_detach() isn't just a stub */
7792 #if HAVE_PTHREADS_D4
7793         status = pthread_detach( &t );
7794 #else
7795         status = pthread_detach( t );
7796 #endif
7797
7798 #ifdef HAVE_LINUX_THREADS
7799         pthread_kill_other_threads_np();
7800 #endif
7801
7802         exit( status );
7803
7804 }
7805
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7808 then
7809   ol_cv_pthread_mthreads=yes
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -fr conftest*
7814   ol_cv_pthread_mthreads=no
7815 fi
7816 rm -fr conftest*
7817 fi
7818
7819
7820                 # restore the LIBS
7821                 LIBS="$ol_LIBS"
7822         
7823 fi
7824
7825 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7826
7827         if test $ol_cv_pthread_mthreads = yes ; then
7828                 ol_link_pthreads="-mthreads"
7829                 ol_link_threads=posix
7830         fi
7831 fi
7832
7833                 # Pthread try link: -thread (ol_cv_pthread_thread)
7834 if test "$ol_link_threads" = no ; then
7835         # try -thread
7836         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7837 echo "configure:7838: checking for pthread link with -thread" >&5
7838 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
7839   echo $ac_n "(cached) $ac_c" 1>&6
7840 else
7841   
7842                 # save the flags
7843                 ol_LIBS="$LIBS"
7844                 LIBS="-thread $LIBS"
7845
7846                 if test "$cross_compiling" = yes; then
7847   cat > conftest.$ac_ext <<EOF
7848 #line 7849 "configure"
7849 #include "confdefs.h"
7850 /* pthread test headers */
7851 #include <pthread.h>
7852 #ifndef NULL
7853 #define NULL (void*)0
7854 #endif
7855
7856 static void *task(p)
7857         void *p;
7858 {
7859         return (void *) (p == NULL);
7860 }
7861
7862 int main() {
7863
7864         /* pthread test function */
7865         pthread_t t;
7866         int status;
7867 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7868         /* This system (e.g. AIX) defaults detached; must override */
7869         pthread_attr_t attr;
7870
7871         status = pthread_attr_init(&attr);
7872         if( status ) exit( status );
7873
7874         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7875         if( status ) exit( status );
7876
7877 #define ATTR    &attr
7878 #else
7879 #if HAVE_PTHREADS_D4
7880 #define ATTR    pthread_attr_default
7881 #else
7882 #define ATTR    NULL
7883 #endif
7884 #endif
7885         /* make sure pthread_create() isn't just a stub */
7886         status = pthread_create(&t, ATTR, task, NULL);
7887         if( status ) exit( status );
7888
7889         /* make sure pthread_detach() isn't just a stub */
7890 #if HAVE_PTHREADS_D4
7891         status = pthread_detach( &t );
7892 #else
7893         status = pthread_detach( t );
7894 #endif
7895
7896 #ifdef HAVE_LINUX_THREADS
7897         pthread_kill_other_threads_np();
7898 #endif
7899
7900         exit( status );
7901
7902 ; return 0; }
7903 EOF
7904 if { (eval echo configure:7905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7905   rm -rf conftest*
7906   ol_cv_pthread_thread=yes
7907 else
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   ol_cv_pthread_thread=no
7912 fi
7913 rm -f conftest*
7914 else
7915   cat > conftest.$ac_ext <<EOF
7916 #line 7917 "configure"
7917 #include "confdefs.h"
7918 /* pthread test headers */
7919 #include <pthread.h>
7920 #ifndef NULL
7921 #define NULL (void*)0
7922 #endif
7923
7924 static void *task(p)
7925         void *p;
7926 {
7927         return (void *) (p == NULL);
7928 }
7929
7930
7931 int main(argc, argv)
7932         int argc;
7933         char **argv;
7934 {
7935
7936         /* pthread test function */
7937         pthread_t t;
7938         int status;
7939 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
7940         /* This system (e.g. AIX) defaults detached; must override */
7941         pthread_attr_t attr;
7942
7943         status = pthread_attr_init(&attr);
7944         if( status ) exit( status );
7945
7946         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
7947         if( status ) exit( status );
7948
7949 #define ATTR    &attr
7950 #else
7951 #if HAVE_PTHREADS_D4
7952 #define ATTR    pthread_attr_default
7953 #else
7954 #define ATTR    NULL
7955 #endif
7956 #endif
7957         /* make sure pthread_create() isn't just a stub */
7958         status = pthread_create(&t, ATTR, task, NULL);
7959         if( status ) exit( status );
7960
7961         /* make sure pthread_detach() isn't just a stub */
7962 #if HAVE_PTHREADS_D4
7963         status = pthread_detach( &t );
7964 #else
7965         status = pthread_detach( t );
7966 #endif
7967
7968 #ifdef HAVE_LINUX_THREADS
7969         pthread_kill_other_threads_np();
7970 #endif
7971
7972         exit( status );
7973
7974 }
7975
7976 EOF
7977 if { (eval echo configure:7978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7978 then
7979   ol_cv_pthread_thread=yes
7980 else
7981   echo "configure: failed program was:" >&5
7982   cat conftest.$ac_ext >&5
7983   rm -fr conftest*
7984   ol_cv_pthread_thread=no
7985 fi
7986 rm -fr conftest*
7987 fi
7988
7989
7990                 # restore the LIBS
7991                 LIBS="$ol_LIBS"
7992         
7993 fi
7994
7995 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7996
7997         if test $ol_cv_pthread_thread = yes ; then
7998                 ol_link_pthreads="-thread"
7999                 ol_link_threads=posix
8000         fi
8001 fi
8002
8003
8004                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
8005 if test "$ol_link_threads" = no ; then
8006         # try -lpthread -lmach -lexc -lc_r
8007         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
8008 echo "configure:8009: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
8009 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
8010   echo $ac_n "(cached) $ac_c" 1>&6
8011 else
8012   
8013                 # save the flags
8014                 ol_LIBS="$LIBS"
8015                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
8016
8017                 if test "$cross_compiling" = yes; then
8018   cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 /* pthread test headers */
8022 #include <pthread.h>
8023 #ifndef NULL
8024 #define NULL (void*)0
8025 #endif
8026
8027 static void *task(p)
8028         void *p;
8029 {
8030         return (void *) (p == NULL);
8031 }
8032
8033 int main() {
8034
8035         /* pthread test function */
8036         pthread_t t;
8037         int status;
8038 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8039         /* This system (e.g. AIX) defaults detached; must override */
8040         pthread_attr_t attr;
8041
8042         status = pthread_attr_init(&attr);
8043         if( status ) exit( status );
8044
8045         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8046         if( status ) exit( status );
8047
8048 #define ATTR    &attr
8049 #else
8050 #if HAVE_PTHREADS_D4
8051 #define ATTR    pthread_attr_default
8052 #else
8053 #define ATTR    NULL
8054 #endif
8055 #endif
8056         /* make sure pthread_create() isn't just a stub */
8057         status = pthread_create(&t, ATTR, task, NULL);
8058         if( status ) exit( status );
8059
8060         /* make sure pthread_detach() isn't just a stub */
8061 #if HAVE_PTHREADS_D4
8062         status = pthread_detach( &t );
8063 #else
8064         status = pthread_detach( t );
8065 #endif
8066
8067 #ifdef HAVE_LINUX_THREADS
8068         pthread_kill_other_threads_np();
8069 #endif
8070
8071         exit( status );
8072
8073 ; return 0; }
8074 EOF
8075 if { (eval echo configure:8076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8076   rm -rf conftest*
8077   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8078 else
8079   echo "configure: failed program was:" >&5
8080   cat conftest.$ac_ext >&5
8081   rm -rf conftest*
8082   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8083 fi
8084 rm -f conftest*
8085 else
8086   cat > conftest.$ac_ext <<EOF
8087 #line 8088 "configure"
8088 #include "confdefs.h"
8089 /* pthread test headers */
8090 #include <pthread.h>
8091 #ifndef NULL
8092 #define NULL (void*)0
8093 #endif
8094
8095 static void *task(p)
8096         void *p;
8097 {
8098         return (void *) (p == NULL);
8099 }
8100
8101
8102 int main(argc, argv)
8103         int argc;
8104         char **argv;
8105 {
8106
8107         /* pthread test function */
8108         pthread_t t;
8109         int status;
8110 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8111         /* This system (e.g. AIX) defaults detached; must override */
8112         pthread_attr_t attr;
8113
8114         status = pthread_attr_init(&attr);
8115         if( status ) exit( status );
8116
8117         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8118         if( status ) exit( status );
8119
8120 #define ATTR    &attr
8121 #else
8122 #if HAVE_PTHREADS_D4
8123 #define ATTR    pthread_attr_default
8124 #else
8125 #define ATTR    NULL
8126 #endif
8127 #endif
8128         /* make sure pthread_create() isn't just a stub */
8129         status = pthread_create(&t, ATTR, task, NULL);
8130         if( status ) exit( status );
8131
8132         /* make sure pthread_detach() isn't just a stub */
8133 #if HAVE_PTHREADS_D4
8134         status = pthread_detach( &t );
8135 #else
8136         status = pthread_detach( t );
8137 #endif
8138
8139 #ifdef HAVE_LINUX_THREADS
8140         pthread_kill_other_threads_np();
8141 #endif
8142
8143         exit( status );
8144
8145 }
8146
8147 EOF
8148 if { (eval echo configure:8149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8149 then
8150   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
8151 else
8152   echo "configure: failed program was:" >&5
8153   cat conftest.$ac_ext >&5
8154   rm -fr conftest*
8155   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
8156 fi
8157 rm -fr conftest*
8158 fi
8159
8160
8161                 # restore the LIBS
8162                 LIBS="$ol_LIBS"
8163         
8164 fi
8165
8166 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
8167
8168         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
8169                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
8170                 ol_link_threads=posix
8171         fi
8172 fi
8173
8174                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
8175 if test "$ol_link_threads" = no ; then
8176         # try -lpthread -lmach -lexc
8177         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
8178 echo "configure:8179: checking for pthread link with -lpthread -lmach -lexc" >&5
8179 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
8180   echo $ac_n "(cached) $ac_c" 1>&6
8181 else
8182   
8183                 # save the flags
8184                 ol_LIBS="$LIBS"
8185                 LIBS="-lpthread -lmach -lexc $LIBS"
8186
8187                 if test "$cross_compiling" = yes; then
8188   cat > conftest.$ac_ext <<EOF
8189 #line 8190 "configure"
8190 #include "confdefs.h"
8191 /* pthread test headers */
8192 #include <pthread.h>
8193 #ifndef NULL
8194 #define NULL (void*)0
8195 #endif
8196
8197 static void *task(p)
8198         void *p;
8199 {
8200         return (void *) (p == NULL);
8201 }
8202
8203 int main() {
8204
8205         /* pthread test function */
8206         pthread_t t;
8207         int status;
8208 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8209         /* This system (e.g. AIX) defaults detached; must override */
8210         pthread_attr_t attr;
8211
8212         status = pthread_attr_init(&attr);
8213         if( status ) exit( status );
8214
8215         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8216         if( status ) exit( status );
8217
8218 #define ATTR    &attr
8219 #else
8220 #if HAVE_PTHREADS_D4
8221 #define ATTR    pthread_attr_default
8222 #else
8223 #define ATTR    NULL
8224 #endif
8225 #endif
8226         /* make sure pthread_create() isn't just a stub */
8227         status = pthread_create(&t, ATTR, task, NULL);
8228         if( status ) exit( status );
8229
8230         /* make sure pthread_detach() isn't just a stub */
8231 #if HAVE_PTHREADS_D4
8232         status = pthread_detach( &t );
8233 #else
8234         status = pthread_detach( t );
8235 #endif
8236
8237 #ifdef HAVE_LINUX_THREADS
8238         pthread_kill_other_threads_np();
8239 #endif
8240
8241         exit( status );
8242
8243 ; return 0; }
8244 EOF
8245 if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8246   rm -rf conftest*
8247   ol_cv_pthread_lpthread_lmach_lexc=yes
8248 else
8249   echo "configure: failed program was:" >&5
8250   cat conftest.$ac_ext >&5
8251   rm -rf conftest*
8252   ol_cv_pthread_lpthread_lmach_lexc=no
8253 fi
8254 rm -f conftest*
8255 else
8256   cat > conftest.$ac_ext <<EOF
8257 #line 8258 "configure"
8258 #include "confdefs.h"
8259 /* pthread test headers */
8260 #include <pthread.h>
8261 #ifndef NULL
8262 #define NULL (void*)0
8263 #endif
8264
8265 static void *task(p)
8266         void *p;
8267 {
8268         return (void *) (p == NULL);
8269 }
8270
8271
8272 int main(argc, argv)
8273         int argc;
8274         char **argv;
8275 {
8276
8277         /* pthread test function */
8278         pthread_t t;
8279         int status;
8280 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8281         /* This system (e.g. AIX) defaults detached; must override */
8282         pthread_attr_t attr;
8283
8284         status = pthread_attr_init(&attr);
8285         if( status ) exit( status );
8286
8287         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8288         if( status ) exit( status );
8289
8290 #define ATTR    &attr
8291 #else
8292 #if HAVE_PTHREADS_D4
8293 #define ATTR    pthread_attr_default
8294 #else
8295 #define ATTR    NULL
8296 #endif
8297 #endif
8298         /* make sure pthread_create() isn't just a stub */
8299         status = pthread_create(&t, ATTR, task, NULL);
8300         if( status ) exit( status );
8301
8302         /* make sure pthread_detach() isn't just a stub */
8303 #if HAVE_PTHREADS_D4
8304         status = pthread_detach( &t );
8305 #else
8306         status = pthread_detach( t );
8307 #endif
8308
8309 #ifdef HAVE_LINUX_THREADS
8310         pthread_kill_other_threads_np();
8311 #endif
8312
8313         exit( status );
8314
8315 }
8316
8317 EOF
8318 if { (eval echo configure:8319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8319 then
8320   ol_cv_pthread_lpthread_lmach_lexc=yes
8321 else
8322   echo "configure: failed program was:" >&5
8323   cat conftest.$ac_ext >&5
8324   rm -fr conftest*
8325   ol_cv_pthread_lpthread_lmach_lexc=no
8326 fi
8327 rm -fr conftest*
8328 fi
8329
8330
8331                 # restore the LIBS
8332                 LIBS="$ol_LIBS"
8333         
8334 fi
8335
8336 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
8337
8338         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
8339                 ol_link_pthreads="-lpthread -lmach -lexc"
8340                 ol_link_threads=posix
8341         fi
8342 fi
8343
8344
8345                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
8346 if test "$ol_link_threads" = no ; then
8347         # try -lpthread -Wl,-woff,85
8348         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
8349 echo "configure:8350: checking for pthread link with -lpthread -Wl,-woff,85" >&5
8350 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
8351   echo $ac_n "(cached) $ac_c" 1>&6
8352 else
8353   
8354                 # save the flags
8355                 ol_LIBS="$LIBS"
8356                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
8357
8358                 if test "$cross_compiling" = yes; then
8359   cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 /* pthread test headers */
8363 #include <pthread.h>
8364 #ifndef NULL
8365 #define NULL (void*)0
8366 #endif
8367
8368 static void *task(p)
8369         void *p;
8370 {
8371         return (void *) (p == NULL);
8372 }
8373
8374 int main() {
8375
8376         /* pthread test function */
8377         pthread_t t;
8378         int status;
8379 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8380         /* This system (e.g. AIX) defaults detached; must override */
8381         pthread_attr_t attr;
8382
8383         status = pthread_attr_init(&attr);
8384         if( status ) exit( status );
8385
8386         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8387         if( status ) exit( status );
8388
8389 #define ATTR    &attr
8390 #else
8391 #if HAVE_PTHREADS_D4
8392 #define ATTR    pthread_attr_default
8393 #else
8394 #define ATTR    NULL
8395 #endif
8396 #endif
8397         /* make sure pthread_create() isn't just a stub */
8398         status = pthread_create(&t, ATTR, task, NULL);
8399         if( status ) exit( status );
8400
8401         /* make sure pthread_detach() isn't just a stub */
8402 #if HAVE_PTHREADS_D4
8403         status = pthread_detach( &t );
8404 #else
8405         status = pthread_detach( t );
8406 #endif
8407
8408 #ifdef HAVE_LINUX_THREADS
8409         pthread_kill_other_threads_np();
8410 #endif
8411
8412         exit( status );
8413
8414 ; return 0; }
8415 EOF
8416 if { (eval echo configure:8417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8417   rm -rf conftest*
8418   ol_cv_pthread_lib_lpthread_woff=yes
8419 else
8420   echo "configure: failed program was:" >&5
8421   cat conftest.$ac_ext >&5
8422   rm -rf conftest*
8423   ol_cv_pthread_lib_lpthread_woff=no
8424 fi
8425 rm -f conftest*
8426 else
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 /* pthread test headers */
8431 #include <pthread.h>
8432 #ifndef NULL
8433 #define NULL (void*)0
8434 #endif
8435
8436 static void *task(p)
8437         void *p;
8438 {
8439         return (void *) (p == NULL);
8440 }
8441
8442
8443 int main(argc, argv)
8444         int argc;
8445         char **argv;
8446 {
8447
8448         /* pthread test function */
8449         pthread_t t;
8450         int status;
8451 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8452         /* This system (e.g. AIX) defaults detached; must override */
8453         pthread_attr_t attr;
8454
8455         status = pthread_attr_init(&attr);
8456         if( status ) exit( status );
8457
8458         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8459         if( status ) exit( status );
8460
8461 #define ATTR    &attr
8462 #else
8463 #if HAVE_PTHREADS_D4
8464 #define ATTR    pthread_attr_default
8465 #else
8466 #define ATTR    NULL
8467 #endif
8468 #endif
8469         /* make sure pthread_create() isn't just a stub */
8470         status = pthread_create(&t, ATTR, task, NULL);
8471         if( status ) exit( status );
8472
8473         /* make sure pthread_detach() isn't just a stub */
8474 #if HAVE_PTHREADS_D4
8475         status = pthread_detach( &t );
8476 #else
8477         status = pthread_detach( t );
8478 #endif
8479
8480 #ifdef HAVE_LINUX_THREADS
8481         pthread_kill_other_threads_np();
8482 #endif
8483
8484         exit( status );
8485
8486 }
8487
8488 EOF
8489 if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8490 then
8491   ol_cv_pthread_lib_lpthread_woff=yes
8492 else
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -fr conftest*
8496   ol_cv_pthread_lib_lpthread_woff=no
8497 fi
8498 rm -fr conftest*
8499 fi
8500
8501
8502                 # restore the LIBS
8503                 LIBS="$ol_LIBS"
8504         
8505 fi
8506
8507 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
8508
8509         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
8510                 ol_link_pthreads="-lpthread -Wl,-woff,85"
8511                 ol_link_threads=posix
8512         fi
8513 fi
8514
8515
8516                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
8517 if test "$ol_link_threads" = no ; then
8518         # try -lpthread
8519         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
8520 echo "configure:8521: checking for pthread link with -lpthread" >&5
8521 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
8522   echo $ac_n "(cached) $ac_c" 1>&6
8523 else
8524   
8525                 # save the flags
8526                 ol_LIBS="$LIBS"
8527                 LIBS="-lpthread $LIBS"
8528
8529                 if test "$cross_compiling" = yes; then
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 /* pthread test headers */
8534 #include <pthread.h>
8535 #ifndef NULL
8536 #define NULL (void*)0
8537 #endif
8538
8539 static void *task(p)
8540         void *p;
8541 {
8542         return (void *) (p == NULL);
8543 }
8544
8545 int main() {
8546
8547         /* pthread test function */
8548         pthread_t t;
8549         int status;
8550 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8551         /* This system (e.g. AIX) defaults detached; must override */
8552         pthread_attr_t attr;
8553
8554         status = pthread_attr_init(&attr);
8555         if( status ) exit( status );
8556
8557         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8558         if( status ) exit( status );
8559
8560 #define ATTR    &attr
8561 #else
8562 #if HAVE_PTHREADS_D4
8563 #define ATTR    pthread_attr_default
8564 #else
8565 #define ATTR    NULL
8566 #endif
8567 #endif
8568         /* make sure pthread_create() isn't just a stub */
8569         status = pthread_create(&t, ATTR, task, NULL);
8570         if( status ) exit( status );
8571
8572         /* make sure pthread_detach() isn't just a stub */
8573 #if HAVE_PTHREADS_D4
8574         status = pthread_detach( &t );
8575 #else
8576         status = pthread_detach( t );
8577 #endif
8578
8579 #ifdef HAVE_LINUX_THREADS
8580         pthread_kill_other_threads_np();
8581 #endif
8582
8583         exit( status );
8584
8585 ; return 0; }
8586 EOF
8587 if { (eval echo configure:8588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8588   rm -rf conftest*
8589   ol_cv_pthread_lpthread=yes
8590 else
8591   echo "configure: failed program was:" >&5
8592   cat conftest.$ac_ext >&5
8593   rm -rf conftest*
8594   ol_cv_pthread_lpthread=no
8595 fi
8596 rm -f conftest*
8597 else
8598   cat > conftest.$ac_ext <<EOF
8599 #line 8600 "configure"
8600 #include "confdefs.h"
8601 /* pthread test headers */
8602 #include <pthread.h>
8603 #ifndef NULL
8604 #define NULL (void*)0
8605 #endif
8606
8607 static void *task(p)
8608         void *p;
8609 {
8610         return (void *) (p == NULL);
8611 }
8612
8613
8614 int main(argc, argv)
8615         int argc;
8616         char **argv;
8617 {
8618
8619         /* pthread test function */
8620         pthread_t t;
8621         int status;
8622 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8623         /* This system (e.g. AIX) defaults detached; must override */
8624         pthread_attr_t attr;
8625
8626         status = pthread_attr_init(&attr);
8627         if( status ) exit( status );
8628
8629         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8630         if( status ) exit( status );
8631
8632 #define ATTR    &attr
8633 #else
8634 #if HAVE_PTHREADS_D4
8635 #define ATTR    pthread_attr_default
8636 #else
8637 #define ATTR    NULL
8638 #endif
8639 #endif
8640         /* make sure pthread_create() isn't just a stub */
8641         status = pthread_create(&t, ATTR, task, NULL);
8642         if( status ) exit( status );
8643
8644         /* make sure pthread_detach() isn't just a stub */
8645 #if HAVE_PTHREADS_D4
8646         status = pthread_detach( &t );
8647 #else
8648         status = pthread_detach( t );
8649 #endif
8650
8651 #ifdef HAVE_LINUX_THREADS
8652         pthread_kill_other_threads_np();
8653 #endif
8654
8655         exit( status );
8656
8657 }
8658
8659 EOF
8660 if { (eval echo configure:8661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8661 then
8662   ol_cv_pthread_lpthread=yes
8663 else
8664   echo "configure: failed program was:" >&5
8665   cat conftest.$ac_ext >&5
8666   rm -fr conftest*
8667   ol_cv_pthread_lpthread=no
8668 fi
8669 rm -fr conftest*
8670 fi
8671
8672
8673                 # restore the LIBS
8674                 LIBS="$ol_LIBS"
8675         
8676 fi
8677
8678 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
8679
8680         if test $ol_cv_pthread_lpthread = yes ; then
8681                 ol_link_pthreads="-lpthread"
8682                 ol_link_threads=posix
8683         fi
8684 fi
8685
8686                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
8687 if test "$ol_link_threads" = no ; then
8688         # try -lc_r
8689         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
8690 echo "configure:8691: checking for pthread link with -lc_r" >&5
8691 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
8692   echo $ac_n "(cached) $ac_c" 1>&6
8693 else
8694   
8695                 # save the flags
8696                 ol_LIBS="$LIBS"
8697                 LIBS="-lc_r $LIBS"
8698
8699                 if test "$cross_compiling" = yes; then
8700   cat > conftest.$ac_ext <<EOF
8701 #line 8702 "configure"
8702 #include "confdefs.h"
8703 /* pthread test headers */
8704 #include <pthread.h>
8705 #ifndef NULL
8706 #define NULL (void*)0
8707 #endif
8708
8709 static void *task(p)
8710         void *p;
8711 {
8712         return (void *) (p == NULL);
8713 }
8714
8715 int main() {
8716
8717         /* pthread test function */
8718         pthread_t t;
8719         int status;
8720 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8721         /* This system (e.g. AIX) defaults detached; must override */
8722         pthread_attr_t attr;
8723
8724         status = pthread_attr_init(&attr);
8725         if( status ) exit( status );
8726
8727         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8728         if( status ) exit( status );
8729
8730 #define ATTR    &attr
8731 #else
8732 #if HAVE_PTHREADS_D4
8733 #define ATTR    pthread_attr_default
8734 #else
8735 #define ATTR    NULL
8736 #endif
8737 #endif
8738         /* make sure pthread_create() isn't just a stub */
8739         status = pthread_create(&t, ATTR, task, NULL);
8740         if( status ) exit( status );
8741
8742         /* make sure pthread_detach() isn't just a stub */
8743 #if HAVE_PTHREADS_D4
8744         status = pthread_detach( &t );
8745 #else
8746         status = pthread_detach( t );
8747 #endif
8748
8749 #ifdef HAVE_LINUX_THREADS
8750         pthread_kill_other_threads_np();
8751 #endif
8752
8753         exit( status );
8754
8755 ; return 0; }
8756 EOF
8757 if { (eval echo configure:8758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8758   rm -rf conftest*
8759   ol_cv_pthread_lc_r=yes
8760 else
8761   echo "configure: failed program was:" >&5
8762   cat conftest.$ac_ext >&5
8763   rm -rf conftest*
8764   ol_cv_pthread_lc_r=no
8765 fi
8766 rm -f conftest*
8767 else
8768   cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 /* pthread test headers */
8772 #include <pthread.h>
8773 #ifndef NULL
8774 #define NULL (void*)0
8775 #endif
8776
8777 static void *task(p)
8778         void *p;
8779 {
8780         return (void *) (p == NULL);
8781 }
8782
8783
8784 int main(argc, argv)
8785         int argc;
8786         char **argv;
8787 {
8788
8789         /* pthread test function */
8790         pthread_t t;
8791         int status;
8792 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8793         /* This system (e.g. AIX) defaults detached; must override */
8794         pthread_attr_t attr;
8795
8796         status = pthread_attr_init(&attr);
8797         if( status ) exit( status );
8798
8799         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8800         if( status ) exit( status );
8801
8802 #define ATTR    &attr
8803 #else
8804 #if HAVE_PTHREADS_D4
8805 #define ATTR    pthread_attr_default
8806 #else
8807 #define ATTR    NULL
8808 #endif
8809 #endif
8810         /* make sure pthread_create() isn't just a stub */
8811         status = pthread_create(&t, ATTR, task, NULL);
8812         if( status ) exit( status );
8813
8814         /* make sure pthread_detach() isn't just a stub */
8815 #if HAVE_PTHREADS_D4
8816         status = pthread_detach( &t );
8817 #else
8818         status = pthread_detach( t );
8819 #endif
8820
8821 #ifdef HAVE_LINUX_THREADS
8822         pthread_kill_other_threads_np();
8823 #endif
8824
8825         exit( status );
8826
8827 }
8828
8829 EOF
8830 if { (eval echo configure:8831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8831 then
8832   ol_cv_pthread_lc_r=yes
8833 else
8834   echo "configure: failed program was:" >&5
8835   cat conftest.$ac_ext >&5
8836   rm -fr conftest*
8837   ol_cv_pthread_lc_r=no
8838 fi
8839 rm -fr conftest*
8840 fi
8841
8842
8843                 # restore the LIBS
8844                 LIBS="$ol_LIBS"
8845         
8846 fi
8847
8848 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8849
8850         if test $ol_cv_pthread_lc_r = yes ; then
8851                 ol_link_pthreads="-lc_r"
8852                 ol_link_threads=posix
8853         fi
8854 fi
8855
8856
8857                 # Pthread try link: -threads (ol_cv_pthread_threads)
8858 if test "$ol_link_threads" = no ; then
8859         # try -threads
8860         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8861 echo "configure:8862: checking for pthread link with -threads" >&5
8862 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
8863   echo $ac_n "(cached) $ac_c" 1>&6
8864 else
8865   
8866                 # save the flags
8867                 ol_LIBS="$LIBS"
8868                 LIBS="-threads $LIBS"
8869
8870                 if test "$cross_compiling" = yes; then
8871   cat > conftest.$ac_ext <<EOF
8872 #line 8873 "configure"
8873 #include "confdefs.h"
8874 /* pthread test headers */
8875 #include <pthread.h>
8876 #ifndef NULL
8877 #define NULL (void*)0
8878 #endif
8879
8880 static void *task(p)
8881         void *p;
8882 {
8883         return (void *) (p == NULL);
8884 }
8885
8886 int main() {
8887
8888         /* pthread test function */
8889         pthread_t t;
8890         int status;
8891 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8892         /* This system (e.g. AIX) defaults detached; must override */
8893         pthread_attr_t attr;
8894
8895         status = pthread_attr_init(&attr);
8896         if( status ) exit( status );
8897
8898         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8899         if( status ) exit( status );
8900
8901 #define ATTR    &attr
8902 #else
8903 #if HAVE_PTHREADS_D4
8904 #define ATTR    pthread_attr_default
8905 #else
8906 #define ATTR    NULL
8907 #endif
8908 #endif
8909         /* make sure pthread_create() isn't just a stub */
8910         status = pthread_create(&t, ATTR, task, NULL);
8911         if( status ) exit( status );
8912
8913         /* make sure pthread_detach() isn't just a stub */
8914 #if HAVE_PTHREADS_D4
8915         status = pthread_detach( &t );
8916 #else
8917         status = pthread_detach( t );
8918 #endif
8919
8920 #ifdef HAVE_LINUX_THREADS
8921         pthread_kill_other_threads_np();
8922 #endif
8923
8924         exit( status );
8925
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   ol_cv_pthread_threads=yes
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   ol_cv_pthread_threads=no
8936 fi
8937 rm -f conftest*
8938 else
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* pthread test headers */
8943 #include <pthread.h>
8944 #ifndef NULL
8945 #define NULL (void*)0
8946 #endif
8947
8948 static void *task(p)
8949         void *p;
8950 {
8951         return (void *) (p == NULL);
8952 }
8953
8954
8955 int main(argc, argv)
8956         int argc;
8957         char **argv;
8958 {
8959
8960         /* pthread test function */
8961         pthread_t t;
8962         int status;
8963 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
8964         /* This system (e.g. AIX) defaults detached; must override */
8965         pthread_attr_t attr;
8966
8967         status = pthread_attr_init(&attr);
8968         if( status ) exit( status );
8969
8970         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
8971         if( status ) exit( status );
8972
8973 #define ATTR    &attr
8974 #else
8975 #if HAVE_PTHREADS_D4
8976 #define ATTR    pthread_attr_default
8977 #else
8978 #define ATTR    NULL
8979 #endif
8980 #endif
8981         /* make sure pthread_create() isn't just a stub */
8982         status = pthread_create(&t, ATTR, task, NULL);
8983         if( status ) exit( status );
8984
8985         /* make sure pthread_detach() isn't just a stub */
8986 #if HAVE_PTHREADS_D4
8987         status = pthread_detach( &t );
8988 #else
8989         status = pthread_detach( t );
8990 #endif
8991
8992 #ifdef HAVE_LINUX_THREADS
8993         pthread_kill_other_threads_np();
8994 #endif
8995
8996         exit( status );
8997
8998 }
8999
9000 EOF
9001 if { (eval echo configure:9002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9002 then
9003   ol_cv_pthread_threads=yes
9004 else
9005   echo "configure: failed program was:" >&5
9006   cat conftest.$ac_ext >&5
9007   rm -fr conftest*
9008   ol_cv_pthread_threads=no
9009 fi
9010 rm -fr conftest*
9011 fi
9012
9013
9014                 # restore the LIBS
9015                 LIBS="$ol_LIBS"
9016         
9017 fi
9018
9019 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
9020
9021         if test $ol_cv_pthread_threads = yes ; then
9022                 ol_link_pthreads="-threads"
9023                 ol_link_threads=posix
9024         fi
9025 fi
9026
9027
9028                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
9029 if test "$ol_link_threads" = no ; then
9030         # try -lpthreads -lmach -lexc -lc_r
9031         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
9032 echo "configure:9033: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
9033 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   
9037                 # save the flags
9038                 ol_LIBS="$LIBS"
9039                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
9040
9041                 if test "$cross_compiling" = yes; then
9042   cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* pthread test headers */
9046 #include <pthread.h>
9047 #ifndef NULL
9048 #define NULL (void*)0
9049 #endif
9050
9051 static void *task(p)
9052         void *p;
9053 {
9054         return (void *) (p == NULL);
9055 }
9056
9057 int main() {
9058
9059         /* pthread test function */
9060         pthread_t t;
9061         int status;
9062 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9063         /* This system (e.g. AIX) defaults detached; must override */
9064         pthread_attr_t attr;
9065
9066         status = pthread_attr_init(&attr);
9067         if( status ) exit( status );
9068
9069         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9070         if( status ) exit( status );
9071
9072 #define ATTR    &attr
9073 #else
9074 #if HAVE_PTHREADS_D4
9075 #define ATTR    pthread_attr_default
9076 #else
9077 #define ATTR    NULL
9078 #endif
9079 #endif
9080         /* make sure pthread_create() isn't just a stub */
9081         status = pthread_create(&t, ATTR, task, NULL);
9082         if( status ) exit( status );
9083
9084         /* make sure pthread_detach() isn't just a stub */
9085 #if HAVE_PTHREADS_D4
9086         status = pthread_detach( &t );
9087 #else
9088         status = pthread_detach( t );
9089 #endif
9090
9091 #ifdef HAVE_LINUX_THREADS
9092         pthread_kill_other_threads_np();
9093 #endif
9094
9095         exit( status );
9096
9097 ; return 0; }
9098 EOF
9099 if { (eval echo configure:9100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9100   rm -rf conftest*
9101   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9102 else
9103   echo "configure: failed program was:" >&5
9104   cat conftest.$ac_ext >&5
9105   rm -rf conftest*
9106   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9107 fi
9108 rm -f conftest*
9109 else
9110   cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 /* pthread test headers */
9114 #include <pthread.h>
9115 #ifndef NULL
9116 #define NULL (void*)0
9117 #endif
9118
9119 static void *task(p)
9120         void *p;
9121 {
9122         return (void *) (p == NULL);
9123 }
9124
9125
9126 int main(argc, argv)
9127         int argc;
9128         char **argv;
9129 {
9130
9131         /* pthread test function */
9132         pthread_t t;
9133         int status;
9134 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9135         /* This system (e.g. AIX) defaults detached; must override */
9136         pthread_attr_t attr;
9137
9138         status = pthread_attr_init(&attr);
9139         if( status ) exit( status );
9140
9141         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9142         if( status ) exit( status );
9143
9144 #define ATTR    &attr
9145 #else
9146 #if HAVE_PTHREADS_D4
9147 #define ATTR    pthread_attr_default
9148 #else
9149 #define ATTR    NULL
9150 #endif
9151 #endif
9152         /* make sure pthread_create() isn't just a stub */
9153         status = pthread_create(&t, ATTR, task, NULL);
9154         if( status ) exit( status );
9155
9156         /* make sure pthread_detach() isn't just a stub */
9157 #if HAVE_PTHREADS_D4
9158         status = pthread_detach( &t );
9159 #else
9160         status = pthread_detach( t );
9161 #endif
9162
9163 #ifdef HAVE_LINUX_THREADS
9164         pthread_kill_other_threads_np();
9165 #endif
9166
9167         exit( status );
9168
9169 }
9170
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9173 then
9174   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -fr conftest*
9179   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
9180 fi
9181 rm -fr conftest*
9182 fi
9183
9184
9185                 # restore the LIBS
9186                 LIBS="$ol_LIBS"
9187         
9188 fi
9189
9190 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
9191
9192         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
9193                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
9194                 ol_link_threads=posix
9195         fi
9196 fi
9197
9198                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
9199 if test "$ol_link_threads" = no ; then
9200         # try -lpthreads -lmach -lexc
9201         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
9202 echo "configure:9203: checking for pthread link with -lpthreads -lmach -lexc" >&5
9203 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
9204   echo $ac_n "(cached) $ac_c" 1>&6
9205 else
9206   
9207                 # save the flags
9208                 ol_LIBS="$LIBS"
9209                 LIBS="-lpthreads -lmach -lexc $LIBS"
9210
9211                 if test "$cross_compiling" = yes; then
9212   cat > conftest.$ac_ext <<EOF
9213 #line 9214 "configure"
9214 #include "confdefs.h"
9215 /* pthread test headers */
9216 #include <pthread.h>
9217 #ifndef NULL
9218 #define NULL (void*)0
9219 #endif
9220
9221 static void *task(p)
9222         void *p;
9223 {
9224         return (void *) (p == NULL);
9225 }
9226
9227 int main() {
9228
9229         /* pthread test function */
9230         pthread_t t;
9231         int status;
9232 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9233         /* This system (e.g. AIX) defaults detached; must override */
9234         pthread_attr_t attr;
9235
9236         status = pthread_attr_init(&attr);
9237         if( status ) exit( status );
9238
9239         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9240         if( status ) exit( status );
9241
9242 #define ATTR    &attr
9243 #else
9244 #if HAVE_PTHREADS_D4
9245 #define ATTR    pthread_attr_default
9246 #else
9247 #define ATTR    NULL
9248 #endif
9249 #endif
9250         /* make sure pthread_create() isn't just a stub */
9251         status = pthread_create(&t, ATTR, task, NULL);
9252         if( status ) exit( status );
9253
9254         /* make sure pthread_detach() isn't just a stub */
9255 #if HAVE_PTHREADS_D4
9256         status = pthread_detach( &t );
9257 #else
9258         status = pthread_detach( t );
9259 #endif
9260
9261 #ifdef HAVE_LINUX_THREADS
9262         pthread_kill_other_threads_np();
9263 #endif
9264
9265         exit( status );
9266
9267 ; return 0; }
9268 EOF
9269 if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9270   rm -rf conftest*
9271   ol_cv_pthread_lpthreads_lmach_lexc=yes
9272 else
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   ol_cv_pthread_lpthreads_lmach_lexc=no
9277 fi
9278 rm -f conftest*
9279 else
9280   cat > conftest.$ac_ext <<EOF
9281 #line 9282 "configure"
9282 #include "confdefs.h"
9283 /* pthread test headers */
9284 #include <pthread.h>
9285 #ifndef NULL
9286 #define NULL (void*)0
9287 #endif
9288
9289 static void *task(p)
9290         void *p;
9291 {
9292         return (void *) (p == NULL);
9293 }
9294
9295
9296 int main(argc, argv)
9297         int argc;
9298         char **argv;
9299 {
9300
9301         /* pthread test function */
9302         pthread_t t;
9303         int status;
9304 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9305         /* This system (e.g. AIX) defaults detached; must override */
9306         pthread_attr_t attr;
9307
9308         status = pthread_attr_init(&attr);
9309         if( status ) exit( status );
9310
9311         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9312         if( status ) exit( status );
9313
9314 #define ATTR    &attr
9315 #else
9316 #if HAVE_PTHREADS_D4
9317 #define ATTR    pthread_attr_default
9318 #else
9319 #define ATTR    NULL
9320 #endif
9321 #endif
9322         /* make sure pthread_create() isn't just a stub */
9323         status = pthread_create(&t, ATTR, task, NULL);
9324         if( status ) exit( status );
9325
9326         /* make sure pthread_detach() isn't just a stub */
9327 #if HAVE_PTHREADS_D4
9328         status = pthread_detach( &t );
9329 #else
9330         status = pthread_detach( t );
9331 #endif
9332
9333 #ifdef HAVE_LINUX_THREADS
9334         pthread_kill_other_threads_np();
9335 #endif
9336
9337         exit( status );
9338
9339 }
9340
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9343 then
9344   ol_cv_pthread_lpthreads_lmach_lexc=yes
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -fr conftest*
9349   ol_cv_pthread_lpthreads_lmach_lexc=no
9350 fi
9351 rm -fr conftest*
9352 fi
9353
9354
9355                 # restore the LIBS
9356                 LIBS="$ol_LIBS"
9357         
9358 fi
9359
9360 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
9361
9362         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
9363                 ol_link_pthreads="-lpthreads -lmach -lexc"
9364                 ol_link_threads=posix
9365         fi
9366 fi
9367
9368                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
9369 if test "$ol_link_threads" = no ; then
9370         # try -lpthreads -lexc
9371         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
9372 echo "configure:9373: checking for pthread link with -lpthreads -lexc" >&5
9373 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
9374   echo $ac_n "(cached) $ac_c" 1>&6
9375 else
9376   
9377                 # save the flags
9378                 ol_LIBS="$LIBS"
9379                 LIBS="-lpthreads -lexc $LIBS"
9380
9381                 if test "$cross_compiling" = yes; then
9382   cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385 /* pthread test headers */
9386 #include <pthread.h>
9387 #ifndef NULL
9388 #define NULL (void*)0
9389 #endif
9390
9391 static void *task(p)
9392         void *p;
9393 {
9394         return (void *) (p == NULL);
9395 }
9396
9397 int main() {
9398
9399         /* pthread test function */
9400         pthread_t t;
9401         int status;
9402 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9403         /* This system (e.g. AIX) defaults detached; must override */
9404         pthread_attr_t attr;
9405
9406         status = pthread_attr_init(&attr);
9407         if( status ) exit( status );
9408
9409         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9410         if( status ) exit( status );
9411
9412 #define ATTR    &attr
9413 #else
9414 #if HAVE_PTHREADS_D4
9415 #define ATTR    pthread_attr_default
9416 #else
9417 #define ATTR    NULL
9418 #endif
9419 #endif
9420         /* make sure pthread_create() isn't just a stub */
9421         status = pthread_create(&t, ATTR, task, NULL);
9422         if( status ) exit( status );
9423
9424         /* make sure pthread_detach() isn't just a stub */
9425 #if HAVE_PTHREADS_D4
9426         status = pthread_detach( &t );
9427 #else
9428         status = pthread_detach( t );
9429 #endif
9430
9431 #ifdef HAVE_LINUX_THREADS
9432         pthread_kill_other_threads_np();
9433 #endif
9434
9435         exit( status );
9436
9437 ; return 0; }
9438 EOF
9439 if { (eval echo configure:9440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9440   rm -rf conftest*
9441   ol_cv_pthread_lpthreads_lexc=yes
9442 else
9443   echo "configure: failed program was:" >&5
9444   cat conftest.$ac_ext >&5
9445   rm -rf conftest*
9446   ol_cv_pthread_lpthreads_lexc=no
9447 fi
9448 rm -f conftest*
9449 else
9450   cat > conftest.$ac_ext <<EOF
9451 #line 9452 "configure"
9452 #include "confdefs.h"
9453 /* pthread test headers */
9454 #include <pthread.h>
9455 #ifndef NULL
9456 #define NULL (void*)0
9457 #endif
9458
9459 static void *task(p)
9460         void *p;
9461 {
9462         return (void *) (p == NULL);
9463 }
9464
9465
9466 int main(argc, argv)
9467         int argc;
9468         char **argv;
9469 {
9470
9471         /* pthread test function */
9472         pthread_t t;
9473         int status;
9474 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9475         /* This system (e.g. AIX) defaults detached; must override */
9476         pthread_attr_t attr;
9477
9478         status = pthread_attr_init(&attr);
9479         if( status ) exit( status );
9480
9481         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9482         if( status ) exit( status );
9483
9484 #define ATTR    &attr
9485 #else
9486 #if HAVE_PTHREADS_D4
9487 #define ATTR    pthread_attr_default
9488 #else
9489 #define ATTR    NULL
9490 #endif
9491 #endif
9492         /* make sure pthread_create() isn't just a stub */
9493         status = pthread_create(&t, ATTR, task, NULL);
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 \"`echo '$''{'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 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9574         /* This system (e.g. AIX) defaults detached; must override */
9575         pthread_attr_t attr;
9576
9577         status = pthread_attr_init(&attr);
9578         if( status ) exit( status );
9579
9580         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9581         if( status ) exit( status );
9582
9583 #define ATTR    &attr
9584 #else
9585 #if HAVE_PTHREADS_D4
9586 #define ATTR    pthread_attr_default
9587 #else
9588 #define ATTR    NULL
9589 #endif
9590 #endif
9591         /* make sure pthread_create() isn't just a stub */
9592         status = pthread_create(&t, ATTR, task, NULL);
9593         if( status ) exit( status );
9594
9595         /* make sure pthread_detach() isn't just a stub */
9596 #if HAVE_PTHREADS_D4
9597         status = pthread_detach( &t );
9598 #else
9599         status = pthread_detach( t );
9600 #endif
9601
9602 #ifdef HAVE_LINUX_THREADS
9603         pthread_kill_other_threads_np();
9604 #endif
9605
9606         exit( status );
9607
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9611   rm -rf conftest*
9612   ol_cv_pthread_lib_lpthreads=yes
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   ol_cv_pthread_lib_lpthreads=no
9618 fi
9619 rm -f conftest*
9620 else
9621   cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 /* pthread test headers */
9625 #include <pthread.h>
9626 #ifndef NULL
9627 #define NULL (void*)0
9628 #endif
9629
9630 static void *task(p)
9631         void *p;
9632 {
9633         return (void *) (p == NULL);
9634 }
9635
9636
9637 int main(argc, argv)
9638         int argc;
9639         char **argv;
9640 {
9641
9642         /* pthread test function */
9643         pthread_t t;
9644         int status;
9645 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
9646         /* This system (e.g. AIX) defaults detached; must override */
9647         pthread_attr_t attr;
9648
9649         status = pthread_attr_init(&attr);
9650         if( status ) exit( status );
9651
9652         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
9653         if( status ) exit( status );
9654
9655 #define ATTR    &attr
9656 #else
9657 #if HAVE_PTHREADS_D4
9658 #define ATTR    pthread_attr_default
9659 #else
9660 #define ATTR    NULL
9661 #endif
9662 #endif
9663         /* make sure pthread_create() isn't just a stub */
9664         status = pthread_create(&t, ATTR, task, NULL);
9665         if( status ) exit( status );
9666
9667         /* make sure pthread_detach() isn't just a stub */
9668 #if HAVE_PTHREADS_D4
9669         status = pthread_detach( &t );
9670 #else
9671         status = pthread_detach( t );
9672 #endif
9673
9674 #ifdef HAVE_LINUX_THREADS
9675         pthread_kill_other_threads_np();
9676 #endif
9677
9678         exit( status );
9679
9680 }
9681
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9684 then
9685   ol_cv_pthread_lib_lpthreads=yes
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -fr conftest*
9690   ol_cv_pthread_lib_lpthreads=no
9691 fi
9692 rm -fr conftest*
9693 fi
9694
9695
9696                 # restore the LIBS
9697                 LIBS="$ol_LIBS"
9698         
9699 fi
9700
9701 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
9702
9703         if test $ol_cv_pthread_lib_lpthreads = yes ; then
9704                 ol_link_pthreads="-lpthreads"
9705                 ol_link_threads=posix
9706         fi
9707 fi
9708
9709
9710                 if test $ol_link_threads != no ; then
9711                         cat >> confdefs.h <<\EOF
9712 #define HAVE_PTHREADS 1
9713 EOF
9714
9715
9716                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
9717
9718                                                 save_CPPFLAGS="$CPPFLAGS"
9719                         save_LIBS="$LIBS"
9720                         LIBS="$LTHREAD_LIBS $LIBS"
9721
9722                                                                                                 for ac_func in sched_yield pthread_yield
9723 do
9724 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9725 echo "configure:9726: checking for $ac_func" >&5
9726 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9727   echo $ac_n "(cached) $ac_c" 1>&6
9728 else
9729   cat > conftest.$ac_ext <<EOF
9730 #line 9731 "configure"
9731 #include "confdefs.h"
9732 /* System header to define __stub macros and hopefully few prototypes,
9733     which can conflict with char $ac_func(); below.  */
9734 #include <assert.h>
9735 /* Override any gcc2 internal prototype to avoid an error.  */
9736 /* We use char because int might match the return type of a gcc2
9737     builtin and then its argument prototype would still apply.  */
9738 char $ac_func();
9739
9740 int main() {
9741
9742 /* The GNU C library defines this for functions which it implements
9743     to always fail with ENOSYS.  Some functions are actually named
9744     something starting with __ and the normal name is an alias.  */
9745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9746 choke me
9747 #else
9748 $ac_func();
9749 #endif
9750
9751 ; return 0; }
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9754   rm -rf conftest*
9755   eval "ac_cv_func_$ac_func=yes"
9756 else
9757   echo "configure: failed program was:" >&5
9758   cat conftest.$ac_ext >&5
9759   rm -rf conftest*
9760   eval "ac_cv_func_$ac_func=no"
9761 fi
9762 rm -f conftest*
9763 fi
9764
9765 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9766   echo "$ac_t""yes" 1>&6
9767     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9768   cat >> confdefs.h <<EOF
9769 #define $ac_tr_func 1
9770 EOF
9771  
9772 else
9773   echo "$ac_t""no" 1>&6
9774 fi
9775 done
9776
9777
9778                         if test $ac_cv_func_sched_yield = no -a \
9779                                 $ac_cv_func_pthread_yield = no ; then
9780                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
9781 echo "configure:9782: checking for sched_yield in -lrt" >&5
9782 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
9783 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   ac_save_LIBS="$LIBS"
9787 LIBS="-lrt  $LIBS"
9788 cat > conftest.$ac_ext <<EOF
9789 #line 9790 "configure"
9790 #include "confdefs.h"
9791 /* Override any gcc2 internal prototype to avoid an error.  */
9792 /* We use char because int might match the return type of a gcc2
9793     builtin and then its argument prototype would still apply.  */
9794 char sched_yield();
9795
9796 int main() {
9797 sched_yield()
9798 ; return 0; }
9799 EOF
9800 if { (eval echo configure:9801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9801   rm -rf conftest*
9802   eval "ac_cv_lib_$ac_lib_var=yes"
9803 else
9804   echo "configure: failed program was:" >&5
9805   cat conftest.$ac_ext >&5
9806   rm -rf conftest*
9807   eval "ac_cv_lib_$ac_lib_var=no"
9808 fi
9809 rm -f conftest*
9810 LIBS="$ac_save_LIBS"
9811
9812 fi
9813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9814   echo "$ac_t""yes" 1>&6
9815   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
9816                                         cat >> confdefs.h <<\EOF
9817 #define HAVE_SCHED_YIELD 1
9818 EOF
9819
9820                                         ac_cv_func_sched_yield=yes
9821 else
9822   echo "$ac_t""no" 1>&6
9823 ac_cv_func_sched_yield=no
9824 fi
9825
9826                         fi
9827                         if test $ac_cv_func_sched_yield = no -a \
9828                                 $ac_cv_func_pthread_yield = no ; then
9829                                                                                                 for ac_func in thr_yield
9830 do
9831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9832 echo "configure:9833: checking for $ac_func" >&5
9833 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9834   echo $ac_n "(cached) $ac_c" 1>&6
9835 else
9836   cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839 /* System header to define __stub macros and hopefully few prototypes,
9840     which can conflict with char $ac_func(); below.  */
9841 #include <assert.h>
9842 /* Override any gcc2 internal prototype to avoid an error.  */
9843 /* We use char because int might match the return type of a gcc2
9844     builtin and then its argument prototype would still apply.  */
9845 char $ac_func();
9846
9847 int main() {
9848
9849 /* The GNU C library defines this for functions which it implements
9850     to always fail with ENOSYS.  Some functions are actually named
9851     something starting with __ and the normal name is an alias.  */
9852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9853 choke me
9854 #else
9855 $ac_func();
9856 #endif
9857
9858 ; return 0; }
9859 EOF
9860 if { (eval echo configure:9861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9861   rm -rf conftest*
9862   eval "ac_cv_func_$ac_func=yes"
9863 else
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -rf conftest*
9867   eval "ac_cv_func_$ac_func=no"
9868 fi
9869 rm -f conftest*
9870 fi
9871
9872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9873   echo "$ac_t""yes" 1>&6
9874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9875   cat >> confdefs.h <<EOF
9876 #define $ac_tr_func 1
9877 EOF
9878  
9879 else
9880   echo "$ac_t""no" 1>&6
9881 fi
9882 done
9883
9884                         fi
9885                         if test $ac_cv_func_sched_yield = no -a \
9886                                 $ac_cv_func_pthread_yield = no -a \
9887                                 "$ac_cv_func_thr_yield" = no ; then
9888                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9889                         fi
9890
9891                                                 for ac_func in pthread_kill pthread_rwlock_destroy
9892 do
9893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9894 echo "configure:9895: checking for $ac_func" >&5
9895 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9896   echo $ac_n "(cached) $ac_c" 1>&6
9897 else
9898   cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 /* System header to define __stub macros and hopefully few prototypes,
9902     which can conflict with char $ac_func(); below.  */
9903 #include <assert.h>
9904 /* Override any gcc2 internal prototype to avoid an error.  */
9905 /* We use char because int might match the return type of a gcc2
9906     builtin and then its argument prototype would still apply.  */
9907 char $ac_func();
9908
9909 int main() {
9910
9911 /* The GNU C library defines this for functions which it implements
9912     to always fail with ENOSYS.  Some functions are actually named
9913     something starting with __ and the normal name is an alias.  */
9914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9915 choke me
9916 #else
9917 $ac_func();
9918 #endif
9919
9920 ; return 0; }
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9923   rm -rf conftest*
9924   eval "ac_cv_func_$ac_func=yes"
9925 else
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -rf conftest*
9929   eval "ac_cv_func_$ac_func=no"
9930 fi
9931 rm -f conftest*
9932 fi
9933
9934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9935   echo "$ac_t""yes" 1>&6
9936     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9937   cat >> confdefs.h <<EOF
9938 #define $ac_tr_func 1
9939 EOF
9940  
9941 else
9942   echo "$ac_t""no" 1>&6
9943 fi
9944 done
9945
9946
9947                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9948 echo "configure:9949: checking for pthread_detach with <pthread.h>" >&5
9949 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   
9953                                                                 cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956
9957 #include <pthread.h>
9958 #ifndef NULL
9959 #define NULL (void*)0
9960 #endif
9961
9962 int main() {
9963 pthread_detach(NULL);
9964 ; return 0; }
9965 EOF
9966 if { (eval echo configure:9967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9967   rm -rf conftest*
9968   ol_cv_func_pthread_detach=yes
9969 else
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   ol_cv_func_pthread_detach=no
9974 fi
9975 rm -f conftest*
9976                         
9977 fi
9978
9979 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9980
9981                         if test $ol_cv_func_pthread_detach = no ; then
9982                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9983                         fi
9984
9985                         cat >> confdefs.h <<\EOF
9986 #define HAVE_PTHREAD_DETACH 1
9987 EOF
9988
9989
9990                                                 for ac_func in \
9991                                 pthread_setconcurrency \
9992                                 pthread_getconcurrency \
9993                                 thr_setconcurrency \
9994                                 thr_getconcurrency \
9995                         
9996 do
9997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9998 echo "configure:9999: checking for $ac_func" >&5
9999 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10000   echo $ac_n "(cached) $ac_c" 1>&6
10001 else
10002   cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 /* System header to define __stub macros and hopefully few prototypes,
10006     which can conflict with char $ac_func(); below.  */
10007 #include <assert.h>
10008 /* Override any gcc2 internal prototype to avoid an error.  */
10009 /* We use char because int might match the return type of a gcc2
10010     builtin and then its argument prototype would still apply.  */
10011 char $ac_func();
10012
10013 int main() {
10014
10015 /* The GNU C library defines this for functions which it implements
10016     to always fail with ENOSYS.  Some functions are actually named
10017     something starting with __ and the normal name is an alias.  */
10018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10019 choke me
10020 #else
10021 $ac_func();
10022 #endif
10023
10024 ; return 0; }
10025 EOF
10026 if { (eval echo configure:10027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10027   rm -rf conftest*
10028   eval "ac_cv_func_$ac_func=yes"
10029 else
10030   echo "configure: failed program was:" >&5
10031   cat conftest.$ac_ext >&5
10032   rm -rf conftest*
10033   eval "ac_cv_func_$ac_func=no"
10034 fi
10035 rm -f conftest*
10036 fi
10037
10038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10039   echo "$ac_t""yes" 1>&6
10040     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10041   cat >> confdefs.h <<EOF
10042 #define $ac_tr_func 1
10043 EOF
10044  
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048 done
10049
10050
10051                         
10052         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
10053 echo "configure:10054: checking for pthread_kill_other_threads_np" >&5
10054 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* System header to define __stub macros and hopefully few prototypes,
10061     which can conflict with char pthread_kill_other_threads_np(); below.  */
10062 #include <assert.h>
10063 /* Override any gcc2 internal prototype to avoid an error.  */
10064 /* We use char because int might match the return type of a gcc2
10065     builtin and then its argument prototype would still apply.  */
10066 char pthread_kill_other_threads_np();
10067
10068 int main() {
10069
10070 /* The GNU C library defines this for functions which it implements
10071     to always fail with ENOSYS.  Some functions are actually named
10072     something starting with __ and the normal name is an alias.  */
10073 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
10074 choke me
10075 #else
10076 pthread_kill_other_threads_np();
10077 #endif
10078
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10082   rm -rf conftest*
10083   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   eval "ac_cv_func_pthread_kill_other_threads_np=no"
10089 fi
10090 rm -f conftest*
10091 fi
10092
10093 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
10094   echo "$ac_t""yes" 1>&6
10095   :
10096 else
10097   echo "$ac_t""no" 1>&6
10098 fi
10099
10100         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
10101 echo "configure:10102: checking for LinuxThreads implementation" >&5
10102 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
10103   echo $ac_n "(cached) $ac_c" 1>&6
10104 else
10105   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
10106 fi
10107
10108 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
10109
10110                         
10111         
10112         
10113         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
10114 echo "configure:10115: checking for LinuxThreads consistency" >&5
10115 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
10116   echo $ac_n "(cached) $ac_c" 1>&6
10117 else
10118   
10119                 if test $ol_cv_header_linux_threads = yes -a \
10120                         $ol_cv_sys_linux_threads = yes; then
10121                         ol_cv_linux_threads=yes
10122                 elif test $ol_cv_header_linux_threads = no -a \
10123                         $ol_cv_sys_linux_threads = no; then
10124                         ol_cv_linux_threads=no
10125                 else
10126                         ol_cv_linux_threads=error
10127                 fi
10128         
10129 fi
10130
10131 echo "$ac_t""$ol_cv_linux_threads" 1>&6
10132
10133
10134                         if test $ol_cv_linux_threads = error; then
10135                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
10136                         fi
10137
10138                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
10139 echo "configure:10140: checking if pthread_create() works" >&5
10140 if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
10141   echo $ac_n "(cached) $ac_c" 1>&6
10142 else
10143   
10144                         if test "$cross_compiling" = yes; then
10145                                 ol_cv_pthread_create_works=yes
10146 else
10147   cat > conftest.$ac_ext <<EOF
10148 #line 10149 "configure"
10149 #include "confdefs.h"
10150 /* pthread test headers */
10151 #include <pthread.h>
10152 #ifndef NULL
10153 #define NULL (void*)0
10154 #endif
10155
10156 static void *task(p)
10157         void *p;
10158 {
10159         return (void *) (p == NULL);
10160 }
10161
10162
10163 int main(argc, argv)
10164         int argc;
10165         char **argv;
10166 {
10167
10168         /* pthread test function */
10169         pthread_t t;
10170         int status;
10171 #if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
10172         /* This system (e.g. AIX) defaults detached; must override */
10173         pthread_attr_t attr;
10174
10175         status = pthread_attr_init(&attr);
10176         if( status ) exit( status );
10177
10178         status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
10179         if( status ) exit( status );
10180
10181 #define ATTR    &attr
10182 #else
10183 #if HAVE_PTHREADS_D4
10184 #define ATTR    pthread_attr_default
10185 #else
10186 #define ATTR    NULL
10187 #endif
10188 #endif
10189         /* make sure pthread_create() isn't just a stub */
10190         status = pthread_create(&t, ATTR, task, NULL);
10191         if( status ) exit( status );
10192
10193         /* make sure pthread_detach() isn't just a stub */
10194 #if HAVE_PTHREADS_D4
10195         status = pthread_detach( &t );
10196 #else
10197         status = pthread_detach( t );
10198 #endif
10199
10200 #ifdef HAVE_LINUX_THREADS
10201         pthread_kill_other_threads_np();
10202 #endif
10203
10204         exit( status );
10205
10206 }
10207
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10210 then
10211   ol_cv_pthread_create_works=yes
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -fr conftest*
10216   ol_cv_pthread_create_works=no
10217 fi
10218 rm -fr conftest*
10219 fi
10220
10221 fi
10222
10223 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
10224
10225                         if test $ol_cv_pthread_create_works = no ; then
10226                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
10227                         fi
10228
10229                                                 if test $ol_with_yielding_select = auto ; then
10230                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
10231 echo "configure:10232: checking if select yields when using pthreads" >&5
10232 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
10233   echo $ac_n "(cached) $ac_c" 1>&6
10234 else
10235   
10236                                 if test "$cross_compiling" = yes; then
10237   ol_cv_pthread_select_yields=cross
10238 else
10239   cat > conftest.$ac_ext <<EOF
10240 #line 10241 "configure"
10241 #include "confdefs.h"
10242
10243 #include <sys/types.h>
10244 #include <sys/time.h>
10245 #include <unistd.h>
10246 #include <pthread.h>
10247 #ifndef NULL
10248 #define NULL (void*) 0
10249 #endif
10250
10251 static int fildes[2];
10252
10253 static void *task(p)
10254         void *p;
10255 {
10256         int i;
10257         struct timeval tv;
10258
10259         fd_set rfds;
10260
10261         tv.tv_sec=10;
10262         tv.tv_usec=0;
10263
10264         FD_ZERO(&rfds);
10265         FD_SET(fildes[0], &rfds);
10266
10267         /* we're not interested in any fds */
10268         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
10269
10270         if(i < 0) {
10271                 perror("select");
10272                 exit(10);
10273         }
10274
10275         exit(0); /* if we exit here, the select blocked the whole process */
10276 }
10277
10278 int main(argc, argv)
10279         int argc;
10280         char **argv;
10281 {
10282         pthread_t t;
10283
10284         /* create a pipe to select */
10285         if(pipe(&fildes[0])) {
10286                 perror("select");
10287                 exit(1);
10288         }
10289
10290 #ifdef HAVE_PTHREAD_SETCONCURRENCY
10291         (void) pthread_setconcurrency(2);
10292 #else
10293 #ifdef HAVE_THR_SETCONCURRENCY
10294         /* Set Solaris LWP concurrency to 2 */
10295         thr_setconcurrency(2);
10296 #endif
10297 #endif
10298
10299 #if HAVE_PTHREADS_D4
10300         pthread_create(&t, pthread_attr_default, task, NULL);
10301 #else
10302         pthread_create(&t, NULL, task, NULL);
10303 #endif
10304
10305 #if HAVE_SCHED_YIELD
10306         sched_yield();  /* make sure task runs first */
10307 #else
10308 #ifdef HAVE_PTHREAD_YIELD
10309         pthread_yield();        /* make sure task runs first */
10310 #endif
10311 #endif
10312
10313         exit(2);
10314 }
10315 EOF
10316 if { (eval echo configure:10317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10317 then
10318   ol_cv_pthread_select_yields=no
10319 else
10320   echo "configure: failed program was:" >&5
10321   cat conftest.$ac_ext >&5
10322   rm -fr conftest*
10323   ol_cv_pthread_select_yields=yes
10324 fi
10325 rm -fr conftest*
10326 fi
10327
10328 fi
10329
10330 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
10331
10332                                 if test $ol_cv_pthread_select_yields = cross ; then
10333                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
10334                                 fi
10335
10336                                 if test $ol_cv_pthread_select_yields = yes ; then
10337                                         ol_with_yielding_select=yes
10338                                 fi
10339                         fi
10340
10341                                                 CPPFLAGS="$save_CPPFLAGS"
10342                         LIBS="$save_LIBS"
10343                 else
10344                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
10345                 fi
10346         fi
10347
10348         if test $ol_with_threads = posix ; then
10349                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
10350         fi
10351 fi
10352
10353 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10354         -o $ol_with_threads = mach ; then
10355
10356                 for ac_hdr in mach/cthreads.h
10357 do
10358 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10359 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10360 echo "configure:10361: checking for $ac_hdr" >&5
10361 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10362   echo $ac_n "(cached) $ac_c" 1>&6
10363 else
10364   cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367 #include <$ac_hdr>
10368 EOF
10369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10370 { (eval echo configure:10371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10372 if test -z "$ac_err"; then
10373   rm -rf conftest*
10374   eval "ac_cv_header_$ac_safe=yes"
10375 else
10376   echo "$ac_err" >&5
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -rf conftest*
10380   eval "ac_cv_header_$ac_safe=no"
10381 fi
10382 rm -f conftest*
10383 fi
10384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10385   echo "$ac_t""yes" 1>&6
10386     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10387   cat >> confdefs.h <<EOF
10388 #define $ac_tr_hdr 1
10389 EOF
10390  
10391 else
10392   echo "$ac_t""no" 1>&6
10393 fi
10394 done
10395
10396         if test $ac_cv_header_mach_cthreads_h = yes ; then
10397                 ol_with_threads=found
10398
10399                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
10400 echo "configure:10401: checking for cthread_fork" >&5
10401 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
10402   echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404   cat > conftest.$ac_ext <<EOF
10405 #line 10406 "configure"
10406 #include "confdefs.h"
10407 /* System header to define __stub macros and hopefully few prototypes,
10408     which can conflict with char cthread_fork(); below.  */
10409 #include <assert.h>
10410 /* Override any gcc2 internal prototype to avoid an error.  */
10411 /* We use char because int might match the return type of a gcc2
10412     builtin and then its argument prototype would still apply.  */
10413 char cthread_fork();
10414
10415 int main() {
10416
10417 /* The GNU C library defines this for functions which it implements
10418     to always fail with ENOSYS.  Some functions are actually named
10419     something starting with __ and the normal name is an alias.  */
10420 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
10421 choke me
10422 #else
10423 cthread_fork();
10424 #endif
10425
10426 ; return 0; }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10429   rm -rf conftest*
10430   eval "ac_cv_func_cthread_fork=yes"
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   eval "ac_cv_func_cthread_fork=no"
10436 fi
10437 rm -f conftest*
10438 fi
10439
10440 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
10441   echo "$ac_t""yes" 1>&6
10442   ol_link_threads=yes
10443 else
10444   echo "$ac_t""no" 1>&6
10445 fi
10446
10447
10448                 if test $ol_link_threads = no ; then
10449                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
10450 echo "configure:10451: checking for cthread_fork with -all_load" >&5
10451 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
10452   echo $ac_n "(cached) $ac_c" 1>&6
10453 else
10454   
10455                                                                 save_LIBS="$LIBS"
10456                                 LIBS="-all_load $LIBS"
10457                                 cat > conftest.$ac_ext <<EOF
10458 #line 10459 "configure"
10459 #include "confdefs.h"
10460 #include <mach/cthreads.h>
10461 int main() {
10462
10463                                         cthread_fork((void *)0, (void *)0);
10464                                         
10465 ; return 0; }
10466 EOF
10467 if { (eval echo configure:10468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10468   rm -rf conftest*
10469   ol_cv_cthread_all_load=yes
10470 else
10471   echo "configure: failed program was:" >&5
10472   cat conftest.$ac_ext >&5
10473   rm -rf conftest*
10474   ol_cv_cthread_all_load=no
10475 fi
10476 rm -f conftest*
10477                                                                 LIBS="$save_LIBS"
10478                         
10479 fi
10480
10481 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
10482
10483                         if test $ol_cv_cthread_all_load = yes ; then
10484                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
10485                                 ol_link_threads=mach
10486                         fi
10487                 fi
10488
10489                 if test $ol_link_threads != no ; then
10490                         : check for cthread specific functionality here
10491                         cat >> confdefs.h <<\EOF
10492 #define HAVE_MACH_CTHREADS 1
10493 EOF
10494
10495                 else
10496                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
10497                 fi
10498         fi
10499
10500         if test $ol_with_threads = mach ; then
10501                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
10502         fi
10503 fi
10504
10505 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10506         -o $ol_with_threads = pth ; then
10507
10508         for ac_hdr in pth.h
10509 do
10510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10512 echo "configure:10513: checking for $ac_hdr" >&5
10513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10514   echo $ac_n "(cached) $ac_c" 1>&6
10515 else
10516   cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 #include <$ac_hdr>
10520 EOF
10521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10522 { (eval echo configure:10523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10524 if test -z "$ac_err"; then
10525   rm -rf conftest*
10526   eval "ac_cv_header_$ac_safe=yes"
10527 else
10528   echo "$ac_err" >&5
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   eval "ac_cv_header_$ac_safe=no"
10533 fi
10534 rm -f conftest*
10535 fi
10536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10537   echo "$ac_t""yes" 1>&6
10538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10539   cat >> confdefs.h <<EOF
10540 #define $ac_tr_hdr 1
10541 EOF
10542  
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546 done
10547
10548
10549         if test $ac_cv_header_pth_h = yes ; then
10550                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
10551 echo "configure:10552: checking for pth_version in -lpth" >&5
10552 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-%__p_%'`
10553 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10554   echo $ac_n "(cached) $ac_c" 1>&6
10555 else
10556   ac_save_LIBS="$LIBS"
10557 LIBS="-lpth  $LIBS"
10558 cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 /* Override any gcc2 internal prototype to avoid an error.  */
10562 /* We use char because int might match the return type of a gcc2
10563     builtin and then its argument prototype would still apply.  */
10564 char pth_version();
10565
10566 int main() {
10567 pth_version()
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_lib_$ac_lib_var=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_lib_$ac_lib_var=no"
10578 fi
10579 rm -f conftest*
10580 LIBS="$ac_save_LIBS"
10581
10582 fi
10583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585   have_pth=yes
10586 else
10587   echo "$ac_t""no" 1>&6
10588 have_pth=no
10589 fi
10590
10591
10592                 if test $have_pth = yes ; then
10593                         cat >> confdefs.h <<\EOF
10594 #define HAVE_GNU_PTH 1
10595 EOF
10596
10597                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
10598                         ol_link_threads=pth
10599
10600                         if test $ol_with_yielding_select = auto ; then
10601                                 ol_with_yielding_select=yes
10602                         fi
10603                 fi
10604         fi
10605 fi
10606
10607 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10608         -o $ol_with_threads = lwp ; then
10609
10610                 for ac_hdr in thread.h synch.h
10611 do
10612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10614 echo "configure:10615: checking for $ac_hdr" >&5
10615 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10616   echo $ac_n "(cached) $ac_c" 1>&6
10617 else
10618   cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621 #include <$ac_hdr>
10622 EOF
10623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10624 { (eval echo configure:10625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10626 if test -z "$ac_err"; then
10627   rm -rf conftest*
10628   eval "ac_cv_header_$ac_safe=yes"
10629 else
10630   echo "$ac_err" >&5
10631   echo "configure: failed program was:" >&5
10632   cat conftest.$ac_ext >&5
10633   rm -rf conftest*
10634   eval "ac_cv_header_$ac_safe=no"
10635 fi
10636 rm -f conftest*
10637 fi
10638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10639   echo "$ac_t""yes" 1>&6
10640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10641   cat >> confdefs.h <<EOF
10642 #define $ac_tr_hdr 1
10643 EOF
10644  
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648 done
10649
10650         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
10651                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
10652 echo "configure:10653: checking for thr_create in -lthread" >&5
10653 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
10654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   ac_save_LIBS="$LIBS"
10658 LIBS="-lthread  $LIBS"
10659 cat > conftest.$ac_ext <<EOF
10660 #line 10661 "configure"
10661 #include "confdefs.h"
10662 /* Override any gcc2 internal prototype to avoid an error.  */
10663 /* We use char because int might match the return type of a gcc2
10664     builtin and then its argument prototype would still apply.  */
10665 char thr_create();
10666
10667 int main() {
10668 thr_create()
10669 ; return 0; }
10670 EOF
10671 if { (eval echo configure:10672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10672   rm -rf conftest*
10673   eval "ac_cv_lib_$ac_lib_var=yes"
10674 else
10675   echo "configure: failed program was:" >&5
10676   cat conftest.$ac_ext >&5
10677   rm -rf conftest*
10678   eval "ac_cv_lib_$ac_lib_var=no"
10679 fi
10680 rm -f conftest*
10681 LIBS="$ac_save_LIBS"
10682
10683 fi
10684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10685   echo "$ac_t""yes" 1>&6
10686   have_thr=yes
10687 else
10688   echo "$ac_t""no" 1>&6
10689 have_thr=no
10690 fi
10691
10692
10693                 if test $have_thr = yes ; then
10694                         cat >> confdefs.h <<\EOF
10695 #define HAVE_THR 1
10696 EOF
10697
10698                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
10699                         ol_link_threads=thr
10700
10701                         if test $ol_with_yielding_select = auto ; then
10702                                 ol_with_yielding_select=yes
10703                         fi
10704
10705                                                 for ac_func in \
10706                                 thr_setconcurrency \
10707                                 thr_getconcurrency \
10708                         
10709 do
10710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10711 echo "configure:10712: checking for $ac_func" >&5
10712 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   cat > conftest.$ac_ext <<EOF
10716 #line 10717 "configure"
10717 #include "confdefs.h"
10718 /* System header to define __stub macros and hopefully few prototypes,
10719     which can conflict with char $ac_func(); below.  */
10720 #include <assert.h>
10721 /* Override any gcc2 internal prototype to avoid an error.  */
10722 /* We use char because int might match the return type of a gcc2
10723     builtin and then its argument prototype would still apply.  */
10724 char $ac_func();
10725
10726 int main() {
10727
10728 /* The GNU C library defines this for functions which it implements
10729     to always fail with ENOSYS.  Some functions are actually named
10730     something starting with __ and the normal name is an alias.  */
10731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10732 choke me
10733 #else
10734 $ac_func();
10735 #endif
10736
10737 ; return 0; }
10738 EOF
10739 if { (eval echo configure:10740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10740   rm -rf conftest*
10741   eval "ac_cv_func_$ac_func=yes"
10742 else
10743   echo "configure: failed program was:" >&5
10744   cat conftest.$ac_ext >&5
10745   rm -rf conftest*
10746   eval "ac_cv_func_$ac_func=no"
10747 fi
10748 rm -f conftest*
10749 fi
10750
10751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10752   echo "$ac_t""yes" 1>&6
10753     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10754   cat >> confdefs.h <<EOF
10755 #define $ac_tr_func 1
10756 EOF
10757  
10758 else
10759   echo "$ac_t""no" 1>&6
10760 fi
10761 done
10762
10763                 fi
10764         fi
10765
10766                 for ac_hdr in lwp/lwp.h
10767 do
10768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10770 echo "configure:10771: checking for $ac_hdr" >&5
10771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10772   echo $ac_n "(cached) $ac_c" 1>&6
10773 else
10774   cat > conftest.$ac_ext <<EOF
10775 #line 10776 "configure"
10776 #include "confdefs.h"
10777 #include <$ac_hdr>
10778 EOF
10779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10780 { (eval echo configure:10781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10782 if test -z "$ac_err"; then
10783   rm -rf conftest*
10784   eval "ac_cv_header_$ac_safe=yes"
10785 else
10786   echo "$ac_err" >&5
10787   echo "configure: failed program was:" >&5
10788   cat conftest.$ac_ext >&5
10789   rm -rf conftest*
10790   eval "ac_cv_header_$ac_safe=no"
10791 fi
10792 rm -f conftest*
10793 fi
10794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10795   echo "$ac_t""yes" 1>&6
10796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10797   cat >> confdefs.h <<EOF
10798 #define $ac_tr_hdr 1
10799 EOF
10800  
10801 else
10802   echo "$ac_t""no" 1>&6
10803 fi
10804 done
10805
10806         if test $ac_cv_header_lwp_lwp_h = yes ; then
10807                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
10808 echo "configure:10809: checking for lwp_create in -llwp" >&5
10809 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
10810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   ac_save_LIBS="$LIBS"
10814 LIBS="-llwp  $LIBS"
10815 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 /* Override any gcc2 internal prototype to avoid an error.  */
10819 /* We use char because int might match the return type of a gcc2
10820     builtin and then its argument prototype would still apply.  */
10821 char lwp_create();
10822
10823 int main() {
10824 lwp_create()
10825 ; return 0; }
10826 EOF
10827 if { (eval echo configure:10828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10828   rm -rf conftest*
10829   eval "ac_cv_lib_$ac_lib_var=yes"
10830 else
10831   echo "configure: failed program was:" >&5
10832   cat conftest.$ac_ext >&5
10833   rm -rf conftest*
10834   eval "ac_cv_lib_$ac_lib_var=no"
10835 fi
10836 rm -f conftest*
10837 LIBS="$ac_save_LIBS"
10838
10839 fi
10840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10841   echo "$ac_t""yes" 1>&6
10842   have_lwp=yes
10843 else
10844   echo "$ac_t""no" 1>&6
10845 have_lwp=no
10846 fi
10847
10848
10849                 if test $have_lwp = yes ; then
10850                         cat >> confdefs.h <<\EOF
10851 #define HAVE_LWP 1
10852 EOF
10853
10854                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10855                         ol_link_threads=lwp
10856
10857                         if test $ol_with_yielding_select = auto ; then
10858                                 ol_with_yielding_select=no
10859                         fi
10860                 fi
10861         fi
10862 fi
10863
10864 if test $ol_with_yielding_select = yes ; then
10865         cat >> confdefs.h <<\EOF
10866 #define HAVE_YIELDING_SELECT 1
10867 EOF
10868
10869 fi
10870
10871 if test $ol_with_threads = manual ; then
10872                 ol_link_threads=yes
10873
10874         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10875
10876         for ac_hdr in pthread.h sched.h
10877 do
10878 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10879 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10880 echo "configure:10881: checking for $ac_hdr" >&5
10881 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10882   echo $ac_n "(cached) $ac_c" 1>&6
10883 else
10884   cat > conftest.$ac_ext <<EOF
10885 #line 10886 "configure"
10886 #include "confdefs.h"
10887 #include <$ac_hdr>
10888 EOF
10889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10890 { (eval echo configure:10891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10892 if test -z "$ac_err"; then
10893   rm -rf conftest*
10894   eval "ac_cv_header_$ac_safe=yes"
10895 else
10896   echo "$ac_err" >&5
10897   echo "configure: failed program was:" >&5
10898   cat conftest.$ac_ext >&5
10899   rm -rf conftest*
10900   eval "ac_cv_header_$ac_safe=no"
10901 fi
10902 rm -f conftest*
10903 fi
10904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10905   echo "$ac_t""yes" 1>&6
10906     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10907   cat >> confdefs.h <<EOF
10908 #define $ac_tr_hdr 1
10909 EOF
10910  
10911 else
10912   echo "$ac_t""no" 1>&6
10913 fi
10914 done
10915
10916         for ac_func in sched_yield pthread_yield
10917 do
10918 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10919 echo "configure:10920: checking for $ac_func" >&5
10920 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10921   echo $ac_n "(cached) $ac_c" 1>&6
10922 else
10923   cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926 /* System header to define __stub macros and hopefully few prototypes,
10927     which can conflict with char $ac_func(); below.  */
10928 #include <assert.h>
10929 /* Override any gcc2 internal prototype to avoid an error.  */
10930 /* We use char because int might match the return type of a gcc2
10931     builtin and then its argument prototype would still apply.  */
10932 char $ac_func();
10933
10934 int main() {
10935
10936 /* The GNU C library defines this for functions which it implements
10937     to always fail with ENOSYS.  Some functions are actually named
10938     something starting with __ and the normal name is an alias.  */
10939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10940 choke me
10941 #else
10942 $ac_func();
10943 #endif
10944
10945 ; return 0; }
10946 EOF
10947 if { (eval echo configure:10948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10948   rm -rf conftest*
10949   eval "ac_cv_func_$ac_func=yes"
10950 else
10951   echo "configure: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   rm -rf conftest*
10954   eval "ac_cv_func_$ac_func=no"
10955 fi
10956 rm -f conftest*
10957 fi
10958
10959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10960   echo "$ac_t""yes" 1>&6
10961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10962   cat >> confdefs.h <<EOF
10963 #define $ac_tr_func 1
10964 EOF
10965  
10966 else
10967   echo "$ac_t""no" 1>&6
10968 fi
10969 done
10970
10971         
10972         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10973 echo "configure:10974: checking for LinuxThreads pthread.h" >&5
10974 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
10975   echo $ac_n "(cached) $ac_c" 1>&6
10976 else
10977   cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980 #include <pthread.h>
10981 EOF
10982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10983   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10984   rm -rf conftest*
10985   ol_cv_header_linux_threads=yes
10986 else
10987   rm -rf conftest*
10988   ol_cv_header_linux_threads=no
10989 fi
10990 rm -f conftest*
10991
10992                 
10993 fi
10994
10995 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10996         if test $ol_cv_header_linux_threads = yes; then
10997                 cat >> confdefs.h <<\EOF
10998 #define HAVE_LINUX_THREADS 1
10999 EOF
11000
11001         fi
11002
11003
11004         for ac_hdr in mach/cthreads.h
11005 do
11006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11008 echo "configure:11009: checking for $ac_hdr" >&5
11009 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11010   echo $ac_n "(cached) $ac_c" 1>&6
11011 else
11012   cat > conftest.$ac_ext <<EOF
11013 #line 11014 "configure"
11014 #include "confdefs.h"
11015 #include <$ac_hdr>
11016 EOF
11017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11018 { (eval echo configure:11019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11020 if test -z "$ac_err"; then
11021   rm -rf conftest*
11022   eval "ac_cv_header_$ac_safe=yes"
11023 else
11024   echo "$ac_err" >&5
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   eval "ac_cv_header_$ac_safe=no"
11029 fi
11030 rm -f conftest*
11031 fi
11032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11033   echo "$ac_t""yes" 1>&6
11034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11035   cat >> confdefs.h <<EOF
11036 #define $ac_tr_hdr 1
11037 EOF
11038  
11039 else
11040   echo "$ac_t""no" 1>&6
11041 fi
11042 done
11043
11044         for ac_hdr in lwp/lwp.h
11045 do
11046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11048 echo "configure:11049: checking for $ac_hdr" >&5
11049 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11050   echo $ac_n "(cached) $ac_c" 1>&6
11051 else
11052   cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055 #include <$ac_hdr>
11056 EOF
11057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11058 { (eval echo configure:11059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11060 if test -z "$ac_err"; then
11061   rm -rf conftest*
11062   eval "ac_cv_header_$ac_safe=yes"
11063 else
11064   echo "$ac_err" >&5
11065   echo "configure: failed program was:" >&5
11066   cat conftest.$ac_ext >&5
11067   rm -rf conftest*
11068   eval "ac_cv_header_$ac_safe=no"
11069 fi
11070 rm -f conftest*
11071 fi
11072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11075   cat >> confdefs.h <<EOF
11076 #define $ac_tr_hdr 1
11077 EOF
11078  
11079 else
11080   echo "$ac_t""no" 1>&6
11081 fi
11082 done
11083
11084         for ac_hdr in thread.h synch.h
11085 do
11086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11088 echo "configure:11089: checking for $ac_hdr" >&5
11089 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11090   echo $ac_n "(cached) $ac_c" 1>&6
11091 else
11092   cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095 #include <$ac_hdr>
11096 EOF
11097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11098 { (eval echo configure:11099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11100 if test -z "$ac_err"; then
11101   rm -rf conftest*
11102   eval "ac_cv_header_$ac_safe=yes"
11103 else
11104   echo "$ac_err" >&5
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=no"
11109 fi
11110 rm -f conftest*
11111 fi
11112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11113   echo "$ac_t""yes" 1>&6
11114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11115   cat >> confdefs.h <<EOF
11116 #define $ac_tr_hdr 1
11117 EOF
11118  
11119 else
11120   echo "$ac_t""no" 1>&6
11121 fi
11122 done
11123
11124 fi
11125
11126 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
11127                         cat >> confdefs.h <<\EOF
11128 #define REENTRANT 1
11129 EOF
11130
11131         cat >> confdefs.h <<\EOF
11132 #define _REENTRANT 1
11133 EOF
11134
11135         cat >> confdefs.h <<\EOF
11136 #define THREAD_SAFE 1
11137 EOF
11138
11139         cat >> confdefs.h <<\EOF
11140 #define _THREAD_SAFE 1
11141 EOF
11142
11143         cat >> confdefs.h <<\EOF
11144 #define THREADSAFE 1
11145 EOF
11146
11147         cat >> confdefs.h <<\EOF
11148 #define _THREADSAFE 1
11149 EOF
11150
11151         cat >> confdefs.h <<\EOF
11152 #define _SGI_MP_SOURCE 1
11153 EOF
11154
11155
11156                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
11157 echo "configure:11158: checking for thread specific errno" >&5
11158 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
11159   echo $ac_n "(cached) $ac_c" 1>&6
11160 else
11161   
11162                 cat > conftest.$ac_ext <<EOF
11163 #line 11164 "configure"
11164 #include "confdefs.h"
11165 #include <errno.h>
11166 int main() {
11167 errno = 0;
11168 ; return 0; }
11169 EOF
11170 if { (eval echo configure:11171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11171   rm -rf conftest*
11172   ol_cv_errno_thread_specific=yes
11173 else
11174   echo "configure: failed program was:" >&5
11175   cat conftest.$ac_ext >&5
11176   rm -rf conftest*
11177   ol_cv_errno_thread_specific=no
11178 fi
11179 rm -f conftest*
11180         
11181 fi
11182
11183 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
11184
11185                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
11186 echo "configure:11187: checking for thread specific h_errno" >&5
11187 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
11188   echo $ac_n "(cached) $ac_c" 1>&6
11189 else
11190   
11191                 cat > conftest.$ac_ext <<EOF
11192 #line 11193 "configure"
11193 #include "confdefs.h"
11194 #include <netdb.h>
11195 int main() {
11196 h_errno = 0;
11197 ; return 0; }
11198 EOF
11199 if { (eval echo configure:11200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11200   rm -rf conftest*
11201   ol_cv_h_errno_thread_specific=yes
11202 else
11203   echo "configure: failed program was:" >&5
11204   cat conftest.$ac_ext >&5
11205   rm -rf conftest*
11206   ol_cv_h_errno_thread_specific=no
11207 fi
11208 rm -f conftest*
11209         
11210 fi
11211
11212 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
11213
11214         if test $ol_cv_errno_thread_specific != yes \
11215                 -o $ol_cv_h_errno_thread_specific != yes ; then
11216                 LIBS="$LTHREAD_LIBS $LIBS"
11217                 LTHREAD_LIBS=""
11218         fi
11219
11220 fi  
11221
11222 if test $ol_link_threads = no ; then
11223         if test $ol_with_threads = yes ; then
11224                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
11225         fi
11226
11227         if test $ol_with_threads = auto ; then
11228                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
11229                 ol_with_threads=no
11230         fi
11231
11232         cat >> confdefs.h <<\EOF
11233 #define NO_THREADS 1
11234 EOF
11235
11236         LTHREAD_LIBS=""
11237 fi
11238
11239 if test $ol_link_threads != no ; then
11240         cat >> confdefs.h <<\EOF
11241 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
11242 EOF
11243
11244 fi
11245
11246 ol_link_ldbm=no 
11247
11248 if test $ol_with_ldbm_api = auto \
11249         -o $ol_with_ldbm_api = berkeley \
11250         -o $ol_with_ldbm_api = bcompat ; then
11251
11252         if test $ol_with_ldbm_api = bcompat; then \
11253                 ol_cv_berkeley_db=no
11254 for ac_hdr in db_185.h db.h
11255 do
11256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11258 echo "configure:11259: checking for $ac_hdr" >&5
11259 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11260   echo $ac_n "(cached) $ac_c" 1>&6
11261 else
11262   cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 #include <$ac_hdr>
11266 EOF
11267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11268 { (eval echo configure:11269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11270 if test -z "$ac_err"; then
11271   rm -rf conftest*
11272   eval "ac_cv_header_$ac_safe=yes"
11273 else
11274   echo "$ac_err" >&5
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=no"
11279 fi
11280 rm -f conftest*
11281 fi
11282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11285   cat >> confdefs.h <<EOF
11286 #define $ac_tr_hdr 1
11287 EOF
11288  
11289 else
11290   echo "$ac_t""no" 1>&6
11291 fi
11292 done
11293
11294 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
11295         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
11296 echo "configure:11297: checking if Berkeley DB header compatibility" >&5
11297 if eval "test \"`echo '$''{'ol_cv_header_db1'+set}'`\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   
11301                 cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304
11305 #if HAVE_DB_185_H
11306 #       include <db_185.h>
11307 #else
11308 #       include <db.h>
11309 #endif
11310
11311  /* this check could be improved */
11312 #ifndef DB_VERSION_MAJOR
11313 #       define DB_VERSION_MAJOR 1
11314 #endif
11315
11316 #if DB_VERSION_MAJOR == 1 
11317         __db_version_1
11318 #endif
11319
11320 EOF
11321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11322   egrep "__db_version_1" >/dev/null 2>&1; then
11323   rm -rf conftest*
11324   ol_cv_header_db1=yes
11325 else
11326   rm -rf conftest*
11327   ol_cv_header_db1=no
11328 fi
11329 rm -f conftest*
11330
11331 fi
11332
11333 echo "$ac_t""$ol_cv_header_db1" 1>&6
11334
11335         if test ol_cv_header_db1=yes ; then
11336                 ol_cv_lib_db=no
11337 if test $ol_cv_lib_db = no ; then
11338         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11339 echo "configure:11340: checking for Berkeley DB link (default)" >&5
11340 if eval "test \"`echo '$''{'ol_cv_db_none'+set}'`\" = set"; then
11341   echo $ac_n "(cached) $ac_c" 1>&6
11342 else
11343   
11344         ol_DB_LIB=
11345         ol_LIBS=$LIBS
11346         LIBS="$ol_DB_LIB $LIBS"
11347
11348         cat > conftest.$ac_ext <<EOF
11349 #line 11350 "configure"
11350 #include "confdefs.h"
11351
11352 #ifdef HAVE_DB_185_H
11353 # include <db_185.h>
11354 #else
11355 # include <db.h>
11356 #endif
11357
11358 #ifndef DB_VERSION_MAJOR
11359 # define DB_VERSION_MAJOR 1
11360 #endif
11361
11362 #ifndef NULL
11363 #define NULL ((void*)0)
11364 #endif
11365
11366 int main() {
11367
11368 #if DB_VERSION_MAJOR > 2
11369         db_env_create( NULL, 0 );
11370 #elif DB_VERSION_MAJOR > 1
11371         db_appexit( NULL );
11372 #else
11373         (void) dbopen( NULL, 0, 0, 0, NULL);
11374 #endif
11375
11376 ; return 0; }
11377 EOF
11378 if { (eval echo configure:11379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11379   rm -rf conftest*
11380   ol_cv_db_none=yes
11381 else
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   ol_cv_db_none=no
11386 fi
11387 rm -f conftest*
11388
11389         LIBS="$ol_LIBS"
11390
11391 fi
11392
11393 echo "$ac_t""$ol_cv_db_none" 1>&6
11394
11395         if test $ol_cv_db_none = yes ; then
11396                 ol_cv_lib_db=yes
11397         fi
11398 fi
11399
11400 if test $ol_cv_lib_db = no ; then
11401         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11402 echo "configure:11403: checking for Berkeley DB link (-ldb)" >&5
11403 if eval "test \"`echo '$''{'ol_cv_db_db'+set}'`\" = set"; then
11404   echo $ac_n "(cached) $ac_c" 1>&6
11405 else
11406   
11407         ol_DB_LIB=-ldb
11408         ol_LIBS=$LIBS
11409         LIBS="$ol_DB_LIB $LIBS"
11410
11411         cat > conftest.$ac_ext <<EOF
11412 #line 11413 "configure"
11413 #include "confdefs.h"
11414
11415 #ifdef HAVE_DB_185_H
11416 # include <db_185.h>
11417 #else
11418 # include <db.h>
11419 #endif
11420
11421 #ifndef DB_VERSION_MAJOR
11422 # define DB_VERSION_MAJOR 1
11423 #endif
11424
11425 #ifndef NULL
11426 #define NULL ((void*)0)
11427 #endif
11428
11429 int main() {
11430
11431 #if DB_VERSION_MAJOR > 2
11432         db_env_create( NULL, 0 );
11433 #elif DB_VERSION_MAJOR > 1
11434         db_appexit( NULL );
11435 #else
11436         (void) dbopen( NULL, 0, 0, 0, NULL);
11437 #endif
11438
11439 ; return 0; }
11440 EOF
11441 if { (eval echo configure:11442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11442   rm -rf conftest*
11443   ol_cv_db_db=yes
11444 else
11445   echo "configure: failed program was:" >&5
11446   cat conftest.$ac_ext >&5
11447   rm -rf conftest*
11448   ol_cv_db_db=no
11449 fi
11450 rm -f conftest*
11451
11452         LIBS="$ol_LIBS"
11453
11454 fi
11455
11456 echo "$ac_t""$ol_cv_db_db" 1>&6
11457
11458         if test $ol_cv_db_db = yes ; then
11459                 ol_cv_lib_db=-ldb
11460         fi
11461 fi
11462
11463 if test $ol_cv_lib_db = no ; then
11464         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11465 echo "configure:11466: checking for Berkeley DB link (-ldb3)" >&5
11466 if eval "test \"`echo '$''{'ol_cv_db_db3'+set}'`\" = set"; then
11467   echo $ac_n "(cached) $ac_c" 1>&6
11468 else
11469   
11470         ol_DB_LIB=-ldb3
11471         ol_LIBS=$LIBS
11472         LIBS="$ol_DB_LIB $LIBS"
11473
11474         cat > conftest.$ac_ext <<EOF
11475 #line 11476 "configure"
11476 #include "confdefs.h"
11477
11478 #ifdef HAVE_DB_185_H
11479 # include <db_185.h>
11480 #else
11481 # include <db.h>
11482 #endif
11483
11484 #ifndef DB_VERSION_MAJOR
11485 # define DB_VERSION_MAJOR 1
11486 #endif
11487
11488 #ifndef NULL
11489 #define NULL ((void*)0)
11490 #endif
11491
11492 int main() {
11493
11494 #if DB_VERSION_MAJOR > 2
11495         db_env_create( NULL, 0 );
11496 #elif DB_VERSION_MAJOR > 1
11497         db_appexit( NULL );
11498 #else
11499         (void) dbopen( NULL, 0, 0, 0, NULL);
11500 #endif
11501
11502 ; return 0; }
11503 EOF
11504 if { (eval echo configure:11505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11505   rm -rf conftest*
11506   ol_cv_db_db3=yes
11507 else
11508   echo "configure: failed program was:" >&5
11509   cat conftest.$ac_ext >&5
11510   rm -rf conftest*
11511   ol_cv_db_db3=no
11512 fi
11513 rm -f conftest*
11514
11515         LIBS="$ol_LIBS"
11516
11517 fi
11518
11519 echo "$ac_t""$ol_cv_db_db3" 1>&6
11520
11521         if test $ol_cv_db_db3 = yes ; then
11522                 ol_cv_lib_db=-ldb3
11523         fi
11524 fi
11525
11526 if test $ol_cv_lib_db = no ; then
11527         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11528 echo "configure:11529: checking for Berkeley DB link (-ldb2)" >&5
11529 if eval "test \"`echo '$''{'ol_cv_db_db2'+set}'`\" = set"; then
11530   echo $ac_n "(cached) $ac_c" 1>&6
11531 else
11532   
11533         ol_DB_LIB=-ldb2
11534         ol_LIBS=$LIBS
11535         LIBS="$ol_DB_LIB $LIBS"
11536
11537         cat > conftest.$ac_ext <<EOF
11538 #line 11539 "configure"
11539 #include "confdefs.h"
11540
11541 #ifdef HAVE_DB_185_H
11542 # include <db_185.h>
11543 #else
11544 # include <db.h>
11545 #endif
11546
11547 #ifndef DB_VERSION_MAJOR
11548 # define DB_VERSION_MAJOR 1
11549 #endif
11550
11551 #ifndef NULL
11552 #define NULL ((void*)0)
11553 #endif
11554
11555 int main() {
11556
11557 #if DB_VERSION_MAJOR > 2
11558         db_env_create( NULL, 0 );
11559 #elif DB_VERSION_MAJOR > 1
11560         db_appexit( NULL );
11561 #else
11562         (void) dbopen( NULL, 0, 0, 0, NULL);
11563 #endif
11564
11565 ; return 0; }
11566 EOF
11567 if { (eval echo configure:11568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11568   rm -rf conftest*
11569   ol_cv_db_db2=yes
11570 else
11571   echo "configure: failed program was:" >&5
11572   cat conftest.$ac_ext >&5
11573   rm -rf conftest*
11574   ol_cv_db_db2=no
11575 fi
11576 rm -f conftest*
11577
11578         LIBS="$ol_LIBS"
11579
11580 fi
11581
11582 echo "$ac_t""$ol_cv_db_db2" 1>&6
11583
11584         if test $ol_cv_db_db2 = yes ; then
11585                 ol_cv_lib_db=-ldb2
11586         fi
11587 fi
11588
11589 if test $ol_cv_lib_db = no ; then
11590         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11591 echo "configure:11592: checking for Berkeley DB link (-ldb1)" >&5
11592 if eval "test \"`echo '$''{'ol_cv_db_db1'+set}'`\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   
11596         ol_DB_LIB=-ldb1
11597         ol_LIBS=$LIBS
11598         LIBS="$ol_DB_LIB $LIBS"
11599
11600         cat > conftest.$ac_ext <<EOF
11601 #line 11602 "configure"
11602 #include "confdefs.h"
11603
11604 #ifdef HAVE_DB_185_H
11605 # include <db_185.h>
11606 #else
11607 # include <db.h>
11608 #endif
11609
11610 #ifndef DB_VERSION_MAJOR
11611 # define DB_VERSION_MAJOR 1
11612 #endif
11613
11614 #ifndef NULL
11615 #define NULL ((void*)0)
11616 #endif
11617
11618 int main() {
11619
11620 #if DB_VERSION_MAJOR > 2
11621         db_env_create( NULL, 0 );
11622 #elif DB_VERSION_MAJOR > 1
11623         db_appexit( NULL );
11624 #else
11625         (void) dbopen( NULL, 0, 0, 0, NULL);
11626 #endif
11627
11628 ; return 0; }
11629 EOF
11630 if { (eval echo configure:11631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11631   rm -rf conftest*
11632   ol_cv_db_db1=yes
11633 else
11634   echo "configure: failed program was:" >&5
11635   cat conftest.$ac_ext >&5
11636   rm -rf conftest*
11637   ol_cv_db_db1=no
11638 fi
11639 rm -f conftest*
11640
11641         LIBS="$ol_LIBS"
11642
11643 fi
11644
11645 echo "$ac_t""$ol_cv_db_db1" 1>&6
11646
11647         if test $ol_cv_db_db1 = yes ; then
11648                 ol_cv_lib_db=-ldb1
11649         fi
11650 fi
11651
11652
11653                 if test "$ol_cv_lib_db" != no ; then
11654                         ol_cv_berkeley_db=yes
11655                 fi
11656         fi
11657 fi
11658
11659         else
11660                 ol_cv_berkeley_db=no
11661 for ac_hdr in db.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 \"`echo '$''{'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 $ac_cv_header_db_h = yes; then
11702         ol_cv_lib_db=no
11703 if test $ol_cv_lib_db = no ; then
11704         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
11705 echo "configure:11706: checking for Berkeley DB link (default)" >&5
11706 if eval "test \"`echo '$''{'ol_cv_db_none'+set}'`\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   
11710         ol_DB_LIB=
11711         ol_LIBS=$LIBS
11712         LIBS="$ol_DB_LIB $LIBS"
11713
11714         cat > conftest.$ac_ext <<EOF
11715 #line 11716 "configure"
11716 #include "confdefs.h"
11717
11718 #ifdef HAVE_DB_185_H
11719 # include <db_185.h>
11720 #else
11721 # include <db.h>
11722 #endif
11723
11724 #ifndef DB_VERSION_MAJOR
11725 # define DB_VERSION_MAJOR 1
11726 #endif
11727
11728 #ifndef NULL
11729 #define NULL ((void*)0)
11730 #endif
11731
11732 int main() {
11733
11734 #if DB_VERSION_MAJOR > 2
11735         db_env_create( NULL, 0 );
11736 #elif DB_VERSION_MAJOR > 1
11737         db_appexit( NULL );
11738 #else
11739         (void) dbopen( NULL, 0, 0, 0, NULL);
11740 #endif
11741
11742 ; return 0; }
11743 EOF
11744 if { (eval echo configure:11745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11745   rm -rf conftest*
11746   ol_cv_db_none=yes
11747 else
11748   echo "configure: failed program was:" >&5
11749   cat conftest.$ac_ext >&5
11750   rm -rf conftest*
11751   ol_cv_db_none=no
11752 fi
11753 rm -f conftest*
11754
11755         LIBS="$ol_LIBS"
11756
11757 fi
11758
11759 echo "$ac_t""$ol_cv_db_none" 1>&6
11760
11761         if test $ol_cv_db_none = yes ; then
11762                 ol_cv_lib_db=yes
11763         fi
11764 fi
11765
11766 if test $ol_cv_lib_db = no ; then
11767         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
11768 echo "configure:11769: checking for Berkeley DB link (-ldb)" >&5
11769 if eval "test \"`echo '$''{'ol_cv_db_db'+set}'`\" = set"; then
11770   echo $ac_n "(cached) $ac_c" 1>&6
11771 else
11772   
11773         ol_DB_LIB=-ldb
11774         ol_LIBS=$LIBS
11775         LIBS="$ol_DB_LIB $LIBS"
11776
11777         cat > conftest.$ac_ext <<EOF
11778 #line 11779 "configure"
11779 #include "confdefs.h"
11780
11781 #ifdef HAVE_DB_185_H
11782 # include <db_185.h>
11783 #else
11784 # include <db.h>
11785 #endif
11786
11787 #ifndef DB_VERSION_MAJOR
11788 # define DB_VERSION_MAJOR 1
11789 #endif
11790
11791 #ifndef NULL
11792 #define NULL ((void*)0)
11793 #endif
11794
11795 int main() {
11796
11797 #if DB_VERSION_MAJOR > 2
11798         db_env_create( NULL, 0 );
11799 #elif DB_VERSION_MAJOR > 1
11800         db_appexit( NULL );
11801 #else
11802         (void) dbopen( NULL, 0, 0, 0, NULL);
11803 #endif
11804
11805 ; return 0; }
11806 EOF
11807 if { (eval echo configure:11808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11808   rm -rf conftest*
11809   ol_cv_db_db=yes
11810 else
11811   echo "configure: failed program was:" >&5
11812   cat conftest.$ac_ext >&5
11813   rm -rf conftest*
11814   ol_cv_db_db=no
11815 fi
11816 rm -f conftest*
11817
11818         LIBS="$ol_LIBS"
11819
11820 fi
11821
11822 echo "$ac_t""$ol_cv_db_db" 1>&6
11823
11824         if test $ol_cv_db_db = yes ; then
11825                 ol_cv_lib_db=-ldb
11826         fi
11827 fi
11828
11829 if test $ol_cv_lib_db = no ; then
11830         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
11831 echo "configure:11832: checking for Berkeley DB link (-ldb3)" >&5
11832 if eval "test \"`echo '$''{'ol_cv_db_db3'+set}'`\" = set"; then
11833   echo $ac_n "(cached) $ac_c" 1>&6
11834 else
11835   
11836         ol_DB_LIB=-ldb3
11837         ol_LIBS=$LIBS
11838         LIBS="$ol_DB_LIB $LIBS"
11839
11840         cat > conftest.$ac_ext <<EOF
11841 #line 11842 "configure"
11842 #include "confdefs.h"
11843
11844 #ifdef HAVE_DB_185_H
11845 # include <db_185.h>
11846 #else
11847 # include <db.h>
11848 #endif
11849
11850 #ifndef DB_VERSION_MAJOR
11851 # define DB_VERSION_MAJOR 1
11852 #endif
11853
11854 #ifndef NULL
11855 #define NULL ((void*)0)
11856 #endif
11857
11858 int main() {
11859
11860 #if DB_VERSION_MAJOR > 2
11861         db_env_create( NULL, 0 );
11862 #elif DB_VERSION_MAJOR > 1
11863         db_appexit( NULL );
11864 #else
11865         (void) dbopen( NULL, 0, 0, 0, NULL);
11866 #endif
11867
11868 ; return 0; }
11869 EOF
11870 if { (eval echo configure:11871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11871   rm -rf conftest*
11872   ol_cv_db_db3=yes
11873 else
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -rf conftest*
11877   ol_cv_db_db3=no
11878 fi
11879 rm -f conftest*
11880
11881         LIBS="$ol_LIBS"
11882
11883 fi
11884
11885 echo "$ac_t""$ol_cv_db_db3" 1>&6
11886
11887         if test $ol_cv_db_db3 = yes ; then
11888                 ol_cv_lib_db=-ldb3
11889         fi
11890 fi
11891
11892 if test $ol_cv_lib_db = no ; then
11893         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
11894 echo "configure:11895: checking for Berkeley DB link (-ldb2)" >&5
11895 if eval "test \"`echo '$''{'ol_cv_db_db2'+set}'`\" = set"; then
11896   echo $ac_n "(cached) $ac_c" 1>&6
11897 else
11898   
11899         ol_DB_LIB=-ldb2
11900         ol_LIBS=$LIBS
11901         LIBS="$ol_DB_LIB $LIBS"
11902
11903         cat > conftest.$ac_ext <<EOF
11904 #line 11905 "configure"
11905 #include "confdefs.h"
11906
11907 #ifdef HAVE_DB_185_H
11908 # include <db_185.h>
11909 #else
11910 # include <db.h>
11911 #endif
11912
11913 #ifndef DB_VERSION_MAJOR
11914 # define DB_VERSION_MAJOR 1
11915 #endif
11916
11917 #ifndef NULL
11918 #define NULL ((void*)0)
11919 #endif
11920
11921 int main() {
11922
11923 #if DB_VERSION_MAJOR > 2
11924         db_env_create( NULL, 0 );
11925 #elif DB_VERSION_MAJOR > 1
11926         db_appexit( NULL );
11927 #else
11928         (void) dbopen( NULL, 0, 0, 0, NULL);
11929 #endif
11930
11931 ; return 0; }
11932 EOF
11933 if { (eval echo configure:11934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11934   rm -rf conftest*
11935   ol_cv_db_db2=yes
11936 else
11937   echo "configure: failed program was:" >&5
11938   cat conftest.$ac_ext >&5
11939   rm -rf conftest*
11940   ol_cv_db_db2=no
11941 fi
11942 rm -f conftest*
11943
11944         LIBS="$ol_LIBS"
11945
11946 fi
11947
11948 echo "$ac_t""$ol_cv_db_db2" 1>&6
11949
11950         if test $ol_cv_db_db2 = yes ; then
11951                 ol_cv_lib_db=-ldb2
11952         fi
11953 fi
11954
11955 if test $ol_cv_lib_db = no ; then
11956         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
11957 echo "configure:11958: checking for Berkeley DB link (-ldb1)" >&5
11958 if eval "test \"`echo '$''{'ol_cv_db_db1'+set}'`\" = set"; then
11959   echo $ac_n "(cached) $ac_c" 1>&6
11960 else
11961   
11962         ol_DB_LIB=-ldb1
11963         ol_LIBS=$LIBS
11964         LIBS="$ol_DB_LIB $LIBS"
11965
11966         cat > conftest.$ac_ext <<EOF
11967 #line 11968 "configure"
11968 #include "confdefs.h"
11969
11970 #ifdef HAVE_DB_185_H
11971 # include <db_185.h>
11972 #else
11973 # include <db.h>
11974 #endif
11975
11976 #ifndef DB_VERSION_MAJOR
11977 # define DB_VERSION_MAJOR 1
11978 #endif
11979
11980 #ifndef NULL
11981 #define NULL ((void*)0)
11982 #endif
11983
11984 int main() {
11985
11986 #if DB_VERSION_MAJOR > 2
11987         db_env_create( NULL, 0 );
11988 #elif DB_VERSION_MAJOR > 1
11989         db_appexit( NULL );
11990 #else
11991         (void) dbopen( NULL, 0, 0, 0, NULL);
11992 #endif
11993
11994 ; return 0; }
11995 EOF
11996 if { (eval echo configure:11997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11997   rm -rf conftest*
11998   ol_cv_db_db1=yes
11999 else
12000   echo "configure: failed program was:" >&5
12001   cat conftest.$ac_ext >&5
12002   rm -rf conftest*
12003   ol_cv_db_db1=no
12004 fi
12005 rm -f conftest*
12006
12007         LIBS="$ol_LIBS"
12008
12009 fi
12010
12011 echo "$ac_t""$ol_cv_db_db1" 1>&6
12012
12013         if test $ol_cv_db_db1 = yes ; then
12014                 ol_cv_lib_db=-ldb1
12015         fi
12016 fi
12017
12018
12019         if test "$ol_cv_lib_db" != no ; then
12020                 ol_cv_berkeley_db=yes
12021                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
12022 echo "configure:12023: checking for Berkeley DB thread support" >&5
12023 if eval "test \"`echo '$''{'ol_cv_berkeley_db_thread'+set}'`\" = set"; then
12024   echo $ac_n "(cached) $ac_c" 1>&6
12025 else
12026   
12027         ol_LIBS="$LIBS"
12028         if test $ol_cv_lib_db != yes ; then
12029                 LIBS="$ol_cv_lib_db"
12030         fi
12031
12032         if test "$cross_compiling" = yes; then
12033   ol_cv_berkeley_db_thread=cross
12034 else
12035   cat > conftest.$ac_ext <<EOF
12036 #line 12037 "configure"
12037 #include "confdefs.h"
12038
12039 #ifdef HAVE_DB_185_H
12040         choke me;
12041 #else
12042 #include <db.h>
12043 #endif
12044 #ifndef NULL
12045 #define NULL ((void *)0)
12046 #endif
12047 main()
12048 {
12049         int rc;
12050         u_int32_t flags = DB_CREATE | DB_THREAD;
12051
12052
12053 #if DB_VERSION_MAJOR > 2
12054         DB_ENV *env = NULL;
12055
12056         rc = db_env_create( &env, 0 );
12057
12058         if( rc == 0 ) {
12059                 rc = env->open( env, NULL, NULL, flags, 0 );
12060         }
12061
12062 #else
12063         DB_ENV env;
12064         memset( &env, '\0', sizeof(env) );
12065
12066         rc = db_appinit( NULL, NULL, &env, flags );
12067
12068         if( rc == 0 ) {
12069                 db_appexit( &env );
12070         }
12071 #endif
12072
12073         return rc;
12074 }
12075 EOF
12076 if { (eval echo configure:12077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12077 then
12078   ol_cv_berkeley_db_thread=yes
12079 else
12080   echo "configure: failed program was:" >&5
12081   cat conftest.$ac_ext >&5
12082   rm -fr conftest*
12083   ol_cv_berkeley_db_thread=no
12084 fi
12085 rm -fr conftest*
12086 fi
12087
12088
12089         LIBS="$ol_LIBS"
12090
12091         if test $ol_cv_berkeley_db_thread != no ; then
12092                 cat >> confdefs.h <<\EOF
12093 #define HAVE_BERKELEY_DB_THREAD 1
12094 EOF
12095
12096         fi
12097
12098 fi
12099
12100 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
12101         fi
12102 fi
12103
12104         fi
12105
12106         if test $ol_cv_berkeley_db != no ; then
12107                 cat >> confdefs.h <<\EOF
12108 #define HAVE_BERKELEY_DB 1
12109 EOF
12110
12111
12112                 ol_link_ldbm=berkeley
12113                 ol_with_ldbm_api=db
12114
12115                 if test $ol_with_ldbm_type = hash ; then
12116                         cat >> confdefs.h <<\EOF
12117 #define LDBM_USE_DBHASH 1
12118 EOF
12119
12120                 else
12121                         cat >> confdefs.h <<\EOF
12122 #define LDBM_USE_DBBTREE 1
12123 EOF
12124
12125                 fi
12126
12127                                                 if test $ol_cv_lib_db != yes ; then
12128                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
12129                 fi
12130         fi
12131 fi
12132
12133 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
12134         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
12135         ol_with_ldbm_api=none
12136 fi
12137
12138 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
12139         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
12140 echo "configure:12141: checking for MDBM library" >&5
12141 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
12142   echo $ac_n "(cached) $ac_c" 1>&6
12143 else
12144         ol_LIBS="$LIBS"
12145         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
12146 echo "configure:12147: checking for mdbm_set_chain" >&5
12147 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
12148   echo $ac_n "(cached) $ac_c" 1>&6
12149 else
12150   cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 /* System header to define __stub macros and hopefully few prototypes,
12154     which can conflict with char mdbm_set_chain(); below.  */
12155 #include <assert.h>
12156 /* Override any gcc2 internal prototype to avoid an error.  */
12157 /* We use char because int might match the return type of a gcc2
12158     builtin and then its argument prototype would still apply.  */
12159 char mdbm_set_chain();
12160
12161 int main() {
12162
12163 /* The GNU C library defines this for functions which it implements
12164     to always fail with ENOSYS.  Some functions are actually named
12165     something starting with __ and the normal name is an alias.  */
12166 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
12167 choke me
12168 #else
12169 mdbm_set_chain();
12170 #endif
12171
12172 ; return 0; }
12173 EOF
12174 if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12175   rm -rf conftest*
12176   eval "ac_cv_func_mdbm_set_chain=yes"
12177 else
12178   echo "configure: failed program was:" >&5
12179   cat conftest.$ac_ext >&5
12180   rm -rf conftest*
12181   eval "ac_cv_func_mdbm_set_chain=no"
12182 fi
12183 rm -f conftest*
12184 fi
12185
12186 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
12187   echo "$ac_t""yes" 1>&6
12188   ol_cv_lib_mdbm=yes
12189 else
12190   echo "$ac_t""no" 1>&6
12191
12192                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
12193 echo "configure:12194: checking for mdbm_set_chain in -lmdbm" >&5
12194 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
12195 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12196   echo $ac_n "(cached) $ac_c" 1>&6
12197 else
12198   ac_save_LIBS="$LIBS"
12199 LIBS="-lmdbm  $LIBS"
12200 cat > conftest.$ac_ext <<EOF
12201 #line 12202 "configure"
12202 #include "confdefs.h"
12203 /* Override any gcc2 internal prototype to avoid an error.  */
12204 /* We use char because int might match the return type of a gcc2
12205     builtin and then its argument prototype would still apply.  */
12206 char mdbm_set_chain();
12207
12208 int main() {
12209 mdbm_set_chain()
12210 ; return 0; }
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12213   rm -rf conftest*
12214   eval "ac_cv_lib_$ac_lib_var=yes"
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -rf conftest*
12219   eval "ac_cv_lib_$ac_lib_var=no"
12220 fi
12221 rm -f conftest*
12222 LIBS="$ac_save_LIBS"
12223
12224 fi
12225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12226   echo "$ac_t""yes" 1>&6
12227   ol_cv_lib_mdbm=-lmdbm
12228 else
12229   echo "$ac_t""no" 1>&6
12230 ol_cv_lib_mdbm=no
12231 fi
12232
12233         
12234 fi
12235
12236         LIBS="$ol_LIBS"
12237
12238 fi
12239
12240 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
12241
12242
12243  for ac_hdr in mdbm.h
12244 do
12245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12247 echo "configure:12248: checking for $ac_hdr" >&5
12248 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12249   echo $ac_n "(cached) $ac_c" 1>&6
12250 else
12251   cat > conftest.$ac_ext <<EOF
12252 #line 12253 "configure"
12253 #include "confdefs.h"
12254 #include <$ac_hdr>
12255 EOF
12256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12257 { (eval echo configure:12258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12259 if test -z "$ac_err"; then
12260   rm -rf conftest*
12261   eval "ac_cv_header_$ac_safe=yes"
12262 else
12263   echo "$ac_err" >&5
12264   echo "configure: failed program was:" >&5
12265   cat conftest.$ac_ext >&5
12266   rm -rf conftest*
12267   eval "ac_cv_header_$ac_safe=no"
12268 fi
12269 rm -f conftest*
12270 fi
12271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12272   echo "$ac_t""yes" 1>&6
12273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12274   cat >> confdefs.h <<EOF
12275 #define $ac_tr_hdr 1
12276 EOF
12277  
12278 else
12279   echo "$ac_t""no" 1>&6
12280 fi
12281 done
12282
12283  echo $ac_n "checking for db""... $ac_c" 1>&6
12284 echo "configure:12285: checking for db" >&5
12285 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
12286   echo $ac_n "(cached) $ac_c" 1>&6
12287 else
12288   
12289         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
12290                 ol_cv_mdbm=no
12291         else
12292                 ol_cv_mdbm=yes
12293         fi
12294
12295 fi
12296
12297 echo "$ac_t""$ol_cv_mdbm" 1>&6
12298  if test $ol_cv_mdbm = yes ; then
12299         cat >> confdefs.h <<\EOF
12300 #define HAVE_MDBM 1
12301 EOF
12302
12303  fi
12304
12305
12306         if test $ol_cv_mdbm = yes ; then
12307                 ol_link_ldbm=mdbm
12308                 ol_with_ldbm_api=mdbm
12309                 if test $ol_cv_lib_mdbm != yes ; then
12310                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
12311                 fi
12312         fi
12313 fi
12314
12315 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
12316         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
12317 echo "configure:12318: checking for GDBM library" >&5
12318 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321         ol_LIBS="$LIBS"
12322         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
12323 echo "configure:12324: checking for gdbm_open" >&5
12324 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
12325   echo $ac_n "(cached) $ac_c" 1>&6
12326 else
12327   cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330 /* System header to define __stub macros and hopefully few prototypes,
12331     which can conflict with char gdbm_open(); below.  */
12332 #include <assert.h>
12333 /* Override any gcc2 internal prototype to avoid an error.  */
12334 /* We use char because int might match the return type of a gcc2
12335     builtin and then its argument prototype would still apply.  */
12336 char gdbm_open();
12337
12338 int main() {
12339
12340 /* The GNU C library defines this for functions which it implements
12341     to always fail with ENOSYS.  Some functions are actually named
12342     something starting with __ and the normal name is an alias.  */
12343 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
12344 choke me
12345 #else
12346 gdbm_open();
12347 #endif
12348
12349 ; return 0; }
12350 EOF
12351 if { (eval echo configure:12352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12352   rm -rf conftest*
12353   eval "ac_cv_func_gdbm_open=yes"
12354 else
12355   echo "configure: failed program was:" >&5
12356   cat conftest.$ac_ext >&5
12357   rm -rf conftest*
12358   eval "ac_cv_func_gdbm_open=no"
12359 fi
12360 rm -f conftest*
12361 fi
12362
12363 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
12364   echo "$ac_t""yes" 1>&6
12365   ol_cv_lib_gdbm=yes
12366 else
12367   echo "$ac_t""no" 1>&6
12368
12369                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
12370 echo "configure:12371: checking for gdbm_open in -lgdbm" >&5
12371 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
12372 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12373   echo $ac_n "(cached) $ac_c" 1>&6
12374 else
12375   ac_save_LIBS="$LIBS"
12376 LIBS="-lgdbm  $LIBS"
12377 cat > conftest.$ac_ext <<EOF
12378 #line 12379 "configure"
12379 #include "confdefs.h"
12380 /* Override any gcc2 internal prototype to avoid an error.  */
12381 /* We use char because int might match the return type of a gcc2
12382     builtin and then its argument prototype would still apply.  */
12383 char gdbm_open();
12384
12385 int main() {
12386 gdbm_open()
12387 ; return 0; }
12388 EOF
12389 if { (eval echo configure:12390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12390   rm -rf conftest*
12391   eval "ac_cv_lib_$ac_lib_var=yes"
12392 else
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -rf conftest*
12396   eval "ac_cv_lib_$ac_lib_var=no"
12397 fi
12398 rm -f conftest*
12399 LIBS="$ac_save_LIBS"
12400
12401 fi
12402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12403   echo "$ac_t""yes" 1>&6
12404   ol_cv_lib_gdbm=-lgdbm
12405 else
12406   echo "$ac_t""no" 1>&6
12407 ol_cv_lib_gdbm=no
12408 fi
12409
12410         
12411 fi
12412
12413         LIBS="$ol_LIBS"
12414
12415 fi
12416
12417 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
12418
12419
12420  for ac_hdr in gdbm.h
12421 do
12422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12424 echo "configure:12425: checking for $ac_hdr" >&5
12425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12426   echo $ac_n "(cached) $ac_c" 1>&6
12427 else
12428   cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 #include <$ac_hdr>
12432 EOF
12433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12434 { (eval echo configure:12435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12436 if test -z "$ac_err"; then
12437   rm -rf conftest*
12438   eval "ac_cv_header_$ac_safe=yes"
12439 else
12440   echo "$ac_err" >&5
12441   echo "configure: failed program was:" >&5
12442   cat conftest.$ac_ext >&5
12443   rm -rf conftest*
12444   eval "ac_cv_header_$ac_safe=no"
12445 fi
12446 rm -f conftest*
12447 fi
12448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12449   echo "$ac_t""yes" 1>&6
12450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12451   cat >> confdefs.h <<EOF
12452 #define $ac_tr_hdr 1
12453 EOF
12454  
12455 else
12456   echo "$ac_t""no" 1>&6
12457 fi
12458 done
12459
12460  echo $ac_n "checking for db""... $ac_c" 1>&6
12461 echo "configure:12462: checking for db" >&5
12462 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
12463   echo $ac_n "(cached) $ac_c" 1>&6
12464 else
12465   
12466         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
12467                 ol_cv_gdbm=no
12468         else
12469                 ol_cv_gdbm=yes
12470         fi
12471
12472 fi
12473
12474 echo "$ac_t""$ol_cv_gdbm" 1>&6
12475  if test $ol_cv_gdbm = yes ; then
12476         cat >> confdefs.h <<\EOF
12477 #define HAVE_GDBM 1
12478 EOF
12479
12480  fi
12481
12482
12483         if test $ol_cv_gdbm = yes ; then
12484                 ol_link_ldbm=gdbm
12485                 ol_with_ldbm_api=gdbm
12486
12487                 if test $ol_cv_lib_gdbm != yes ; then
12488                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
12489                 fi
12490         fi
12491 fi
12492
12493 if test $ol_with_ldbm_api = ndbm ; then
12494         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
12495 echo "configure:12496: checking for NDBM library" >&5
12496 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
12497   echo $ac_n "(cached) $ac_c" 1>&6
12498 else
12499         ol_LIBS="$LIBS"
12500         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12501 echo "configure:12502: checking for dbm_open" >&5
12502 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
12503   echo $ac_n "(cached) $ac_c" 1>&6
12504 else
12505   cat > conftest.$ac_ext <<EOF
12506 #line 12507 "configure"
12507 #include "confdefs.h"
12508 /* System header to define __stub macros and hopefully few prototypes,
12509     which can conflict with char dbm_open(); below.  */
12510 #include <assert.h>
12511 /* Override any gcc2 internal prototype to avoid an error.  */
12512 /* We use char because int might match the return type of a gcc2
12513     builtin and then its argument prototype would still apply.  */
12514 char dbm_open();
12515
12516 int main() {
12517
12518 /* The GNU C library defines this for functions which it implements
12519     to always fail with ENOSYS.  Some functions are actually named
12520     something starting with __ and the normal name is an alias.  */
12521 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12522 choke me
12523 #else
12524 dbm_open();
12525 #endif
12526
12527 ; return 0; }
12528 EOF
12529 if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12530   rm -rf conftest*
12531   eval "ac_cv_func_dbm_open=yes"
12532 else
12533   echo "configure: failed program was:" >&5
12534   cat conftest.$ac_ext >&5
12535   rm -rf conftest*
12536   eval "ac_cv_func_dbm_open=no"
12537 fi
12538 rm -f conftest*
12539 fi
12540
12541 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12542   echo "$ac_t""yes" 1>&6
12543   ol_cv_lib_ndbm=yes
12544 else
12545   echo "$ac_t""no" 1>&6
12546
12547                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
12548 echo "configure:12549: checking for dbm_open in -lndbm" >&5
12549 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
12550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12551   echo $ac_n "(cached) $ac_c" 1>&6
12552 else
12553   ac_save_LIBS="$LIBS"
12554 LIBS="-lndbm  $LIBS"
12555 cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558 /* Override any gcc2 internal prototype to avoid an error.  */
12559 /* We use char because int might match the return type of a gcc2
12560     builtin and then its argument prototype would still apply.  */
12561 char dbm_open();
12562
12563 int main() {
12564 dbm_open()
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12568   rm -rf conftest*
12569   eval "ac_cv_lib_$ac_lib_var=yes"
12570 else
12571   echo "configure: failed program was:" >&5
12572   cat conftest.$ac_ext >&5
12573   rm -rf conftest*
12574   eval "ac_cv_lib_$ac_lib_var=no"
12575 fi
12576 rm -f conftest*
12577 LIBS="$ac_save_LIBS"
12578
12579 fi
12580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12581   echo "$ac_t""yes" 1>&6
12582   ol_cv_lib_ndbm=-lndbm
12583 else
12584   echo "$ac_t""no" 1>&6
12585
12586                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12587 echo "configure:12588: checking for dbm_open in -ldbm" >&5
12588 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   ac_save_LIBS="$LIBS"
12593 LIBS="-ldbm  $LIBS"
12594 cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 /* Override any gcc2 internal prototype to avoid an error.  */
12598 /* We use char because int might match the return type of a gcc2
12599     builtin and then its argument prototype would still apply.  */
12600 char dbm_open();
12601
12602 int main() {
12603 dbm_open()
12604 ; return 0; }
12605 EOF
12606 if { (eval echo configure:12607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12607   rm -rf conftest*
12608   eval "ac_cv_lib_$ac_lib_var=yes"
12609 else
12610   echo "configure: failed program was:" >&5
12611   cat conftest.$ac_ext >&5
12612   rm -rf conftest*
12613   eval "ac_cv_lib_$ac_lib_var=no"
12614 fi
12615 rm -f conftest*
12616 LIBS="$ac_save_LIBS"
12617
12618 fi
12619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12620   echo "$ac_t""yes" 1>&6
12621   ol_cv_lib_ndbm=-ldbm
12622 else
12623   echo "$ac_t""no" 1>&6
12624 ol_cv_lib_ndbm=no
12625 fi
12626                 
12627 fi
12628
12629         
12630 fi
12631
12632         LIBS="$ol_LIBS"
12633
12634 fi
12635
12636 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
12637
12638
12639  for ac_hdr in ndbm.h
12640 do
12641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12643 echo "configure:12644: checking for $ac_hdr" >&5
12644 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12645   echo $ac_n "(cached) $ac_c" 1>&6
12646 else
12647   cat > conftest.$ac_ext <<EOF
12648 #line 12649 "configure"
12649 #include "confdefs.h"
12650 #include <$ac_hdr>
12651 EOF
12652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12653 { (eval echo configure:12654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12655 if test -z "$ac_err"; then
12656   rm -rf conftest*
12657   eval "ac_cv_header_$ac_safe=yes"
12658 else
12659   echo "$ac_err" >&5
12660   echo "configure: failed program was:" >&5
12661   cat conftest.$ac_ext >&5
12662   rm -rf conftest*
12663   eval "ac_cv_header_$ac_safe=no"
12664 fi
12665 rm -f conftest*
12666 fi
12667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12668   echo "$ac_t""yes" 1>&6
12669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12670   cat >> confdefs.h <<EOF
12671 #define $ac_tr_hdr 1
12672 EOF
12673  
12674 else
12675   echo "$ac_t""no" 1>&6
12676 fi
12677 done
12678
12679  echo $ac_n "checking for db""... $ac_c" 1>&6
12680 echo "configure:12681: checking for db" >&5
12681 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
12682   echo $ac_n "(cached) $ac_c" 1>&6
12683 else
12684   
12685         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
12686                 ol_cv_ndbm=no
12687         else
12688                 ol_cv_ndbm=yes
12689         fi
12690
12691 fi
12692
12693 echo "$ac_t""$ol_cv_ndbm" 1>&6
12694  if test $ol_cv_ndbm = yes ; then
12695         cat >> confdefs.h <<\EOF
12696 #define HAVE_NDBM 1
12697 EOF
12698
12699  fi
12700
12701
12702         if test $ol_cv_ndbm = yes ; then
12703                 ol_link_ldbm=ndbm
12704                 ol_with_ldbm_api=ndbm
12705
12706                 if test $ol_cv_lib_ndbm != yes ; then
12707                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
12708                 fi
12709         fi
12710 fi
12711
12712 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
12713         echo "configure: warning: could not find suitable LDBM backend" 1>&2
12714         if test $ol_enable_ldbm = yes ; then
12715                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
12716         fi
12717
12718         echo "configure: warning: disabling LDBM" 1>&2
12719         ol_enable_ldbm=no
12720 fi
12721
12722 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
12723         LINK_BINS_DYNAMIC="yes"
12724 else
12725         LINK_BINS_DYNAMIC="no"
12726 fi
12727
12728 if test $ol_enable_wrappers != no ; then
12729         for ac_hdr in tcpd.h
12730 do
12731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12733 echo "configure:12734: checking for $ac_hdr" >&5
12734 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12735   echo $ac_n "(cached) $ac_c" 1>&6
12736 else
12737   cat > conftest.$ac_ext <<EOF
12738 #line 12739 "configure"
12739 #include "confdefs.h"
12740 #include <$ac_hdr>
12741 EOF
12742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12743 { (eval echo configure:12744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12745 if test -z "$ac_err"; then
12746   rm -rf conftest*
12747   eval "ac_cv_header_$ac_safe=yes"
12748 else
12749   echo "$ac_err" >&5
12750   echo "configure: failed program was:" >&5
12751   cat conftest.$ac_ext >&5
12752   rm -rf conftest*
12753   eval "ac_cv_header_$ac_safe=no"
12754 fi
12755 rm -f conftest*
12756 fi
12757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12758   echo "$ac_t""yes" 1>&6
12759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12760   cat >> confdefs.h <<EOF
12761 #define $ac_tr_hdr 1
12762 EOF
12763  
12764 else
12765   echo "$ac_t""no" 1>&6
12766 fi
12767 done
12768
12769
12770         if test $ac_cv_header_tcpd_h != yes ; then
12771                 have_wrappers=no
12772         else
12773                 cat > conftest.$ac_ext <<EOF
12774 #line 12775 "configure"
12775 #include "confdefs.h"
12776
12777 int allow_severity = 0;
12778 int deny_severity  = 0;
12779                 
12780 int main() {
12781 hosts_access()
12782 ; return 0; }
12783 EOF
12784 if { (eval echo configure:12785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12785   rm -rf conftest*
12786   have_wrappers=yes
12787 else
12788   echo "configure: failed program was:" >&5
12789   cat conftest.$ac_ext >&5
12790   rm -rf conftest*
12791   have_wrappers=no
12792 fi
12793 rm -f conftest*
12794         fi
12795
12796         if test $have_wrappers = yes ; then
12797                 cat >> confdefs.h <<\EOF
12798 #define HAVE_TCPD 1
12799 EOF
12800
12801                 WRAP_LIBS="-lwrap"
12802
12803                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
12804 echo "configure:12805: checking for main in -lnsl" >&5
12805 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
12806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12807   echo $ac_n "(cached) $ac_c" 1>&6
12808 else
12809   ac_save_LIBS="$LIBS"
12810 LIBS="-lnsl  $LIBS"
12811 cat > conftest.$ac_ext <<EOF
12812 #line 12813 "configure"
12813 #include "confdefs.h"
12814
12815 int main() {
12816 main()
12817 ; return 0; }
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12820   rm -rf conftest*
12821   eval "ac_cv_lib_$ac_lib_var=yes"
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   eval "ac_cv_lib_$ac_lib_var=no"
12827 fi
12828 rm -f conftest*
12829 LIBS="$ac_save_LIBS"
12830
12831 fi
12832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12833   echo "$ac_t""yes" 1>&6
12834     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12835     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12836   cat >> confdefs.h <<EOF
12837 #define $ac_tr_lib 1
12838 EOF
12839
12840   LIBS="-lnsl $LIBS"
12841
12842 else
12843   echo "$ac_t""no" 1>&6
12844 fi
12845
12846         else
12847                 echo "configure: warning: could not find -lwrap" 1>&2
12848                 if test $ol_enable_wrappers = yes ; then
12849                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
12850                 fi
12851
12852                 echo "configure: warning: disabling wrappers support" 1>&2
12853                 ol_enable_wrappers=no
12854                 WRAP_LIBS=""
12855         fi
12856 fi
12857
12858 if test $ol_enable_syslog != no ; then
12859         echo $ac_n "checking for openlog""... $ac_c" 1>&6
12860 echo "configure:12861: checking for openlog" >&5
12861 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
12862   echo $ac_n "(cached) $ac_c" 1>&6
12863 else
12864   cat > conftest.$ac_ext <<EOF
12865 #line 12866 "configure"
12866 #include "confdefs.h"
12867 /* System header to define __stub macros and hopefully few prototypes,
12868     which can conflict with char openlog(); below.  */
12869 #include <assert.h>
12870 /* Override any gcc2 internal prototype to avoid an error.  */
12871 /* We use char because int might match the return type of a gcc2
12872     builtin and then its argument prototype would still apply.  */
12873 char openlog();
12874
12875 int main() {
12876
12877 /* The GNU C library defines this for functions which it implements
12878     to always fail with ENOSYS.  Some functions are actually named
12879     something starting with __ and the normal name is an alias.  */
12880 #if defined (__stub_openlog) || defined (__stub___openlog)
12881 choke me
12882 #else
12883 openlog();
12884 #endif
12885
12886 ; return 0; }
12887 EOF
12888 if { (eval echo configure:12889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12889   rm -rf conftest*
12890   eval "ac_cv_func_openlog=yes"
12891 else
12892   echo "configure: failed program was:" >&5
12893   cat conftest.$ac_ext >&5
12894   rm -rf conftest*
12895   eval "ac_cv_func_openlog=no"
12896 fi
12897 rm -f conftest*
12898 fi
12899
12900 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
12901   echo "$ac_t""yes" 1>&6
12902   :
12903 else
12904   echo "$ac_t""no" 1>&6
12905 fi
12906
12907         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
12908                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
12909         fi
12910         ol_enable_syslog=$ac_cv_func_openlog
12911 fi
12912
12913 if test $ol_enable_tcl != no ; then
12914         for ac_hdr in tcl.h
12915 do
12916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12918 echo "configure:12919: checking for $ac_hdr" >&5
12919 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12920   echo $ac_n "(cached) $ac_c" 1>&6
12921 else
12922   cat > conftest.$ac_ext <<EOF
12923 #line 12924 "configure"
12924 #include "confdefs.h"
12925 #include <$ac_hdr>
12926 EOF
12927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12928 { (eval echo configure:12929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12930 if test -z "$ac_err"; then
12931   rm -rf conftest*
12932   eval "ac_cv_header_$ac_safe=yes"
12933 else
12934   echo "$ac_err" >&5
12935   echo "configure: failed program was:" >&5
12936   cat conftest.$ac_ext >&5
12937   rm -rf conftest*
12938   eval "ac_cv_header_$ac_safe=no"
12939 fi
12940 rm -f conftest*
12941 fi
12942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12943   echo "$ac_t""yes" 1>&6
12944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12945   cat >> confdefs.h <<EOF
12946 #define $ac_tr_hdr 1
12947 EOF
12948  
12949 else
12950   echo "$ac_t""no" 1>&6
12951 fi
12952 done
12953
12954
12955         if test $ac_cv_header_tcl_h != yes ; then
12956                 have_tcl=no
12957         else
12958                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
12959                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
12960 echo "configure:12961: checking for main in -l$lib" >&5
12961 ac_lib_var=`echo $lib'_'main | sed 'y%./+-%__p_%'`
12962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12963   echo $ac_n "(cached) $ac_c" 1>&6
12964 else
12965   ac_save_LIBS="$LIBS"
12966 LIBS="-l$lib  $LIBS"
12967 cat > conftest.$ac_ext <<EOF
12968 #line 12969 "configure"
12969 #include "confdefs.h"
12970
12971 int main() {
12972 main()
12973 ; return 0; }
12974 EOF
12975 if { (eval echo configure:12976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12976   rm -rf conftest*
12977   eval "ac_cv_lib_$ac_lib_var=yes"
12978 else
12979   echo "configure: failed program was:" >&5
12980   cat conftest.$ac_ext >&5
12981   rm -rf conftest*
12982   eval "ac_cv_lib_$ac_lib_var=no"
12983 fi
12984 rm -f conftest*
12985 LIBS="$ac_save_LIBS"
12986
12987 fi
12988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12989   echo "$ac_t""yes" 1>&6
12990   have_tcl=yes
12991                            if test x"$ol_with_tcl_module" = "xstatic" ; then
12992                                SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
12993                            else
12994                                MOD_TCL_LIB="-l${lib}"
12995                            fi;break
12996 else
12997   echo "$ac_t""no" 1>&6
12998 have_tcl=no
12999 fi
13000
13001                 done
13002         fi
13003
13004         if test $have_tcl != yes ; then
13005                 echo "configure: warning: could not find -ltcl" 1>&2
13006                 if test $ol_enable_tcl = yes ; then
13007                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
13008                 fi
13009
13010                 ol_enable_tcl=no
13011         fi
13012 fi
13013
13014 ol_link_termcap=no
13015 for ac_hdr in termcap.h ncurses.h
13016 do
13017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13019 echo "configure:13020: checking for $ac_hdr" >&5
13020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13021   echo $ac_n "(cached) $ac_c" 1>&6
13022 else
13023   cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 #include <$ac_hdr>
13027 EOF
13028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13029 { (eval echo configure:13030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13031 if test -z "$ac_err"; then
13032   rm -rf conftest*
13033   eval "ac_cv_header_$ac_safe=yes"
13034 else
13035   echo "$ac_err" >&5
13036   echo "configure: failed program was:" >&5
13037   cat conftest.$ac_ext >&5
13038   rm -rf conftest*
13039   eval "ac_cv_header_$ac_safe=no"
13040 fi
13041 rm -f conftest*
13042 fi
13043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13044   echo "$ac_t""yes" 1>&6
13045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13046   cat >> confdefs.h <<EOF
13047 #define $ac_tr_hdr 1
13048 EOF
13049  
13050 else
13051   echo "$ac_t""no" 1>&6
13052 fi
13053 done
13054
13055
13056 if test $ol_link_termcap = no ; then
13057         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
13058 echo "configure:13059: checking for tputs in -ltermcap" >&5
13059 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
13060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13061   echo $ac_n "(cached) $ac_c" 1>&6
13062 else
13063   ac_save_LIBS="$LIBS"
13064 LIBS="-ltermcap  $LIBS"
13065 cat > conftest.$ac_ext <<EOF
13066 #line 13067 "configure"
13067 #include "confdefs.h"
13068 /* Override any gcc2 internal prototype to avoid an error.  */
13069 /* We use char because int might match the return type of a gcc2
13070     builtin and then its argument prototype would still apply.  */
13071 char tputs();
13072
13073 int main() {
13074 tputs()
13075 ; return 0; }
13076 EOF
13077 if { (eval echo configure:13078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13078   rm -rf conftest*
13079   eval "ac_cv_lib_$ac_lib_var=yes"
13080 else
13081   echo "configure: failed program was:" >&5
13082   cat conftest.$ac_ext >&5
13083   rm -rf conftest*
13084   eval "ac_cv_lib_$ac_lib_var=no"
13085 fi
13086 rm -f conftest*
13087 LIBS="$ac_save_LIBS"
13088
13089 fi
13090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13091   echo "$ac_t""yes" 1>&6
13092   have_termcap=yes
13093 else
13094   echo "$ac_t""no" 1>&6
13095 have_termcap=no
13096 fi
13097
13098         if test $have_termcap = yes ; then
13099                 cat >> confdefs.h <<\EOF
13100 #define HAVE_TERMCAP 1
13101 EOF
13102
13103                 ol_link_termcap=yes
13104                 TERMCAP_LIBS=-ltermcap
13105         fi
13106 fi
13107
13108 if test $ol_link_termcap = no ; then
13109         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
13110 echo "configure:13111: checking for initscr in -lncurses" >&5
13111 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
13112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13113   echo $ac_n "(cached) $ac_c" 1>&6
13114 else
13115   ac_save_LIBS="$LIBS"
13116 LIBS="-lncurses  $LIBS"
13117 cat > conftest.$ac_ext <<EOF
13118 #line 13119 "configure"
13119 #include "confdefs.h"
13120 /* Override any gcc2 internal prototype to avoid an error.  */
13121 /* We use char because int might match the return type of a gcc2
13122     builtin and then its argument prototype would still apply.  */
13123 char initscr();
13124
13125 int main() {
13126 initscr()
13127 ; return 0; }
13128 EOF
13129 if { (eval echo configure:13130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13130   rm -rf conftest*
13131   eval "ac_cv_lib_$ac_lib_var=yes"
13132 else
13133   echo "configure: failed program was:" >&5
13134   cat conftest.$ac_ext >&5
13135   rm -rf conftest*
13136   eval "ac_cv_lib_$ac_lib_var=no"
13137 fi
13138 rm -f conftest*
13139 LIBS="$ac_save_LIBS"
13140
13141 fi
13142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13143   echo "$ac_t""yes" 1>&6
13144   have_ncurses=yes
13145 else
13146   echo "$ac_t""no" 1>&6
13147 have_ncurses=no
13148 fi
13149
13150         if test $have_ncurses = yes ; then
13151                 cat >> confdefs.h <<\EOF
13152 #define HAVE_NCURSES 1
13153 EOF
13154
13155                 ol_link_termcap=yes
13156                 TERMCAP_LIBS=-lncurses
13157         fi
13158 fi
13159
13160 if test $ol_link_termcap = no ; then
13161         cat >> confdefs.h <<\EOF
13162 #define NO_TERMCAP 1
13163 EOF
13164
13165         TERMCAP_LIBS=
13166 fi
13167
13168 ol_link_sasl=no
13169 ol_link_spasswd=no
13170 if test $ol_with_cyrus_sasl != no ; then
13171         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
13172 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
13173 echo "configure:13174: checking for sasl.h" >&5
13174 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13175   echo $ac_n "(cached) $ac_c" 1>&6
13176 else
13177   cat > conftest.$ac_ext <<EOF
13178 #line 13179 "configure"
13179 #include "confdefs.h"
13180 #include <sasl.h>
13181 EOF
13182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13183 { (eval echo configure:13184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13185 if test -z "$ac_err"; then
13186   rm -rf conftest*
13187   eval "ac_cv_header_$ac_safe=yes"
13188 else
13189   echo "$ac_err" >&5
13190   echo "configure: failed program was:" >&5
13191   cat conftest.$ac_ext >&5
13192   rm -rf conftest*
13193   eval "ac_cv_header_$ac_safe=no"
13194 fi
13195 rm -f conftest*
13196 fi
13197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13198   echo "$ac_t""yes" 1>&6
13199   :
13200 else
13201   echo "$ac_t""no" 1>&6
13202 fi
13203
13204
13205         if test $ac_cv_header_sasl_h = yes ; then
13206                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
13207 echo "configure:13208: checking for sasl_client_init in -lsasl" >&5
13208 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-%__p_%'`
13209 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13210   echo $ac_n "(cached) $ac_c" 1>&6
13211 else
13212   ac_save_LIBS="$LIBS"
13213 LIBS="-lsasl  $LIBS"
13214 cat > conftest.$ac_ext <<EOF
13215 #line 13216 "configure"
13216 #include "confdefs.h"
13217 /* Override any gcc2 internal prototype to avoid an error.  */
13218 /* We use char because int might match the return type of a gcc2
13219     builtin and then its argument prototype would still apply.  */
13220 char sasl_client_init();
13221
13222 int main() {
13223 sasl_client_init()
13224 ; return 0; }
13225 EOF
13226 if { (eval echo configure:13227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13227   rm -rf conftest*
13228   eval "ac_cv_lib_$ac_lib_var=yes"
13229 else
13230   echo "configure: failed program was:" >&5
13231   cat conftest.$ac_ext >&5
13232   rm -rf conftest*
13233   eval "ac_cv_lib_$ac_lib_var=no"
13234 fi
13235 rm -f conftest*
13236 LIBS="$ac_save_LIBS"
13237
13238 fi
13239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13240   echo "$ac_t""yes" 1>&6
13241   have_cyrus_sasl=yes
13242 else
13243   echo "$ac_t""no" 1>&6
13244 have_cyrus_sasl=no
13245 fi
13246
13247
13248                 if test $have_cyrus_sasl != no ; then
13249                         SASL_LIBS="-lsasl"
13250                         cat >> confdefs.h <<\EOF
13251 #define HAVE_CYRUS_SASL 1
13252 EOF
13253
13254                         ol_link_sasl=yes
13255                 fi
13256         fi
13257
13258         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
13259                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
13260         fi
13261 fi
13262
13263 if test $cross_compiling != yes ; then
13264         dev=no
13265         if test -r /dev/urandom ; then
13266                 dev="/dev/urandom";
13267         elif test -r /idev/urandom ; then
13268                 dev="/idev/urandom";
13269         elif test -r /dev/srandom ; then
13270                 dev="/dev/srandom";
13271         elif test -r /dev/random ; then
13272                 dev="/dev/random";
13273         elif test -r /idev/random ; then
13274                 dev="/idev/random";
13275         fi
13276
13277         if test $dev != no ; then
13278                 cat >> confdefs.h <<EOF
13279 #define URANDOM_DEVICE "$dev"
13280 EOF
13281
13282         fi
13283 fi
13284
13285 ol_link_fetch=no
13286 if test $ol_with_fetch != no ; then
13287         ol_LIBS=$LIBS
13288 LIBS="-lfetch -lcom_err $LIBS"
13289 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
13290 echo "configure:13291: checking fetch(3) library" >&5
13291 if eval "test \"`echo '$''{'ol_cv_lib_fetch'+set}'`\" = set"; then
13292   echo $ac_n "(cached) $ac_c" 1>&6
13293 else
13294   
13295         cat > conftest.$ac_ext <<EOF
13296 #line 13297 "configure"
13297 #include "confdefs.h"
13298
13299 #include <sys/param.h>
13300 #include <stdio.h>
13301 #include <fetch.h>
13302 int main() {
13303 struct url *u = fetchParseURL("file:///"); 
13304 ; return 0; }
13305 EOF
13306 if { (eval echo configure:13307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13307   rm -rf conftest*
13308   ol_cv_lib_fetch=yes
13309 else
13310   echo "configure: failed program was:" >&5
13311   cat conftest.$ac_ext >&5
13312   rm -rf conftest*
13313   ol_cv_lib_fetch=no
13314 fi
13315 rm -f conftest*
13316 fi
13317
13318 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
13319 LIBS=$ol_LIBS
13320 if test $ol_cv_lib_fetch != no ; then
13321         ol_link_fetch="-lfetch -lcom_err"
13322         cat >> confdefs.h <<\EOF
13323 #define HAVE_FETCH 1
13324 EOF
13325
13326 fi
13327
13328
13329         if test $ol_cv_lib_fetch != no ; then
13330                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
13331                 ol_link_fetch=freebsd
13332
13333         elif test $ol_with_fetch != auto ; then
13334                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
13335         fi 
13336 fi
13337
13338 ol_link_readline=no
13339 if test $ol_with_readline != no ; then
13340         for ac_hdr in readline/readline.h readline/history.h
13341 do
13342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13344 echo "configure:13345: checking for $ac_hdr" >&5
13345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13346   echo $ac_n "(cached) $ac_c" 1>&6
13347 else
13348   cat > conftest.$ac_ext <<EOF
13349 #line 13350 "configure"
13350 #include "confdefs.h"
13351 #include <$ac_hdr>
13352 EOF
13353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13354 { (eval echo configure:13355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13356 if test -z "$ac_err"; then
13357   rm -rf conftest*
13358   eval "ac_cv_header_$ac_safe=yes"
13359 else
13360   echo "$ac_err" >&5
13361   echo "configure: failed program was:" >&5
13362   cat conftest.$ac_ext >&5
13363   rm -rf conftest*
13364   eval "ac_cv_header_$ac_safe=no"
13365 fi
13366 rm -f conftest*
13367 fi
13368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13369   echo "$ac_t""yes" 1>&6
13370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13371   cat >> confdefs.h <<EOF
13372 #define $ac_tr_hdr 1
13373 EOF
13374  
13375 else
13376   echo "$ac_t""no" 1>&6
13377 fi
13378 done
13379
13380
13381         if test $ac_cv_header_readline_readline_h = yes ; then
13382                 save_LIBS="$LIBS"
13383                 LIBS="$TERMCAP_LIBS $LIBS"
13384                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
13385 echo "configure:13386: checking for readline in -lreadline" >&5
13386 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
13387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13388   echo $ac_n "(cached) $ac_c" 1>&6
13389 else
13390   ac_save_LIBS="$LIBS"
13391 LIBS="-lreadline  $LIBS"
13392 cat > conftest.$ac_ext <<EOF
13393 #line 13394 "configure"
13394 #include "confdefs.h"
13395 /* Override any gcc2 internal prototype to avoid an error.  */
13396 /* We use char because int might match the return type of a gcc2
13397     builtin and then its argument prototype would still apply.  */
13398 char readline();
13399
13400 int main() {
13401 readline()
13402 ; return 0; }
13403 EOF
13404 if { (eval echo configure:13405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13405   rm -rf conftest*
13406   eval "ac_cv_lib_$ac_lib_var=yes"
13407 else
13408   echo "configure: failed program was:" >&5
13409   cat conftest.$ac_ext >&5
13410   rm -rf conftest*
13411   eval "ac_cv_lib_$ac_lib_var=no"
13412 fi
13413 rm -f conftest*
13414 LIBS="$ac_save_LIBS"
13415
13416 fi
13417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13418   echo "$ac_t""yes" 1>&6
13419   have_readline=yes
13420 else
13421   echo "$ac_t""no" 1>&6
13422 have_readline=no
13423 fi
13424
13425                 LIBS="$save_LIBS"
13426                         
13427                 if test $have_readline = yes ; then
13428                         ol_with_readline=found
13429                         ol_link_readline=yes
13430
13431                         READLINE_LIBS="-lreadline"
13432                 fi
13433         fi
13434 fi
13435
13436 if test $ol_link_readline = yes ; then
13437         cat >> confdefs.h <<\EOF
13438 #define HAVE_READLINE 1
13439 EOF
13440
13441 fi
13442
13443
13444 if test $ol_enable_crypt != no ; then
13445         echo $ac_n "checking for crypt""... $ac_c" 1>&6
13446 echo "configure:13447: checking for crypt" >&5
13447 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
13448   echo $ac_n "(cached) $ac_c" 1>&6
13449 else
13450   cat > conftest.$ac_ext <<EOF
13451 #line 13452 "configure"
13452 #include "confdefs.h"
13453 /* System header to define __stub macros and hopefully few prototypes,
13454     which can conflict with char crypt(); below.  */
13455 #include <assert.h>
13456 /* Override any gcc2 internal prototype to avoid an error.  */
13457 /* We use char because int might match the return type of a gcc2
13458     builtin and then its argument prototype would still apply.  */
13459 char crypt();
13460
13461 int main() {
13462
13463 /* The GNU C library defines this for functions which it implements
13464     to always fail with ENOSYS.  Some functions are actually named
13465     something starting with __ and the normal name is an alias.  */
13466 #if defined (__stub_crypt) || defined (__stub___crypt)
13467 choke me
13468 #else
13469 crypt();
13470 #endif
13471
13472 ; return 0; }
13473 EOF
13474 if { (eval echo configure:13475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13475   rm -rf conftest*
13476   eval "ac_cv_func_crypt=yes"
13477 else
13478   echo "configure: failed program was:" >&5
13479   cat conftest.$ac_ext >&5
13480   rm -rf conftest*
13481   eval "ac_cv_func_crypt=no"
13482 fi
13483 rm -f conftest*
13484 fi
13485
13486 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
13487   echo "$ac_t""yes" 1>&6
13488   have_crypt=yes
13489 else
13490   echo "$ac_t""no" 1>&6
13491
13492                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13493 echo "configure:13494: checking for crypt in -lcrypt" >&5
13494 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
13495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13496   echo $ac_n "(cached) $ac_c" 1>&6
13497 else
13498   ac_save_LIBS="$LIBS"
13499 LIBS="-lcrypt  $LIBS"
13500 cat > conftest.$ac_ext <<EOF
13501 #line 13502 "configure"
13502 #include "confdefs.h"
13503 /* Override any gcc2 internal prototype to avoid an error.  */
13504 /* We use char because int might match the return type of a gcc2
13505     builtin and then its argument prototype would still apply.  */
13506 char crypt();
13507
13508 int main() {
13509 crypt()
13510 ; return 0; }
13511 EOF
13512 if { (eval echo configure:13513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13513   rm -rf conftest*
13514   eval "ac_cv_lib_$ac_lib_var=yes"
13515 else
13516   echo "configure: failed program was:" >&5
13517   cat conftest.$ac_ext >&5
13518   rm -rf conftest*
13519   eval "ac_cv_lib_$ac_lib_var=no"
13520 fi
13521 rm -f conftest*
13522 LIBS="$ac_save_LIBS"
13523
13524 fi
13525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13526   echo "$ac_t""yes" 1>&6
13527   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
13528                         have_crypt=yes
13529 else
13530   echo "$ac_t""no" 1>&6
13531 have_crypt=no
13532 fi
13533
13534 fi
13535
13536
13537         if test $have_crypt = yes ; then
13538                 cat >> confdefs.h <<\EOF
13539 #define HAVE_CRYPT 1
13540 EOF
13541
13542         else
13543                 echo "configure: warning: could not find crypt" 1>&2
13544                 if test $ol_enable_crypt = yes ; then
13545                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
13546                 fi
13547
13548                 echo "configure: warning: disabling crypt support" 1>&2
13549                 ol_enable_crypt=no
13550         fi
13551 fi
13552
13553 if test $ol_enable_proctitle != no ; then
13554         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
13555 echo "configure:13556: checking for setproctitle" >&5
13556 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
13557   echo $ac_n "(cached) $ac_c" 1>&6
13558 else
13559   cat > conftest.$ac_ext <<EOF
13560 #line 13561 "configure"
13561 #include "confdefs.h"
13562 /* System header to define __stub macros and hopefully few prototypes,
13563     which can conflict with char setproctitle(); below.  */
13564 #include <assert.h>
13565 /* Override any gcc2 internal prototype to avoid an error.  */
13566 /* We use char because int might match the return type of a gcc2
13567     builtin and then its argument prototype would still apply.  */
13568 char setproctitle();
13569
13570 int main() {
13571
13572 /* The GNU C library defines this for functions which it implements
13573     to always fail with ENOSYS.  Some functions are actually named
13574     something starting with __ and the normal name is an alias.  */
13575 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
13576 choke me
13577 #else
13578 setproctitle();
13579 #endif
13580
13581 ; return 0; }
13582 EOF
13583 if { (eval echo configure:13584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13584   rm -rf conftest*
13585   eval "ac_cv_func_setproctitle=yes"
13586 else
13587   echo "configure: failed program was:" >&5
13588   cat conftest.$ac_ext >&5
13589   rm -rf conftest*
13590   eval "ac_cv_func_setproctitle=no"
13591 fi
13592 rm -f conftest*
13593 fi
13594
13595 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
13596   echo "$ac_t""yes" 1>&6
13597   have_setproctitle=yes
13598 else
13599   echo "$ac_t""no" 1>&6
13600
13601                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
13602 echo "configure:13603: checking for setproctitle in -lutil" >&5
13603 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
13604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13605   echo $ac_n "(cached) $ac_c" 1>&6
13606 else
13607   ac_save_LIBS="$LIBS"
13608 LIBS="-lutil  $LIBS"
13609 cat > conftest.$ac_ext <<EOF
13610 #line 13611 "configure"
13611 #include "confdefs.h"
13612 /* Override any gcc2 internal prototype to avoid an error.  */
13613 /* We use char because int might match the return type of a gcc2
13614     builtin and then its argument prototype would still apply.  */
13615 char setproctitle();
13616
13617 int main() {
13618 setproctitle()
13619 ; return 0; }
13620 EOF
13621 if { (eval echo configure:13622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13622   rm -rf conftest*
13623   eval "ac_cv_lib_$ac_lib_var=yes"
13624 else
13625   echo "configure: failed program was:" >&5
13626   cat conftest.$ac_ext >&5
13627   rm -rf conftest*
13628   eval "ac_cv_lib_$ac_lib_var=no"
13629 fi
13630 rm -f conftest*
13631 LIBS="$ac_save_LIBS"
13632
13633 fi
13634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13635   echo "$ac_t""yes" 1>&6
13636   have_setproctitle=yes
13637                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
13638 else
13639   echo "$ac_t""no" 1>&6
13640 have_setproctitle=no
13641                         LIBOBJS="$LIBOBJS setproctitle.o"
13642                         LIBSRCS="$LIBSRCS setproctitle.c"
13643 fi
13644
13645 fi
13646
13647
13648         if test $have_setproctitle = yes ; then
13649                 cat >> confdefs.h <<\EOF
13650 #define HAVE_SETPROCTITLE 1
13651 EOF
13652
13653         fi
13654 fi
13655
13656 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
13657 echo "configure:13658: checking for ANSI C header files" >&5
13658 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
13659   echo $ac_n "(cached) $ac_c" 1>&6
13660 else
13661   cat > conftest.$ac_ext <<EOF
13662 #line 13663 "configure"
13663 #include "confdefs.h"
13664 #include <stdlib.h>
13665 #include <stdarg.h>
13666 #include <string.h>
13667 #include <float.h>
13668 EOF
13669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13670 { (eval echo configure:13671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13672 if test -z "$ac_err"; then
13673   rm -rf conftest*
13674   ac_cv_header_stdc=yes
13675 else
13676   echo "$ac_err" >&5
13677   echo "configure: failed program was:" >&5
13678   cat conftest.$ac_ext >&5
13679   rm -rf conftest*
13680   ac_cv_header_stdc=no
13681 fi
13682 rm -f conftest*
13683
13684 if test $ac_cv_header_stdc = yes; then
13685   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13686 cat > conftest.$ac_ext <<EOF
13687 #line 13688 "configure"
13688 #include "confdefs.h"
13689 #include <string.h>
13690 EOF
13691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13692   egrep "memchr" >/dev/null 2>&1; then
13693   :
13694 else
13695   rm -rf conftest*
13696   ac_cv_header_stdc=no
13697 fi
13698 rm -f conftest*
13699
13700 fi
13701
13702 if test $ac_cv_header_stdc = yes; then
13703   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13704 cat > conftest.$ac_ext <<EOF
13705 #line 13706 "configure"
13706 #include "confdefs.h"
13707 #include <stdlib.h>
13708 EOF
13709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13710   egrep "free" >/dev/null 2>&1; then
13711   :
13712 else
13713   rm -rf conftest*
13714   ac_cv_header_stdc=no
13715 fi
13716 rm -f conftest*
13717
13718 fi
13719
13720 if test $ac_cv_header_stdc = yes; then
13721   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13722 if test "$cross_compiling" = yes; then
13723   :
13724 else
13725   cat > conftest.$ac_ext <<EOF
13726 #line 13727 "configure"
13727 #include "confdefs.h"
13728 #include <ctype.h>
13729 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13730 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13731 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13732 int main () { int i; for (i = 0; i < 256; i++)
13733 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13734 exit (0); }
13735
13736 EOF
13737 if { (eval echo configure:13738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13738 then
13739   :
13740 else
13741   echo "configure: failed program was:" >&5
13742   cat conftest.$ac_ext >&5
13743   rm -fr conftest*
13744   ac_cv_header_stdc=no
13745 fi
13746 rm -fr conftest*
13747 fi
13748
13749 fi
13750 fi
13751
13752 echo "$ac_t""$ac_cv_header_stdc" 1>&6
13753 if test $ac_cv_header_stdc = yes; then
13754   cat >> confdefs.h <<\EOF
13755 #define STDC_HEADERS 1
13756 EOF
13757
13758 fi
13759
13760 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
13761 echo "configure:13762: checking for mode_t" >&5
13762 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
13763   echo $ac_n "(cached) $ac_c" 1>&6
13764 else
13765   cat > conftest.$ac_ext <<EOF
13766 #line 13767 "configure"
13767 #include "confdefs.h"
13768 #include <sys/types.h>
13769 #if STDC_HEADERS
13770 #include <stdlib.h>
13771 #include <stddef.h>
13772 #endif
13773 EOF
13774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13775   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13776   rm -rf conftest*
13777   ac_cv_type_mode_t=yes
13778 else
13779   rm -rf conftest*
13780   ac_cv_type_mode_t=no
13781 fi
13782 rm -f conftest*
13783
13784 fi
13785 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
13786 if test $ac_cv_type_mode_t = no; then
13787   cat >> confdefs.h <<\EOF
13788 #define mode_t int
13789 EOF
13790
13791 fi
13792
13793 echo $ac_n "checking for off_t""... $ac_c" 1>&6
13794 echo "configure:13795: checking for off_t" >&5
13795 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
13796   echo $ac_n "(cached) $ac_c" 1>&6
13797 else
13798   cat > conftest.$ac_ext <<EOF
13799 #line 13800 "configure"
13800 #include "confdefs.h"
13801 #include <sys/types.h>
13802 #if STDC_HEADERS
13803 #include <stdlib.h>
13804 #include <stddef.h>
13805 #endif
13806 EOF
13807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13808   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13809   rm -rf conftest*
13810   ac_cv_type_off_t=yes
13811 else
13812   rm -rf conftest*
13813   ac_cv_type_off_t=no
13814 fi
13815 rm -f conftest*
13816
13817 fi
13818 echo "$ac_t""$ac_cv_type_off_t" 1>&6
13819 if test $ac_cv_type_off_t = no; then
13820   cat >> confdefs.h <<\EOF
13821 #define off_t long
13822 EOF
13823
13824 fi
13825
13826 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13827 echo "configure:13828: checking for pid_t" >&5
13828 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
13829   echo $ac_n "(cached) $ac_c" 1>&6
13830 else
13831   cat > conftest.$ac_ext <<EOF
13832 #line 13833 "configure"
13833 #include "confdefs.h"
13834 #include <sys/types.h>
13835 #if STDC_HEADERS
13836 #include <stdlib.h>
13837 #include <stddef.h>
13838 #endif
13839 EOF
13840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13841   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13842   rm -rf conftest*
13843   ac_cv_type_pid_t=yes
13844 else
13845   rm -rf conftest*
13846   ac_cv_type_pid_t=no
13847 fi
13848 rm -f conftest*
13849
13850 fi
13851 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
13852 if test $ac_cv_type_pid_t = no; then
13853   cat >> confdefs.h <<\EOF
13854 #define pid_t int
13855 EOF
13856
13857 fi
13858
13859 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
13860 echo "configure:13861: checking for ptrdiff_t" >&5
13861 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
13862   echo $ac_n "(cached) $ac_c" 1>&6
13863 else
13864   cat > conftest.$ac_ext <<EOF
13865 #line 13866 "configure"
13866 #include "confdefs.h"
13867 #include <stddef.h>
13868 int main() {
13869 ptrdiff_t p
13870 ; return 0; }
13871 EOF
13872 if { (eval echo configure:13873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13873   rm -rf conftest*
13874   am_cv_type_ptrdiff_t=yes
13875 else
13876   echo "configure: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   rm -rf conftest*
13879   am_cv_type_ptrdiff_t=no
13880 fi
13881 rm -f conftest*
13882 fi
13883
13884 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
13885    if test $am_cv_type_ptrdiff_t = yes; then
13886      cat >> confdefs.h <<\EOF
13887 #define HAVE_PTRDIFF_T 1
13888 EOF
13889
13890    fi
13891
13892 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13893 echo "configure:13894: checking return type of signal handlers" >&5
13894 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
13895   echo $ac_n "(cached) $ac_c" 1>&6
13896 else
13897   cat > conftest.$ac_ext <<EOF
13898 #line 13899 "configure"
13899 #include "confdefs.h"
13900 #include <sys/types.h>
13901 #include <signal.h>
13902 #ifdef signal
13903 #undef signal
13904 #endif
13905 #ifdef __cplusplus
13906 extern "C" void (*signal (int, void (*)(int)))(int);
13907 #else
13908 void (*signal ()) ();
13909 #endif
13910
13911 int main() {
13912 int i;
13913 ; return 0; }
13914 EOF
13915 if { (eval echo configure:13916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13916   rm -rf conftest*
13917   ac_cv_type_signal=void
13918 else
13919   echo "configure: failed program was:" >&5
13920   cat conftest.$ac_ext >&5
13921   rm -rf conftest*
13922   ac_cv_type_signal=int
13923 fi
13924 rm -f conftest*
13925 fi
13926
13927 echo "$ac_t""$ac_cv_type_signal" 1>&6
13928 cat >> confdefs.h <<EOF
13929 #define RETSIGTYPE $ac_cv_type_signal
13930 EOF
13931
13932
13933 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13934 echo "configure:13935: checking for size_t" >&5
13935 if eval "test \"`echo '$''{'ac_cv_type_size_t'+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 #if STDC_HEADERS
13943 #include <stdlib.h>
13944 #include <stddef.h>
13945 #endif
13946 EOF
13947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13948   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13949   rm -rf conftest*
13950   ac_cv_type_size_t=yes
13951 else
13952   rm -rf conftest*
13953   ac_cv_type_size_t=no
13954 fi
13955 rm -f conftest*
13956
13957 fi
13958 echo "$ac_t""$ac_cv_type_size_t" 1>&6
13959 if test $ac_cv_type_size_t = no; then
13960   cat >> confdefs.h <<\EOF
13961 #define size_t unsigned
13962 EOF
13963
13964 fi
13965
13966
13967 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
13968 echo "configure:13969: checking for ssize_t" >&5
13969 if eval "test \"`echo '$''{'ac_cv_type_ssize_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 #if STDC_HEADERS
13977 #include <stdlib.h>
13978 #include <stddef.h>
13979 #endif
13980 EOF
13981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13982   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13983   rm -rf conftest*
13984   ac_cv_type_ssize_t=yes
13985 else
13986   rm -rf conftest*
13987   ac_cv_type_ssize_t=no
13988 fi
13989 rm -f conftest*
13990
13991 fi
13992 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
13993 if test $ac_cv_type_ssize_t = no; then
13994   cat >> confdefs.h <<\EOF
13995 #define ssize_t signed int
13996 EOF
13997
13998 fi
13999
14000 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
14001 echo "configure:14002: checking for caddr_t" >&5
14002 if eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then
14003   echo $ac_n "(cached) $ac_c" 1>&6
14004 else
14005   cat > conftest.$ac_ext <<EOF
14006 #line 14007 "configure"
14007 #include "confdefs.h"
14008 #include <sys/types.h>
14009 #if STDC_HEADERS
14010 #include <stdlib.h>
14011 #include <stddef.h>
14012 #endif
14013 EOF
14014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14015   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
14016   rm -rf conftest*
14017   ac_cv_type_caddr_t=yes
14018 else
14019   rm -rf conftest*
14020   ac_cv_type_caddr_t=no
14021 fi
14022 rm -f conftest*
14023
14024 fi
14025 echo "$ac_t""$ac_cv_type_caddr_t" 1>&6
14026 if test $ac_cv_type_caddr_t = no; then
14027   cat >> confdefs.h <<\EOF
14028 #define caddr_t char *
14029 EOF
14030
14031 fi
14032
14033
14034 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
14035 echo "configure:14036: checking for socklen_t" >&5
14036 if eval "test \"`echo '$''{'ol_cv_type_socklen_t'+set}'`\" = set"; then
14037   echo $ac_n "(cached) $ac_c" 1>&6
14038 else
14039   cat > conftest.$ac_ext <<EOF
14040 #line 14041 "configure"
14041 #include "confdefs.h"
14042
14043 #ifdef HAVE_SYS_TYPES_H
14044 #include <sys/types.h>
14045 #endif
14046 #ifdef HAVE_SYS_SOCKET_H
14047 #include <sys/socket.h>
14048 #endif
14049
14050 int main() {
14051 socklen_t len;
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_type_socklen_t=yes
14057 else
14058   echo "configure: failed program was:" >&5
14059   cat conftest.$ac_ext >&5
14060   rm -rf conftest*
14061   ol_cv_type_socklen_t=no
14062 fi
14063 rm -f conftest*
14064 fi
14065
14066 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
14067   if test $ol_cv_type_socklen_t = no; then
14068     cat >> confdefs.h <<\EOF
14069 #define socklen_t int
14070 EOF
14071
14072   fi
14073  
14074 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
14075 echo "configure:14076: checking for st_blksize in struct stat" >&5
14076 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
14077   echo $ac_n "(cached) $ac_c" 1>&6
14078 else
14079   cat > conftest.$ac_ext <<EOF
14080 #line 14081 "configure"
14081 #include "confdefs.h"
14082 #include <sys/types.h>
14083 #include <sys/stat.h>
14084 int main() {
14085 struct stat s; s.st_blksize;
14086 ; return 0; }
14087 EOF
14088 if { (eval echo configure:14089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14089   rm -rf conftest*
14090   ac_cv_struct_st_blksize=yes
14091 else
14092   echo "configure: failed program was:" >&5
14093   cat conftest.$ac_ext >&5
14094   rm -rf conftest*
14095   ac_cv_struct_st_blksize=no
14096 fi
14097 rm -f conftest*
14098 fi
14099
14100 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
14101 if test $ac_cv_struct_st_blksize = yes; then
14102   cat >> confdefs.h <<\EOF
14103 #define HAVE_ST_BLKSIZE 1
14104 EOF
14105
14106 fi
14107
14108 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
14109 echo "configure:14110: checking whether time.h and sys/time.h may both be included" >&5
14110 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
14111   echo $ac_n "(cached) $ac_c" 1>&6
14112 else
14113   cat > conftest.$ac_ext <<EOF
14114 #line 14115 "configure"
14115 #include "confdefs.h"
14116 #include <sys/types.h>
14117 #include <sys/time.h>
14118 #include <time.h>
14119 int main() {
14120 struct tm *tp;
14121 ; return 0; }
14122 EOF
14123 if { (eval echo configure:14124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14124   rm -rf conftest*
14125   ac_cv_header_time=yes
14126 else
14127   echo "configure: failed program was:" >&5
14128   cat conftest.$ac_ext >&5
14129   rm -rf conftest*
14130   ac_cv_header_time=no
14131 fi
14132 rm -f conftest*
14133 fi
14134
14135 echo "$ac_t""$ac_cv_header_time" 1>&6
14136 if test $ac_cv_header_time = yes; then
14137   cat >> confdefs.h <<\EOF
14138 #define TIME_WITH_SYS_TIME 1
14139 EOF
14140
14141 fi
14142
14143 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
14144 echo "configure:14145: checking whether struct tm is in sys/time.h or time.h" >&5
14145 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
14146   echo $ac_n "(cached) $ac_c" 1>&6
14147 else
14148   cat > conftest.$ac_ext <<EOF
14149 #line 14150 "configure"
14150 #include "confdefs.h"
14151 #include <sys/types.h>
14152 #include <time.h>
14153 int main() {
14154 struct tm *tp; tp->tm_sec;
14155 ; return 0; }
14156 EOF
14157 if { (eval echo configure:14158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14158   rm -rf conftest*
14159   ac_cv_struct_tm=time.h
14160 else
14161   echo "configure: failed program was:" >&5
14162   cat conftest.$ac_ext >&5
14163   rm -rf conftest*
14164   ac_cv_struct_tm=sys/time.h
14165 fi
14166 rm -f conftest*
14167 fi
14168
14169 echo "$ac_t""$ac_cv_struct_tm" 1>&6
14170 if test $ac_cv_struct_tm = sys/time.h; then
14171   cat >> confdefs.h <<\EOF
14172 #define TM_IN_SYS_TIME 1
14173 EOF
14174
14175 fi
14176
14177 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
14178 echo "configure:14179: checking for uid_t in sys/types.h" >&5
14179 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
14180   echo $ac_n "(cached) $ac_c" 1>&6
14181 else
14182   cat > conftest.$ac_ext <<EOF
14183 #line 14184 "configure"
14184 #include "confdefs.h"
14185 #include <sys/types.h>
14186 EOF
14187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14188   egrep "uid_t" >/dev/null 2>&1; then
14189   rm -rf conftest*
14190   ac_cv_type_uid_t=yes
14191 else
14192   rm -rf conftest*
14193   ac_cv_type_uid_t=no
14194 fi
14195 rm -f conftest*
14196
14197 fi
14198
14199 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
14200 if test $ac_cv_type_uid_t = no; then
14201   cat >> confdefs.h <<\EOF
14202 #define uid_t int
14203 EOF
14204
14205   cat >> confdefs.h <<\EOF
14206 #define gid_t int
14207 EOF
14208
14209 fi
14210
14211 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
14212 echo "configure:14213: checking for sig_atomic_t" >&5
14213 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
14214   echo $ac_n "(cached) $ac_c" 1>&6
14215 else
14216   cat > conftest.$ac_ext <<EOF
14217 #line 14218 "configure"
14218 #include "confdefs.h"
14219 #include <signal.h>
14220 int main() {
14221 sig_atomic_t atomic;
14222 ; return 0; }
14223 EOF
14224 if { (eval echo configure:14225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14225   rm -rf conftest*
14226   ol_cv_type_sig_atomic_t=yes
14227 else
14228   echo "configure: failed program was:" >&5
14229   cat conftest.$ac_ext >&5
14230   rm -rf conftest*
14231   ol_cv_type_sig_atomic_t=no
14232 fi
14233 rm -f conftest*
14234 fi
14235
14236 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
14237   if test $ol_cv_type_sig_atomic_t = no; then
14238     cat >> confdefs.h <<\EOF
14239 #define sig_atomic_t int
14240 EOF
14241
14242   fi
14243  
14244
14245
14246 # test for pw_gecos in struct passwd
14247 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
14248 echo "configure:14249: checking struct passwd for pw_gecos" >&5
14249 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   
14253         cat > conftest.$ac_ext <<EOF
14254 #line 14255 "configure"
14255 #include "confdefs.h"
14256 #include <pwd.h>
14257 int main() {
14258
14259         struct passwd pwd;
14260         pwd.pw_gecos = pwd.pw_name;
14261
14262 ; return 0; }
14263 EOF
14264 if { (eval echo configure:14265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14265   rm -rf conftest*
14266   ol_cv_struct_passwd_pw_gecos=yes
14267 else
14268   echo "configure: failed program was:" >&5
14269   cat conftest.$ac_ext >&5
14270   rm -rf conftest*
14271   ol_cv_struct_passwd_pw_gecos=no
14272 fi
14273 rm -f conftest*
14274 fi
14275
14276 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
14277 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
14278         cat >> confdefs.h <<\EOF
14279 #define HAVE_PW_GECOS 1
14280 EOF
14281
14282 fi
14283
14284 # test for pw_passwd in struct passwd
14285 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
14286 echo "configure:14287: checking struct passwd for pw_passwd" >&5
14287 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
14288   echo $ac_n "(cached) $ac_c" 1>&6
14289 else
14290   
14291         cat > conftest.$ac_ext <<EOF
14292 #line 14293 "configure"
14293 #include "confdefs.h"
14294 #include <pwd.h>
14295 int main() {
14296
14297         struct passwd pwd;
14298         pwd.pw_passwd = pwd.pw_name;
14299
14300 ; return 0; }
14301 EOF
14302 if { (eval echo configure:14303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14303   rm -rf conftest*
14304   ol_cv_struct_passwd_pw_passwd=yes
14305 else
14306   echo "configure: failed program was:" >&5
14307   cat conftest.$ac_ext >&5
14308   rm -rf conftest*
14309   ol_cv_struct_passwd_pw_passwd=no
14310 fi
14311 rm -f conftest*
14312 fi
14313
14314 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
14315 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
14316         cat >> confdefs.h <<\EOF
14317 #define HAVE_PW_PASSWD 1
14318 EOF
14319
14320 fi
14321
14322
14323 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
14324 echo "configure:14325: checking if toupper() requires islower()" >&5
14325 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
14326   echo $ac_n "(cached) $ac_c" 1>&6
14327 else
14328   
14329         if test "$cross_compiling" = yes; then
14330   ol_cv_c_upper_lower=safe
14331 else
14332   cat > conftest.$ac_ext <<EOF
14333 #line 14334 "configure"
14334 #include "confdefs.h"
14335
14336 #include <ctype.h>
14337 main()
14338 {
14339         if ('C' == toupper('C'))
14340                 exit(0);
14341         else
14342                 exit(1);
14343 }
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14346 then
14347   ol_cv_c_upper_lower=no
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -fr conftest*
14352   ol_cv_c_upper_lower=yes
14353 fi
14354 rm -fr conftest*
14355 fi
14356
14357 fi
14358
14359 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
14360 if test $ol_cv_c_upper_lower != no ; then
14361         cat >> confdefs.h <<\EOF
14362 #define C_UPPER_LOWER 1
14363 EOF
14364
14365 fi
14366
14367 echo $ac_n "checking for working const""... $ac_c" 1>&6
14368 echo "configure:14369: checking for working const" >&5
14369 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
14370   echo $ac_n "(cached) $ac_c" 1>&6
14371 else
14372   cat > conftest.$ac_ext <<EOF
14373 #line 14374 "configure"
14374 #include "confdefs.h"
14375
14376 int main() {
14377
14378 /* Ultrix mips cc rejects this.  */
14379 typedef int charset[2]; const charset x;
14380 /* SunOS 4.1.1 cc rejects this.  */
14381 char const *const *ccp;
14382 char **p;
14383 /* NEC SVR4.0.2 mips cc rejects this.  */
14384 struct point {int x, y;};
14385 static struct point const zero = {0,0};
14386 /* AIX XL C 1.02.0.0 rejects this.
14387    It does not let you subtract one const X* pointer from another in an arm
14388    of an if-expression whose if-part is not a constant expression */
14389 const char *g = "string";
14390 ccp = &g + (g ? g-g : 0);
14391 /* HPUX 7.0 cc rejects these. */
14392 ++ccp;
14393 p = (char**) ccp;
14394 ccp = (char const *const *) p;
14395 { /* SCO 3.2v4 cc rejects this.  */
14396   char *t;
14397   char const *s = 0 ? (char *) 0 : (char const *) 0;
14398
14399   *t++ = 0;
14400 }
14401 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14402   int x[] = {25, 17};
14403   const int *foo = &x[0];
14404   ++foo;
14405 }
14406 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14407   typedef const int *iptr;
14408   iptr p = 0;
14409   ++p;
14410 }
14411 { /* AIX XL C 1.02.0.0 rejects this saying
14412      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14413   struct s { int j; const int *ap[3]; };
14414   struct s *b; b->j = 5;
14415 }
14416 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14417   const int foo = 10;
14418 }
14419
14420 ; return 0; }
14421 EOF
14422 if { (eval echo configure:14423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14423   rm -rf conftest*
14424   ac_cv_c_const=yes
14425 else
14426   echo "configure: failed program was:" >&5
14427   cat conftest.$ac_ext >&5
14428   rm -rf conftest*
14429   ac_cv_c_const=no
14430 fi
14431 rm -f conftest*
14432 fi
14433
14434 echo "$ac_t""$ac_cv_c_const" 1>&6
14435 if test $ac_cv_c_const = no; then
14436   cat >> confdefs.h <<\EOF
14437 #define const 
14438 EOF
14439
14440 fi
14441
14442 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
14443 echo "configure:14444: checking if compiler understands volatile" >&5
14444 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
14445   echo $ac_n "(cached) $ac_c" 1>&6
14446 else
14447   cat > conftest.$ac_ext <<EOF
14448 #line 14449 "configure"
14449 #include "confdefs.h"
14450 int x, y, z;
14451 int main() {
14452 volatile int a; int * volatile b = x ? &y : &z;
14453       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
14454       *b = 0;
14455 ; return 0; }
14456 EOF
14457 if { (eval echo configure:14458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14458   rm -rf conftest*
14459   ol_cv_c_volatile=yes
14460 else
14461   echo "configure: failed program was:" >&5
14462   cat conftest.$ac_ext >&5
14463   rm -rf conftest*
14464   ol_cv_c_volatile=no
14465 fi
14466 rm -f conftest*
14467 fi
14468
14469 echo "$ac_t""$ol_cv_c_volatile" 1>&6
14470   if test $ol_cv_c_volatile = yes; then
14471     : 
14472   else
14473     cat >> confdefs.h <<\EOF
14474 #define volatile 
14475 EOF
14476
14477   fi
14478  
14479
14480 if test $cross_compiling = yes ; then
14481         cat >> confdefs.h <<\EOF
14482 #define CROSS_COMPILING 1
14483 EOF
14484
14485 else
14486         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
14487 echo "configure:14488: checking whether byte ordering is bigendian" >&5
14488 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
14489   echo $ac_n "(cached) $ac_c" 1>&6
14490 else
14491   ac_cv_c_bigendian=unknown
14492 # See if sys/param.h defines the BYTE_ORDER macro.
14493 cat > conftest.$ac_ext <<EOF
14494 #line 14495 "configure"
14495 #include "confdefs.h"
14496 #include <sys/types.h>
14497 #include <sys/param.h>
14498 int main() {
14499
14500 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14501  bogus endian macros
14502 #endif
14503 ; return 0; }
14504 EOF
14505 if { (eval echo configure:14506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14506   rm -rf conftest*
14507   # It does; now see whether it defined to BIG_ENDIAN or not.
14508 cat > conftest.$ac_ext <<EOF
14509 #line 14510 "configure"
14510 #include "confdefs.h"
14511 #include <sys/types.h>
14512 #include <sys/param.h>
14513 int main() {
14514
14515 #if BYTE_ORDER != BIG_ENDIAN
14516  not big endian
14517 #endif
14518 ; return 0; }
14519 EOF
14520 if { (eval echo configure:14521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14521   rm -rf conftest*
14522   ac_cv_c_bigendian=yes
14523 else
14524   echo "configure: failed program was:" >&5
14525   cat conftest.$ac_ext >&5
14526   rm -rf conftest*
14527   ac_cv_c_bigendian=no
14528 fi
14529 rm -f conftest*
14530 else
14531   echo "configure: failed program was:" >&5
14532   cat conftest.$ac_ext >&5
14533 fi
14534 rm -f conftest*
14535 if test $ac_cv_c_bigendian = unknown; then
14536 if test "$cross_compiling" = yes; then
14537     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
14538 else
14539   cat > conftest.$ac_ext <<EOF
14540 #line 14541 "configure"
14541 #include "confdefs.h"
14542 main () {
14543   /* Are we little or big endian?  From Harbison&Steele.  */
14544   union
14545   {
14546     long l;
14547     char c[sizeof (long)];
14548   } u;
14549   u.l = 1;
14550   exit (u.c[sizeof (long) - 1] == 1);
14551 }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14554 then
14555   ac_cv_c_bigendian=no
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -fr conftest*
14560   ac_cv_c_bigendian=yes
14561 fi
14562 rm -fr conftest*
14563 fi
14564
14565 fi
14566 fi
14567
14568 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
14569 if test $ac_cv_c_bigendian = yes; then
14570   cat >> confdefs.h <<\EOF
14571 #define WORDS_BIGENDIAN 1
14572 EOF
14573
14574 fi
14575
14576 fi
14577
14578 echo $ac_n "checking size of short""... $ac_c" 1>&6
14579 echo "configure:14580: checking size of short" >&5 
14580 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
14581   echo $ac_n "(cached) $ac_c" 1>&6
14582 else
14583   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14584   cat > conftest.$ac_ext <<EOF
14585 #line 14586 "configure"
14586 #include "confdefs.h"
14587 #include "confdefs.h" 
14588 #include <sys/types.h> 
14589  
14590
14591 int main() {
14592 switch (0) case 0: case (sizeof (short) == $ac_size):;
14593 ; return 0; }
14594 EOF
14595 if { (eval echo configure:14596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14596   rm -rf conftest*
14597   ac_cv_sizeof_short=$ac_size
14598 else
14599   echo "configure: failed program was:" >&5
14600   cat conftest.$ac_ext >&5
14601 fi
14602 rm -f conftest* 
14603   if test x$ac_cv_sizeof_short != x ; then break; fi 
14604 done 
14605
14606 fi
14607  
14608 if test x$ac_cv_sizeof_short = x ; then 
14609   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
14610 fi 
14611 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
14612 cat >> confdefs.h <<EOF
14613 #define SIZEOF_SHORT $ac_cv_sizeof_short
14614 EOF
14615  
14616  
14617 echo $ac_n "checking size of int""... $ac_c" 1>&6
14618 echo "configure:14619: checking size of int" >&5 
14619 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
14620   echo $ac_n "(cached) $ac_c" 1>&6
14621 else
14622   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14623   cat > conftest.$ac_ext <<EOF
14624 #line 14625 "configure"
14625 #include "confdefs.h"
14626 #include "confdefs.h" 
14627 #include <sys/types.h> 
14628  
14629
14630 int main() {
14631 switch (0) case 0: case (sizeof (int) == $ac_size):;
14632 ; return 0; }
14633 EOF
14634 if { (eval echo configure:14635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14635   rm -rf conftest*
14636   ac_cv_sizeof_int=$ac_size
14637 else
14638   echo "configure: failed program was:" >&5
14639   cat conftest.$ac_ext >&5
14640 fi
14641 rm -f conftest* 
14642   if test x$ac_cv_sizeof_int != x ; then break; fi 
14643 done 
14644
14645 fi
14646  
14647 if test x$ac_cv_sizeof_int = x ; then 
14648   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
14649 fi 
14650 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
14651 cat >> confdefs.h <<EOF
14652 #define SIZEOF_INT $ac_cv_sizeof_int
14653 EOF
14654  
14655  
14656 echo $ac_n "checking size of long""... $ac_c" 1>&6
14657 echo "configure:14658: checking size of long" >&5 
14658 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
14659   echo $ac_n "(cached) $ac_c" 1>&6
14660 else
14661   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
14662   cat > conftest.$ac_ext <<EOF
14663 #line 14664 "configure"
14664 #include "confdefs.h"
14665 #include "confdefs.h" 
14666 #include <sys/types.h> 
14667  
14668
14669 int main() {
14670 switch (0) case 0: case (sizeof (long) == $ac_size):;
14671 ; return 0; }
14672 EOF
14673 if { (eval echo configure:14674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14674   rm -rf conftest*
14675   ac_cv_sizeof_long=$ac_size
14676 else
14677   echo "configure: failed program was:" >&5
14678   cat conftest.$ac_ext >&5
14679 fi
14680 rm -f conftest* 
14681   if test x$ac_cv_sizeof_long != x ; then break; fi 
14682 done 
14683
14684 fi
14685  
14686 if test x$ac_cv_sizeof_long = x ; then 
14687   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
14688 fi 
14689 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
14690 cat >> confdefs.h <<EOF
14691 #define SIZEOF_LONG $ac_cv_sizeof_long
14692 EOF
14693  
14694
14695
14696 if test "$ac_cv_sizeof_int" -lt 4 ; then
14697         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
14698
14699         cat >> confdefs.h <<\EOF
14700 #define LBER_INT_T long
14701 EOF
14702
14703 else
14704         cat >> confdefs.h <<\EOF
14705 #define LBER_INT_T int
14706 EOF
14707
14708 fi
14709
14710 cat >> confdefs.h <<\EOF
14711 #define LBER_LEN_T long
14712 EOF
14713
14714 cat >> confdefs.h <<\EOF
14715 #define LBER_SOCKET_T int
14716 EOF
14717
14718 cat >> confdefs.h <<\EOF
14719 #define LBER_TAG_T long
14720 EOF
14721
14722
14723 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
14724 echo "configure:14725: checking for 8-bit clean memcmp" >&5
14725 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
14726   echo $ac_n "(cached) $ac_c" 1>&6
14727 else
14728   if test "$cross_compiling" = yes; then
14729   ac_cv_func_memcmp_clean=no
14730 else
14731   cat > conftest.$ac_ext <<EOF
14732 #line 14733 "configure"
14733 #include "confdefs.h"
14734
14735 main()
14736 {
14737   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14738   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
14739 }
14740
14741 EOF
14742 if { (eval echo configure:14743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14743 then
14744   ac_cv_func_memcmp_clean=yes
14745 else
14746   echo "configure: failed program was:" >&5
14747   cat conftest.$ac_ext >&5
14748   rm -fr conftest*
14749   ac_cv_func_memcmp_clean=no
14750 fi
14751 rm -fr conftest*
14752 fi
14753
14754 fi
14755
14756 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
14757 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
14758
14759 echo $ac_n "checking for strftime""... $ac_c" 1>&6
14760 echo "configure:14761: checking for strftime" >&5
14761 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
14762   echo $ac_n "(cached) $ac_c" 1>&6
14763 else
14764   cat > conftest.$ac_ext <<EOF
14765 #line 14766 "configure"
14766 #include "confdefs.h"
14767 /* System header to define __stub macros and hopefully few prototypes,
14768     which can conflict with char strftime(); below.  */
14769 #include <assert.h>
14770 /* Override any gcc2 internal prototype to avoid an error.  */
14771 /* We use char because int might match the return type of a gcc2
14772     builtin and then its argument prototype would still apply.  */
14773 char strftime();
14774
14775 int main() {
14776
14777 /* The GNU C library defines this for functions which it implements
14778     to always fail with ENOSYS.  Some functions are actually named
14779     something starting with __ and the normal name is an alias.  */
14780 #if defined (__stub_strftime) || defined (__stub___strftime)
14781 choke me
14782 #else
14783 strftime();
14784 #endif
14785
14786 ; return 0; }
14787 EOF
14788 if { (eval echo configure:14789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14789   rm -rf conftest*
14790   eval "ac_cv_func_strftime=yes"
14791 else
14792   echo "configure: failed program was:" >&5
14793   cat conftest.$ac_ext >&5
14794   rm -rf conftest*
14795   eval "ac_cv_func_strftime=no"
14796 fi
14797 rm -f conftest*
14798 fi
14799
14800 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
14801   echo "$ac_t""yes" 1>&6
14802   cat >> confdefs.h <<\EOF
14803 #define HAVE_STRFTIME 1
14804 EOF
14805
14806 else
14807   echo "$ac_t""no" 1>&6
14808 # strftime is in -lintl on SCO UNIX.
14809 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
14810 echo "configure:14811: checking for strftime in -lintl" >&5
14811 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
14812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14813   echo $ac_n "(cached) $ac_c" 1>&6
14814 else
14815   ac_save_LIBS="$LIBS"
14816 LIBS="-lintl  $LIBS"
14817 cat > conftest.$ac_ext <<EOF
14818 #line 14819 "configure"
14819 #include "confdefs.h"
14820 /* Override any gcc2 internal prototype to avoid an error.  */
14821 /* We use char because int might match the return type of a gcc2
14822     builtin and then its argument prototype would still apply.  */
14823 char strftime();
14824
14825 int main() {
14826 strftime()
14827 ; return 0; }
14828 EOF
14829 if { (eval echo configure:14830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14830   rm -rf conftest*
14831   eval "ac_cv_lib_$ac_lib_var=yes"
14832 else
14833   echo "configure: failed program was:" >&5
14834   cat conftest.$ac_ext >&5
14835   rm -rf conftest*
14836   eval "ac_cv_lib_$ac_lib_var=no"
14837 fi
14838 rm -f conftest*
14839 LIBS="$ac_save_LIBS"
14840
14841 fi
14842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14843   echo "$ac_t""yes" 1>&6
14844   cat >> confdefs.h <<\EOF
14845 #define HAVE_STRFTIME 1
14846 EOF
14847
14848 LIBS="-lintl $LIBS"
14849 else
14850   echo "$ac_t""no" 1>&6
14851 fi
14852
14853 fi
14854
14855
14856 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
14857 echo "configure:14858: checking for inet_aton()" >&5
14858 if eval "test \"`echo '$''{'ol_cv_func_inet_aton'+set}'`\" = set"; then
14859   echo $ac_n "(cached) $ac_c" 1>&6
14860 else
14861   cat > conftest.$ac_ext <<EOF
14862 #line 14863 "configure"
14863 #include "confdefs.h"
14864
14865 #ifdef HAVE_SYS_TYPES_H
14866 #       include <sys/types.h>
14867 #endif
14868 #ifdef HAVE_SYS_SOCKET_H
14869 #       include <sys/socket.h>
14870 #       ifdef HAVE_SYS_SELECT_H
14871 #               include <sys/select.h>
14872 #       endif
14873 #       include <netinet/in.h>
14874 #       ifdef HAVE_ARPA_INET_H
14875 #               include <arpa/inet.h>
14876 #       endif
14877 #endif
14878
14879 int main() {
14880 struct in_addr in;
14881 int rc = inet_aton( "255.255.255.255", &in );
14882 ; return 0; }
14883 EOF
14884 if { (eval echo configure:14885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14885   rm -rf conftest*
14886   ol_cv_func_inet_aton=yes
14887 else
14888   echo "configure: failed program was:" >&5
14889   cat conftest.$ac_ext >&5
14890   rm -rf conftest*
14891   ol_cv_func_inet_aton=no
14892 fi
14893 rm -f conftest*
14894 fi
14895
14896 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
14897   if test $ol_cv_func_inet_aton != no; then
14898     cat >> confdefs.h <<\EOF
14899 #define HAVE_INET_ATON 1
14900 EOF
14901
14902   fi
14903  
14904
14905 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
14906 echo "configure:14907: checking for _spawnlp" >&5
14907 if eval "test \"`echo '$''{'ac_cv_func__spawnlp'+set}'`\" = set"; then
14908   echo $ac_n "(cached) $ac_c" 1>&6
14909 else
14910   cat > conftest.$ac_ext <<EOF
14911 #line 14912 "configure"
14912 #include "confdefs.h"
14913 /* System header to define __stub macros and hopefully few prototypes,
14914     which can conflict with char _spawnlp(); below.  */
14915 #include <assert.h>
14916 /* Override any gcc2 internal prototype to avoid an error.  */
14917 /* We use char because int might match the return type of a gcc2
14918     builtin and then its argument prototype would still apply.  */
14919 char _spawnlp();
14920
14921 int main() {
14922
14923 /* The GNU C library defines this for functions which it implements
14924     to always fail with ENOSYS.  Some functions are actually named
14925     something starting with __ and the normal name is an alias.  */
14926 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
14927 choke me
14928 #else
14929 _spawnlp();
14930 #endif
14931
14932 ; return 0; }
14933 EOF
14934 if { (eval echo configure:14935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14935   rm -rf conftest*
14936   eval "ac_cv_func__spawnlp=yes"
14937 else
14938   echo "configure: failed program was:" >&5
14939   cat conftest.$ac_ext >&5
14940   rm -rf conftest*
14941   eval "ac_cv_func__spawnlp=no"
14942 fi
14943 rm -f conftest*
14944 fi
14945
14946 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
14947   echo "$ac_t""yes" 1>&6
14948   cat >> confdefs.h <<\EOF
14949 #define HAVE_SPAWNLP 1
14950 EOF
14951
14952 else
14953   echo "$ac_t""no" 1>&6
14954 fi
14955
14956
14957 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
14958 echo "configure:14959: checking for _snprintf" >&5
14959 if eval "test \"`echo '$''{'ac_cv_func__snprintf'+set}'`\" = set"; then
14960   echo $ac_n "(cached) $ac_c" 1>&6
14961 else
14962   cat > conftest.$ac_ext <<EOF
14963 #line 14964 "configure"
14964 #include "confdefs.h"
14965 /* System header to define __stub macros and hopefully few prototypes,
14966     which can conflict with char _snprintf(); below.  */
14967 #include <assert.h>
14968 /* Override any gcc2 internal prototype to avoid an error.  */
14969 /* We use char because int might match the return type of a gcc2
14970     builtin and then its argument prototype would still apply.  */
14971 char _snprintf();
14972
14973 int main() {
14974
14975 /* The GNU C library defines this for functions which it implements
14976     to always fail with ENOSYS.  Some functions are actually named
14977     something starting with __ and the normal name is an alias.  */
14978 #if defined (__stub__snprintf) || defined (__stub____snprintf)
14979 choke me
14980 #else
14981 _snprintf();
14982 #endif
14983
14984 ; return 0; }
14985 EOF
14986 if { (eval echo configure:14987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14987   rm -rf conftest*
14988   eval "ac_cv_func__snprintf=yes"
14989 else
14990   echo "configure: failed program was:" >&5
14991   cat conftest.$ac_ext >&5
14992   rm -rf conftest*
14993   eval "ac_cv_func__snprintf=no"
14994 fi
14995 rm -f conftest*
14996 fi
14997
14998 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
14999   echo "$ac_t""yes" 1>&6
15000   ac_cv_func_snprintf=yes
15001         cat >> confdefs.h <<\EOF
15002 #define snprintf _snprintf
15003 EOF
15004
15005
15006 else
15007   echo "$ac_t""no" 1>&6
15008 fi
15009
15010
15011 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
15012 echo "configure:15013: checking for _vsnprintf" >&5
15013 if eval "test \"`echo '$''{'ac_cv_func__vsnprintf'+set}'`\" = set"; then
15014   echo $ac_n "(cached) $ac_c" 1>&6
15015 else
15016   cat > conftest.$ac_ext <<EOF
15017 #line 15018 "configure"
15018 #include "confdefs.h"
15019 /* System header to define __stub macros and hopefully few prototypes,
15020     which can conflict with char _vsnprintf(); below.  */
15021 #include <assert.h>
15022 /* Override any gcc2 internal prototype to avoid an error.  */
15023 /* We use char because int might match the return type of a gcc2
15024     builtin and then its argument prototype would still apply.  */
15025 char _vsnprintf();
15026
15027 int main() {
15028
15029 /* The GNU C library defines this for functions which it implements
15030     to always fail with ENOSYS.  Some functions are actually named
15031     something starting with __ and the normal name is an alias.  */
15032 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
15033 choke me
15034 #else
15035 _vsnprintf();
15036 #endif
15037
15038 ; return 0; }
15039 EOF
15040 if { (eval echo configure:15041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15041   rm -rf conftest*
15042   eval "ac_cv_func__vsnprintf=yes"
15043 else
15044   echo "configure: failed program was:" >&5
15045   cat conftest.$ac_ext >&5
15046   rm -rf conftest*
15047   eval "ac_cv_func__vsnprintf=no"
15048 fi
15049 rm -f conftest*
15050 fi
15051
15052 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
15053   echo "$ac_t""yes" 1>&6
15054   ac_cv_func_vsnprintf=yes
15055         cat >> confdefs.h <<\EOF
15056 #define vsnprintf _vsnprintf
15057 EOF
15058
15059
15060 else
15061   echo "$ac_t""no" 1>&6
15062 fi
15063
15064
15065 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
15066 echo "configure:15067: checking for vprintf" >&5
15067 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
15068   echo $ac_n "(cached) $ac_c" 1>&6
15069 else
15070   cat > conftest.$ac_ext <<EOF
15071 #line 15072 "configure"
15072 #include "confdefs.h"
15073 /* System header to define __stub macros and hopefully few prototypes,
15074     which can conflict with char vprintf(); below.  */
15075 #include <assert.h>
15076 /* Override any gcc2 internal prototype to avoid an error.  */
15077 /* We use char because int might match the return type of a gcc2
15078     builtin and then its argument prototype would still apply.  */
15079 char vprintf();
15080
15081 int main() {
15082
15083 /* The GNU C library defines this for functions which it implements
15084     to always fail with ENOSYS.  Some functions are actually named
15085     something starting with __ and the normal name is an alias.  */
15086 #if defined (__stub_vprintf) || defined (__stub___vprintf)
15087 choke me
15088 #else
15089 vprintf();
15090 #endif
15091
15092 ; return 0; }
15093 EOF
15094 if { (eval echo configure:15095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15095   rm -rf conftest*
15096   eval "ac_cv_func_vprintf=yes"
15097 else
15098   echo "configure: failed program was:" >&5
15099   cat conftest.$ac_ext >&5
15100   rm -rf conftest*
15101   eval "ac_cv_func_vprintf=no"
15102 fi
15103 rm -f conftest*
15104 fi
15105
15106 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
15107   echo "$ac_t""yes" 1>&6
15108   cat >> confdefs.h <<\EOF
15109 #define HAVE_VPRINTF 1
15110 EOF
15111
15112 else
15113   echo "$ac_t""no" 1>&6
15114 fi
15115
15116 if test "$ac_cv_func_vprintf" != yes; then
15117 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
15118 echo "configure:15119: checking for _doprnt" >&5
15119 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
15120   echo $ac_n "(cached) $ac_c" 1>&6
15121 else
15122   cat > conftest.$ac_ext <<EOF
15123 #line 15124 "configure"
15124 #include "confdefs.h"
15125 /* System header to define __stub macros and hopefully few prototypes,
15126     which can conflict with char _doprnt(); below.  */
15127 #include <assert.h>
15128 /* Override any gcc2 internal prototype to avoid an error.  */
15129 /* We use char because int might match the return type of a gcc2
15130     builtin and then its argument prototype would still apply.  */
15131 char _doprnt();
15132
15133 int main() {
15134
15135 /* The GNU C library defines this for functions which it implements
15136     to always fail with ENOSYS.  Some functions are actually named
15137     something starting with __ and the normal name is an alias.  */
15138 #if defined (__stub__doprnt) || defined (__stub____doprnt)
15139 choke me
15140 #else
15141 _doprnt();
15142 #endif
15143
15144 ; return 0; }
15145 EOF
15146 if { (eval echo configure:15147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15147   rm -rf conftest*
15148   eval "ac_cv_func__doprnt=yes"
15149 else
15150   echo "configure: failed program was:" >&5
15151   cat conftest.$ac_ext >&5
15152   rm -rf conftest*
15153   eval "ac_cv_func__doprnt=no"
15154 fi
15155 rm -f conftest*
15156 fi
15157
15158 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
15159   echo "$ac_t""yes" 1>&6
15160   cat >> confdefs.h <<\EOF
15161 #define HAVE_DOPRNT 1
15162 EOF
15163
15164 else
15165   echo "$ac_t""no" 1>&6
15166 fi
15167
15168 fi
15169
15170
15171 if test $ac_cv_func_vprintf = yes ; then
15172                 for ac_func in vsnprintf vsprintf
15173 do
15174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15175 echo "configure:15176: checking for $ac_func" >&5
15176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15177   echo $ac_n "(cached) $ac_c" 1>&6
15178 else
15179   cat > conftest.$ac_ext <<EOF
15180 #line 15181 "configure"
15181 #include "confdefs.h"
15182 /* System header to define __stub macros and hopefully few prototypes,
15183     which can conflict with char $ac_func(); below.  */
15184 #include <assert.h>
15185 /* Override any gcc2 internal prototype to avoid an error.  */
15186 /* We use char because int might match the return type of a gcc2
15187     builtin and then its argument prototype would still apply.  */
15188 char $ac_func();
15189
15190 int main() {
15191
15192 /* The GNU C library defines this for functions which it implements
15193     to always fail with ENOSYS.  Some functions are actually named
15194     something starting with __ and the normal name is an alias.  */
15195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15196 choke me
15197 #else
15198 $ac_func();
15199 #endif
15200
15201 ; return 0; }
15202 EOF
15203 if { (eval echo configure:15204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15204   rm -rf conftest*
15205   eval "ac_cv_func_$ac_func=yes"
15206 else
15207   echo "configure: failed program was:" >&5
15208   cat conftest.$ac_ext >&5
15209   rm -rf conftest*
15210   eval "ac_cv_func_$ac_func=no"
15211 fi
15212 rm -f conftest*
15213 fi
15214
15215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15216   echo "$ac_t""yes" 1>&6
15217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15218   cat >> confdefs.h <<EOF
15219 #define $ac_tr_func 1
15220 EOF
15221  
15222 else
15223   echo "$ac_t""no" 1>&6
15224 fi
15225 done
15226
15227 fi
15228
15229 for ac_func in \
15230         bcopy                   \
15231         closesocket             \
15232         chroot                  \
15233         endgrent                \
15234         endpwent                \
15235         flock                   \
15236         getdtablesize   \
15237         getgrgid                \
15238         gethostname             \
15239         getpass                 \
15240         getpassphrase   \
15241         getpwuid                \
15242         getpwnam                \
15243         getspnam                \
15244         gettimeofday    \
15245         initgroups              \
15246         lockf                   \
15247         memcpy                  \
15248         memmove                 \
15249         mkstemp                 \
15250         pipe                    \
15251         read                    \
15252         recv                    \
15253         recvfrom                \
15254         setpwfile               \
15255         setgid                  \
15256         setegid                 \
15257         setsid                  \
15258         setuid                  \
15259         seteuid                 \
15260         sigaction               \
15261         signal                  \
15262         sigset                  \
15263         snprintf                \
15264         strdup                  \
15265         strerror                \
15266         strpbrk                 \
15267         strrchr                 \
15268         strsep                  \
15269         strstr                  \
15270         strtol                  \
15271         strtoul                 \
15272         strspn                  \
15273         sysconf                 \
15274         waitpid                 \
15275         wait4                   \
15276         write                   \
15277         send                    \
15278         sendto                  \
15279
15280 do
15281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15282 echo "configure:15283: checking for $ac_func" >&5
15283 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15284   echo $ac_n "(cached) $ac_c" 1>&6
15285 else
15286   cat > conftest.$ac_ext <<EOF
15287 #line 15288 "configure"
15288 #include "confdefs.h"
15289 /* System header to define __stub macros and hopefully few prototypes,
15290     which can conflict with char $ac_func(); below.  */
15291 #include <assert.h>
15292 /* Override any gcc2 internal prototype to avoid an error.  */
15293 /* We use char because int might match the return type of a gcc2
15294     builtin and then its argument prototype would still apply.  */
15295 char $ac_func();
15296
15297 int main() {
15298
15299 /* The GNU C library defines this for functions which it implements
15300     to always fail with ENOSYS.  Some functions are actually named
15301     something starting with __ and the normal name is an alias.  */
15302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15303 choke me
15304 #else
15305 $ac_func();
15306 #endif
15307
15308 ; return 0; }
15309 EOF
15310 if { (eval echo configure:15311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15311   rm -rf conftest*
15312   eval "ac_cv_func_$ac_func=yes"
15313 else
15314   echo "configure: failed program was:" >&5
15315   cat conftest.$ac_ext >&5
15316   rm -rf conftest*
15317   eval "ac_cv_func_$ac_func=no"
15318 fi
15319 rm -f conftest*
15320 fi
15321
15322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15323   echo "$ac_t""yes" 1>&6
15324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15325   cat >> confdefs.h <<EOF
15326 #define $ac_tr_func 1
15327 EOF
15328  
15329 else
15330   echo "$ac_t""no" 1>&6
15331 fi
15332 done
15333
15334
15335 for ac_func in getopt tempnam
15336 do
15337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15338 echo "configure:15339: checking for $ac_func" >&5
15339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15340   echo $ac_n "(cached) $ac_c" 1>&6
15341 else
15342   cat > conftest.$ac_ext <<EOF
15343 #line 15344 "configure"
15344 #include "confdefs.h"
15345 /* System header to define __stub macros and hopefully few prototypes,
15346     which can conflict with char $ac_func(); below.  */
15347 #include <assert.h>
15348 /* Override any gcc2 internal prototype to avoid an error.  */
15349 /* We use char because int might match the return type of a gcc2
15350     builtin and then its argument prototype would still apply.  */
15351 char $ac_func();
15352
15353 int main() {
15354
15355 /* The GNU C library defines this for functions which it implements
15356     to always fail with ENOSYS.  Some functions are actually named
15357     something starting with __ and the normal name is an alias.  */
15358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15359 choke me
15360 #else
15361 $ac_func();
15362 #endif
15363
15364 ; return 0; }
15365 EOF
15366 if { (eval echo configure:15367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15367   rm -rf conftest*
15368   eval "ac_cv_func_$ac_func=yes"
15369 else
15370   echo "configure: failed program was:" >&5
15371   cat conftest.$ac_ext >&5
15372   rm -rf conftest*
15373   eval "ac_cv_func_$ac_func=no"
15374 fi
15375 rm -f conftest*
15376 fi
15377
15378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15379   echo "$ac_t""yes" 1>&6
15380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15381   cat >> confdefs.h <<EOF
15382 #define $ac_tr_func 1
15383 EOF
15384  
15385 else
15386   echo "$ac_t""no" 1>&6
15387 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
15388 fi
15389 done
15390
15391
15392
15393 if test "$ac_cv_func_getopt" != yes; then
15394     LIBSRCS="$LIBSRCS getopt.c"
15395 fi
15396
15397 if test "$ac_cv_func_tempnam" != yes; then
15398     LIBSRCS="$LIBSRCS tempnam.c"
15399 fi
15400
15401 # Check Configuration
15402 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
15403 echo "configure:15404: checking declaration of sys_errlist" >&5
15404 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
15405   echo $ac_n "(cached) $ac_c" 1>&6
15406 else
15407   
15408         cat > conftest.$ac_ext <<EOF
15409 #line 15410 "configure"
15410 #include "confdefs.h"
15411
15412 #include <stdio.h>
15413 #include <sys/types.h>
15414 #include <errno.h>
15415 #ifdef WINNT
15416 #include <stdlib.h>
15417 #endif 
15418 int main() {
15419 char *c = (char *) *sys_errlist
15420 ; return 0; }
15421 EOF
15422 if { (eval echo configure:15423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15423   rm -rf conftest*
15424   ol_cv_dcl_sys_errlist=yes
15425         ol_cv_have_sys_errlist=yes
15426 else
15427   echo "configure: failed program was:" >&5
15428   cat conftest.$ac_ext >&5
15429   rm -rf conftest*
15430   ol_cv_dcl_sys_errlist=no
15431 fi
15432 rm -f conftest*
15433 fi
15434
15435 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
15436 #
15437 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
15438 if test $ol_cv_dcl_sys_errlist = no ; then
15439         cat >> confdefs.h <<\EOF
15440 #define DECL_SYS_ERRLIST 1
15441 EOF
15442
15443
15444         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
15445 echo "configure:15446: checking existence of sys_errlist" >&5
15446 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
15447   echo $ac_n "(cached) $ac_c" 1>&6
15448 else
15449   
15450                 cat > conftest.$ac_ext <<EOF
15451 #line 15452 "configure"
15452 #include "confdefs.h"
15453 #include <errno.h>
15454 int main() {
15455 char *c = (char *) *sys_errlist
15456 ; return 0; }
15457 EOF
15458 if { (eval echo configure:15459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15459   rm -rf conftest*
15460   ol_cv_have_sys_errlist=yes
15461 else
15462   echo "configure: failed program was:" >&5
15463   cat conftest.$ac_ext >&5
15464   rm -rf conftest*
15465   ol_cv_have_sys_errlist=no
15466 fi
15467 rm -f conftest*
15468 fi
15469
15470 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
15471 fi
15472 if test $ol_cv_have_sys_errlist = yes ; then
15473         cat >> confdefs.h <<\EOF
15474 #define HAVE_SYS_ERRLIST 1
15475 EOF
15476
15477 fi
15478
15479
15480
15481 if test "$ol_enable_debug" != no ; then
15482         cat >> confdefs.h <<\EOF
15483 #define LDAP_DEBUG 1
15484 EOF
15485
15486 fi
15487 if test "$ol_enable_syslog" = yes ; then
15488         cat >> confdefs.h <<\EOF
15489 #define LDAP_SYSLOG 1
15490 EOF
15491
15492 fi
15493 if test "$ol_enable_libui" = yes ; then
15494         cat >> confdefs.h <<\EOF
15495 #define LDAP_LIBUI 1
15496 EOF
15497
15498 fi
15499 if test "$ol_enable_cache" = no ; then
15500         cat >> confdefs.h <<\EOF
15501 #define LDAP_NOCACHE 1
15502 EOF
15503
15504 fi
15505 if test "$ol_link_kbind" != no ; then
15506         cat >> confdefs.h <<\EOF
15507 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
15508 EOF
15509
15510 fi
15511 if test "$ol_enable_proctitle" != no ; then
15512         cat >> confdefs.h <<\EOF
15513 #define LDAP_PROCTITLE 1
15514 EOF
15515
15516 fi
15517 if test "$ol_enable_referrals" != no ; then
15518         cat >> confdefs.h <<\EOF
15519 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
15520 EOF
15521
15522 fi
15523 if test "$ol_enable_cldap" != no ; then
15524         cat >> confdefs.h <<\EOF
15525 #define LDAP_CONNECTIONLESS 1
15526 EOF
15527
15528 fi
15529 if test "$ol_enable_ldapi" != no; then
15530         cat >> confdefs.h <<\EOF
15531 #define USE_PF_LOCAL 1
15532 EOF
15533
15534 fi
15535
15536 if test "$ol_enable_cleartext" != no ; then
15537         cat >> confdefs.h <<\EOF
15538 #define SLAPD_CLEARTEXT 1
15539 EOF
15540
15541 fi
15542 if test "$ol_enable_crypt" != no ; then
15543         cat >> confdefs.h <<\EOF
15544 #define SLAPD_CRYPT 1
15545 EOF
15546
15547 fi
15548 if test "$ol_link_kpasswd" != no ; then
15549         cat >> confdefs.h <<\EOF
15550 #define SLAPD_KPASSWD 1
15551 EOF
15552
15553 fi
15554 if test "$ol_link_spasswd" != no ; then
15555         cat >> confdefs.h <<\EOF
15556 #define SLAPD_SPASSWD 1
15557 EOF
15558
15559 fi
15560 if test "$ol_enable_multimaster" != no ; then
15561         cat >> confdefs.h <<\EOF
15562 #define SLAPD_MULTIMASTER 1
15563 EOF
15564
15565 fi
15566 if test "$ol_enable_phonetic" != no ; then
15567         cat >> confdefs.h <<\EOF
15568 #define SLAPD_PHONETIC 1
15569 EOF
15570
15571 fi
15572 if test "$ol_enable_rlookups" != no ; then
15573         cat >> confdefs.h <<\EOF
15574 #define SLAPD_RLOOKUPS 1
15575 EOF
15576
15577 fi
15578 if test "$ol_enable_aci" != no ; then
15579         cat >> confdefs.h <<\EOF
15580 #define SLAPD_ACI_ENABLED 1
15581 EOF
15582
15583 fi
15584
15585 if test "$ol_link_modules" != no ; then
15586         cat >> confdefs.h <<\EOF
15587 #define SLAPD_MODULES 1
15588 EOF
15589
15590         BUILD_SLAPD=yes
15591         SLAPD_MODULES_LDFLAGS="-dlopen self"
15592 fi
15593
15594 if test "$ol_link_dnssrv" != no ; then
15595         cat >> confdefs.h <<\EOF
15596 #define SLAPD_DNSSRV 1
15597 EOF
15598
15599         BUILD_SLAPD=yes
15600         BUILD_DNSSRV=yes
15601         if test "$ol_with_dnssrv_module" != static ; then
15602                 cat >> confdefs.h <<\EOF
15603 #define SLAPD_DNSSRV_DYNAMIC 1
15604 EOF
15605
15606                 BUILD_DNSSRV=mod
15607                 BUILD_DNSSRV_DYNAMIC=shared
15608                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
15609         fi
15610 fi
15611
15612 if test "$ol_enable_ldap" != no ; then
15613         cat >> confdefs.h <<\EOF
15614 #define SLAPD_LDAP 1
15615 EOF
15616
15617         BUILD_SLAPD=yes
15618         BUILD_LDAP=yes
15619         if test "$ol_with_ldap_module" != static ; then
15620                 cat >> confdefs.h <<\EOF
15621 #define SLAPD_LDAP_DYNAMIC 1
15622 EOF
15623
15624                 BUILD_LDAP=mod
15625                 BUILD_LDAP_DYNAMIC=shared
15626                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
15627         fi
15628 fi
15629
15630 if test "$ol_link_ldbm" != no ; then
15631         cat >> confdefs.h <<\EOF
15632 #define SLAPD_LDBM 1
15633 EOF
15634
15635         BUILD_SLAPD=yes
15636         BUILD_LDBM=yes
15637         if test "$ol_with_ldbm_module" != static ; then
15638                 cat >> confdefs.h <<\EOF
15639 #define SLAPD_LDBM_DYNAMIC 1
15640 EOF
15641
15642                 BUILD_LDBM=mod
15643                 BUILD_LDBM_DYNAMIC=shared
15644                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
15645         fi
15646 fi
15647
15648 if test "$ol_enable_passwd" != no ; then
15649         cat >> confdefs.h <<\EOF
15650 #define SLAPD_PASSWD 1
15651 EOF
15652
15653         BUILD_SLAPD=yes
15654         BUILD_PASSWD=yes
15655         if test "$ol_with_passwd_module" != static ; then
15656                 cat >> confdefs.h <<\EOF
15657 #define SLAPD_PASSWD_DYNAMIC 1
15658 EOF
15659
15660                 BUILD_PASSWD=mod
15661                 BUILD_PASSWD_DYNAMIC=shared
15662                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
15663         fi
15664 fi
15665
15666 if test "$ol_link_perl" != no ; then
15667         cat >> confdefs.h <<\EOF
15668 #define SLAPD_PERL 1
15669 EOF
15670
15671         BUILD_SLAPD=yes
15672         BUILD_PERL=yes
15673         if test "$ol_with_perl_module" != static ; then
15674                 cat >> confdefs.h <<\EOF
15675 #define SLAPD_PERL_DYNAMIC 1
15676 EOF
15677
15678                 BUILD_PERL=mod
15679                 BUILD_PERL_DYNAMIC=shared
15680                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
15681         fi
15682 fi
15683
15684 if test "$ol_enable_shell" != no ; then
15685         cat >> confdefs.h <<\EOF
15686 #define SLAPD_SHELL 1
15687 EOF
15688
15689         BUILD_SLAPD=yes
15690         BUILD_SHELL=yes
15691         if test "$ol_with_shell_module" != static ; then
15692                 cat >> confdefs.h <<\EOF
15693 #define SLAPD_SHELL_DYNAMIC 1
15694 EOF
15695
15696                 BUILD_SHELL=mod
15697                 BUILD_SHELL_DYNAMIC=shared
15698                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
15699         fi
15700 fi
15701
15702 if test "$ol_enable_tcl" != no ; then
15703         cat >> confdefs.h <<\EOF
15704 #define SLAPD_TCL 1
15705 EOF
15706
15707         BUILD_SLAPD=yes
15708         BUILD_TCL=yes
15709         if test "$ol_with_tcl_module" != static; then
15710                 cat >> confdefs.h <<\EOF
15711 #define SLAPD_TCL_DYNAMIC 1
15712 EOF
15713
15714                 BUILD_TCL=mod
15715                 BUILD_TCL_DYNAMIC=shared
15716                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
15717         fi
15718 fi
15719
15720 if test "$ol_enable_sql" != no ; then
15721         cat >> confdefs.h <<\EOF
15722 #define SLAPD_SQL 1
15723 EOF
15724
15725         BUILD_SLAPD=yes
15726         BUILD_SQL=yes
15727         SLAPD_SQL_LIBS=-liodbc
15728         if test "$ol_with_sql_module" != static; then
15729                 cat >> confdefs.h <<\EOF
15730 #define SLAPD_SQL_DYNAMIC 1
15731 EOF
15732
15733                 BUILD_SQL=mod
15734                 BUILD_SQL_DYNAMIC=shared
15735                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
15736         fi
15737 fi
15738
15739 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
15740         $BUILD_SLAPD = yes ; then
15741         BUILD_SLURPD=yes
15742 fi
15743
15744
15745 if test "$LINK_BINS_DYNAMIC" = yes; then
15746     LIB_LINKAGE=DYN
15747     LT_LIB_LINKAGE=shared
15748 else
15749     LIB_LINKAGE=STAT
15750     LT_LIB_LINKAGE=static
15751 fi
15752
15753 if test "$ac_cv_mingw32" = yes ; then
15754     PLAT=NT
15755     DYN_EXT=dll
15756 else
15757     PLAT=UNIX
15758     DYN_EXT=so
15759 fi
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769   
15770   
15771   
15772   
15773   
15774   
15775   
15776   
15777   
15778   
15779   
15780   
15781   
15782   
15783   
15784   
15785   
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822 trap '' 1 2 15
15823
15824 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15825
15826 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15827 # Let make expand exec_prefix.
15828 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15829
15830 # Any assignment to VPATH causes Sun make to only execute
15831 # the first set of double-colon rules, so remove it if not needed.
15832 # If there is a colon in the path, we need to keep it.
15833 if test "x$srcdir" = x.; then
15834   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15835 fi
15836
15837 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15838
15839 DEFS=-DHAVE_CONFIG_H
15840
15841 # Without the "./", some shells look in PATH for config.status.
15842 : ${CONFIG_STATUS=./config.status}
15843
15844 echo creating $CONFIG_STATUS
15845 rm -f $CONFIG_STATUS
15846 cat > $CONFIG_STATUS <<EOF
15847 #! /bin/sh
15848 # Generated automatically by configure.
15849 # Run this file to recreate the current configuration.
15850 # This directory was configured as follows,
15851 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15852 #
15853 # $0 $ac_configure_args
15854 #
15855 # Compiler output produced by configure, useful for debugging
15856 # configure, is in ./config.log if it exists.
15857
15858 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15859 for ac_option
15860 do
15861   case "\$ac_option" in
15862   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15863     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15864     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15865   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15866     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15867     exit 0 ;;
15868   -help | --help | --hel | --he | --h)
15869     echo "\$ac_cs_usage"; exit 0 ;;
15870   *) echo "\$ac_cs_usage"; exit 1 ;;
15871   esac
15872 done
15873
15874 ac_given_srcdir=$srcdir
15875 ac_given_INSTALL="$INSTALL"
15876
15877 trap 'rm -fr `echo "\
15878 Makefile:build/top.mk:Makefile.in:build/dir.mk \
15879 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
15880 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
15881 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
15882 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
15883 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
15884 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
15885 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
15886 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
15887 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
15888 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
15889 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
15890 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
15891 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
15892 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
15893 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
15894 include/Makefile:build/top.mk:include/Makefile.in \
15895 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
15896 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
15897 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15898 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
15899 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
15900 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
15901 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
15902 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
15903 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
15904 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
15905 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
15906 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
15907 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
15908 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
15909 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
15910 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
15911 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
15912 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
15913 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
15914 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
15915 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
15916 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
15917 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
15918 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
15919 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
15920 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
15921 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
15922  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15923 EOF
15924 cat >> $CONFIG_STATUS <<EOF
15925
15926 # Protect against being on the right side of a sed subst in config.status.
15927 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15928  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15929 $ac_vpsub
15930 $extrasub
15931 s%@SHELL@%$SHELL%g
15932 s%@CFLAGS@%$CFLAGS%g
15933 s%@CPPFLAGS@%$CPPFLAGS%g
15934 s%@CXXFLAGS@%$CXXFLAGS%g
15935 s%@FFLAGS@%$FFLAGS%g
15936 s%@DEFS@%$DEFS%g
15937 s%@LDFLAGS@%$LDFLAGS%g
15938 s%@LIBS@%$LIBS%g
15939 s%@exec_prefix@%$exec_prefix%g
15940 s%@prefix@%$prefix%g
15941 s%@program_transform_name@%$program_transform_name%g
15942 s%@bindir@%$bindir%g
15943 s%@sbindir@%$sbindir%g
15944 s%@libexecdir@%$libexecdir%g
15945 s%@datadir@%$datadir%g
15946 s%@sysconfdir@%$sysconfdir%g
15947 s%@sharedstatedir@%$sharedstatedir%g
15948 s%@localstatedir@%$localstatedir%g
15949 s%@libdir@%$libdir%g
15950 s%@includedir@%$includedir%g
15951 s%@oldincludedir@%$oldincludedir%g
15952 s%@infodir@%$infodir%g
15953 s%@mandir@%$mandir%g
15954 s%@host@%$host%g
15955 s%@host_alias@%$host_alias%g
15956 s%@host_cpu@%$host_cpu%g
15957 s%@host_vendor@%$host_vendor%g
15958 s%@host_os@%$host_os%g
15959 s%@target@%$target%g
15960 s%@target_alias@%$target_alias%g
15961 s%@target_cpu@%$target_cpu%g
15962 s%@target_vendor@%$target_vendor%g
15963 s%@target_os@%$target_os%g
15964 s%@build@%$build%g
15965 s%@build_alias@%$build_alias%g
15966 s%@build_cpu@%$build_cpu%g
15967 s%@build_vendor@%$build_vendor%g
15968 s%@build_os@%$build_os%g
15969 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15970 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15971 s%@INSTALL_DATA@%$INSTALL_DATA%g
15972 s%@PACKAGE@%$PACKAGE%g
15973 s%@VERSION@%$VERSION%g
15974 s%@ACLOCAL@%$ACLOCAL%g
15975 s%@AUTOCONF@%$AUTOCONF%g
15976 s%@AUTOMAKE@%$AUTOMAKE%g
15977 s%@AUTOHEADER@%$AUTOHEADER%g
15978 s%@MAKEINFO@%$MAKEINFO%g
15979 s%@install_sh@%$install_sh%g
15980 s%@AMTAR@%$AMTAR%g
15981 s%@AWK@%$AWK%g
15982 s%@AMTARFLAGS@%$AMTARFLAGS%g
15983 s%@SET_MAKE@%$SET_MAKE%g
15984 s%@top_builddir@%$top_builddir%g
15985 s%@ldap_subdir@%$ldap_subdir%g
15986 s%@CC@%$CC%g
15987 s%@RANLIB@%$RANLIB%g
15988 s%@LN_S@%$LN_S%g
15989 s%@DLLTOOL@%$DLLTOOL%g
15990 s%@AS@%$AS%g
15991 s%@OBJDUMP@%$OBJDUMP%g
15992 s%@LIBTOOL@%$LIBTOOL%g
15993 s%@LN_H@%$LN_H%g
15994 s%@SENDMAIL@%$SENDMAIL%g
15995 s%@EDITOR@%$EDITOR%g
15996 s%@FINGER@%$FINGER%g
15997 s%@PERLBIN@%$PERLBIN%g
15998 s%@CPP@%$CPP%g
15999 s%@EXEEXT@%$EXEEXT%g
16000 s%@OBJEXT@%$OBJEXT%g
16001 s%@OL_MKDEP@%$OL_MKDEP%g
16002 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
16003 s%@LIBOBJS@%$LIBOBJS%g
16004 s%@LIBSRCS@%$LIBSRCS%g
16005 s%@PLAT@%$PLAT%g
16006 s%@LIB_LINKAGE@%$LIB_LINKAGE%g
16007 s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
16008 s%@DYN_EXT@%$DYN_EXT%g
16009 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
16010 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
16011 s%@BUILD_LDAP@%$BUILD_LDAP%g
16012 s%@BUILD_LDBM@%$BUILD_LDBM%g
16013 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
16014 s%@BUILD_PERL@%$BUILD_PERL%g
16015 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
16016 s%@BUILD_SHELL@%$BUILD_SHELL%g
16017 s%@BUILD_SQL@%$BUILD_SQL%g
16018 s%@BUILD_TCL@%$BUILD_TCL%g
16019 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
16020 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
16021 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
16022 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
16023 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
16024 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
16025 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
16026 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
16027 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
16028 s%@LDAP_LIBS@%$LDAP_LIBS%g
16029 s%@LDIF_LIBS@%$LDIF_LIBS%g
16030 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
16031 s%@QUIPU_LIBS@%$QUIPU_LIBS%g
16032 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
16033 s%@LDBM_LIBS@%$LDBM_LIBS%g
16034 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
16035 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
16036 s%@WRAP_LIBS@%$WRAP_LIBS%g
16037 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
16038 s%@LINK_BINS_DYNAMIC@%$LINK_BINS_DYNAMIC%g
16039 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
16040 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
16041 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
16042 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
16043 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
16044 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
16045 s%@KRB4_LIBS@%$KRB4_LIBS%g
16046 s%@KRB5_LIBS@%$KRB5_LIBS%g
16047 s%@READLINE_LIBS@%$READLINE_LIBS%g
16048 s%@SASL_LIBS@%$SASL_LIBS%g
16049 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
16050 s%@TLS_LIBS@%$TLS_LIBS%g
16051 s%@MODULES_LIBS@%$MODULES_LIBS%g
16052 s%@AUTH_LIBS@%$AUTH_LIBS%g
16053 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
16054 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
16055 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
16056
16057 CEOF
16058 EOF
16059
16060 cat >> $CONFIG_STATUS <<\EOF
16061
16062 # Split the substitutions into bite-sized pieces for seds with
16063 # small command number limits, like on Digital OSF/1 and HP-UX.
16064 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16065 ac_file=1 # Number of current file.
16066 ac_beg=1 # First line for current file.
16067 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16068 ac_more_lines=:
16069 ac_sed_cmds=""
16070 while $ac_more_lines; do
16071   if test $ac_beg -gt 1; then
16072     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16073   else
16074     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16075   fi
16076   if test ! -s conftest.s$ac_file; then
16077     ac_more_lines=false
16078     rm -f conftest.s$ac_file
16079   else
16080     if test -z "$ac_sed_cmds"; then
16081       ac_sed_cmds="sed -f conftest.s$ac_file"
16082     else
16083       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16084     fi
16085     ac_file=`expr $ac_file + 1`
16086     ac_beg=$ac_end
16087     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16088   fi
16089 done
16090 if test -z "$ac_sed_cmds"; then
16091   ac_sed_cmds=cat
16092 fi
16093 EOF
16094
16095 cat >> $CONFIG_STATUS <<EOF
16096
16097 CONFIG_FILES=\${CONFIG_FILES-"\
16098 Makefile:build/top.mk:Makefile.in:build/dir.mk \
16099 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
16100 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
16101 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
16102 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
16103 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
16104 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
16105 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
16106 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
16107 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
16108 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
16109 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
16110 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
16111 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
16112 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
16113 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
16114 include/Makefile:build/top.mk:include/Makefile.in \
16115 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
16116 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
16117 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16118 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
16119 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
16120 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
16121 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
16122 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
16123 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
16124 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
16125 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
16126 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
16127 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
16128 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
16129 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
16130 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
16131 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
16132 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
16133 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
16134 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
16135 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
16136 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
16137 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
16138 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
16139 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
16140 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
16141 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
16142 "}
16143 EOF
16144 cat >> $CONFIG_STATUS <<\EOF
16145 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16146   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16147   case "$ac_file" in
16148   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16149        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16150   *) ac_file_in="${ac_file}.in" ;;
16151   esac
16152
16153   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16154
16155   # Remove last slash and all that follows it.  Not all systems have dirname.
16156   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16157   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16158     # The file is in a subdirectory.
16159     test ! -d "$ac_dir" && mkdir "$ac_dir"
16160     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16161     # A "../" for each directory in $ac_dir_suffix.
16162     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16163   else
16164     ac_dir_suffix= ac_dots=
16165   fi
16166
16167   case "$ac_given_srcdir" in
16168   .)  srcdir=.
16169       if test -z "$ac_dots"; then top_srcdir=.
16170       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16171   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16172   *) # Relative path.
16173     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16174     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16175   esac
16176
16177   case "$ac_given_INSTALL" in
16178   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16179   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16180   esac
16181
16182   echo creating "$ac_file"
16183   rm -f "$ac_file"
16184   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16185   case "$ac_file" in
16186   *Makefile*) ac_comsub="1i\\
16187 # $configure_input" ;;
16188   *) ac_comsub= ;;
16189   esac
16190
16191   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16192   sed -e "$ac_comsub
16193 s%@configure_input@%$configure_input%g
16194 s%@srcdir@%$srcdir%g
16195 s%@top_srcdir@%$top_srcdir%g
16196 s%@INSTALL@%$INSTALL%g
16197 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16198 fi; done
16199 rm -f conftest.s*
16200
16201 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16202 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16203 #
16204 # ac_d sets the value in "#define NAME VALUE" lines.
16205 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16206 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16207 ac_dC='\3'
16208 ac_dD='%g'
16209 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16210 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16211 ac_uB='\([      ]\)%\1#\2define\3'
16212 ac_uC=' '
16213 ac_uD='\4%g'
16214 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16215 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16216 ac_eB='$%\1#\2define\3'
16217 ac_eC=' '
16218 ac_eD='%g'
16219
16220 if test "${CONFIG_HEADERS+set}" != set; then
16221 EOF
16222 cat >> $CONFIG_STATUS <<EOF
16223   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
16224 EOF
16225 cat >> $CONFIG_STATUS <<\EOF
16226 fi
16227 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16228   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16229   case "$ac_file" in
16230   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16231        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16232   *) ac_file_in="${ac_file}.in" ;;
16233   esac
16234
16235   echo creating $ac_file
16236
16237   rm -f conftest.frag conftest.in conftest.out
16238   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16239   cat $ac_file_inputs > conftest.in
16240
16241 EOF
16242
16243 # Transform confdefs.h into a sed script conftest.vals that substitutes
16244 # the proper values into config.h.in to produce config.h.  And first:
16245 # Protect against being on the right side of a sed subst in config.status.
16246 # Protect against being in an unquoted here document in config.status.
16247 rm -f conftest.vals
16248 cat > conftest.hdr <<\EOF
16249 s/[\\&%]/\\&/g
16250 s%[\\$`]%\\&%g
16251 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16252 s%ac_d%ac_u%gp
16253 s%ac_u%ac_e%gp
16254 EOF
16255 sed -n -f conftest.hdr confdefs.h > conftest.vals
16256 rm -f conftest.hdr
16257
16258 # This sed command replaces #undef with comments.  This is necessary, for
16259 # example, in the case of _POSIX_SOURCE, which is predefined and required
16260 # on some systems where configure will not decide to define it.
16261 cat >> conftest.vals <<\EOF
16262 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16263 EOF
16264
16265 # Break up conftest.vals because some shells have a limit on
16266 # the size of here documents, and old seds have small limits too.
16267
16268 rm -f conftest.tail
16269 while :
16270 do
16271   ac_lines=`grep -c . conftest.vals`
16272   # grep -c gives empty output for an empty file on some AIX systems.
16273   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16274   # Write a limited-size here document to conftest.frag.
16275   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16276   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16277   echo 'CEOF
16278   sed -f conftest.frag conftest.in > conftest.out
16279   rm -f conftest.in
16280   mv conftest.out conftest.in
16281 ' >> $CONFIG_STATUS
16282   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16283   rm -f conftest.vals
16284   mv conftest.tail conftest.vals
16285 done
16286 rm -f conftest.vals
16287
16288 cat >> $CONFIG_STATUS <<\EOF
16289   rm -f conftest.frag conftest.h
16290   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16291   cat conftest.in >> conftest.h
16292   rm -f conftest.in
16293   if cmp -s $ac_file conftest.h 2>/dev/null; then
16294     echo "$ac_file is unchanged"
16295     rm -f conftest.h
16296   else
16297     # Remove last slash and all that follows it.  Not all systems have dirname.
16298       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16299       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16300       # The file is in a subdirectory.
16301       test ! -d "$ac_dir" && mkdir "$ac_dir"
16302     fi
16303     rm -f $ac_file
16304     mv conftest.h $ac_file
16305   fi
16306 fi; done
16307
16308 EOF
16309 cat >> $CONFIG_STATUS <<EOF
16310
16311 EOF
16312 cat >> $CONFIG_STATUS <<\EOF
16313
16314 date > stamp-h
16315 echo Please \"make depend\" to build dependencies
16316
16317 exit 0
16318 EOF
16319 chmod +x $CONFIG_STATUS
16320 rm -fr confdefs* $ac_clean_files
16321 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
16322